[ARC] Fix support for double assist instructions.
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
... / ...
CommitLineData
12016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
2
3 * linux-aarch64-ipa.c: Add <elf.h> include.
4 * linux-ppc-ipa.c: Add <elf.h> include.
5 * linux-s390-ipa.c: Add <elf.h> include.
6
72016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
8
9 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
10 (get_raw_reg_ptr): Likewise.
11 (get_trace_state_variable_value_ptr): Likewise.
12 (set_trace_state_variable_value_ptr): Likewise.
13 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
14 char *.
15
162016-03-31 Wei-cheng Wang <cole945@gmail.com>
17 Marcin Kościelnicki <koriakin@0x04.net>
18
19 PR/17221
20 * linux-ppc-low.c (emit_insns): New function.
21 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
22 (ppc_emit_prologue): New function.
23 (ppc_emit_epilogue): New function.
24 (ppc_emit_add): New function.
25 (ppc_emit_sub): New function.
26 (ppc_emit_mul): New function.
27 (ppc_emit_lsh): New function.
28 (ppc_emit_rsh_signed): New function.
29 (ppc_emit_rsh_unsigned): New function.
30 (ppc_emit_ext): New function.
31 (ppc_emit_zero_ext): New function.
32 (ppc_emit_log_not): New function.
33 (ppc_emit_bit_and): New function.
34 (ppc_emit_bit_or): New function.
35 (ppc_emit_bit_xor): New function.
36 (ppc_emit_bit_not): New function.
37 (ppc_emit_equal): New function.
38 (ppc_emit_less_signed): New function.
39 (ppc_emit_less_unsigned): New function.
40 (ppc_emit_ref): New function.
41 (ppc_emit_const): New function.
42 (ppc_emit_reg): New function.
43 (ppc_emit_pop): New function.
44 (ppc_emit_stack_flush): New function.
45 (ppc_emit_swap): New function.
46 (ppc_emit_stack_adjust): New function.
47 (ppc_emit_call): New function.
48 (ppc_emit_int_call_1): New function.
49 (ppc_emit_void_call_2): New function.
50 (ppc_emit_if_goto): New function.
51 (ppc_emit_goto): New function.
52 (ppc_emit_eq_goto): New function.
53 (ppc_emit_ne_goto): New function.
54 (ppc_emit_lt_goto): New function.
55 (ppc_emit_le_goto): New function.
56 (ppc_emit_gt_goto): New function.
57 (ppc_emit_ge_goto): New function.
58 (ppc_write_goto_address): New function.
59 (ppc_emit_ops_impl): New static variable.
60 (ppc64v1_emit_prologue): New function.
61 (ppc64v2_emit_prologue): New function.
62 (ppc64_emit_epilogue): New function.
63 (ppc64_emit_add): New function.
64 (ppc64_emit_sub): New function.
65 (ppc64_emit_mul): New function.
66 (ppc64_emit_lsh): New function.
67 (ppc64_emit_rsh_signed): New function.
68 (ppc64_emit_rsh_unsigned): New function.
69 (ppc64_emit_ext): New function.
70 (ppc64_emit_zero_ext): New function.
71 (ppc64_emit_log_not): New function.
72 (ppc64_emit_bit_and): New function.
73 (ppc64_emit_bit_or): New function.
74 (ppc64_emit_bit_xor): New function.
75 (ppc64_emit_bit_not): New function.
76 (ppc64_emit_equal): New function.
77 (ppc64_emit_less_signed): New function.
78 (ppc64_emit_less_unsigned): New function.
79 (ppc64_emit_ref): New function.
80 (ppc64_emit_const): New function.
81 (ppc64v1_emit_reg): New function.
82 (ppc64v2_emit_reg): New function.
83 (ppc64_emit_pop): New function.
84 (ppc64_emit_stack_flush): New function.
85 (ppc64_emit_swap): New function.
86 (ppc64v1_emit_call): New function.
87 (ppc64v2_emit_call): New function.
88 (ppc64v1_emit_int_call_1): New function.
89 (ppc64v2_emit_int_call_1): New function.
90 (ppc64v1_emit_void_call_2): New function.
91 (ppc64v2_emit_void_call_2): New function.
92 (ppc64_emit_if_goto): New function.
93 (ppc64_emit_eq_goto): New function.
94 (ppc64_emit_ne_goto): New function.
95 (ppc64_emit_lt_goto): New function.
96 (ppc64_emit_le_goto): New function.
97 (ppc64_emit_gt_goto): New function.
98 (ppc64_emit_ge_goto): New function.
99 (ppc64v1_emit_ops_impl): New static variable.
100 (ppc64v2_emit_ops_impl): New static variable.
101 (ppc_emit_ops): New function.
102 (linux_low_target): Wire in ppc_emit_ops.
103
1042016-03-31 Wei-cheng Wang <cole945@gmail.com>
105 Marcin Kościelnicki <koriakin@0x04.net>
106
107 PR/17221
108 * Makefile.in: Add powerpc-*-ipa.o
109 * configure.srv: Add ipa_obj for powerpc*-linux.
110 * linux-ppc-ipa.c: New file.
111 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
112 includes.
113 (PPC_FIELD): New macro.
114 (PPC_SEXT): New macro.
115 (PPC_OP6): New macro.
116 (PPC_BO): New macro.
117 (PPC_LI): New macro.
118 (PPC_BD): New macro.
119 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
120 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
121 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
122 (ppc_get_thread_area): New function.
123 (is_elfv2_inferior): New function.
124 (gen_ds_form): New function.
125 (GEN_STD): New macro.
126 (GEN_STDU): New macro.
127 (GEN_LD): New macro.
128 (GEN_LDU): New macro.
129 (gen_d_form): New function.
130 (GEN_ADDI): New macro.
131 (GEN_ADDIS): New macro.
132 (GEN_LI): New macro.
133 (GEN_LIS): New macro.
134 (GEN_ORI): New macro.
135 (GEN_ORIS): New macro.
136 (GEN_LWZ): New macro.
137 (GEN_STW): New macro.
138 (GEN_STWU): New macro.
139 (gen_xfx_form): New function.
140 (GEN_MFSPR): New macro.
141 (GEN_MTSPR): New macro.
142 (GEN_MFCR): New macro.
143 (GEN_MTCR): New macro.
144 (GEN_SYNC): New macro.
145 (GEN_LWSYNC): New macro.
146 (gen_x_form): New function.
147 (GEN_OR): New macro.
148 (GEN_MR): New macro.
149 (GEN_LWARX): New macro.
150 (GEN_STWCX): New macro.
151 (GEN_CMPW): New macro.
152 (gen_md_form): New function.
153 (GEN_RLDICL): New macro.
154 (GEN_RLDICR): New macro.
155 (gen_i_form): New function.
156 (GEN_B): New macro.
157 (GEN_BL): New macro.
158 (gen_b_form): New function.
159 (GEN_BNE): New macro.
160 (GEN_LOAD): New macro.
161 (GEN_STORE): New macro.
162 (gen_limm): New function.
163 (gen_atomic_xchg): New function.
164 (gen_call): New function.
165 (ppc_relocate_instruction): New function.
166 (ppc_install_fast_tracepoint_jump_pad): New function.
167 (ppc_get_min_fast_tracepoint_insn_len): New function.
168 (ppc_get_ipa_tdesc_idx): New function.
169 (the_low_target): Wire in the new functions.
170 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
171 tdescs.
172 * linux-ppc-tdesc.h: New file.
173
1742016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
175
176 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
177 (alloc_jump_pad_buffer): New function.
178 * linux-amd64-ipa.c: Add <sys/mman.h> include.
179 (alloc_jump_pad_buffer): New function.
180 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
181 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
182 (alloc_jump_pad_buffer): New function.
183 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
184 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
185 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
186 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
187
1882016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
189
190 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
191 * linux-amd64-ipa.c: Likewise.
192 * linux-i386-ipa.c: Likewise.
193 * linux-s390-ipa.c: Likewise.
194 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
195 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
196 set_trace_state_variable_value_ptr.
197 (struct ipa_sym_addresses): Likewise.
198 (symbol_list): Likewise.
199 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
200 accessing gdb_collect directly.
201 (gdb_collect_ptr_type): New typedef.
202 (get_raw_reg_ptr_type): New typedef.
203 (get_trace_state_variable_value_ptr_type): New typedef.
204 (set_trace_state_variable_value_ptr_type): New typedef.
205 (gdb_collect_ptr): New global.
206 (get_raw_reg_ptr): New global.
207 (get_trace_state_variable_value_ptr): New global.
208 (set_trace_state_variable_value_ptr): New global.
209 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
210 accessing get_raw_reg directly.
211 (get_get_tsv_func_addr): Likewise for
212 get_trace_state_variable_value_ptr.
213 (get_set_tsv_func_addr): Likewise for
214 set_trace_state_variable_value_ptr.
215 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
216
2172016-03-30 Simon Marchi <simon.marchi@ericsson.com>
218
219 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
220
2212016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
222
223 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
224 packets.
225 (relocate_instruction): Remove own_buf.
226 * server.c (own_buf): Make global.
227 (handle_v_requests): Make global.
228 * server.h (own_buf): New declaration.
229 (handle_v_requests): New prototype.
230
2312016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
232
233 PR 18377
234 * linux-s390-low.c (add_insns): New function.
235 (s390_emit_prologue): New function.
236 (s390_emit_epilogue): New function.
237 (s390_emit_add): New function.
238 (s390_emit_sub): New function.
239 (s390_emit_mul): New function.
240 (s390_emit_lsh): New function.
241 (s390_emit_rsh_signed): New function.
242 (s390_emit_rsh_unsigned): New function.
243 (s390_emit_ext): New function.
244 (s390_emit_log_not): New function.
245 (s390_emit_bit_and): New function.
246 (s390_emit_bit_or): New function.
247 (s390_emit_bit_xor): New function.
248 (s390_emit_bit_not): New function.
249 (s390_emit_equal): New function.
250 (s390_emit_less_signed): New function.
251 (s390_emit_less_unsigned): New function.
252 (s390_emit_ref): New function.
253 (s390_emit_if_goto): New function.
254 (s390_emit_goto): New function.
255 (s390_write_goto_address): New function.
256 (s390_emit_litpool): New function.
257 (s390_emit_const): New function.
258 (s390_emit_call): New function.
259 (s390_emit_reg): New function.
260 (s390_emit_pop): New function.
261 (s390_emit_stack_flush): New function.
262 (s390_emit_zero_ext): New function.
263 (s390_emit_swap): New function.
264 (s390_emit_stack_adjust): New function.
265 (s390_emit_set_r2): New function.
266 (s390_emit_int_call_1): New function.
267 (s390_emit_void_call_2): New function.
268 (s390_emit_eq_goto): New function.
269 (s390_emit_ne_goto): New function.
270 (s390_emit_lt_goto): New function.
271 (s390_emit_le_goto): New function.
272 (s390_emit_gt_goto): New function.
273 (s390_emit_ge_goto): New function.
274 (s390x_emit_prologue): New function.
275 (s390x_emit_epilogue): New function.
276 (s390x_emit_add): New function.
277 (s390x_emit_sub): New function.
278 (s390x_emit_mul): New function.
279 (s390x_emit_lsh): New function.
280 (s390x_emit_rsh_signed): New function.
281 (s390x_emit_rsh_unsigned): New function.
282 (s390x_emit_ext): New function.
283 (s390x_emit_log_not): New function.
284 (s390x_emit_bit_and): New function.
285 (s390x_emit_bit_or): New function.
286 (s390x_emit_bit_xor): New function.
287 (s390x_emit_bit_not): New function.
288 (s390x_emit_equal): New function.
289 (s390x_emit_less_signed): New function.
290 (s390x_emit_less_unsigned): New function.
291 (s390x_emit_ref): New function.
292 (s390x_emit_if_goto): New function.
293 (s390x_emit_const): New function.
294 (s390x_emit_call): New function.
295 (s390x_emit_reg): New function.
296 (s390x_emit_pop): New function.
297 (s390x_emit_stack_flush): New function.
298 (s390x_emit_zero_ext): New function.
299 (s390x_emit_swap): New function.
300 (s390x_emit_stack_adjust): New function.
301 (s390x_emit_int_call_1): New function.
302 (s390x_emit_void_call_2): New function.
303 (s390x_emit_eq_goto): New function.
304 (s390x_emit_ne_goto): New function.
305 (s390x_emit_lt_goto): New function.
306 (s390x_emit_le_goto): New function.
307 (s390x_emit_gt_goto): New function.
308 (s390x_emit_ge_goto): New function.
309 (s390_emit_ops): New function.
310 (struct linux_target_ops): Fill in emit_ops hook.
311
3122016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
313
314 PR 18377
315 * Makefile.in: Add s390 IPA files.
316 * configure.srv: Build IPA for s390.
317 * linux-s390-ipa.c: New file.
318 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
319 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
320 (tdesc_s390_linux32): Likewise.
321 (init_registers_s390_linux32v1): Likewise.
322 (tdesc_s390_linux32v1): Likewise.
323 (init_registers_s390_linux32v2): Likewise.
324 (tdesc_s390_linux32v2): Likewise.
325 (init_registers_s390_linux64): Likewise.
326 (tdesc_s390_linux64): Likewise.
327 (init_registers_s390_linux64v1): Likewise.
328 (tdesc_s390_linux64v1): Likewise.
329 (init_registers_s390_linux64v2): Likewise.
330 (tdesc_s390_linux64v2): Likewise.
331 (init_registers_s390_te_linux64): Likewise.
332 (tdesc_s390_te_linux64): Likewise.
333 (init_registers_s390_vx_linux64): Likewise.
334 (tdesc_s390_vx_linux64): Likewise.
335 (init_registers_s390_tevx_linux64): Likewise.
336 (tdesc_s390_tevx_linux64): Likewise.
337 (init_registers_s390x_linux64): Likewise.
338 (tdesc_s390x_linux64): Likewise.
339 (init_registers_s390x_linux64v1): Likewise.
340 (tdesc_s390x_linux64v1): Likewise.
341 (init_registers_s390x_linux64v2): Likewise.
342 (tdesc_s390x_linux64v2): Likewise.
343 (init_registers_s390x_te_linux64): Likewise.
344 (tdesc_s390x_te_linux64): Likewise.
345 (init_registers_s390x_vx_linux64): Likewise.
346 (tdesc_s390x_vx_linux64): Likewise.
347 (init_registers_s390x_tevx_linux64): Likewise.
348 (tdesc_s390x_tevx_linux64): Likewise.
349 (have_hwcap_s390_vx): New static variable.
350 (s390_arch_setup): Fill have_hwcap_s390_vx.
351 (s390_get_thread_area): New function.
352 (s390_ft_entry_gpr_esa): New const.
353 (s390_ft_entry_gpr_zarch): New const.
354 (s390_ft_entry_misc): New const.
355 (s390_ft_entry_fr): New const.
356 (s390_ft_entry_vr): New const.
357 (s390_ft_main_31): New const.
358 (s390_ft_main_64): New const.
359 (s390_ft_exit_fr): New const.
360 (s390_ft_exit_vr): New const.
361 (s390_ft_exit_misc): New const.
362 (s390_ft_exit_gpr_esa): New const.
363 (s390_ft_exit_gpr_zarch): New const.
364 (append_insns): New function.
365 (s390_relocate_instruction): New function.
366 (s390_install_fast_tracepoint_jump_pad): New function.
367 (s390_get_min_fast_tracepoint_insn_len): New function.
368 (s390_get_ipa_tdesc_idx): New function.
369 (struct linux_target_ops): Wire in the above functions.
370 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
371 * linux-s390-tdesc.h: New file.
372
3732016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
374
375 * linux-s390-low.c (s390_supports_tracepoints): New function.
376 (struct linux_target_ops): Fill supports_tracepoints hook.
377
3782016-03-18 Yao Qi <yao.qi@linaro.org>
379
380 * linux-low.c (lwp_signal_can_be_delivered): New function.
381 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
382
3832016-03-18 Yao Qi <yao.qi@linaro.org>
384
385 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
386 0 if signal is enqueued. Remove 'signal' from one debugging
387 message. Move one debugging message to some lines below.
388 Remove code setting 'signal' to 0.
389
3902016-03-18 Yao Qi <yao.qi@linaro.org>
391
392 * linux-low.c (linux_low_filter_event): Remove redundant
393 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
394
3952016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
396
397 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
398 (struct linux_target_ops): Wire in the above.
399
4002016-03-03 Yao Qi <yao.qi@linaro.org>
401
402 * linux-low.c: Update comments to start_step_over.
403
4042016-03-03 Yao Qi <yao.qi@linaro.org>
405
406 PR server/19736
407 * linux-low.c (handle_extended_wait): Set child suspended
408 if event_lwp->bp_reinsert isn't zero.
409
4102016-03-02 Yao Qi <yao.qi@linaro.org>
411
412 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
413 enqueue_pending_signal.
414
4152016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
416
417 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
418 is actually loaded.
419
4202016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
421
422 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
423 (s390_regmap_3264) [!__s390x__]: New global.
424 (s390_collect_ptrace_register): Skip map entries containing -1.
425 (s390_supply_ptrace_register): Ditto.
426 (s390_fill_gprs_high): New function.
427 (s390_store_gprs_high): New function.
428 (s390_regsets): Add NT_S390_HIGH_GPRS.
429 (s390_get_hwcap): Enable on 31-bit.
430 (have_hwcap_s390_high_gprs): Enable on 31-bit.
431 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
432 Detect NT_S390_HIGH_GPRS.
433 (s390_usrregs_info_3264): Enable on 31-bit.
434 (s390_regs_info): Enable regs_info_3264 on 31-bit.
435 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
436
4372016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
438
439 PR gdb/13808
440 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
441 * configure.srv: Ditto.
442 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
443 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
444 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
445 (init_registers_amd64_linux): Remove prototype.
446 (tdesc_amd64_linux): Remove declaration.
447 (get_ipa_tdesc): New function.
448 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
449 initialize remaining tdescs.
450 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
451 (init_registers_i386_linux): Remove prototype.
452 (tdesc_i386_linux): Remove declaration.
453 (get_ipa_tdesc): New function.
454 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
455 initialize remaining tdescs.
456 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
457 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
458 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
459 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
460 (x86_get_ipa_tdesc_idx): New function.
461 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
462 * linux-x86-tdesc.h: New file.
463 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
464 (target_get_ipa_tdesc_idx): New macro.
465 * tracepoint.c (ipa_tdesc_idx): New macro.
466 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
467 (symbol_list): Add ipa_tdesc_idx.
468 (cmd_qtstart): Write ipa_tdesc_idx in the target.
469 (ipa_tdesc): Remove.
470 (ipa_tdesc_idx): New variable.
471 (get_context_regcache): Use get_ipa_tdesc.
472 (gdb_collect): Ditto.
473 (gdb_probe): Ditto.
474 * tracepoint.h (get_ipa_tdesc): New prototype.
475 (ipa_tdesc): Remove.
476
4772016-02-24 Pedro Alves <palves@redhat.com>
478
479 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
480 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
481 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
482 Factor out common code between the USE_SIGTRAP_SIGINFO and
483 !USE_SIGTRAP_SIGINFO blocks.
484 (linux_low_filter_event): Call save_stop_reason instead of
485 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
486 Update comments.
487 (linux_wait_1): Update comments.
488
4892016-02-24 Wei-cheng Wang <cole945@gmail.com>
490
491 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
492 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
493 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
494 ppc_insert_point, ppc_remove_point.
495
4962016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
497
498 * linux-s390-low.c (s390_supports_z_point_type): New function.
499 (struct linux_target_ops): Wire s390_supports_z_point_type in.
500
5012016-02-16 Yao Qi <yao.qi@linaro.org>
502
503 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
504 PC. Get pc from regcache_read_pc.
505
5062016-02-12 Yao Qi <yao.qi@linaro.org>
507
508 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
509 or linux_get_pc_32bit.
510 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
511
5122016-02-12 Yao Qi <yao.qi@linaro.org>
513
514 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
515 arm_linux_get_next_pcs_fixup.
516
5172016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
518
519 * tracepoint.c (x_tracepoint_action_download): Change
520 write_inferior_data_ptr to write_inferior_data_pointer.
521 (cmd_qtstart): Likewise.
522 (write_inferior_data_ptr): Remove.
523 (download_agent_expr): Change write_inferior_data_ptr to
524 write_inferior_data_pointer.
525 (download_tracepoint_1): Likewise.
526 (download_tracepoint): Likewise.
527 (download_trace_state_variables): Likewise.
528
5292016-02-11 Wei-cheng Wang <cole945@gmail.com>
530 Marcin Kościelnicki <koriakin@0x04.net>
531
532 * tracepoint.c (struct tracepoint_action_ops): Remove.
533 (struct tracepoint_action): Remove ops.
534 (m_tracepoint_action_download, r_tracepoint_action_download)
535 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
536 size and offset accordingly.
537 (m_tracepoint_action_ops, r_tracepoint_action_ops)
538 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
539 (tracepoint_action_send, tracepoint_action_download): New functions.
540 Helpers for trace action handlers.
541 (add_tracepoint_action): Remove setup actions ops.
542 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
543
5442016-02-10 Yao Qi <yao.qi@linaro.org>
545
546 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
547
5482016-02-09 Simon Marchi <simon.marchi@ericsson.com>
549
550 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
551 to AC_OUTPUT.
552 * configure: Regenerate.
553
5542016-02-09 Simon Marchi <simon.marchi@ericsson.com>
555
556 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
557 void * to gdb_byte *.
558 * linux-low.c (siginfo_fixup): Likewise.
559 (linux_xfer_siginfo): Likewise.
560 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
561 Likewise.
562 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
563
5642016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
565
566 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
567 to srv_tgtobj.
568 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
569 to srv_tgtobj.
570 * linux-x86-low.c [__x86_64__]: Include
571 "nat/amd64-linux-siginfo.h".
572 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
573 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
574 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
575 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
576 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
577 (cpt_si_fd, si_timerid, si_overrun): Move from
578 nat/amd64-linux-siginfo.c.
579 * Makefile.in (amd64-linux-siginfo.o:): New rule.
580
5812016-01-28 Simon Marchi <simon.marchi@ericsson.com>
582
583 * server.c (skip_to_semicolon): Remove.
584 (process_point_options): Use strchrnul instead of
585 skip_to_semicolon.
586
5872016-01-26 Yao Qi <yao.qi@linaro.org>
588
589 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
590 * linux-low.c (install_software_single_step_breakpoints): Don't
591 call regcache_read_pc.
592 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
593 argument pc.
594
5952016-01-26 Yao Qi <yao.qi@linaro.org>
596
597 * linux-low.c (install_software_single_step_breakpoints): Call
598 regcache_read_pc instead of get_pc.
599
6002016-01-26 Yao Qi <yao.qi@linaro.org>
601
602 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
603 (unblock_async_io): Rename to ...
604 (block_unblock_async_io): ... it. New function.
605 (enable_async_io): Don't install SIGIO handler. Unblock it
606 instead.
607 (disable_async_io): Don't ignore SIGIO. Block it instead.
608 (initialize_async_io): Install SIGIO handler. Don't call
609 unblock_async_io.
610
6112016-01-26 Yao Qi <yao.qi@linaro.org>
612
613 * remote-utils.c (getpkt): If the buffer isn't empty, and the
614 first character is '\003', call *the_target->request_interrupt.
615
6162016-01-25 Yao Qi <yao.qi@linaro.org>
617
618 * remote-utils.c (new_thread_notify): Remove.
619 (dead_thread_notify): Likewise.
620 * remote-utils.h (new_thread_notify): Remove declaration.
621 (dead_thread_notify): Likewise.
622
6232016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
624
625 * gdb.trace/pending.exp: Fix expected message on continue.
626
6272016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
628
629 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
630 it works properly on big-endian machines where sizeof (CORE_ADDR)
631 != sizeof (void *).
632
6332016-01-21 Pedro Alves <palves@redhat.com>
634
635 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
636 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
637 * configure: Regenerate.
638
6392016-01-21 Yao Qi <yao.qi@linaro.org>
640
641 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
642 is_thumb and set it according to CPSR saved on the stack.
643 (get_next_pcs_syscall_next_pc): Pass is_thumb to
644 arm_sigreturn_next_pc.
645
6462016-01-18 Yao Qi <yao.qi@linaro.org>
647
648 * linux-low.c (linux_set_pc_64bit): New function.
649 (linux_get_pc_64bit): New function.
650 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
651 Declare.
652 * linux-sparc-low.c (debug_threads): Remove declaration.
653 (sparc_get_pc): Remove.
654 (the_low_target): Use linux_get_pc_64bit instead of
655 sparc_get_pc.
656 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
657 (the_low_target): Use linux_get_pc_64bit and
658 linux_set_pc_64bit.
659
6602016-01-18 Yao Qi <yao.qi@linaro.org>
661
662 * linux-arm-low.c (debug_threads): Remove declaration.
663 (arm_get_pc, arm_set_pc): Remove.
664 (the_low_target): Use linux_get_pc_32bit and
665 linux_set_pc_32bit.
666 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
667 (the_low_target): Use linux_get_pc_32bit and
668 linux_set_pc_32bit.
669 * linux-cris-low.c (debug_threads): Remove declaration.
670 (cris_get_pc, cris_set_pc,): Remove.
671 (the_low_target): Use linux_get_pc_32bit and
672 linux_set_pc_32bit.
673 * linux-crisv32-low.c (debug_threads): Remove declaration.
674 (cris_get_pc, cris_set_pc): Remove.
675 (the_low_target): Use linux_get_pc_32bit and
676 linux_set_pc_32bit.
677 * linux-low.c: Include inttypes.h.
678 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
679 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
680 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
681 (the_low_target): Use linux_get_pc_32bit and
682 linux_set_pc_32bit.
683 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
684 (the_low_target): Use linux_get_pc_32bit and
685 linux_set_pc_32bit.
686 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
687 (the_low_target): Use linux_get_pc_32bit and
688 linux_set_pc_32bit.
689 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
690 (the_low_target): Use linux_get_pc_32bit and
691 linux_set_pc_32bit.
692 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
693 (the_low_target): Use linux_get_pc_32bit and
694 linux_set_pc_32bit.
695
6962016-01-18 Gary Benson <gbenson@redhat.com>
697
698 * configure.ac (AC_FUNC_FORK): New check.
699 * config.in: Regenerate.
700 * configure: Likewise.
701
7022016-01-14 Yao Qi <yao.qi@linaro.org>
703
704 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
705 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
706 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
707 arm_get_next_pcs_ctor.
708
7092016-01-12 Josh Stone <jistone@redhat.com>
710 Philippe Waroquiers <philippe.waroquiers@skynet.be>
711
712 * inferiors.h: Include "gdb_vecs.h".
713 (struct process_info): Add syscalls_to_catch.
714 * inferiors.c (remove_process): Free syscalls_to_catch.
715 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
716 syscall_return stops.
717 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
718 * server.c (handle_general_set): Handle QCatchSyscalls.
719 (handle_query): Report support for QCatchSyscalls.
720 * target.h (struct target_ops): Add supports_catch_syscall.
721 (target_supports_catch_syscall): New macro.
722 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
723 (struct lwp_info): Add syscall_state.
724 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
725 Maintain syscall_state and syscalls_to_catch across exec.
726 (get_syscall_trapinfo): New function, proxy to the_low_target.
727 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
728 (linux_low_filter_event): Toggle syscall_state entry/return for
729 syscall traps, and set it ignored for all others.
730 (gdb_catching_syscalls_p): New function.
731 (gdb_catch_this_syscall_p): New function.
732 (linux_wait_1): Handle SYSCALL_SIGTRAP.
733 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
734 (linux_supports_catch_syscall): New function.
735 (linux_target_ops): Install it.
736 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
737 (the_low_target): Install it.
738
7392016-01-12 Mike Frysinger <vapier@gentoo.org>
740
741 * acinclude.m4: Include new ../warning.m4 file.
742 * configure: Regenerated.
743 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
744
7452016-01-12 Mike Frysinger <vapier@gentoo.org>
746
747 * ax.c (is_goto_target): Mark static.
748 * linux-low.c (register_addr): Likewise.
749 (linux_fetch_registers, linux_store_registers): Likewise.
750 * mem-break.c (any_persistent_commands): Fix old prototype.
751 (add_commands_to_breakpoint): Mark static.
752 * regcache.c (find_register_by_name): Delete unused func.
753 * remote-utils.c (hex_or_minus_one): Mark static.
754 * server.c (monitor_show_help): Mark static.
755 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
756 handle_v_requests): Likewise.
757
7582016-01-12 Pedro Alves <palves@redhat.com>
759
760 Remove use of the registered trademark symbol throughout.
761
7622016-01-08 Yao Qi <yao.qi@linaro.org>
763
764 * remote-utils.c (getpkt): If c is '\003', call target hook
765 request_interrupt.
766
7672016-01-06 Yao Qi <yao.qi@linaro.org>
768
769 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
770 linux-aarch32-low.c.
771 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
772 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
773 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
774 (thumb2_breakpoint): Declare.
775 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
776 linux-aarch32-low.h.
777 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
778 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
779 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
780
7812016-01-01 Joel Brobecker <brobecker@adacore.com>
782
783 * gdbreplay.c (gdbreplay_version): Change copyright year in
784 version message.
785 * server.c (gdbserver_version): Likewise.
786
7872015-12-28 Patrick Palka <patrick@parcs.ath.cx>
788
789 * server.c (crc32_table): Delete.
790 (crc32): Use libiberty's xcrc32 function.
791
7922015-12-22 Joel Brobecker <brobecker@adacore.com>
793
794 * lynx-low.c (lynx_delete_thread_callback): New function.
795 (lynx_mourn): Properly delete our process and all of its
796 threads. Remove call to clear_inferiors.
797
7982015-12-22 Joel Brobecker <brobecker@adacore.com>
799
800 * target.c (thread_search_callback): Add check that
801 the thread_stopped target callback is not NULL before
802 calling it.
803
8042015-12-21 Yao Qi <yao.qi@linaro.org>
805
806 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
807 arm breakpoint.
808
8092015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
810
811 * server.c (handle_query): Call target_supports_software_single_step.
812
8132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
814
815 * linux-low.c (single_step): New function.
816 (linux_resume_one_lwp_throw): Call single_step.
817 (start_step_over): Likewise.
818
8192015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
820
821 * Makefile.in (SFILES): Append arch/arm-linux.c,
822 arch/arm-get-next-pcs.c.
823 (arm-linux.o): New rule.
824 (arm-get-next-pcs.o): New rule.
825 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
826 arm-linux.o.
827 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
828 to linux-aarch32-low.c.
829 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
830 (arm_breakpoint_len, thumb_breakpoint): Likewise.
831 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
832 (thumb2_breakpoint_len): Likewise.
833 (arm_is_thumb_mode): Make non-static.
834 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
835 from linux-aarch32-low.c.
836 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
837 (arm_breakpoint_len, thumb_breakpoint): Likewise.
838 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
839 (thumb2_breakpoint_len): Likewise.
840 (arm_is_thumb_mode): New declaration.
841 * linux-arm-low.c: Include arch/arm-linux.h
842 aarch/arm-get-next-pcs.h, sys/syscall.h.
843 (get_next_pcs_ops): New struct.
844 (get_next_pcs_addr_bits_remove): New function.
845 (get_next_pcs_is_thumb): New function.
846 (get_next_pcs_read_memory_unsigned_integer): Likewise.
847 (arm_sigreturn_next_pc): Likewise.
848 (get_next_pcs_syscall_next_pc): Likewise.
849 (arm_gdbserver_get_next_pcs): Likewise.
850 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
851 Initialize.
852 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
853 * server.h: Include gdb_vecs.h.
854
8552015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
856
857 * Makefile.in (SFILES): Append common/common-regcache.c.
858 (OBS): Append common-regcache.o.
859 (common-regcache.o): New rule.
860 * regcache.c (init_register_cache): Initialize cache to
861 REG_UNAVAILABLE.
862 (regcache_raw_read_unsigned): New function.
863 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
864 register_status enum.
865
8662015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
867
868 * linux-aarch64-low.c (the_low_targets): Rename
869 breakpoint_reinsert_addr to get_next_pcs.
870 * linux-arm-low.c (the_low_targets): Likewise.
871 * linux-bfin-low.c (the_low_targets): Likewise.
872 * linux-cris-low.c (the_low_targets): Likewise.
873 * linux-crisv32-low.c (the_low_targets): Likewise.
874 * linux-low.c (can_software_single_step): Likewise.
875 (install_software_single_step_breakpoints): New function.
876 (start_step_over): Use install_software_single_step_breakpoints.
877 * linux-low.h: New CORE_ADDR vector.
878 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
879 get_next_pcs.
880 * linux-mips-low.c (the_low_targets): Likewise.
881 * linux-nios2-low.c (the_low_targets): Likewise.
882 * linux-sparc-low.c (the_low_targets): Likewise.
883
8842015-12-17 Pedro Alves <palves@redhat.com>
885
886 * linux-low.c (linux_kill_one_lwp): Remove references to
887 LinuxThreads.
888 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
889 to 'kill'.
890 (linux_init_signals): Delete.
891 (initialize_low): Adjust.
892 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
893
8942015-12-16 Pedro Alves <palves@redhat.com>
895
896 * configure.ac (compiler warning flags): When testing a
897 -Wno-foo option, check whether -Wfoo works instead.
898 * configure: Regenerate.
899
9002015-12-11 Don Breazeal <donb@codesourcery.com>
901
902 * server.c (process_serial_event): Don't exit from gdbserver
903 in remote mode if there are still active inferiors.
904
9052015-12-11 Yao Qi <yao.qi@linaro.org>
906
907 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
908 arm_breakpoint_at if the process is 32-bit.
909
9102015-12-11 Yao Qi <yao.qi@linaro.org>
911
912 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
913 arm breakpoint.
914
9152015-12-07 Yao Qi <yao.qi@linaro.org>
916
917 * configure.srv: Append arm.o to srv_tgtobj for
918 aarch64*-*-linux* target.
919 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
920 from linux-arm-low.c.
921 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
922 (arm_breakpoint_len, thumb_breakpoint): Likewise.
923 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
924 (thumb2_breakpoint_len): Likewise.
925 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
926 (arm_breakpoint_kinds): Likewise.
927 (arm_breakpoint_kind_from_pc): Likewise.
928 (arm_sw_breakpoint_from_kind): Likewise.
929 (arm_breakpoint_kind_from_current_state): Likewise.
930 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
931 (arm_sw_breakpoint_from_kind): Declare.
932 (arm_breakpoint_kind_from_current_state): Declare.
933 (arm_breakpoint_at): Declare.
934 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
935 arm_sw_breakpoint_from_kind if process is 32-bit.
936 (aarch64_breakpoint_kind_from_pc): New function.
937 (aarch64_breakpoint_kind_from_current_state): New function.
938 (the_low_target): Initialize fields breakpoint_kind_from_pc
939 and breakpoint_kind_from_current_state.
940 * linux-arm-low.c (arm_breakpoint_kinds): Move to
941 linux-aarch32-low.c.
942 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
943 (arm_breakpoint, arm_breakpoint_len): Likewise.
944 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
945 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
946 (arm_is_thumb_mode): Likewise.
947 (arm_breakpoint_at): Likewise.
948 (arm_breakpoint_kind_from_pc): Likewise.
949 (arm_sw_breakpoint_from_kind): Likewise.
950 (arm_breakpoint_kind_from_current_state): Likewise.
951
952 Revert:
953 2015-08-04 Yao Qi <yao.qi@linaro.org>
954
955 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
956 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
957 * server.c (extended_protocol): Remove "static".
958 * server.h (extended_protocol): Declare it.
959
9602015-12-04 Josh Stone <jistone@redhat.com>
961
962 * target.h (struct target_ops) <arch_setup>: Rename to ...
963 (struct target_ops) <post_create_inferior>: ... this.
964 (target_arch_setup): Rename to ...
965 (target_post_create_inferior): ... this, calling post_create_inferior.
966 * server.c (start_inferior): Update target_arch_setup calls to
967 target_post_create_inferior.
968 * linux-low.c (linux_low_ptrace_options): Forward declare.
969 (linux_arch_setup): Update its comment for general use.
970 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
971 (struct linux_target_ops): Use linux_post_create_inferior.
972 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
973 to post_create_inferior.
974 * nto-low.c (struct nto_target_ops): Likewise.
975 * spu-low.c (struct spu_target_ops): Likewise.
976 * win32-low.c (struct win32_target_ops): Likewise.
977
9782015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
979
980 * linux-arm-low.c: Remove duplicate arch/arm.h include.
981
9822015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
983
984 * linux-arm-low.c (arm_reinsert_addr): Remove function.
985 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
986 * linux-cris-low.c (cris_reinsert_addr> Remove function.
987 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
988 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
989 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
990 * linux-mips-low.c (mips_reinsert_addr): Remove function.
991 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
992 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
993 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
994 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
995 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
996
9972015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
998
999 * linux-low.c (linux_look_up_symbols): Don't call
1000 linux_supports_traceclone.
1001 * linux-low.h (thread_db_init): Remove use_events argument.
1002 * thread-db.c (thread_db_use_event): Remove global variable.
1003 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1004 (struct thread_db) <td_create_bp>: Remove field.
1005 (thread_db_create_event): Remove function.
1006 (thread_db_enable_reporting): Likewise.
1007 (find_one_thread): Don't check for thread_db_use_events.
1008 (attach_thread): Likewise.
1009 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1010 (try_thread_db_load_1): Don't check for thread_db_use_events.
1011 (thread_db_init): Remove use_events argument and thread events
1012 handling.
1013 (remove_thread_event_breakpoints): Remove function.
1014 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1015
10162015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1017
1018 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1019 New function.
1020 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1021 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1022 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1023 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1024 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1025 Initialize.
1026 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1027 New function.
1028 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1029 * linux-low.c (can_hardware_single_step): Use
1030 supports_hardware_single_step.
1031 (can_software_single_step): New function.
1032 (start_step_over): Call can_software_single_step.
1033 (linux_supports_hardware_single_step): New function.
1034 (struct target_ops) <supports_software_single_step>: Initialize.
1035 * linux-low.h (struct linux_target_ops)
1036 <supports_hardware_single_step>: Initialize.
1037 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1038 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1039 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1040 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1041 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1042 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1043 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1044 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1045 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1046 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1047 Initialize.
1048 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1049 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1050 Initialize.
1051 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1052 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1053 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1054 New function.
1055 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1056 * target.h (struct target_ops): <supports_software_single_step>:
1057 New field.
1058 (target_supports_software_single_step): New macro.
1059
10602015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1061
1062 * linux-low.c (linux_wait_1): Fix pc advance condition.
1063 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1064 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1065
10662015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1067
1068 * linux-arm-low.c (arm_is_thumb_mode): New function.
1069 (arm_breakpoint_at): Use arm_is_thumb_mode.
1070 (arm_breakpoint_kind_from_current_state): New function.
1071 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1072 Initialize.
1073 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1074 (linux_breakpoint_kind_from_current_state): New function.
1075 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1076 * linux-low.h (struct linux_target_ops)
1077 <breakpoint_kind_from_current_state>: New field.
1078 * target.h (struct target_ops): Likewise.
1079 (target_breakpoint_kind_from_current_state): New macro.
1080
10812015-11-30 Pedro Alves <palves@redhat.com>
1082
1083 * linux-low.c (linux_resume): Wake up the event loop before
1084 returning.
1085
10862015-11-30 Pedro Alves <palves@redhat.com>
1087
1088 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1089 check.
1090 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1091 to -1.
1092 * target.c (struct thread_search): New structure.
1093 (thread_search_callback): New function.
1094 (prev_general_thread): New global.
1095 (prepare_to_access_memory, done_accessing_memory): New functions.
1096 * target.h (prepare_to_access_memory, done_accessing_memory):
1097 Replace macros with function declarations.
1098
10992015-11-30 Pedro Alves <palves@redhat.com>
1100
1101 PR 14618
1102 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1103 report TARGET_WAITKIND_NO_RESUMED.
1104 * remote-utils.c (prepare_resume_reply): Handle
1105 TARGET_WAITKIND_NO_RESUMED.
1106 * server.c (report_no_resumed): New global.
1107 (handle_query) <qSupported>: Handle "no-resumed+". Report
1108 "no-resumed+" support.
1109 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1110 return error if the client doesn't support no-resumed events.
1111 (push_stop_notification): New function.
1112 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1113 events if the client supports them.
1114
11152015-11-30 Pedro Alves <palves@redhat.com>
1116
1117 * linux-low.c (thread_still_has_status_pending_p): Don't check
1118 vCont;t here.
1119 (lwp_resumed): New function.
1120 (status_pending_p_callback): Return early if the LWP is not
1121 supposed to be resumed.
1122
11232015-11-30 Pedro Alves <palves@redhat.com>
1124
1125 * linux-low.c (handle_extended_wait): Assert that the LWP's
1126 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1127 thread create events, leave the new child's status pending.
1128 (linux_low_filter_event): If GDB wants to hear about thread exit
1129 events, leave the LWP marked dead and don't delete it.
1130 (linux_wait_for_event_filtered): Don't check for thread exit.
1131 (filter_exit_event): New function.
1132 (linux_wait_1): Use it, when returning an exit event.
1133 (linux_resume_one_lwp_throw): Assert that the LWP's
1134 waitstatus is TARGET_WAITKIND_IGNORE.
1135 * remote-utils.c (prepare_resume_reply): Handle
1136 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1137 * server.c (report_thread_events): New global.
1138 (handle_general_set): Handle QThreadEvents.
1139 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1140 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1141 TARGET_WAITKIND_THREAD_EXITED.
1142 * server.h (report_thread_events): Declare.
1143
11442015-11-30 Pedro Alves <palves@redhat.com>
1145
1146 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1147 the thread's last_resume_kind was resume_stop.
1148
11492015-11-30 Pedro Alves <palves@redhat.com>
1150
1151 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1152 before returning.
1153
11542015-11-30 Pedro Alves <palves@redhat.com>
1155
1156 * server.c (handle_v_requests): Handle vCtrlC.
1157
11582015-11-30 Pedro Alves <palves@redhat.com>
1159
1160 * gdbthread.h (find_any_thread_of_pid): Declare.
1161 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1162 functions.
1163 * server.c (handle_query): If current_thread is NULL, look for
1164 another thread of the selected process.
1165
11662015-11-26 Daniel Colascione <dancol@dancol.org>
1167 Simon Marchi <simon.marchi@ericsson.com>
1168
1169 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1170 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1171 name in reply.
1172 * target.h (struct target_ops) <thread_name>: New field.
1173 (target_thread_name): New macro.
1174
11752015-11-23 Joel Brobecker <brobecker@adacore.com>
1176
1177 * regcache.h (regcache_invalidate_pid): Add declaration.
1178 * regcache.c (regcache_invalidate_pid): New function, extracted
1179 from regcache_invalidate.
1180 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1181 Add trivial documentation comment.
1182 * lynx-low.c: Use regcache_invalidate_pid instead of
1183 regcache_invalidate.
1184
11852015-11-23 Joel Brobecker <brobecker@adacore.com>
1186
1187 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1188 and Elf64_auxv_t if the target is Android.
1189
11902015-11-22 Doug Evans <xdje42@gmail.com>
1191
1192 * target.h: #include <sys/types.h>.
1193
11942015-11-19 Pedro Alves <palves@redhat.com>
1195
1196 * linux-low.c (linux_process_qsupported): Change prototype.
1197 Adjust.
1198 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1199 Change prototype.
1200 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1201 and adjust to loop over all features.
1202 * server.c (handle_query) <qSupported>: Adjust to call
1203 target_process_qsupported once, passing it a vector of unprocessed
1204 features.
1205 * target.h (struct target_ops) <process_qsupported>: Change
1206 prototype.
1207 (target_process_qsupported): Adjust.
1208
12092015-11-19 Pedro Alves <palves@redhat.com>
1210
1211 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1212 mode.
1213 * configure: Regenerate.
1214
12152015-11-19 Pedro Alves <palves@redhat.com>
1216
1217 * configure: Regenerate.
1218
12192015-11-19 Yao Qi <yao.qi@linaro.org>
1220
1221 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1222 type to uint32_t.
1223
12242015-11-19 Yao Qi <yao.qi@linaro.org>
1225
1226 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1227 (struct aarch64_operand): Move enum out.
1228
12292015-11-19 Yao Qi <yao.qi@linaro.org>
1230
1231 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1232 struct user_fpsimd_state *.
1233 (aarch64_store_fpregset): Likewise.
1234
12352015-11-19 Yao Qi <yao.qi@linaro.org>
1236
1237 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1238 struct user_pt_regs *.
1239 (aarch64_store_gregset): Likewise.
1240
12412015-11-18 Pedro Alves <palves@redhat.com>
1242
1243 * Makefile.in (all_object_files): Add $IPA_OBJS.
1244
12452015-11-17 Pedro Alves <palves@redhat.com>
1246
1247 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1248 GDB_SIGNAL_0 and gdb_signal_to_string.
1249
12502015-11-17 Pedro Alves <palves@redhat.com>
1251
1252 * win32-low.c (handle_output_debug_string): Remove parameter.
1253 (win32_kill): Remove our_status local and adjust call to
1254 handle_output_debug_string.
1255 (get_child_debug_event): Adjust call to
1256 handle_output_debug_string.
1257
12582015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1259
1260 * linux-mips-low.c (mips_fill_gregset): Add cast.
1261 (mips_store_gregset): Likewise.
1262 (mips_fill_fpregset): Likewise.
1263 (mips_store_fpregset): Likewise.
1264
12652015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1266
1267 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1268 priv.
1269
12702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1271
1272 * linux-mips-low.c (mips_linux_new_thread): Change type of
1273 watch_type to enum target_hw_bp_type.
1274
12752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1276
1277 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1278 Change return type to arm_hwbp_type.
1279
12802015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1281
1282 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1283 (arm_store_gregset): Likewise.
1284 * linux-arm-low.c (arm_get_hwcap): Likewise.
1285 (arm_read_description): Likewise.
1286
12872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1290
12912015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1292
1293 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1294 (ppc_fill_vsxregset): Likewise.
1295 (ppc_store_vsxregset): Likewise.
1296 (ppc_fill_vrregset): Likewise.
1297 (ppc_store_vrregset): Likewise.
1298 (ppc_fill_evrregset): Likewise.
1299 (ppc_store_evrregset): Likewise.
1300
13012015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1302
1303 * linux-ppc-low.c (ppc_usrregs_info): Remove
1304 forward-declaration.
1305 (ppc_arch_setup): Move lower in file.
1306
13072015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1308
1309 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1310 (ps_pdwrite): Likewise.
1311
13122015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1313
1314 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1315 to after assert checks.
1316
13172015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1318
1319 * proc-service.c (ps_pdread): Add/adjust casts.
1320 (ps_pdwrite): Add/adjust casts.
1321
13222015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1323
1324 * server.c (handle_search_memory_1): Cast return value of
1325 memmem.
1326
13272015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1328
1329 * server.c (write_qxfer_response): Change type of data to
1330 gdb_byte *.
1331
13322015-10-29 Pedro Alves <palves@redhat.com>
1333
1334 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1335
13362015-10-29 Pedro Alves <palves@redhat.com>
1337
1338 * tracepoint.c (clear_installed_tracepoints): Add casts.
1339
13402015-10-29 Pedro Alves <palves@redhat.com>
1341
1342 * server.c (handle_v_cont, process_serial_event): Add enum
1343 gdb_signal casts to signal parsing code.
1344
13452015-10-29 Pedro Alves <palves@redhat.com>
1346
1347 * linux-low.h (NULL_REGSET): Define.
1348 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1349 * linux-arm-low.c (arm_regsets): Likewise.
1350 * linux-crisv32-low.c (cris_regsets): Likewise.
1351 * linux-m68k-low.c (m68k_regsets): Likewise.
1352 * linux-mips-low.c (mips_regsets): Likewise.
1353 * linux-nios2-low.c (nios2_regsets): Likewise.
1354 * linux-ppc-low.c (ppc_regsets): Likewise.
1355 * linux-s390-low.c (s390_regsets): Likewise.
1356 * linux-sh-low.c (sh_regsets): Likewise.
1357 * linux-sparc-low.c (sparc_regsets): Likewise.
1358 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1359 * linux-tile-low.c (tile_regsets): Likewise.
1360 * linux-x86-low.c (x86_regsets): Likewise.
1361 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1362
13632015-10-29 Pedro Alves <palves@redhat.com>
1364
1365 * linux-low.h (NULL_REGSET): Define.
1366 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1367 * linux-arm-low.c (arm_regsets): Likewise.
1368 * linux-crisv32-low.c (cris_regsets): Likewise.
1369 * linux-m68k-low.c (m68k_regsets): Likewise.
1370 * linux-mips-low.c (mips_regsets): Likewise.
1371 * linux-nios2-low.c (nios2_regsets): Likewise.
1372 * linux-ppc-low.c (ppc_regsets): Likewise.
1373 * linux-s390-low.c (s390_regsets): Likewise.
1374 * linux-sh-low.c (sh_regsets): Likewise.
1375 * linux-sparc-low.c (sparc_regsets): Likewise.
1376 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1377 * linux-tile-low.c (tile_regsets): Likewise.
1378 * linux-x86-low.c (x86_regsets): Likewise.
1379 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1380
13812015-10-26 Doug Evans <dje@google.com>
1382
1383 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1384
13852015-10-26 Doug Evans <dje@google.com>
1386
1387 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1388
13892015-10-26 Doug Evans <dje@google.com>
1390
1391 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1392 for debug_printf.
1393 (attach_thread, find_new_threads_callback): Ditto.
1394
13952015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1396
1397 * mem-break.h (set_breakpoint_data): Remove.
1398
13992015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1400
1401 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1402 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1403 (initialize_low): Remove set_breakpoint_data call.
1404 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1405 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1406 (initialize_low): Remove set_breakpoint_data call.
1407 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1408 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1409 (initialize_low): Remove set_breakpoint_data call.
1410
14112015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1412
1413 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1414 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1415 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1416 * target.h (target_breakpoint_kind_from_pc): New macro.
1417
14182015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1419
1420 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1421 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1422 the default breakpoint kind.
1423
14242015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1425
1426 * linux-arm-low.c (arm_supports_z_point_type): Add software
1427 breakpoint support.
1428
14292015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1430
1431 * linux-arm-low.c: Refactor breakpoint definitions.
1432 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1433 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1434
14352015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1436
1437 * Makefile.in: Add arm.c/o.
1438 * configure.srv: Likewise.
1439 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1440 (arm_breakpoint_kind_from_pc): New function.
1441 (arm_sw_breakpoint_from_kind): Return proper kind.
1442 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1443
14442015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1445
1446 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1447 removal.
1448 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1449 (struct raw_breakpoint) <size>: Remove.
1450 (struct raw_breakpoint) <kind>: Add.
1451 (bp_size): New function.
1452 (bp_opcode): Likewise.
1453 (find_raw_breakpoint_at): Adjust for kind.
1454 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1455 (remove_memory_breakpoint): Adjust for kind call bp_size.
1456 (set_raw_breakpoint_at): Adjust for kind.
1457 (set_breakpoint): Likewise.
1458 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1459 (delete_raw_breakpoint): Adjust for kind.
1460 (delete_breakpoint): Likewise.
1461 (find_gdb_breakpoint): Likewise.
1462 (set_gdb_breakpoint_1): Likewise.
1463 (set_gdb_breakpoint): Likewise.
1464 (delete_gdb_breakpoint_1): Likewise.
1465 (delete_gdb_breakpoint): Likewise.
1466 (uninsert_raw_breakpoint): Likewise.
1467 (reinsert_raw_breakpoint): Likewise.
1468 (set_breakpoint_data): Remove.
1469 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1470 (check_mem_read): Adjust for kind call bp_size.
1471 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1472 (clone_one_breakpoint): Adjust for kind.
1473 * mem-break.h (set_gdb_breakpoint): Likewise.
1474 (delete_gdb_breakpoint): Likewise.
1475 * server.c (process_serial_event): Likewise.
1476
14772015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1478
1479 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1480 (struct linux_target_ops) <breakpoint>: Remove.
1481 (struct linux_target_ops) <breakpoint_len>: Remove.
1482 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1483 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1484 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1485 (arm_sw_breakpoint_from_kind): New function.
1486 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1487 (struct linux_target_ops) <breakpoint>: Remove.
1488 (struct linux_target_ops) <breakpoint_len>: Remove.
1489 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1490 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1491 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1492 (struct linux_target_ops) <breakpoint>: Remove.
1493 (struct linux_target_ops) <breakpoint_len>: Remove.
1494 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1495 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1496 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1497 (struct linux_target_ops) <breakpoint>: Remove.
1498 (struct linux_target_ops) <breakpoint_len>: Remove.
1499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1501 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1502 and sw_breakpoint_from_kind to increment the pc.
1503 (linux_breakpoint_kind_from_pc): New function.
1504 (linux_sw_breakpoint_from_kind): New function.
1505 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1506 (initialize_low): Call breakpoint_kind_from_pc and
1507 sw_breakpoint_from_kind to replace breakpoint_data/len.
1508 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1509 New field.
1510 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1511 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1512 (struct linux_target_ops) <breakpoint>: Remove.
1513 (struct linux_target_ops) <breakpoint_len>: Remove.
1514 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1515 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1516 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1517 (struct linux_target_ops) <breakpoint>: Remove.
1518 (struct linux_target_ops) <breakpoint_len>: Remove.
1519 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1520 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1521 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1522 (struct linux_target_ops) <breakpoint>: Remove.
1523 (struct linux_target_ops) <breakpoint_len>: Remove.
1524 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1525 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1526 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1527 (struct linux_target_ops) <breakpoint>: Remove.
1528 (struct linux_target_ops) <breakpoint_len>: Remove.
1529 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1530 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1531 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1532 (struct linux_target_ops) <breakpoint>: Remove.
1533 (struct linux_target_ops) <breakpoint_len>: Remove.
1534 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1535 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1536 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1537 (struct linux_target_ops) <breakpoint>: Remove.
1538 (struct linux_target_ops) <breakpoint_len>: Remove.
1539 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1540 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1541 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1542 (struct linux_target_ops) <breakpoint>: Remove.
1543 (struct linux_target_ops) <breakpoint_len>: Remove.
1544 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1545 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1546 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1547 (struct linux_target_ops) <breakpoint>: Remove.
1548 (struct linux_target_ops) <breakpoint_len>: Remove.
1549 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1550 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1551 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1552 (struct linux_target_ops) <breakpoint>: Remove.
1553 (struct linux_target_ops) <breakpoint_len>: Remove.
1554 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1555 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1556 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1557 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1558 (struct linux_target_ops) <breakpoint>: Remove.
1559 (struct linux_target_ops) <breakpoint_len>: Remove.
1560 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1561 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1562 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1563 (struct linux_target_ops) <breakpoint>: Remove.
1564 (struct linux_target_ops) <breakpoint_len>: Remove.
1565 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1566 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1567
15682015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1569
1570 * linux-cris-low.c (cris_get_pc): Remove void arg.
1571
15722015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1573
1574 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1575 variable name.
1576
15772015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1578
1579 * inferiors.c (thread_pid_matches_callback): New function.
1580 (find_thread_process): New function.
1581 (remove_thread): Reset current_thread.
1582 (remove_process): Assert threads have been removed first.
1583
15842015-10-15 Yao Qi <yao.qi@linaro.org>
1585
1586 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1587 if it is 3.
1588 (aarch64_remove_point): Likewise.
1589 * regcache.c (regcache_register_size): New function.
1590
15912015-10-12 Yao Qi <yao.qi@linaro.org>
1592
1593 * linux-aarch64-low.c: Update all callers as emit_load_store
1594 is renamed to aarch64_emit_load_store.
1595
15962015-10-12 Yao Qi <yao.qi@linaro.org>
1597
1598 * linux-aarch64-low.c: Update all callers of function renaming
1599 from emit_insn to aarch64_emit_insn.
1600
16012015-10-12 Yao Qi <yao.qi@linaro.org>
1602
1603 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1604 arch/aarch64-insn.h.
1605 (struct aarch64_memory_operand): Likewise.
1606 (ENCODE): Likewise.
1607 (emit_insn): Move to arch/aarch64-insn.c.
1608 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1609 (emit_load_store): Move to arch/aarch64-insn.c.
1610 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1611 (can_encode_int32): Remove.
1612
16132015-10-12 Yao Qi <yao.qi@linaro.org>
1614
1615 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1616 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1617 (aarch64_relocate_instruction): Likewise.
1618 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1619 (struct aarch64_insn_visitor): Likewise.
1620
16212015-10-12 Yao Qi <yao.qi@linaro.org>
1622
1623 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1624 (struct aarch64_insn_visitor): New.
1625 (struct aarch64_insn_relocation_data): New.
1626 (aarch64_ftrace_insn_reloc_b): New function.
1627 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1628 (aarch64_ftrace_insn_reloc_cb): Likewise.
1629 (aarch64_ftrace_insn_reloc_tb): Likewise.
1630 (aarch64_ftrace_insn_reloc_adr): Likewise.
1631 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1632 (aarch64_ftrace_insn_reloc_others): Likewise.
1633 (visitor): New.
1634 (aarch64_relocate_instruction): Use visitor.
1635
16362015-10-12 Yao Qi <yao.qi@linaro.org>
1637
1638 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1639 int. Add argument buf.
1640 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1641 aarch64_relocate_instruction.
1642
16432015-10-12 Yao Qi <yao.qi@linaro.org>
1644
1645 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1646 argument insn. Remove local variable insn. Don't call
1647 target_read_uint32.
1648 (aarch64_install_fast_tracepoint_jump_pad): Call
1649 target_read_uint32.
1650
16512015-09-30 Yao Qi <yao.qi@linaro.org>
1652
1653 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1654 (emit_load_store_pair): Likewise.
1655
16562015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1657
1658 * dll.c (match_dll): Add cast(s).
1659 (unloaded_dll): Likewise.
1660 * linux-low.c (second_thread_of_pid_p): Likewise.
1661 (delete_lwp_callback): Likewise.
1662 (count_events_callback): Likewise.
1663 (select_event_lwp_callback): Likewise.
1664 (linux_set_resume_request): Likewise.
1665 * server.c (accumulate_file_name_length): Likewise.
1666 (emit_dll_description): Likewise.
1667 (handle_qxfer_threads_worker): Likewise.
1668 (visit_actioned_threads): Likewise.
1669 * thread-db.c (any_thread_of): Likewise.
1670 * tracepoint.c (same_process_p): Likewise.
1671 (match_blocktype): Likewise.
1672 (build_traceframe_info_xml): Likewise.
1673
16742015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1675
1676 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1677 assignment.
1678 (gdb_unparse_agent_expr): Likewise.
1679 * hostio.c (require_data): Likewise.
1680 (handle_pread): Likewise.
1681 * linux-low.c (disable_regset): Likewise.
1682 (fetch_register): Likewise.
1683 (store_register): Likewise.
1684 (get_dynamic): Likewise.
1685 (linux_qxfer_libraries_svr4): Likewise.
1686 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1687 (set_fast_tracepoint_jump): Likewise.
1688 (uninsert_fast_tracepoint_jumps_at): Likewise.
1689 (reinsert_fast_tracepoint_jumps_at): Likewise.
1690 (validate_inserted_breakpoint): Likewise.
1691 (clone_agent_expr): Likewise.
1692 * regcache.c (init_register_cache): Likewise.
1693 * remote-utils.c (putpkt_binary_1): Likewise.
1694 (decode_M_packet): Likewise.
1695 (decode_X_packet): Likewise.
1696 (look_up_one_symbol): Likewise.
1697 (relocate_instruction): Likewise.
1698 (monitor_output): Likewise.
1699 * server.c (handle_search_memory): Likewise.
1700 (handle_qxfer_exec_file): Likewise.
1701 (handle_qxfer_libraries): Likewise.
1702 (handle_qxfer): Likewise.
1703 (handle_query): Likewise.
1704 (handle_v_cont): Likewise.
1705 (handle_v_run): Likewise.
1706 (captured_main): Likewise.
1707 * target.c (write_inferior_memory): Likewise.
1708 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1709 * tracepoint.c (init_trace_buffer): Likewise.
1710 (add_tracepoint_action): Likewise.
1711 (add_traceframe): Likewise.
1712 (add_traceframe_block): Likewise.
1713 (cmd_qtdpsrc): Likewise.
1714 (cmd_qtdv): Likewise.
1715 (cmd_qtstatus): Likewise.
1716 (response_source): Likewise.
1717 (response_tsv): Likewise.
1718 (cmd_qtnotes): Likewise.
1719 (gdb_collect): Likewise.
1720 (initialize_tracepoint): Likewise.
1721
17222015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1723
1724 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1725 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1726 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1727 <NOP>: New.
1728 (enum aarch64_condition_codes): New enum.
1729 (w0): New static global.
1730 (fp): Likewise.
1731 (lr): Likewise.
1732 (struct aarch64_memory_operand) <type>: New
1733 MEMORY_OPERAND_POSTINDEX type.
1734 (postindex_memory_operand): New helper function.
1735 (emit_ret): New function.
1736 (emit_load_store_pair): New function, factored out of emit_stp
1737 with support for MEMORY_OPERAND_POSTINDEX.
1738 (emit_stp): Rewrite using emit_load_store_pair.
1739 (emit_ldp): New function.
1740 (emit_load_store): Likewise.
1741 (emit_ldr): Mention post-index instruction in comment.
1742 (emit_ldrh): New function.
1743 (emit_ldrb): New function.
1744 (emit_ldrsw): Mention post-index instruction in comment.
1745 (emit_str): Likewise.
1746 (emit_subs): New function.
1747 (emit_cmp): Likewise.
1748 (emit_and): Likewise.
1749 (emit_orr): Likewise.
1750 (emit_orn): Likewise.
1751 (emit_eor): Likewise.
1752 (emit_mvn): Likewise.
1753 (emit_lslv): Likewise.
1754 (emit_lsrv): Likewise.
1755 (emit_asrv): Likewise.
1756 (emit_mul): Likewise.
1757 (emit_sbfm): Likewise.
1758 (emit_sbfx): Likewise.
1759 (emit_ubfm): Likewise.
1760 (emit_ubfx): Likewise.
1761 (emit_csinc): Likewise.
1762 (emit_cset): Likewise.
1763 (emit_nop): Likewise.
1764 (emit_ops_insns): New helper function.
1765 (emit_pop): Likewise.
1766 (emit_push): Likewise.
1767 (aarch64_emit_prologue): New function.
1768 (aarch64_emit_epilogue): Likewise.
1769 (aarch64_emit_add): Likewise.
1770 (aarch64_emit_sub): Likewise.
1771 (aarch64_emit_mul): Likewise.
1772 (aarch64_emit_lsh): Likewise.
1773 (aarch64_emit_rsh_signed): Likewise.
1774 (aarch64_emit_rsh_unsigned): Likewise.
1775 (aarch64_emit_ext): Likewise.
1776 (aarch64_emit_log_not): Likewise.
1777 (aarch64_emit_bit_and): Likewise.
1778 (aarch64_emit_bit_or): Likewise.
1779 (aarch64_emit_bit_xor): Likewise.
1780 (aarch64_emit_bit_not): Likewise.
1781 (aarch64_emit_equal): Likewise.
1782 (aarch64_emit_less_signed): Likewise.
1783 (aarch64_emit_less_unsigned): Likewise.
1784 (aarch64_emit_ref): Likewise.
1785 (aarch64_emit_if_goto): Likewise.
1786 (aarch64_emit_goto): Likewise.
1787 (aarch64_write_goto_address): Likewise.
1788 (aarch64_emit_const): Likewise.
1789 (aarch64_emit_call): Likewise.
1790 (aarch64_emit_reg): Likewise.
1791 (aarch64_emit_pop): Likewise.
1792 (aarch64_emit_stack_flush): Likewise.
1793 (aarch64_emit_zero_ext): Likewise.
1794 (aarch64_emit_swap): Likewise.
1795 (aarch64_emit_stack_adjust): Likewise.
1796 (aarch64_emit_int_call_1): Likewise.
1797 (aarch64_emit_void_call_2): Likewise.
1798 (aarch64_emit_eq_goto): Likewise.
1799 (aarch64_emit_ne_goto): Likewise.
1800 (aarch64_emit_lt_goto): Likewise.
1801 (aarch64_emit_le_goto): Likewise.
1802 (aarch64_emit_gt_goto): Likewise.
1803 (aarch64_emit_ge_got): Likewise.
1804 (aarch64_emit_ops_impl): New static global variable.
1805 (aarch64_emit_ops): New target function, return
1806 &aarch64_emit_ops_impl.
1807 (struct linux_target_ops): Install it.
1808
18092015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1810
1811 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1812 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1813 aarch64-ipa.o.
1814 * linux-aarch64-ipa.c: New file.
1815 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1816 and endian.h.
1817 (aarch64_get_thread_area): New target method.
1818 (extract_signed_bitfield): New helper function.
1819 (aarch64_decode_ldr_literal): New function.
1820 (enum aarch64_opcodes): New enum.
1821 (struct aarch64_register): New struct.
1822 (struct aarch64_operand): New struct.
1823 (x0): New static global.
1824 (x1): Likewise.
1825 (x2): Likewise.
1826 (x3): Likewise.
1827 (x4): Likewise.
1828 (w2): Likewise.
1829 (ip0): Likewise.
1830 (sp): Likewise.
1831 (xzr): Likewise.
1832 (aarch64_register): New helper function.
1833 (register_operand): Likewise.
1834 (immediate_operand): Likewise.
1835 (struct aarch64_memory_operand): New struct.
1836 (offset_memory_operand): New helper function.
1837 (preindex_memory_operand): Likewise.
1838 (enum aarch64_system_control_registers): New enum.
1839 (ENCODE): New macro.
1840 (emit_insn): New helper function.
1841 (emit_b): New function.
1842 (emit_bcond): Likewise.
1843 (emit_cb): Likewise.
1844 (emit_tb): Likewise.
1845 (emit_blr): Likewise.
1846 (emit_stp): Likewise.
1847 (emit_ldp_q_offset): Likewise.
1848 (emit_stp_q_offset): Likewise.
1849 (emit_load_store): Likewise.
1850 (emit_ldr): Likewise.
1851 (emit_ldrsw): Likewise.
1852 (emit_str): Likewise.
1853 (emit_ldaxr): Likewise.
1854 (emit_stxr): Likewise.
1855 (emit_stlr): Likewise.
1856 (emit_data_processing_reg): Likewise.
1857 (emit_data_processing): Likewise.
1858 (emit_add): Likewise.
1859 (emit_sub): Likewise.
1860 (emit_mov): Likewise.
1861 (emit_movk): Likewise.
1862 (emit_mov_addr): Likewise.
1863 (emit_mrs): Likewise.
1864 (emit_msr): Likewise.
1865 (emit_sevl): Likewise.
1866 (emit_wfe): Likewise.
1867 (append_insns): Likewise.
1868 (can_encode_int32_in): New helper function.
1869 (aarch64_relocate_instruction): New function.
1870 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1871 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1872 (struct linux_target_ops): Install aarch64_get_thread_area,
1873 aarch64_install_fast_tracepoint_jump_pad and
1874 aarch64_get_min_fast_tracepoint_insn_len.
1875
18762015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1877
1878 * Makefile.in (aarch64-insn.o): New rule.
1879 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1880
18812015-09-21 Yao Qi <yao.qi@linaro.org>
1882
1883 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1884
18852015-09-21 Yao Qi <yao.qi@linaro.org>
1886
1887 * tracepoint.c (max_jump_pad_size): Remove.
1888
18892015-09-18 Yao Qi <yao.qi@linaro.org>
1890
1891 * linux-aarch64-low.c: Don't include sys/uio.h.
1892 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1893
18942015-09-16 Wei-cheng Wang <cole945@gmail.com>
1895
1896 * tracepoint.c (eval_result_type): Change prototype.
1897 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1898
18992015-09-15 Pedro Alves <palves@redhat.com>
1900
1901 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1902 Check whether to report exec events instead of checking whether
1903 multiprocess is enabled.
1904
19052015-09-15 Pedro Alves <palves@redhat.com>
1906
1907 PR remote/18965
1908 * remote-utils.c (prepare_resume_reply): Merge
1909 TARGET_WAITKIND_VFORK_DONE switch case with the
1910 TARGET_WAITKIND_FORKED case.
1911
19122015-09-15 Yao Qi <yao.qi@linaro.org>
1913
1914 * server.c (handle_query): Check string comparison using
1915 "else if" instead of "if".
1916
19172015-09-15 Yao Qi <yao.qi@linaro.org>
1918
1919 * server.c (vCont_supported): New global variable.
1920 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1921 matches. Append ";vContSupported+" to own_buf.
1922 (handle_v_requests): Append ";s;S" to own_buf if target supports
1923 hardware single step or vCont_supported is false.
1924 (capture_main): Set vCont_supported to zero.
1925
19262015-09-15 Yao Qi <yao.qi@linaro.org>
1927
1928 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1929 it to ...
1930 (linux_supports_hardware_single_step): ... New function.
1931 (linux_target_ops): Update.
1932 * lynx-low.c (lynx_target_ops): Set field
1933 supports_hardware_single_step to target_can_do_hardware_single_step.
1934 * nto-low.c (nto_target_ops): Likewise.
1935 * spu-low.c (spu_target_ops): Likewise.
1936 * win32-low.c (win32_target_ops): Likewise.
1937 * target.c (target_can_do_hardware_single_step): New function.
1938 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1939 Remove. <supports_hardware_single_step>: New field.
1940 (target_supports_conditional_breakpoints): Remove.
1941 (target_supports_hardware_single_step): New macro.
1942 (target_can_do_hardware_single_step): Declare.
1943 * server.c (handle_query): Use target_supports_hardware_single_step
1944 instead of target_supports_conditional_breakpoints.
1945
19462015-09-15 Yao Qi <yao.qi@linaro.org>
1947
1948 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1949 function.
1950 (struct linux_target_ops the_low_target): Install
1951 aarch64_linux_siginfo_fixup.
1952
19532015-09-11 Don Breazeal <donb@codesourcery.com>
1954 Luis Machado <lgustavo@codesourcery.com>
1955
1956 * linux-low.c (linux_mourn): Static declaration.
1957 (linux_arch_setup): Move in front of
1958 handle_extended_wait.
1959 (linux_arch_setup_thread): New function.
1960 (handle_extended_wait): Handle exec events. Call
1961 linux_arch_setup_thread. Make event_lwp argument a
1962 pointer-to-a-pointer.
1963 (check_zombie_leaders): Do not check stopped threads.
1964 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1965 (linux_low_filter_event): Add lwp and thread for exec'ing
1966 non-leader thread if leader thread has been deleted.
1967 Refactor code into linux_arch_setup_thread and call it.
1968 Pass child lwp pointer by reference to handle_extended_wait.
1969 (linux_wait_for_event_filtered): Update comment.
1970 (linux_wait_1): Prevent clobbering exec event status.
1971 (linux_supports_exec_events): New function.
1972 (linux_target_ops) <supports_exec_events>: Initialize new member.
1973 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1974 new member.
1975 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1976 * server.c (report_exec_events): New global variable.
1977 (handle_query): Handle qSupported query for exec-events feature.
1978 (captured_main): Initialize report_exec_events.
1979 * server.h (report_exec_events): Declare new global variable.
1980 * target.h (struct target_ops) <supports_exec_events>: New
1981 member.
1982 (target_supports_exec_events): New macro.
1983 * win32-low.c (win32_target_ops) <supports_exec_events>:
1984 Initialize new member.
1985
19862015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1987
1988 * linux-low.c (linux_low_enable_btrace): Remove.
1989 (linux_target_ops): Replace linux_low_enable_btrace with
1990 linux_enable_btrace.
1991
19922015-09-03 Yao Qi <yao.qi@linaro.org>
1993
1994 * linux-aarch64-low.c (aarch64_insert_point): Call
1995 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
1996 returns true.
1997
19982015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
1999
2000 * linux-low.c (check_stopped_by_breakpoint): Use
2001 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2002
20032015-08-27 Pedro Alves <palves@redhat.com>
2004
2005 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2006
20072015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2008
2009 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2010 the XNEW-family equivalent.
2011 (compile_bytecodes): Likewise.
2012 * dll.c (loaded_dll): Likewise.
2013 * event-loop.c (append_callback_event): Likewise.
2014 (create_file_handler): Likewise.
2015 (create_file_event): Likewise.
2016 * hostio.c (handle_open): Likewise.
2017 * inferiors.c (add_thread): Likewise.
2018 (add_process): Likewise.
2019 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2020 * linux-arm-low.c (arm_new_process): Likewise.
2021 (arm_new_thread): Likewise.
2022 * linux-low.c (add_to_pid_list): Likewise.
2023 (linux_add_process): Likewise.
2024 (handle_extended_wait): Likewise.
2025 (add_lwp): Likewise.
2026 (enqueue_one_deferred_signal): Likewise.
2027 (enqueue_pending_signal): Likewise.
2028 (linux_resume_one_lwp_throw): Likewise.
2029 (linux_resume_one_thread): Likewise.
2030 (linux_read_memory): Likewise.
2031 (linux_write_memory): Likewise.
2032 * linux-mips-low.c (mips_linux_new_process): Likewise.
2033 (mips_linux_new_thread): Likewise.
2034 (mips_add_watchpoint): Likewise.
2035 * linux-x86-low.c (initialize_low_arch): Likewise.
2036 * lynx-low.c (lynx_add_process): Likewise.
2037 * mem-break.c (set_raw_breakpoint_at): Likewise.
2038 (set_breakpoint): Likewise.
2039 (add_condition_to_breakpoint): Likewise.
2040 (add_commands_to_breakpoint): Likewise.
2041 (clone_agent_expr): Likewise.
2042 (clone_one_breakpoint): Likewise.
2043 * regcache.c (new_register_cache): Likewise.
2044 * remote-utils.c (look_up_one_symbol): Likewise.
2045 * server.c (queue_stop_reply): Likewise.
2046 (start_inferior): Likewise.
2047 (queue_stop_reply_callback): Likewise.
2048 (handle_target_event): Likewise.
2049 * spu-low.c (fetch_ppc_memory): Likewise.
2050 (store_ppc_memory): Likewise.
2051 * target.c (set_target_ops): Likewise.
2052 * thread-db.c (thread_db_load_search): Likewise.
2053 (try_thread_db_load_1): Likewise.
2054 * tracepoint.c (add_tracepoint): Likewise.
2055 (add_tracepoint_action): Likewise.
2056 (create_trace_state_variable): Likewise.
2057 (cmd_qtdpsrc): Likewise.
2058 (cmd_qtro): Likewise.
2059 (add_while_stepping_state): Likewise.
2060 * win32-low.c (child_add_thread): Likewise.
2061 (get_image_name): Likewise.
2062
20632015-08-25 Yao Qi <yao.qi@linaro.org>
2064
2065 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2066
20672015-08-25 Yao Qi <yao.qi@linaro.org>
2068
2069 * Makefile.in (aarch64-linux.o): New rule.
2070 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2071 srv_tgtobj.
2072 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2073 (aarch64_init_debug_reg_state): Make it extern.
2074 (aarch64_linux_prepare_to_resume): Remove.
2075
20762015-08-25 Yao Qi <yao.qi@linaro.org>
2077
2078 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2079 lwp_arch_private_info and ptid_of_lwp.
2080
20812015-08-25 Yao Qi <yao.qi@linaro.org>
2082
2083 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2084 Find proc_info by find_process_pid. All callers updated.
2085
20862015-08-25 Yao Qi <yao.qi@linaro.org>
2087
2088 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2089 Remove.
2090 (debug_reg_change_callback): Remove.
2091 (aarch64_notify_debug_reg_change): Remove.
2092
20932015-08-25 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2096 Call current_lwp_ptid.
2097
20982015-08-25 Yao Qi <yao.qi@linaro.org>
2099
2100 * linux-aarch64-low.c (debug_reg_change_callback): Use
2101 debug_printf.
2102
21032015-08-25 Yao Qi <yao.qi@linaro.org>
2104
2105 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2106
21072015-08-25 Yao Qi <yao.qi@linaro.org>
2108
2109 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2110
21112015-08-25 Yao Qi <yao.qi@linaro.org>
2112
2113 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2114 the code.
2115
21162015-08-25 Yao Qi <yao.qi@linaro.org>
2117
2118 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2119 Remove.
2120 (debug_reg_change_callback): Remove argument entry and add argument
2121 lwp. Remove local variable thread. Don't print thread id in the
2122 debugging output. Don't check whether pid of thread equals to pid.
2123 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2124 iterate_over_lwps instead find_inferior.
2125
21262015-08-24 Pedro Alves <palves@redhat.com>
2127
2128 * inferiors.c (get_first_process): New function.
2129 * inferiors.h (get_first_process): New declaration.
2130 * remote-utils.c (read_ptid): Default to the first process in the
2131 list, instead of to the current thread's process.
2132
21332015-08-24 Pedro Alves <palves@redhat.com>
2134
2135 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2136 * event-loop.c: Likewise.
2137 * remote-utils.c: Likewise.
2138 * tracepoint.c: Likewise.
2139
21402015-08-24 Pedro Alves <palves@redhat.com>
2141
2142 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2143 ptid_get_lwp.
2144
21452015-08-21 Pedro Alves <palves@redhat.com>
2146
2147 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2148 instead of literal 1.
2149
21502015-08-21 Pedro Alves <palves@redhat.com>
2151
2152 * tdesc.c (default_description): Explicitly zero-initialize.
2153
21542015-08-21 Pedro Alves <palves@redhat.com>
2155
2156 PR gdb/18749
2157 * inferiors.c (remove_thread): Discard any pending stop reply for
2158 this thread.
2159 * server.c (remove_all_on_match_pid): Rename to ...
2160 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2161 instead of a pid.
2162 (discard_queued_stop_replies): Change parameter to a ptid. Now
2163 extern.
2164 (handle_v_kill, kill_inferior_callback, captured_main)
2165 (process_serial_event): Adjust.
2166 * server.h (discard_queued_stop_replies): Declare.
2167
21682015-08-21 Pedro Alves <palves@redhat.com>
2169
2170 * linux-low.c (wait_for_sigstop): Always switch to no thread
2171 selected if the previously current thread dies.
2172 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2173 process instead of the current thread's.
2174 * remote-utils.c (input_interrupt): Don't check if there's no
2175 current thread.
2176 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2177 current thread to the general thread fails, error out.
2178 (handle_qxfer_auxv, handle_qxfer_libraries)
2179 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2180 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2181 (handle_query): Check if there's a thread selected instead of
2182 checking whether there's any thread in the thread list.
2183 (handle_qxfer_threads, handle_qxfer_btrace)
2184 (handle_qxfer_btrace_conf): Don't error out early if there's no
2185 thread in the thread list.
2186 (handle_v_cont, myresume): Don't set the current thread to the
2187 continue thread.
2188 (process_serial_event) <Hg handling>: Also set thread_id if the
2189 previous general thread is still alive.
2190 (process_serial_event) <g/G handling>: If setting the current
2191 thread to the general thread fails, error out.
2192 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2193 thread's lwp instead of the current thread's.
2194 * target.c (set_desired_thread): If the desired thread was not
2195 found, leave the current thread pointing to NULL. Return an int
2196 (boolean) indicating success.
2197 * target.h (set_desired_thread): Change return type to int.
2198
21992015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2200
2201 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2202 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2203 #includes.
2204 (ps_get_thread_area): New function.
2205
22062015-08-19 Gary Benson <gbenson@redhat.com>
2207
2208 * hostio.c (handle_pread): Do not attempt to read more data
2209 than hostio_reply_with_data can fit in a packet.
2210
22112015-08-18 Joel Brobecker <brobecker@adacore.com>
2212
2213 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2214
22152015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2216
2217 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2218
22192015-08-06 Pedro Alves <palves@redhat.com>
2220
2221 * tracepoint.c (expr_eval_result): Now an int.
2222
22232015-08-06 Pedro Alves <palves@redhat.com>
2224
2225 * gdbthread.h (struct regcache): Forward declare.
2226 (struct thread_info) <regcache_data>: Now a struct regcache
2227 pointer.
2228 * inferiors.c (inferior_regcache_data)
2229 (set_inferior_regcache_data): Now work with struct regcache
2230 pointers.
2231 * inferiors.h (struct regcache): Forward declare.
2232 (inferior_regcache_data, set_inferior_regcache_data): Now work
2233 with struct regcache pointers.
2234 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2235 (free_register_cache_thread): Remove struct regcache pointer
2236 casts.
2237
22382015-08-06 Pedro Alves <palves@redhat.com>
2239
2240 * server.c (captured_main): On error, print the exception message
2241 to stderr, and if run_once is set, throw a quit.
2242
22432015-08-06 Pedro Alves <palves@redhat.com>
2244
2245 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2246 the current thread.
2247
22482015-08-06 Pedro Alves <palves@redhat.com>
2249
2250 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2251 reading beyond the passed in buffer length.
2252
22532015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2254
2255 * tracepoint.c (symbol_list) <required>: Remove.
2256
22572015-08-06 Pedro Alves <palves@redhat.com>
2258
2259 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2260 count if stopping and suspending threads.
2261 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2262 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2263 (linux_detach): Complete an ongoing step-over.
2264 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2265 throughout.
2266 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2267 (linux_wait_1): If passing a signal to the inferior after
2268 finishing a step-over, unsuspend and re-resume all lwps. If we
2269 see a single-step event but the thread should be continuing, don't
2270 pass the trap to gdb.
2271 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2272 internal_error instead of gdb_assert.
2273 (enqueue_pending_signal): New function.
2274 (check_ptrace_stopped_lwp_gone): Add debug output.
2275 (start_step_over): Use internal_error instead of gdb_assert.
2276 (complete_ongoing_step_over): New function.
2277 (linux_resume_one_thread): Don't resume a suspended thread.
2278 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2279 it stepping.
2280
22812015-08-06 Pedro Alves <palves@redhat.com>
2282
2283 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2284 (linux_thread_alive): Use lwp_is_marked_dead.
2285 (extended_event_reported): Delete.
2286 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2287 instead of extended_event_reported.
2288 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2289 as well.
2290 (lwp_is_marked_dead): New function.
2291 (lwp_running): Use lwp_is_marked_dead.
2292 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2293 comment.
2294
22952015-08-06 Pedro Alves <palves@redhat.com>
2296
2297 * linux-low.c (linux_wait_1): Move fork event output out of the
2298 !report_to_gdb check. Pass event_child->waitstatus to
2299 target_waitstatus_to_string instead of ourstatus.
2300
23012015-08-04 Yao Qi <yao.qi@linaro.org>
2302
2303 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2304 if current_thread is 32 bit.
2305
23062015-08-04 Yao Qi <yao.qi@linaro.org>
2307
2308 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2309 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2310 * server.c (extended_protocol): Remove "static".
2311 * server.h (extended_protocol): Declare it.
2312
23132015-08-04 Yao Qi <yao.qi@linaro.org>
2314
2315 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2316 both aarch64 and aarch32.
2317 (aarch64_set_pc): Likewise.
2318
23192015-08-04 Yao Qi <yao.qi@linaro.org>
2320
2321 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2322 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2323 arm-with-neon.xml to srv_xmlfiles.
2324 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2325 (is_64bit_tdesc): New function.
2326 (aarch64_linux_read_description): New function.
2327 (aarch64_arch_setup): Call aarch64_linux_read_description.
2328 (regs_info): Rename to regs_info_aarch64.
2329 (aarch64_regs_info): Return right regs_info.
2330 (initialize_low_arch): Call initialize_low_arch_aarch32.
2331
23322015-08-04 Yao Qi <yao.qi@linaro.org>
2333
2334 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2335 * linux-aarch32-low.c: New file.
2336 * linux-aarch32-low.h: New file.
2337 * linux-arm-low.c (arm_fill_gregset): Move it to
2338 linux-aarch32-low.c.
2339 (arm_store_gregset): Likewise.
2340 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2341 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2342 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2343 (regs_info): Rename to regs_info_arm.
2344 (arm_regs_info): Return regs_info_aarch32 if
2345 have_ptrace_getregset is 1 and target description is
2346 arm_with_neon or arm_with_vfpv3.
2347 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2348 Call initialize_low_arch_aarch32 instead.
2349
23502015-08-04 Yao Qi <yao.qi@linaro.org>
2351
2352 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2353 * linux-low.c: ... here.
2354 * linux-low.h (have_ptrace_getregset): Declare it.
2355
23562015-08-04 Pedro Alves <palves@redhat.com>
2357
2358 * thread-db.c (struct thread_db): Use new typedefs.
2359 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2360 CHK calls.
2361 (disable_thread_event_reporting): Cast result of dlsym to
2362 destination function pointer type.
2363 (thread_db_mourn): Use td_ta_delete_ftype.
2364
23652015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2366
2367 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2368 arch variant.
2369 (CDX_BREAKPOINT): Define for R2.
2370 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2371 (the_low_target): Add comments.
2372
23732015-07-30 Yao Qi <yao.qi@linaro.org>
2374
2375 * linux-arm-low.c (arm_hwcap): Remove it.
2376 (arm_read_description): New local variable arm_hwcap. Don't
2377 set arm_hwcap to zero.
2378
23792015-07-30 Yao Qi <yao.qi@linaro.org>
2380
2381 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2382 Use regcache->tdesc instead.
2383 (arm_store_wmmxregset): Likewise.
2384 (arm_fill_vfpregset): Likewise.
2385 (arm_store_vfpregset): Likewise.
2386
23872015-07-30 Yao Qi <yao.qi@linaro.org>
2388
2389 * linux-arm-low.c: Include arch/arm.h.
2390 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2391 (arm_store_gregset): Likewise.
2392
23932015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2394
2395 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2396 ptrace's 4th parameter.
2397
23982015-07-27 Yao Qi <yao.qi@linaro.org>
2399
2400 * configure.srv (case aarch64*-*-linux*): Don't set
2401 srv_linux_usrregs.
2402
24032015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2404
2405 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2406 sys/ptrace.h.
2407 * linux-arm-low.c: Likewise.
2408 * linux-cris-low.c: Likewise.
2409 * linux-crisv32-low.c: Likewise.
2410 * linux-low.c: Likewise.
2411 * linux-m68k-low.c: Likewise.
2412 * linux-mips-low.c: Likewise.
2413 * linux-nios2-low.c: Likewise.
2414 * linux-s390-low.c: Likewise.
2415 * linux-sparc-low.c: Likewise.
2416 * linux-tic6x-low.c: Likewise.
2417 * linux-tile-low.c: Likewise.
2418 * linux-x86-low.c: Likewise.
2419
24202015-07-24 Pedro Alves <palves@redhat.com>
2421
2422 * config.in: Regenerate.
2423 * configure: Regenerate.
2424
24252015-07-24 Pedro Alves <palves@redhat.com>
2426
2427 * acinclude.m4: Include ../ptrace.m4.
2428 * configure.ac: Call GDB_AC_PTRACE.
2429 * config.in, configure: Regenerate.
2430
24312015-07-24 Yao Qi <yao.qi@linaro.org>
2432
2433 * linux-low.c (linux_create_inferior): Remove setting to
2434 proc->priv->new_inferior.
2435 (linux_attach): Likewise.
2436 (linux_low_filter_event): Likewise.
2437 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2438
24392015-07-24 Yao Qi <yao.qi@linaro.org>
2440
2441 * linux-low.c (linux_arch_setup): New function.
2442 (linux_low_filter_event): If proc->tdesc is NULL and
2443 proc->attached is true, call the_low_target.arch_setup.
2444 Otherwise, keep status pending, and return.
2445 (linux_resume_one_lwp_throw): Don't call get_pc if
2446 thread->while_stepping isn't NULL. Don't call
2447 get_thread_regcache if proc->tdesc is NULL.
2448 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2449 (linux_target_ops): Install arch_setup.
2450 * server.c (start_inferior): Call the_target->arch_setup.
2451 * target.h (struct target_ops) <arch_setup>: New field.
2452 (target_arch_setup): New marco.
2453 * lynx-low.c (lynx_target_ops): Update.
2454 * nto-low.c (nto_target_ops): Update.
2455 * spu-low.c (spu_target_ops): Update.
2456 * win32-low.c (win32_target_ops): Update.
2457
24582015-07-24 Yao Qi <yao.qi@linaro.org>
2459
2460 * linux-low.c (linux_add_process): Don't set
2461 proc->priv->new_inferior.
2462 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2463 (linux_attach): Likewise.
2464
24652015-07-24 Yao Qi <yao.qi@linaro.org>
2466
2467 * server.c (start_inferior): Code refactor.
2468
24692015-07-24 Yao Qi <yao.qi@linaro.org>
2470
2471 * server.c (process_serial_event): Set general_thread.
2472
24732015-07-21 Yao Qi <yao.qi@linaro.org>
2474
2475 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2476 aarch64_linux_get_debug_reg_capacity.
2477
24782015-07-17 Yao Qi <yao.qi@linaro.org>
2479
2480 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2481 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2482 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2483 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2484 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2485 (AARCH64_HWP_ALIGNMENT): Likewise.
2486 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2487 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2488 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2489 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2490 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2491 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2492 (struct aarch64_debug_reg_state): Likewise.
2493 (struct arch_lwp_info): Likewise.
2494 (aarch64_align_watchpoint): Likewise.
2495 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2496 (aarch64_watchpoint_length): Likewise.
2497 (aarch64_point_encode_ctrl_reg): Likewise
2498 (aarch64_point_is_aligned): Likewise.
2499 (aarch64_align_watchpoint): Likewise.
2500 (aarch64_linux_set_debug_regs):
2501 (aarch64_dr_state_insert_one_point): Likewise.
2502 (aarch64_dr_state_remove_one_point): Likewise.
2503 (aarch64_handle_breakpoint): Likewise.
2504 (aarch64_handle_aligned_watchpoint): Likewise.
2505 (aarch64_handle_unaligned_watchpoint): Likewise.
2506 (aarch64_handle_watchpoint): Likewise.
2507
25082015-07-17 Yao Qi <yao.qi@linaro.org>
2509
2510 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2511 and don't aarch64_get_debug_reg_state. All callers update.
2512 (aarch64_handle_aligned_watchpoint): Likewise.
2513 (aarch64_handle_unaligned_watchpoint): Likewise.
2514 (aarch64_handle_watchpoint): Likewise.
2515 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2516 (aarch64_remove_point): Likewise.
2517
25182015-07-17 Yao Qi <yao.qi@linaro.org>
2519
2520 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2521 debug_printf.
2522 (aarch64_handle_unaligned_watchpoint): Likewise.
2523
25242015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2525
2526 Revert the previous 3 commits:
2527 Move gdb_regex* to common/
2528 Move linux_find_memory_regions_full & co.
2529 gdbserver build-id attribute generator
2530
25312015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2532 Jan Kratochvil <jan.kratochvil@redhat.com>
2533
2534 gdbserver build-id attribute generator.
2535 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2536 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2537 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2538 (find_phdr): New.
2539 (get_dynamic): Use find_pdhr to traverse program headers.
2540 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2541 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2542 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2543 (get_hex_build_id): New.
2544 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2545 to reply XML document.
2546
25472015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2548 Jan Kratochvil <jan.kratochvil@redhat.com>
2549
2550 * target.c: Include target/target-utils.h and fcntl.h.
2551 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2552 (target_fileio_read_stralloc): New functions.
2553
25542015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2555
2556 * Makefile.in (OBS): Add gdb_regex.o.
2557 (gdb_regex.o): New.
2558 * config.in: Rebuilt.
2559 * configure: Rebuilt.
2560
25612015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2562 Jan Kratochvil <jan.kratochvil@redhat.com>
2563
2564 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2565 * Makefile.in (OBS): Add target-utils.o.
2566 (linux-maps.o, target-utils.o): New.
2567 * configure.srv (srv_linux_obj): Add linux-maps.o.
2568
25692015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2570
2571 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2572 function, return 1.
2573 (the_low_target): Install it.
2574
25752015-07-14 Pedro Alves <palves@redhat.com>
2576
2577 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2578 Instead, ignore ECHILD, and throw an error for other errnos.
2579
25802015-07-10 Pedro Alves <palves@redhat.com>
2581
2582 * event-loop.c (struct callback_event) <data>: Change type to
2583 gdb_client_data instance instead of gdb_client_data pointer.
2584 (append_callback_event): Adjust.
2585
25862015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2587
2588 * linux-aarch64-low.c: Add comments for each linux_target_ops
2589 method. Remove comments already covered in target_ops and
2590 linux_target_ops definitions.
2591 (the_low_target): Add comments for each unimplemented method.
2592
25932015-07-09 Yao Qi <yao.qi@linaro.org>
2594
2595 * linux-aarch64-low.c (aarch64_regmap): Remove.
2596 (aarch64_usrregs_info): Remove.
2597 (regs_info): Set field usrregs to NULL.
2598
25992015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2600
2601 * linux-low.c: Include "rsp-low.h"
2602 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2603 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2604 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2605 (handle_btrace_enable_pt): New.
2606 (handle_btrace_general_set): Support "pt".
2607 (handle_btrace_conf_general_set): Support "pt:size".
2608
26092015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2610
2611 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2612 Z_PACKET_SW_BP.
2613
26142015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2615
2616 * linux-aarch64-low.c: Remove comment about endianness.
2617 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2618 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2619 memcmp.
2620
26212015-06-24 Gary Benson <gbenson@redhat.com>
2622
2623 * linux-i386-ipa.c (stdint.h): Do not include.
2624 * lynx-i386-low.c (stdint.h): Likewise.
2625 * lynx-ppc-low.c (stdint.h): Likewise.
2626 * mem-break.c (stdint.h): Likewise.
2627 * thread-db.c (stdint.h): Likewise.
2628 * tracepoint.c (stdint.h): Likewise.
2629 * win32-low.c (stdint.h): Likewise.
2630
26312015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2632
2633 * server.c (write_qxfer_response): Update call to
2634 remote_escape_output.
2635
26362015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2637 Jan Kratochvil <jan.kratochvil@redhat.com>
2638
2639 Merge multiple hex conversions.
2640 * gdbreplay.c (tohex): Rename to 'fromhex'.
2641 (logchar): Use fromhex.
2642
26432015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2644
2645 * server.c (handle_qxfer_libraries): Set `version' attribute for
2646 <library-list>.
2647
26482015-06-10 Gary Benson <gbenson@redhat.com>
2649
2650 * target.h (struct target_ops) <multifs_open>: New field.
2651 <multifs_unlink>: Likewise.
2652 <multifs_readlink>: Likewise.
2653 * linux-low.c (nat/linux-namespaces.h): New include.
2654 (linux_target_ops): Initialize the_target->multifs_open,
2655 the_target->multifs_unlink and the_target->multifs_readlink.
2656 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2657 * hostio.c (hostio_fs_pid): New static variable.
2658 (hostio_handle_new_gdb_connection): New function.
2659 (handle_setfs): Likewise.
2660 (handle_open): Use the_target->multifs_open as appropriate.
2661 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2662 (handle_readlink): Use the_target->multifs_readlink as
2663 appropriate.
2664 (handle_vFile): Handle vFile:setfs packets.
2665 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2666 after target_handle_new_gdb_connection.
2667
26682015-06-10 Gary Benson <gbenson@redhat.com>
2669
2670 * configure.ac (AC_CHECK_FUNCS): Add setns.
2671 * config.in: Regenerate.
2672 * configure: Likewise.
2673 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2674 (linux-namespaces.o): New rule.
2675 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2676
26772015-06-09 Gary Benson <gbenson@redhat.com>
2678
2679 * hostio.c (handle_open): Process mode argument with
2680 fileio_to_host_mode.
2681
26822015-06-01 Yao Qi <yao.qi@linaro.org>
2683
2684 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2685 * linux-x86-low.c: Likewise.
2686
26872015-05-28 Don Breazeal <donb@codesourcery.com>
2688
2689 * linux-low.c (handle_extended_wait): Initialize
2690 thread_info.last_resume_kind for new fork children.
2691
26922015-05-15 Pedro Alves <palves@redhat.com>
2693
2694 * target.h (target_handle_new_gdb_connection): Rewrite using if
2695 wrapped in do/while.
2696
26972015-05-14 Joel Brobecker <brobecker@adacore.com>
2698
2699 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2700 * configure, config.in: Regenerate.
2701 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2702 Declare typedef.
2703
27042015-05-12 Don Breazeal <donb@codesourcery.com>
2705
2706 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2707 PTRACE_EVENT_VFORK_DONE.
2708 (linux_low_ptrace_options, extended_event_reported): Add vfork
2709 events.
2710 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2711 and "vforkdone" for RSP 'T' Stop Reply Packet.
2712 * server.h (report_vfork_events): Declare
2713 global variable.
2714
27152015-05-12 Don Breazeal <donb@codesourcery.com>
2716
2717 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2718 (the_low_target) <new_fork>: Initialize new member.
2719 * linux-arm-low.c (arm_new_fork): New function.
2720 (the_low_target) <new_fork>: Initialize new member.
2721 * linux-low.c (handle_extended_wait): Call new target function
2722 new_fork.
2723 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2724 * linux-mips-low.c (mips_add_watchpoint): New function
2725 extracted from mips_insert_point.
2726 (the_low_target) <new_fork>: Initialize new member.
2727 (mips_linux_new_fork): New function.
2728 (mips_insert_point): Call mips_add_watchpoint.
2729 * linux-x86-low.c (x86_linux_new_fork): New function.
2730 (the_low_target) <new_fork>: Initialize new member.
2731
27322015-05-12 Don Breazeal <donb@codesourcery.com>
2733
2734 * linux-low.c (handle_extended_wait): Implement return value,
2735 rename argument 'event_child' to 'event_lwp', handle
2736 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2737 (linux_low_ptrace_options): New function.
2738 (linux_low_filter_event): Call linux_low_ptrace_options,
2739 use different argument fo linux_enable_event_reporting,
2740 use return value from handle_extended_wait.
2741 (extended_event_reported): New function.
2742 (linux_wait_1): Call extended_event_reported and set
2743 status to report fork events.
2744 (linux_write_memory): Add pid to debug message.
2745 (reset_lwp_ptrace_options_callback): New function.
2746 (linux_handle_new_gdb_connection): New function.
2747 (linux_target_ops): Initialize new structure member.
2748 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2749 * lynx-low.c: Initialize new structure member.
2750 * remote-utils.c (prepare_resume_reply): Implement stop reason
2751 "fork" for "T" stop message.
2752 * server.c (handle_query): Call handle_new_gdb_connection.
2753 * server.h (report_fork_events): Declare global flag.
2754 * target.h (struct target_ops) <handle_new_gdb_connection>:
2755 New member.
2756 (target_handle_new_gdb_connection): New macro.
2757 * win32-low.c: Initialize new structure member.
2758
27592015-05-12 Don Breazeal <donb@codesourcery.com>
2760
2761 * mem-break.c (APPEND_TO_LIST): Define macro.
2762 (clone_agent_expr): New function.
2763 (clone_one_breakpoint): New function.
2764 (clone_all_breakpoints): New function.
2765 * mem-break.h: Declare new functions.
2766
27672015-05-12 Don Breazeal <donb@codesourcery.com>
2768
2769 * linux-low.c (linux_supports_fork_events): New function.
2770 (linux_supports_vfork_events): New function.
2771 (linux_target_ops): Initialize new structure members.
2772 (initialize_low): Call linux_check_ptrace_features.
2773 * lynx-low.c (lynx_target_ops): Initialize new structure
2774 members.
2775 * server.c (report_fork_events, report_vfork_events):
2776 New global flags.
2777 (handle_query): Add new features to qSupported packet and
2778 response.
2779 (captured_main): Initialize new global variables.
2780 * target.h (struct target_ops) <supports_fork_events>:
2781 New member.
2782 <supports_vfork_events>: New member.
2783 (target_supports_fork_events): New macro.
2784 (target_supports_vfork_events): New macro.
2785 * win32-low.c (win32_target_ops): Initialize new structure
2786 members.
2787
27882015-05-12 Gary Benson <gbenson@redhat.com>
2789
2790 * server.c (handle_qxfer_exec_file): Use current process
2791 if annex is empty.
2792
27932015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2794
2795 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2796 Remove HAVE_PTRACE_GETREGS conditionals.
2797 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2798 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2799
28002015-05-08 Yao Qi <yao.qi@linaro.org>
2801
2802 * linux-low.c (linux_supports_conditional_breakpoints): New
2803 function.
2804 (linux_target_ops): Install new target method.
2805 * lynx-low.c (lynx_target_ops): Install NULL hook for
2806 supports_conditional_breakpoints.
2807 * nto-low.c (nto_target_ops): Likewise.
2808 * spu-low.c (spu_target_ops): Likewise.
2809 * win32-low.c (win32_target_ops): Likewise.
2810 * server.c (handle_query): Check
2811 target_supports_conditional_breakpoints.
2812 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2813 New field.
2814 (target_supports_conditional_breakpoints): New macro.
2815
28162015-05-06 Pedro Alves <palves@redhat.com>
2817
2818 PR server/18081
2819 * server.c (start_inferior): If the process exits, mourn it.
2820
28212015-04-21 Gary Benson <gbenson@redhat.com>
2822
2823 * hostio.c (fileio_open_flags_to_host): Factored out to
2824 fileio_to_host_openflags in common/fileio.c. Single use
2825 updated.
2826
28272015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2828
2829 * linux-xtensa-low.c (xtensa_fill_gregset)
2830 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2831 XCHAL_HAVE_LOOP.
2832
28332015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2834
2835 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2836 (regs_info): Replace usrregs pointer with NULL.
2837
28382015-04-17 Gary Benson <gbenson@redhat.com>
2839
2840 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2841 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2842 * server.c (handle_qxfer_exec_file): New function.
2843 (qxfer_packets): Add exec-file entry.
2844 (handle_query): Report qXfer:exec-file:read as supported packet.
2845
28462015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2847
2848 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2849
28502015-04-09 Gary Benson <gbenson@redhat.com>
2851
2852 * hostio-errno.c (errno_to_fileio_error): Remove function.
2853 Update caller to use remote_fileio_to_fio_error.
2854
28552015-04-09 Yao Qi <yao.qi@linaro.org>
2856
2857 * linux-low.c (linux_insert_point): Call
2858 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2859 (linux_remove_point): Call remove_memory_breakpoint if type is
2860 raw_bkpt_type_sw.
2861 * linux-x86-low.c (x86_insert_point): Don't call
2862 insert_memory_breakpoint.
2863 (x86_remove_point): Don't call remove_memory_breakpoint.
2864
28652015-04-01 Pedro Alves <palves@redhat.com>
2866 Cleber Rosa <crosa@redhat.com>
2867
2868 * server.c (gdbserver_usage): Reorganize and extend the usage
2869 message.
2870
28712015-03-24 Pedro Alves <palves@redhat.com>
2872
2873 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2874 output. Also dump TRAP_TRACE.
2875 (linux_low_filter_event): In debug output, distinguish a
2876 resume_stop SIGSTOP from a delayed SIGSTOP.
2877
28782015-03-24 Gary Benson <gbenson@redhat.com>
2879
2880 * linux-x86-low.c (x86_linux_new_thread): Moved to
2881 nat/x86-linux.c.
2882 (x86_linux_prepare_to_resume): Likewise.
2883
28842015-03-24 Gary Benson <gbenson@redhat.com>
2885
2886 * Makefile.in (x86-linux-dregs.o): New rule.
2887 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2888 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2889 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2890 (x86_linux_dr_get): Likewise.
2891 (x86_linux_dr_set): Likewise.
2892 (update_debug_registers_callback): Likewise.
2893 (x86_linux_dr_set_addr): Likewise.
2894 (x86_linux_dr_get_addr): Likewise.
2895 (x86_linux_dr_set_control): Likewise.
2896 (x86_linux_dr_get_control): Likewise.
2897 (x86_linux_dr_get_status): Likewise.
2898 (x86_linux_update_debug_registers): Likewise.
2899
29002015-03-24 Gary Benson <gbenson@redhat.com>
2901
2902 * linux-x86-low.c (x86_linux_update_debug_registers):
2903 New function, factored out from...
2904 (x86_linux_prepare_to_resume): ...this.
2905
29062015-03-24 Gary Benson <gbenson@redhat.com>
2907
2908 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2909 (x86_linux_dr_set): Likewise.
2910 (update_debug_registers_callback): Likewise.
2911 (x86_linux_dr_set_addr): Likewise.
2912 (x86_linux_dr_get_addr): Likewise.
2913 (x86_linux_dr_set_control): Likewise.
2914 (x86_linux_dr_get_control): Likewise.
2915 (x86_linux_dr_get_status): Likewise.
2916 (x86_linux_prepare_to_resume): Likewise.
2917
29182015-03-24 Gary Benson <gbenson@redhat.com>
2919
2920 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2921 Use perror_with_name. Pass string through gettext.
2922 (x86_linux_dr_set): Likewise.
2923
29242015-03-24 Gary Benson <gbenson@redhat.com>
2925
2926 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2927 (x86_linux_dr_set_addr): ...this.
2928 (x86_dr_low_get_addr): Rename to...
2929 (x86_linux_dr_get_addr): ...this.
2930 (x86_dr_low_set_control): Rename to...
2931 (x86_linux_dr_set_control): ...this.
2932 (x86_dr_low_get_control): Rename to...
2933 (x86_linux_dr_get_control): ...this.
2934 (x86_dr_low_get_status): Rename to...
2935 (x86_linux_dr_get_status): ...this.
2936 (x86_dr_low): Update with new function names.
2937
29382015-03-24 Gary Benson <gbenson@redhat.com>
2939
2940 * Makefile.in (x86-linux.o): New rule.
2941 * configure.srv: Add x86-linux.o to relevant targets.
2942 * linux-low.c (lwp_set_arch_private_info): New function.
2943 (lwp_arch_private_info): Likewise.
2944 * linux-x86-low.c: Include nat/x86-linux.h.
2945 (arch_lwp_info): Removed structure.
2946 (update_debug_registers_callback):
2947 Use lwp_set_debug_registers_changed.
2948 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2949 and lwp_set_debug_registers_changed.
2950 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2951
29522015-03-24 Gary Benson <gbenson@redhat.com>
2953
2954 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2955 * linux-arm-low.c (arm_new_thread): Likewise.
2956 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2957 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2958 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2959 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2960
29612015-03-24 Gary Benson <gbenson@redhat.com>
2962
2963 * linux-low.c (ptid_of_lwp): New function.
2964 (lwp_is_stopped): Likewise.
2965 (lwp_stop_reason): Likewise.
2966 * linux-x86-low.c (update_debug_registers_callback):
2967 Use lwp_is_stopped.
2968 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2969 lwp_stop_reason.
2970
29712015-03-24 Gary Benson <gbenson@redhat.com>
2972
2973 * linux-low.h (linux_stop_lwp): Remove declaration.
2974
29752015-03-24 Gary Benson <gbenson@redhat.com>
2976
2977 * linux-low.h: Include nat/linux-nat.h.
2978 * linux-low.c (iterate_over_lwps_args): New structure.
2979 (iterate_over_lwps_filter): New function.
2980 (iterate_over_lwps): Likewise.
2981 * linux-x86-low.c (update_debug_registers_callback):
2982 Update signature to what iterate_over_lwps expects.
2983 Remove PID check that iterate_over_lwps now performs.
2984 (x86_dr_low_set_addr): Use iterate_over_lwps.
2985 (x86_dr_low_set_control): Likewise.
2986
29872015-03-24 Gary Benson <gbenson@redhat.com>
2988
2989 * linux-x86-low.c (x86_debug_reg_state): New function.
2990 (x86_linux_prepare_to_resume): Use the above.
2991
29922015-03-24 Gary Benson <gbenson@redhat.com>
2993
2994 * linux-low.c (current_lwp_ptid): New function.
2995 * linux-x86-low.c: Include nat/linux-nat.h.
2996 (x86_dr_low_get_addr): Use current_lwp_ptid.
2997 (x86_dr_low_get_control): Likewise.
2998 (x86_dr_low_get_status): Likewise.
2999
30002015-03-20 Pedro Alves <palves@redhat.com>
3001
3002 * tracepoint.c (cmd_qtstatus): Make "str" const.
3003
30042015-03-20 Pedro Alves <palves@redhat.com>
3005
3006 * server.c (handle_general_set): Make "req_str" const.
3007
30082015-03-19 Pedro Alves <palves@redhat.com>
3009
3010 * linux-low.c (linux_resume_one_lwp): Rename to ...
3011 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3012 instead call perror_with_name.
3013 (check_ptrace_stopped_lwp_gone): New function.
3014 (linux_resume_one_lwp): Reimplement as wrapper around
3015 linux_resume_one_lwp_throw that swallows errors if the LWP is
3016 gone.
3017
30182015-03-19 Pedro Alves <palves@redhat.com>
3019
3020 * linux-low.c (count_events_callback, select_event_lwp_callback):
3021 No longer check whether the thread has resume_stop as last resume
3022 kind.
3023
30242015-03-19 Pedro Alves <palves@redhat.com>
3025
3026 * linux-low.c (count_events_callback, select_event_lwp_callback):
3027 Use the lwp's status_pending_p field, not the thread's.
3028
30292015-03-19 Pedro Alves <palves@redhat.com>
3030
3031 * linux-low.c (select_event_lwp_callback): Update comments to
3032 no longer mention SIGTRAP.
3033
30342015-03-18 Gary Benson <gbenson@redhat.com>
3035
3036 * server.c (handle_query): Do not report vFile:fstat as supported.
3037
30382015-03-11 Gary Benson <gbenson@redhat.com>
3039
3040 * hostio.c (sys/types.h): New include.
3041 (sys/stat.h): Likewise.
3042 (common-remote-fileio.h): Likewise.
3043 (handle_fstat): New function.
3044 (handle_vFile): Handle vFile:fstat packets.
3045
30462015-03-11 Gary Benson <gbenson@redhat.com>
3047
3048 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3049 struct stat.st_blocks and struct stat.st_blksize.
3050 * configure: Regenerate.
3051 * config.in: Likewise.
3052 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3053 (OBS): Add common-remote-fileio.o.
3054 (common-remote-fileio.o): New rule.
3055
30562015-03-09 Pedro Alves <palves@redhat.com>
3057
3058 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3059 'struct sockaddr' pointer in 'accept' call.
3060
30612015-03-09 Pedro Alves <palves@redhat.com>
3062
3063 Revert:
3064 2015-03-07 Pedro Alves <palves@redhat.com>
3065 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3066 or <winsock2.h> here. Instead include "gdb_socket.h".
3067 (remote_open): Use union gdb_sockaddr_u.
3068 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3069 or <winsock2.h> here. Instead include "gdb_socket.h".
3070 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3071 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3072 or <sys/un.h>.
3073 (init_named_socket, gdb_agent_helper_thread): Use union
3074 gdb_sockaddr_u.
3075
30762015-03-07 Pedro Alves <palves@redhat.com>
3077
3078 * configure.ac (build_warnings): Move
3079 -Wdeclaration-after-statement to the C-specific set.
3080 * configure: Regenerate.
3081
30822015-03-07 Pedro Alves <palves@redhat.com>
3083
3084 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3085 or <winsock2.h> here. Instead include "gdb_socket.h".
3086 (remote_open): Use union gdb_sockaddr_u.
3087 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3088 or <winsock2.h> here. Instead include "gdb_socket.h".
3089 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3090 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3091 or <sys/un.h>.
3092 (init_named_socket, gdb_agent_helper_thread): Use union
3093 gdb_sockaddr_u.
3094
30952015-03-07 Pedro Alves <palves@redhat.com>
3096
3097 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3098 instead.
3099
31002015-03-06 Yao Qi <yao.qi@linaro.org>
3101
3102 * linux-aarch64-low.c (aarch64_insert_point): Use
3103 show_debug_regs as a boolean.
3104 (aarch64_remove_point): Likewise.
3105
31062015-03-05 Pedro Alves <palves@redhat.com>
3107
3108 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3109 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3110 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3111 * nto-low.c (nto_target_ops): Likewise.
3112 * spu-low.c (spu_target_ops): Likewise.
3113 * win32-low.c (win32_target_ops): Likewise.
3114
31152015-03-04 Pedro Alves <palves@redhat.com>
3116
3117 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3118 Decide whether a breakpoint triggered based on the SIGTRAP's
3119 siginfo.si_code.
3120 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3121 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3122 (linux_low_filter_event): Check for breakpoints before checking
3123 watchpoints.
3124 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3125 siginfo.si_code.
3126 (linux_stopped_by_sw_breakpoint)
3127 (linux_supports_stopped_by_sw_breakpoint)
3128 (linux_stopped_by_hw_breakpoint)
3129 (linux_supports_stopped_by_hw_breakpoint): New functions.
3130 (linux_target_ops): Install new target methods.
3131
31322015-03-04 Pedro Alves <palves@redhat.com>
3133
3134 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3135 * server.c (swbreak_feature, hwbreak_feature): New globals.
3136 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3137 (captured_main): Clear swbreak_feature and hwbreak_feature.
3138 * server.h (swbreak_feature, hwbreak_feature): Declare.
3139 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3140 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3141 supports_stopped_by_hw_breakpoint>: New fields.
3142 (target_supports_stopped_by_sw_breakpoint)
3143 (target_stopped_by_sw_breakpoint)
3144 (target_supports_stopped_by_hw_breakpoint)
3145 (target_stopped_by_hw_breakpoint): Declare.
3146
31472015-03-04 Pedro Alves <palves@redhat.com>
3148
3149 enum lwp_stop_reason -> enum target_stop_reason
3150 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3151 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3152 (linux_wait_1, stuck_in_jump_pad_callback)
3153 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3154 (linux_stopped_by_watchpoint):
3155 * linux-low.h (enum lwp_stop_reason): Delete.
3156 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3157 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3158
31592015-03-04 Yao Qi <yao.qi@linaro.org>
3160
3161 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3162
31632015-03-03 Gary Benson <gbenson@redhat.com>
3164
3165 * hostio.c (handle_vFile): Fix prefix lengths.
3166
31672015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3168
3169 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3170 ptr_bits.
3171
31722015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3173
3174 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3175 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3176 (clean): Add "rm -f" for above C files.
3177 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3178 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3179 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3180 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3181 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3182 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3183 (init_registers_s390x_vx_linux64)
3184 (init_registers_s390x_tevx_linux64)
3185 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3186 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3187 declarations.
3188 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3189 (s390_store_vxrs_high): New functions.
3190 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3191 NT_S390_VXRS_HIGH.
3192 (s390_arch_setup): Add logic for selecting one of the new target
3193 descriptions. Activate the new vector regsets if applicable.
3194 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3195 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3196 and init_registers_s390x_tevx_linux64.
3197
31982015-03-01 Pedro Alves <palves@redhat.com>
3199
3200 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3201 parameter.
3202
32032015-02-27 Pedro Alves <palves@redhat.com>
3204
3205 * linux-x86-low.c (u_debugreg_offset): New function.
3206 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3207
32082015-02-27 Pedro Alves <palves@redhat.com>
3209
3210 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3211 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3212 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3213 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3214 (ps_lsetfpregs, ps_getpid)
3215 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3216 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3217 (ps_lsetxregs, ps_plog): Declare.
3218
32192015-02-27 Pedro Alves <palves@redhat.com>
3220
3221 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3222 IP_AGENT_EXPORT_FUNC.
3223 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3224 IP_AGENT_EXPORT_FUNC.
3225 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3226 (IP_AGENT_EXPORT): Delete.
3227 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3228 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3229 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3230 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3231 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3232 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3233 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3234 (traceframe_read_count, traceframe_write_count)
3235 (traceframes_created, trace_state_variables, get_raw_reg)
3236 (get_trace_state_variable_value, set_trace_state_variable_value)
3237 (ust_loaded, helper_thread_id, cmd_buf): Use
3238 IPA_SYM_EXPORTED_NAME.
3239 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3240 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3241 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3242 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3243 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3244 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3245 EXTERN_C_PUSH/EXTERN_C_POP.
3246 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3247 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3248 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3249 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3250 (traceframe_write_count, traceframe_read_count)
3251 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3252 (about_to_request_buffer_space, get_trace_state_variable_value)
3253 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3254 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3255 EXTERN_C_PUSH/EXTERN_C_POP.
3256 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3257 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3258 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3259 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3260 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3261 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3262 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3263 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3264 Define.
3265 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3266 (IP_AGENT_EXPORT_VAR_DECL): Define.
3267 (tracing): Declare.
3268 (gdb_agent_get_raw_reg): Declare.
3269
32702015-02-27 Tom Tromey <tromey@redhat.com>
3271 Pedro Alves <palves@redhat.com>
3272
3273 Rename symbols whose names are reserved C++ keywords throughout.
3274
32752015-02-27 Pedro Alves <palves@redhat.com>
3276
3277 * Makefile.in (COMPILER): New, get it from autoconf.
3278 (CXX): Get from autoconf instead.
3279 (COMPILE.pre): Use COMPILER.
3280 (CC-LD): Rename to ...
3281 (CC_LD): ... this. Use COMPILER.
3282 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3283 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3284 * acinclude.m4: Include build-with-cxx.m4.
3285 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3286 Disable -Werror by default if building in C++ mode.
3287 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3288 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3289 the C++ compiler. Save/restore CXXFLAGS too.
3290 * configure: Regenerate.
3291
32922015-02-27 Pedro Alves <palves@redhat.com>
3293
3294 * acinclude.m4: Include libiberty.m4.
3295 * configure.ac: Call libiberty_INIT.
3296 * config.in, configure: Regenerate.
3297
32982015-02-26 Pedro Alves <palves@redhat.com>
3299
3300 * linux-low.c (linux_wait_1): When incrementing the PC past a
3301 program breakpoint always use the_low_target.breakpoint_len as
3302 increment, rather than the maximum between that and
3303 the_low_target.decr_pc_after_break.
3304
33052015-02-23 Pedro Alves <palves@redhat.com>
3306
3307 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3308 thread was doing a step-over; always adjust the PC if
3309 we stepped over a permanent breakpoint.
3310 (linux_wait_1): If we stepped over breakpoint that was on top of a
3311 permanent breakpoint, manually advance the PC past it.
3312
33132015-02-23 Pedro Alves <palves@redhat.com>
3314
3315 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3316 modes.
3317 (x86_fill_gregset, x86_store_gregset): Use it when handling
3318 $orig_eax.
3319
33202015-02-20 Pedro Alves <palves@redhat.com>
3321
3322 * thread-db.c: Include "nat/linux-procfs.h".
3323 (thread_db_init): Skip listing new threads if the kernel supports
3324 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3325
33262015-02-20 Pedro Alves <palves@redhat.com>
3327
3328 * linux-low.c (status_pending_p_callback): Use ptid_match.
3329
33302015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3331
3332 PR breakpoints/16812
3333 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3334 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3335 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3336
33372015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3338
3339 PR breakpoints/15956
3340 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3341
33422015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3343
3344 * linux-low.c (linux_low_btrace_conf): Print size.
3345 * server.c (handle_btrace_conf_general_set): New.
3346 (hanle_general_set): Call handle_btrace_conf_general_set.
3347 (handle_query): Report Qbtrace-conf:bts:size as supported.
3348
33492015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3350
3351 * linux-low.c (linux_low_enable_btrace): Update parameters.
3352 (linux_low_btrace_conf): New.
3353 (linux_target_ops)<to_btrace_conf>: Initialize.
3354 * server.c (current_btrace_conf): New.
3355 (handle_btrace_enable): Rename to ...
3356 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3357 to target_enable_btrace. Update comment. Update users.
3358 (handle_qxfer_btrace_conf): New.
3359 (qxfer_packets): Add btrace-conf entry.
3360 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3361 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3362 (target_ops)<read_btrace_conf>: New.
3363 (target_enable_btrace): Update parameters.
3364 (target_read_btrace_conf): New.
3365
33662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3367
3368 * server.c (handle_btrace_general_set): Remove call to
3369 target_supports_btrace.
3370 (supported_btrace_packets): New.
3371 (handle_query): Call supported_btrace_packets.
3372 * target.h: include btrace-common.h.
3373 (btrace_target_info): Removed.
3374 (supports_btrace, target_supports_btrace): Update parameters.
3375
33762015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3377
3378 * Makefile.in (SFILES): Add common/btrace-common.c.
3379 (OBS): Add common/btrace-common.o.
3380 (btrace-common.o): Add build rules.
3381 * linux-low: Include btrace-common.h.
3382 (linux_low_read_btrace): Use struct btrace_data. Call
3383 btrace_data_init and btrace_data_fini.
3384
33852015-02-06 Pedro Alves <palves@redhat.com>
3386
3387 * thread-db.c (find_new_threads_callback): Add debug output.
3388
33892015-02-04 Pedro Alves <palves@redhat.com>
3390
3391 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3392 (resume_stopped_resumed_lwps): New function.
3393 (linux_wait_for_event_filtered): Use it.
3394
33952015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3396
3397 * Makefile.in (SFILES): Add linux-personality.c.
3398 (linux-personality.o): New rule.
3399 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3400 list of objects to be built.
3401 * linux-low.c: Include nat/linux-personality.h.
3402 (linux_create_inferior): Remove code to disable address space
3403 randomization (moved to ../nat/linux-personality.c). Create
3404 cleanup to disable address space randomization.
3405
34062015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3407
3408 * Makefile.in (posix-strerror.o): New rule.
3409 (mingw-strerror.o): Likewise.
3410 * configure: Regenerated.
3411 * configure.ac: Source file ../common/common.host. Initialize new
3412 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3413
34142015-01-14 Yao Qi <yao@codesourcery.com>
3415
3416 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3417 (ppc-linux.o): New rule.
3418 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3419 * configure.ac: AC_CHECK_FUNCS(getauxval).
3420 * config.in: Re-generated.
3421 * configure: Re-generated.
3422 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3423 ppc64_64bit_inferior_p
3424
34252015-01-14 Yao Qi <yao@codesourcery.com>
3426
3427 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3428 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3429 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3430 (PT_ORIG_R3, PT_TRAP): Likewise.
3431 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3432 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3433 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3434
34352015-01-10 Joel Brobecker <brobecker@adacore.com>
3436
3437 * i387-fp.c (i387_cache_to_xsave): In look over
3438 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3439 zmmh_low_space field by use of zmmh_high_space.
3440
34412015-01-09 Pedro Alves <palves@redhat.com>
3442
3443 * linux-low.c (step_over_bkpt): Move higher up in the file.
3444 (handle_extended_wait): Don't store the stop_pc here.
3445 (get_stop_pc): Adjust comments and rename to ...
3446 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3447 stopped for a software breakpoint or hardware breakpoint.
3448 (thread_still_has_status_pending_p): New function.
3449 (status_pending_p_callback): Use
3450 thread_still_has_status_pending_p. If the event is no longer
3451 interesting, resume the LWP.
3452 (handle_tracepoints): Add assert.
3453 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3454 (wstatus_maybe_breakpoint): New function.
3455 (cancel_breakpoint): Delete function.
3456 (check_stopped_by_watchpoint): New function, factored out from
3457 linux_low_filter_event.
3458 (lp_status_maybe_breakpoint): Delete function.
3459 (linux_low_filter_event): Remove filter_ptid argument.
3460 Leave thread group exits pending here. Store the LWP's stop PC.
3461 Always leave events pending.
3462 (linux_wait_for_event_filtered): Pull all events out of the
3463 kernel, and leave them all pending.
3464 (count_events_callback, select_event_lwp_callback): Consider all
3465 events.
3466 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3467 (select_event_lwp): Only give preference to the stepping LWP in
3468 all-stop mode. Adjust comments.
3469 (ignore_event): New function.
3470 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3471 references to cancel_breakpoints. Adjust to renames. Also give
3472 equal priority to all LWPs that have had events in non-stop mode.
3473 If reporting a software breakpoint event, unadjust the LWP's PC.
3474 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3475 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3476 Adjust.
3477 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3478 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3479 (linux_stopped_by_watchpoint): Adjust.
3480 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3481 * linux-low.h (enum lwp_stop_reason): New.
3482 (struct lwp_info) <stop_pc>: Adjust comment.
3483 <stopped_by_watchpoint>: Delete field.
3484 <stop_reason>: New field.
3485 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3486 * mem-break.c (software_breakpoint_inserted_here)
3487 (hardware_breakpoint_inserted_here): New function.
3488 * mem-break.h (software_breakpoint_inserted_here)
3489 (hardware_breakpoint_inserted_here): Declare.
3490 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3491 (cancel_breakpoints): Delete.
3492 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3493 (upload_fast_traceframes): Remove references to
3494 cancel_breakpoints.
3495
34962015-01-09 Pedro Alves <palves@redhat.com>
3497
3498 * thread-db.c (find_new_threads_callback): Ignore thread if the
3499 kernel thread ID is -1.
3500
35012015-01-09 Pedro Alves <palves@redhat.com>
3502
3503 * linux-low.c (linux_attach_fail_reason_string): Move to
3504 nat/linux-ptrace.c, and rename.
3505 (linux_attach_lwp): Update comment.
3506 (attach_proc_task_lwp_callback): New function.
3507 (linux_attach): Adjust to rename and use
3508 linux_proc_attach_tgid_threads.
3509 (linux_attach_fail_reason_string): Delete declaration.
3510
35112015-01-01 Joel Brobecker <brobecker@adacore.com>
3512
3513 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3514 * server.c (gdbserver_version): Likewise.
3515
35162014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3517
3518 * remote-utils.c: Include ctype.h.
3519 (input_interrupt): Explicitly handle the case when the char
3520 received is the NUL byte. Improve the printing of non-ASCII
3521 characters.
3522
35232014-12-16 Joel Brobecker <brobecker@adacore.com>
3524
3525 * linux-low.c (linux_low_filter_event): Update call to
3526 linux_enable_event_reporting following the addition of
3527 a new parameter to that function.
3528
35292014-12-16 Catalin Udma <catalin.udma@freescale.com>
3530
3531 PR server/17457
3532 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3533 (AARCH64_FPCR_REGNO): Likewise.
3534 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3535 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3536 (aarch64_store_fpregset): Likewise.
3537
35382014-12-15 Joel Brobecker <brobecker@adacore.com>
3539
3540 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3541 Remove FIXME comment about assumption about N.
3542
35432014-12-13 Joel Brobecker <brobecker@adacore.com>
3544
3545 * configure.ac: If large-file support is disabled in GDBserver,
3546 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3547 * configure: Regenerate.
3548
35492014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3550
3551 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3552 warning upon ENODATA from ptrace.
3553 * linux-s390-low.c (s390_store_tdb): New.
3554 (s390_regsets): Add regset for NT_S390_TDB.
3555
35562014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3557
3558 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3559 without a fill_function.
3560 * linux-s390-low.c (s390_fill_last_break): Remove.
3561 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3562 (s390_arch_setup): Use regset's size instead of fill_function for
3563 loop end condition.
3564
35652014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3566
3567 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3568 the regset's store function when ptrace returned an error.
3569 * regcache.c (get_thread_regcache): Invalidate register cache
3570 before fetching inferior's registers.
3571
35722014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3573
3574 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3575 while-loop as for-loop.
3576 (regsets_store_inferior_registers): Likewise.
3577
35782014-11-28 Yao Qi <yao@codesourcery.com>
3579
3580 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3581 * config.in, configure: Re-generate.
3582 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3583 is defined.
3584
35852014-11-21 Yao Qi <yao@codesourcery.com>
3586
3587 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3588 (AC_CHECK_HEADERS): Remove malloc.h.
3589 * configure: Re-generated.
3590 * config.in: Re-generated.
3591 * server.h: Don't include alloca.h and malloc.h.
3592 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3593 Don't include malloc.h.
3594
35952014-11-17 Joel Brobecker <brobecker@adacore.com>
3596
3597 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3598 corresponding ERRNO check in same block.
3599
36002014-11-12 Pedro Alves <palves@redhat.com>
3601
3602 * server.c (cont_thread): Update comment.
3603 (start_inferior, attach_inferior): No longer clear cont_thread.
3604 (handle_v_cont): No longer set cont_thread.
3605 (captured_main): Clear cont_thread each time a GDB connects.
3606
36072014-11-12 Pedro Alves <palves@redhat.com>
3608
3609 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3610 thread, and don't resume all threads if the Hc thread has exited.
3611
36122014-11-12 Pedro Alves <palves@redhat.com>
3613
3614 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3615 the process group instead of to a specific LWP.
3616
36172014-10-15 Pedro Alves <palves@redhat.com>
3618
3619 PR server/17487
3620 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3621 parameter.
3622 (arm_set_thread_context): Delete.
3623 (the_low_target): Adjust.
3624 * win32-i386-low.c (debug_registers_changed)
3625 (debug_registers_used): Delete.
3626 (update_debug_registers_callback): New function.
3627 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3628 needing to update their debug registers.
3629 (win32_get_current_dr): New function.
3630 (x86_dr_low_get_addr, x86_dr_low_get_control)
3631 (x86_dr_low_get_status): Fetch the debug register from the thread
3632 record's context.
3633 (i386_initial_stuff): Adjust.
3634 (i386_get_thread_context): Remove current_event parameter. Don't
3635 clear debug_registers_changed nor copy DR values to
3636 debug_reg_state.
3637 (i386_set_thread_context): Delete.
3638 (i386_prepare_to_resume): New function.
3639 (i386_thread_added): Mark the thread as needing to update irs
3640 debug registers.
3641 (the_low_target): Remove i386_set_thread_context and install
3642 i386_prepare_to_resume.
3643 * win32-low.c (win32_get_thread_context): Adjust.
3644 (win32_set_thread_context): Use SetThreadContext
3645 directly.
3646 (win32_prepare_to_resume): New function.
3647 (win32_require_context): New function, factored out from ...
3648 (thread_rec): ... this.
3649 (continue_one_thread): Call win32_prepare_to_resume on each thread
3650 we're about to continue.
3651 (win32_resume): Call win32_prepare_to_resume on the event thread.
3652 * win32-low.h (struct win32_thread_info)
3653 <debug_registers_changed>: New field.
3654 (struct win32_target_ops): Change prototype of set_thread_context,
3655 delete set_thread_context and add prepare_to_resume.
3656 (win32_require_context): New declaration.
3657
36582014-10-08 Gary Benson <gbenson@redhat.com>
3659
3660 * server.h: Do not include common-exceptions.h.
3661
36622014-10-08 Gary Benson <gbenson@redhat.com>
3663
3664 * server.h: Do not include cleanups.h.
3665
36662014-09-30 James Hogan <james.hogan@imgtec.com>
3667
3668 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3669 mips64-dsp-linux.c.
3670
36712014-09-23 Yao Qi <yao@codesourcery.com>
3672
3673 * linux-low.c (lp_status_maybe_breakpoint): New function.
3674 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3675 (count_events_callback): Likewise.
3676 (select_event_lwp_callback): Likewise.
3677 (cancel_breakpoints_callback): Likewise.
3678
36792014-09-19 Don Breazeal <donb@codesourcery.com>
3680
3681 * linux-low.c (handle_extended_wait): Call
3682 linux_ptrace_get_extended_event.
3683 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3684 linux_is_extended_waitstatus.
3685
36862014-09-16 Joel Brobecker <brobecker@adacore.com>
3687
3688 * Makefile.in (CPPFLAGS): Define.
3689 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3690 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3691
36922014-09-16 Gary Benson <gbenson@redhat.com>
3693
3694 * inferiors.h (current_inferior): Renamed as...
3695 (current_thread): New variable. All uses updated.
3696 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3697 (maybe_move_out_of_jump_pad): Likewise.
3698 (cancel_breakpoint): Likewise.
3699 (linux_low_filter_event): Likewise.
3700 (wait_for_sigstop): Likewise.
3701 (linux_resume_one_lwp): Likewise.
3702 (need_step_over_p): Likewise.
3703 (start_step_over): Likewise.
3704 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3705 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3706 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3707 and save_inferior as saved_thread.
3708 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3709 saved_thread.
3710 (regcache_invalidate_thread): Likewise.
3711 * remote-utils.c (prepare_resume_reply): Likewise.
3712 * thread-db.c (thread_db_get_tls_address): Likewise.
3713 (disable_thread_event_reporting): Likewise.
3714 (remove_thread_event_breakpoints): Likewise.
3715 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3716 as saved_thread.
3717 * target.h (set_desired_inferior): Renamed as...
3718 (set_desired_thread): New declaration. All uses updated.
3719 * server.c (myresume): Updated comment to reference thread instead
3720 of inferior.
3721 (handle_serial_event): Likewise.
3722 (handle_target_event): Likewise.
3723
37242014-09-12 Tom Tromey <tromey@redhat.com>
3725 Gary Benson <gbenson@redhat.com>
3726
3727 * regcache.h: Include common-regcache.h.
3728 (regcache_read_pc): Don't declare.
3729 * regcache.c (get_thread_regcache_for_ptid): New function.
3730
37312014-09-11 Tom Tromey <tromey@redhat.com>
3732 Gary Benson <gbenson@redhat.com>
3733
3734 * symbol.c: New file.
3735 * Makefile.in (SFILES): Add symbol.c.
3736 (OBS): Add symbol.o.
3737
37382014-09-11 Gary Benson <gbenson@redhat.com>
3739
3740 * target.c (target_stop_ptid, target_continue_ptid): New
3741 functions.
3742
37432014-09-11 Tom Tromey <tromey@redhat.com>
3744 Gary Benson <gbenson@redhat.com>
3745
3746 * target.h: Include target/target.h.
3747 * target.c (target_read_memory, target_read_uint32)
3748 (target_write_memory): New functions.
3749
37502014-09-11 Gary Benson <gbenson@redhat.com>
3751
3752 * server.h (debug_hw_points): Don't declare.
3753 * server.c (debug_hw_points): Don't define. Replace all uses
3754 with show_debug_regs.
3755 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3756 all uses with show_debug_regs.
3757
37582014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3759
3760 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3761 endianness into account.
3762 (ppc_supply_ptrace_register): Likewise.
3763
37642014-09-03 James Hogan <james.hogan@imgtec.com>
3765
3766 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3767 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3768
37692014-09-03 Gary Benson <gbenson@redhat.com>
3770
3771 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3772 ALL_DEBUG_ADDRESS_REGISTERS.
3773
37742014-09-02 Gary Benson <gbenson@redhat.com>
3775
3776 * i386-low.h: Renamed as...
3777 * x86-low.h: New file. All type, function and variable name
3778 prefixes changed from "i386_" to "x86_". All references updated.
3779 * i386-low.c: Renamed as...
3780 * x86-low.c: New file. All type, function and variable name
3781 prefixes changed from "i386_" to "x86_". All references updated.
3782
37832014-09-02 Gary Benson <gbenson@redhat.com>
3784
3785 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3786 (x86_linux_new_thread): Likewise.
3787
37882014-08-29 Gary Benson <gbenson@redhat.com>
3789
3790 * server.h (setjmp.h): Do not include.
3791 (toplevel): Do not declare.
3792 (common-exceptions.h): Include.
3793 (cleanups.h): Likewise.
3794 * server.c (toplevel): Do not define.
3795 (exit_code): New static global.
3796 (detach_or_kill_for_exit_cleanup): New function.
3797 (main): New function. Original main renamed to...
3798 (captured_main): New function.
3799 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3800
38012014-08-29 Gary Benson <gbenson@redhat.com>
3802
3803 * Makefile.in (SFILES): Add common/common-exceptions.c.
3804 (OBS): Add common-exceptions.o.
3805 (common-exceptions.o): New rule.
3806 * utils.c (prepare_to_throw_exception): New function.
3807
38082014-08-29 Gary Benson <gbenson@redhat.com>
3809
3810 * config.in: Regenerate.
3811 * configure: Likewise.
3812
38132014-08-29 Gary Benson <gbenson@redhat.com>
3814
3815 * Makefile.in (SFILES): Add common/cleanups.c.
3816 (OBS): cleanups.o.
3817 (cleanups.o): New rule.
3818
38192014-08-29 Gary Benson <gbenson@redhat.com>
3820
3821 * utils.c (internal_vwarning): New function.
3822
38232014-08-28 Gary Benson <gbenson@redhat.com>
3824
3825 * utils.h (fatal): Remove declaration.
3826 * utils.c (fatal): Remove function.
3827
38282014-08-28 Gary Benson <gbenson@redhat.com>
3829
3830 * tracepoint.c (gdb_agent_init): Replace fatal with
3831 perror_with_name.
3832 (initialize_tracepoint): Likewise.
3833
38342014-08-28 Gary Benson <gbenson@redhat.com>
3835
3836 * remote-utils.c (remote_prepare): Replace fatal with error.
3837
38382014-08-28 Gary Benson <gbenson@redhat.com>
3839
3840 * linux-low.c (linux_async): Replace fatal with warning.
3841 Tidy up and return.
3842 (linux_start_non_stop): Return -1 if linux_async failed.
3843
38442014-08-28 Gary Benson <gbenson@redhat.com>
3845
3846 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3847 gdb_assert.
3848 (i386_dr_low_get_addr): Remove vague comment.
3849 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3850 gdb_assert.
3851
38522014-08-28 Gary Benson <gbenson@redhat.com>
3853
3854 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3855 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3856 internal_error.
3857 (linux_resume_one_lwp): Likewise.
3858 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3859 gdb_assert.
3860 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3861 with internal_error.
3862 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3863 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3864 (find_register_by_name): Replace fatal with internal_error.
3865 (find_regno): Likewise.
3866 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3867 * thread-db.c (thread_db_create_event): Likewise.
3868 (thread_db_load_search): Likewise.
3869 (try_thread_db_load_1): Likewise.
3870 * tracepoint.c (get_jump_space_head): Replace fatal with
3871 internal_error.
3872 (claim_trampoline_space): Likewise.
3873 (have_fast_tracepoint_trampoline_buffer): Likewise.
3874 (cmd_qtstart): Likewise.
3875 (stop_tracing): Likewise.
3876 (fast_tracepoint_collecting): Likewise.
3877 (target_malloc): Likewise.
3878 (download_tracepoint): Likewise.
3879 (download_trace_state_variables): Replace check with gdb_assert.
3880 (upload_fast_traceframes): Replace fatal with internal_error.
3881
38822014-08-19 Tom Tromey <tromey@redhat.com>
3883 Gary Benson <gbenson@redhat.com>
3884
3885 * Makefile.in (SFILES): Add common/common-debug.c.
3886 (OBS): Add common-debug.o.
3887 (common-debug.o): New rule.
3888 * debug.h (debug_printf): Don't declare.
3889 * debug.c (debug_printf): Renamed and rewritten as...
3890 (debug_vprintf): New function.
3891
38922014-08-19 Gary Benson <gbenson@redhat.com>
3893
3894 * utils.h: Do not include print-utils.h.
3895
38962014-08-19 Tom Tromey <tromey@redhat.com>
3897 Gary Benson <gbenson@redhat.com>
3898
3899 * server.h: Add static assertion.
3900 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3901
39022014-08-19 Tom Tromey <tromey@redhat.com>
3903 Gary Benson <gbenson@redhat.com>
3904
3905 * Makefile.in (SFILES): Add common/errors.c.
3906 (OBS): Add errors.o.
3907 (IPA_OBS): Add errors-ipa.o.
3908 (errors.o): New rule.
3909 (errors-ipa.o): Likewise.
3910 * utils.h (perror_with_name, error, warning): Don't declare.
3911 * utils.c (warning): Renamed and rewritten as...
3912 (vwarning): New function.
3913 (error): Renamed and rewritten as...
3914 (verror): New function.
3915 (internal_error): Renamed and rewritten as...
3916 (internal_verror): New function.
3917
39182014-08-07 Gary Benson <gbenson@redhat.com>
3919
3920 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3921 * configure: Regenerate.
3922 * config.in: Likewise.
3923 * server.h: Do not include errno.h.
3924 * event-loop.c: Likewise.
3925 * hostio-errno.c: Likewise.
3926 * linux-low.c: Likewise.
3927 * remote-utils.c: Likewise.
3928 * spu-low.c: Likewise.
3929 * utils.c: Likewise.
3930 * gdbreplay.c: Unconditionally include errno.h.
3931
39322014-08-07 Gary Benson <gbenson@redhat.com>
3933
3934 * server.h: Do not include string.h.
3935 * event-loop.c: Likewise.
3936 * linux-low.c: Likewise.
3937 * regcache.c: Likewise.
3938 * remote-utils.c: Likewise.
3939 * spu-low.c: Likewise.
3940 * utils.c: Likewise.
3941
39422014-08-07 Gary Benson <gbenson@redhat.com>
3943
3944 * server.h: Do not include gdb_assert.h.
3945
39462014-08-07 Gary Benson <gbenson@redhat.com>
3947
3948 * server.h: Do not include common-utils.h.
3949
39502014-08-07 Gary Benson <gbenson@redhat.com>
3951
3952 * server.h: Do not include ptid.h.
3953 * notif.h: Likewise.
3954
39552014-08-07 Gary Benson <gbenson@redhat.com>
3956
3957 * server.h: Do not include gdb_locale.h.
3958
39592014-08-07 Gary Benson <gbenson@redhat.com>
3960
3961 * server.h: Do not include gdb/signals.h.
3962 * win32-low.c: Likewise.
3963
39642014-08-07 Gary Benson <gbenson@redhat.com>
3965
3966 * server.h: Do not include pathmax.h.
3967
39682014-08-07 Gary Benson <gbenson@redhat.com>
3969
3970 * server.h: Do not include libiberty.h.
3971 * linux-bfin-low.c: Likewise.
3972
39732014-08-07 Gary Benson <gbenson@redhat.com>
3974
3975 * server.h: Do not include ansidecl.h.
3976
39772014-08-07 Gary Benson <gbenson@redhat.com>
3978
3979 * linux-x86-low.c: Do not include stddef.h.
3980 * lynx-ppc-low.c: Likewise.
3981 * tracepoint.c: Likewise.
3982
39832014-08-07 Gary Benson <gbenson@redhat.com>
3984
3985 * server.h: Do not include stdarg.h.
3986 * nto-low.c: Likewise.
3987
39882014-08-07 Gary Benson <gbenson@redhat.com>
3989
3990 * server.h: Do not include stdlib.h.
3991 * inferiors.c: Likewise.
3992 * linux-low.c: Likewise.
3993 * regcache.c: Likewise.
3994 * spu-low.c: Likewise.
3995 * tracepoint.c: Likewise.
3996 * utils.c: Likewise.
3997
39982014-08-07 Gary Benson <gbenson@redhat.com>
3999
4000 * server.h: Do not include stdio.h.
4001 * linux-low.c: Likewise.
4002 * remote-utils.c: Likewise.
4003 * spu-low.c: Likewise.
4004 * utils.c: Likewise.
4005 * wincecompat.c: Likewise.
4006
40072014-08-06 Gary Benson <gbenson@redhat.com>
4008
4009 * regcache.c (init_register_cache): Move conditionals inside if.
4010
40112014-08-06 Gary Benson <gbenson@redhat.com>
4012
4013 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4014
40152014-07-31 Gary Benson <gbenson@redhat.com>
4016
4017 * ax.h: Do not include server.h.
4018 * gdbthread.h: Likewise.
4019 * lynx-low.h: Likewise.
4020 * notif.h: Likewise.
4021
40222014-07-30 Gary Benson <gbenson@redhat.com>
4023
4024 * server.h: Include common-defs.h.
4025 Do not include config.h or build-gnulib-gdbserver/config.h.
4026
40272014-07-30 Gary Benson <gbenson@redhat.com>
4028
4029 * hostio-errno.c: Move server.h to top of includes list.
4030 * inferiors.c: Likewise.
4031 * linux-x86-low.c: Likewise.
4032 * notif.c: Include server.h.
4033
40342014-07-24 Tom Tromey <tromey@redhat.com>
4035 Gary Benson <gbenson@redhat.com>
4036
4037 * server.h (CORE_ADDR): Now unsigned.
4038
40392014-07-16 Pedro Alves <palves@redhat.com>
4040
4041 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4042
40432014-07-15 Pedro Alves <palves@redhat.com>
4044
4045 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4046 copy.
4047
40482014-07-11 Pedro Alves <palves@redhat.com>
4049
4050 * linux-low.c (kill_wait_lwp): New function, based on
4051 kill_one_lwp_callback, but use my_waitpid directly.
4052 (kill_one_lwp_callback, linux_kill): Use it.
4053
40542014-06-23 Pedro Alves <palves@redhat.com>
4055
4056 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4057 before setting DR0..DR3.
4058
40592014-06-20 Gary Benson <gbenson@redhat.com>
4060
4061 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4062 * configure: Regenerated.
4063 * config.in: Likewise.
4064
40652014-06-20 Gary Benson <gbenson@redhat.com>
4066
4067 * Makefile.in (SFILES): Update locations for files moved
4068 from common to nat.
4069 (object file files): Reordered.
4070
40712014-06-20 Gary Benson <gbenson@redhat.com>
4072
4073 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4074 (i386_dr_low_set_addr): Likewise.
4075 (i386_dr_low_get_addr): Likewise.
4076 (i386_dr_low_can_set_control): Likewise.
4077 (i386_dr_low_set_control): Likewise.
4078 (i386_dr_low_get_control): Likewise.
4079 (i386_dr_low_get_status): Likewise.
4080 (i386_get_debug_register_length): Likewise.
4081 * linux-x86-low.c (i386_dr_low_set_addr):
4082 Changed signature. Made static.
4083 (i386_dr_low_get_addr): Likewise.
4084 (i386_dr_low_set_control): Likewise.
4085 (i386_dr_low_get_control): Likewise.
4086 (i386_dr_low_get_status): Likewise.
4087 (i386_dr_low): New global variable.
4088 * win32-i386-low.c (i386_dr_low_set_addr):
4089 Changed signature. Made static.
4090 (i386_dr_low_get_addr): Likewise.
4091 (i386_dr_low_set_control): Likewise.
4092 (i386_dr_low_get_control): Likewise.
4093 (i386_dr_low_get_status): Likewise.
4094 (i386_dr_low): New global variable.
4095
40962014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4097
4098 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4099 * Makefile.in (AR, AR_FLAGS): Define.
4100 * configure: Regenerate.
4101
41022014-06-19 Gary Benson <gbenson@redhat.com>
4103
4104 * Makefile.in (i386-dregs.o): New rule.
4105 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4106 * i386-low.c (target.h): Remove include.
4107 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4108 (DR_CONTROL_SHIFT): Likewise.
4109 (DR_CONTROL_SIZE): Likewise.
4110 (DR_RW_EXECUTE): Likewise.
4111 (DR_RW_WRITE): Likewise.
4112 (DR_RW_READ): Likewise.
4113 (DR_RW_IORW): Likewise.
4114 (DR_LEN_1): Likewise.
4115 (DR_LEN_2): Likewise.
4116 (DR_LEN_4): Likewise.
4117 (DR_LEN_8): Likewise.
4118 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4119 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4120 (DR_ENABLE_SIZE): Likewise.
4121 (DR_LOCAL_SLOWDOWN): Likewise.
4122 (DR_GLOBAL_SLOWDOWN): Likewise.
4123 (DR_CONTROL_RESERVED): Likewise.
4124 (I386_DR_CONTROL_MASK): Likewise.
4125 (I386_DR_VACANT): Likewise.
4126 (I386_DR_LOCAL_ENABLE): Likewise.
4127 (I386_DR_GLOBAL_ENABLE): Likewise.
4128 (I386_DR_DISABLE): Likewise.
4129 (I386_DR_SET_RW_LEN): Likewise.
4130 (I386_DR_GET_RW_LEN): Likewise.
4131 (I386_DR_WATCH_HIT): Likewise.
4132 (i386_wp_op_t): Likewise.
4133 (i386_show_dr): Likewise.
4134 (i386_length_and_rw_bits): Likewise.
4135 (i386_insert_aligned_watchpoint): Likewise.
4136 (i386_remove_aligned_watchpoint): Likewise.
4137 (i386_handle_nonaligned_watchpoint): Likewise.
4138 i386_update_inferior_debug_regs(): Likewise.
4139 (i386_dr_insert_watchpoint): Likewise.
4140 (i386_dr_remove_watchpoint): Likewise.
4141 (i386_dr_region_ok_for_watchpoint): Likewise.
4142 (i386_dr_stopped_data_address): Likewise.
4143 (i386_dr_stopped_by_watchpoint): Likewise.
4144
41452014-06-19 Gary Benson <gbenson@redhat.com>
4146
4147 * i386-low.c (i386_dr_show): Renamed to
4148 i386_show_dr and made static. All uses updated.
4149 (i386_dr_length_and_rw_bits): Renamed to
4150 i386_length_and_rw_bits and made static.
4151 All uses updated.
4152 (i386_dr_insert_aligned_watchpoint): Renamed to
4153 i386_insert_aligned_watchpoint and made static.
4154 All uses updated.
4155 (i386_dr_remove_aligned_watchpoint): Renamed to
4156 i386_remove_aligned_watchpoint and made static.
4157 All uses updated.
4158 (i386_dr_update_inferior_debug_regs): Renamed to
4159 i386_update_inferior_debug_regs and made static.
4160 All uses updated.
4161
41622014-06-18 Gary Benson <gbenson@redhat.com>
4163
4164 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4165 (i386_dr_low_can_set_control): Likewise.
4166 (i386_get_debug_register_length): Likewise.
4167 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4168 (i386_dr_low_can_set_control): Likewise.
4169 (i386_get_debug_register_length): Likewise.
4170
41712014-06-17 Gary Benson <gbenson@redhat.com>
4172
4173 * i386-low.h (i386-dregs.h): New include.
4174 (DR_FIRSTADDR): Now in i386-dregs.h.
4175 (DR_LASTADDR): Likewise.
4176 (DR_NADDR): Likewise.
4177 (DR_STATUS): Likewise.
4178 (DR_CONTROL): Likewise.
4179 (i386_debug_reg_state): Likewise.
4180 (i386_dr_insert_watchpoint): Likewise.
4181 (i386_dr_remove_watchpoint): Likewise.
4182 (i386_dr_region_ok_for_watchpoint): Likewise.
4183 (i386_dr_stopped_data_address): Likewise.
4184 (i386_dr_stopped_by_watchpoint): Likewise.
4185 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4186
41872014-06-18 Gary Benson <gbenson@redhat.com>
4188
4189 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4190 i386_dr_insert_watchpoint.
4191 (i386_low_remove_watchpoint): Renamed to
4192 i386_dr_remove_watchpoint.
4193 (i386_low_region_ok_for_watchpoint): Renamed to
4194 i386_dr_region_ok_for_watchpoint.
4195 (i386_low_stopped_data_address): Renamed to
4196 i386_dr_stopped_data_address.
4197 (i386_low_stopped_by_watchpoint): Renamed to
4198 i386_dr_stopped_by_watchpoint.
4199 * i386-low.c (i386_show_dr): Renamed to
4200 i386_dr_show and made nonstatic. All uses updated.
4201 (i386_length_and_rw_bits): Renamed to
4202 i386_dr_length_and_rw_bits and made nonstatic.
4203 All uses updated.
4204 (i386_insert_aligned_watchpoint): Renamed to
4205 i386_dr_insert_aligned_watchpoint and made nonstatic.
4206 All uses updated.
4207 (i386_remove_aligned_watchpoint): Renamed to
4208 i386_dr_remove_aligned_watchpoint and made nonstatic.
4209 All uses updated.
4210 (i386_update_inferior_debug_regs): Renamed to
4211 i386_dr_update_inferior_debug_regs and made nonstatic.
4212 All uses updated.
4213 (i386_low_insert_watchpoint): Renamed to
4214 i386_dr_insert_watchpoint. All uses updated.
4215 (i386_low_remove_watchpoint): Renamed to
4216 i386_dr_remove_watchpoint. All uses updated.
4217 (i386_low_region_ok_for_watchpoint): Renamed to
4218 i386_dr_region_ok_for_watchpoint. All uses updated.
4219 (i386_low_stopped_data_address): Renamed to
4220 i386_dr_stopped_data_address. All uses updated.
4221 (i386_low_stopped_by_watchpoint): Renamed to
4222 i386_dr_stopped_by_watchpoint. All uses updated.
4223
42242014-06-18 Gary Benson <gbenson@redhat.com>
4225
4226 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4227 (i386_dr_low_can_set_control): Likewise.
4228 (i386_insert_aligned_watchpoint): New check.
4229
42302014-06-18 Gary Benson <gbenson@redhat.com>
4231
4232 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4233 Renamed to state.
4234
42352014-06-18 Gary Benson <gbenson@redhat.com>
4236
4237 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4238 instead of fatal and error.
4239 (i386_handle_nonaligned_watchpoint): Likewise.
4240
42412014-06-18 Gary Benson <gbenson@redhat.com>
4242
4243 * i386-low.c (i386_get_debug_register_length): New macro.
4244 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4245 (i386_show_dr): Use debug_printf instead of fprintf. Use
4246 phex to format values.
4247
42482014-06-18 Gary Benson <gbenson@redhat.com>
4249
4250 * i386-low.h: Comment changes.
4251 * i386-low.c: Likewise.
4252
42532014-06-18 Gary Benson <gbenson@redhat.com>
4254
4255 * i386-low.c: Whitespace changes.
4256
42572014-06-12 Tom Tromey <tromey@redhat.com>
4258
4259 * utils.c (freeargv): Remove.
4260
42612014-06-12 Tom Tromey <tromey@redhat.com>
4262
4263 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4264 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4265 (parse_debug_format_options): Likewise.
4266 (gdbserver_usage): Likewise.
4267 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4268 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4269 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4270 against libiberty.
4271 ($(LIBGNU)): Depend on libiberty.
4272 (all-lib): Recurse into all subdirs.
4273 (install-only): Invoke "install" target in subdirs.
4274 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4275 targets.
4276 * configure: Rebuild.
4277 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4278 for vasprintf, vsnprintf, or gettimeofday.
4279 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4280 srv_tgtobj.
4281
42822014-06-05 Joel Brobecker <brobecker@adacore.com>
4283
4284 * development.sh: Delete.
4285 * Makefile.in (config.status): Adjust dependency on development.sh.
4286 * configure.ac: Adjust development.sh source call.
4287 * configure: Regenerate.
4288
42892014-06-02 Pedro Alves <palves@redhat.com>
4290
4291 * ax.c (gdb_free_agent_expr): New function.
4292 * ax.h (gdb_free_agent_expr): New declaration.
4293 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4294 list.
4295 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4296 static.
4297 (clear_breakpoint_conditions_and_commands): New function.
4298 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4299 (clear_breakpoint_conditions_and_commands): New declaration.
4300
43012014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4302
4303 * linux-aarch64-low.c (asm/ptrace.h): Include.
4304
43052014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4306
4307 Fix TLS access for -static -pthread.
4308 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4309 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4310 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4311
43122014-05-20 Pedro Alves <palves@redhat.com>
4313
4314 * linux-aarch64-low.c (aarch64_insert_point)
4315 (aarch64_remove_point): No longer check whether the type is
4316 supported here. Adjust to new interface.
4317 (the_low_target): Install aarch64_supports_z_point_type as
4318 supports_z_point_type method.
4319 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4320 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4321 instead of a Z packet char. Adjust.
4322 (arm_supports_z_point_type): New function.
4323 (arm_insert_point, arm_remove_point): Adjust to new interface.
4324 (the_low_target): Install arm_supports_z_point_type.
4325 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4326 (cris_insert_point, cris_remove_point): Adjust to new interface.
4327 Don't check whether the type is supported here.
4328 (the_low_target): Install cris_supports_z_point_type.
4329 * linux-low.c (linux_supports_z_point_type): New function.
4330 (linux_insert_point, linux_remove_point): Adjust to new interface.
4331 * linux-low.h (struct linux_target_ops) <insert_point,
4332 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4333 raw_breakpoint pointer parameter.
4334 <supports_z_point_type>: New method.
4335 * linux-mips-low.c (mips_supports_z_point_type): New function.
4336 (mips_insert_point, mips_remove_point): Adjust to new interface.
4337 Use mips_supports_z_point_type.
4338 (the_low_target): Install mips_supports_z_point_type.
4339 * linux-ppc-low.c (the_low_target): Install NULL as
4340 supports_z_point_type method.
4341 * linux-s390-low.c (the_low_target): Install NULL as
4342 supports_z_point_type method.
4343 * linux-sparc-low.c (the_low_target): Install NULL as
4344 supports_z_point_type method.
4345 * linux-x86-low.c (x86_supports_z_point_type): New function.
4346 (x86_insert_point): Adjust to new insert_point interface. Use
4347 insert_memory_breakpoint. Adjust to new
4348 i386_low_insert_watchpoint interface.
4349 (x86_remove_point): Adjust to remove_point interface. Use
4350 remove_memory_breakpoint. Adjust to new
4351 i386_low_remove_watchpoint interface.
4352 (the_low_target): Install x86_supports_z_point_type.
4353 * lynx-low.c (lynx_target_ops): Install NULL as
4354 supports_z_point_type callback.
4355 * nto-low.c (nto_supports_z_point_type): New.
4356 (nto_insert_point, nto_remove_point): Adjust to new interface.
4357 (nto_target_ops): Install nto_supports_z_point_type.
4358 * mem-break.c: Adjust intro comment.
4359 (struct raw_breakpoint) <raw_type, size>: New fields.
4360 <inserted>: Update comment.
4361 <shlib_disabled>: Delete field.
4362 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4363 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4364 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4365 (raw_bkpt_type_to_target_hw_bp_type): New function.
4366 (find_enabled_raw_code_breakpoint_at): New function.
4367 (find_raw_breakpoint_at): New type and size parameters. Use them.
4368 (insert_memory_breakpoint): New function, based off
4369 set_raw_breakpoint_at.
4370 (remove_memory_breakpoint): New function.
4371 (set_raw_breakpoint_at): Reimplement.
4372 (set_breakpoint): New, based on set_breakpoint_at.
4373 (set_breakpoint_at): Reimplement.
4374 (delete_raw_breakpoint): Go through the_target->remove_point
4375 instead of assuming memory breakpoints.
4376 (find_gdb_breakpoint_at): Delete.
4377 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4378 (find_gdb_breakpoint): New function.
4379 (set_gdb_breakpoint_at): Delete.
4380 (z_type_supported): New function.
4381 (set_gdb_breakpoint_1): New function, loosely based off
4382 set_gdb_breakpoint_at.
4383 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4384 (delete_gdb_breakpoint_at): Delete.
4385 (delete_gdb_breakpoint_1): New function, loosely based off
4386 delete_gdb_breakpoint_at.
4387 (delete_gdb_breakpoint): New function.
4388 (clear_gdb_breakpoint_conditions): Rename to ...
4389 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4390 breakpoint.
4391 (add_condition_to_breakpoint): Make static.
4392 (add_breakpoint_condition): Take a struct breakpoint pointer
4393 instead of an address. Adjust.
4394 (gdb_condition_true_at_breakpoint): Rename to ...
4395 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4396 z_type parameter.
4397 (gdb_condition_true_at_breakpoint): Reimplement.
4398 (add_breakpoint_commands): Take a struct breakpoint pointer
4399 instead of an address. Adjust.
4400 (gdb_no_commands_at_breakpoint): Rename to ...
4401 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4402 parameter. Return true if no breakpoint was found. Change debug
4403 output.
4404 (gdb_no_commands_at_breakpoint): Reimplement.
4405 (run_breakpoint_commands): Rename to ...
4406 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4407 and change return type to boolean.
4408 (run_breakpoint_commands): New function.
4409 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4410 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4411 breakpoint. Go through the_target->remove_point instead of
4412 assuming memory breakpoint.
4413 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4414 software and hardware breakpoints.
4415 (reinsert_raw_breakpoint): Go through the_target->insert_point
4416 instead of assuming memory breakpoint.
4417 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4418 software and hardware breakpoints.
4419 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4420 Check both software and hardware breakpoints.
4421 (validate_inserted_breakpoint): Assert the breakpoint is a
4422 software breakpoint. Set the inserted flag to -1 instead of
4423 setting shlib_disabled.
4424 (delete_disabled_breakpoints): Adjust.
4425 (validate_breakpoints): Only validate software breakpoints.
4426 Adjust to inserted flag change.
4427 (check_mem_read, check_mem_write): Skip breakpoint types other
4428 than software breakpoints. Adjust to inserted flag change.
4429 * mem-break.h (enum raw_bkpt_type): New enum.
4430 (raw_breakpoint, struct process_info): Forward declare.
4431 (Z_packet_to_target_hw_bp_type): Delete declaration.
4432 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4433 (set_gdb_breakpoint, delete_gdb_breakpoint)
4434 (clear_breakpoint_conditions): New declarations.
4435 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4436 (breakpoint_inserted_here): Update comment.
4437 (add_breakpoint_condition, add_breakpoint_commands): Replace
4438 address parameter with a breakpoint pointer parameter.
4439 (gdb_breakpoint_here): Update comment.
4440 (delete_gdb_breakpoint_at): Delete.
4441 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4442 * server.c (process_point_options): Take a struct breakpoint
4443 pointer instead of an address. Adjust.
4444 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4445 delete_gdb_breakpoint.
4446 * spu-low.c (spu_target_ops): Install NULL as
4447 supports_z_point_type method.
4448 * target.h: Include mem-break.h.
4449 (struct target_ops) <prepare_to_access_memory>: Update comment.
4450 <supports_z_point_type>: New field.
4451 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4452 instead of a char. Also take a raw breakpoint pointer.
4453 * win32-arm-low.c (the_low_target): Install NULL as
4454 supports_z_point_type.
4455 * win32-i386-low.c (i386_supports_z_point_type): New function.
4456 (i386_insert_point, i386_remove_point): Adjust to new interface.
4457 (the_low_target): Install i386_supports_z_point_type.
4458 * win32-low.c (win32_supports_z_point_type): New function.
4459 (win32_insert_point, win32_remove_point): Adjust to new interface.
4460 (win32_target_ops): Install win32_supports_z_point_type.
4461 * win32-low.h (struct win32_target_ops):
4462 <supports_z_point_type>: New method.
4463 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4464 instead of a char. Also take a raw breakpoint pointer.
4465
44662014-05-20 Pedro Alves <palves@redhat.com>
4467
4468 * mem-break.h: Include break-common.h.
4469 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4470 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4471 (Z_packet_to_target_hw_bp_type): New declaration.
4472 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4473 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4474 (Z_PACKET_ACCESS_WP): Delete macros.
4475 (Z_packet_to_hw_type): Delete function.
4476 * i386-low.h: Don't include break-common.h here.
4477 (Z_packet_to_hw_type): Delete declaration.
4478 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4479 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4480 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4481 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4482 * linux-aarch64-low.c: Don't include break-common.h here.
4483 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4484 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4485 (Z_packet_to_target_hw_bp_type): Delete function.
4486 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4487 function.
4488 (mips_insert_point, mips_remove_point): Use
4489 Z_packet_to_target_hw_bp_type.
4490
44912014-05-20 Pedro Alves <palves@redhat.com>
4492
4493 * linux-aarch64-low.c: Include break-common.h.
4494 (enum target_point_type): Delete.
4495 (Z_packet_to_point_type): Rename to ...
4496 (Z_packet_to_target_hw_bp_type): ... this, and return a
4497 target_hw_bp_type instead.
4498 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4499 instead of an enum target_point_type.
4500 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4501 breakpoint type.
4502 (aarch64_dr_state_insert_one_point)
4503 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4504 (aarch64_handle_aligned_watchpoint)
4505 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4506 Take an enum target_hw_bp_type instead of an enum
4507 target_point_type.
4508 (aarch64_supports_z_point_type): New function.
4509 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4510 use Z_packet_to_target_hw_bp_type.
4511
45122014-05-20 Joel Brobecker <brobecker@adacore.com>
4513
4514 * configure.ac: Only use -Werror by default when DEVELOPMENT
4515 is true.
4516 * configure: Regenerate.
4517
45182014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4519
4520 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4521 * linux-x86-low.c (X86_64_USER_REGS): New.
4522 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4523
45242014-04-28 Yao Qi <yao@codesourcery.com>
4525
4526 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4527 name.
4528
45292014-04-25 Pedro Alves <palves@redhat.com>
4530
4531 PR server/16255
4532 * linux-low.c (linux_attach_fail_reason_string): New function.
4533 (linux_attach_lwp): Delete.
4534 (linux_attach_lwp_1): Rename to ...
4535 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4536 argument. Remove "initial" parameter. Return int instead of
4537 void. Don't error or warn here.
4538 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4539 failure to attach to the tgid. Call warning when failing to
4540 attach to an lwp.
4541 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4542 argument. Remove "initial" parameter. Return int instead of
4543 void. Don't error or warn here.
4544 (linux_attach_fail_reason_string): New declaration.
4545 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4546 interface change. Use linux_attach_fail_reason_string.
4547
45482014-04-24 Michael Sturm <michael.sturm@mintel.com>
4549 Walfred Tedeschi <walfred.tedeschi@intel.com>
4550
4551 * Makefile.in: Added rules to handle new files
4552 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4553 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4554 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4555 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4556 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4557 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4558 x32-avx512-linux.o.
4559 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4560 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4561 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4562 i386/x32-avx512.xml.
4563 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4564 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4565 i386/x32-avx512-linux.xml.
4566 * i387-fp.c (num_avx512_k_registers): New constant for number
4567 of K registers.
4568 (num_avx512_zmmh_low_registers): New constant for number of
4569 lower ZMM registers (0-15).
4570 (num_avx512_zmmh_high_registers): New constant for number of
4571 higher ZMM registers (16-31).
4572 (num_avx512_ymmh_registers): New contant for number of higher
4573 YMM registers (ymm16-31 added by avx521 on x86_64).
4574 (num_avx512_xmm_registers): New constant for number of higher
4575 XMM registers (xmm16-31 added by AVX512 on x86_64).
4576 (struct i387_xsave): Add space for AVX512 registers.
4577 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4578 Add code to handle AVX512 registers.
4579 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4580 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4581 prototypei from generated file.
4582 (tdesc_amd64_avx512_linux): Likewise.
4583 (init_registers_x32_avx512_linux): Likewise.
4584 (tdesc_x32_avx512_linux): Likewise.
4585 (init_registers_i386_avx512_linux): Likewise.
4586 (tdesc_i386_avx512_linux): Likewise.
4587 (x86_64_regmap): Add AVX512 registers.
4588 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4589 mask.
4590 (initialize_low_arch): Add code to initialize AVX512 registers.
4591
45922014-04-23 Pedro Alves <palves@redhat.com>
4593
4594 * mem-break.c (find_gdb_breakpoint_at): Make static.
4595 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4596
45972014-04-23 Pedro Alves <palves@redhat.com>
4598
4599 * i386-low.c: Don't include break-common.h here.
4600 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4601 prototype to take target_hw_bp_type as argument instead of a Z
4602 packet char.
4603 * i386-low.h: Include break-common.h here.
4604 (Z_packet_to_hw_type): Declare.
4605 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4606 prototypes.
4607 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4608 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4609 (x86_remove_point): Convert the packet number to a
4610 target_hw_bp_type before calling i386_low_remove_watchpoint.
4611 * win32-i386-low.c (i386_insert_point): Convert the packet number
4612 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4613 (i386_remove_point): Convert the packet number to a
4614 target_hw_bp_type before calling i386_low_remove_watchpoint.
4615
46162014-04-23 Pedro Alves <palves@redhat.com>
4617
4618 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4619
46202014-04-10 Pedro Alves <palves@redhat.com>
4621
4622 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4623 Check if the condition or command is NULL before checking if the
4624 breakpoint is known. On success, return true.
4625 * mem-break.h (add_breakpoint_condition): Document return.
4626 (add_breakpoint_commands): Add describing comment.
4627 * server.c (skip_to_semicolon): New function.
4628 (process_point_options): Use it.
4629
46302014-04-09 Pedro Alves <palves@redhat.com>
4631
4632 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4633 to lwpid_of.
4634
46352014-02-27 Pedro Alves <palves@redhat.com>
4636
4637 PR 12702
4638 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4639 macros.
4640 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4641 output.
4642 (last_thread_of_process_p): Take a PID argument instead of a
4643 thread pointer.
4644 (linux_wait_for_lwp): Delete.
4645 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4646 functions.
4647 (linux_low_filter_event): New function, party factored out from
4648 linux_wait_for_event.
4649 (linux_wait_for_event): Rename to ...
4650 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4651 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4652 sigsuspend. Check for zombie leaders.
4653 (linux_wait_for_event): Reimplement as wrapper around
4654 linux_wait_for_event_filtered.
4655 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4656 a normal or signal exit is seen, it's the whole process exiting.
4657 (wait_for_sigstop): No longer a for_each_inferior callback.
4658 Rewrite on top of linux_wait_for_event_filtered.
4659 (stop_all_lwps): Call wait_for_sigstop directly.
4660 * server.c (resume, handle_target_event): Handle
4661 TARGET_WAITKIND_NO_RESUMED.
4662
46632014-02-26 Joel Brobecker <brobecker@adacore.com>
4664
4665 * win32-low.c (psapi_get_dll_name,
4666 * win32_CreateToolhelp32Snapshot): Delete.
4667 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4668 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4669 Delete.
4670 (handle_load_dll): Add function description.
4671 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4672
46732014-02-26 Joel Brobecker <brobecker@adacore.com>
4674
4675 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4676 Add comment.
4677 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4678 base address when calling win32_add_one_solib.
4679 (handle_load_dll): Delete local variable load_addr.
4680 Remove 0x1000 offset applied to DLL base address when calling
4681 win32_add_one_solib.
4682 (handle_unload_dll): Add comment.
4683
46842014-02-26 Joel Brobecker <brobecker@adacore.com>
4685
4686 * win32-low.c (win32_add_all_dlls): Renames
4687 win32_ensure_ntdll_loaded. Rewrite function documentation.
4688 Adjust implementation to always load all DLLs.
4689 Add 0x1000 offset to DLL base address when calling
4690 win32_add_one_solib.
4691 (child_initialization_done): New static global.
4692 (do_initial_child_stuff): Set child_initialization_done to
4693 zero during child initialization, and 1 after. Replace call
4694 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4695 Add comment.
4696 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4697 (handle_unload_dll): Add function documentation.
4698 (get_child_debug_event): Ignore load and unload DLL events
4699 during child initialization.
4700
47012014-02-20 Doug Evans <dje@google.com>
4702
4703 Remove global all_lwps.
4704 * inferiors.h (ptid_of): Move here from linux-low.h.
4705 (pid_of, lwpid_of): Ditto.
4706 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4707 parameter is a struct thread_info * now.
4708 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4709 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4710 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4711 directly.
4712 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4713 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4714 * linux-arm-low.c (update_registers_callback): Update, "entry"
4715 parameter is a struct thread_info * now.
4716 Fetch lwpid from current_inferior directly.
4717 (arm_insert_point): Pass &all_threads to find_inferior instead of
4718 &all_lwps.
4719 (arm_remove_point): Ditto.
4720 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4721 (arm_prepare_to_resume): Fetch pid from thread.
4722 (arm_read_description): Fetch lwpid from current_inferior directly.
4723 * linux-low.c (all_lwps): Delete.
4724 (delete_lwp): Delete call to remove_inferior.
4725 (handle_extended_wait): Fetch lwpid from thread.
4726 (add_lwp): Don't set lwp->entry.id. Remove call to
4727 add_inferior_to_list.
4728 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4729 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4730 (kill_one_lwp_callback): Ditto.
4731 (linux_kill): Don't dereference NULL pointer.
4732 Fetch ptid,lwpid from thread.
4733 (get_detach_signal): Fetch ptid from thread.
4734 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4735 Simplify call to regcache_invalidate_thread.
4736 (delete_lwp_callback): Update, "entry" parameter is a
4737 struct thread_info * now. Fetch pid from thread.
4738 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4739 (status_pending_p_callback): Update, "entry" parameter is a
4740 struct thread_info * now. Fetch ptid from thread.
4741 (find_lwp_pid): Update, "entry" parameter is a
4742 struct thread_info * now.
4743 (linux_wait_for_lwp): Fetch pid from thread.
4744 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4745 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4746 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4747 (dequeue_one_deferred_signal): Ditto.
4748 (cancel_breakpoint): Fetch ptid from current_inferior.
4749 (linux_wait_for_event): Pass &all_threads to find_inferior,
4750 not &all_lwps. Fetch ptid, lwpid from thread.
4751 (count_events_callback): Update, "entry" parameter is a
4752 struct thread_info * now.
4753 (select_singlestep_lwp_callback): Ditto.
4754 (select_event_lwp_callback): Ditto.
4755 (cancel_breakpoints_callback): Ditto.
4756 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4757 not &all_lwps.
4758 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4759 (unsuspend_one_lwp): Update, "entry" parameter is a
4760 struct thread_info * now.
4761 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4762 not &all_lwps.
4763 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4764 Fetch lwpid from thread, not lwp.
4765 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4766 Pass &all_threads to find_inferior, not &all_lwps.
4767 (send_sigstop): Fetch lwpid from thread, not lwp.
4768 (send_sigstop_callback): Update, "entry" parameter is a
4769 struct thread_info * now.
4770 (suspend_and_send_sigstop_callback): Ditto.
4771 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4772 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4773 struct thread_info * now.
4774 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4775 from thread, lwp.
4776 (lwp_running): Update, "entry" parameter is a
4777 struct thread_info * now.
4778 (stop_all_lwps): Fetch ptid from thread.
4779 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4780 (linux_resume_one_lwp): Fetch lwpid from thread.
4781 (linux_set_resume_request): Update, "entry" parameter is a
4782 struct thread_info * now. Fetch pid, lwpid from thread.
4783 (resume_status_pending_p): Update, "entry" parameter is a
4784 struct thread_info * now.
4785 (need_step_over_p): Ditto. Fetch lwpid from thread.
4786 (start_step_over): Fetch lwpid from thread.
4787 (linux_resume_one_thread): Update, "entry" parameter is a
4788 struct thread_info * now. Fetch lwpid from thread.
4789 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4790 (proceed_one_lwp): Update, "entry" parameter is a
4791 struct thread_info * now. Fetch lwpid from thread.
4792 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4793 struct thread_info * now.
4794 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4795 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4796 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4797 directly.
4798 (regsets_store_inferior_registers): Ditto.
4799 (fetch_register, store_register): Ditto.
4800 (linux_read_memory, linux_write_memory): Ditto.
4801 (linux_request_interrupt): Ditto.
4802 (linux_read_auxv): Ditto.
4803 (linux_xfer_siginfo): Ditto.
4804 (linux_qxfer_spu): Ditto.
4805 (linux_qxfer_libraries_svr4): Ditto.
4806 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4807 moved to inferiors.h.
4808 (get_lwp): Delete.
4809 (get_thread_lwp): Update.
4810 (struct lwp_info): Delete member "entry". Simplify comment for
4811 member "thread".
4812 (all_lwps): Delete.
4813 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4814 current_inferior directly.
4815 (update_watch_registers_callback): Update, "entry" parameter is a
4816 struct thread_info * now. Fetch pid from thread.
4817 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4818 (mips_insert_point): Fetch lwpid from current_inferior.
4819 Pass &all_threads to find_inferior, not &all_lwps.
4820 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4821 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4822 directly.
4823 (mips_stopped_data_address): Ditto.
4824 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4825 directly.
4826 * linux-tile-low.c (tile_arch_setup): Ditto.
4827 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4828 (update_debug_registers_callback): Update, "entry" parameter is a
4829 struct thread_info * now. Fetch pid from thread.
4830 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4831 Pass &all_threads to find_inferior, not &all_lwps.
4832 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4833 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4834 Pass &all_threads to find_inferior, not &all_lwps.
4835 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4836 (i386_dr_low_get_status): Ditto.
4837 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4838 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4839 (x86_linux_read_description): Ditto.
4840 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4841
48422014-02-20 Doug Evans <dje@google.com>
4843
4844 * inferiors.c (get_first_inferior): Fix buglet.
4845
48462014-02-19 Doug Evans <dje@google.com>
4847
4848 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4849 * inferiors.c (add_thread): Change result type to struct thread_info *.
4850 All callers updated.
4851 (add_lwp): Call add_thread here instead of in callers.
4852 All callers updated.
4853 * linux-low.h (get_lwp_thread): Rewrite.
4854 (struct lwp_info): New member "thread".
4855
48562014-02-19 Doug Evans <dje@google.com>
4857
4858 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4859 All callers updated.
4860
48612014-02-19 Doug Evans <dje@google.com>
4862
4863 * inferiors.c (add_thread): Fix whitespace.
4864
48652014-02-19 Doug Evans <dje@google.com>
4866
4867 * dll.c (clear_dlls): Replace accessing list implemention details
4868 with API function.
4869 * gdbthread.h (get_first_thread): Declare.
4870 * inferiors.c (for_each_inferior_with_data): New function.
4871 (get_first_thread): New function.
4872 (find_thread_ptid): Simplify.
4873 (get_first_inferior): New function.
4874 (clear_list): Delete.
4875 (one_inferior_p): New function.
4876 (clear_inferior_list): New function.
4877 (clear_inferiors): Update.
4878 * inferiors.h (for_each_inferior_with_data): Declare.
4879 (clear_inferior_list): Declare.
4880 (one_inferior_p): Declare.
4881 (get_first_inferior): Declare.
4882 * linux-low.c (linux_wait_for_event): Replace accessing list
4883 implemention details with API function.
4884 * server.c (target_running): Ditto.
4885 (accumulate_file_name_length): New function.
4886 (emit_dll_description): New function.
4887 (handle_qxfer_libraries): Replace accessing list implemention
4888 details with API function.
4889 (handle_qxfer_threads_worker): New function.
4890 (handle_qxfer_threads_proper): Replace accessing list implemention
4891 details with API function.
4892 (handle_query): Ditto.
4893 (visit_actioned_threads_callback_ftype): New typedef.
4894 (visit_actioned_threads_data): New struct.
4895 (visit_actioned_threads): Rewrite to be find_inferior callback.
4896 (resume): Call find_inferior.
4897 (handle_status): Replace accessing list implemention
4898 details with API function.
4899 (process_serial_event): Replace accessing list implemention details
4900 with API function.
4901 * target.c (set_desired_inferior): Replace accessing list implemention
4902 details with API function.
4903 * tracepoint.c (same_process_p): New function.
4904 (gdb_agent_about_to_close): Replace accessing list implemention
4905 details with API function.
4906 * win32-low.c (child_delete_thread): Replace accessing list
4907 implemention details with API function.
4908 (match_dll_by_basename): New function.
4909 (dll_is_loaded_by_basename): New function.
4910 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4911 details call to dll_is_loaded_by_basename.
4912
49132014-02-19 Doug Evans <dje@google.com>
4914
4915 * dll.h (struct dll_info): Add comment.
4916 * gdbthread.h (struct thread_info): Add comment.
4917 (current_ptid): Simplify.
4918 * inferiors.c (add_process): Update.
4919 (remove_process): Update.
4920 * inferiors.h (struct process_info): Rename member "head" to "entry".
4921 * linux-low.c (delete_lwp): Update.
4922 (add_lwp): Update.
4923 (last_thread_of_process_p): Update.
4924 (kill_one_lwp_callback, linux_kill): Update.
4925 (status_pending_p_callback): Update.
4926 (wait_for_sigstop): Update. Simplify read of ptid.
4927 (start_step_over): Update.
4928 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4929 (get_lwp_thread): Update.
4930 (struct lwp_info): Rename member "head" to "entry".
4931 * regcache.h (inferior_list_entry): Delete.
4932 * server.c (kill_inferior_callback): Update.
4933 (detach_or_kill_inferior_callback): Update.
4934 (print_started_pid): Update.
4935 (print_attached_pid): Update.
4936 (process_serial_event): Simplify read of ptid.
4937 * thread-db.c (thread_db_create_event): Update.
4938 (thread_db_get_tls_address): Update.
4939 * win32-low.c (current_inferior_ptid): Simplify.
4940
49412014-02-19 Tom Tromey <tromey@redhat.com>
4942
4943 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4944 argument.
4945 (target_supports_btrace): Update.
4946
49472014-02-14 Yao Qi <yao@codesourcery.com>
4948
4949 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4950 (rsp-low-ipa.o): New target.
4951
49522014-02-12 Tom Tromey <tromey@redhat.com>
4953
4954 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4955 convert_ascii_to_int.
4956 * regcache.c (registers_to_string): Likewise.
4957 * remote-utils.c (decode_M_packet): Likewise.
4958 * server.c (process_serial_event): Likewise.
4959
49602014-02-12 Tom Tromey <tromey@redhat.com>
4961
4962 * server.c (handle_query, handle_v_run): Use hex2bin, not
4963 unhexify.
4964 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4965
49662014-02-12 Tom Tromey <tromey@redhat.com>
4967
4968 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4969 convert_int_to_ascii.
4970 * regcache.c (registers_to_string, collect_register_as_string):
4971 Likewise.
4972 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4973 Likewise.
4974 * server.c (process_serial_event): Likewise.
4975 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4976 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4977
49782014-02-12 Tom Tromey <tromey@redhat.com>
4979
4980 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4981 bin2hex, not hexify.
4982 * tracepoint.c (cmd_qtstatus): Likewise.
4983
49842014-02-12 Tom Tromey <tromey@redhat.com>
4985
4986 * remote-utils.c (monitor_output): Pass explicit length to
4987 hexify.
4988
49892014-02-12 Tom Tromey <tromey@redhat.com>
4990
4991 * tracepoint.c: Include rsp-low.h.
4992 * server.c: Include rsp-low.h.
4993 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4994 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4995 declare.
4996 * remote-utils.c: Include rsp-low.h.
4997 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
4998 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
4999 (convert_int_to_ascii, convert_ascii_to_int): Move to
5000 common/rsp-low.c.
5001 * regcache.c: Include rsp-low.h.
5002 * ax.c: Include rsp-low.h.
5003 * Makefile.in (SFILES): Add common/rsp-low.c.
5004 (OBS): Add rsp-low.o.
5005 (rsp-low.o): New target.
5006
50072014-02-12 Tom Tromey <tromey@redhat.com>
5008
5009 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5010 Include print-utils.h.
5011 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5012 (plongest, thirty_two, phex_nz): Remove.
5013 * Makefile.in (SFILES): Add common/print-utils.c.
5014 (OBS): Add print-utils.o.
5015 (print-utils-ipa.o): New target.
5016 (print-utils.o): New target.
5017 (IPA_OBJS): Add print-utils-ipa.o.
5018
50192014-02-06 Tom Tromey <tromey@redhat.com>
5020
5021 * Makefile.in (SFILES): Fix indentation.
5022
50232014-02-05 Doug Evans <dje@google.com>
5024
5025 * linux-low.c (linux_wait_for_event): Improve comment.
5026 (linux_wait_1): Keep current_inferior in sync with event_child.
5027
50282014-01-22 Doug Evans <dje@google.com>
5029
5030 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5031
50322014-01-22 Doug Evans <dje@google.com>
5033
5034 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5035 * configure: Regenerate.
5036 * config.in: Regenerate.
5037 * Makefile.in (SFILES): Add debug.c.
5038 (OBS): Add debug.o.
5039 * debug.c: New file.
5040 * debug.h: New file.
5041 * linux-aarch64-low.c (*): Update all debugging printfs to use
5042 debug_printf instead of fprintf.
5043 * linux-arm-low.c (*): Ditto.
5044 * linux-cris-low.c (*): Ditto.
5045 * linux-crisv32-low.c (*): Ditto.
5046 * linux-m32r-low.c (*): Ditto.
5047 * linux-sparc-low.c (*): Ditto.
5048 * linux-x86.c (*): Ditto.
5049 * linux-low.c (*): Ditto.
5050 (linux_wait_1): Add calls to debug_enter, debug_exit.
5051 (linux_wait): Remove redundant debugging printf.
5052 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5053 (linux_resume, unstop_all_lwps): Ditto.
5054 * mem-break.c (*): Update all debugging printfs to use
5055 debug_printf instead of fprintf.
5056 * remote-utils.c (*): Ditto.
5057 * thread-db.c (*): Ditto.
5058 * server.c #include <ctype.h>, "gdb_vecs.h".
5059 (debug_threads): Moved to debug.c.
5060 (*): Update all debugging printfs to use debug_printf instead of
5061 fprintf.
5062 (start_inferior): Replace call to fflush with call to debug_flush.
5063 (monitor_show_help): Mention set debug-format.
5064 (parse_debug_format_options): New function.
5065 (handle_monitor_command): Handle "monitor set debug-format".
5066 (gdbserver_usage): Mention --debug-format.
5067 (main): Parse --debug-format.
5068 * server.h (debug_threads): Declaration moved to debug.h.
5069 #include "debug.h".
5070 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5071 trace_debug_1 that uses debug_printf.
5072 (tracepoint_look_up_symbols): Update all debugging printfs to use
5073 debug_printf instead of fprintf.
5074
50752014-01-20 Baruch Siach <baruch@tkos.co.il>
5076
5077 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5078 sys/ptrace.h.
5079
50802014-01-17 Pedro Alves <palves@redhat.com>
5081
5082 PR build/16445
5083 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5084 defined after including gdb_proc_service.h.
5085
50862014-01-16 Doug Evans <dje@google.com>
5087
5088 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5089 (match_dll): Use it.
5090
50912014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5092
5093 * target.h (target_ops) <read_btrace>: Change parameters and
5094 return type to allow error reporting.
5095 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5096 trace reading errors on.
5097 * linux-low.c (linux_low_read_btrace): Pass trace reading
5098 errors on.
5099 (linux_low_disable_btrace): New.
5100
51012014-01-15 Doug Evans <dje@google.com>
5102
5103 * inferiors.c (thread_id_to_gdb_id): Delete.
5104 * inferiors.h (thread_id_to_gdb_id): Delete.
5105
51062014-01-13 Eli Zaretskii <eliz@gnu.org>
5107
5108 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5109 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5110 versions.
5111
51122014-01-08 Pedro Alves <palves@redhat.com>
5113
5114 * server.c (handle_status): Don't discard previous queued stop
5115 replies or thread's pending status here.
5116 (main) <disconnection>: Do it here instead.
5117
51182014-01-08 Pedro Alves <palves@redhat.com>
5119
5120 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5121 * server.c (visit_actioned_threads, handle_pending_status): New
5122 function.
5123 (handle_v_cont): Factor out parts to ...
5124 (resume): ... this new function. If in all-stop, and a thread
5125 being resumed has a pending status, report it without actually
5126 resuming.
5127 (myresume): Adjust to use the new 'resume' function.
5128 (clear_pending_status_callback, set_pending_status_callback)
5129 (find_status_pending_thread_callback): New functions.
5130 (handle_status): Handle the case of multiple threads having
5131 interesting statuses to report. Report threads' real last signal
5132 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5133 with an interesting thread to report the status for, instead of
5134 always reporting the status of the first thread.
5135
51362014-01-01 Joel Brobecker <brobecker@adacore.com>
5137
5138 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5139 * gdbreplay.c (gdbreplay_version): Likewise.
5140
51412013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5142
5143 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5144 iov.iov_len with the real length in use.
5145
51462013-12-13 Joel Brobecker <brobecker@adacore.com>
5147
5148 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5149 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5150 for all targets that use win32-low.c.
5151 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5152 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5153
51542013-12-13 Pedro Alves <palves@redhat.com>
5155
5156 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5157 if equal to TARGET_WAITKIND_LOADED.
5158 * win32-low.c (cached_status): New static global.
5159 (win32_wait): Add declaration.
5160 (do_initial_child_stuff): Flush all initial pending debug events
5161 up to the initial breakpoint.
5162 (win32_wait): If CACHED_STATUS was set, return that instead
5163 of doing a real wait. Remove the code resuming the execution
5164 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5165 during the initial phase. Also remove the code changing
5166 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5167 TARGET_WAITKIND_STOPPED.
5168
51692013-12-11 Yao Qi <yao@codesourcery.com>
5170
5171 * notif.c (handle_notif_ack): Return 0 if no notification
5172 matches.
5173
51742013-11-20 Doug Evans <dje@google.com>
5175
5176 * linux-low.c (linux_set_resume_request): Fix comment.
5177
51782013-11-20 Doug Evans <dje@google.com>
5179
5180 * linux-low.c (resume_status_pending_p): Tweak comment.
5181
51822013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5183
5184 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5185 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5186 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5187 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5188 (srv_amd64_regobj): Add amd64-mpx.o.
5189 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5190 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5191 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5192 * i387-fp.c (num_pl_bnd_register) Added constant.
5193 (num_pl_bnd_cfg_registers) Added constant.
5194 (struct i387_xsave) Added reserved area and MPX fields.
5195 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5196 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5197 function.
5198 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5199 (init_registers_amd64_mpx_linux): Declare new function.
5200 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5201 (x86_64_regmap): Add MPX registers.
5202 (x86_linux_read_description): Add MPX case.
5203 (initialize_low_arch): Initialize MPX targets.
5204
52052013-11-18 Tom Tromey <tromey@redhat.com>
5206
5207 * configure: Rebuild.
5208 * configure.ac: Don't check for stdlib.h.
5209 * gdbreplay.c: Unconditionally include stdlib.h.
5210
52112013-11-18 Tom Tromey <tromey@redhat.com>
5212
5213 * config.in: Rebuild.
5214 * configure: Rebuild.
5215 * configure.ac: Don't use AC_HEADER_DIRENT.
5216
52172013-11-18 Tom Tromey <tromey@redhat.com>
5218
5219 * server.h: Don't check HAVE_STRING_H.
5220 * gdbreplay.c: Don't check HAVE_STRING_H.
5221 * configure: Rebuild.
5222
52232013-11-18 Tom Tromey <tromey@redhat.com>
5224
5225 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5226 LIBGNU.
5227
52282013-11-08 Tom Tromey <tromey@redhat.com>
5229
5230 * configure, config.in: Rebuild.
5231 * configure.ac: Remove unused configury.
5232
52332013-11-08 Tom Tromey <tromey@redhat.com>
5234
5235 * acinclude.m4: Include common.m4, codeset.m4.
5236 * configure, config.in: Rebuild.
5237 * configure.ac: Use GDB_AC_COMMON.
5238
52392013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5240
5241 * linux-s390-low.c (HWCAP_S390_TE): New define.
5242 (s390_arch_setup): Consider the TE field in the HWCAP for
5243 determining 'have_regset_tdb'.
5244
52452013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5246
5247 PR gdb/16014
5248 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5249 call to sizeof.
5250
52512013-10-02 Pedro Alves <palves@redhat.com>
5252
5253 * server.c (process_serial_event): Don't output "GDBserver
5254 exiting" if GDB is connected through stdio.
5255 * target.c (mywait): Likewise, be silent if GDB is connected
5256 through stdio.
5257
52582013-10-01 Joel Brobecker <brobecker@adacore.com>
5259
5260 * lynx-low.c (lynx_add_threads_after_attach): New function.
5261 (lynx_attach): Remove call to add_thread. Add call to
5262 lynx_add_threads_after_attach instead.
5263
52642013-09-28 Mike Frysinger <vapier@gentoo.org>
5265
5266 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5267 * config.in, configure: Regenerated.
5268
52692013-09-18 Yao Qi <yao@codesourcery.com>
5270
5271 PR server/15959
5272 * server.c (start_inferior): Clear 'resume_info'.
5273
52742013-09-16 Jiong Wang <jiwang@tilera.com>
5275
5276 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5277 for each register.
5278
52792013-09-16 Jiong Wang <jiwang@tilera.com>
5280
5281 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5282 linux-tile-low.o to srv_tgtobj.
5283
52842013-09-16 Will Newton <will.newton@linaro.org>
5285
5286 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5287 out regs.
5288
52892013-09-06 Pedro Alves <palves@redhat.com>
5290
5291 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5292 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5293 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5294 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5295 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5296 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5297
52982013-09-06 Pedro Alves <palves@redhat.com>
5299
5300 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5301 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5302
53032013-09-06 Pedro Alves <palves@redhat.com>
5304
5305 * linux-amd64-ipa.c: Include tracepoint.h.
5306 * linux-i386-ipa.c: Include tracepoint.h.
5307
53082013-09-06 Ricard Wanderlof <ricardw@axis.com>
5309
5310 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5311 (ps_get_thread_area): New function.
5312
53132013-09-06 Ricard Wanderlof <ricardw@axis.com>
5314
5315 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5316 (initialize_low_arch): Call init_registers_crisv32 rather than
5317 init_register_crisv32.
5318
53192013-09-05 Pedro Alves <palves@redhat.com>
5320
5321 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5322 to ...
5323 * hostio.h: ... this new file.
5324 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5325 win32-low.c: Include hostio.h.
5326
53272013-09-05 Pedro Alves <palves@redhat.com>
5328
5329 * server.h (gdb_client_data, handler_func, callback_handler_func)
5330 (delete_file_handler, add_file_handler, append_callback_event)
5331 (delete_callback_event, start_event_loop, initialize_event_loop):
5332 Move to event-loop.h and include it.
5333 * event-loop.h: New file.
5334
53352013-09-05 Pedro Alves <palves@redhat.com>
5336
5337 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5338 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5339 (loaded_dll, unloaded_dll): Move to ...
5340 * dll.h: ... this new file.
5341 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5342
53432013-09-05 Pedro Alves <palves@redhat.com>
5344
5345 * server.h (current_process, get_thread_process, all_processes)
5346 (add_inferior_to_list, for_each_inferior, current_inferior)
5347 (remove_inferior, add_process, remove_process, find_process_pid)
5348 (have_started_inferiors_p, have_attached_inferiors_p)
5349 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5350 (clear_inferiors, find_inferior, find_inferior_id)
5351 (inferior_target_data, set_inferior_target_data)
5352 (inferior_regcache_data, set_inferior_regcache_data): Move to
5353 inferiors.h, and include it.
5354 * inferiors.h: New file.
5355
53562013-09-05 Pedro Alves <palves@redhat.com>
5357
5358 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5359 Move ...
5360 * ax.h: ... here.
5361
53622013-09-05 Pedro Alves <palves@redhat.com>
5363
5364 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5365 tracepoint.h.
5366 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5367 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5368 (handle_tracepoint_general_set, handle_tracepoint_query)
5369 (tracepoint_finished_step, tracepoint_was_hit)
5370 (release_while_stepping_state_list, current_traceframe)
5371 (in_readonly_region, traceframe_read_mem)
5372 (fetch_traceframe_registers, traceframe_read_sdata)
5373 (traceframe_read_info, struct fast_tpoint_collect_status)
5374 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5375 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5376 (supply_fast_tracepoint_registers)
5377 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5378 (ipa_tdesc, claim_trampoline_space)
5379 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5380 (agent_mem_read, agent_get_trace_state_variable_value)
5381 (agent_set_trace_state_variable_value, agent_tsv_read)
5382 (agent_mem_read_string, get_raw_reg_func_addr)
5383 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5384 * tracepoint.h: ... this new file.
5385
53862013-09-05 Pedro Alves <palves@redhat.com>
5387
5388 * server.h (perror_with_name, error, fatal, warning, paddress)
5389 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5390 include it.
5391 * utils.h: New file.
5392
53932013-09-05 Pedro Alves <palves@redhat.com>
5394
5395 * server.h (remote_debug, noack_mode, transport_is_reliable)
5396 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5397 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5398 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5399 (write_enn, initialize_async_io, enable_async_io)
5400 (disable_async_io, check_remote_input_interrupt_request)
5401 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5402 (dead_thread_notify, prepare_resume_reply)
5403 (decode_address_to_semicolon, decode_address, decode_m_packet)
5404 (decode_M_packet, decode_X_packet, decode_xfer_write)
5405 (decode_search_memory_packet, unhexify, hexify)
5406 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5407 (look_up_one_symbol, relocate_instruction)
5408 (monitor_output): Move to remote-utils.h, and include it.
5409 * remote-utils.h: New file.
5410
54112013-09-05 Pedro Alves <palves@redhat.com>
5412
5413 * server.h (_): Delete.
5414
54152013-09-02 Pedro Alves <palves@redhat.com>
5416
5417 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5418 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5419 allocated.
5420 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5421
54222013-09-02 Pierre Muller <muller@sourceware.org>
5423
5424 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5425 or WriteProcessMemory complete successfully and handle
5426 ERROR_PARTIAL_COPY error.
5427
54282013-09-02 Pedro Alves <palves@redhat.com>
5429
5430 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5431 error instead of EIO.
5432
54332013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5434
5435 PR server/15604
5436 * linux-low.c: Include filestuff.h.
5437 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5438 * lynx-low.c: Include filestuff.h.
5439 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5440 * server.c: Include filestuff.h.
5441 (main): Call notice_open_fds.
5442 * spu-low.c: Include filestuff.h.
5443 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5444
54452013-08-22 Luis Machado <lgustavo@codesourcery.com>
5446
5447 * Makefile.in: Explain why ../target and ../nat are not
5448 listed as include file search paths.
5449 (linux-waitpid.o): New object file rule.
5450 * configure.srv (srv_native_linux_obj): New variable.
5451 Replace all occurrences of linux native object files with
5452 $srv_native_linux_obj.
5453 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5454 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5455 (linux_enable_event_reporting): Remove declaration.
5456 (my_waitpid): Moved to common/linux-waitpid.c.
5457 (linux_wait_for_event): Pass ptid when calling
5458 linux_enable_event_reporting.
5459 (linux_supports_tracefork_flag): Remove.
5460 (linux_enable_event_reporting): Likewise.
5461 (linux_tracefork_grandchild): Remove.
5462 (STACK_SIZE): Moved to common/linux-ptrace.c.
5463 (linux_tracefork_child): Remove.
5464 (linux_test_for_tracefork): Remove.
5465 (linux_look_up_symbols): Call linux_supports_traceclone.
5466 (initialize_low): Remove call to linux_test_for_tracefork.
5467 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5468 common/linux-ptrace.h.
5469 (PTRACE_TYPE_ARG4): Likewise.
5470 Include linux-ptrace.h.
5471
54722013-08-21 Pedro Alves <palves@redhat.com>
5473
5474 * config.in: Renegerate.
5475
54762013-08-19 Luis Machado <lgustavo@codesourcery.com>
5477
5478 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5479 (SFILES): Remove $(srcdir)/common/target-common.c and
5480 add $(srcdir)/target/waitstatus.c.
5481 (OBS): Remove target-common.o and add waitstatus.o.
5482 (server_h): Remove $(srcdir)/../common/target-common.h and
5483 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5484 and $(srcdir)/../target/waitstatus.h.
5485 (target-common.o): Remove.
5486 (waitstatus.o): New target object file.
5487 * target.h: Do not include target-common.h and
5488 include target/resume.h, target/wait.h and
5489 target/waitstatus.h.
5490
54912013-08-13 Luis Machado <lgustavo@codesourcery.com>
5492
5493 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5494 to PTRACE_TYPE_ARG3.
5495 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5496 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5497 PTRACE_TYPE_ARG4.
5498 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5499 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5500
55012013-07-27 Jie Zhang <jie@codesourcery.com>
5502 Daniel Jacobowitz <dan@codesourcery.com>
5503 Yao Qi <yao@codesourcery.com>
5504
5505 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5506 (mips-linux-watch.o): New rule.
5507 (mips_linux_watch_h): New variable.
5508 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5509 srv_tgtobj.
5510 * linux-mips-low.c: Include mips-linux-watch.h.
5511 (struct arch_process_info, struct arch_lwp_info): New.
5512 (update_watch_registers_callback): New function.
5513 (mips_linux_new_process, mips_linux_new_thread) New functions.
5514 (mips_linux_prepare_to_resume, mips_insert_point): New
5515 functions.
5516 (mips_remove_point, mips_stopped_by_watchpoint): New
5517 functions.
5518 (rsp_bp_type_to_target_hw_bp_type): New function.
5519 (mips_stopped_data_address): New function.
5520 (the_low_target): Add watchpoint support functions.
5521
55222013-07-27 Yao Qi <yao@codesourcery.com>
5523
5524 * i386-low.c: Include break-common.h.
5525 (enum target_hw_bp_type): Remove.
5526
55272013-07-24 Luis Machado <lgustavo@codesourcery.com>
5528
5529 * Makefile.in (SFILES): /common/target-common.c.
5530 (OBS): Add target-common.o.
5531 (server_h): Add $(srcdir)/../common/target-common.h.
5532 (target-common.o): New target.
5533 * server.c (queue_stop_reply_callback): Free
5534 status string after use.
5535 * target.c (target_waitstatus_to_string): Remove.
5536 * target.h: Include target-common.h.
5537 (resume_kind): Likewise.
5538 (target_waitkind): Likewise.
5539 (target_waitstatus): Likewise.
5540 (TARGET_WNOHANG): Likewise.
5541
55422013-07-04 Yao Qi <yao@codesourcery.com>
5543
5544 * Makefile.in (host_alias): Use @host_noncanonical@.
5545 (target_alias): Use @target_noncanonical@.
5546 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5547 ACX_NONCANONICAL_HOST.
5548 * configure: Regenerated.
5549
5550 Revert:
5551 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5552
5553 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5554 * configure: Rebuild.
5555 * Makefile.in (version_host, version_target): Get from configure.
5556 (version.c): Use $(version_host) and $(version_target).
5557
55582013-07-03 Pedro Alves <palves@redhat.com>
5559
5560 * Makefile.in (config.status): Depend on development.sh.
5561 * acinclude.m4: Include libmcheck.m4.
5562 * configure: Regenerate.
5563
55642013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5565
5566 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5567 attribute inside the parentheses.
5568 (winapi_DebugSetProcessKillOnExit): Ditto.
5569 (winapi_DebugBreakProcess): Ditto.
5570 (winapi_GenerateConsoleCtrlEvent): Ditto.
5571
55722013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5573
5574 * notif.h (notif_event): Add a dummy member to avoid compiler
5575 errors.
5576
55772013-07-01 Pedro Alves <palves@redhat.com>
5578
5579 * hostio.c (HOSTIO_PATH_MAX): Define.
5580 (require_filename, handle_open, handle_unlink, handle_readlink):
5581 Use it.
5582
55832013-07-01 Pedro Alves <palves@redhat.com>
5584
5585 * server.h: Include "pathmax.h".
5586 * linux-low.c: Don't include sys/param.h.
5587 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5588 MAXPATHLEN.
5589 * win32-low.c: Don't include sys/param.h.
5590 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5591
55922013-07-01 Pedro Alves <palves@redhat.com>
5593
5594 * event-loop.c: Don't check HAVE_UNISTD_H before including
5595 <unistd.h>.
5596 * gdbreplay.c: Likewise.
5597 * remote-utils.c: Likewise.
5598 * server.c: Likewise.
5599 * configure.ac: Don't check for unistd.h.
5600 * configure: Regenerate.
5601
56022013-06-28 Tom Tromey <tromey@redhat.com>
5603
5604 * Makefile.in (version.c): Use version.in, not
5605 common/version.in.
5606
56072013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5608
5609 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5610 * configure: Rebuild.
5611 * Makefile.in (version_host, version_target): Get from configure.
5612 (version.c): Use $(version_host) and $(version_target).
5613
56142013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5615
5616 Fix trace-status to output user name without trailing colon.
5617 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5618
56192013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5620
5621 Fix trace-status to output proper start-time and stop-time.
5622 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5623 output start time and stop time in hex as gdb expects.
5624
56252013-06-26 Pedro Alves <pedro@codesourcery.com>
5626
5627 * tracepoint.c (build_traceframe_info_xml): Output trace state
5628 variables present in the trace buffer.
5629
56302013-06-24 Tom Tromey <tromey@redhat.com>
5631
5632 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5633 create-version.sh.
5634 (version.o): Remove.
5635 * gdbreplay.c: Include version.h.
5636 (version, host_name): Don't declare.
5637 * server.h: Include version.h.
5638 (version, host_name): Don't declare.
5639
56402013-06-12 Pedro Alves <palves@redhat.com>
5641
5642 * linux-x86-low.c (linux_is_elf64): Delete global.
5643 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5644 with local linux_pid_exe_is_elf_64_file use.
5645
56462013-06-11 Pedro Alves <palves@redhat.com>
5647
5648 * linux-low.c (regset_disabled, disable_regset): New functions.
5649 (regsets_fetch_inferior_registers)
5650 (regsets_store_inferior_registers): Use them.
5651 (initialize_regsets_info); Don't allocate the disabled_regsets
5652 array here.
5653 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5654 comment.
5655
56562013-06-11 Pedro Alves <palves@redhat.com>
5657
5658 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5659 xmalloc.
5660
56612013-06-11 Pedro Alves <palves@redhat.com>
5662
5663 * linux-x86-low.c (initialize_low_arch): Call
5664 init_registers_x32_avx_linux.
5665
56662013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5667
5668 Fix compatibility with Android Bionic.
5669 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5670 it is not empty.
5671
56722013-06-07 Pedro Alves <palves@redhat.com>
5673
5674 PR server/14823
5675 * Makefile.in (OBS): Add tdesc.o.
5676 (IPA_OBJS): Add tdesc-ipa.o.
5677 (tdesc-ipa.o): New rule.
5678 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5679 interface.
5680 * linux-low.c (new_inferior): Delete.
5681 (disabled_regsets, num_regsets): Delete.
5682 (linux_add_process): Adjust to set the new per-process
5683 new_inferior flag.
5684 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5685 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5686 was a stop. When calling arch_setup, switch the current inferior
5687 to the thread that got an event.
5688 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5689 (regsets_fetch_inferior_registers)
5690 (regsets_store_inferior_registers): New regsets_info parameter.
5691 Adjust to use it.
5692 (linux_register_in_regsets): New regs_info parameter. Adjust to
5693 use it.
5694 (register_addr, fetch_register, store_register): New usrregs_info
5695 parameter. Adjust to use it.
5696 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5697 parameter regs_info. Adjust to use it.
5698 (linux_fetch_registers): Get the current inferior's regs_info, and
5699 adjust to use it.
5700 (linux_store_registers): Ditto.
5701 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5702 (initialize_low): Don't initialize the target_regsets here. Call
5703 initialize_low_arch.
5704 * linux-low.h (target_regsets): Delete declaration.
5705 (struct regsets_info): New.
5706 (struct usrregs_info): New.
5707 (struct regs_info): New.
5708 (struct process_info_private) <new_inferior>: New field.
5709 (struct linux_target_ops): Delete the num_regs, regmap, and
5710 regset_bitmap fields. New field regs_info.
5711 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5712 * i387-fp.c (num_xmm_registers): Delete.
5713 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5714 calls to new interface.
5715 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5716 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5717 Infer the number of xmm registers from the regcache's target
5718 description.
5719 * i387-fp.h (num_xmm_registers): Delete.
5720 * inferiors.c (add_thread): Don't install the thread's regcache
5721 here.
5722 * proc-service.c (gregset_info): Fetch the current inferior's
5723 regs_info. Adjust to use it.
5724 * regcache.c: Include tdesc.h.
5725 (register_bytes, reg_defs, num_registers)
5726 (gdbserver_expedite_regs): Delete.
5727 (get_thread_regcache): If the thread doesn't have a regcache yet,
5728 create one, instead of aborting gdbserver.
5729 (regcache_invalidate_one): Rename to ...
5730 (regcache_invalidate_thread): ... this.
5731 (regcache_invalidate_one): New.
5732 (regcache_invalidate): Only invalidate registers of the current
5733 process.
5734 (init_register_cache): Add target_desc parameter, and use it.
5735 (new_register_cache): Ditto. Assert the target description has a
5736 non zero registers_size.
5737 (regcache_cpy): Add assertions. Adjust.
5738 (realloc_register_cache, set_register_cache): Delete.
5739 (registers_to_string, registers_from_string): Adjust.
5740 (find_register_by_name, find_regno, find_register_by_number)
5741 (register_cache_size): Add target_desc parameter, and use it.
5742 (free_register_cache_thread, free_register_cache_thread_one)
5743 (regcache_release, register_cache_size): New.
5744 (register_size): Add target_desc parameter, and use it.
5745 (register_data, supply_register, supply_register_zeroed)
5746 (supply_regblock, supply_register_by_name, collect_register)
5747 (collect_register_as_string, collect_register_by_name): Adjust.
5748 * regcache.h (struct target_desc): Forward declare.
5749 (struct regcache) <tdesc>: New field.
5750 (init_register_cache, new_register_cache): Add target_desc
5751 parameter.
5752 (regcache_invalidate_thread): Declare.
5753 (regcache_invalidate_one): Delete declaration.
5754 (regcache_release): Declare.
5755 (find_register_by_number, register_cache_size, register_size)
5756 (find_regno): Add target_desc parameter.
5757 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5758 declarations.
5759 * remote-utils.c: Include tdesc.h.
5760 (outreg, prepare_resume_reply): Adjust.
5761 * server.c: Include tdesc.h.
5762 (gdbserver_xmltarget): Delete declaration.
5763 (get_features_xml, process_serial_event): Adjust.
5764 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5765 declare.
5766 (struct process_info) <tdesc>: New field.
5767 (ipa_tdesc): Declare.
5768 * tdesc.c: New file.
5769 * tdesc.h: New file.
5770 * tracepoint.c: Include tdesc.h.
5771 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5772 (get_context_regcache): Adjust to pass ipa_tdesc down.
5773 (do_action_at_tracepoint): Adjust to get the register cache size
5774 from the context regcache's description.
5775 (traceframe_walk_blocks): Adjust to get the register cache size
5776 from the current trace frame's description.
5777 (traceframe_get_pc): Adjust to get current trace frame's
5778 description and pass it down.
5779 (gdb_collect): Adjust to get the register cache size from the
5780 IPA's description.
5781 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5782 (gdbserver_xmltarget): Delete.
5783 (initialize_low_tracepoint): Set the ipa's target description.
5784 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5785 (initialize_low_tracepoint): Set the ipa's target description.
5786 * linux-x86-low.c: Include tdesc.h.
5787 [__x86_64__] (is_64bit_tdesc): New.
5788 (ps_get_thread_area, x86_get_thread_area): Use it.
5789 (i386_cannot_store_register): Rename to ...
5790 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5791 (i386_cannot_fetch_register): Rename to ...
5792 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5793 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5794 to new interface.
5795 (target_regsets): Rename to ...
5796 (x86_regsets): ... this.
5797 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5798 interface.
5799 (x86_siginfo_fixup): Use is_64bit_tdesc.
5800 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5801 (tdesc_x32_avx_linux, tdesc_x32_linux)
5802 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5803 Declare.
5804 (x86_linux_update_xmltarget): Delete.
5805 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5806 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5807 (AMD64_LINUX_USER64_CS): New.
5808 (x86_linux_read_description): New, based on
5809 x86_linux_update_xmltarget.
5810 (same_process_callback): New.
5811 (x86_arch_setup_process_callback): New.
5812 (x86_linux_update_xmltarget): New.
5813 (x86_regsets_info): New.
5814 (amd64_linux_regs_info): New.
5815 (i386_linux_usrregs_info): New.
5816 (i386_linux_regs_info): New.
5817 (x86_linux_regs_info): New.
5818 (x86_arch_setup): Reimplement.
5819 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5820 (x86_emit_ops): Ditto.
5821 (the_low_target): Adjust. Install x86_linux_regs_info,
5822 x86_cannot_fetch_register, and x86_cannot_store_register.
5823 (initialize_low_arch): New.
5824 * linux-ia64-low.c (tdesc_ia64): Declare.
5825 (ia64_fetch_register): Adjust.
5826 (ia64_usrregs_info, regs_info): New globals.
5827 (ia64_regs_info): New function.
5828 (the_low_target): Adjust.
5829 (initialize_low_arch): New function.
5830 * linux-sparc-low.c (tdesc_sparc64): Declare.
5831 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5832 Adjust.
5833 (sparc_arch_setup): New function.
5834 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5835 (the_low_target): Adjust.
5836 (initialize_low_arch): New function.
5837 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5838 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5839 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5840 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5841 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5842 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5843 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5844 (tdesc_powerpc_isa205_vsx64l): Declare.
5845 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5846 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5847 (ppc_set_pc, ppc_get_hwcap): Adjust.
5848 (ppc_usrregs_info): Forward declare.
5849 (!__powerpc64__) ppc_regmap_adjusted: New global.
5850 (ppc_arch_setup): Adjust to the current process'es target
5851 description.
5852 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5853 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5854 (ppc_store_evrregset): Adjust.
5855 (target_regsets): Rename to ...
5856 (ppc_regsets): ... this, and make static.
5857 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5858 (ppc_regs_info): New function.
5859 (the_low_target): Adjust.
5860 (initialize_low_arch): New function.
5861 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5862 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5863 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5864 (tdesc_s390x_linux64v2): Declare.
5865 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5866 (s390_fill_gregset, s390_store_last_break): Adjust.
5867 (target_regsets): Rename to ...
5868 (s390_regsets): ... this, and make static.
5869 (s390_get_pc, s390_set_pc): Adjust.
5870 (s390_get_hwcap): New target_desc parameter, and use it.
5871 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5872 (s390_arch_setup): Adjust to set the current process'es target
5873 description. Don't adjust the regmap.
5874 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5875 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5876 (regs_info_3264): New globals.
5877 (s390_regs_info): New function.
5878 (the_low_target): Adjust.
5879 (initialize_low_arch): New function.
5880 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5881 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5882 [__mips64] (init_registers_mips_linux)
5883 (init_registers_mips_dsp_linux): Delete defines.
5884 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5885 (have_dsp): New global.
5886 (mips_read_description): New, based on mips_arch_setup.
5887 (mips_arch_setup): Reimplement.
5888 (get_usrregs_info): New function.
5889 (mips_cannot_fetch_register, mips_cannot_store_register)
5890 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5891 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5892 (target_regsets): Rename to ...
5893 (mips_regsets): ... this, and make static.
5894 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5895 (dsp_regs_info, regs_info): New globals.
5896 (mips_regs_info): New function.
5897 (the_low_target): Adjust.
5898 (initialize_low_arch): New function.
5899 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5900 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5901 Declare.
5902 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5903 (arm_read_description): New, with bits factored from
5904 arm_arch_setup.
5905 (arm_arch_setup): Reimplement.
5906 (target_regsets): Rename to ...
5907 (arm_regsets): ... this, and make static.
5908 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5909 (arm_regs_info): New function.
5910 (the_low_target): Adjust.
5911 (initialize_low_arch): New function.
5912 * linux-m68k-low.c (tdesc_m68k): Declare.
5913 (target_regsets): Rename to ...
5914 (m68k_regsets): ... this, and make static.
5915 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5916 (m68k_regs_info): New function.
5917 (m68k_arch_setup): New function.
5918 (the_low_target): Adjust.
5919 (initialize_low_arch): New function.
5920 * linux-sh-low.c (tdesc_sharch): Declare.
5921 (target_regsets): Rename to ...
5922 (sh_regsets): ... this, and make static.
5923 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5924 (sh_regs_info, sh_arch_setup): New functions.
5925 (the_low_target): Adjust.
5926 (initialize_low_arch): New function.
5927 * linux-bfin-low.c (tdesc_bfin): Declare.
5928 (bfin_arch_setup): New function.
5929 (bfin_usrregs_info, regs_info): New globals.
5930 (bfin_regs_info): New function.
5931 (the_low_target): Adjust.
5932 (initialize_low_arch): New function.
5933 * linux-cris-low.c (tdesc_cris): Declare.
5934 (cris_arch_setup): New function.
5935 (cris_usrregs_info, regs_info): New globals.
5936 (cris_regs_info): New function.
5937 (the_low_target): Adjust.
5938 (initialize_low_arch): New function.
5939 * linux-cris-low.c (tdesc_crisv32): Declare.
5940 (cris_arch_setup): New function.
5941 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5942 (cris_regs_info): New function.
5943 (the_low_target): Adjust.
5944 (initialize_low_arch): New function.
5945 * linux-m32r-low.c (tdesc_m32r): Declare.
5946 (m32r_arch_setup): New function.
5947 (m32r_usrregs_info, regs_info): New globals.
5948 (m32r_regs_info): Adjust.
5949 (initialize_low_arch): New function.
5950 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5951 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5952 (tic6x_usrregs_info): Forward declare.
5953 (tic6x_read_description): New function, based on ...
5954 (tic6x_arch_setup): ... this. Reimplement.
5955 (target_regsets): Rename to ...
5956 (tic6x_regsets): ... this, and make static.
5957 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5958 (tic6x_regs_info): New function.
5959 (the_low_target): Adjust.
5960 (initialize_low_arch): New function.
5961 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5962 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5963 (target_regsets): Rename to ...
5964 (xtensa_regsets): ... this, and make static.
5965 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5966 globals.
5967 (xtensa_arch_setup, xtensa_regs_info): New functions.
5968 (the_low_target): Adjust.
5969 (initialize_low_arch): New function.
5970 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5971 (nios2_arch_setup): Set the current process'es tdesc.
5972 (target_regsets): Rename to ...
5973 (nios2_regsets): ... this.
5974 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5975 (nios2_regs_info): New function.
5976 (the_low_target): Adjust.
5977 (initialize_low_arch): New function.
5978 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5979 (aarch64_arch_setup): Set the current process'es tdesc.
5980 (target_regsets): Rename to ...
5981 (aarch64_regsets): ... this.
5982 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5983 (aarch64_regs_info): New function.
5984 (the_low_target): Adjust.
5985 (initialize_low_arch): New function.
5986 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5987 globals.
5988 (target_regsets): Rename to ...
5989 (tile_regsets): ... this.
5990 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5991 (tile_regs_info): New function.
5992 (tile_arch_setup): Set the current process'es tdesc.
5993 (the_low_target): Adjust.
5994 (initialize_low_arch): New function.
5995 * spu-low.c (tdesc_spu): Declare.
5996 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
5997 * win32-arm-low.c (tdesc_arm): Declare.
5998 (arm_arch_setup): New function.
5999 (the_low_target): Install arm_arch_setup instead of
6000 init_registers_arm.
6001 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6002 (init_windows_x86): Rename to ...
6003 (i386_arch_setup): ... this. Set `win32_tdesc'.
6004 (the_low_target): Adjust.
6005 * win32-low.c (win32_tdesc): New global.
6006 (child_add_thread): Don't create the thread cache here.
6007 (do_initial_child_stuff): Set the new process'es tdesc.
6008 * win32-low.h (struct target_desc): Forward declare.
6009 (win32_tdesc): Declare.
6010 * lynx-i386-low.c (tdesc_i386): Declare global.
6011 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6012 * lynx-low.c (lynx_tdesc): New global.
6013 (lynx_add_process): Set the new process'es tdesc.
6014 * lynx-low.h (struct target_desc): Forward declare.
6015 (lynx_tdesc): Declare global.
6016 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6017 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6018 * nto-low.c (nto_tdesc): New global.
6019 (do_attach): Set the new process'es tdesc.
6020 * nto-low.h (struct target_desc): Forward declare.
6021 (nto_tdesc): Declare.
6022 * nto-x86-low.c (tdesc_i386): Declare.
6023 (nto_x86_arch_setup): Set `nto_tdesc'.
6024
60252013-06-04 Gary Benson <gbenson@redhat.com>
6026
6027 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6028 to qSupported response when appropriate.
6029 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6030 with nonzero-length annex.
6031 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6032 arguments supplied in annex.
6033
60342013-05-31 Doug Evans <dje@google.com>
6035
6036 PR server/15594
6037 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6038 64 bits in 64-cross-32 environment.
6039
60402013-05-28 Pedro Alves <palves@redhat.com>
6041
6042 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6043 (aarch64-without-fpu.c): Delete rule.
6044 * configure.srv (aarch64*-*-linux*): Remove references to
6045 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6046 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6047 declaration.
6048
60492013-05-24 Pedro Alves <palves@redhat.com>
6050
6051 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6052 instead of strchr/decode_address. Error if the range isn't split
6053 with a ','. Don't assume there's be a ':' in the action.
6054
60552013-05-23 Yao Qi <yao@codesourcery.com>
6056 Pedro Alves <palves@redhat.com>
6057
6058 * linux-low.c (lwp_in_step_range): New function.
6059 (linux_wait_1): If the thread was range stepping and stopped
6060 outside the stepping range, report the stop to GDB. Otherwise,
6061 continue stepping. Add range stepping debug output.
6062 (linux_set_resume_request): Copy the step range from the resume
6063 request to the lwp.
6064 (linux_supports_range_stepping): New.
6065 (linux_target_ops) <supports_range_stepping>: Set to
6066 linux_supports_range_stepping.
6067 * linux-low.h (struct linux_target_ops)
6068 <supports_range_stepping>: New field.
6069 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6070 * linux-x86-low.c (x86_supports_range_stepping): New.
6071 (the_low_target) <supports_range_stepping>: Set to
6072 x86_supports_range_stepping.
6073 * server.c (handle_v_cont): Handle 'r' action.
6074 (handle_v_requests): Append ";r" if the target supports range
6075 stepping.
6076 * target.h (struct thread_resume) <step_range_start,
6077 step_range_end>: New fields.
6078 (struct target_ops) <supports_range_stepping>:
6079 New field.
6080 (target_supports_range_stepping): New macro.
6081
60822013-05-17 Joel Brobecker <brobecker@adacore.com>
6083
6084 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6085 confusion in comment.
6086
60872013-05-17 Joel Brobecker <brobecker@adacore.com>
6088
6089 * lynx-low.c (struct process_info_private): New type.
6090 (lynx_add_process): New function.
6091 (lynx_create_inferior, lynx_attach): Replace calls to
6092 add_process by calls to lynx_add_process.
6093 (lynx_resume): If PTID is null, then try using
6094 current_process()->private->last_wait_event_ptid.
6095 Add comments.
6096 (lynx_clear_inferiors): Delete. The contents of that function
6097 has been inlined in lynx_mourn;
6098 (lynx_wait_1): Save the ptid in the process's private data.
6099 (lynx_mourn): Free the process' private data. Replace call
6100 to lynx_clear_inferiors by call to clear_inferiors.
6101
61022013-05-17 Yao Qi <yao@codesourcery.com>
6103
6104 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6105 the right place.
6106
61072013-05-16 Luis Machado <lgustavo@codesourcery.com>
6108
6109 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6110 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6111 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6112 PT_TEXT_END_ADDR guards. Update comments.
6113 (linux_target_op) <read_offsets>: Conditionally define to
6114 linux_read_offsets if the target is UCLIBC and if it defines
6115 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6116
61172013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6118 Andrew Jenner <andrew@codesourcery.com>
6119
6120 * Makefile.in (SFILES): Add linux-nios2-low.c.
6121 (clean): Add action to delete nios2-linux.c.
6122 (nios2-linux.c): New rule.
6123 * configure.srv: Add nios2*-*-linux*.
6124 * linux-nios2-low.c: New.
6125
61262013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6127
6128 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6129
61302013-04-25 Hui Zhu <hui@codesourcery.com>
6131
6132 PR gdb/15186
6133 * ax.c (ax_printf): Add fflush.
6134
61352013-04-22 Tom Tromey <tromey@redhat.com>
6136
6137 * Makefile.in (SFILES): Add filestuff.c.
6138 (OBS): Add filestuff.o.
6139 (filestuff.o): New target.
6140 * config.in, configure: Rebuild.
6141 * configure.ac: Check for fdwalk, pipe2.
6142
61432013-04-17 Pedro Alves <palves@redhat.com>
6144
6145 * configure.ac (USE_THREAD_DB): Delete variable.
6146 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6147 Don't AC_SUBST USE_THREAD_DB.
6148 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6149 * config.in, configure: Regenerate.
6150
61512013-04-16 Pedro Alves <palves@redhat.com>
6152
6153 * linux-low.h (struct lwp_info) <thread_known>: Move under
6154 the USE_THREAD_DB #ifdef.
6155
61562013-04-16 Pedro Alves <palves@redhat.com>
6157
6158 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6159 (linux-low.o): Delete rule.
6160 * linux-low.h: Always include "gdb_thread_db.h" instead of
6161 conditionally including thread_db.h.
6162 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6163 HAVE_THREAD_DB_H.
6164
61652013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6166
6167 * Makefile.in (install-only): Fix make install regression.
6168
61692013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6170
6171 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6172 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6173 installation.
6174 * gdbserver.1: Remove.
6175
61762013-03-22 Pedro Alves <palves@redhat.com>
6177
6178 * linux-low.c (handle_extended_wait): Don't call
6179 linux_enable_event_reporting.
6180
61812013-03-15 Tony Theodore <tonyt@logyst.com>
6182
6183 PR build/9098:
6184 * Makefile.in (SHELL): Use @SHELL@.
6185
61862013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6187
6188 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6189 compiler warning.
6190
61912013-03-13 Joel Brobecker <brobecker@adacore.com>
6192
6193 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6194 Remove extraneous NULL element.
6195
61962013-03-13 Yao Qi <yao@codesourcery.com>
6197
6198 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6199 'V' block in trace frame.
6200
62012013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6202
6203 * target.h (struct target_ops): Add btrace ops.
6204 (target_supports_btrace): New macro.
6205 (target_enable_btrace): New macro.
6206 (target_disable_btrace): New macro.
6207 (target_read_btrace): New macro.
6208 * gdbthread.h (struct thread_info): Add btrace field.
6209 * server.c: Include btrace-common.h.
6210 (handle_btrace_general_set): New function.
6211 (handle_btrace_enable): New function.
6212 (handle_btrace_disable): New function.
6213 (handle_general_set): Call handle_btrace_general_set.
6214 (handle_qxfer_btrace): New function.
6215 (struct qxfer qxfer_packets[]): Add btrace entry.
6216 * inferiors.c (remove_thread): Disable btrace.
6217 * linux-low: Include linux-btrace.h.
6218 (linux_low_enable_btrace): New function.
6219 (linux_low_read_btrace): New function.
6220 (linux_target_ops): Add btrace ops.
6221 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6222 Add srv_linux_btrace=yes.
6223 (x86_64-*-linux*): Add linux-btrace.o.
6224 Add srv_linux_btrace=yes.
6225 * configure.ac: Define HAVE_LINUX_BTRACE.
6226 * config.in: Regenerated.
6227 * configure: Regenerated.
6228
62292013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6230
6231 * server.c (handle_qxfer): Preserve error message if -3 is
6232 returned.
6233 (qxfer): Document the -3 return value.
6234
62352013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6236
6237 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6238 (linux_btrace_h): New variable.
6239 (linux-btrace.o): New rule.
6240
62412013-03-08 Stan Shebs <stan@codesourcery.com>
6242 Hafiz Abid Qadeer <abidh@codesourcery.com>
6243
6244 * tracepoint.c (trace_buffer_size): New global.
6245 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6246 (init_trace_buffer): Change to one-argument function. Allocate
6247 trace buffer memory.
6248 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6249 handle QTBuffer:size packet.
6250 (cmd_bigqtbuffer_size): New function.
6251 (initialize_tracepoint): Call init_trace_buffer with
6252 DEFAULT_TRACE_BUFFER_SIZE.
6253 * server.c (handle_query): Add QTBuffer:size in the
6254 supported packets.
6255
62562013-03-07 Yao Qi <yao@codesourcery.com>
6257
6258 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6259 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6260 of -1.
6261 (cmd_qtsp): Adjust condition. Do post increment.
6262 Set cur_action and cur_step_action back to 0.
6263
62642013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6265
6266 PR server/15236
6267 * linux-low.c (linux_write_memory): Return early success if LEN is
6268 zero.
6269
62702013-03-05 Corinna Vinschen <vinschen@redhat.de>
6271
6272 * configure.srv: Add x86_64-*-cygwin* as target.
6273
62742013-02-28 Tom Tromey <tromey@redhat.com>
6275
6276 * configure.ac: Invoke AC_SYS_LARGEFILE.
6277 * configure, config.in: Rebuild.
6278
62792013-02-28 Corinna Vinschen <vinschen@redhat.com>
6280
6281 * win32-low.c: Throughout, fix format strings and casts of
6282 printf-like functions to avoid type related warnings on all
6283 platforms.
6284 (get_child_debug_event): Print dwDebugEventCode as hex since
6285 that's how it's usually documented.
6286
62872013-02-28 Yao Qi <yao@codesourcery.com>
6288
6289 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6290 pulongest.
6291
62922013-02-27 Jiong Wang <jiwang@tilera.com>
6293
6294 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6295 (reg-tilegx32.c): New rule.
6296 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6297 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6298 different register info initializer according to elf class.
6299 (init_registers_tilgx32): New function. The tilegx32 register info
6300 initializer.
6301 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6302 (tile_store_gregset): Likewise.
6303
63042013-02-27 Yao Qi <yao@codesourcery.com>
6305
6306 * server.c (process_point_options): Print debug message when
6307 debug_threads is true.
6308
63092013-02-26 Yao Qi <yao@codesourcery.com>
6310
6311 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6312
63132013-02-19 Pedro Alves <palves@redhat.com>
6314 Kai Tietz <ktietz@redhat.com>
6315
6316 PR gdb/15161
6317
6318 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6319 instead of strtoul to extract address from packet.
6320 (process_serial_event) <'z'>: Likewise.
6321
63222013-02-18 Yao Qi <yao@codesourcery.com>
6323
6324 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6325
63262013-02-14 Pedro Alves <palves@redhat.com>
6327
6328 Plug memory leak.
6329
6330 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6331 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6332
63332013-02-14 Pedro Alves <palves@redhat.com>
6334
6335 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6336
63372013-02-14 Pedro Alves <palves@redhat.com>
6338
6339 * tracepoint.c (save_string): Delete.
6340 (add_tracepoint_action): Use savestring instead of save_string.
6341
63422013-02-12 Pedro Alves <palves@redhat.com>
6343
6344 * linux-xtensa-low.c: Ditto.
6345 * xtensa-xtregs.c: Ditto.
6346
63472013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6348
6349 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6350 thread_db.
6351
63522013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6353
6354 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6355 aarch64_num_wp_regs and aarch64_num_bp_regs to
6356 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6357
63582013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6359
6360 * linux-aarch64-low.c (ps_get_thread_area): Replace
6361 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6362
63632013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6364 Marcus Shawcroft <marcus.shawcroft@arm.com>
6365 Nigel Stephens <nigel.stephens@arm.com>
6366 Yufeng Zhang <yufeng.zhang@arm.com>
6367
6368 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6369 (aarch64.c, aarch64-without-fpu.c): New targets.
6370 * configure.srv (aarch64*-*-linux*): New.
6371 * linux-aarch64-low.c: New file.
6372
63732013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6374
6375 * linux-low.c (handle_extended_wait, linux_create_inferior)
6376 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6377 (dequeue_one_deferred_signal, linux_resume_one_thread)
6378 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6379 (linux_tracefork_grandchild, linux_test_for_tracefork)
6380 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6381 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6382 where the argument is 0.
6383
63842013-01-25 Yao Qi <yao@codesourcery.com>
6385
6386 * event-loop.c: Include "queue.h".
6387 (gdb_event_p): New typedef.
6388 (struct gdb_event) <next_event>: Remove.
6389 (event_queue): Change to QUEUE(gdb_event_p).
6390 (async_queue_event): Remove.
6391 (gdb_event_xfree): New.
6392 (initialize_event_loop): New.
6393 (process_event): Use API from QUEUE.
6394 (wait_for_event): Likewise.
6395 * server.c (main): Call initialize_event_loop.
6396 * server.h (initialize_event_loop): Declare.
6397
63982013-01-18 Yao Qi <yao@codesourcery.com>
6399
6400 * ax.h (struct eval_agent_expr_context): New.
6401 (gdb_eval_agent_expr): Update declaration.
6402 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6403 TFRAME. Add new argument CTX.
6404 * server.h (struct eval_agent_expr_context): Declare.
6405 (agent_mem_read, agent_tsv_read): Update declaration.
6406 (agent_mem_read_string): Likewise.
6407 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6408 (add_traceframe_block): Add new argument TPOINT.
6409 Increase TPOINT->traceframe_usage.
6410 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6411 eval_tracepoint_agent_expr.
6412 (condition_true_at_tracepoint): Likewise.
6413 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6414 (agent_mem_read_string, agent_tsv_read): Likewise.
6415
64162013-01-16 Yao Qi <yao@codesourcery.com>
6417
6418 * linux-low.c (linux_resume_one_lwp): Don't check
6419 'lwp->bp_reinsert != 0'.
6420
64212013-01-07 Joel Brobecker <brobecker@adacore.com>
6422 Pedro Alves <palves@redhat.com>
6423
6424 * lynx-low.c (ptrace_request_to_str): Define a temporary
6425 macro and use it to simplify this function's implementation.
6426
64272013-01-07 Joel Brobecker <brobecker@adacore.com>
6428
6429 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6430 sets errno.
6431
64322013-01-07 Joel Brobecker <brobecker@adacore.com>
6433
6434 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6435
64362013-01-07 Joel Brobecker <brobecker@adacore.com>
6437
6438 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6439
64402013-01-07 Joel Brobecker <brobecker@adacore.com>
6441
6442 * lynx-low.c (lynx_resume): Use the resume_info parameter
6443 to determine the ptid for the lynx_ptrace call, unless
6444 it is equal to minus_one_ptid, in which case we use the
6445 ptid of the current_inferior.
6446 (lynx_wait_1): After having received a thread create/exit
6447 event, resume the inferior's execution using the signaling
6448 thread's ptid, rather than the old ptid.
6449
64502013-01-07 Joel Brobecker <brobecker@adacore.com>
6451
6452 * lynx-low.c (lynx_resume): Delete variable ret.
6453
64542013-01-01 Joel Brobecker <brobecker@adacore.com>
6455
6456 * gdbreplay.c (gdbreplay_version): Update copyright year.
6457 * server.c (gdbserver_version): Likewise.
6458
64592012-12-17 Joel Brobecker <brobecker@adacore.com>
6460
6461 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6462 new thread.
6463
64642012-12-17 Joel Brobecker <brobecker@adacore.com>
6465
6466 * lynx-low.c (ptrace_request_to_str): Add handling for
6467 PTRACE_GETTRACESIG.
6468
64692012-12-17 Joel Brobecker <brobecker@adacore.com>
6470
6471 * lynx-low.c (lynx_attach): Delete variable new_process.
6472
64732012-12-17 Joel Brobecker <brobecker@adacore.com>
6474
6475 * lynx-low.c (lynx_create_inferior): Delete variable
6476 new_process.
6477
64782012-12-17 Joel Brobecker <brobecker@adacore.com>
6479
6480 * lynx-low.c (ptrace_request_to_str): Do not handle
6481 PTRACE_GETTHREADLIST if this macro does not exist.
6482
64832012-12-15 Yao Qi <yao@codesourcery.com>
6484
6485 * Makefile.in (OBS): Add notif.o.
6486 * notif.c, notif.h: New.
6487 * server.c: Include "notif.h".
6488 (struct vstop_notif) <next>: Remove.
6489 <base>: New field.
6490 (queue_stop_reply): Update.
6491 (push_event, send_next_stop_reply): Remove.
6492 (discard_queued_stop_replies): Update.
6493 (notif_stop): New variable.
6494 (handle_v_stopped): Remove.
6495 (handle_v_requests): Don't call handle_v_stopped. Call
6496 handle_ack_notif instead.
6497 (queue_stop_reply_callback): Call notif_event_enque instead
6498 of queue_stop_reply.
6499 (handle_status): Don't call send_next_stop_reply, call
6500 notif_write_event instead.
6501 (kill_inferior_callback): Likewise.
6502 (detach_or_kill_inferior_callback): Likewise.
6503 (main): Call initialize_notif.
6504 (process_serial_event): Call QUEUE_is_empty.
6505 (handle_target_event): Call notif_push instead of push event.
6506 * server.h (push_event): Remove declaration.
6507
65082012-12-10 Tom Tromey <tromey@redhat.com>
6509
6510 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6511 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6512 macros.
6513 (.c.o): Rewrite.
6514 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6515 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6516 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6517 (amd64-linux-ipa.o, ax.o): Rewrite.
6518 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6519 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6520 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6521 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6522 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6523 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6524 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6525 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6526 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6527 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6528 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6529 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6530 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6531 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6532 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6533 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6534 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6535 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6536 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6537 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6538 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6539 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6540 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6541 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6542 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6543 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6544 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6545 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6546 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6547 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6548 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6549 (reg-tilegx.o): Remove.
6550 (all_object_files): New macro.
6551 Include .deps files.
6552 * aclocal.m4, configure: Rebuild.
6553 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6554 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6555 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6556
65572012-12-05 Tom Tromey <tromey@redhat.com>
6558
6559 PR gdb/14917:
6560 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6561
65622012-11-28 Markus Metzger <markus.t.metzger@intel.com>
6563
6564 * configure.ac: Check for linux/perf_event.h.
6565 * config.in: Regenerated.
6566 * configure: Regenerated.
6567
65682012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6569
6570 * hostio.c (handle_readlink): Decrease buffer size
6571 parameter passed to readlink by one byte.
6572
65732012-11-26 Yao Qi <yao@codesourcery.com>
6574
6575 * configure.ac (build_warnings): Append '-Wempty-body'.
6576 * configure: Regenerated.
6577 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6578 body.
6579
65802012-11-15 Pierre Muller <muller@sourceware.org>
6581
6582 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6583 * config.in: Regenerate.
6584 * configure: Regenerate.
6585 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6586 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6587 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6588 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6589 header.
6590 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6591 instead of <sys/wait.h> header.
6592 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6593
65942012-11-13 Markus Metzger <markus.t.metzger@intel.com>
6595
6596 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6597 (various make rules): Remove -DGDBSERVER
6598
65992012-11-09 Yao Qi <yao@codesourcery.com>
6600
6601 * spu-low.c (current_ptid): Move it to ..
6602 * gdbthread.h: ... here. New.
6603 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6604 * server.c (myresume, process_serial_event): Likewise.
6605 * thread-db.c (thread_db_find_new_threads): Likewise.
6606 * tracepoint.c (run_inferior_command): Likewise.
6607
66082012-10-01 Andrew Burgess <aburgess@broadcom.com>
6609
6610 * server.c (handle_search_memory_1): Include access length in
6611 warning message.
6612
66132012-09-05 Michael Brandt <michael.brandt@axis.com>
6614
6615 * linux-crisv32-low.c: Fix compile errors.
6616
66172012-09-04 Yao Qi <yao@codesourcery.com>
6618
6619 * tracepoint.c (cmd_qtsv): Adjust debug message.
6620 Don't check CUR_TPOINT.
6621
66222012-08-28 Yao Qi <yao@codesourcery.com>
6623
6624 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6625 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6626 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6627 Remove declarations of xmalloc, xreallloc, xstrdup and
6628 freeargv.
6629 * Makefile.in (libiberty_h): New.
6630 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6631 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6632
66332012-08-23 Yao Qi <yao@codesourcery.com>
6634
6635 * server.h: Remove declaration of 'xsnprintf'.
6636
66372012-08-22 Keith Seitz <keiths@redhat.com>
6638
6639 * server.h: Include build-gnulib-gbserver/config.h.
6640 * gdbreplay.c: Likewise.
6641
66422012-08-08 Doug Evans <dje@google.com>
6643
6644 * Makefile.in (SFILES): Add gdb_vecs.c.
6645 (OBS): Add gdb_vecs.o.
6646 (gdb_vecs_h, host_defs_h): New variables.
6647 (thread-db.o): Add $(gdb_vecs_h) dependency.
6648 (gdb_vecs.o): New rule.
6649 * thread-db.c: #include "gdb_vecs.h".
6650 (thread_db_load_search): Use a vector to iterate over path elements.
6651 Handle text appearing after "$pdir".
6652
6653 * configure.ac: Add check for strstr.
6654 * config.in: Regenerate.
6655 * configure: Regenerate.
6656
66572012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6658
6659 * hostio.c (handle_pread): If pread fails, fall back to attempting
6660 lseek/read.
6661 (handle_pwrite): Likewise for pwrite.
6662
66632012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6664
6665 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6666 between unsupported TYPE and unimplementable ADDR/LEN combination.
6667 (arm_insert_point): Act on new return value.
6668
66692012-07-31 Pedro Alves <palves@redhat.com>
6670
6671 * server.c (process_point_options): Only skip tokens if we find
6672 one that is unrecognized. Don't treat 'X' specially while
6673 skipping unrecognized tokens.
6674
66752012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6676
6677 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6678 to 4-byte-align HW breakpoint addresses for Thumb.
6679
66802012-07-27 Yao Qi <yao@codesourcery.com>
6681
6682 PR remote/14161.
6683
6684 * server.h: Declare gdb_agent_about_to_close.
6685 * target.c (kill_inferior): Include "agent.h".
6686 New. Send command 'kill'.
6687 * target.h (kill_inferior): Removed macro.
6688 * tracepoint.c (gdb_agent_about_to_close): New.
6689 (gdb_agent_helper_thread): Handle command 'close'.
6690 Wait endlessly until the inferior stops.
6691 Install gdb_agent_remove_socket to atexit hook.
6692 (agent_socket_name): New static variable.
6693 (gdb_agent_socket_init): Replace local variable 'name' with
6694 'agent_socket_name'.
6695 (gdb_agent_remove_socket): New.
6696
66972012-07-27 Yao Qi <yao@codesourcery.com>
6698
6699 * server.c (process_point_options): Stop at 'X' when parsing.
6700
67012012-07-19 Michael Eager <eager@eagercon.com>
6702
6703 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
6704 to hw_execute.
6705 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6706 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6707 hardware breakpoint.
6708
67092012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6710
6711 * gdbserver/linux-low.c (initialize_low): Call
6712 linux_ptrace_init_warnings.
6713
67142012-07-02 Doug Evans <dje@google.com>
6715
6716 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6717 pointer to int.
6718
67192012-07-02 Stan Shebs <stan@codesourcery.com>
6720
6721 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6722 (ax.o): Add it to build rule.
6723 (ax-ipa.o): Ditto.
6724 (OBS): Add format.o.
6725 (IPA_OBS): Add format.o.
6726 * server.c (handle_query): Claim support for breakpoint commands.
6727 (process_point_options): Add command case.
6728 (process_serial_event): Leave running if there are printfs in
6729 effect.
6730 * mem-break.h (any_persistent_commands): Declare.
6731 (add_breakpoint_commands): Declare.
6732 (gdb_no_commands_at_breakpoint): Declare.
6733 (run_breakpoint_commands): Declare.
6734 * mem-break.c (struct point_command_list): New struct.
6735 (struct breakpoint): New field command_list.
6736 (any_persistent_commands): New function.
6737 (add_commands_to_breakpoint): New function.
6738 (add_breakpoint_commands): New function.
6739 (gdb_no_commands_at_breakpoint): New function.
6740 (run_breakpoint_commands): New function.
6741 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6742 locally.
6743 * ax.c: Include format.h.
6744 (ax_printf): New function.
6745 (gdb_eval_agent_expr): Add printf opcode.
6746
67472012-06-13 Yao Qi <yao@codesourcery.com>
6748
6749 * server.c (start_inferior): Remove duplicated writes to fields
6750 'last_resume_kind' and 'last_status' of 'current_inferior'.
6751
67522012-06-12 Yao Qi <yao@codesourcery.com>
6753 Pedro Alves <palves@redhat.com>
6754
6755 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6756 comment.
6757 * server.c (handle_v_cont): Extend comment.
6758
67592012-06-11 Yao Qi <yao@codesourcery.com>
6760
6761 * linux-low.c (linux_attach): Add 'static'.
6762
67632012-06-06 Yao Qi <yao@codesourcery.com>
6764
6765 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6766
67672012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6768
6769 Fix gcc -flto compilation warning.
6770 * server.c (main): Make variable multi_mode and attach volatile.
6771
67722012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6773
6774 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6775 if the platform doesn't know about it.
6776
67772012-05-30 Jeff Kenton <jkenton@tilera.com>
6778
6779 * Makefile.in (SFILES): Add linux-tile-low.c.
6780 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6781 * configure.srv: Handle tilegx-*-linux*.
6782 * linux-tile-low.c: New file.
6783
67842012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6785
6786 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6787
67882012-05-24 Pedro Alves <palves@redhat.com>
6789
6790 PR gdb/7205
6791
6792 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
6793
67942012-05-24 Pedro Alves <palves@redhat.com>
6795
6796 PR gdb/7205
6797
6798 Replace target_signal with gdb_signal throughout.
6799
68002012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6801
6802 * linux-low.c (linux_store_registers): Avoid the copying sequence
6803 when no data has been retrieved by ptrace.
6804
68052012-05-22 Will Deacon <will.deacon@arm.com>
6806
6807 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6808 Include asm/ptrace.h.
6809 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6810 already defined.
6811
68122012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6813
6814 * linux-low.c (linux_store_registers): Don't re-retrieve data
6815 with ptrace that has already been obtained from /proc. Always
6816 copy any data retrieved with ptrace to the buffer supplied.
6817
68182012-05-11 Yao Qi <yao@codesourcery.com>
6819 Pedro Alves <palves@redhat.com>
6820
6821 * linux-low.c (enum stopping_threads_kind): New.
6822 (stopping_threads): Change type to `enum stopping_threads_kind'.
6823 (handle_extended_wait): If stopping and suspending threads, leave
6824 the new_lwp suspended too.
6825 (linux_wait_for_event): Adjust.
6826 (stop_all_lwps): Set `stopping_threads' to
6827 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6828 whether we're suspending threads or just stopping them. Assert no
6829 recursion happens.
6830
68312012-04-29 Yao Qi <yao@codesourcery.com>
6832
6833 * server.h: Move some code to ...
6834 * gdbthread.h: ... here. New.
6835 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6836 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6837 (nto-low.o, win32-low.o): Likewise.
6838 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6839 * regcache.c, remote-utils.c, server.c: Likewise.
6840 * target.c, tracepoint.c, win32-low.c: Likewise.
6841
68422012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6843
6844 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6845 (PTRACE_ARG4_TYPE): Likewise.
6846 (PTRACE_XFER_TYPE): Likewise.
6847 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6848 ptrace to PTRACE_ARG3_TYPE.
6849 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6850 (PTRACE_ARG4_TYPE): Likewise.
6851 (PTRACE_XFER_TYPE): Likewise.
6852 (linux_detach_one_lwp): Cast fourth argument of
6853 ptrace to long then PTRACE_ARG4_TYPE.
6854 (regsets_fetch_inferior_registers): Cast third argument of
6855 ptrace to long then PTRACE_ARG3_TYPE.
6856 (regsets_store_inferior_registers): Likewise.
6857
68582012-04-20 Pedro Alves <palves@redhat.com>
6859
6860 * configure: Regenerate.
6861
68622012-04-19 Pedro Alves <palves@redhat.com>
6863
6864 * Makefile.in (GNULIB_BUILDDIR): New.
6865 (LIBGNU, INCGNU, GNULIB_H): Adjust.
6866 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6867 (all, install-only, uninstall, clean-info, all-lib, clean): No
6868 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6869 (maintainer-clean realclean distclean): Use subdir_do.
6870 (subdir_do): New.
6871 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
6872 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
6873 * acinclude.m4: Include acx_configure_dir.m4.
6874 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6875 calls. Call AC_PROG_RANLIB. Configure gnulib using
6876 ACX_CONFIGURE_DIR.
6877 (GNULIB): New.
6878 (GNULIB_STDINT_H): Adjust.
6879 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6880 * gdbreplay.c: Include build-gnulib/config.h.
6881 * server.h: Likewise.
6882 * aclocal.m4: Regenerate.
6883 * config.in: Regenerate.
6884 * configure: Regenerate.
6885
68862012-04-19 Pedro Alves <palves@redhat.com>
6887
6888 * Makefile.in (LIBGNU, INCGNU): Adjust.
6889 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6890 (all, install-only, uninstall, clean-info, all-lib, clean)
6891 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6892 * configure.ac: Adjust AC_OUTPUT output.
6893 * aclocal.m4: Regenerate.
6894 * configure: Regenerate.
6895
68962012-04-19 Pedro Alves <palves@redhat.com>
6897
6898 * Makefile.in (generated_files): New.
6899 (server_h): Remove the explicit dependency on config.h, and depend
6900 on $generated_files.
6901
69022012-04-19 Pedro Alves <palves@redhat.com>
6903
6904 * Makefile.in (INCGNU): Add -Ignulib.
6905
69062012-04-19 Pedro Alves <palves@redhat.com>
6907
6908 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6909 (INCGNU): ... this, and spell out -I here.
6910 (GNULIB_LIB): Rename to ...
6911 (LIBGNU): ... this.
6912 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6913
69142012-04-19 Pedro Alves <palves@redhat.com>
6915
6916 * config.in: Regenerate.
6917
69182012-04-19 Pedro Alves <palves@redhat.com>
6919
6920 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6921 * server.h (memmem): Remove declaration.
6922 * config.in: Regenerate.
6923 * configure: Regenerate.
6924
69252012-04-19 Yao Qi <yao@codesourcery.com>
6926
6927 * Makefile.in (SFILES): Add common/vec.c.
6928 (OBS): Add vec.o.
6929 (vec.o): New rule.
6930
69312012-04-19 Yao Qi <yao@codesourcery.com>
6932
6933 * remote-utils.c (prepare_resume_reply): Replace with macro
6934 target_core_of_thread.
6935 * server.c (handle_qxfer_threads_proper): Likewise.
6936 * target.h (traget_core_of_thread): New macro.
6937
69382012-04-18 Pedro Alves <palves@redhat.com>
6939
6940 * aclocal.m4: Regenerate.
6941 * configure: Regenerate.
6942
69432012-04-16 Yao Qi <yao@codesourcery.com>
6944
6945 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6946 duplicated on address.
6947
69482012-04-16 Yao Qi <yao@codesourcery.com>
6949
6950 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6951 (struct tracepoint_action_ops) <send>: New field.
6952 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6953 (agent_expr_send, x_tracepoint_action_send): New.
6954 (l_tracepoint_action_send): New.
6955 (cmd_qtdp): Download and install tracepoint
6956 according to `use_agent'.
6957 (run_inferior_command): Add one more parameter `len'.
6958 Update callers.
6959 (tracepoint_send_agent): New.
6960 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6961
69622012-04-16 Yao Qi <yao@codesourcery.com>
6963
6964 * tracepoint.c (download_tracepoints): Moved to ...
6965 (cmd_qtstart): ... here.
6966
69672012-04-14 Yao Qi <yao@codesourcery.com>
6968
6969 * tracepoint.c: Include inttypes.h.
6970 (struct collect_memory_action): Use sized types.
6971 (struct tracepoint): Likewise.
6972 (cmd_qtdp, stop_tracing): Update print specifiers.
6973 (cmd_qtp, response_tracepoint): Likewise.
6974 (collect_data_at_tracepoint): Likewise.
6975 (collect_data_at_step): Likewise.
6976
69772012-04-14 Yao Qi <yao@codesourcery.com>
6978
6979 Import gnulib module inttypes.
6980 * aclocal.m4, config.in, configure: Regenerated.
6981
69822012-04-14 Yao Qi <yao@codesourcery.com>
6983
6984 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6985 Makefile and config.status at last.
6986
69872012-04-13 Yao Qi <yao@codesourcery.com>
6988
6989 * tracepoint.c: Include stdint.h unconditionally.
6990
69912012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6992
6993 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6994 on BFD_HAVE_SYS_PROCFS_TYPE.
6995 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
6996 * configure: Regenerate.
6997 * config.in: Likewise.
6998
69992012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7000
7001 * Makefile.in (clean): Also remove x32.c x32-linux.c
7002 x32-avx.c x32-avx-linux.c.
7003 (x32.o): New target.
7004 (x32.c): Likewise.
7005 (x32-linux.o): Likewise.
7006 (x32-linux.c): Likewise.
7007 (x32-avx.o): Likewise.
7008 (x32-avx.c): Likewise.
7009 (x32-avx-linux.o): Likewise.
7010 (x32-avx-linux.c): Likewise.
7011
7012 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7013 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7014 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7015 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7016 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7017 i386/x32-avx-linux.xml.
7018
7019 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7020 (init_registers_x32_avx_linux): Likwise.
7021 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7022 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7023
70242012-04-13 Pedro Alves <palves@redhat.com>
7025
7026 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7027 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7028 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7029 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7030 the sub-make.
7031
70322012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7033
7034 * linux-x86-low.c (compat_x32_clock_t): New.
7035 (compat_x32_siginfo_t): Likewise.
7036 (compat_x32_siginfo_from_siginfo): Likewise.
7037 (siginfo_from_compat_x32_siginfo): Likewise.
7038 (linux_is_elf64): Likewise.
7039 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7040 and siginfo_from_compat_x32_siginfo for x32.
7041 (x86_arch_setup): Set linux_is_elf64.
7042
70432012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7044
7045 PR gdb/13969
7046 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7047 e_machine field.
7048 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7049 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7050 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7051 compatible with process.
7052
70532012-04-12 Yao Qi <yao@codesourcery.com>
7054
7055 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7056 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7057 (install-only, install-info, clean): Handle sub dir gnulib.
7058 (all-lib, am--refresh): New targets.
7059 (memmem.o): Remove target.
7060 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7061 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7062 (AC_REPLACE_FUNCS): Remove memmem.
7063 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7064 (AC_OUTPUT): Generate Makefile in gnulib/.
7065 * aclocal.m4, config.in, configure: Regenerated.
7066
70672012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7068
7069 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7070
70712012-04-05 Pedro Alves <palves@redhat.com>
7072
7073 -Werror=strict-aliasing
7074
7075 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7076 pointer.
7077
70782012-04-04 Pedro Alves <palves@redhat.com>
7079
7080 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7081 (sparc_store_gregset_from_stack, sparc_store_gregset)
7082 (sparc_breakpoint_at): Fix formatting.
7083
70842012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7085
7086 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7087 are available.
7088 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7089 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7090 * config.in: Regenerate.
7091 * configure: Likewise.
7092
70932012-03-29 Pedro Alves <palves@redhat.com>
7094
7095 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7096 Correct ptrace arguments.
7097
70982012-03-28 Pedro Alves <palves@redhat.com>
7099
7100 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7101 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7102 (IA64_FR1_REGNUM): New defines.
7103 (ia64_fetch_register): New.
7104 (the_low_target): Install it.
7105 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7106 field.
7107 * linux-low.c (linux_fetch_registers): Try the
7108 the_low_target.fetch_register hook first.
7109
7110 * linux-arm-low.c (the_low_target): Adjust.
7111 * linux-bfin-low.c (the_low_target): Adjust.
7112 * linux-cris-low.c (the_low_target): Adjust.
7113 * linux-crisv32-low.c (the_low_target): Adjust.
7114 * linux-m32r-low.c (the_low_target): Adjust.
7115 * linux-m68k-low.c (the_low_target): Adjust.
7116 * linux-mips-low.c (the_low_target): Adjust.
7117 * linux-ppc-low.c (the_low_target): Adjust.
7118 * linux-s390-low.c (the_low_target): Adjust.
7119 * linux-sh-low.c (the_low_target): Adjust.
7120 * linux-sparc-low.c (the_low_target): Adjust.
7121 * linux-tic6x-low.c (the_low_target): Adjust.
7122 * linux-x86-low.c (the_low_target): Adjust.
7123 * linux-xtensa-low.c (the_low_target): Adjust.
7124
71252012-03-26 Pedro Alves <palves@redhat.com>
7126
7127 * server.c (handle_qxfer_libraries): Don't bail early if
7128 the_target->qxfer_libraries_svr4 is not NULL.
7129
71302012-03-26 Pedro Alves <palves@redhat.com>
7131
7132 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7133
71342012-03-23 Pedro Alves <palves@redhat.com>
7135
7136 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7137 "library-list-svr4" element's start tag when the the DSO list is
7138 empty.
7139
71402012-03-23 Pedro Alves <palves@redhat.com>
7141
7142 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7143 a variable whose type size is the same as the inferior's pointer
7144 size.
7145
71462012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7147
7148 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7149 struct siginfo.
7150 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7151 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7152 * linux-low.h: Include <signal.h>.
7153 (struct siginfo): Remove forward declaration.
7154 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7155 struct siginfo.
7156
71572012-03-21 Mike Frysinger <vapier@gentoo.org>
7158
7159 * .gitignore: Ignore more files.
7160
71612012-03-19 Pedro Alves <palves@redhat.com>
7162 Jan Kratochvil <jan.kratochvil@redhat.com>
7163
7164 * server.c (cont_thread, general_thread): Add describing comments.
7165 (start_inferior): Clear `cont_thread'.
7166 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7167 of a process.
7168
71692012-03-15 Yao Qi <yao@codesourcery.com>
7170
7171 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7172 handling to ...
7173 (cmd_qtdp): ... here.
7174
71752012-03-15 Yao Qi <yao@codesourcery.com>
7176
7177 * tracepoint.c (struct tracepoint_action_ops): New.
7178 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7179 (m_tracepoint_action_download): New.
7180 (r_tracepoint_action_download): New.
7181 (x_tracepoint_action_download): New.
7182 (l_tracepoint_action_download): New.
7183 (add_tracepoint_action): Install `action->ops' according type.
7184 (download_tracepoint_1): Move code `download' function pointer
7185 of various tracepoint_action_ops.
7186
71872012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7188
7189 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7190 linux_ptrace_attach_warnings.
7191
71922012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7193
7194 * Makefile.in (linux-ptrace.o): New.
7195 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7196 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7197 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7198 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7199 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7200 of these targets.
7201 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7202
72032012-03-08 Yao Qi <yao@codesourcery.com>
7204 Pedro Alves <palves@redhat.com>
7205
7206 Fix PR server/13392.
7207 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7208 offset of JMP insn.
7209 * tracepoint.c (remove_tracepoint): New.
7210 (cmd_qtdp): Call remove_tracepoint when failed to install.
7211
72122012-03-07 Pedro Alves <palves@redhat.com>
7213
7214 * linux-low.c (get_detach_signal): New.
7215 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7216 Pass on pending signals to PTRACE_DETACH. Check the result of the
7217 ptrace call.
7218 * server.c (program_signals, program_signals_p): New.
7219 (handle_general_set): Handle QProgramSignals.
7220 * server.h (program_signals, program_signals_p): Declare.
7221
72222012-03-05 Pedro Alves <palves@redhat.com>
7223 Jan Kratochvil <jan.kratochvil@redhat.com>
7224
7225 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7226 New comment why.
7227
72282012-03-03 Yao Qi <yao@codesourcery.com>
7229
7230 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7231 agent_look_up_symbols.
7232
72332012-03-03 Yao Qi <yao@codesourcery.com>
7234
7235 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7236 (linux-x86-low.o): Likewise.
7237 * server.h: Remove in_process_agent_loaded.
7238 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7239 common/agent.c.
7240 Update callers.
7241
72422012-03-03 Yao Qi <yao@codesourcery.com>
7243
7244 * tracepoint.c (gdb_agent_capability): New global.
7245 (in_process_agent_loaded_ust): Renamed to
7246 `in_process_agent_supports_ust'.
7247 Update callers.
7248 (in_process_agent_supports_ust): Call agent_capability_check.
7249 (clear_installed_tracepoints): Assert that agent supports
7250 agent.
7251
72522012-03-03 Yao Qi <yao@codesourcery.com>
7253
7254 * linux-low.c (linux_supports_agent): New.
7255 (linux_target_ops): Initialize field `supports_agent' with
7256 linux_supports_agent.
7257 * target.h (struct target_ops) <supports_agent>: New.
7258 (target_supports_agent): New macro.
7259 * server.c (handle_general_set): Handle packet 'QAgent'.
7260 (handle_query): Send `QAgent+'.
7261 * Makefile.in (server.o): Depends on agent.h.
7262
72632012-03-03 Yao Qi <yao@codesourcery.com>
7264
7265 * Makefile.in (OBS): Add agent.o.
7266 Add new rule for agent.o.
7267 Track dependence of tracepoint.c on agent.h.
7268 * tracepoint.c (run_inferior_command_1):
7269 (run_inferior_command): Call agent_run_command.
7270 (gdb_ust_connect_sync_socket): Deleted. Move it to
7271 common/agent.c.
7272 (resume_thread, stop_thread): Likewise.
7273 (gdb_ust_socket_init): Renamed to ...
7274 (gdb_agent_socket_init): ... New.
7275 (gdb_ust_thread): Renamed to ...
7276 (gdb_agent_helper_thread): ... New.
7277 (gdb_ust_init): Move some code to ...
7278 (gdb_agent_init): ... here. New.
7279 [HAVE_UST]: Call gdb_ust_init.
7280 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7281 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7282 * config.in, configure: Regenerated.
7283
72842012-03-02 Pedro Alves <palves@redhat.com>
7285
7286 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7287 * linux-low.c (struct simple_pid_list): New.
7288 (stopped_pids): New a struct simple_pid_list pointer.
7289 (add_to_pid_list, pull_pid_from_list): New.
7290 (handle_extended_wait): Don't assume the first signal new children
7291 report is SIGSTOP. Adjust call to pull_pid_from_list.
7292 (linux_wait_for_lwp): Adjust.
7293
72942012-03-02 Yao Qi <yao@codesourcery.com>
7295
7296 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7297 debug log.
7298
72992012-03-02 Yao Qi <yao@codesourcery.com>
7300
7301 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7302 `stop_pc' and `tpoint'. Update caller.
7303
73042012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7305
7306 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7307 * linux-low.c (use_linux_regsets): New macro.
7308 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7309 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7310 (linux_register_in_regsets): New function.
7311 (usr_fetch_inferior_registers): Skip registers covered by
7312 regsets.
7313 (usr_store_inferior_registers): Likewise.
7314 (usr_fetch_inferior_registers): New macro.
7315 (usr_store_inferior_registers): Likewise.
7316 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7317 (linux_store_registers): Likewise.
7318 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7319 prototype.
7320 (init_registers_mips64_dsp_linux): Likewise.
7321 (init_registers_mips_linux): New macro.
7322 (init_registers_mips_dsp_linux): Likewise.
7323 (mips_dsp_num_regs): Likewise.
7324 (DSP_BASE, DSP_CONTROL): New fallback macros.
7325 (mips_base_regs): New macro.
7326 (mips_regmap): Use it. Fix the size.
7327 (mips_dsp_regmap): New variable.
7328 (mips_dsp_regset_bitmap): Likewise.
7329 (mips_arch_setup): New function.
7330 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7331 than mips_regmap.
7332 (mips_cannot_store_register): Likewise.
7333 (the_low_target): Update .arch_setup, .num_regs and .regmap
7334 initializers. Add .regset_bitmap initializer.
7335 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7336 initializer.
7337 * linux-bfin-low.c (the_low_target): Likewise.
7338 * linux-cris-low.c (the_low_target): Likewise.
7339 * linux-crisv32-low.c (the_low_target): Likewise.
7340 * linux-ia64-low.c (the_low_target): Likewise.
7341 * linux-m32r-low.c (the_low_target): Likewise.
7342 * linux-m68k-low.c (the_low_target): Likewise.
7343 * linux-ppc-low.c (the_low_target): Likewise.
7344 * linux-s390-low.c (the_low_target): Likewise.
7345 * linux-sh-low.c (the_low_target): Likewise.
7346 * linux-sparc-low.c (the_low_target): Likewise.
7347 * linux-tic6x-low.c (the_low_target): Likewise.
7348 * linux-x86-low.c (the_low_target): Likewise.
7349 * linux-xtensa-low.c (the_low_target): Likewise.
7350 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7351 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7352 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7353 srv_xmlfiles.
7354 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7355 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7356
73572012-02-29 Yao Qi <yao@codesourcery.com>
7358 Pedro Alves <palves@redhat.com>
7359
7360 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7361 `step_over_finished' is true.
7362
73632012-02-27 Pedro Alves <palves@redhat.com>
7364
7365 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7366 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7367
73682012-02-27 Pedro Alves <palves@redhat.com>
7369
7370 PR server/9684
7371 * linux-low.c (pid_is_stopped): New.
7372 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7373
73742012-02-25 Luis Machado <lgustavo@codesourcery.com>
7375
7376 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7377 of conditions.
7378
73792012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7380
7381 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7382
73832012-02-24 Luis Machado <lgustavo@codesourcery>
7384
7385 * server.c (handle_query): Advertise support for target-side
7386 breakpoint condition evaluation.
7387 (process_point_options): New function.
7388 (process_serial_event): When inserting a breakpoint, check for
7389 a target-side condition that should be evaluated.
7390
7391 * mem-break.c: Include regcache.h and ax.h.
7392 (point_cond_list_t): New data structure.
7393 (breakpoint) <cond_list>: New field.
7394 (find_gdb_breakpoint_at): Make non-static.
7395 (delete_gdb_breakpoint_at): Clear any target-side
7396 conditions.
7397 (clear_gdb_breakpoint_conditions): New function.
7398 (add_condition_to_breakpoint): Likewise.
7399 (add_breakpoint_condition): Likewise.
7400 (gdb_condition_true_at_breakpoint): Likewise.
7401 (gdb_breakpoint_here): Return result directly instead
7402 of going through a local variable.
7403
7404 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7405 (clear_gdb_breakpoint_conditions): Likewise.
7406 (add_breakpoint_condition): Likewise.
7407 (gdb_condition_true_at_breakpoint): Likewise.
7408
7409 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7410 (need_step_over_p): Take target-side breakpoint condition into
7411 consideration.
7412
74132012-02-24 Luis Machado <lgustavo@codesourcery>
7414
7415 * server.h: Include tracepoint.h.
7416 (agent_mem_read, agent_get_trace_state_variable_value,
7417 agent_set_trace_state_variable_value,
7418 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7419 get_set_tsv_func_addr): New prototypes.
7420
7421 * ax.h: New include file.
7422 * ax.c: New source file.
7423
7424 * tracepoint.c: Include ax.h.
7425 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7426 agent_expr, eval_result_type): Move to ax.h.
7427 (parse_agent_expr): Rename to ...
7428 (gdb_parse_agent_expr): ... this, make it non-static and move
7429 to ax.h.
7430 (unparse_agent_expr) Rename to ...
7431 (gdb_unparse_agent_expr): ... this, make it non-static and move
7432 to ax.h.
7433 (eval_agent_expr): Rename to ...
7434 (eval_tracepoint_agent_expr): ... this.
7435 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7436 forward declarations.
7437 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7438 (agent_get_trace_state_variable_value): New function.
7439 (agent_set_trace_state_variable_value): New function.
7440 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7441 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7442 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7443 (condition_true_at_tracepoint): Likewise.
7444 (parse_agent_expr): Rename to ...
7445 (gdb_parse_agent_expr): ... this and move to ax.c.
7446 (unparse_agent_expr): Rename to ...
7447 (gdb_unparse_agent_expr): ... this and move to ax.c.
7448 (gdb_agent_op_name): Move to ax.c.
7449 (eval_agent_expr): Rename to ...
7450 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7451 and move to ax.c.
7452 (eval_tracepoint_agent_expr): New function.
7453 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
7454 non-static.
7455 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7456 ax.c.
7457 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7458 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7459 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7460 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7461 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7462 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7463 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7464 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7465 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7466 (compile_bytecodes): Remove forward declaration.
7467 (is_goto_target): Move to ax.c.
7468 (compile_bytecodes): Move to ax.c and call
7469 agent_get_trace_state_variable_value (...) and
7470 agent_set_trace_state_variable_value (...).
7471
7472 * Makefile.in: Update ax.c and IPA dependencies.
7473
74742012-02-24 Pedro Alves <palves@redhat.com>
7475
7476 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7477 (cmd_bigqtbuffer_circular): ... this. Only handle
7478 'QTBuffer:circular:'.
7479 (handle_tracepoint_general_set): Adjust.
7480
74812012-02-16 Yao Qi <yao@codesourcery.com>
7482
7483 * inferiors.c: Move code to ...
7484 * dll.c: .... here. New.
7485 * server.h: Declare clear_dlls.
7486 * Makefile.in (SFILES): Add dll.c.
7487 (OBS): Add dll.o
7488 (dll.o): New rule.
7489
74902012-02-11 Yao Qi <yao@codesourcery.com>
7491
7492 * server.c: (handle_monitor_command): Add a new parameter
7493 `own_buf'.
7494 (handle_query): Update caller.
7495
74962012-02-09 Joel Brobecker <brobecker@adacore.com>
7497
7498 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7499 * configure, config.in: Regenerate.
7500 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7501 is not defined.
7502
75032012-02-02 Pedro Alves <palves@redhat.com>
7504
7505 Try SIGKILL first, then PTRACE_KILL.
7506 * linux-low.c (linux_kill_one_lwp): New.
7507 (linux_kill_one_lwp): Rename to ...
7508 (kill_one_lwp_callback): ... this. Use the new
7509 linux_kill_one_lwp.
7510
75112012-02-02 Pedro Alves <palves@redhat.com>
7512
7513 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7514 inferior.
7515
75162012-01-27 Pedro Alves <palves@redhat.com>
7517
7518 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7519 (elf_64_file_p): Make static.
7520 (linux_pid_exe_is_elf_64_file): New.
7521 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7522 Delete declarations.
7523 (linux_pid_exe_is_elf_64_file): Declare.
7524 * linux-x86-low.c (x86_arch_setup): Use
7525 linux_pid_exe_is_elf_64_file.
7526
75272012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7528
7529 * linux-low.c (linux_wait_for_event_1): Rename to ...
7530 (linux_wait_for_event): ... here and merge it with former
7531 linux_wait_for_event - new variable wait_ptid, use it.
7532 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7533
75342012-01-23 Pedro Alves <palves@redhat.com>
7535
7536 * server.c (main): Avoid yet another case of infinite loop while
7537 detaching/killing after a longjmp.
7538
75392012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7540
7541 Code cleanup.
7542 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7543
75442012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7545
7546 * hostio.c (handle_readlink): New function.
7547 (handle_vFile): Call it to handle "vFile:readlink" packets.
7548
75492012-01-20 Pedro Alves <palves@redhat.com>
7550 Ulrich Weigand <ulrich.weigand@linaro.org>
7551
7552 * server.c (handle_v_requests): Only support vAttach and vRun to
7553 start multiple processes when in extended protocol mode.
7554
75552012-01-17 Pedro Alves <palves@redhat.com>
7556
7557 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7558 memalign plus mprotect to allocate the scratch buffer.
7559
75602012-01-13 Pedro Alves <palves@redhat.com>
7561
7562 * server.c (attach_inferior): Clear `cont_thread'.
7563
75642012-01-13 Pedro Alves <palves@redhat.com>
7565
7566 * server.c (main): Avoid infinite loop while detaching/killing
7567 after a longjmp.
7568
75692012-01-09 Doug Evans <dje@google.com>
7570
7571 * server.c (start_inferior): Set last_ptid in --wrapper case.
7572
75732012-01-06 Yao Qi <yao@codesourcery.com>
7574
7575 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7576 defined.
7577 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7578
75792012-01-04 Yao Qi <yao@codesourcery.com>
7580
7581 * tracepoint.c (cmd_qtdp): Print debug message
7582 for static tracepoint.
7583
75842012-01-04 Yao Qi <yao@codesourcery.com>
7585
7586 * tracepoint.c (trace_vdebug): Differentiate debug message
7587 between gdbserver and IPA.
7588
75892012-01-03 Yao Qi <yao@codesourcery.com>
7590
7591 * tracepoint.c (tracepoint_was_hit): Don't collect for
7592 static tracepoint.
7593
75942012-01-02 Joel Brobecker <brobecker@adacore.com>
7595
7596 * terminal.h: Reformat copyright header.
7597
75982012-01-02 Joel Brobecker <brobecker@adacore.com>
7599
7600 * server.c (gdbserver_version): Update copyright year.
7601 * gdbreplay.c (gdbreplay_version): Likewise.
7602
76032011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7604
7605 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7606
7607 Revert:
7608 2011-12-18 Hui Zhu <teawater@gmail.com>
7609 * linux-low.c (linux_create_inferior): Save return value to ret.
7610
76112011-12-18 Hui Zhu <teawater@gmail.com>
7612
7613 * linux-low.c (linux_create_inferior): Save return value to ret.
7614
76152011-12-16 Doug Evans <dje@google.com>
7616
7617 * linux-low.c (linux_create_inferior): If stdio connection,
7618 redirect stdin from /dev/null, stdout to stderr.
7619 * remote-utils.c (remote_is_stdio): New static global.
7620 (remote_connection_is_stdio): New function.
7621 (remote_prepare): Handle stdio connection.
7622 (remote_open): Ditto.
7623 (remote_close): Don't close stdin for stdio connections.
7624 (read_prim,write_prim): New functions. Replace all calls to
7625 read/write to these.
7626 * server.c (main): Watch for "-" argument. Move call to
7627 remote_prepare before start_inferior.
7628 * server.h (STDIO_CONNECTION_NAME): New macro.
7629 (remote_connection_is_stdio): Declare.
7630
7631 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7632 in debugging output.
7633
76342011-12-15 Yao Qi <yao@codesourcery.com>
7635
7636 * tracepoint.c: Include sys/syscall.h.
7637 (gdb_ust_thread): Remove preprocessor conditional.
7638
76392011-12-14 Pedro Alves <pedro@codesourcery.com>
7640
7641 * linux-low.c (linux_detach_one_lwp): Call
7642 the_low_target.prepare_to_resume before detaching.
7643
76442011-12-14 Yao Qi <yao@codesourcery.com>
7645
7646 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7647 of write.
7648
76492011-12-14 Yao Qi <yao@codesourcery.com>
7650
7651 * i386-low.c (i386_low_stopped_data_address): Initialize local
7652 variable `control'.
7653
76542011-12-13 Pedro Alves <pedro@codesourcery.com>
7655
7656 PR remote/13492
7657
7658 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7659 DR_CONTROL unless necessary. Extend comments.
7660 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7661 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7662
76632011-12-13 Yao Qi <yao@codesourcery.com>
7664
7665 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7666 macros.
7667 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7668
76692011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7670
7671 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7672 Print new debug message for such case.
7673
76742011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7675
7676 Fix overlapping memcpy.
7677 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7678 the read_inferior_memory transfer.
7679 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7680 write_inferior_memory transfer.
7681 (set_fast_tracepoint_jump): New variable buf. Use it for the
7682 read_inferior_memory and write_inferior_memory transfers.
7683 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7684 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7685 Use it for the write_inferior_memory transfer.
7686 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7687 buffers.
7688
76892011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7690
7691 * linux-low.c (fetch_register, store_register): Make code
7692 consistent, fix formatting.
7693
76942011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7695
7696 * linux-low.c (usr_store_inferior_registers): Factor out code
7697 to handle individual registers into...
7698 (store_register): ... this new function.
7699
77002011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7701
7702 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7703 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7704 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7705 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7706 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7707 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7708 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7709 (srv_xmlfiles): Add new XML files.
7710
7711 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7712 and <sys/uio.h>.
7713 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7714 (init_registers_s390_linux32v1): Add prototype.
7715 (init_registers_s390_linux32v2): Likewise.
7716 (init_registers_s390_linux64v1): Likewise.
7717 (init_registers_s390_linux64v2): Likewise.
7718 (init_registers_s390x_linux64v1): Likewise.
7719 (init_registers_s390x_linux64v2): Likewise.
7720 (s390_num_regs): Increment to 52.
7721 (s390_regmap): Add orig_r2 register.
7722 (s390_num_regs_3264): Increment to 68.
7723 (s390_regmap_3264): Add orig_r2 register.
7724 (s390_collect_ptrace_register): Handle orig_r2 register.
7725 (s390_supply_ptrace_register): Likewise.
7726 (s390_fill_last_break): New function.
7727 (s390_store_last_break): Likewise.
7728 (s390_fill_system_call): New function.
7729 (s390_store_system_call): Likewise.
7730 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7731 register sets.
7732 (s390_check_regset): New function.
7733 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7734 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7735 Update target_regsets for available register sets.
7736
77372011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7738 Jan Kratochvil <jan.kratochvil@redhat.com>
7739
7740 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7741 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7742 New.
7743 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7744 * linux-low.h (struct process_info_private): New member r_debug.
7745 * server.c (handle_qxfer_libraries): Call
7746 the_target->qxfer_libraries_svr4.
7747 (handle_qxfer_libraries_svr4): New function.
7748 (qxfer_packets): New entry "libraries-svr4".
7749 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7750 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7751 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7752 PACKET_qXfer_libraries_svr4.
7753
77542011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7755
7756 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7757 PSW address/mask between 8-byte and 16-byte formats.
7758 (s390_supply_ptrace_register): Likewise.
7759 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7760 basic addressing mode bit.
7761
77622011-11-24 Stan Shebs <stan@codesourcery.com>
7763
7764 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7765
77662011-11-17 Stan Shebs <stan@codesourcery.com>
7767
7768 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7769 (tracing_start_time): New global.
7770 (tracing_stop_time): New global.
7771 (tracing_user_name): New global.
7772 (tracing_notes): New global.
7773 (tracing_stop_note): New global.
7774 (cmd_qtstart): Set traceframe_usage, start_time.
7775 (stop_tracing): Set stop_time.
7776 (cmd_qtstatus): Report additional status.
7777 (cmd_qtp): New function.
7778 (handle_tracepoint_query): Call it.
7779 (cmd_qtnotes): New function.
7780 (handle_tracepoint_general_set): Call it.
7781 (get_timestamp): Rename from tsv_get_timestamp.
7782
77832011-11-14 Stan Shebs <stan@codesourcery.com>
7784 Kwok Cheung Yeung <kcy@codesourcery.com>
7785
7786 * linux-x86-low.c (small_jump_insn): New.
7787 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7788 trampoline and error message, build a trampoline and issue a small
7789 jump instruction to it.
7790 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7791 trampoline and error message.
7792 (x86_get_min_fast_tracepoint_insn_len): New.
7793 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7794 * linux-low.h (struct linux_target_ops): Add arguments to
7795 install_fast_tracepoint_jump_pad operation, add new operation.
7796 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7797 arguments.
7798 (linux_get_min_fast_tracepoint_insn_len): New function.
7799 (linux_target_op): Add new operation.
7800 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7801 (gdb_trampoline_buffer_end): Ditto.
7802 (gdb_trampoline_buffer_error): Ditto.
7803 (struct ipa_sym_addresses): Add fields for new IPA variables.
7804 (symbol_list): Add entries for new IPA variables.
7805 (struct tracepoint): Add fields to hold the address range of the
7806 trampoline used by the tracepoint.
7807 (trampoline_buffer_head): New static variable.
7808 (trampoline_buffer_tail): Ditto.
7809 (claim_trampoline_space): New function.
7810 (have_fast_tracepoint_trampoline_buffer): New function.
7811 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7812 structure.
7813 (install_fast_tracepoint): Ditto, also add error buffer argument.
7814 (cmd_qtminftpilen): New function.
7815 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7816 (fast_tracepoint_from_trampoline_address): New function.
7817 (fast_tracepoint_collecting): Handle trampoline as part of jump
7818 pad space.
7819 (set_trampoline_buffer_space): New function.
7820 (initialize_tracepoint): Initialize new IPA variables.
7821 * target.h (struct target_ops): Add arguments to
7822 install_fast_tracepoint_jump_pad operation, add new
7823 get_min_fast_tracepoint_insn_len operation.
7824 (target_get_min_fast_tracepoint_insn_len): New.
7825 (install_fast_tracepoint_jump_pad): Add arguments.
7826 * server.h (IPA_BUFSIZ): Define.
7827 * linux-i386-ipa.c: Include extra header files.
7828 (initialize_fast_tracepoint_trampoline_buffer): New function.
7829 (initialize_low_tracepoint): Call it.
7830 * server.h (set_trampoline_buffer_space): Declare.
7831 (claim_trampoline_space): Ditto.
7832 (have_fast_tracepoint_trampoline_buffer): Ditto.
7833
78342011-11-14 Yao Qi <yao@codesourcery.com>
7835
7836 * server.c (handle_query): Handle InstallInTrace for qSupported.
7837 * tracepoint.c (add_tracepoint): Sort list.
7838 (install_tracepoint, download_tracepoint): New.
7839 (cmd_qtdp): Call them to install and download tracepoints.
7840 (sort_tracepoints): Removed.
7841 (cmd_qtstart): Update.
7842
78432011-11-14 Yao Qi <yao@codesourcery.com>
7844
7845 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7846 * mem-break.h: Declare.
7847 * tracepoint.c (cmd_qtstart): Move some code to ...
7848 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7849 New.
7850 (download_tracepoints): Move some code to ...
7851 (download_tracepoint_1): ... here. New.
7852
78532011-11-08 Yao Qi <yao@codesourcery.com>
7854
7855 * remote-utils.c (relocate_instruction): A comment fix.
7856
78572011-11-07 Joel Brobecker <brobecker@adacore.com>
7858
7859 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7860 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7861 dr_status_mirror and dr_control_mirror from debug_reg_state.
7862 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7863 (i386_initial_stuff): Remove use of deleted globals.
7864 (i386_get_thread_context, i386_set_thread_context,
7865 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7866 from debug_reg_state.
7867
78682011-11-05 Yao Qi <yao@codesourcery.com>
7869
7870 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7871 address as TPOINT's.
7872
78732011-11-02 Stan Shebs <stan@codesourcery.com>
7874
7875 * tracepoint.c (agent_mem_read_string): New function.
7876 (eval_agent_expr): Call it for tracenz.
7877 * server.c (handle_query): Report support for tracenz.
7878
78792011-11-02 Yao Qi <yao@codesourcery.com>
7880
7881 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7882
78832011-11-02 Yao Qi <yao@codesourcery.com>
7884
7885 * target.h: Fix a typo in comment.
7886
78872011-10-31 Pedro Alves <pedro@codesourcery.com>
7888
7889 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7890 clobber the breakpoints' shadows with fast tracepoint jumps.
7891 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7892 * target.c (write_inferior_memory): Also pass MYADDR down to
7893 check_mem_write.
7894
78952011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7896
7897 * configure.ac: Check support for personality routine.
7898 * configure: Regenerate.
7899 * config.in: Likewise.
7900 * linux-low.c: Include <sys/personality.h>.
7901 Define ADDR_NO_RANDOMIZE if necessary.
7902 (linux_create_inferior): Disable address space randomization when
7903 forking inferior, if requested.
7904 (linux_supports_disable_randomization): New function.
7905 (linux_target_ops): Install it.
7906 * server.h (disable_randomization): Declare.
7907 * server.c (disable_randomization): New global variable.
7908 (handle_general_set): Handle QDisableRandomization.
7909 (handle_query): Likewise for qSupported.
7910 (main): Support --disable-randomization and --no-disable-randomization
7911 command line arguments.
7912 * target.h (struct target_ops): Add supports_disable_randomization.
7913 (target_supports_disable_randomization): New macro.
7914
79152011-09-29 Mike Frysinger <vapier@gentoo.org>
7916
7917 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7918 ifdef check.
7919 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7920 [!PT_GETDSBT] (target_loadmap): New definition.
7921 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7922 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7923 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7924 and PT_GETDSBT to LINUX_LOADMAP.
7925 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7926 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7927
79282011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7929
7930 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7931 (arm_linux_hwbp_cap): New static variable.
7932 (arm_linux_get_hwbp_cap): Replace by ...
7933 (arm_linux_init_hwbp_cap): ... this new function.
7934 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7935 (arm_linux_get_hw_watchpoint_count): Likewise.
7936 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7937 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7938 (arm_prepare_to_resume): Use perror_with_name instead of error.
7939
79402011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
7941
7942 * linux-arm-low.c: Include <signal.h>.
7943 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7944 (struct arm_linux_hwbp_cap): New data type.
7945 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7946 (struct arm_linux_hw_breakpoint): New data type.
7947 (MAX_BPTS, MAX_WPTS): Define.
7948 (struct arch_process_info, struct arch_lwp_info): New data types.
7949 (arm_linux_get_hwbp_cap): New function.
7950 (arm_linux_get_hw_breakpoint_count): Likewise.
7951 (arm_linux_get_hw_watchpoint_count): Likewise.
7952 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7953 (arm_hwbp_control_initialize): Likewise.
7954 (arm_hwbp_control_is_enabled): Likewise.
7955 (arm_hwbp_control_is_initialized): Likewise.
7956 (arm_hwbp_control_disable): Likewise.
7957 (arm_linux_hw_breakpoint_equal): Likewise.
7958 (arm_linux_hw_point_initialize): Likewise.
7959 (struct update_registers_data): New data structure.
7960 (update_registers_callback: New function.
7961 (arm_insert_point): Likewise.
7962 (arm_remove_point): Likewise.
7963 (arm_stopped_by_watchpoint): Likewise.
7964 (arm_stopped_data_address): Likewise.
7965 (arm_new_process): Likewise.
7966 (arm_new_thread): Likewise.
7967 (arm_prepare_to_resume): Likewise.
7968 (the_low_target): Register arm_insert_point, arm_remove_point,
7969 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7970 arm_new_thread, and arm_prepare_to_resume.
7971
79722011-09-15 Stan Shebs <stan@codesourcery.com>
7973
7974 * server.h (struct emit_ops): Add compare-goto fields.
7975 * tracepoint.c (gdb_agent_op_sizes): New table.
7976 (emit_eq_goto): New function.
7977 (emit_ne_goto): New function.
7978 (emit_lt_goto): New function.
7979 (emit_le_goto): New function.
7980 (emit_gt_goto): New function.
7981 (emit_ge_goto): New function.
7982 (is_goto_target): New function.
7983 (compile_bytecodes): Recognize special cases of compare-goto
7984 combinations and call specialized emitters for them.
7985 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7986 (amd64_emit_ne_goto): New function.
7987 (amd64_emit_lt_goto): New function.
7988 (amd64_emit_le_goto): New function.
7989 (amd64_emit_gt_goto): New function.
7990 (amd64_emit_ge_goto): New function.
7991 (amd64_emit_ops): Add the new functions.
7992 (i386_emit_eq_goto): New function.
7993 (i386_emit_ne_goto): New function.
7994 (i386_emit_lt_goto): New function.
7995 (i386_emit_le_goto): New function.
7996 (i386_emit_gt_goto): New function.
7997 (i386_emit_ge_goto): New function.
7998 (i386_emit_ops): Add the new functions.
7999
80002011-09-08 Stan Shebs <stan@codesourcery.com>
8001
8002 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8003 (i386_emit_epilogue): Restore %ebx.
8004
80052011-08-31 Jie Zhang <jzhang918@gmail.com>
8006
8007 * server.c (step_thread): Remove definition.
8008 (process_serial_event): Don't handle Hs.
8009 * server.h (step_thread): Remove declaration.
8010 * target.c (set_desired_inferior): Remove use of step_thread.
8011
80122011-08-24 Luis Machado <lgustavo@codesourcery.com>
8013
8014 * linux-low.c: Include linux-procfs.h.
8015 (linux_attach_lwp_1): Update comments.
8016 (linux_attach): Scan for existing threads when attaching to a
8017 process that is the tgid.
8018 * Makefile.in: Update dependencies.
8019
80202011-08-24 Luis Machado <lgustavo@codesourcery.com>
8021
8022 * configure.srv: Add linux-procfs.o dependencies.
8023
80242011-08-14 Yao Qi <yao@codesourcery.com>
8025
8026 * target.h (struct target_ops): Fix indent.
8027 * win32-low.c (win32_target_ops): Fix comment.
8028
80292011-08-14 Andrew Jenner <andrew@codesourcery.com>
8030 Yao Qi <yao@codesourcery.com>
8031
8032 * Makefile.in (clean): Remove tic6x-*.c files.
8033 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8034 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8035 (tic6x-c64xp-linux.c): Likewise.
8036 * configure.srv: Add support for tic6x-*-uclinux.
8037 * linux-tic6x-low.c: New.
8038 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8039
80402011-08-14 Andrew Stubbs <ams@codesourcery.com>
8041 Yao Qi <yao@codesourcery.com>
8042
8043 * target.h (struct target_ops): Add read_loadmap.
8044 * linux-low.c (struct target_loadseg): New type.
8045 (struct target_loadmap): New type.
8046 (linux_read_loadmap): New function.
8047 (linux_target_ops): Add linux_read_loadmap.
8048 * server.c (handle_query): Support qXfer:fdpic:read packet.
8049 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8050 to NULL.
8051
80522011-08-05 Eli Zaretskii <eliz@gnu.org>
8053
8054 * win32-low.c: Include <stdint.h>.
8055
80562011-07-22 Pedro Alves <pedro@codesourcery.com>
8057
8058 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8059 to the inferior here.
8060 (i386_remove_aligned_watchpoint): Ditto.
8061 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8062 fit part of the watchpoint in the debug registers.
8063 (i386_update_inferior_debug_regs): New.
8064 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8065 registers, and only update the inferior on success.
8066 (i386_low_remove_watchpoint): Ditto.
8067
80682011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8069
8070 * linux-low.c (compare_ints, unique, list_threads, show_process,
8071 linux_core_of_thread): Delete.
8072 (linux_target_ops): Change linux_core_of_thread to
8073 linux_common_core_of_thread.
8074 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8075 * utils.c (malloc_failure): Change type of argument.
8076 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8077 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8078 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8079 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8080 (IPA_OBJS): Add common-utils-ipa.o.
8081 (ptid_h, linux_osdata_h): New macros.
8082 (server_h): Add common/common-utils.h, common/xml-utils.h,
8083 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8084 common/ptid.h.
8085 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8086 ptid.o, buffer.o): New rules.
8087 (linux-low.o): Add common/linux-osdata.h as a dependency.
8088 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8089 * configure.ac: Add AC_HEADER_DIRENT check.
8090 * config.in: Regenerate.
8091 * configure: Regenerate.
8092 * remote-utils.c (xml_escape_text): Delete.
8093 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8094 buffer_xml_printf): Move to common/buffer.c.
8095 * server.c (main): Remove call to initialize_inferiors.
8096 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8097 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8098 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8099 internal_error, gdb_assert, gdb_assert_fail): Delete.
8100 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8101 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8102 common/buffer.h.
8103 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8104 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8105 initialize_inferiors): Delete.
8106
81072011-07-20 Pedro Alves <pedro@codesourcery.com>
8108
8109 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8110 symbol error.
8111
81122011-05-31 Pedro Alves <pedro@codesourcery.com>
8113
8114 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8115 assertion.
8116 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8117
81182011-05-26 Yao Qi <yao@codesourcery.com>
8119
8120 * Makefile.in (thread-db.o): Track dependence to
8121 common/gdb_thread_db.h.
8122 * thread-db.c: include gdb_thread_db.h from right place.
8123
81242011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8125
8126 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8127 __FILE__ and __LINE__ to internal_error.
8128
81292011-05-13 Doug Evans <dje@google.com>
8130
8131 * thread-db.c (try_thread_db_load_from_sdir): New function.
8132 (try_thread_db_load_from_dir): New function.
8133 (thread_db_load_search): Handle $sdir, ignore $pdir.
8134 Remove trying of system directories if search of
8135 libthread-db-search-path fails, that is now done via $sdir.
8136
81372011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8138
8139 * server.c (handle_query): Add EnableDisableTracepoints to the list
8140 of supported features.
8141 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
8142 tracepoints.
8143 (cmd_qtenable_disable): New.
8144 (cmd_qtstart): Install tracepoints even if disabled.
8145 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8146 receiving a QTEnable or QTDisable packet.
8147 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8148 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8149 tracepoints.
8150 (gdb_probe): Skip data collection if static tracepoint is disabled.
8151
81522011-05-10 Doug Evans <dje@google.com>
8153
8154 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8155
81562011-05-04 Doug Evans <dje@google.com>
8157
8158 * linux-low.c (linux_join): Skip process lookup.
8159 * spu-low.c (spu_join): Ditto.
8160 * server.c (join_inferiors_callback): Delete.
8161 (process_serial_event): For 'D' packet (detach) call join_inferior
8162 directly.
8163
81642011-05-04 Joseph Myers <joseph@codesourcery.com>
8165
8166 * README: Don't mention xscale*-*-linux*.
8167 * configure.srv (xscale*-*-linux*): Don't handle target.
8168
81692011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8170
8171 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8172 casting pointers.
8173 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8174 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8175 (i386_emit_void_call_2): Likewise.
8176
81772011-04-26 Yao Qi <yao@codesourcery.com>
8178
8179 * linux-low.c: Move common macros to linux-ptrace.h.
8180 Include linux-ptrace.h.
8181 * Makefile.in (linux_ptrace_h): New.
8182 (linux-low.o): Depends on linux-ptrace.h.
8183
81842011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8185
8186 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8187 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8188 (remote_prepare): New function with most of the TCP code from ...
8189 (remote_open): ... here. Detect PORT here unconditionally. Move also
8190 setting transport_is_reliable.
8191 * server.c (run_once): New variable.
8192 (gdbserver_usage): Document it.
8193 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8194 the first run if RUN_ONCE.
8195 * server.h (run_once, remote_prepare): New declarations.
8196
81972011-04-19 Tom Tromey <tromey@redhat.com>
8198
8199 * win32-low.c (handle_load_dll): Remove duplicate "the".
8200
82012011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8202
8203 Remove support for old Cygwin 1.5 versions.
8204 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8205 function to avoid warning.
8206 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8207 warning.
8208
82092011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8210
8211 * gdbserver/server.h (Macro _): Define it if not available.
8212
82132011-03-14 Michael Snyder <msnyder@vmware.com>
8214
8215 * hostio.c (handle_close): Remove unnecessary null test.
8216
82172011-03-10 Joel Brobecker <brobecker@adacore.com>
8218
8219 * Makefile.in (maintainer-clean realclean distclean): Remove
8220 "make ... subdir_do" command.
8221
82222011-03-10 Michael Snyder <msnyder@vmware.com>
8223
8224 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8225
8226 * server.c (handle_v_run): Free alloced buffer on early return.
8227
82282011-03-09 Yao Qi <yao@codesourcery.com>
8229
8230 Revert:
8231 2011-03-04 Yao Qi <yao@codesourcery.com>
8232
8233 * Makefile.in: Remove GNU make feature --directory.
8234
8235 2011-03-05 Yao Qi <yao@codesourcery.com>
8236
8237 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8238 (subdir_do): New make target. Copied from gdb/Makefile.
8239 (maintainer-clean, realclean, distclean, clean): Call corresponding
8240 make targets in common/Makefile.
8241
8242 2011-02-11 Yao Qi <yao@codesourcery.com>
8243
8244 * configure.ac: Call AC_PROG_RANLIB.
8245 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8246 * configure: Regenerate.
8247
82482011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8249
8250 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8251
82522011-03-06 Yao Qi <yao@codesourcery.com>
8253
8254 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8255
82562011-03-05 Yao Qi <yao@codesourcery.com>
8257
8258 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8259 (subdir_do): New make target. Copied from gdb/Makefile.
8260 (maintainer-clean, realclean, distclean, clean): Call corresponding
8261 make targets in common/Makefile.
8262
82632011-03-04 Yao Qi <yao@codesourcery.com>
8264
8265 * Makefile.in: Remove GNU make feature --directory.
8266
82672011-03-04 Michael Snyder <msnyder@vmware.com>
8268
8269 * server.c (queue_stop_reply): Call xmalloc not malloc.
8270
82712011-03-02 Michael Snyder <msnyder@vmware.com>
8272
8273 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8274
82752011-02-28 Michael Snyder <msnyder@vmware.com>
8276
8277 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8278 (cmd_qtframe): Ditto.
8279 (cmd_qtbuffer): Ditto.
8280 (cmd_bigqtbuffer): Ditto.
8281
8282 * utils.c (decimal2str): Initialize 'width' to nine, then
8283 don't mess with it.
8284
82852011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8286
8287 * hostio.c (require_data): Free *data, not data.
8288
82892011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8290
8291 * hostio.c (require_data): Use free, not xfree.
8292
82932011-02-27 Michael Snyder <msnyder@vmware.com>
8294
8295 * server.c (handle_query): Discard unused value.
8296
8297 * hostio.c (require_data): Free malloc memory before returning
8298 error.
8299
83002011-02-26 Michael Snyder <msnyder@vmware.com>
8301
8302 * linux-low.c (list_threads): Call closedir for dirent.
8303
83042011-02-27 Michael Snyder <msnyder@vmware.com>
8305
8306 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8307 a case statement falls through.
8308
8309 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8310
8311 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8312 in comparison.
8313
83142011-02-26 Michael Snyder <msnyder@vmware.com>
8315
8316 * utils.c (decimal2str): Eliminate dead code and dead param.
8317 (pulongest): Drop dead param from call to decimal2str.
8318 (plongest): Ditto.
8319
83202011-02-24 Joel Brobecker <brobecker@adacore.com>
8321
8322 Revert the following patch (not approved yet):
8323 2011-02-21 Hui Zhu <teawater@gmail.com>
8324 * tracepoint.c (tp_printf): New function.
8325 (eval_agent_expr): Handle gdb_agent_op_printf.
8326
83272011-02-21 Hui Zhu <teawater@gmail.com>
8328
8329 * tracepoint.c (tp_printf): New function.
8330 (eval_agent_expr): Handle gdb_agent_op_printf.
8331
83322011-02-18 Tom Tromey <tromey@redhat.com>
8333
8334 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8335 (tracepoint.o): Likewise.
8336 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8337 (gdb_agent_op_names): Likewise.
8338
83392011-02-18 Tom Tromey <tromey@redhat.com>
8340
8341 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8342 gdb_agent_op_rot>: New constants.
8343 (gdb_agent_op_names): Add pick and roll.
8344 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8345 cases.
8346
83472011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8348
8349 * aclocal.m4: Regenerated with aclocal-1.11.1.
8350
83512011-02-14 Pedro Alves <pedro@codesourcery.com>
8352
8353 * server.c (handle_qxfer_traceframe_info): New.
8354 (qxfer_packets): Register "traceframe-info".
8355 (handle_query): Report support for qXfer:traceframe-info:read+.
8356 * tracepoint.c (match_blocktype): New.
8357 (traceframe_find_block_type): Rename to ...
8358 (traceframe_walk_blocks): ... this. Add callback filter argument,
8359 and use it.
8360 (traceframe_find_block_type): New, reimplemented on top of
8361 traceframe_walk_blocks.
8362 (build_traceframe_info_xml): New.
8363 (traceframe_read_info): New.
8364 * server.h (traceframe_read_info): Declare.
8365
83662011-02-11 Yao Qi <yao@codesourcery.com>
8367
8368 * configure.ac: Call AC_PROG_RANLIB.
8369 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8370 * configure: Regenerate.
8371
83722011-02-07 Pedro Alves <pedro@codesourcery.com>
8373
8374 * server.c (gdb_read_memory): Change return semantics to allow
8375 partial transfers.
8376 (handle_search_memory_1): Adjust.
8377 (process_serial_event) <'m' packet>: Handle partial transfers.
8378 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8379
83802011-01-28 Pedro Alves <pedro@codesourcery.com>
8381
8382 * regcache.c (init_register_cache): Initialize
8383 regcache->register_status.
8384 (free_register_cache): Release regcache->register_status.
8385 (regcache_cpy): Copy register_status.
8386 (registers_to_string): Print 'x's for unavailable registers.
8387 (supply_register): Mark the register's status valid or
8388 unavailable, depending on whether a buffer was passed in or not.
8389 (supply_register_zeroed): New.
8390 (supply_regblock): Mark the registers' status valid or
8391 unavailable, depending on whether a buffer was passed in or not.
8392 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8393 (struct regcache): New `register_status' field.
8394 (supply_register_zeroed): Declare.
8395 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8396 supply_register_zeroed, rather than passing a NULL buffer to
8397 supply_register.
8398 * tracepoint.c (fetch_traceframe_registers): Update comment.
8399
84002011-01-28 Pedro Alves <pedro@codesourcery.com>
8401
8402 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8403 buffer explicit.
8404
84052011-01-25 Pedro Alves <pedro@codesourcery.com>
8406
8407 * server.h (decode_xfer_write): Change prototype.
8408 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8409 and don't extract the annex here.
8410 * server.c (decode_xfer_read): Remove `annex' parameter,
8411 and don't extract the annex here.
8412 (decode_xfer): New.
8413 (struct qxfer): New.
8414 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8415 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8416 (handle_qxfer_statictrace): New functions, abstracted out from
8417 handle_query, and made to use the struct qxfer interface.
8418 (handle_threads_qxfer_proper): Rename to ...
8419 (handle_qxfer_threads_proper): ... this.
8420 (handle_threads_qxfer): Rename to ...
8421 (handle_qxfer_threads): ... this. Adjust.
8422 (qxfer_packets): New array.
8423 (handle_qxfer): New function.
8424 (handle_query): Use handle_qxfer.
8425
84262011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8427
8428 * gdbreplay.c: Shorten lines of >= 80 columns.
8429 * linux-low.c: Ditto.
8430 * linux-ppc-low.c: Ditto.
8431 * linux-s390-low.c: Ditto.
8432 * linux-sparc-low.c: Ditto.
8433 * linux-x86-low.c: Ditto.
8434 * linux-xtensa-low.c: Ditto.
8435 * mem-break.c: Ditto.
8436 * nto-low.c: Ditto.
8437 * regcache.h: Ditto.
8438 * remote-utils.c: Ditto.
8439 * server.c: Ditto.
8440 * server.h: Ditto.
8441 * thread-db.c: Ditto.
8442 * tracepoint.c: Ditto.
8443 * utils.c: Ditto.
8444 * win32-low.h: Ditto.
8445
84462011-01-05 Joel Brobecker <brobecker@adacore.com>
8447
8448 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8449 update.
8450
84512011-01-01 Joel Brobecker <brobecker@adacore.com>
8452
8453 * server.c (gdbserver_version): Update copyright year in version
8454 output.
8455 * gdbreplay.c (gdbreplay_version): Ditto.
8456
84572010-12-29 Jie Zhang <jie.zhang@analog.com>
8458
8459 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8460 * linux-bfin-low.c: New file.
8461 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8462 PT_DATA_ADDR for BFIN targets.
8463 * Makefile.in (SFILES): Add linux-bfin-low.c.
8464 (clean): Remove reg-bfin.c.
8465 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8466 * README: Mention supported Blackfin targets.
8467
84682010-12-23 Mike Frysinger <vapier@gentoo.org>
8469
8470 * .gitignore: New file.
8471
84722010-11-16 Mike Frysinger <vapier@gentoo.org>
8473
8474 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8475
84762010-10-22 Jie Zhang <jie@codesourcery.com>
8477
8478 * Makefile.in: Add FLAGS_TO_PASS variable.
8479 (install): Remove dependency of install-only and recursively
8480 invoke make for install-only.
8481
84822010-10-04 Doug Evans <dje@google.com>
8483
8484 * Makefile.in (uninstall): Use $(DESTDIR).
8485
84862010-09-24 Pedro Alves <pedro@codesourcery.com>
8487
8488 PR gdb/11842
8489
8490 * linux-x86-low.c (compat_siginfo_from_siginfo)
8491 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8492 si_code is < 0. Check for si_code == SI_TIMER before checking for
8493 si_code < 0.
8494
84952010-09-13 Joel Brobecker <brobecker@adacore.com>
8496
8497 * lynx-i386-low.c: New file.
8498 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8499
85002010-09-13 Joel Brobecker <brobecker@adacore.com>
8501
8502 * lynx-low.c (ptrace_request_to_str): Remove handling for
8503 request values that have been removed in LynxOS 5.x.
8504
85052010-09-13 Joel Brobecker <brobecker@adacore.com>
8506
8507 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8508 <ptrace.h>
8509
85102010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8511
8512 * configure.ac: Add --enable-inprocess-agent option.
8513 * configure: Rebuilt.
8514
85152010-09-06 Yao Qi <yao@codesourcery.com>
8516
8517 * linux-low.c (linux_kill): Remove unused variable.
8518 (linux_stabilize_threads): Likewise.
8519 * server.c (start_inferior): Likewise.
8520 (queue_stop_reply_callback): Likewise.
8521 * tracepoint.c (do_action_at_tracepoint): Likewise.
8522
85232010-09-06 Yao Qi <yao@codesourcery.com>
8524
8525 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8526 on return.
8527
85282010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8529
8530 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8531
85322010-09-06 Pedro Alves <pedro@codesourcery.com>
8533
8534 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8535 "$(IPA_DEPFILES)".
8536
85372010-09-01 Joel Brobecker <brobecker@adacore.com>
8538
8539 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8540 gdbserver/lynx-ppc-low.c: New files.
8541 * Makefile.in (lynx_low_h): New variable.
8542 (lynx-low.o, lynx-ppc-low.o): New rules.
8543 * configure.ac: On LynxOS, link with -lnetinet.
8544 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8545 * configure: regenerate.
8546
85472010-09-01 Joel Brobecker <brobecker@adacore.com>
8548
8549 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8550 * configure.ac: Add check for vasprintf and vsnprintf.
8551 * configure, config.in: Regenerate.
8552 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8553
85542010-09-01 Joel Brobecker <brobecker@adacore.com>
8555
8556 * gdbreplay.c: Move include of alloca.h up, next to include of
8557 malloc.h.
8558 * server.h: Add include of malloc.h.
8559 * mem-break.c: Remove include of malloc.h.
8560 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8561
85622010-09-01 Joel Brobecker <brobecker@adacore.com>
8563
8564 * Makefile.in (memmem.o): Build with -Wno-error.
8565
85662010-09-01 Joel Brobecker <brobecker@adacore.com>
8567
8568 * utils.c (xsnprintf): Make non-static.
8569 * server.h: Add xsnprintf declaration.
8570 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8571 replace calls to snprintf by calls to xsnprintf throughout.
8572
85732010-09-01 Joel Brobecker <brobecker@adacore.com>
8574
8575 * configure.ac: Add configure check for alloca.
8576 * configure, config.in: Regenerate.
8577 * server.h: Include alloca.h if it exists.
8578 * gdbreplay.c: Include alloca.h if it exists.
8579
85802010-08-28 Pedro Alves <pedro@codesourcery.com>
8581
8582 * linux-low.c (__SIGRTMIN): Define if not already defined.
8583 (linux_create_inferior): Check for __ANDROID__ rather than
8584 __SIGRTMIN.
8585 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8586 are already deferred.
8587 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8588 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8589 stopped and already has a pending signal to report.
8590 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8591 a pending signal to report or is moving out of a jump pad.
8592 (linux_init_signals): Check for __ANDROID__ rather than
8593 __SIGRTMIN.
8594
85952010-08-28 Pedro Alves <pedro@codesourcery.com>
8596
8597 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8598 debug_threads check. Avoid a linear search when not doing debug
8599 output.
8600
86012010-08-27 Pedro Alves <pedro@codesourcery.com>
8602
8603 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8604 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8605 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8606 (process_event): Change local fd's type to gdb_fildes_t.
8607 (create_file_handler): Adjust prototype.
8608 (delete_file_handler): Adjust prototype.
8609 (handle_file_event): Adjust prototype. Use pfildes.
8610 (create_file_event): Adjsut prototype.
8611 * remote-utils.c (remote_desc, listen_desc): Change type to
8612 gdb_fildes_t.
8613 * server.h: New gdb_fildes_t typedef.
8614 [USE_WIN32API]: Include winsock2.h.
8615 (delete_file_handler, add_file_handler): Adjust prototypes.
8616 (pfildes): Declare.
8617 * utils.c (pfildes): New.
8618
86192010-08-27 Pedro Alves <pedro@codesourcery.com>
8620
8621 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8622 * configure: Regenerate.
8623
86242010-08-27 Pedro Alves <pedro@codesourcery.com>
8625
8626 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8627 (linux_done_accessing_memory): ... this.
8628 (linux_target_ops): Adjust.
8629 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8630 * nto-low.c (nto_target_ops): Adjust comment.
8631 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8632 * spu-low.c (spu_target_ops): Adjust comment.
8633 * target.h (target_ops): Rename unprepare_to_access_memory field
8634 to done_accessing_memory.
8635 (unprepare_to_access_memory): Rename to ...
8636 (done_accessing_memory): ... this.
8637
86382010-08-26 Pedro Alves <pedro@codesourcery.com>
8639
8640 * linux-low.c (linux_prepare_to_access_memory): New.
8641 (linux_unprepare_to_access_memory): New.
8642 (linux_target_ops): Install them.
8643 * server.c (read_memory): Rename to ...
8644 (gdb_read_memory): ... this. Use
8645 prepare_to_access_memory/prepare_to_access_memory.
8646 (write_memory): Rename to ...
8647 (gdb_write_memory): ... this. Use
8648 prepare_to_access_memory/prepare_to_access_memory.
8649 (handle_search_memory_1): Adjust.
8650 (process_serial_event): Adjust.
8651 * target.h (struct target_ops): New fields
8652 prepare_to_access_memory and unprepare_to_access_memory.
8653 (prepare_to_access_memory, unprepare_to_access_memory): New.
8654 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8655 prepare_to_access_memory/prepare_to_access_memory.
8656 * nto-low.c (nto_target_ops): Adjust.
8657 * spu-low.c (spu_target_ops): Adjust.
8658 * win32-low.c (win32_target_ops): Adjust.
8659
86602010-08-26 Pedro Alves <pedro@codesourcery.com>
8661
8662 * Makefile.in (WARN_CFLAGS): Get it from configure.
8663 (WERROR_CFLAGS): New.
8664 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8665 * configure.ac: Introduce --enable-werror, which adds -Werror to
8666 the compiler command line. Enabled by default. Disable with
8667 --disable-werror. Add -Wdeclaration-after-statement
8668 Wpointer-arith and -Wformat-nonliteral to warning flags.
8669 * configure: Regenerate.
8670
86712010-08-26 Pedro Alves <pedro@codesourcery.com>
8672
8673 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8674
86752010-08-26 Pedro Alves <pedro@codesourcery.com>
8676
8677 * gdbreplay.c (remote_error): New.
8678 (gdbchar): New.
8679 (expect): Use gdbchar. Check for error reading from GDB.
8680 Clarify sync error output.
8681 (play): Check for errors writing to GDB.
8682 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8683 * remote-utils.c (getpkt): Check for errors writing to the remote
8684 descriptor.
8685
86862010-08-25 Pedro Alves <pedro@codesourcery.com>
8687
8688 * linux-low.c (linux_wait_1): Move non-debugging code out of
8689 `debug_threads' control.
8690
86912010-08-25 Pedro Alves <pedro@codesourcery.com>
8692
8693 * linux-low.c (linux_wait_1): Don't set last_status here.
8694 * server.c (push_event, queue_stop_reply_callback): Assert we're
8695 not pushing a TARGET_WAITKIND_IGNORE event.
8696 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8697 (myresume, handle_target_event): Set the thread's last_resume_kind
8698 and last_status from the target returned status.
8699
87002010-08-25 Pedro Alves <pedro@codesourcery.com>
8701
8702 PR threads/10729
8703
8704 * linux-x86-low.c (update_debug_registers_callback): New.
8705 (i386_dr_low_set_addr): Use it.
8706 (i386_dr_low_get_addr): New.
8707 (i386_dr_low_set_control): Use update_debug_registers_callback.
8708 (i386_dr_low_get_control): New.
8709 (i386_dr_low_get_status): Adjust.
8710 * linux-low.c (linux_stop_lwp): New.
8711 * linux-low.h (linux_stop_lwp): Declare.
8712
8713 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8714 argument instead of a i386_debug_reg_state.
8715 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8716 a i386_debug_reg_state.
8717 (i386_insert_aligned_watchpoint): Adjust.
8718 (i386_remove_aligned_watchpoint): Adjust.
8719 (i386_low_stopped_data_address): Read the debug registers from the
8720 inferior instead of from the mirrors.
8721 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8722 (i386_dr_low_get_addr): Declare.
8723 (i386_dr_low_get_control): Declare.
8724 (i386_dr_low_get_status): Change prototype.
8725
8726 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8727 (i386_dr_low_get_addr): New.
8728 (i386_dr_low_get_control): New.
8729 (i386_dr_low_get_status): Adjust prototype. Return
8730 dr_status_mirror.
8731 (i386_initial_stuff): Clear dr_status_mirror and
8732 dr_control_mirror.
8733 (i386_get_thread_context): Adjust.
8734 (i386_set_thread_context): Adjust.
8735 (i386_thread_added): Adjust.
8736
87372010-08-24 Pedro Alves <pedro@codesourcery.com>
8738
8739 * linux-low.h (linux_thread_area): Delete declaration.
8740
87412010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8742
8743 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8744 after its termination.
8745
87462010-08-09 Pedro Alves <pedro@codesourcery.com>
8747
8748 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8749 (gdb_wants_all_stopped): Delete.
8750 (linux_wait_1): Don't call them.
8751 * server.c (handle_v_cont): Tag all threads as want-stopped.
8752 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8753 stopped as "client-wants-stopped".
8754
87552010-07-31 Pedro Alves <pedro@codesourcery.com>
8756
8757 * Makefile.in (signals_h): New.
8758 (server_h): Depend on it.
8759 (server.o): Don't depend on $(signals_def).
8760 (signals.o): Depend on $(signals_def).
8761
87622010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8763
8764 * Makefile.in (signals_def): New.
8765 (server_h): Append include/gdb/signals.h and signals_def.
8766 (server.o): Append signals_def.
8767
87682010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8769
8770 * server.c (handle_target_event): Use target_signal_to_host for
8771 resume_info.sig initialization.
8772 * target.h (struct thread_resume) <sig>: New comment.
8773
87742010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8775
8776 * server.c (handle_query): strcpy() the returned string from paddress()
8777 instead of sprintf().
8778 * utils.c (paddress): Return phex_nz().
8779
87802010-07-07 Joel Brobecker <brobecker@adacore.com>
8781
8782 * server.c (handle_v_cont): Call mourn_inferior if process
8783 just exited.
8784 (myresume): Likewise.
8785
87862010-07-01 Pedro Alves <pedro@codesourcery.com>
8787
8788 Static tracepoints, and integration with UST.
8789
8790 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8791 * mem-break.c (uninsert_all_breakpoints)
8792 (reinsert_all_breakpoints): New.
8793 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8794 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8795 (gdb_agent_ust_loaded, helper_thread_id)
8796 (gdb_agent_helper_thread_id): New macros.
8797 (struct ipa_sym_addresses): Add addr_ust_loaded,
8798 addr_helper_thread_id, addr_cmd_buf.
8799 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8800 (in_process_agent_loaded_ust): New.
8801 (write_e_ust_not_loaded): New.
8802 (maybe_write_ipa_ust_not_loaded): New.
8803 (struct collect_static_trace_data_action): New.
8804 (enum tracepoint_type) <static_tracepoint>: New.
8805 (struct tracepoint) <handle>: Mention static tracepoints.
8806 (struct static_tracepoint_ctx): New.
8807 (CMD_BUF_SIZE): New.
8808 (add_tracepoint_action): Handle static tracepoint actions.
8809 (unprobe_marker_at): New.
8810 (clear_installed_tracepoints): Handle static tracepoints.
8811 (cmd_qtdp): Handle static tracepoints.
8812 (probe_marker_at): New.
8813 (cmd_qtstart): Handle static tracepoints.
8814 (response_tracepoint): Handle static tracepoints.
8815 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8816 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8817 (get_context_regcache): Handle static tracepoints.
8818 (do_action_at_tracepoint): Handle static tracepoint actions.
8819 (traceframe_find_block_type): Handle static trace data blocks.
8820 (traceframe_read_sdata): New.
8821 (download_tracepoints): Download static tracepoint actions.
8822 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8823 (GDB_PROBE_NAME): New.
8824 (ust_ops): New.
8825 (GET_UST_SYM): New.
8826 (USTF): New.
8827 (dlsym_ust): New.
8828 (ust_marker_to_static_tracepoint): New.
8829 (gdb_probe): New.
8830 (collect_ust_data_at_tracepoint): New.
8831 (gdb_ust_probe): New.
8832 (UNIX_PATH_MAX, SOCK_DIR): New.
8833 (gdb_ust_connect_sync_socket): New.
8834 (resume_thread, stop_thread): New.
8835 (run_inferior_command): New.
8836 (init_named_socket): New.
8837 (gdb_ust_socket_init): New.
8838 (cstr_to_hexstr): New.
8839 (next_st): New.
8840 (first_marker, next_marker): New.
8841 (response_ust_marker): New.
8842 (cmd_qtfstm, cmd_qtsstm): New.
8843 (unprobe_marker_at, probe_marker_at): New.
8844 (cmd_qtstmat, gdb_ust_thread): New.
8845 (gdb_ust_init): New.
8846 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8847 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8848 (ST_REGENTRY): New.
8849 (x86_64_st_collect_regmap): New.
8850 (X86_64_NUM_ST_COLLECT_GREGS): New.
8851 (AMD64_RIP_REGNUM): New.
8852 (supply_static_tracepoint_registers): New.
8853 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8854 (ST_REGENTRY): New.
8855 (i386_st_collect_regmap): New.
8856 (i386_NUM_ST_COLLECT_GREGS): New.
8857 (supply_static_tracepoint_registers): New.
8858 * server.c (handle_query): Handle qXfer:statictrace:read.
8859 <qSupported>: Report support for StaticTracepoints, and
8860 qXfer:statictrace:read features.
8861 * server.h (traceframe_read_sdata)
8862 (supply_static_tracepoint_registers): Declare.
8863 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8864 (unpack_varlen_hex): Include in IPA build.
8865 * Makefile.in (ustlibs, ustinc): New.
8866 (IPA_OBJS): Add remote-utils-ipa.o.
8867 ($(IPA_LIB)): Link -ldl and -lpthread.
8868 (UST_CFLAGS): New.
8869 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8870 * config.in, configure: Regenerate.
8871
88722010-06-20 Ian Lance Taylor <iant@google.com>
8873 Pedro Alves <pedro@codesourcery.com>
8874
8875 * linux-x86-low.c (always_true): Delete.
8876 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8877 trying to fool the compiler with always_true.
8878
88792010-06-20 Pedro Alves <pedro@codesourcery.com>
8880
8881 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8882 conditions in gdbserver.
8883
88842010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8885
8886 * spu-low.c (spu_read_memory): Wrap around local store limit.
8887 (spu_write_memory): Likewise.
8888
88892010-06-15 Pedro Alves <pedro@codesourcery.com>
8890
8891 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8892 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8893 LONGEST uses.
8894 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8895 uses.
8896 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8897 uses with LONGEST uses.
8898
88992010-06-14 Stan Shebs <stan@codesourcery.com>
8900 Pedro Alves <pedro@codesourcery.com>
8901
8902 Bytecode compiler.
8903
8904 * linux-x86-low.c: Include limits.h.
8905 (add_insns): New.
8906 (always_true): New.
8907 (EMIT_ASM): New.
8908 (EMIT_ASM32): New.
8909 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8910 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8911 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8912 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8913 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8914 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8915 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8916 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8917 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8918 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8919 (amd64_emit_void_call_2): New.
8920 (amd64_emit_ops): New.
8921 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8922 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8923 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8924 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8925 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8926 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8927 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8928 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8929 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8930 (i386_emit_stack_adjust, i386_emit_int_call_1)
8931 (i386_emit_void_call_2): New.
8932 (i386_emit_ops): New.
8933 (x86_emit_ops): New.
8934 (the_low_target): Install x86_emit_ops.
8935 * server.h (struct emit_ops): New.
8936 (get_raw_reg_func_addr): Declare.
8937 (current_insn_ptr, emit_error): Declare.
8938 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8939 (set_trace_state_variable_value): New defines.
8940 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8941 addr_get_trace_state_variable_value and
8942 addr_set_trace_state_variable_value.
8943 (symbol_list): New fields for get_raw_reg,
8944 get_trace_state_variable_value and set_trace_state_variable_value.
8945 (condfn): New typedef.
8946 (struct tracepoint): New field `compiled_cond'.
8947 (do_action_at_tracepoint): Clear compiled_cond.
8948 (get_trace_state_variable_value, set_trace_state_variable_value):
8949 Export in the IPA.
8950 (condition_true_at_tracepoint): If there's a compiled condition,
8951 run that.
8952 (current_insn_ptr, emit_error): New globals.
8953 (struct bytecode_address): New.
8954 (get_raw_reg_func_addr): New.
8955 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8956 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8957 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8958 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8959 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8960 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8961 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8962 (compile_tracepoint_condition, compile_bytecodes): New.
8963 * target.h (emit_ops): Forward declare.
8964 (struct target_ops): New field emit_ops.
8965 (target_emit_ops): New.
8966 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8967 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8968 * linux-low.c (linux_emit_ops): New.
8969 (linux_target_ops): Install it.
8970 * linux-low.h (struct linux_target_ops): New field emit_ops.
8971
89722010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8973
8974 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8975 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8976
89772010-06-01 Pedro Alves <pedro@codesourcery.com>
8978 Stan Shebs <stan@codesourcery.com>
8979
8980 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8981 (all): Depend on $(extra_libraries).
8982 (install-only): Install the IPA.
8983 (IPA_OBJS, IPA_LIB): New.
8984 (clean): Remove the IPA lib.
8985 (IPAGENT_CFLAGS): New.
8986 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8987 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8988 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8989 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8990 * configure.ac: Check for atomic builtins support in the compiler.
8991 (IPA_DEPFILES, extra_libraries): Define.
8992 * configure.srv (ipa_obj): Add description.
8993 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8994 (i[34567]86-*-linux*): Set ipa_obj.
8995 (x86_64-*-linux*): Set ipa_obj.
8996 * linux-low.c (stabilizing_threads): New.
8997 (supports_fast_tracepoints): New.
8998 (linux_detach): Stabilize threads before detaching.
8999 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9000 the lwp is either not stabilizing, or is moving out of a jump pad.
9001 (linux_fast_tracepoint_collecting): New.
9002 (maybe_move_out_of_jump_pad): New.
9003 (enqueue_one_deferred_signal): New.
9004 (dequeue_one_deferred_signal): New.
9005 (linux_wait_for_event_1): If moving out of a jump pad, defer
9006 pending signals to later.
9007 (linux_stabilize_threads): New.
9008 (linux_wait_1): Check if threads need moving out of jump pads, and
9009 do it if so.
9010 (stuck_in_jump_pad_callback): New.
9011 (move_out_of_jump_pad_callback): New.
9012 (lwp_running): New.
9013 (linux_resume_one_lwp): Handle moving out of jump pads.
9014 (linux_set_resume_request): Dequeue deferred signals.
9015 (need_step_over_p): Also step over fast tracepoint jumps.
9016 (start_step_over): Also uninsert fast tracepoint jumps.
9017 (finish_step_over): Also reinsert fast tracepoint jumps.
9018 (linux_install_fast_tracepoint_jump): New.
9019 (linux_target_ops): Install linux_stabilize_threads and
9020 linux_install_fast_tracepoint_jump_pad.
9021 * linux-low.h (linux_target_ops) <get_thread_area,
9022 install_fast_tracepoint_jump_pad>: New fields.
9023 (struct lwp_info) <collecting_fast_tracepoint,
9024 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9025 (linux_get_thread_area): Declare.
9026 * linux-x86-low.c (jump_insn): New.
9027 (x86_get_thread_area): New.
9028 (append_insns): New.
9029 (push_opcode): New.
9030 (amd64_install_fast_tracepoint_jump_pad): New.
9031 (i386_install_fast_tracepoint_jump_pad): New.
9032 (x86_install_fast_tracepoint_jump_pad): New.
9033 (the_low_target): Install x86_get_thread_area and
9034 x86_install_fast_tracepoint_jump_pad.
9035 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9036 (struct fast_tracepoint_jump): New.
9037 (fast_tracepoint_jump_insn): New.
9038 (fast_tracepoint_jump_shadow): New.
9039 (find_fast_tracepoint_jump_at): New.
9040 (fast_tracepoint_jump_here): New.
9041 (delete_fast_tracepoint_jump): New.
9042 (set_fast_tracepoint_jump): New.
9043 (uninsert_fast_tracepoint_jumps_at): New.
9044 (reinsert_fast_tracepoint_jumps_at): New.
9045 (set_breakpoint_at): Use write_inferior_memory.
9046 (uninsert_raw_breakpoint): Use write_inferior_memory.
9047 (check_mem_read): Mask out fast tracepoint jumps.
9048 (check_mem_write): Mask out fast tracepoint jumps.
9049 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9050 (set_fast_tracepoint_jump): Declare.
9051 (delete_fast_tracepoint_jump)
9052 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9053 (reinsert_fast_tracepoint_jumps_at): Declare.
9054 * regcache.c: Don't compile many functions when building the
9055 in-process agent library.
9056 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9057 the register buffer in the heap.
9058 (free_register_cache): If the register buffer isn't owned by the
9059 regcache, don't free it.
9060 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9061 pre-existing register caches.
9062 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9063 type.
9064 (convert_ascii_to_int): : Constify `from' parameter type.
9065 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9066 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9067 the needed buffer in-place.
9068 (relocate_instruction): New.
9069 * server.c (handle_query) <qSymbols>: If the target supports
9070 tracepoints, give it a chance of looking up symbols. Report
9071 support for fast tracepoints.
9072 (handle_status): Stabilize threads.
9073 (process_serial_event): Adjust.
9074 * server.h (struct fast_tracepoint_jump): Forward declare.
9075 (struct process_info) <fast_tracepoint_jumps>: New field.
9076 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9077 (decode_X_packet, decode_M_packet): Adjust.
9078 (relocate_instruction): Declare.
9079 (in_process_agent_loaded): Declare.
9080 (tracepoint_look_up_symbols): Declare.
9081 (struct fast_tpoint_collect_status): Declare.
9082 (fast_tracepoint_collecting): Declare.
9083 (force_unlock_trace_buffer): Declare.
9084 (handle_tracepoint_bkpts): Declare.
9085 (initialize_low_tracepoint)
9086 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9087 * target.h (struct target_ops) <stabilize_threads,
9088 install_fast_tracepoint_jump_pad>: New fields.
9089 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9090 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9091 [HAVE_STDINT_H]: Include stdint.h.
9092 (trace_debug_1): Rename to ...
9093 (trace_vdebug): ... this.
9094 (trace_debug): Rename to ...
9095 (trace_debug_1): ... this. Add `level' parameter.
9096 (trace_debug): New.
9097 (ATTR_USED, ATTR_NOINLINE): New.
9098 (IP_AGENT_EXPORT): New.
9099 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9100 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9101 (about_to_request_buffer_space, trace_buffer_is_full)
9102 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9103 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9104 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9105 (traceframe_write_count, traceframes_created)
9106 (trace_state_variables)
9107 New renaming defines.
9108 (struct ipa_sym_addresses): New.
9109 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9110 (symbol_list): New.
9111 (ipa_sym_addrs): New.
9112 (all_tracepoint_symbols_looked_up): New.
9113 (in_process_agent_loaded): New.
9114 (write_e_ipa_not_loaded): New.
9115 (maybe_write_ipa_not_loaded): New.
9116 (tracepoint_look_up_symbols): New.
9117 (debug_threads) [IN_PROCESS_AGENT]: New.
9118 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9119 (UNKNOWN_SIDE_EFFECTS): New.
9120 (stop_tracing): New.
9121 (flush_trace_buffer): New.
9122 (stop_tracing_bkpt): New.
9123 (flush_trace_buffer_bkpt): New.
9124 (read_inferior_integer): New.
9125 (read_inferior_uinteger): New.
9126 (read_inferior_data_pointer): New.
9127 (write_inferior_data_pointer): New.
9128 (write_inferior_integer): New.
9129 (write_inferior_uinteger): New.
9130 (struct collect_static_trace_data_action): Delete.
9131 (enum tracepoint_type): New.
9132 (struct tracepoint) <type>: New field `type'.
9133 <actions_str, step_actions, step_actions_str>: Only include in
9134 GDBserver.
9135 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9136 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9137 (tracepoints): Use IP_AGENT_EXPORT.
9138 (last_tracepoint): Don't include in the IPA.
9139 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9140 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9141 (alloced_trace_state_variables): New.
9142 (trace_state_variables): Use IP_AGENT_EXPORT.
9143 (traceframe_t): Delete unused variable.
9144 (circular_trace_buffer): Don't include in the IPA.
9145 (trace_buffer_start): Delete.
9146 (struct trace_buffer_control): New.
9147 (trace_buffer_free): Delete.
9148 (struct ipa_trace_buffer_control): New.
9149 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9150 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9151 New.
9152 (trace_buffer_ctrl): New.
9153 (TRACE_BUFFER_CTRL_CURR): New.
9154 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9155 Reimplement as macros.
9156 (trace_buffer_wrap): Delete.
9157 (traceframe_write_count, traceframe_read_count)
9158 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9159 (struct tracepoint_hit_ctx) <type>: New field.
9160 (struct fast_tracepoint_ctx): New.
9161 (memory_barrier): New.
9162 (cmpxchg): New.
9163 (record_tracepoint_error): Update atomically in the IPA.
9164 (clear_inferior_trace_buffer): New.
9165 (about_to_request_buffer_space): New.
9166 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9167 updating the same buffer.
9168 (add_tracepoint): Default the tracepoint's type to trap
9169 tracepoint, and orig_size to -1.
9170 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9171 internal variables.
9172 (create_trace_state_variable): New parameter `gdb'. Handle it.
9173 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9174 (cmd_qtdp): Handle fast tracepoints.
9175 (cmd_qtdv): Adjust.
9176 (max_jump_pad_size): New.
9177 (gdb_jump_pad_head): New.
9178 (get_jump_space_head): New.
9179 (claim_jump_space): New.
9180 (sort_tracepoints): New.
9181 (MAX_JUMP_SIZE): New.
9182 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9183 IPA.
9184 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9185 support. Upload fast traceframes, and delete internal IPA
9186 breakpoints.
9187 (stop_tracing_handler): New.
9188 (flush_trace_buffer_handler): New.
9189 (cmd_qtstop): Upload fast tracepoints.
9190 (response_tracepoint): Handle fast tracepoints.
9191 (tracepoint_finished_step): Upload fast traceframes. Set the
9192 tracepoint hit context's tracepoint type.
9193 (handle_tracepoint_bkpts): New.
9194 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9195 type. Add comment about fast tracepoints.
9196 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9197 non-existing action_str field.
9198 (get_context_regcache): Handle fast tracepoints.
9199 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9200 to the regcache.
9201 (fast_tracepoint_from_jump_pad_address): New.
9202 (fast_tracepoint_from_ipa_tpoint_address): New.
9203 (collecting_t): New.
9204 (force_unlock_trace_buffer): New.
9205 (fast_tracepoint_collecting): New.
9206 (collecting): New.
9207 (gdb_collect): New.
9208 (write_inferior_data_ptr): New.
9209 (target_tp_heap): New.
9210 (target_malloc): New.
9211 (download_agent_expr): New.
9212 (UALIGN): New.
9213 (download_tracepoints): New.
9214 (download_trace_state_variables): New.
9215 (upload_fast_traceframes): New.
9216 (IPA_FIRST_TRACEFRAME): New.
9217 (IPA_NEXT_TRACEFRAME_1): New.
9218 (IPA_NEXT_TRACEFRAME): New.
9219 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9220 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9221 (gdb_jump_pad_buffer_end): New.
9222 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9223 (initialize_tracepoint): Adjust.
9224 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9225 buffer. Initialize the low module.
9226 * utils.c (PREFIX, TOOLNAME): New.
9227 (malloc_failure): Use PREFIX.
9228 (error): In the IPA, an error causes an exit.
9229 (fatal, warning): Use PREFIX.
9230 (internal_error): Use TOOLNAME.
9231 (NUMCELLS): Increase to 10.
9232 * configure, config.in: Regenerate.
9233
92342010-06-01 Pedro Alves <pedro@codesourcery.com>
9235
9236 * server.c (handle_query) <qSupported>: Do two passes over the
9237 qSupported string to avoid nesting strtok.
9238
92392010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9240
9241 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9242 (CDEPS): New.
9243 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9244 -Wl,--dynamic-list.
9245 * configure: Regenerate.
9246 * proc-service.list: New.
9247
92482010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9249
9250 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9251 New comment.
9252
92532010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9254
9255 * gdbreplay.c (remote_open): Check error return from socket() call by
9256 its equality to -1 not by it being negative.
9257 * remote-utils.c (remote_open): Likewise.
9258
92592010-05-23 Pedro Alves <pedro@codesourcery.com>
9260
9261 * config.h: Regenerate.
9262
92632010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9264
9265 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9266 doesn't provide PTRACE_GET_THREAD_AREA.
9267
92682010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9269
9270 * linux-m68k-low.c: Include <asm/ptrace.h>
9271 (ps_get_thread_area): Implement.
9272
92732010-05-03 Doug Evans <dje@google.com>
9274
9275 * event-loop.c (struct callback_event): New struct.
9276 (callback_list): New global.
9277 (append_callback_event, delete_callback_event): New functions.
9278 (process_callback): New function.
9279 (start_event_loop): Call it.
9280 * remote-utils.c (NOT_SCHEDULED): Define.
9281 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9282 moved out of readchar.
9283 (readchar): Rewrite. Call reschedule before returning.
9284 (reset_readchar): New function.
9285 (remote_close): Call it.
9286 (process_remaining, reschedule): New functions.
9287 * server.h (callback_handler_func): New typedef.
9288 (append_callback_event, delete_callback_event): Declare.
9289
92902010-05-03 Pedro Alves <pedro@codesourcery.com>
9291
9292 * proc-service.c (ps_pglobal_lookup): Use
9293 thread_db_look_up_one_symbol.
9294 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9295 parameter. Use it instead of all_symbols_looked_up.
9296 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9297 field.
9298 (all_symbols_looked_up): Don't declare.
9299 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9300 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9301 field.
9302 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9303 Set all_symbols_looked_up here.
9304 (thread_db_look_up_one_symbol): New.
9305 (thread_db_get_tls_address): Adjust.
9306 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9307 thread_db object on the heap, and tentatively set it in the
9308 process structure.
9309 (thread_db_init): Don't set all_symbols_looked_up here.
9310 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9311
93122010-05-03 Pedro Alves <pedro@codesourcery.com>
9313
9314 * linux-low.c (linux_kill, linux_detach): Adjust.
9315 (status_pending_p_callback): Remove redundant statement. Check
9316 for !TARGET_WAITIKIND_IGNORE, instead of
9317 TARGET_WAITKIND_STOPPED.
9318 (handle_tracepoints): Make sure LWP is locked. Adjust.
9319 (linux_wait_for_event_1): Adjust.
9320 (linux_cancel_breakpoints): New.
9321 (unsuspend_one_lwp): New.
9322 (unsuspend_all_lwps): New.
9323 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9324 (send_sigstop_callback): Change return type to int, add new
9325 `except' parameter and handle it.
9326 (suspend_and_send_sigstop_callback): New.
9327 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9328 pass them down. If SUSPEND, also increment the lwp's suspend
9329 count.
9330 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9331 (need_step_over_p): Don't consider suspended LWPs.
9332 (start_step_over): Adjust.
9333 (proceed_one_lwp): Change return type to int, add new `except'
9334 parameter and handle it.
9335 (unsuspend_and_proceed_one_lwp): New.
9336 (proceed_all_lwps): Use find_inferior instead of
9337 for_each_inferior.
9338 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9339 also decrement the suspend count of LWPs. Pass `except' down,
9340 instead of hacking its suspend count.
9341 (linux_pause_all): Add `freeze' parameter. Adjust.
9342 (linux_unpause_all): New.
9343 (linux_target_ops): Install linux_unpause_all.
9344 * server.c (handle_status): Adjust.
9345 * target.h (struct target_ops): New fields `unpause_all' and
9346 `cancel_breakpoints'. Add new parameter to `pause_all'.
9347 (pause_all): Add new `freeze' parameter.
9348 (unpause_all): New.
9349 (cancel_breakpoints): New.
9350 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9351 cancel breakpoints.
9352 (cmd_qtstart): Pause threads.
9353 (stop_tracing): Pause threads, and cancel breakpoints.
9354 * win32-low.c (win32_target_ops): Adjust.
9355
93562010-05-03 Pedro Alves <pedro@codesourcery.com>
9357
9358 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9359 the inferior right away from here...
9360 (linux_wait_1): ... to here, and adjust to check the thread's
9361 last_resume_kind instead of the lwp's step or stop_expected flags.
9362
93632010-05-02 Pedro Alves <pedro@codesourcery.com>
9364
9365 * README: Use consistent `GDB' and `GDBserver' spellings.
9366
93672010-05-02 Pedro Alves <pedro@codesourcery.com>
9368
9369 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9370 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9371 (linux_detach_one_lwp): Assume the lwp is stopped.
9372 (any_thread_of): Delete.
9373 (linux_detach): Stop all lwps here. Don't blindly delete all
9374 breakpoints.
9375 (delete_lwp_callback): New.
9376 (linux_mourn): Delete all lwps of the process that is gone.
9377 (linux_wait_1): Don't delete the last lwp of the process here.
9378 * mem-break.h (mark_breakpoints_out): Declare.
9379 * mem-break.c (mark_breakpoints_out): New.
9380 (free_all_breakpoints): Use it.
9381 * server.c (handle_target_event): If the process is gone, mark
9382 breakpoints out.
9383 * thread-db.c (struct thread_db) <create_bp>: New field.
9384 (thread_db_enable_reporting): Fix prototype. Store a thread event
9385 breakpoint reference in the thread_db struct.
9386 (thread_db_load_search): Clear the thread_db object.
9387 (try_thread_db_load_1): Ditto.
9388 (switch_to_process): New.
9389 (disable_thread_event_reporting): Use it.
9390 (remove_thread_event_breakpoints): New.
9391 (thread_db_detach, thread_db_mourn): Use it.
9392
93932010-05-01 Pedro Alves <pedro@codesourcery.com>
9394
9395 * linux-low.c (linux_enable_event_reporting): New.
9396 (linux_wait_for_event_1, handle_extended_wait): Use it.
9397
93982010-04-30 Pedro Alves <pedro@codesourcery.com>
9399
9400 * linux-low.c (linux_kill_one_lwp, linux_kill)
9401 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9402 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9403 SIGSTOP even if the LWP is stopped.
9404 (send_sigstop_callback): New.
9405 (stop_all_lwps): Use send_sigstop_callback instead.
9406 (linux_resume_one_thread): Adjust.
9407 (proceed_one_lwp): Still proceed an LWP that the client has
9408 requested to stop, if we haven't reported it as stopped yet. Make
9409 sure that LWPs the client want stopped, have a pending SIGSTOP.
9410
94112010-04-26 Doug Evans <dje@google.com>
9412
9413 * server.c (handle_general_set): Make static.
9414
9415 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9416 Print received char after testing for error/eof instead of before.
9417 (input_interrupt): Tweak comment.
9418
94192010-04-23 Doug Evans <dje@google.com>
9420
9421 * server.c (start_inferior): Print inferior argv if --debug.
9422
94232010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9424
9425 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9426 * nto-x86-low.c: Include server.h
9427
94282010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9429
9430 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9431 be consistent with other sources of this directory.
9432 (init_registers_amd64): Correct name of source file of this function
9433 in the comment.
9434
94352010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9436
9437 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9438 64-bit executables.
9439
94402010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9441
9442 * win32-i386-low.c: Add 64-bit support.
9443 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9444 (init_registers_amd64): Declare.
9445 (mappings): Add 64-bit version of array.
9446 (init_windows_x86): New function.
9447 (the_low_target): Change init_arch field to init_windows_x86.
9448
94492010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9450
9451 * win32-low.c: Adapt to support also 64-bit architecture.
9452 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9453 (get_image_name): Use SIZE_T type for local variable `done'.
9454 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9455 (toolhelp_get_dll_name): Idem.
9456 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9457 Use uintptr_t typecast to avoid warning.
9458 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9459 (handle_exception): Use phex_nz to avoid warning.
9460 (win32_wait): Remove unused local variable `process'.
9461
94622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9463
9464 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9465 `amd64-avx.o'.
9466
94672010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9468
9469 * configure.ac: Use `ws2_32' library for srv_mingw.
9470 * configure: Regenerate.
9471 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9472 * remote-utils.c: Likewise.
9473
94742010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9475
9476 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9477 if __x86_64__ is defined.
9478
94792010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9480
9481 * configure: Regenerate.
9482
94832010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9484
9485 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9486 * target.h (target_ops): New get_tib_address field.
9487 * win32-low.h (win32_thread_info): Add thread_local_base field.
9488 * win32-low.c (child_add_thread): Add tlb argument.
9489 Set thread_local_base field to TLB.
9490 (get_child_debug_event): Adapt to child_add_thread change.
9491 (win32_get_tib_address): New function.
9492 (win32_target_ops): Set get_tib_address field to
9493 win32_get_tib_address.
9494 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9495
94962010-04-12 Pedro Alves <pedro@codesourcery.com>
9497
9498 * linux-low.c (linux_mourn): Also remove the process.
9499 * server.c (handle_target_event): Don't remove the process here.
9500 * nto-low.c (nto_mourn): New.
9501 (nto_target_ops): Install it.
9502 * spu-low.c (spu_mourn): New.
9503 (spu_target_ops): Install it.
9504 * win32-low.c (win32_mourn): New.
9505 (win32_target_ops): Install it.
9506
95072010-04-12 Pedro Alves <pedro@codesourcery.com>
9508
9509 * server.h (buffer_xml_printf): Remove redundant `;'.
9510
95112010-04-12 Pedro Alves <pedro@codesourcery.com>
9512
9513 * regcache.c (set_register_cache): Invalidate regcaches before
9514 changing the register cache layout.
9515 (regcache_invalidate_one): Allow a NULL regcache.
9516 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9517 regcaches before changing the register cache layout or the target
9518 regsets.
9519
95202010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9521
9522 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9523 variable warning on Linux/x86-64.
9524
95252010-04-11 Pedro Alves <pedro@codesourcery.com>
9526
9527 GDBserver disconnected tracing support.
9528
9529 * linux-low.c (linux_remove_process): Delete.
9530 (add_lwp): Don't set last_resume_kind here.
9531 (linux_kill): Use `mourn'.
9532 (linux_detach): Use `thread_db_detach', and `mourn'.
9533 (linux_mourn): New.
9534 (linux_attach_lwp_1): Adjust comment.
9535 (linux_attach): last_resume_kind moved the thread_info; adjust.
9536 (status_pending_p_callback): Adjust.
9537 (linux_wait_for_event_1): Adjust.
9538 (count_events_callback, select_singlestep_lwp_callback)
9539 (select_event_lwp_callback, cancel_breakpoints_callback)
9540 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9541 (proceed_one_lwp): Adjust.
9542 (linux_async): Add debug output.
9543 (linux_thread_stopped): New.
9544 (linux_pause_all): New.
9545 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9546 linux_pause_all.
9547 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9548 (thread_db_free): Delete declaration.
9549 (thread_db_detach, thread_db_mourn): Declare.
9550 * thread-db.c (thread_db_init): Use thread_db_mourn.
9551 (thread_db_free): Delete, split in two.
9552 (disable_thread_event_reporting): New.
9553 (thread_db_detach): New.
9554 (thread_db_mourn): New.
9555
9556 * server.h (struct thread_info) <last_resume_kind>: New field.
9557 <attached>: Add comment.
9558 <gdb_detached>: New field.
9559 (handler_func): Change return type to int.
9560 (handle_serial_event, handle_target_event): Ditto.
9561 (gdb_connected): Declare.
9562 (tracing): Delete.
9563 (disconnected_tracing): Declare.
9564 (stop_tracing): Declare.
9565
9566 * server.c (handle_query) <qSupported>: Report support for
9567 disconnected tracing.
9568 (queue_stop_reply_callback): Account for running threads.
9569 (gdb_wants_thread_stopped): New.
9570 (gdb_wants_all_threads_stopped): New.
9571 (gdb_reattached_process): New.
9572 (handle_status): Clear the `gdb_detached' flag of all processes.
9573 In all-stop, stop all threads.
9574 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9575 (process_serial_event): If the remote connection breaks, or if an
9576 exit was forced with "monitor exit", force an event loop exit.
9577 Handle disconnected tracing on detach.
9578 (handle_serial_event): Adjust.
9579 (handle_target_event): If GDB isn't connected, forward events back
9580 to the inferior, unless the last process exited, in which case,
9581 exit gdbserver. Adjust interface.
9582
9583 * remote-utils.c (remote_open): Don't block in accept. Instead
9584 register an event loop source on the listen socket file
9585 descriptor. Refactor bits into ...
9586 (listen_desc): ... this new global.
9587 (gdb_connected): ... this new function.
9588 (enable_async_notification): ... this new function.
9589 (handle_accept_event): ... this new function.
9590 (remote_close): Clear remote_desc.
9591
9592 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9593
9594 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9595 New fields.
9596 (mourn_inferior): Define.
9597 (target_process_qsupported): Avoid the dangling else problem.
9598 (thread_stopped): Define.
9599 (pause_all): Define.
9600 (target_waitstatus_to_string): Declare.
9601 * target.c (target_waitstatus_to_string): New.
9602
9603 * tracepoint.c (tracing): Make extern.
9604 (disconnected_tracing): New.
9605 (stop_tracing): Make extern. Handle tracing stops due to GDB
9606 disconnecting.
9607 (cmd_qtdisconnected): New.
9608 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9609 (handle_tracepoint_general_set): Handle QTDisconnected.
9610
9611 * event-loop.c (event_handler_func): Change return type to int.
9612 (process_event): Bail out if the event handler wants the event
9613 loop to stop.
9614 (handle_file_event): Ditto.
9615 (start_event_loop): Bail out if the event handler wants the event
9616 loop to stop.
9617
9618 * nto-low.c (nto_target_ops): Adjust.
9619 * spu-low.c (spu_wait): Don't remove the process here.
9620 (spu_target_ops): Adjust.
9621 * win32-low.c (win32_wait): Don't remove the process here.
9622 (win32_target_ops): Adjust.
9623
96242010-04-11 Pedro Alves <pedro@codesourcery.com>
9625
9626 * regcache.c (realloc_register_cache): Invalidate inferior's
9627 regcache before recreating it.
9628
96292010-04-09 Pedro Alves <pedro@codesourcery.com>
9630
9631 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9632
96332010-04-09 Stan Shebs <stan@codesourcery.com>
9634 Pedro Alves <pedro@codesourcery.com>
9635
9636 * server.h (LONGEST): New.
9637 (struct thread_info) <while_stepping>: New field.
9638 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9639 Declare.
9640 (initialize_tracepoint, handle_tracepoint_general_set)
9641 (handle_tracepoint_query, tracepoint_finished_step)
9642 (tracepoint_was_hit, release_while_stepping_state_list):
9643 (current_traceframe): Declare.
9644 * server.c (handle_general_set): Handle tracepoint packets.
9645 (read_memory): New.
9646 (write_memory): New.
9647 (handle_search_memory_1): Use read_memory.
9648 (handle_query): Report support for conditional tracepoints, trace
9649 state variables, and tracepoint sources. Handle tracepoint
9650 queries.
9651 (main): Initialize the tracepoints module.
9652 (process_serial_event): Handle traceframe reads/writes.
9653
9654 * linux-low.c (handle_tracepoints): New.
9655 (linux_wait_1): Call it.
9656 (linux_resume_one_lwp): Handle while-stepping.
9657 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9658 (linux_target_ops): Install them.
9659 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9660 New field.
9661 * linux-x86-low.c (x86_supports_tracepoints): New.
9662 (the_low_target). Install it.
9663
9664 * mem-break.h (delete_breakpoint): Declare.
9665 * mem-break.c (delete_breakpoint): Make external.
9666
9667 * target.h (struct target_ops): Add `supports_tracepoints',
9668 `read_pc', and `write_pc' fields.
9669 (target_supports_tracepoints): Define.
9670 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9671 (phex_nz): New.
9672
9673 * regcache.h (struct regcache) <registers_owned>: New field.
9674 (init_register_cache, regcache_cpy): Declare.
9675 (regcache_read_pc, regcache_write_pc): Declare.
9676 (register_cache_size): Declare.
9677 (supply_regblock): Declare.
9678 * regcache.c (init_register_cache): New.
9679 (new_register_cache): Use it.
9680 (regcache_cpy): New.
9681 (register_cache_size): New.
9682 (supply_regblock): New.
9683 (regcache_read_pc, regcache_write_pc): New.
9684
9685 * tracepoint.c: New.
9686
9687 * Makefile.in (OBS): Add tracepoint.o.
9688 (tracepoint.o): New rule.
9689
96902010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9691
9692 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9693 (i386-mmx.o): New.
9694 (i386-mmx.c): Likewise.
9695 (i386-mmx-linux.o): Likewise.
9696 (i386-mmx-linux.c): Likewise.
9697
9698 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9699 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9700 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9701 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9702
9703 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9704 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9705 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9706
97072010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9708
9709 * Makefile.in (clean): Updated.
9710 (i386-avx.o): New.
9711 (i386-avx.c): Likewise.
9712 (i386-avx-linux.o): Likewise.
9713 (i386-avx-linux.c): Likewise.
9714 (amd64-avx.o): Likewise.
9715 (amd64-avx.c): Likewise.
9716 (amd64-avx-linux.o): Likewise.
9717 (amd64-avx-linux.c): Likewise.
9718
9719 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9720 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9721 (srv_amd64_regobj): Add amd64-avx.o.
9722 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9723 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9724 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9725 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9726 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9727 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9728 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9729
9730 * i387-fp.c: Include "i386-xstate.h".
9731 (i387_xsave): New.
9732 (i387_cache_to_xsave): Likewise.
9733 (i387_xsave_to_cache): Likewise.
9734 (x86_xcr0): Likewise.
9735
9736 * i387-fp.h (i387_cache_to_xsave): Likewise.
9737 (i387_xsave_to_cache): Likewise.
9738 (x86_xcr0): Likewise.
9739
9740 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9741 * linux-crisv32-low.c (target_regsets): Likewise.
9742 * linux-m68k-low.c (target_regsets): Likewise.
9743 * linux-mips-low.c (target_regsets): Likewise.
9744 * linux-ppc-low.c (target_regsets): Likewise.
9745 * linux-s390-low.c (target_regsets): Likewise.
9746 * linux-sh-low.c (target_regsets): Likewise.
9747 * linux-sparc-low.c (target_regsets): Likewise.
9748 * linux-xtensa-low.c (target_regsets): Likewise.
9749
9750 * linux-low.c: Include <sys/uio.h>.
9751 (regsets_fetch_inferior_registers): Support nt_type.
9752 (regsets_store_inferior_registers): Likewise.
9753 (linux_process_qsupported): New.
9754 (linux_target_ops): Add linux_process_qsupported.
9755
9756 * linux-low.h (regset_info): Add nt_type.
9757 (linux_target_ops): Add process_qsupported.
9758
9759 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9760 and <sys/uio.h>.
9761 (init_registers_i386_avx_linux): New.
9762 (init_registers_amd64_avx_linux): Likewise.
9763 (xmltarget_i386_linux_no_xml): Likewise.
9764 (xmltarget_amd64_linux_no_xml): Likewise.
9765 (PTRACE_GETREGSET): Likewise.
9766 (PTRACE_SETREGSET): Likewise.
9767 (x86_fill_xstateregset): Likewise.
9768 (x86_store_xstateregset): Likewise.
9769 (use_xml): Likewise.
9770 (x86_linux_update_xmltarget): Likewise.
9771 (x86_linux_process_qsupported): Likewise.
9772 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9773 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9774 init_registers_i386_linux here. Call
9775 x86_linux_update_xmltarget.
9776 (the_low_target): Add x86_linux_process_qsupported.
9777
9778 * server.c (handle_query): Call target_process_qsupported.
9779
9780 * target.h (target_ops): Add process_qsupported.
9781 (target_process_qsupported): New.
9782
97832010-04-03 Pedro Alves <pedro@codesourcery.com>
9784
9785 * inferiors.c (add_thread): Set last_status kind to
9786 TARGET_WAITKIND_IGNORE.
9787 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9788 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9789 (linux_wait_1): Move `thread' local definition to block that uses
9790 it. Don't NULL initialize `event_child'.
9791 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9792 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9793 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9794
97952010-04-01 Pedro Alves <pedro@codesourcery.com>
9796
9797 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9798 an extended waitstatus, or by a watchpoint.
9799 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9800 thread was stepping or has been stopped by a watchpoint.
9801
98022010-04-01 Pedro Alves <pedro@codesourcery.com>
9803
9804 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9805 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9806 of another, then delete the previous, and validate all
9807 breakpoints.
9808 (validate_inserted_breakpoint): New.
9809 (delete_disabled_breakpoints): New.
9810 (validate_breakpoints): New.
9811 (check_mem_read): Validate breakpoints before trusting their
9812 shadow. Delete disabled breakpoints.
9813 (check_mem_write): Validate breakpoints before trusting they
9814 should be inserted. Delete disabled breakpoints.
9815 * mem-break.h (validate_breakpoints):
9816 * server.c (handle_query): Validate breakpoints when we see a
9817 qSymbol query.
9818
98192010-04-01 Pedro Alves <pedro@codesourcery.com>
9820
9821 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9822 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9823 if we could tell there's a GDB breakpoint at stop_pc.
9824 (need_step_over_p): Don't do a step over if we find a GDB
9825 breakpoint at the resume PC.
9826
9827 * mem-break.c (struct raw_breakpoint): New.
9828 (enum bkpt_type): New type `gdb_breakpoint'.
9829 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9830 fields. New field `raw'.
9831 (find_raw_breakpoint_at): New.
9832 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9833 breakpoint instead.
9834 (set_breakpoint_at): Adjust.
9835 (delete_raw_breakpoint): New.
9836 (release_breakpoint): New.
9837 (delete_breakpoint): Rename to...
9838 (delete_breakpoint_1): ... this. Add proc parameter. Use
9839 release_breakpoint. Return ENOENT.
9840 (delete_breakpoint): Reimplement.
9841 (find_breakpoint_at): Delete.
9842 (find_gdb_breakpoint_at): New.
9843 (delete_breakpoint_at): Delete.
9844 (set_gdb_breakpoint_at): New.
9845 (delete_gdb_breakpoint_at): New.
9846 (gdb_breakpoint_here): New.
9847 (set_reinsert_breakpoint): Use release_breakpoint.
9848 (uninsert_breakpoint): Rename to ...
9849 (uninsert_raw_breakpoint): ... this.
9850 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9851 (reinsert_raw_breakpoint): Change parameter type to
9852 raw_breakpoint.
9853 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9854 instead.
9855 (check_breakpoints): Adjust. Use release_breakpoint.
9856 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9857 (breakpoint_inserted_here): Ditto.
9858 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9859 Don't trust the breakpoint's shadow if it is not inserted.
9860 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9861 (delete_all_breakpoints): Adjust.
9862 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9863 use delete_breakpoint_1.
9864
9865 * mem-break.h (breakpoints_supported): Delete declaration.
9866 (set_gdb_breakpoint_at): Declare.
9867 (gdb_breakpoint_here): Declare.
9868 (delete_breakpoint_at): Delete.
9869 (delete_gdb_breakpoint_at): Declare.
9870
9871 * server.h (struct raw_breakpoint): Forward declare.
9872 (struct process_info): New field `raw_breakpoints'.
9873
9874 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9875 breakpoints.
9876
98772010-03-24 Pedro Alves <pedro@codesourcery.com>
9878
9879 * linux-low.c (status_pending_p_callback): Fix comment.
9880 (linux_wait_for_event_1): Move most of the internal breakpoint
9881 handling from here...
9882 (linux_wait_1): ... to here.
9883 (count_events_callback): New.
9884 (select_singlestep_lwp_callback): New.
9885 (select_event_lwp_callback): New.
9886 (cancel_breakpoints_callback): New.
9887 (select_event_lwp): New.
9888 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9889 priority to all LWPs that have had events that should be reported
9890 to the client. Cancel breakpoints when about to reporting the
9891 event to the client, not while stopping lwps. No longer cancel
9892 finished single-steps here.
9893 (cancel_finished_single_step): Delete.
9894 (cancel_finished_single_steps): Delete.
9895
98962010-03-24 Pedro Alves <pedro@codesourcery.com>
9897
9898 * mem-break.c (enum bkpt_type): New.
9899 (struct breakpoint): New field `type'.
9900 (set_breakpoint_at): Change return type to struct breakpoint
9901 pointer. Set type to `other_breakpoint' by default.
9902 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9903 in the breakpoint list.
9904 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9905 (reinsert_breakpoint): Rename to ...
9906 (reinsert_raw_breakpoint): ... this.
9907 (reinsert_breakpoints_at): Adjust.
9908 * mem-break.h (struct breakpoint): Declare.
9909 (set_breakpoint_at): Change return type to struct breakpoint
9910 pointer.
9911
99122010-03-24 Pedro Alves <pedro@codesourcery.com>
9913
9914 * server.c (handle_query): Assign, not compare.
9915
99162010-03-24 Pedro Alves <pedro@codesourcery.com>
9917
9918 Teach linux gdbserver to step-over-breakpoints.
9919
9920 * linux-low.c (can_hardware_single_step): New.
9921 (supports_breakpoints): New.
9922 (handle_extended_wait): If stopping threads, read the stop pc of
9923 the new cloned LWP.
9924 (get_pc): New.
9925 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9926 low target doesn't support retrieving the PC.
9927 (add_lwp): Set last_resume_kind to resume_continue.
9928 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9929 (linux_attach): Don't clear stop_expected. Set the lwp's
9930 last_resume_kind to resume_stop.
9931 (linux_detach_one_lwp): Don't check for removed breakpoints.
9932 (check_removed_breakpoint): Delete.
9933 (status_pending_p): Rename to ...
9934 (status_pending_p_callback): ... this. Don't check for removed
9935 breakpoints. Don't consider threads that are stopped from GDB's
9936 perspective.
9937 (linux_wait_for_lwp): Always read the stop_pc here.
9938 (cancel_breakpoint): New.
9939 (step_over_bkpt): New global.
9940 (linux_wait_for_event_1): Implement stepping over breakpoints.
9941 (gdb_wants_lwp_stopped): New.
9942 (gdb_wants_all_stopped): New.
9943 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9944 single-step traps here. Store the thread's last reported target
9945 wait status.
9946 (send_sigstop): Don't clear stop_expected. Always set it,
9947 instead.
9948 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9949 (cancel_finished_single_step): New.
9950 (cancel_finished_single_steps): New.
9951 (wait_for_sigstop): Don't cancel finished single-step traps here.
9952 (linux_resume_one_lwp): Don't check for removed breakpoints.
9953 Don't set `step' on non-hardware step archs.
9954 (linux_set_resume_request): Ignore resume_stop requests if already
9955 stopping or stopped. Set the lwp's last_resume_kind.
9956 (resume_status_pending_p): Don't check for removed breakpoints.
9957 (need_step_over_p): New.
9958 (start_step_over): New.
9959 (finish_step_over): New.
9960 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9961 requests. Clear the thread's last reported target waitstatus.
9962 Don't use the `suspended' flag. Don't consider pending breakpoints.
9963 (linux_resume): Start a step-over if necessary.
9964 (proceed_one_lwp): New.
9965 (proceed_all_lwps): New.
9966 (unstop_all_lwps): New.
9967 * linux-low.h (struct lwp_info): Rewrite comment for the
9968 `suspended' flag. Add the `stop_pc' field. Delete the
9969 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9970 Add `'last_resume_kind' and `need_step_over' fields.
9971 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9972 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9973 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9974 (set_raw_breakpoint_at): New.
9975 (set_breakpoint_at): Rewrite to use it.
9976 (reinsert_breakpoint_handler): Delete.
9977 (set_reinsert_breakpoint): New.
9978 (reinsert_breakpoint_by_bp): Delete.
9979 (delete_reinsert_breakpoints): New.
9980 (uninsert_breakpoint): Rewrite.
9981 (uninsert_breakpoints_at): New.
9982 (reinsert_breakpoint): Rewrite.
9983 (reinsert_breakpoints_at): New.
9984 (check_breakpoints): Rewrite.
9985 (breakpoint_here): New.
9986 (breakpoint_inserted_here): New.
9987 (check_mem_read): Adjust.
9988 * mem-break.h (breakpoints_supported, breakpoint_here)
9989 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9990 (reinsert_breakpoint_by_bp): Delete declaration.
9991 (delete_reinsert_breakpoints): Declare.
9992 (reinsert_breakpoint): Delete declaration.
9993 (reinsert_breakpoints_at): Declare.
9994 (uninsert_breakpoint): Delete declaration.
9995 (uninsert_breakpoints_at): Declare.
9996 (check_breakpoints): Adjust prototype.
9997 * server.h: Adjust include order.
9998 (struct thread_info): Declare here. Add a `last_status' field.
9999
100002010-03-23 Michael Snyder <msnyder@vmware.com>
10001
10002 * server.c (crc32): New function.
10003 (handle_query): Add handling for 'qCRC:' request.
10004
100052010-03-23 Pedro Alves <pedro@codesourcery.com>
10006
10007 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10008 lwp had been stopped by a watchpoint.
10009
100102010-03-16 Pedro Alves <pedro@codesourcery.com>
10011
10012 * server.h (internal_error): Declare.
10013 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10014 * utils.c (internal_error): New function.
10015
100162010-03-15 Andreas Schwab <schwab@redhat.com>
10017
10018 * configure.srv: Fix typo setting srv_regobj.
10019
100202010-03-15 Pedro Alves <pedro@codesourcery.com>
10021
10022 * linux-low.c (fetch_register): Avoid passing a non string literal
10023 format to `error'.
10024 (usr_store_inferior_registers): Ditto.
10025
100262010-03-14 Pedro Alves <pedro@codesourcery.com>
10027
10028 * linux-low.c (linux_write_memory): Bail out early if peeking
10029 memory failed.
10030
100312010-03-14 Pedro Alves <pedro@codesourcery.com>
10032
10033 * linux-low.h (struct lwp_info): New fields
10034 `stopped_by_watchpoint' and `stopped_data_address'.
10035 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10036 here, and cache them in the lwp object.
10037 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10038 directly.
10039 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10040 field.
10041 (linux_stopped_by_watchpoint): Rewrite.
10042 (linux_stopped_data_address): Rewrite.
10043
100442010-03-06 Simo Melenius <simo.melenius@iki.fi>
10045
10046 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10047 switching the current inferior, not before.
10048
100492010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10050
10051 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10052 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10053 i386-linux.c and amd64-linux.c.
10054 (reg-i386.o): Removed.
10055 (reg-i386.c): Likewise.
10056 (reg-i386-linux.o): Likewise.
10057 (reg-i386-linux.c): Likewise.
10058 (reg-x86-64.o): Likewise.
10059 (reg-x86-64.c): Likewise.
10060 (reg-x86-64-linux.o): Likewise.
10061 (reg-x86-64-linux.c): Likewise.
10062 (i386.o): New.
10063 (i386.c): Likewise.
10064 (i386-linux.o): Likewise.
10065 (i386-linux.c): Likewise.
10066 (amd64.o): Likewise.
10067 (amd64.c): Likewise.
10068 (amd64-linux.o): Likewise.
10069 (amd64-linux.c): Likewise.
10070
10071 * configure.srv (srv_i386_regobj): New.
10072 (srv_i386_linux_regobj): Likewise.
10073 (srv_amd64_regobj): Likewise.
10074 (srv_amd64_linux_regobj): Likewise.
10075 (srv_i386_32bit_xmlfiles): Likewise.
10076 (srv_i386_64bit_xmlfiles): Likewise.
10077 (srv_i386_xmlfiles): Likewise.
10078 (srv_amd64_xmlfiles): Likewise.
10079 (srv_i386_linux_xmlfiles): Likewise.
10080 (srv_amd64_linux_xmlfiles): Likewise.
10081 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10082 srv_xmlfiles to $srv_i386_xmlfiles.
10083 (i[34567]86-*-mingw32ce*): Likewise.
10084 (i[34567]86-*-mingw*): Likewise.
10085 (i[34567]86-*-nto*): Likewise.
10086 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10087 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10088 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10089 (x86_64-*-linux*): Likewise.
10090
10091 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10092 (init_registers_amd64_linux): New.
10093 (x86_arch_setup): Replace init_registers_x86_64_linux with
10094 init_registers_amd64_linux.
10095
100962010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10097
10098 * configure.ac: Check for libdl. If it is not available link against
10099 static libthread_db.
10100 * configure: Regenerate.
10101
101022010-02-22 Pedro Alves <pedro@codesourcery.com>
10103
10104 PR9605
10105
10106 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10107 handing a read watchpoint.
10108 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10109
101102010-02-12 Doug Evans <dje@google.com>
10111
10112 * linux-low.c (linux_supports_tracefork_flag): Document.
10113 (linux_look_up_symbols): Add comment.
10114
101152010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10116
10117 * regcache.c (supply_register): Clear regcache if buf is NULL.
10118
101192010-02-02 Nicolas Roche <roche@sourceware.org>
10120 Joel Brobecker <brobecker@adacore.com>
10121
10122 * inferiors.c (find_inferior): Add function documentation.
10123 (unloaded_dll): Handle the case where the unloaded dll has not
10124 been previously registered in the dll list.
10125
101262010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10127
10128 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10129 (thumb2_breakpoint): New.
10130 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10131
101322010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10133
10134 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10135 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10136 breakpoints.
10137
101382010-01-21 Pedro Alves <pedro@codesourcery.com>
10139
10140 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10141
101422010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10143
10144 * linux-s390-low.c (s390_collect_ptrace_register)
10145 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10146
101472010-01-21 Doug Evans <dje@google.com>
10148
10149 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10150 (PTRACE_ARG4_TYPE): New macro.
10151 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10152 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10153 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10154 (usr_store_inferior_registers): Ditto.
10155 (linux_read_memory, linux_write_memory): Ditto.
10156 (linux_test_for_tracefork): Ditto.
10157
10158 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10159 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10160
101612010-01-21 Pedro Alves <pedro@codesourcery.com>
10162
10163 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10164 target.
10165
101662010-01-21 Pedro Alves <pedro@codesourcery.com>
10167
10168 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10169 prototype to take a regcache. Adjust.
10170
101712010-01-20 Pedro Alves <pedro@codesourcery.com>
10172
10173 * regcache.h (struct thread_info): Forward declare.
10174 (struct regcache): New.
10175 (new_register_cache): Adjust prototype.
10176 (get_thread_regcache): Declare.
10177 (free_register_cache): Adjust prototype.
10178 (registers_to_string, registers_from_string): Ditto.
10179 (supply_register, supply_register_by_name, collect_register)
10180 (collect_register_as_string, collect_register_by_name): Ditto.
10181 * regcache.c (struct inferior_regcache_data): Delete.
10182 (get_regcache): Rename to ...
10183 (get_thread_regcache): ... this. Adjust. Switch inferior before
10184 fetching registers.
10185 (regcache_invalidate_one): Adjust.
10186 (regcache_invalidate): Fix prototype.
10187 (new_register_cache): Return the new register cache.
10188 (free_register_cache): Change prototype.
10189 (realloc_register_cache): Adjust.
10190 (registers_to_string): Change prototype to take a regcache. Adjust.
10191 (registers_from_string): Ditto.
10192 (register_data): Ditto.
10193 (supply_register): Ditto.
10194 (supply_register_by_name): Ditto.
10195 (collect_register): Ditto.
10196 (collect_register_as_string): Ditto.
10197 (collect_register_by_name): Ditto.
10198 * server.c (process_serial_event): Adjust.
10199 * linux-low.h (regset_fill_func, regset_store_func): Change
10200 prototype.
10201 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10202 Change prototype.
10203 * linux-low.c (get_stop_pc): Adjust.
10204 (check_removed_breakpoint): Adjust.
10205 (linux_wait_for_event): Adjust.
10206 (linux_resume_one_lwp): Adjust.
10207 (fetch_register): Add regcache parameter. Adjust.
10208 (usr_store_inferior_registers): Ditto.
10209 (regsets_fetch_inferior_registers): Ditto.
10210 (regsets_store_inferior_registers): Ditto.
10211 (linux_fetch_registers, linux_store_registers): Ditto.
10212 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10213 regcache. Adjust.
10214 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10215 Ditto.
10216 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10217 prototype to take a regcache.
10218 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10219 * remote-utils.c (convert_ascii_to_int, outreg)
10220 (prepare_resume_reply): Change prototype to take a regcache.
10221 Adjust.
10222 * target.h (struct target_ops) <fetch_registers, store_registers>:
10223 Change prototype to take a regcache.
10224 (fetch_inferior_registers, store_inferior_registers): Change
10225 prototype to take a regcache. Adjust.
10226 * proc-service.c (ps_lgetregs): Adjust.
10227 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10228 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10229 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10230 take a regcache. Adjust.
10231 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10232 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10233 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10234 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10235 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10236 (cris_cannot_fetch_register):
10237 (cris_breakpoint_at): Change prototype to take a regcache.
10238 Adjust.
10239 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10240 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10241 to take a regcache. Adjust.
10242 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10243 Adjust.
10244 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10245 take a regcache. Adjust.
10246 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10247 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10248 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10249 * linux-mips-low.c (mips_get_pc):
10250 (mips_set_pc): Change prototype to take a regcache. Adjust.
10251 (mips_reinsert_addr): Adjust.
10252 (mips_collect_register): Change prototype to take a regcache.
10253 Adjust.
10254 (mips_supply_register):
10255 (mips_collect_register_32bit, mips_supply_register_32bit)
10256 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10257 (mips_store_fpregset): Ditto.
10258 * linux-ppc-low.c (ppc_supply_ptrace_register)
10259 (ppc_supply_ptrace_register): Ditto.
10260 (parse_spufs_run): Adjust.
10261 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10262 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10263 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10264 take a regcache. Adjust.
10265 * linux-s390-low.c (s390_collect_ptrace_register)
10266 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10267 (s390_set_pc): Change prototype to take a regcache. Adjust.
10268 (s390_arch_setup): Adjust.
10269 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10270 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10271 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10272 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10273 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10274 regcache. Adjust.
10275 (sparc_breakpoint_at): Adjust.
10276 * linux-xtensa-low.c (xtensa_fill_gregset):
10277 (xtensa_store_gregset):
10278 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10279 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10280 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10281 prototype to take a regcache. Adjust.
10282 * win32-arm-low.c (arm_fetch_inferior_register)
10283 (arm_store_inferior_register): Change prototype to take a
10284 regcache. Adjust.
10285 * win32-i386-low.c (i386_fetch_inferior_register)
10286 (i386_store_inferior_register): Change prototype to take a
10287 regcache. Adjust.
10288 * win32-low.c (child_fetch_inferior_registers)
10289 (child_store_inferior_registers): Change prototype to take a
10290 regcache. Adjust.
10291 (win32_wait): Adjust.
10292 (win32_fetch_inferior_registers): Change prototype to take a
10293 regcache. Adjust.
10294 (win32_store_inferior_registers): Adjust.
10295 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10296 store_inferior_register>: Change prototype to take a regcache.
10297
102982010-01-20 Doug Evans <dje@google.com>
10299
10300 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10301 #ifdef.
10302 (linux_wait_for_event1, linux_init_signals): Ditto.
10303 (W_STOPCODE): Provide definition if missing.
10304
103052010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10306
10307 * linux-low.c (linux_core_of_thread): New.
10308 (compare_ints, show_process, list_threads): New.
10309 (linux_qxfer_osdata): Report threads and cores.
10310 (linux_target_op): Register linux_core_of_thread.
10311 * remote-utils.c (prepare_resume_reply): Report the core.
10312 (buffer_xml_printf): Support %d specifier.
10313 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10314 New.
10315 (handle_query): Handle qXfer:threads. Announce availability
10316 thereof.
10317 * target.h (struct target_ops): New field core_of_thread.
10318
103192010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10320
10321 * Makefile.in (clean): Remove new generated files.
10322 (reg-s390.o, reg-s390.c): Remove rules.
10323 (reg-s390x.o, reg-s390x.c): Likewise.
10324 (s390-linux32.o, s390-linux32.c): Add rules.
10325 (s390-linux64.o, s390-linux64.c): Likewise.
10326 (s390x-linux64.o, s390x-linux64.c): Likewise.
10327 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10328 * linux-s390-low.c: Include <elf.h>.
10329 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10330 (init_registers_s390): Remove prototype.
10331 (init_registers_s390x): Likewise.
10332 (init_registers_s390_linux32): Add prototype.
10333 (init_registers_s390_linux64): Likewise.
10334 (init_registers_s390x_linux64): Likewise.
10335 (s390_num_regs_3264): New define.
10336 (s390_regmap_3264): New global variable.
10337 (s390_cannot_fetch_register): Remove obsolete check.
10338 (s390_cannot_store_register): Likewise.
10339 (s390_collect_ptrace_register): Handle upper/lower register halves.
10340 (s390_supply_ptrace_register): Likewise.
10341 (s390_fill_gregset): Update to register number changes.
10342 (s390_get_hwcap): New routine.
10343 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10344 Install appropriate regmap and register set.
10345
103462010-01-01 Joel Brobecker <brobecker@adacore.com>
10347
10348 * server.c (gdbserver_version): Update copyright year to 2010.
10349 * gdbreplay.c (gdbreplay_version): Likewise.
10350
103512009-12-28 Doug Evans <dje@google.com>
10352
10353 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10354 elf/external.h. Include <elf.h> instead but only if necessary.
10355
103562009-12-28 Pedro Alves <pedro@codesourcery.com>
10357
10358 * linux-low.c (linux_remove_process): Remove `detaching'
10359 parameter. Don't release/detach from thread_db here.
10360 (linux_kill): Release/detach from thread_db here, ...
10361 (linux_detach): ... and here, before actually detaching.
10362 (linux_wait_1): ... and here, when a process exits.
10363 * thread-db.c (any_thread_of): New.
10364 (thread_db_free): Switch the current inferior to a thread of the
10365 passed in process.
10366
103672009-12-21 Doug Evans <dje@google.com>
10368
10369 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10370
10371 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10372 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10373 warning ifndef __NR_tkill. Move setting of errno there too.
10374 Delete unnecessary resetting of errno after syscall.
10375 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10376
10377 * configure.ac: Check for dladdr.
10378 * config.in: Regenerate.
10379 * configure: Regenerate.
10380 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10381 (try_thread_db_load): Update.
10382
10383 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10384
103852009-12-18 Doug Evans <dje@google.com>
10386
10387 * event-loop.c: Include unistd.h if it exists.
10388
10389 * linux-low.c (my_waitpid): Move definition away from being in
10390 between linux_tracefork_child/linux_test_for_tracefork.
10391
10392 * gdb_proc_service.h (psaddr_t): Fix type.
10393 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10394 signature to match glibc.
10395
103962009-12-16 Doug Evans <dje@google.com>
10397
10398 * linux-low.c (linux_read_memory): Fix argument to read.
10399
104002009-11-26 Pedro Alves <pedro@codesourcery.com>
10401
10402 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10403 events, don't leave current_inferior pointing at null.
10404
104052009-11-26 Pedro Alves <pedro@codesourcery.com>
10406
10407 * win32-low.c (LOG): Delete.
10408 (OUTMSG): Output to stderr.
10409 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10410 on compile time LOG macro.
10411 (win32_wait): Fix debug output.
10412
104132009-11-26 Pedro Alves <pedro@codesourcery.com>
10414
10415 * win32-low.c (win32_add_one_solib): If the dll name is
10416 "ntdll.dll", prepend the system directory to the dll path.
10417
104182009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10419
10420 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10421
104222009-11-17 Nathan Sidwell <nathan@codesourcery.com>
10423 Vladimir Prus <vladimir@codesourcery.com>
10424
10425 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10426 * configure.ac: Check for __mcoldfire__ and set
10427 gdb_cv_m68k_is_coldfire.
10428 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10429 reg-cf.o and reg-m68k.o.
10430 * configure: Regenerated.
10431
104322009-11-16 Pedro Alves <pedro@codesourcery.com>
10433
10434 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10435 Pass it to thread_db_free.
10436 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10437 proper `detaching' argument to linux_remove_process.
10438 * linux-low.h (thread_db_free): Add `detaching' parameter.
10439 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10440 to thread_db_free.
10441 (thread_db_free): Add `detaching' parameter. Only
10442 call td_ta_clear_event if detaching from process.
10443
104442009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10445
10446 * thread-db.c (thread_db_free): Fix typo.
10447
104482009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10449
10450 PR gdb/10838
10451 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10452
104532009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10454
10455 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10456 with an i686 compiler.
10457 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10458 needed.
10459 * configure: Rebuilt.
10460
104612009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10462
10463 PR gdb/10783
10464
10465 * server.c (handle_search_memory_1): Correct read_addr initialization
10466 in loop for searching subsequent chunks.
10467
104682009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10469
10470 * configure.ac: New --with-libthread-db option.
10471 * thread-db.c: Allow direct dependence on libthread_db.
10472 (thread_db_free): Adjust.
10473 * config.in: Regenerate.
10474 * configure: Likewise.
10475
104762009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10477
10478 PR gdb/10757
10479 * thread-db.c (attach_thread): New function.
10480 (maybe_attach_thread): Return success/failure.
10481 (find_new_threads_callback): Adjust.
10482 (thread_db_find_new_threads): Loop until no new threads.
10483
104842009-10-13 Pedro Alves <pedro@codesourcery.com>
10485
10486 * proc-service.c (ps_lgetregs): Formatting.
10487
104882009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10489
10490 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10491 * configure.ac: Adjust.
10492 * linux-low.h (struct process_info_private): Move members to struct
10493 thread_db.
10494 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10495 * linux-low.c (linux_remove_process): Adjust.
10496 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10497 * server.c (handle_query): Move code ...
10498 (handle_monitor_command): ... here. New function.
10499 * target.h (struct target_ops): New member.
10500 * thread-db.c (struct thread_db): New.
10501 (libthread_db_search_path): New variable.
10502 (thread_db_create_event, thread_db_enable_reporting)
10503 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10504 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10505 (try_thread_db_load_1, dladdr_to_soname): New functions.
10506 (try_thread_db_load, thread_db_load_search): New functions.
10507 (thread_db_init): Search for libthread_db.
10508 (thread_db_free): New function.
10509 (thread_db_handle_monitor_command): Likewise.
10510 * config.in: Regenerate.
10511 * configure: Regenerate.
10512
105132009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10514
10515 * spu-low.c (spu_kill): Wait for inferior to terminate.
10516 Call clear_inferiors.
10517 (spu_detach): Call clear_inferiors.
10518
105192009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10520
10521 * aclocal.m4: Regenerate.
10522 * config.in: Likewise.
10523 * configure: Likewise.
10524
105252009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10526
10527 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10528 (parse_spufs_run): New function.
10529 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10530 (ppc_breakpoint_at): Handle SPU breakpoints.
10531
105322009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10533
10534 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10535 (SPUFS_MAGIC): Define.
10536 (spu_enumerate_spu_ids): New function.
10537 (linux_qxfer_spu): New function.
10538 (linux_target_ops): Install linux_qxfer_spu.
10539
105402009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10541
10542 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10543 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10544 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10545 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10546 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10547 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10548 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10549 (init_registers_powerpc_cell32l): Add prototype.
10550 (init_registers_powerpc_cell64l): Likewise.
10551 (ppc_arch_setup): Detect Cell/B.E. architecture.
10552
105532009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10554
10555 * Makefile.in (datarootdir): New variable.
10556
105572009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10558
10559 * linux-low.c (linux_write_memory): Update debugging output.
10560 * Makefile.in (clean): Add new descriptions.
10561 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10562 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10563 * configure.srv: Add new files for arm*-*-linux*.
10564 * linux-arm-low.c: Add new declarations.
10565 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10566 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10567 (HWCAP_VFPv3D16): New.
10568 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10569 instead of __IWMMXT__.
10570 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10571 (arm_arch_setup): New.
10572 (target_regsets): Remove #ifdef. Add VFP regset.
10573 (the_low_target): Use arm_arch_setup.
10574
105752009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10576
10577 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10578 the main thread again.
10579
105802009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10581
10582 Adding Neutrino gdbserver.
10583 * configure: Regenerated.
10584 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10585 * configure.srv (i[34567]86-*-nto*): New target.
10586 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10587 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10588 (nto_comctrl) [__QNX__]: New function.
10589 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10590
105912009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
10592
10593 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10594 srv_tgtobj.
10595
105962009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10597 Pedro Alves <pedro@codesourcery.com>
10598
10599 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10600 don't support CONTEXT_EXTENDED_REGISTERS.
10601 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10602 (the_low_target): Install them.
10603 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10604 failing with ERROR_PIPE_NOT_CONNECTED.
10605
106062009-06-30 Doug Evans <dje@google.com>
10607 Pierre Muller <muller@ics.u-strasbg.fr>
10608
10609 Add h/w watchpoint support to x86-linux, win32-i386.
10610 * Makefile.in (SFILES): Add i386-low.c
10611 (i386_low_h): Define.
10612 (i386-low.o): Add dependencies.
10613 (linux-x86-low.o): Add i386-low.h dependency.
10614 (win32-i386-low.o): Ditto.
10615 * i386-low.c: New file.
10616 * i386-low.h: New file.
10617 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10618 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10619 * linux-low.c (linux_add_process): Initialize arch_private.
10620 (linux_remove_process): Free arch_private.
10621 (add_lwp): Initialize arch_private.
10622 (delete_lwp): Free arch_private.
10623 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10624 provided.
10625 * linux-low.h (process_info_private): New member arch_private.
10626 (lwp_info): New member arch_private.
10627 (linux_target_ops): New members new_process, new_thread,
10628 prepare_to_resume.
10629 (ptid_of): New macro.
10630 * linux-x86-low.c: Include stddef.h, i386-low.h.
10631 (arch_process_info): New struct.
10632 (arch_lwp_info): New struct.
10633 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10634 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10635 (i386_dr_low_get_status): New function.
10636 (x86_insert_point, x86_remove_point): New functions.
10637 (x86_stopped_by_watchpoint): New function.
10638 (x86_stopped_data_address): New function.
10639 (x86_linux_new_process, x86_linux_new_thread): New functions.
10640 (x86_linux_prepare_to_resume): New function.
10641 (the_low_target): Add entries for insert_point, remove_point,
10642 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10643 prepare_to_resume.
10644 * server.c (debug_hw_points): New global.
10645 (monitor_show_help): Document set debug-hw-points.
10646 (handle_query): Process "set debug-hw-points".
10647 * server.h (debug_hw_points): Declare.
10648 (paddress): Declare.
10649 * utils.c (NUMCELLS, CELLSIZE): New macros.
10650 (get_sell, xsnprintf, paddress): New functions.
10651 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10652 remove_point, stopped_by_watchpoint, stopped_data_address.
10653 * win32-i386-low.c: Include i386-low.h.
10654 (debug_reg_state): Replaces dr.
10655 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10656 (i386_dr_low_get_status): New function.
10657 (i386_insert_point, i386_remove_point): New functions.
10658 (i386_stopped_by_watchpoint): New function.
10659 (i386_stopped_data_address): New function.
10660 (i386_initial_stuff): Update.
10661 (get_thread_context,set_thread_context,i386_thread_added): Update.
10662 (the_low_target): Add entries for insert_point,
10663 remove_point, stopped_by_watchpoint, stopped_data_address.
10664 * win32-low.c (win32_insert_watchpoint): New function.
10665 (win32_remove_watchpoint): New function.
10666 (win32_stopped_by_watchpoint): New function.
10667 (win32_stopped_data_address): New function.
10668 (win32_target_ops): Add entries for insert_watchpoint,
10669 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10670 * win32-low.h (win32_target_ops): New members insert_point,
10671 remove_point, stopped_by_watchpoint, stopped_data_address.
10672
106732009-06-25 Pedro Alves <pedro@codesourcery.com>
10674
10675 * server.c (process_serial_event): Re-return unsupported, not
10676 error, if the type isn't recognized. Re-allow supporting only
10677 insert or remove packets. Also call require_running for
10678 breakpoints. Add missing break statement to default case. Tidy.
10679 * target.h (struct target_ops): Rename insert_watchpoint to
10680 insert_point, and remove_watchpoint to remove_point.
10681
10682 * linux-low.h (struct linux_target_ops): Likewise.
10683 * linux-low.c (linux_insert_watchpoint): Rename to ...
10684 (linux_insert_point): ... this. Adjust.
10685 (linux_remove_watchpoint): Rename to ...
10686 (linux_remove_point): ... this. Adjust.
10687 (linux_target_ops): Adjust.
10688 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10689 (cris_insert_point): ... this.
10690 (cris_remove_watchpoint): Rename to ...
10691 (cris_remove_point): ... this.
10692 (the_low_target): Adjust.
10693
106942009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10695
10696 * server.c (handle_v_kill): Pass signal_pid to
10697 kill_inferior if multi_process is zero.
10698
106992009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10700
10701 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10702 * target.h (target_ops): Comment for *_watchpoint to make it clear
10703 the functions can get types '0' and '1'.
10704
107052009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10706
10707 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10708 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10709 * regcache.c (get_regcache): Likewise.
10710 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10711 * win32-low.c (child_fetch_inferior_registers): Remove check for
10712 regno 0.
10713
107142009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10715 Pedro Alves <pedro@codesourcery.com>
10716
10717 * target.h (struct target_ops) <supports_multi_process>: New
10718 callback.
10719 (target_supports_multi_process): New.
10720 * server.c (handle_query): Even if GDB reports support, only
10721 enable multi-process if the target also supports it. Report
10722 multi-process support only if the target backend supports it.
10723 * linux-low.c (linux_supports_multi_process): New function.
10724 (linux_target_ops): Install it as target_supports_multi_process
10725 callback.
10726
107272009-05-24 Doug Evans <dje@google.com>
10728
10729 Global renaming of find_thread_pid to find_thread_ptid.
10730 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10731 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10732 All callers updated.
10733
10734 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10735 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10736 directly.
10737
10738 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10739 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10740 (linux_resume_one_lwp): Ditto.
10741
107422009-05-23 Doug Evans <dje@google.com>
10743
10744 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10745 from struct inferior_list_entry * to struct lwp_info *.
10746 All callers updated.
10747
107482009-05-13 Doug Evans <dje@google.com>
10749
10750 * linux-x86-low.c: Don't include assert.h.
10751 (x86_siginfo_fixup): Use fatal, not assert.
10752 (x86_arch_setup): Fix comment.
10753
107542009-05-12 Doug Evans <dje@google.com>
10755
10756 Biarch support for i386/amd64 gdbserver.
10757 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10758 Add linux-x86-low.c.
10759 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10760 (linux-x86-low.o): Add.
10761 * linux-x86-64-low.c: Delete.
10762 * linux-i386-low.c: Delete.
10763 * linux-x86-low.c: New file.
10764 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10765 linux-x86-low.o.
10766 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10767 linux-x86-low.o.
10768 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10769 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10770 (linux_child_pid_to_exec_file): New function.
10771 (elf_64_header_p, elf_64_file_p): New functions.
10772 (siginfo_fixup): New function.
10773 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10774 give target a chance to convert layout.
10775 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10776 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10777
107782009-05-07 Doug Evans <dje@google.com>
10779
10780 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10781 (regsets_store_inferior_registers): Ditto.
10782
107832009-05-06 Pedro Alves <pedro@codesourcery.com>
10784
10785 PR server/10048
10786
10787 * linux-low.c (must_set_ptrace_flags): Delete.
10788 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10789 of the global.
10790 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10791 `lwp->must_set_ptrace_flags' instead.
10792 (linux_wait_for_event_1): Set ptrace options here.
10793 (linux_wait_1): ... not here.
10794
107952009-04-30 Doug Evans <dje@google.com>
10796
10797 * inferiors.c (started_inferior_callback): New function.
10798 (attached_inferior_callback): New function.
10799 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10800 * server.c (print_started_pid, print_attached_pid): New functions.
10801 (detach_or_kill_for_exit): New function.
10802 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10803 * server.h (have_started_inferiors_p): Declare.
10804 (have_attached_inferiors_p): Declare.
10805
10806 * inferiors.c (remove_process): Fix memory leak, free process.
10807 * linux-low.c (linux_remove_process): New function.
10808 (linux_kill): Call it instead of remove_process.
10809 (linux_detach, linux_wait_1): Ditto.
10810
108112009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10812
10813 * configure.srv: Add x86 Windows CE target.
10814
108152009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10816
10817 * inferiors.c (get_thread_process): Make global.
10818 * server.h (get_thread_process): Add prototype.
10819 * thread-db.c (find_one_thread): Use get_thread_process
10820 instead of current_process.
10821 (thread_db_get_tls_address): Do not crash if called when
10822 thread layer is not yet initialized.
10823
108242009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10825
10826 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10827 * spu-low.c (current_tid): Rename to ...
10828 (current_ptid): ... this.
10829 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10830 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10831 ptid_get_lwp (current_ptid) instead of current_tid.
10832 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10833 instead of current_tid. Use find_process_pid to verify pid
10834 argument is valid. Pass proper argument to remove_process.
10835 (spu_thread_alive): Compare current_ptid instead of current_tid.
10836 (spu_resume): Likewise.
10837
108382009-04-02 Pedro Alves <pedro@codesourcery.com>
10839
10840 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10841 variable.
10842
108432009-04-01 Pedro Alves <pedro@codesourcery.com>
10844
10845 Implement the multiprocess extensions, and add linux multiprocess
10846 support.
10847
10848 * server.h (ULONGEST): Declare.
10849 (struct ptid, ptid_t): New.
10850 (minus_one_ptid, null_ptid): Declare.
10851 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10852 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10853 (struct inferior_list_entry): Change `id' type from unsigned from
10854 to ptid_t.
10855 (struct sym_cache, struct breakpoint, struct
10856 process_info_private): Forward declare.
10857 (struct process_info): Declare.
10858 (current_process): Declare.
10859 (all_processes): Declare.
10860 (initialize_inferiors): Declare.
10861 (add_thread): Adjust to use ptid_t.
10862 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10863 (add_process, remove_process, find_thread_pid): Declare.
10864 (find_inferior_id): Adjust to use ptid_t.
10865 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10866 (multi_process): Declare.
10867 (push_event): Adjust to use ptid_t.
10868 (read_ptid, write_ptid): Declare.
10869 (prepare_resume_reply): Adjust to use ptid_t.
10870 (clear_symbol_cache): Declare.
10871 * inferiors.c (all_processes): New.
10872 (null_ptid, minus_one_ptid): New.
10873 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10874 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10875 (add_thread): Change unsigned long to ptid. Remove gdb_id
10876 parameter. Adjust.
10877 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10878 (gdb_id_to_thread): Rename to ...
10879 (find_thread_pid): ... this. Change unsigned long to ptid.
10880 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10881 (loaded_dll, pull_pid_from_list): Adjust.
10882 (add_process, remove_process, find_process_pid)
10883 (get_thread_process, current_process, initialize_inferiors): New.
10884 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10885 (struct target_waitstatus) <related_pid>: Ditto.
10886 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10887 return type to int.
10888 (struct target_ops) <join>: Add `pid' argument.
10889 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10890 (struct target_ops) <wait>: Add `ptid' field. Change return type
10891 to ptid.
10892 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10893 (mywait): Add `ptid' argument. Change return type to ptid_t.
10894 (target_pid_to_str): Declare.
10895 * target.c (set_desired_inferior): Adjust to use ptids.
10896 (mywait): Add new `ptid' argument. Adjust.
10897 (target_pid_to_str): New.
10898 * mem-break.h (free_all_breakpoints): Declare.
10899 * mem-break.c (breakpoints): Delelete.
10900 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10901 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10902 to use per-process breakpoint list.
10903 (free_all_breakpoints): New.
10904 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10905 (symbol_cache, all_symbols_looked_up): Delete.
10906 (hexchars): New.
10907 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10908 read_ptid): New.
10909 (prepare_resume_reply): Change ptid argument's type from unsigned
10910 long to ptid_t. Adjust. Implement W;process and X;process.
10911 (free_sym_cache, clear_symbol_cache): New.
10912 (look_up_one_symbol): Adjust to per-process symbol cache. *
10913 * server.c (cont_thread, general_thread, step_thread): Change type
10914 to ptid_t.
10915 (attached): Delete.
10916 (multi_process): New.
10917 (last_ptid): Change type to ptid_t.
10918 (struct vstop_notif) <ptid>: Change type to ptid_t.
10919 (queue_stop_reply, push_event): Change `ptid' argument's type to
10920 ptid_t.
10921 (discard_queued_stop_replies): Add `pid' argument.
10922 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10923 changes. Don't reference the `attached' global.
10924 (attach_inferior): Adjust to mywait interface changes.
10925 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10926 features. Handle and report "multiprocess+". Handle
10927 "qAttached:PID".
10928 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10929 changes.
10930 (handle_v_kill): New.
10931 (handle_v_stopped): Adjust to use target_pid_to_str.
10932 (handle_v_requests): Allow multiple attaches and runs when
10933 multiprocess extensions are in effect. Handle "vKill".
10934 (myresume): Adjust to use ptids.
10935 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10936 (handle_status): Adjust to discard_queued_stop_replies interface
10937 change.
10938 (first_thread_of, kill_inferior_callback)
10939 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10940 (main): Call initialize_inferiors. Adjust to use ptids, killing
10941 and detaching from all inferiors. Handle multiprocess packet
10942 variants.
10943 * linux-low.h: Include gdb_proc_service.h.
10944 (struct process_info_private): New.
10945 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10946 <lwpid_of>: Use ptid_get_lwp.
10947 (get_lwp_thread): Adjust.
10948 (struct lwp_info): Add `dead' member.
10949 (find_lwp_pid): Declare.
10950 * linux-low.c (thread_db_active): Delete.
10951 (new_inferior): Adjust comment.
10952 (inferior_pid): Delete.
10953 (linux_add_process): New.
10954 (handle_extended_wait): Adjust.
10955 (add_lwp): Change unsigned long to ptid.
10956 (linux_create_inferior): Add process to processes table. Adjust
10957 to use ptids. Don't set new_inferior here.
10958 (linux_attach_lwp): Rename to ...
10959 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10960 it. Adjust to use ptids.
10961 (linux_attach_lwp): New.
10962 (linux_attach): Add process to processes table. Don't set
10963 new_inferior here.
10964 (struct counter): New.
10965 (second_thread_of_pid_p, last_thread_of_process_p): New.
10966 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10967 multiple processes.
10968 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10969 processes. Remove process from process table.
10970 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10971 to multiple processes.
10972 (any_thread_of): New.
10973 (linux_detach): Add `pid' argument, and handle it. Remove process
10974 from processes table.
10975 (linux_join): Add `pid' argument. Handle it.
10976 (linux_thread_alive): Change unsighed long argument to ptid_t.
10977 Consider dead lwps as not being alive.
10978 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10979 threads we're not interested in.
10980 (same_lwp, find_lwp_pid): New.
10981 (linux_wait_for_lwp): Change `pid' argument's type from int to
10982 ptid_t. Adjust.
10983 (linux_wait_for_event): Rename to ...
10984 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10985 from int to ptid_t. Adjust.
10986 (linux_wait_for_event): New.
10987 (linux_wait_1): Add `ptid' argument. Change return type to
10988 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10989 that exit from the process table.
10990 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10991 Adjust.
10992 (mark_lwp_dead): New.
10993 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10994 stopping all threads, mark its main lwp as dead.
10995 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
10996 ptids.
10997 (fetch_register, usr_store_inferior_registers)
10998 (regsets_fetch_inferior_registers)
10999 (regsets_store_inferior_registers, linux_read_memory)
11000 (linux_write_memory): Inline `inferior_pid'.
11001 (linux_look_up_symbols): Adjust to use per-process
11002 `thread_db_active'.
11003 (linux_request_interrupt): Adjust to use ptids.
11004 (linux_read_auxv): Inline `inferior_pid'.
11005 (initialize_low): Don't reference thread_db_active.
11006 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11007 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11008 (ps_getpid): Return the pid of the current inferior.
11009 * thread-db.c (proc_handle, thread_agent): Delete.
11010 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11011 per-process data.
11012 (find_one_thread): Change argument type to ptid_t. Adjust to
11013 per-process data.
11014 (maybe_attach_thread): Adjust to per-process data and ptids.
11015 (thread_db_find_new_threads): Ditto.
11016 (thread_db_init): Ditto.
11017 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11018 processes table. Adjust to use ptids.
11019 (spu_kill, spu_detach): Adjust interface. Remove process from
11020 processes table.
11021 (spu_join, spu_thread_alive): Adjust interface.
11022 (spu_wait): Adjust interface. Remove process from processes
11023 table. Adjust to use ptids.
11024 * win32-low.c (current_inferior_tid): Delete.
11025 (current_inferior_ptid): New.
11026 (debug_event_ptid): New.
11027 (thread_rec): Take a ptid. Adjust.
11028 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11029 (child_delete_thread): Ditto.
11030 (do_initial_child_stuff): Add `attached' argument. Add process to
11031 processes table.
11032 (child_fetch_inferior_registers, child_store_inferior_registers):
11033 Adjust.
11034 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11035 (win32_attach): Pass 1 to do_initial_child_stuff.
11036 (win32_kill): Adjust interface. Remove process from processes
11037 table.
11038 (win32_detach): Ditto.
11039 (win32_join): Adjust interface.
11040 (win32_thread_alive): Take a ptid.
11041 (win32_resume): Adjust to use ptids.
11042 (get_child_debug_event): Ditto.
11043 (win32_wait): Adjust interface. Remove exiting process from
11044 processes table.
11045
110462009-04-01 Pedro Alves <pedro@codesourcery.com>
11047
11048 Non-stop mode support.
11049
11050 * server.h (non_stop): Declare.
11051 (gdb_client_data, handler_func): Declare.
11052 (delete_file_handler, add_file_handler, start_event_loop):
11053 Declare.
11054 (handle_serial_event, handle_target_event, push_event)
11055 (putpkt_notif): Declare.
11056 * target.h (enum resume_kind): New.
11057 (struct thread_resume): Replace `step' field by `kind' field.
11058 (TARGET_WNOHANG): Define.
11059 (struct target_ops) <wait>: Add `options' argument.
11060 <supports_non_stop, async, start_non_stop>: New fields.
11061 (target_supports_non_stop, target_async): New.
11062 (start_non_stop): Declare.
11063 (mywait): Add `options' argument.
11064 * target.c (mywait): Add `options' argument. Print child exit
11065 notifications here.
11066 (start_non_stop): New.
11067 * server.c (non_stop, own_buf, mem_buf): New globals.
11068 (struct vstop_notif): New.
11069 (notif_queue): New global.
11070 (queue_stop_reply, push_event, discard_queued_stop_replies)
11071 (send_next_stop_reply): New.
11072 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11073 interface changes.
11074 (attach_inferior): In non-stop mode, don't wait for the target
11075 here.
11076 (handle_general_set): Handle QNonStop.
11077 (handle_query): When handling qC, return the current general
11078 thread, instead of the first thread of the list.
11079 (handle_query): If the backend supports non-stop mode, include
11080 QNonStop+ in the qSupported query response.
11081 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11082 and non-stop mode.
11083 (handle_v_attach, handle_v_run): Handle non-stop mode.
11084 (handle_v_stopped): New.
11085 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11086 (myresume): Adjust to use resume_kind. Handle non-stop.
11087 (queue_stop_reply_callback): New.
11088 (handle_status): Handle non-stop mode.
11089 (main): Clear non_stop flag on reconnection. Use the event-loop.
11090 Refactor serial protocol handling from here ...
11091 (process_serial_event): ... to this new function. When GDB
11092 selects any thread, select one here. In non-stop mode, wait until
11093 GDB acks all pending events before exiting.
11094 (handle_serial_event, handle_target_event): New.
11095 * remote-utils.c (remote_open): Install remote_desc in the event
11096 loop.
11097 (remote_close): Remove remote_desc from the event loop.
11098 (putpkt_binary): Rename to...
11099 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11100 (putpkt_binary): New as wrapper around putpkt_binary_1.
11101 (putpkt_notif): New.
11102 (prepare_resume_reply): In non-stop mode, don't change the
11103 general_thread.
11104 * event-loop.c: New.
11105 * Makefile.in (OBJ): Add event-loop.o.
11106 (event-loop.o): New rule.
11107
11108 * linux-low.h (pid_of): Moved here.
11109 (lwpid_of): New.
11110 (get_lwp_thread): Use lwpid_of.
11111 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11112 * linux-low.c (pid_of): Delete.
11113 (inferior_pid): Use lwpid_of.
11114 (linux_event_pipe): New.
11115 (target_is_async_p): New.
11116 (delete_lwp): New.
11117 (handle_extended_wait): Use lwpid_of.
11118 (add_lwp): Don't set lwpid field.
11119 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11120 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11121 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11122 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11123 first. Adjust to linux_wait_for_event interface changes. Use
11124 lwpid_of.
11125 (linux_detach): Don't delete the main lwp here.
11126 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11127 (status_pending_p): Don't consider explicitly suspended lwps.
11128 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11129 pointer. Add OPTIONS argument. Change return type to int. Use
11130 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11131 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11132 pointer. Add status pointer argument. Return a pid instead of a
11133 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11134 changes. In non-stop mode, don't switch to a random thread.
11135 (linux_wait): Rename to...
11136 (linux_wait_1): ... this. Add target_options argument, and handle
11137 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11138 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11139 clean exit and signal exit code. Don't stop all threads in
11140 non-stop mode. In all-stop mode, only stop all threads when
11141 reporting a stop to GDB. Handle explicit thread stop requests.
11142 (async_file_flush, async_file_mark): New.
11143 (linux_wait): New.
11144 (send_sigstop): Use lwpid_of.
11145 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11146 interface changes. In non-stop mode, don't switch to a random
11147 thread.
11148 (linux_resume_one_lwp): Use lwpid_of.
11149 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11150 (linux_resume_one_thread): ... this. Handle resume_stop. In
11151 non-stop mode, don't look for pending flag in all threads.
11152 (resume_status_pending_p): Don't consider explicitly suspended
11153 threads.
11154 (my_waitpid): Reimplement. Emulate __WALL.
11155 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11156 Use lwpid_of.
11157 (sigchld_handler, linux_supports_non_stop, linux_async)
11158 (linux_start_non_stop): New.
11159 (linux_target_ops): Register linux_supports_non_stop, linux_async
11160 and linux_start_non_stop.
11161 (initialize_low): Install SIGCHLD handler.
11162 * thread-db.c (thread_db_create_event, find_one_thread)
11163 (thread_db_get_tls_address): Use lwpid_of.
11164 * win32-low.c (win32_detach): Adjust to use resume_kind.
11165 (win32_wait): Add `options' argument.
11166 * spu-low.c (spu_resume): Adjust to use resume_kind.
11167 (spu_wait): Add `options' argument.
11168
111692009-04-01 Pedro Alves <pedro@codesourcery.com>
11170
11171 Decouple target code from remote protocol.
11172
11173 * target.h (enum target_waitkind): New.
11174 (struct target_waitstatus): New.
11175 (struct target_ops) <wait>: Return an unsigned long. Take a
11176 target_waitstatus pointer instead of a char pointer.
11177 (mywait): Likewise.
11178 * target.c (mywait): Change prototype to return an unsigned long.
11179 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11180 * server.h (thread_from_wait, old_thread_from_wait): Delete
11181 declarations.
11182 (prepare_resume_reply): Change prototype to take a
11183 target_waitstatus.
11184 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11185 (last_status, last_ptid): New.
11186 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11187 pid instead of a signal.
11188 (attach_inferior): Remove "status" and "signal" parameters.
11189 Adjust.
11190 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11191 not as an address.
11192 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11193 (handle_v_requests, myresume): Remove "status" and "signal"
11194 parameters. Adjust.
11195 (handle_status): New.
11196 (main): Delete local `status'. Adjust.
11197 * remote-utils.c: Include target.h.
11198 (prepare_resume_reply): Change prototype to take a
11199 target_waitstatus. Adjust.
11200
11201 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11202 interface.
11203 * spu-low.c (spu_wait): Adjust.
11204 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11205 Delete.
11206 (win32_wait): Adjust.
11207
112082009-04-01 Pedro Alves <pedro@codesourcery.com>
11209
11210 * target.h (struct thread_resume): Delete leave_stopped member.
11211 (struct target_ops): Add a `n' argument to the `resume' callback.
11212 * server.c (start_inferior): Adjust.
11213 (handle_v_cont, myresume): Adjust.
11214 * linux-low.c (check_removed_breakpoint): Adjust to resume
11215 interface change, and to removed leave_stopped field.
11216 (resume_ptr): Delete.
11217 (struct thread_resume_array): New.
11218 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11219 resume interface change.
11220 (linux_continue_one_thread, linux_queue_one_thread)
11221 (resume_status_pending_p): Check if the resume field is NULL
11222 instead of checking the leave_stopped member.
11223 (linux_resume): Adjust to the target resume interface change.
11224 * spu-low.c (spu_resume): Adjust to the target resume interface
11225 change.
11226 * win32-low.c (win32_detach, win32_resume): Ditto.
11227
112282009-04-01 Pedro Alves <pedro@codesourcery.com>
11229
11230 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11231 flag.
11232 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11233 pending.
11234 (linux_continue_one_thread): Only preserve the stepping flag if
11235 there's a pending breakpoint.
11236
112372009-03-31 Pedro Alves <pedro@codesourcery.com>
11238
11239 * server.c (main): After the inferior having exited, call
11240 remote_close before exiting gdbserver.
11241
112422009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11243
11244 Fix size of FPSCR in Power 7 processors.
11245 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11246 (PPC_FEATURE_HAS_DFP): New #define.
11247 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11248 size of the FPSCR.
11249
112502009-03-23 Pedro Alves <pedro@codesourcery.com>
11251
11252 * server.c (handle_query) Whitespace and formatting.
11253
112542009-03-22 Pedro Alves <pedro@codesourcery.com>
11255
11256 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11257 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11258 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11259 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11260 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11261 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11262 Makefile.in, configure.ac: Fix whitespace throughout.
11263 * configure: Regenerate.
11264
112652009-03-22 Pedro Alves <pedro@codesourcery.com>
11266
11267 * inferiors.c (find_inferior): Make it safe for the callback
11268 function to delete the currently iterated inferior.
11269
112702009-03-22 Pedro Alves <pedro@codesourcery.com>
11271
11272 * Makefile.in (linuw_low_h): Move higher.
11273 (thread-db.o): Depend on $(linux_low_h).
11274
112752009-03-17 Pedro Alves <pedro@codesourcery.com>
11276
11277 Rename "process" to "lwp" throughout.
11278
11279 * linux-low.c (all_processes): Rename to...
11280 (all_lwps): ... this.
11281 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11282 (add_process): Rename to ...
11283 (add_lwp): ... this. Adjust.
11284 (linux_create_inferior): Adjust.
11285 (linux_attach_lwp): Adjust.
11286 (linux_attach): Adjust.
11287 (linux_kill_one_process): Rename to ...
11288 (linux_kill_one_lwp): ... this. Adjust.
11289 (linux_kill): Adjust.
11290 (linux_detach_one_process): Rename to ...
11291 (linux_detach_one_lwp): ... this. Adjust.
11292 (linux_detach): Adjust.
11293 (check_removed_breakpoint): Adjust.
11294 (status_pending_p): Adjust.
11295 (linux_wait_for_process): Rename to ...
11296 (linux_wait_for_lwp): ... this. Adjust.
11297 (linux_wait_for_event): Adjust.
11298 (send_sigstop): Adjust.
11299 (wait_for_sigstop): Adjust.
11300 (stop_all_processes): Rename to ...
11301 (stop_all_lwps): ... this.
11302 (linux_resume_one_process): Rename to ...
11303 (linux_resume_one_lwp): ... this. Adjust.
11304 (linux_set_resume_request, linux_continue_one_thread)
11305 (linux_queue_one_thread, resume_status_pending_p)
11306 (usr_store_inferior_registers, regsets_store_inferior_registers)
11307 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11308 Adjust.
11309 * linux-low.h (get_process): Rename to ...
11310 (get_lwp): ... this. Adjust.
11311 (get_thread_process): Rename to ...
11312 (get_thread_lwp): ... this. Adjust.
11313 (get_process_thread): Rename to ...
11314 (get_lwp_thread): ... this. Adjust.
11315 (struct process_info): Rename to ...
11316 (struct lwp_info): ... this.
11317 (all_processes): Rename to ...
11318 (all_lwps): ... this.
11319 * proc-service.c (ps_lgetregs): Adjust.
11320 * thread-db.c (thread_db_create_event, find_one_thread)
11321 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11322
113232009-03-14 Pedro Alves <pedro@codesourcery.com>
11324
11325 * server.c (handle_query): Handle "qAttached".
11326
113272009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11328
11329 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11330 GPLv3, update license URL.
11331
113322009-03-01 Doug Evans <dje@google.com>
11333
11334 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
11335 (server_h): Add gdb_signals.h.
11336 (signals.o): Update.
11337 * server.h (target_signal_from_host,target_signal_to_host_p)
11338 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11339
113402009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11341
11342 * remote-utils.c (getpkt): Also generate remote-debug
11343 information if noack_mode is set.
11344
113452009-02-06 Pedro Alves <pedro@codesourcery.com>
11346
11347 * server.c (handle_query): Report qXfer:siginfo:read and
11348 qXfer:siginfo:write as supported and handle them.
11349 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11350 * linux-low.c (linux_xfer_siginfo): New.
11351 (linux_target_ops): Set it.
11352
113532009-01-26 Pedro Alves <pedro@codesourcery.com>
11354
11355 * server.c (gdbserver_usage): Mention --remote-debug.
11356 (main): Accept '--remote-debug' switch.
11357
113582009-01-18 Doug Evans <dje@google.com>
11359
11360 * regcache.c (new_register_cache): No need to check result of xcalloc.
11361 * server.c (handle_search_memory): Back out calls to xmalloc,
11362 result is checked and error is returned to user upon failure.
11363 (handle_query): Ditto. Add more checks for result of malloc.
11364 (handle_v_cont): Check result of malloc, report error back to
11365 user upon failure.
11366 (handle_v_run): Ditto. Call freeargv.
11367 * server.h (freeargv): Declare.
11368 * utils.c (freeargv): New fn.
11369
113702009-01-15 Doug Evans <dje@google.com>
11371
11372 * gdbreplay.c (perror_with_name): Make arg const char *.
11373 * server.h (target_signal_to_name): Make return type const char *.
11374 * thread-db.c (thread_db_err_str): Make return type const char *.
11375 * utils.c (perror_with_name): Make arg const char *.
11376
113772009-01-14 Pedro Alves <pedro@codesourcery.com>
11378
11379 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11380 when handling a EXIT_PROCESS_DEBUG_EVENT.
11381
113822009-01-06 Joel Brobecker <brobecker@adacore.com>
11383
11384 * gdbreplay.c (gdbreplay_version): Update copyright year.
11385 * server.c (gdbserver_version): Likewise.
11386
113872009-01-05 Doug Evans <dje@google.com>
11388
11389 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
11390 (handle_extended_wait): Improve comment.
11391
113922008-12-13 Doug Evans <dje@google.com>
11393
11394 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11395 * server.h (ATTR_MALLOC): New macro.
11396 (xmalloc,xcalloc,xstrdup): Declare.
11397 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11398 * inferiors.c: Ditto.
11399 * linux-low.c: Ditto.
11400 * mem-break.c: Ditto.
11401 * regcache.c: Ditto.
11402 * remote-utils.c: Ditto.
11403 * server.c: Ditto.
11404 * target.c: Ditto.
11405 * win32-low.c: Ditto.
11406
114072008-12-12 Doug Evans <dje@google.com>
11408
11409 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11410 in debugging printf.
11411
11412 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11413
114142008-12-09 Doug Evans <dje@google.com>
11415
11416 * linux-low.h (struct process_info): Delete member tid, unused.
11417 * thread-db.c (find_one_thread): Update.
11418 (maybe_attach_thread): Update.
11419
114202008-12-02 Pedro Alves <pedro@codesourcery.com>
11421
11422 * target.h (struct target_ops): Add qxfer_osdata member.
11423 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11424 and dirent.h.
11425 (linux_qxfer_osdata): New functions.
11426 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11427 callback.
11428 * server.c (handle_query): Handle "qXfer:osdata:read:".
11429 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11430 (buffer_xml_printf): New functions.
11431 * server.h (struct buffer): New.
11432 (buffer_grow_str, buffer_grow_str0): New macros.
11433 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11434 (buffer_xml_printf): Declare.
11435
114362008-11-24 Doug Evans <dje@google.com>
11437
11438 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11439
114402008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11441
11442 * server.c (handle_v_run): Always use the supplied argument list.
11443
114442008-11-19 Bob Wilson <bob.wilson@acm.org>
11445
11446 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11447 (xtensa_regmap_table): Add entry for scompare1.
11448
114492008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11450
11451 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11452 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11453 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11454 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11455 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11456 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11457 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11458 XML target descriptions.
11459 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11460 when inferior is running on an ISA 2.05 or later processor. Add
11461 special case to return offset for full 64-bit slot of FPSCR when
11462 in 32-bits.
11463
114642008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11465
11466 * Makefile.in (SFILES, clean): Added sparc64 files.
11467 (reg-sparc64.o, reg-sparc64.c): New.
11468 * configure.srv (sparc*-*-linux*): New configuration.
11469 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11470 syscall arguments for SPARC.
11471 (regsets_store_inferior_registers): Likewise.
11472 * linux-sparc-low.c: New file.
11473
114742008-10-21 Doug Evans <dje@google.com>
11475
11476 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11477 (READLINE_DIR,READLINE_DEP): Delete.
11478 (INTERNAL_CFLAGS): Update.
11479 (LINTFLAGS): Update.
11480
114812008-10-10 Pedro Alves <pedro@codesourcery.com>
11482
11483 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11484 whole argv from the last run, not just argv[0].
11485
114862008-09-08 Pedro Alves <pedro@codesourcery.com>
11487
11488 * regcache.c (new_register_cache): Return NULL if the register
11489 cache size isn't known yet.
11490 (free_register_cache): Avoid dereferencing a NULL regcache.
11491
114922008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11493
11494 * configure.srv: Merge MIPS and MIPS64.
11495
114962008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11497
11498 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11499
115002008-08-18 Luis Machado <luisgpm@br.ibm.com>
11501
11502 * Makefile.in: Add required vsx dependencies.
11503
11504 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11505 Declare init_registers_powerpc_vsx32l.
11506 Declare init_registers_powerpc_vsx64l.
11507 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11508 (ppc_arch_setup): Check for VSX in hwcap.
11509 (ppc_fill_vsxregset): New function.
11510 (ppc_store_vsxregset): New function.
11511 Add new VSX entry in regset_info target_regsets.
11512
11513 * configure.srv: Add new VSX dependencies.
11514
115152008-08-12 Pedro Alves <pedro@codesourcery.com>
11516
11517 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11518 (remote_open): Set or clear transport_is_reliable.
11519 (putpkt_binary): Don't expect acks in noack mode.
11520 (getpkt): Don't send ack/nac in noack mode.
11521 * server.c (handle_general_set): Handle QStartNoAckMode.
11522 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11523 qSupported.
11524 (main): Reset noack_mode on every connection.
11525 * server.h (noack_mode): Declare.
11526
115272008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11528
11529 * Makefile.in (GDBREPLAY_OBS): New variable.
11530 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11531
115322008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11533 Daniel Jacobowitz <dan@codesourcery.com>
11534
11535 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11536 (usr_store_inferior_registers): Likewise.
11537 (regsets_store_inferior_registers): Likewise.
11538
115392008-07-31 Rolf Jansen <rj@surtec.com>
11540 Pedro Alves <pedro@codesourcery.com>
11541
11542 * configure.ac: Check for memmem declaration.
11543 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11544 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11545 (disable_packet_qfThreadInfo): Unconditionally compile.
11546 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11547 * configure, config.in: Regenerate.
11548
115492008-07-28 Doug Kwan <dougkwan@google.com>
11550
11551 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11552 (linux_write_memory): Remove declaration of errno.
11553
115542008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11555
11556 * linux-low.c (handle_extended_wait): Do not use "status"
11557 variable uninitialized.
11558
115592008-07-07 Pedro Alves <pedro@codesourcery.com>
11560
11561 * server.c (handle_v_attach): Inhibit reporting dll changes.
11562
115632008-06-27 Pedro Alves <pedro@codesourcery.com>
11564
11565 * remote-utils.c (prepare_resume_reply): If requested, don't
11566 output "thread:TID" in the T stop reply.
11567
11568 * server.c (disable_packet_vCont, disable_packet_Tthread)
11569 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11570 (handle_query): If requested, disable support for qC, qfThreadInfo
11571 and qsThreadInfo.
11572 (handle_v_requests): If requested, disable support for vCont.
11573 (gdbserver_show_disableable): New.
11574 (main): Handle --disable-packet and --disable-packet=LIST.
11575
11576 * server.h (disable_packet_vCont, disable_packet_Tthread)
11577 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11578
115792008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11580
11581 * server.c (gdbserver_usage): Mention --version.
11582
115832008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11584
11585 * Makefile.in (gdbreplay.o): New rule.
11586
115872008-06-06 Joseph Myers <joseph@codesourcery.com>
11588
11589 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11590 message, not gdbserver.
11591
115922008-06-05 Vladimir Prus <vladimir@codesourcery.com>
11593 Nathan Sidwell <nathan@codesourcery.com>
11594 Joseph Myers <joseph@codesourcery.com>
11595
11596 * acinclude.m4: Include ../../config/acx.m4.
11597 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11598 * configure, config.in: Regenerate.
11599 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11600 * server.c (gdbserver_version): Print PKGVERSION.
11601 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11602 (main): Adjust gdbserver_usage calls.
11603 * gdbreplay.c (version, host_name): Add declarations.
11604 (gdbreplay_version, gdbreplay_usage): New.
11605 (main): Accept --version and --help options.
11606
116072008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11608
11609 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11610 (arm_breakpoint_at): Handle Thumb.
11611 (the_low_target): Add comment.
11612
116132008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11614
11615 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11616
116172008-05-09 Doug Evans <dje@google.com>
11618
11619 * server.h (decode_search_memory_packet): Declare.
11620 * remote-utils.c (decode_search_memory_packet): New fn.
11621 * server.c (handle_search_memory_1): New fn.
11622 (handle_search_memory): New fn.
11623 (handle_query): Process qSearch:memory packets.
11624
116252008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11626
11627 * regcache.c (registers_length): Remove.
11628 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11629 full register packet.
11630 * regcache.h (registers_length): Remove prototype.
11631 * server.h (PBUFSIZ): Define to 16384.
11632
116332008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11634
11635 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11636 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11637 powerpc-64l.o, and powerpc-altivec64l.o.
11638 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11639 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11640 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11641 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11642 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11643 to srv_xmlfiles.
11644
11645 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11646 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11647 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11648 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11649 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11650 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11651 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11652 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11653 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11654 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11655 (clean): Update.
11656
11657 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11658 (init_registers_powerpc_32l): ... this new prototype.
11659 (init_registers_powerpc_32): Remove, replace by ...
11660 (init_registers_powerpc_altivec32l): ... this new prototype.
11661 (init_registers_powerpc_e500): Remove, replace by ...
11662 (init_registers_powerpc_e500l): ... this new prototype.
11663 (init_registers_ppc64): Remove, replace by ...
11664 (init_registers_powerpc_64l): ... this new prototype.
11665 (init_registers_powerpc_64): Remove, replace by ...
11666 (init_registers_powerpc_altivec64l): ... this new prototype.
11667 (ppc_num_regs): Set to 73.
11668 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11669 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11670 (ppc_cannot_store_register): Handle orig_r3 and trap.
11671 (ppc_arch_setup): Update init_registers_... calls.
11672 (ppc_fill_gregset): Handle orig_r3 and trap.
11673
11674 * inferiors.c (clear_inferiors): Reset current_inferior.
11675
116762008-04-23 Paolo Bonzini <bonzini@gnu.org>
11677
11678 * acinclude.m4: Add override.m4.
11679 * configure: Regenerate.
11680
116812008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11682
11683 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11684 initial call to init_register_ppc64.
11685
116862008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11687
11688 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11689 single powerpc*-*-linux* case.
11690 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11691
116922008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11693
11694 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
11695 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
11696 from reg_xmlfiles.
11697 * linux-ppc-low.c: Include <elf.h>.
11698 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11699 (ppc_hwcap): New global variable.
11700 (ppc_regmap): Remove __SPE__ #ifdef sections.
11701 (ppc_regmap_e500): New global variable.
11702 (ppc_cannot_store_register): Update __SPE__ special case.
11703 (ppc_get_hwcap): New function.
11704 (ppc_arch_setup): Use it to determine whether inferior supports
11705 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11706 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11707 Do not access registers if target does not support AltiVec.
11708 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11709 Do not access registers if target does not support SPE.
11710 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11711
117122008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11713
11714 * linux-low.c (disabled_regsets, num_regsets): New.
11715 (use_regsets_p): Delete.
11716 (linux_wait_for_process): Clear disabled_regsets.
11717 (regsets_fetch_inferior_registers): Check and set it.
11718 (regsets_store_inferior_registers): Likewise.
11719 (linux_fetch_registers, linux_store_registers): Do not use
11720 use_regsets_p.
11721 (initialize_low): Allocate disabled_regsets.
11722
117232008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11724
11725 * Makefile.in (LIBOBJS): New.
11726 (OBS): Use LIBOBJS.
11727 (memmem.o): New rule.
11728 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11729 * configure: Regenerated.
11730
117312008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11732
11733 * server.c (handle_query): Never return "unsupported" for
11734 qXfer:features:read queries.
11735
117362008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11737
11738 * server.c (get_features_xml): Fix inverted condition.
11739 (handle_query): Always support qXfer:feature:read.
11740
117412008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11742
11743 * server.c (wrapper_argv): New.
11744 (start_inferior): Handle wrapper_argv. If set, expect an extra
11745 trap.
11746 (gdbserver_usage): Document --wrapper.
11747 (main): Parse --wrapper.
11748
117492008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11750
11751 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11752 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11753 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11754 (ppc_set_pc): Likewise.
11755 (ppc_arch_setup): New function.
11756 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11757 of collect_register.
11758 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
11759
117602008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11761
11762 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11763 instead of linux-ppc64-low.o.
11764 * linux-ppc64-low.c: Remove file.
11765 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11766 (linux-ppc64-low.o): Remove rule.
11767
11768 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11769 (init_registers_powerpc_64): Likewise.
11770 (ppc_regmap): Conditionally define depending on __powerpc64__.
11771 (ppc_cannot_store_register): Do not special-case "fpscr" when
11772 compiled on __powerpc64__.
11773 (ppc_collect_ptrace_register): New function.
11774 (ppc_supply_ptrace_register): New function.
11775 (ppc_breakpoint): Change type to "unsigned int".
11776 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11777 (the_low_target): Conditionally provide initializers for the
11778 arch_setup member depending on __powerpc64__. Install
11779 collect_ptrace_register and supply_ptrace_register members.
11780
117812008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11782
11783 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11784 * server.c (gdbserver_xmltarget): Define.
11785 (get_features_xml): Use it to replace "target.xml" and arch_string.
11786
11787 * configure.srv: Remove srv_xmltarget. Add XML files that were
11788 mentioned there to srv_xmlfiles instead. Remove conditional tests
11789 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11790 srv_xmlfiles and srv_regobj to include all possible choices.
11791 * configure.ac (srv_xmltarget): Remove.
11792 (srv_xmlfiles): Do not add "target.xml".
11793 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11794 checks for supplementary target information.
11795 * configure: Regenerate.
11796 * Makefile.in (XML_TARGET): Remove.
11797 (target.xml): Remove rule.
11798 (clean): Do not clean up target.xml.
11799 (.PRECIOUS): Do not mention target.xml.
11800
11801 * target.h (struct target_ops): Remove arch_string member.
11802 * linux-low.c (linux_arch_string): Remove.
11803 (linux_target_ops): Remove arch_string initializer.
11804 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11805 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11806 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11807 * spu-low.c (spu_arch_string): Remove.
11808 (spu_target_ops): Remove arch_string initializer.
11809 * win32-low.c (win32_arch_string): Remove.
11810 (win32_target_ops): Remove arch_string initializer.
11811 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11812 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11813 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11814
118152008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11816
11817 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11818 by collect_ptrace_register and supply_ptrace_register hooks.
11819 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11820 instead of checking for the_low_target.left_pad_xfer.
11821 (usr_store_inferior_registers): Use collect_ptrace_register callback
11822 instead of checking for the_low_target.left_pad_xfer.
11823
11824 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11825 (s390_supply_ptrace_register): Likewise.
11826 (s390_fill_gregset): Call s390_collect_ptrace_register.
11827 (the_low_target): Update.
11828
11829 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11830 (ppc_supply_ptrace_register): Likewise.
11831 (the_low_target): Update.
11832
11833 * linux-i386-low.c (the_low_target): Update.
11834 * linux-x86-64-low.c (the_low_target): Update.
11835
118362008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11837
11838 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11839 reg-s390.o and reg-s390x.o.
11840
11841 * linux-low.c (new_inferior): New global variable.
11842 (linux_create_inferior, linux_attach): Set it.
11843 (linux_wait_for_process): Call the_low_target.arch_setup after the
11844 target has stopped for the first time.
11845 (initialize_low): Do not call the_low_target.arch_setup.
11846
11847 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11848 (s390_set_pc): Likewise.
11849 (s390_arch_setup): New function.
11850 (the_low_target): Use s390_arch_setup as arch_setup routine.
11851
11852 * regcache.c (realloc_register_cache): New function.
11853 (set_register_cache): Call it for each existing regcache.
11854
118552008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11856
11857 * server.h (init_registers): Remove prototype.
11858
11859 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11860 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11861 instead of init_registers ().
11862 * linux-arm-low.c (init_registers_arm): Add prototype.
11863 (init_registers_arm_with_iwmmxt): Likewise.
11864 (the_low_target): Add initializer for arch_setup field.
11865 * linux-cris-low.c (init_registers_cris): Add prototype.
11866 (the_low_target): Add initializer for arch_setup field.
11867 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11868 (the_low_target): Add initializer for arch_setup field.
11869 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11870 (the_low_target): Add initializer for arch_setup field.
11871 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11872 (the_low_target): Add initializer for arch_setup field.
11873 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11874 (the_low_target): Add initializer for arch_setup field.
11875 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11876 (the_low_target): Add initializer for arch_setup field.
11877 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11878 (init_registers_mips64_linux): Likewise.
11879 (the_low_target): Add initializer for arch_setup field.
11880 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11881 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11882 (the_low_target): Add initializer for arch_setup field.
11883 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11884 (init_registers_powerpc_64): Likewise.
11885 (the_low_target): Add initializer for arch_setup field.
11886 * linux-s390-low.c (init_registers_s390): Add prototype.
11887 (init_registers_s390x): Likewise.
11888 (the_low_target): Add initializer for arch_setup field.
11889 * linux-sh-low.c (init_registers_sh): Add prototype.
11890 (the_low_target): Add initializer for arch_setup field.
11891 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11892 (the_low_target): Add initializer for arch_setup field.
11893 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11894 (the_low_target): Add initializer for arch_setup field.
11895
11896 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11897 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11898 instead of init_registers ().
11899 * win32-arm-low.c (init_registers_arm): Add prototype.
11900 (the_low_target): Add initializer for arch_setup field.
11901 * win32-i386-low.c (init_registers_i386): Add prototype.
11902 (the_low_target): Add initializer for arch_setup field.
11903
11904 * spu-low.c (init_registers_spu): Add prototype.
11905 (initialize_low): Call initialie_registers_spu () instead of
11906 initialize_registers ().
11907
119082008-02-19 Pedro Alves <pedro@codesourcery.com>
11909
11910 * server.c (handle_v_requests): When handling the vRun and vAttach
11911 packets, if already debugging a process, don't kill it. Return an
11912 error instead.
11913
119142008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11915
11916 * server.c (handle_query): Correct length check.
11917
119182008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11919
11920 * win32-low.c (do_initial_child_stuff): Add process handle
11921 parameter. Set current_process_handle and current_process_id from the
11922 parameters. Clear globals.
11923 (win32_create_inferior): Don't set current_process_handle and
11924 current_process_id here. Instead pass them on the call to
11925 do_initial_child_stuff.
11926 (win32_attach): Likewise.
11927 (win32_clear_inferiors): New.
11928 (win32_kill): Don't close the current process handle or the
11929 current thread handle here. Instead call win32_clear_inferiors.
11930 (win32_detach): Don't open a new handle to the process. Call
11931 win32_clear_inferiors.
11932 (win32_join): Don't rely on current_process_handle; open a new
11933 handle using the process id.
11934 (win32_wait): Call win32_clear_inferiors when the inferior process
11935 has exited.
11936
119372008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11938
11939 * server.c (monitor_show_help): Add "exit".
11940
119412008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11942
11943 * Makefile.in (SFILES): Add linux-xtensa-low.c.
11944 (clean): Add reg-xtensa.c.
11945 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
11946 * configure.srv (xtensa*-*-linux*) New target.
11947 * linux-xtensa-low.c: New.
11948 * xtensa-xtregs.c: New.
11949
119502008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11951
11952 * hostio.c: Don't include errno.h.
11953 (errno_to_fileio_errno): Move to hostio-errno.
11954 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11955 error number outputting to the target->hostio_last_error callback.
11956 (hostio_packet_error): Use FILEIO_EINVAL directly.
11957 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11958 calls to hostio_error.
11959 * hostio-errno.c: New.
11960 * server.h (hostio_last_error_from_errno): Declare.
11961 * target.h (target_ops): Add hostio_last_error member.
11962 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11963 as hostio_last_error handler.
11964 * spu-low.c (spu_target_ops): Likewise.
11965 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11966 (wince_hostio_last_error): New functions.
11967 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11968 as hostio_last_error handler.
11969 (win32_target_ops) [!_WIN32_WCE]: Register
11970 hostio_last_error_from_errno as hostio_last_error handler.
11971 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11972 (hostio-errno.o): New rule.
11973 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11974 * configure.srv (srv_hostio_err_objs): New variable. Default to
11975 hostio-errno.o.
11976 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11977 * configure: Regenerate.
11978
119792008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11980
11981 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11982 (linux_kill, linux_detach): Clean up the process list.
11983 * remote-utils.c (remote_open): Improve port number parsing.
11984 (putpkt_binary, input_interrupt): Only send interrupts if the target
11985 is running.
11986 * server.c (extended_protocol): Make static.
11987 (attached): Define earlier.
11988 (exit_requested, response_needed, program_argv): New variables.
11989 (target_running): New.
11990 (start_inferior): Clear attached here.
11991 (attach_inferior): Set attached here.
11992 (require_running): Define.
11993 (handle_query): Use require_running and target_running. Implement
11994 "monitor exit".
11995 (handle_v_attach, handle_v_run): New.
11996 (handle_v_requests): Use require_running. Handle vAttach and vRun.
11997 (gdbserver_usage): Update.
11998 (main): Redo argument parsing. Handle --debug and --multi. Handle
11999 --attach along with other options or after the port. Save
12000 program_argv. Support no initial program. Resynchronize
12001 communication with GDB after an error. Handle "monitor exit".
12002 Use require_running and target_running. Always allow the extended
12003 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12004 restart in extended mode.
12005 * README: Refer to the GDB manual. Update --attach usage.
12006
120072007-12-20 Andreas Schwab <schwab@suse.de>
12008
12009 * linux-low.c (STACK_SIZE): Define.
12010 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12011 (linux_test_for_tracefork): Likewise.
12012
120132007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12014
12015 * linux-low.c (linux_wait_for_event): Update messages. Do not
12016 reinsert auto-delete breakpoints.
12017 * mem-break.c (struct breakpoint): Change return type of handler to
12018 int.
12019 (set_breakpoint_at): Update handler type.
12020 (reinsert_breakpoint_handler): Return 1 instead of calling
12021 delete_breakpoint.
12022 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12023 setting a new one.
12024 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12025 * mem-break.h (set_breakpoint_at): Update handler type.
12026 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12027 * win32-low.c (auto_delete_breakpoint): New.
12028 (get_child_debug_event): Use it.
12029
120302007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12031
12032 * configure.ac: Check for pread and pwrite.
12033 * hostio.c (handle_pread): Fall back to lseek and read.
12034 (handle_pwrite): Fall back to lseek and write.
12035 * config.in, configure: Regenerated.
12036
120372007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12038
12039 * server.c (myresume): Add own_buf argument.
12040 (main): Update calls.
12041
120422007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12043
12044 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12045 * remote-utils.c (remote_open): Do not call disable_async_io.
12046 (block_async_io): Delete.
12047 (unblock_async_io): Make static.
12048 (initialize_async_io): New.
12049 * server.c (handle_v_cont): Handle async I/O here.
12050 (myresume): Likewise. Move other common resume tasks here...
12051 (main): ... from here. Call initialize_async_io. Disable async
12052 I/O before the main loop.
12053 * server.h (initialize_async_io): Declare.
12054 (block_async_io, unblock_async_io): Delete prototypes.
12055 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12056
120572007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12058
12059 * remote-utils.c (readchar): Allow binary data in received messages.
12060
120612007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12062
12063 * win32-low.c (attaching): New global.
12064 (win32_create_inferior): Clear the `attaching' global.
12065 (win32_attach): Set the `attaching' global.
12066 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12067 attaching. Only set a breakpoint at the entry point if not
12068 attaching.
12069
120702007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12071
12072 * server.c (main): Don't report dll events on the initial
12073 connection on attaches.
12074
120752007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12076
12077 * server.c (main): Relax numerical bases supported for the pid of
12078 the --attach command line argument.
12079
120802007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12081
12082 * win32-low.c (win32_attach): Call OpenProcess before
12083 DebugActiveProcess, not after. Add last error output to error
12084 call.
12085
120862007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12087
12088 * win32-low.c (win32_get_thread_context)
12089 (win32_set_thread_context): New functions.
12090 (thread_rec): Use win32_get_thread_context.
12091 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12092 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12093 field.
12094
120952007-12-03 Leo Zayas
12096 Pedro Alves <pedro_alves@portugalmail.pt>
12097
12098 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12099 global variables.
12100 (child_add_thread): Minor cleanup.
12101 (child_continue): Resume artificially suspended threads before
12102 calling ContinueDebugEvent.
12103 (suspend_one_thread): New.
12104 (fake_breakpoint_event): New.
12105 (get_child_debug_event): Change return type to int. Check here if
12106 gdb sent an interrupt request. If a soft interrupt was requested,
12107 fake a breakpoint event. Return 0 if there is no event to handle,
12108 and 1 otherwise.
12109 (win32_wait): Don't check here if gdb sent an interrupt request.
12110 Ensure there is a valid event to handle.
12111 (win32_request_interrupt): Add soft interruption method as last
12112 resort.
12113
121142007-12-03 Leo Zayas
12115 Pedro Alves <pedro_alves@portugalmail.pt>
12116
12117 * win32-low.h (win32_thread_info): Add descriptions to the
12118 structure members. Replace `suspend_count' counter by a
12119 `suspended' flag.
12120 * win32-low.c (thread_rec): Update condition of when to get the
12121 context from the inferior. Rely on ContextFlags being set if it
12122 has already been retrieved. Only suspend the inferior thread if
12123 we haven't already. Warn if that fails.
12124 (continue_one_thread): s/suspend_count/suspended/. Only call
12125 ResumeThread once. Warn if that fails.
12126
121272007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12128
12129 * win32-low.c (win32_wait): Don't read from the inferior when it
12130 has already exited.
12131
121322007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12133
12134 * Makefile.in (win32_low_h): New variable.
12135 (win32-low.o): Add dependency on $(win32_low_h).
12136 (win32-arm-low.o, win32-i386-low.o): New rules.
12137
121382007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12139
12140 * hostio.c: Correct copyright year.
12141
121422007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12143
12144 * Makefile.in (OBS): Add hostio.o.
12145 (hostio.o): New rule.
12146 * server.h (handle_vFile): Declare.
12147 * hostio.c: New file.
12148 * server.c (handle_v_requests): Take packet_len and new_packet_len
12149 for binary packets. Call handle_vFile.
12150 (main): Update call to handle_v_requests.
12151
121522007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12153
12154 * linux-low.c: Include <sched.h>.
12155
121562007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12157
12158 * linux-low.c (linux_tracefork_grandchild): New.
12159 (linux_tracefork_child): Use clone.
12160 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12161
121622007-10-31 Joel Brobecker <brobecker@adacore.com>
12163
12164 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12165
121662007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12167
12168 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12169
121702007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12171
12172 * inferiors.c (change_inferior_id): Delete.
12173 (add_pid_to_list, pull_pid_from_list): New.
12174 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12175 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12176 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12177 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12178 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12179 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12180 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12181 (using_threads): Always set to 1.
12182 (handle_extended_wait): New.
12183 (add_process): Do not set TID.
12184 (linux_create_inferior): Set must_set_ptrace_flags.
12185 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12186 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12187 (linux_thread_alive): Rename TID argument to LWPID.
12188 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12189 (linux_wait_for_event): Do not use TID or check using_threads. Update
12190 call to dead_thread_notify. Call handle_extended_wait.
12191 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12192 (send_sigstop): Delete sigstop_sent.
12193 (wait_for_sigstop): Avoid TID.
12194 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12195 (linux_test_for_tracefork): New.
12196 (linux_lookup_signals): Use thread_db_active and
12197 linux_supports_tracefork_flag.
12198 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12199 * linux-low.h (get_process_thread): Avoid TID.
12200 (struct process_ifo): Move thread_known and tid to the end. Remove
12201 sigstop_sent.
12202 (linux_attach_lwp, thread_db_init): Update prototypes.
12203 * server.h (change_inferior_id): Delete prototype.
12204 (add_pid_to_list, pull_pid_from_list): New prototypes.
12205 * thread-db.c (thread_db_use_events): New.
12206 (find_first_thread): Rename to...
12207 (find_one_thread): ...this. Update callers and messages. Do not
12208 call fatal. Check thread_db_use_events. Do not call
12209 change_inferior_id or new_thread_notify.
12210 (maybe_attach_thread): Update. Do not call new_thread_notify.
12211 (thread_db_init): Set thread_db_use_events. Check use_events.
12212 * utils.c (fatal, warning): Correct message prefix.
12213
122142007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12215
12216 * Makefile.in (clean): Remove new files.
12217 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12218 (powerpc-64.o, powerpc-64.c): New rules.
12219 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12220 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12221 with SPE.
12222 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12223 SPE targets.
12224 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12225 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12226 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12227 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12228 (target_regsets): Add AltiVec and SPE register sets.
12229 * configure.ac: Check for AltiVec and SPE.
12230 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12231 (ppc_fill_vrregset, ppc_store_vrregset): New.
12232 (target_regsets): Add AltiVec register set.
12233 * configure: Regenerated.
12234
122352007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12236
12237 * linux-low.c (O_LARGEFILE): Define.
12238 (linux_read_memory): Use /proc/PID/mem.
12239 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12240 * configure, config.in: Regenerated.
12241
122422007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12243
12244 * linux-low.c (linux_wait_for_event): Do not pass signals while
12245 single-stepping.
12246
122472007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12248
12249 * win32-low.c (create_process): New.
12250 (win32_create_inferior): Use create_process instead of
12251 CreateProcess. If create_process failed retry appending an ".exe"
12252 suffix. Store the GetLastError result immediatelly after
12253 create_process calls and use it on the call to error.
12254
122552007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12256
12257 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12258
122592007-08-23 Joel Brobecker <brobecker@adacore.com>
12260
12261 * configure.ac: Switch license to GPLv3.
12262
122632007-08-01 Michael Snyder <msnyder@access-company.com>
12264
12265 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12266
122672007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12268
12269 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12270 typedef.
12271 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12272 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12273 CloseToolhelp32Snapshot.
12274 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12275 CloseToolhelp32Snapshot.
12276
122772007-07-27 Michael Snyder <michael.snyder@access-company.com>
12278
12279 * server.c (main): Check for inferior exit before main loop.
12280
122812007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12282
12283 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12284 instead of on tmp_desc.
12285
122862007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12287 Daniel Jacobowitz <dan@codesourcery.com>
12288
12289 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12290 (add_thread): Minor cleanups.
12291 (clear_inferiors): Move lower in the file. Clear the DLL
12292 list.
12293 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12294 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12295 (xml_escape_text): New.
12296 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12297 for qSupported.
12298 (handle_v_cont): Report errors.
12299 (gdbserver_version): Update.
12300 (main): Correct size of own_buf. Do not report initial DLL events.
12301 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12302 (unloaded_dll, xml_escape_text): New.
12303 * win32-low.c (enum target_waitkind): Update comments.
12304 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12305 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12306 (win32_EnumProcessModules, win32_GetModuleInformation)
12307 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12308 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12309 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12310 (win32_Module32First, win32_Module32Next, load_toolhelp)
12311 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12312 (get_child_debug_event): Handle DLL events.
12313 (win32_wait): Likewise.
12314
123152007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12316
12317 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12318 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12319
123202007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12321
12322 * win32-low.c (handle_output_debug_string): Ignore event if not
12323 waiting.
12324
123252007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12326
12327 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12328
123292007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12330
12331 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12332
123332007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12334
12335 * inferiors.c (change_inferior_id): Add comment.
12336 * linux-low.c (check_removed_breakpoint): Add an early
12337 prototype. Improve debug output.
12338 (linux_attach): Doc update.
12339 (linux_detach_one_process, linux_detach): Clean up before releasing
12340 each process.
12341 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12342 * linux-low.h (struct process_info): Doc improvement.
12343 * mem-break.c (delete_all_breakpoints): New.
12344 * mem-break.h (delete_all_breakpoints): New prototype.
12345 * thread-db.c (find_first_thread): New.
12346 (thread_db_create_event): Call it instead of
12347 thread_db_find_new_threads. Clean up unused variables.
12348 (maybe_attach_thread): Remove first thread handling.
12349 (thread_db_find_new_threads): Use find_first_thread.
12350 (thread_db_get_tls_address): Likewise.
12351
123522007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12353
12354 * thread-db.c (thread_db_find_new_threads): Add prototype.
12355 (thread_db_create_event): Check for the main thread before adding
12356 a new thread.
12357 (maybe_attach_thread): Only enable event reporting if TID == 0.
12358 (thread_db_get_tls_address): Check for new threads.
12359
123602007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12361
12362 * linux-low.c (linux_create_inferior): Try execv before execvp.
12363 * spu-low.c (spu_create_inferior): Likewise.
12364
123652007-06-13 Mike Frysinger <vapier@gentoo.org>
12366
12367 * linux-low.c (linux_create_inferior): Change execv to execvp.
12368 * spu-low.c (spu_create_inferior): Likewies.
12369
123702007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12371
12372 * Makefile.in (clean): Clean new files instead of deleted ones.
12373 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12374 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12375 rules.
12376 * configure.srv: Specify XML files and new regformats for MIPS and
12377 MIPS64 GNU/Linux.
12378 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12379 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12380 an entry for the restart register.
12381 (mips_cannot_fetch_register, mips_cannot_store_register)
12382 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12383 register names to match the XML descriptions.
12384 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12385 restart register instead of $0.
12386
123872007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12388 Markus Deuling <deuling@de.ibm.com>
12389
12390 * remote-utils.c (decode_xfer_write): New function.
12391 * server.h (decode_xfer_write): Add prototype.
12392 * server.c (handle_query): Add PACKET_LEN argument. Support
12393 qXfer:spu:read and qXfer:spu:write packets.
12394 (main): Pass packet_len to handle_query.
12395 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12396 * target.h (target_ops): Add qxfer_spu.
12397
123982007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12399
12400 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12401 accessing non-seekable spufs files.
12402
124032007-05-16 Markus Deuling <deuling@de.ibm.com>
12404
12405 * server.c (handle_query): Add reply for qC packet.
12406
124072007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12408 Leo Zayas <lerele@champenstudios@com>
12409
12410 * server.h (check_remote_input_interrupt_request): New function.
12411 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12412 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12413 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12414 (check_remote_input_interrupt_request): New function.
12415 * server.h (check_remote_input_interrupt_request): Declare.
12416 * win32-low.c (winapi_DebugBreakProcess,
12417 winapi_GenerateConsoleCtrlEvent): New typedefs.
12418 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12419 to 250 ms.
12420 (win32_wait): Check for remote interrupt request
12421 with check_remote_input_interrupt_request.
12422 (win32_request_interrupt): New function.
12423 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12424
124252007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12426
12427 * win32-low.c (debug_registers_changed,
12428 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12429 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12430 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12431 (thread_rec): Get context using the low target.
12432 (child_add_thread): Call thread_added on the low target,
12433 which does the same thing.
12434 (regptr): Delete.
12435 (do_initial_child_stuff): Remove debug registers references.
12436 Set context using the low target. Resume threads after
12437 setting the contexts.
12438 (child_continue): Remove dead variable. Remove debug
12439 registers references.
12440 (child_fetch_inferior_registers): Go through the low target.
12441 (do_child_store_inferior_registers): Remove.
12442 (child_store_inferior_registers): Go through the low target.
12443 (win32_resume): Remove debug registers references.
12444 Set context using the low target.
12445 (handle_exception): Change return type to void. Don't record
12446 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12447 first chance exception.
12448 (get_child_debug_event): Change return type to void. Remove
12449 goto loop. Always return after waiting for debug event.
12450 (win32_wait): Convert to switch statement. Handle spurious
12451 events.
12452
12453 * win32-i386-low.c (debug_registers_changed,
12454 debug_registers_used): New.
12455 (initial_stuff): Rename to ...
12456 (i386_initial_stuff): ... this. Clear debug registers
12457 state variables.
12458 (store_debug_registers): Delete.
12459 (i386_get_thread_context): New.
12460 (load_debug_registers): Delete.
12461 (i386_set_thread_context): New.
12462 (i386_thread_added): New.
12463 (single_step): Rename to ...
12464 (i386_single_step): ... this.
12465 (do_fetch_inferior_registers): Rename to ...
12466 (i386_fetch_inferior_register): ... this.
12467 (i386_store_inferior_register): New.
12468 (the_low_target): Adapt to new interface.
12469
12470 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12471 (arm_get_thread_context): New.
12472 (arm_set_thread_context): New.
12473 (regptr): New.
12474 (do_fetch_inferior_registers): Rename to ...
12475 (arm_fetch_inferior_register): ... this.
12476 (arm_store_inferior_register): New.
12477 (arm_wince_breakpoint): Reimplement as unsigned long.
12478 (arm_wince_breakpoint_len): Define.
12479 (the_low_target): Adapt to new interface.
12480
12481 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12482 load_debug_registers. Add get_thread_context, set_thread_context,
12483 thread_added and store_inferior_register. Rename
12484 fetch_inferior_registers to fetch_inferior_register.
12485 (regptr): Remove declaration.
12486
124872007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12488
12489 * linux-low.c (linux_detach): Change return type to int. Return 0.
12490 * spu-low.c (spu_detach): Likewise.
12491
124922007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12493
12494 * target.h (target_ops): Change return type of detach to int.
12495 Add join.
12496 (join_inferior): New.
12497 * server.c (main): Don't skip detach support on mingw32.
12498 If the inferior doesn't support detaching return error.
12499 Call join_inferior instead of using waitpid.
12500 * linux-low.c (linux_join): New.
12501 (linux_target_op): Add linux_join.
12502 * spu-low.c (spu_join): New.
12503 (spu_target_ops): Add spu_join.
12504 * win32-low.c (win32_detach): Adapt to new interface.
12505 Reopen current_process_handle before detaching. Issue a child
12506 resume before detaching.
12507 (win32_join): New.
12508 (win32_target_op): Add win32_join.
12509
125102007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12511
12512 * win32-low.c (win32-attach): Fix return value.
12513 * target.h (target_ops): Describe ATTACH return values.
12514
125152007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12516
12517 * win32-low.c (GETPROCADDRESS): Define.
12518 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12519 (winapi_DebugSetProcessKillOnExit): Likewise.
12520 (win32_create_inferior): Force usage of ansi CreateProcessA.
12521 (win32_attach): Use GETPROCADDRESS.
12522 (win32_detach): Likewise.
12523
125242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12525
12526 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12527
125282007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12529
12530 * win32-low.c: Commit leftover changes from 2007-03-29.
12531
125322007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12533
12534 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12535 fields short instead of int. Add explicit padding.
12536 (i387_cache_to_fsave): Remove unnecessary casts.
12537 (i387_fsave_to_cache): Doc fix.
12538 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12539
125402007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12541
12542 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12543 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12544
125452007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12546
12547 * configure.srv (arm*-*-mingw32ce*): Move near the other
12548 arm targets.
12549
125502007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12551
12552 * configure.ac: Add errno checking.
12553 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12554 sys/file.h and malloc.h.
12555 (AC_CHECK_DECLS): Add perror.
12556 (srv_mingwce): Handle.
12557 * configure.srv (i[34567]86-*-cygwin*): Add
12558 win32-i386-low.o to srv_tgtobj.
12559 (i[34567]86-*-mingw*): Likewise.
12560 (arm*-*-mingw32ce*): Add case.
12561 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12562 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12563 [__MINGW32CE__] (strerror): New function.
12564 [__MINGW32CE__] (errno): Define to GetLastError.
12565 [__MINGW32CE__] (COUNTOF): New macro.
12566 (remote_open): Remove extra close call.
12567 * mem-break.c (delete_breakpoint_at): New function.
12568 * mem-break.h (delete_breakpoint_at): Declare.
12569 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12570 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12571 [USE_WIN32API] (read, write): Add char* casts.
12572 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12573 * server.h: Include wincecompat.h on Windows CE.
12574 [HAVE_ERRNO_H]: Check.
12575 (perror): Declare if not declared.
12576 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12577 (perror_with_name): Remove errno declaration.
12578 * wincecompat.h: New.
12579 * wincecompat.c: New.
12580 * win32-low.h: New.
12581 * win32-arm-low.c: New.
12582 * win32-i386-low.c: New.
12583 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12584 (OUTMSG2): Make it safe.
12585 (_T): New macro.
12586 (COUNTOF): New macro.
12587 (NUM_REGS): Get it from the low target.
12588 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12589 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12590 (thread_rec): Let low target handle debug registers.
12591 (child_add_thread): Likewise.
12592 (child_init_thread_list): Likewise.
12593 (continue_one_thread): Likewise.
12594 (regptr): New.
12595 (do_child_fetch_inferior_registers): Move to ...
12596 * win32-i386-low.c: ... here, and rename to ...
12597 (do_fetch_inferior_registers): ... this.
12598 * win32-low.c (child_fetch_inferior_registers):
12599 Go through the low target.
12600 (do_child_store_inferior_registers): Use regptr.
12601 (strwinerror): New function.
12602 (win32_create_inferior): Handle Windows CE.
12603 Use strwinerror instead of strerror on Windows error
12604 codes. Add program to the error output.
12605 Don't close the main thread handle on Windows CE.
12606 (win32_attach): Use coredll.dll on Windows CE.
12607 (win32_kill): Close current process and current
12608 thread handles.
12609 (win32_detach): Use coredll.dll on Windows CE.
12610 (win32_resume): Let low target handle debug registers, and
12611 step request.
12612 (handle_exception): Add/Remove initial breakpoint. Avoid
12613 non-existant WSTOPSIG on Windows CE.
12614 (win32_read_inferior_memory): Cast to remove warning.
12615 (win32_arch_string): Go through the low target.
12616 (initialize_low): Call set_breakpoint_data with the low
12617 target's breakpoint.
12618 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12619 FOP_REGNUM, mappings): Move to ...
12620 * win32-i386-low.c: ... here.
12621 * win32-low.c (win32_thread_info): Move to ...
12622 * win32-low.h: ... here.
12623 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12624 win32-arm-low.c and wincecompat.c.
12625 (all:): Add $EXEEXT.
12626 (install-only:): Likewise.
12627 (gdbserver:): Likewise.
12628 (gdbreplay:): Likewise.
12629 * config.in: Regenerate.
12630 * configure: Regenerate.
12631
126322007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12633
12634 * win32-low.c: Rename typedef thread_info to
12635 win32_thread_info throughout.
12636
126372007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12638
12639 * win32-i386-low.c: Rename to ...
12640 * win32-low.c: ... this.
12641 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12642 * Makefile.in: Likewise.
12643
126442007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12645
12646 * remote-utils.c (monitor_output): Constify msg parameter.
12647 * server.h (monitor_output): Likewise.
12648 * win32-i386-low.c (handle_output_debug_string): New.
12649 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12650 handle_output_debug_string.
12651 (get_child_debug_event): Likewise.
12652
126532007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12654
12655 * server.c (main): Correct strtoul check.
12656
126572007-03-27 Jon Ringle <jon@ringle.org>
12658
12659 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12660
126612007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12662
12663 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12664
126652007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12666
12667 * terminal.h: Check HAVE_SGTTY_H.
12668
126692007-02-27 Mat Hostetter <mat@lcs.mit.edu>
12670
12671 * remote-utils.c (remote_open): Print out the assigned port number.
12672
126732007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12674
12675 * remote-utils.c (monitor_output): New function.
12676 * server.c (debug_threads): Define here.
12677 (monitor_show_help): New function.
12678 (handle_query): Handle qRcmd.
12679 (main): Do not handle 'd' packet.
12680 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12681 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12682 of debug_threads.
12683
126842007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12685
12686 * Makefile.in (EXEEXT): New.
12687 (clean): Use $(EXEEXT).
12688
126892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12690
12691 * target.h (target_ops): Rename send_signal to request_interrupt,
12692 and remove enum target_signal parameter.
12693 * linux-low.c (linux_request_interrupt): Rename from
12694 linux_send_signal, and always send SIGINT.
12695 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12696 and always send SIGINT.
12697 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12698 of send_signal.
12699 (input_interrupt): Likewise.
12700
127012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12702
12703 * server.c (get_features_xml): Check if target implemented
12704 arch_string.
12705 * win32-i386-low.c (win32_arch_string): New.
12706 (win32_target_ops): Add win32_arch_string as arch_string member.
12707
127082007-02-22 Markus Deuling <deuling@de.ibm.com>
12709
12710 * spu-low.c (spu_arch_string): New.
12711 (spu_target_ops): Add spu_arch_string.
12712
127132007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12714
12715 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12716 * configure.ac: Do not check for terminal.h.
12717 * configure, config.in: Regenerated.
12718
127192007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12720
12721 * Makefile.in (OBS): Add $(XML_BUILTIN).
12722 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12723 (clean): Update.
12724 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12725 (arm-with-iwmmxt.c): New.
12726 * config.in, configure: Regenerate.
12727 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12728 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12729 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12730 (arm*-*-linux*): Add iWMMXt and regset support.
12731 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12732 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12733 (arm_store_wmmxregset, target_regsets): New.
12734 * server.c (get_features_xml): Take annex argument. Check builtin
12735 XML documents.
12736 (handle_query): Handle multiple annexes.
12737
127382007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12739
12740 * remote-utils.c [USE_WIN32API] (read, write): Define.
12741 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12742 write.
12743
127442007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12745
12746 * linux-i386-low.c (the_low_target): Set arch_string.
12747 * linux-x86-64-low.c (the_low_target): Likewise.
12748 * linux-low.c (linux_arch_string): New.
12749 (linux_target_ops): Add it.
12750 * linux-low.h (struct linux_target_ops): Add arch_string.
12751 * server.c (write_qxfer_response): Use const void * for DATA.
12752 (get_features_xml): New.
12753 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12754 * target.h (struct target_ops): Add arch_string method.
12755
127562007-01-03 Denis Pilat <denis.pilat@st.com>
12757 Daniel Jacobowitz <dan@codesourcery.com>
12758
12759 * linux-low.c (linux_kill): Handle being called with no threads.
12760 * win32-i386-low.c (win32_kill): Likewise.
12761 (get_child_debug_event): Clear current_process_handle.
12762
127632006-12-30 Denis PILAT <denis.pilat@st.com>
12764 Daniel Jacobowitz <dan@codesourcery.com>
12765
12766 * remote-utils.c (remote_open): Check the type of specified
12767 serial port devices before opening them.
12768 * server.c (main): Kill the inferior if an error occurs during
12769 the first remote_open.
12770
127712006-12-05 Markus Deuling <deuling@de.ibm.com>
12772
12773 * README: Update supported targets.
12774
127752006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12776
12777 * Makefile.in (clean): Remove reg-mips64.c.
12778 (reg-mips64.c, reg-mips64.o): New rules.
12779 * configure.srv: Handle mips64. Include regset support for mips.
12780 * linux-mips-low.c (union mips_register): New.
12781 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12782 (mips_breakpoint, mips_breakpoint_at): Use int.
12783 (mips_collect_register, mips_supply_register)
12784 (mips_collect_register_32bit, mips_supply_register_32bit)
12785 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12786 (mips_store_fpregset, target_regsets): New.
12787 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12788
127892006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12790
12791 * configure.srv: Add target "spu*-*-*".
12792 * Makefile.in (clean): Remove reg-spu.c.
12793 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12794 * spu-low.c: New file.
12795
127962006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12797
12798 * configure.ac: Correct td_thr_tls_get_addr test.
12799 * configure: Regenerated.
12800
128012006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12802
12803 * linux-low.c (linux_wait_for_event): Reformat. Use the
12804 pass_signals array.
12805 * remote-utils.c (decode_address_to_semicolon): New.
12806 * server.c (pass_signals, handle_general_set): New.
12807 (handle_query): Mention QPassSignals for qSupported.
12808 (main): Call handle_general_set.
12809 * server.h (pass_signals, decode_address_to_semicolon): New.
12810
128112006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12812
12813 * server.c (handle_query): Correct error handling for read_auxv.
12814
128152005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12816
12817 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12818 and srv_linux_thread_db to yes.
12819 * linux-s390-low.c (s390_fill_gregset): New function.
12820 (target_regsets): Define data structure.
12821
128222006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12823
12824 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12825 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12826 * config.in, configure: Regenerated.
12827 * inferiors.c (gdb_id_to_thread): New function.
12828 (gdb_id_to_thread_id): Use it.
12829 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12830 * linux-low.h (struct process_info): Add th member.
12831 (thread_db_get_tls_address): New prototype.
12832 * remote-utils.c (decode_address): Make non-static.
12833 * server.c (handle_query): Handle qGetTLSAddr.
12834 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12835 * target.h (struct target_ops): Add get_tls_address.
12836 * thread-db.c (maybe_attach_thread): Save the thread handle.
12837 (thread_db_get_tls_address): New.
12838
128392006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12840
12841 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12842 (linux_resume_one_process): Take a siginfo_t *. Update all
12843 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12844 (struct pending_signals): Add a siginfo_t.
12845 (linux_wait_for_process): Always set last_status.
12846 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12847 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12848 * linux-low.h (struct process_info): Add last_status.
12849
128502006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12851
12852 * remote-utils.c (try_rle): New function.
12853 (putpkt_binary): Use it.
12854
128552006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12856
12857 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12858 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12859 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12860 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12861 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12862 point registers.
12863
128642006-08-08 Richard Sandiford <richard@codesourcery.com>
12865
12866 * server.c (terminal_fd): New variable.
12867 (old_foreground_pgrp): Likewise.
12868 (restore_old_foreground_pgrp): New function.
12869 (start_inferior): Record the terminal file descriptor in terminal_fd
12870 and its original foreground group in old_foreground_pgrp. Register
12871 restore_old_foreground_pgrp with atexit().
12872
128732006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12874
12875 * server.c (handle_query): Correct qPart to qXfer.
12876
128772006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12878
12879 * configure.ac: Check for more headers which are missing on
12880 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12881 * configure.srv: Add Cygwin and mingw32.
12882 * remote-utils.c: Don't include headers unconditionally which
12883 are missing on mingw32. Include <winsock.h> for mingw32.
12884 (remote_open): Adjust for mingw32 support. Flush
12885 standard error after writing to it.
12886 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12887 (unblock_async_io, enable_async_io, disable_async_io)
12888 (readchar, getpkt): Update for Winsock support.
12889 (prepare_resume_reply): Expect a protocol signal number.
12890 * server.c: Disable <sys/wait.h> on mingw32.
12891 (start_inferior): Adjust for mingw32 support. Flush
12892 standard error after writing to it.
12893 (attach_inferior): Likewise. Use protocol signal
12894 numbers.
12895 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12896 and names.
12897 * win32-i386-low.c: New file.
12898 * Makefile.in (XM_CLIBS): Set.
12899 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12900 (win32-i386-low.o): New dependency rule.
12901 * linux-low.c (linux_wait): Use target signal numbers.
12902 * target.h (struct target_ops): Doc fix.
12903 * server.h (target_signal_to_name): New prototype.
12904 * gdbreplay.c: Don't include headers unconditionally which
12905 are missing on mingw32. Include <winsock.h> for mingw32.
12906 (remote_close, remote_open): Adjust for Winsock support.
12907 * configure, config.in: Regenerated.
12908
129092006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12910
12911 * server.c (decode_xfer_read, write_qxfer_response): New.
12912 (handle_query): Take a packet length argument. Handle
12913 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12914 the qSupported response.
12915 (main): Update call to handle_query.
12916
129172006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12918
12919 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12920 (putpkt_binary): Renamed from putpkt and adjusted for binary
12921 data.
12922 (putpkt): New wrapper for putpkt_binary.
12923 (readchar): Don't mask off the high bit.
12924 (decode_X_packet): New function.
12925 * server.c (main): Call putpkt_binary if a handler sets the packet
12926 length. Save the length of the incoming packet. Handle 'X'.
12927 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12928
129292006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12930
12931 * server.c (handle_query): Handle qSupported.
12932
129332006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12934
12935 * remote-utils.c (all_symbols_looked_up): New variable.
12936 (look_up_one_symbol): Check it.
12937 * server.h (look_up_one_symbol): New declaration.
12938 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12939
129402006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12941
12942 * Makefile.in (linux-arm-low.o): Update dependencies.
12943 * linux-arm-low.c: Include "gdb_proc_service.h".
12944 (PTRACE_GET_THREAD_AREA): Define.
12945 (ps_get_thread_area): New function.
12946
129472006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12948
12949 * configure.srv (m68k*-*-uclinux*): New target.
12950 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12951 (linux_resume_one_process): Remove extraneous cast.
12952 (linux_read_offsets): New.
12953 (linux_target_op): Add linux_read_offsets on mmuless systems.
12954 * server.c (handle_query): Add qOffsets logic.
12955 * target.h (struct target_ops): Add read_offsets.
12956
129572006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12958
12959 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12960 (PTRACE_GET_THREAD_AREA): Define.
12961 (ps_get_thread_area): New function.
12962 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12963 (linux-x86-64-low.o): Update.
12964
129652006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12966
12967 * configure.ac: Remove checks for prfpregset_t.
12968 * gdb_proc_service.h: New file.
12969 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12970 new "gdb_proc_service.h".
12971 * proc-service.c: Likewise.
12972 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12973 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12974 * Makefile.in (gdb_proc_service_h): Updated.
12975 * configure, config.in: Regenerated.
12976
129772006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12978
12979 * remote-utils.c (prepare_resume_reply): Move declaration
12980 of gdb_id_from_wait to the top of the block.
12981
129822006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12983
12984 * linux-low.c (regsets_store_inferior_registers): Read the regset
12985 from the target before filling it.
12986
129872006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12988
12989 * server.c (attach_inferior): Return SIGTRAP for a successful
12990 attach.
12991
129922006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12993
12994 * Makefile.in (OBS): Add version.o.
12995 (STAGESTUFF): Delete.
12996 (version.o): Add dependencies.
12997 (version.c): Replace rule.
12998 (clean): Remove version.c.
12999 * server.c (gdbserver_version): New.
13000 (gdbserver_usage): Use printf.
13001 (main): Handle --version and --help.
13002 * server.h (version, host_name): Add declarations.
13003
130042005-12-23 Eli Zaretskii <eliz@gnu.org>
13005
13006 * linux-arm-low.c:
13007 * linux-arm-low.c:
13008 * inferiors.c:
13009 * i387-fp.h:
13010 * i387-fp.c:
13011 * gdbreplay.c:
13012 * regcache.c:
13013 * proc-service.c:
13014 * mem-break.h:
13015 * mem-break.c:
13016 * linux-x86-64-low.c:
13017 * linux-sh-low.c:
13018 * linux-s390-low.c:
13019 * linux-ppc64-low.c:
13020 * linux-ppc-low.c:
13021 * linux-mips-low.c:
13022 * linux-m68k-low.c:
13023 * linux-m32r-low.c:
13024 * linux-low.h:
13025 * linux-low.c:
13026 * linux-ia64-low.c:
13027 * linux-i386-low.c:
13028 * linux-crisv32-low.c:
13029 * thread-db.c:
13030 * terminal.h:
13031 * target.h:
13032 * target.c:
13033 * server.h:
13034 * server.c:
13035 * remote-utils.c:
13036 * regcache.h:
13037 * utils.c:
13038 * Makefile.in:
13039 * configure.ac:
13040 * gdbserver.1: Add (C) after Copyright. Update the FSF
13041 address.
13042
130432005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13044
13045 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13046 (arm_breakpoint_at): Recognize both breakpoints.
13047 (the_low_target): Use the correct breakpoint instruction.
13048
130492005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13050
13051 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13052 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13053 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13054 (the_low_target): Update.
13055
130562005-10-25 Andreas Schwab <schwab@suse.de>
13057
13058 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13059
13060 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13061 (ia64_num_regs): Reduce to 462.
13062
130632005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13064
13065 * acinclude.m4: Correct quoting.
13066 * aclocal.m4: Regenerated.
13067
13068 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13069 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13070 (thread_db_init): Call thread_db_err_str.
13071 * configure.ac: Check for TD_VERSION.
13072 * config.in, configure: Regenerated.
13073
130742005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13075
13076 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13077
130782005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13079
13080 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13081 is not available. Define HAVE_PTRACE_GETREGS if it is.
13082 * config.in, configure: Regenerated.
13083 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13084 * linux-i386-low.c, linux-m68k-low.c: Update to use
13085 HAVE_PTRACE_GETREGS.
13086 * linux-low.c (regsets_fetch_inferior_registers)
13087 (regsets_store_inferior_registers): Only return 0 if we processed
13088 GENERAL_REGS.
13089 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13090 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13091
130922005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13093
13094 * inferiors.c (struct thread_info): Add gdb_id.
13095 (add_thread): Add gdb_id argument.
13096 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13097 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13098 calls to add_thread.
13099 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13100 * server.c (handle_query): Use thread_to_gdb_id.
13101 (handle_v_cont, main): Use gdb_id_to_thread_id.
13102 * server.h (add_thread): Update prototype.
13103 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13104 prototypes.
13105
131062005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13107
13108 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13109 left-padded registers.
13110 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13111 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13112
131132005-07-01 Steve Ellcey <sje@cup.hp.com>
13114
13115 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13116 * configure: Regenerate.
13117 * config.in: Regenerate.
13118 * server.h (NEED_DECLARATION_STRERROR):
13119 Replace with !HAVE_DECL_STRERROR.
13120
131212005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13122
13123 * linux-low.c (linux_wait, linux_send_signal): Don't test
13124 an unsigned long variable for > 0 if it could be MAX_ULONG.
13125 * server.c (myresume): Likewise.
13126 * target.c (set_desired_inferior): Likewise.
13127
131282005-06-13 Mark Kettenis <kettenis@gnu.org>
13129
13130 * configure.ac: Simplify and improve check for socklen_t.
13131 * configure, config.in: Regenerate.
13132
131332005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13134
13135 * acconfig.h: Remove.
13136 * configure.ac: Add a test for socklen_t. Use three-argument
13137 AC_DEFINE throughout.
13138 * config.in: Regenerated using autoheader 2.59.
13139 * configure: Regenerated.
13140
13141 * gdbreplay.c (socklen_t): Provide a default.
13142 (remote_open): Use socklen_t.
13143 * remote-utils.c (socklen_t): Provide a default.
13144 (remote_open): Use socklen_t.
13145 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13146 unsigned char.
13147
13148 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13149 char for buffers.
13150 * linux-low.c (linux_read_memory, linux_write_memory)
13151 (linux_read_auxv): Likewise.
13152 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13153 (check_mem_write): Likewise.
13154 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13155 Likewise.
13156 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13157 (registers_from_string, register_data): Likewise.
13158 * server.c (handle_query, main): Likewise.
13159 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13160 (decode_M_packet): Likewise.
13161 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13162 * target.h (struct target_ops): Update read_memory, write_memory,
13163 and read_auxv.
13164 (read_inferior_memory, write_inferior_memory): Update.
13165 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13166 to unsigned char *.
13167 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13168 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13169 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13170 linux-s390-low.c, linux-sh-low.c: Update for changes in
13171 read_inferior_memory and the_low_target->breakpoint.
13172
131732005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13174
13175 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13176 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13177 * configure.srv: Add powerpc64-*-linux*.
13178 * linux-ppc64-low.c: New file.
13179
131802005-05-23 Orjan Friberg <orjanf@axis.com>
13181
13182 * linux-cris-low.c: New file with support for CRIS.
13183 * linux-crisv32-low.c: Ditto for CRISv32.
13184 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13185 (clean): Add reg-cris.c and reg-crisv32.c.
13186 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
13187 reg-crisv32.o, and reg-crisv32.c to make rules.
13188 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13189 recognized targets.
13190
131912005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13192
13193 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13194 of sizeof (PTRACE_XFER_TYPE).
13195 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13196
131972005-05-12 Orjan Friberg <orjanf@axis.com>
13198
13199 * target.h (struct target_ops): Add insert_watchpoint,
13200 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13201 pointers for hardware watchpoint support.
13202 * linux-low.h (struct linux_target_ops): Ditto.
13203 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13204 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13205 to linux_target_ops.
13206 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13207 reply packet.
13208 * server.c (main): Recognize 'Z' and 'z' packets.
13209
132102005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13211
13212 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13213 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13214 (the_low_target): Add new members.
13215
132162005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13217
13218 * proc-service.c (ps_lgetregs): Search all_processes instead of
13219 all_threads.
13220
132212005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13222
13223 * server.c (start_inferior): Change return type to int.
13224 (attach_inferior): Change sigptr to int *.
13225 (handle_v_cont, handle_v_requests): Change signal to int *.
13226 (main): Change signal to int.
13227
132282005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
13229
13230 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13231 * configure.srv: Add m32r*-*-linux*.
13232 * linux-m32r-low.c: New file.
13233
132342005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13235
13236 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13237
132382005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13239
13240 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13241 Take unsigned long arguments for PIDs.
13242 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13243 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13244 (wait_for_sigstop, linux_resume_one_process)
13245 (regsets_fetch_inferior_registers, linux_send_signal)
13246 (linux_read_auxv): Likewise. Update the types of variables holding
13247 PIDs. Update format string specifiers.
13248 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13249 * remote-utils.c (prepare_resume_reply): Likewise.
13250 * server.c (cont_thread, general_thread, step_thread)
13251 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13252 unsigned long.
13253 (handle_query): Update format specifiers.
13254 (handle_v_cont, main): Use strtoul for thread IDs.
13255 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13256 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13257 (general_thread, step_thread, thread_from_wait)
13258 (old_thread_from_wait): Update.
13259 * target.h (struct thread_resume): Use unsigned long for THREAD.
13260 (struct target_ops): Use unsigned long for arguments to attach and
13261 thread_alive.
13262
132632005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13264
13265 * acinclude.m4: Include bfd/bfd.m4 directly.
13266 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13267 <agriffis@toolchain.org>.
13268 * aclocal.m4, configure: Regenerated.
13269
132702005-01-07 Andrew Cagney <cagney@gnu.org>
13271
13272 * configure.ac: Rename configure.in, require autoconf 2.59.
13273 * configure: Re-generate.
13274
132752004-12-08 Daniel Jacobowitz <dan@debian.org>
13276
13277 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13278 LIBS when finished.
13279 * aclocal.m4: Regenerated.
13280 * configure: Regenerated.
13281
132822004-11-21 Andreas Schwab <schwab@suse.de>
13283
13284 * linux-m68k-low.c (m68k_num_gregs): Define.
13285 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13286 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13287 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13288 (m68k_breakpoint_at): New. Add to the_low_target.
13289
13290 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13291 srv_linux_thread_db to yes.
13292
132932004-10-20 Joel Brobecker <brobecker@gnat.com>
13294
13295 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13296 (ARCH_SET_FS): Likewise.
13297 (ARCH_GET_FS): Likewise.
13298 (ARCH_GET_GS): Likewise.
13299
133002004-10-16 Daniel Jacobowitz <dan@debian.org>
13301
13302 * linux-i386-low.c (ps_get_thread_area): New.
13303 * linux-x86-64-low.c (ps_get_thread_area): New.
13304 * linux-low.c: Include <sys/syscall.h>.
13305 (linux_kill_one_process): Don't kill the first thread here.
13306 (linux_kill): Kill the first thread here.
13307 (kill_lwp): New function.
13308 (send_sigstop, linux_send_signal): Use it.
13309 * proc-service.c: Clean up #ifdefs.
13310 (fpregset_info): Delete.
13311 (ps_lgetregs): Update and enable implementation.
13312 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13313 implementations.
13314 * remote-utils.c (struct sym_cache, symbol_cache): New.
13315 (input_interrupt): Print a clearer message.
13316 (async_io_enabled): New variable.
13317 (enable_async_io, disable_async_io): Use it. Update comments.
13318 (look_up_one_symbol): Use the symbol cache.
13319 * thread-db.c (thread_db_look_up_symbols): New function.
13320 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13321
133222004-10-16 Daniel Jacobowitz <dan@debian.org>
13323
13324 * configure.in: Test for -rdynamic.
13325 * configure: Regenerated.
13326 * Makefile (INTERNAL_LDFLAGS): New.
13327 (gdbserver, gdbreplay): Use it.
13328
133292004-09-02 Andrew Cagney <cagney@gnu.org>
13330
13331 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13332
133332004-03-23 Daniel Jacobowitz <drow@mvista.com>
13334
13335 * linux-low.c (linux_wait): Clear all_processes list also.
13336
133372004-03-12 Daniel Jacobowitz <drow@mvista.com>
13338
13339 * linux-low.c: Include <errno.h>. Remove extern declaration of
13340 errno.
13341
133422004-03-12 Daniel Jacobowitz <drow@mvista.com>
13343
13344 * gdbreplay.c, server.h, utils.c: Update copyright years.
13345
133462004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13347
13348 * server.c (main): Print child status or termination signal from
13349 variable 'signal', not 'sig'.
13350
133512004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13352
13353 * linux-low.c (linux_read_memory): Change return type to
13354 int. Check for and return error from ptrace().
13355 * target.c (read_inferior_memory): Change return type to int. Pass
13356 back return status from the_target->read_memory().
13357 * target.h (struct target_ops): Adapt *read_memory() prototype.
13358 Update comment.
13359 (read_inferior_memory): Adapt prototype.
13360 * server.c (main): Return an error packet if
13361 read_inferior_memory() returns an error.
13362
133632004-03-04 Daniel Jacobowitz <drow@mvista.com>
13364
13365 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13366 Unify with other clean targets.
13367
133682004-02-29 Daniel Jacobowitz <drow@mvista.com>
13369
13370 * server.c (handle_v_cont): Call set_desired_inferior.
13371
133722004-02-29 Daniel Jacobowitz <drow@mvista.com>
13373
13374 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13375
133762004-02-29 Daniel Jacobowitz <drow@mvista.com>
13377
13378 * linux-low.c (linux_wait): Unblock async I/O.
13379 (linux_resume): Block and enable async I/O.
13380 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13381 * server.h (block_async_io, unblock_async_io): Add prototypes.
13382
133832004-02-29 Daniel Jacobowitz <drow@mvista.com>
13384
13385 * remote-utils.c (remote_open): Print a status notice after
13386 opening a TCP port.
13387 * server.c (attach_inferior): Print a status notice after
13388 attaching.
13389
133902004-02-29 Daniel Jacobowitz <drow@mvista.com>
13391
13392 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13393
133942004-02-26 Daniel Jacobowitz <drow@mvista.com>
13395
13396 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13397 error packet.
13398 * server.c, target.h: Update copyright years.
13399
134002004-02-25 Roland McGrath <roland@redhat.com>
13401
13402 * target.h (struct target_ops): New member `read_auxv'.
13403 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13404 * linux-low.c (linux_read_auxv): New function.
13405 (linux_target_ops): Initialize `read_auxv' member to that.
13406
134072004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13408
13409 Committed by Jim Blandy <jimb@redhat.com>.
13410
13411 * linux-s390-low.c (s390_num_regs): Update.
13412 (s390_regmap): Remove control registers. Use __s390x__ predefine
13413 instead of GPR_SIZE to distiguish s390 and s390x targets.
13414
134152004-01-31 Daniel Jacobowitz <drow@mvista.com>
13416
13417 * linux-low.c: Update copyright year.
13418 (check_removed_breakpoint): Clear pending_is_breakpoint.
13419 (linux_set_resume_request, linux_queue_one_thread)
13420 (resume_status_pending_p): New functions.
13421 (linux_continue_one_thread): Use process->resume.
13422 (linux_resume): Only resume threads if there are no pending events.
13423 * linux-low.h (struct process_info): Add resume request
13424 pointer.
13425
134262004-01-30 Daniel Jacobowitz <drow@mvista.com>
13427
13428 * regcache.c (new_register_cache): Clear the allocated register
13429 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13430
134312003-10-13 Daniel Jacobowitz <drow@mvista.com>
13432
13433 * linux-low.c (linux_resume): Take a struct thread_resume *
13434 argument.
13435 (linux_wait): Update call.
13436 (resume_ptr): New static variable.
13437 (linux_continue_one_thread): Renamed from
13438 linux_continue_one_process. Use resume_ptr.
13439 (linux_resume): Use linux_continue_one_thread.
13440 * server.c (handle_v_cont, handle_v_requests): New functions.
13441 (myresume): New function.
13442 (main): Handle 'v' case.
13443 * target.h (struct thread_resume): New type.
13444 (struct target_ops): Change argument of "resume" to struct
13445 thread_resume *.
13446 (myresume): Delete macro.
13447
134482003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13449
13450 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13451 (uninstall): Support DESTDIR.
13452
13453Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13454
13455 * configure.srv: Add xscale*linux copy of arm*linux entry.
13456
134572003-07-24 Daniel Jacobowitz <drow@mvista.com>
13458
13459 * linux-arm-low.c (arm_reinsert_addr): New function.
13460 (the_low_target): Add arm_reinsert_addr.
13461
134622003-07-08 Mark Kettenis <kettenis@gnu.org>
13463
13464 * mem-break.c: Remove whitespace at end of file.
13465
134662003-06-28 Daniel Jacobowitz <drow@mvista.com>
13467
13468 * configure.in: Check whether we need to prototype strerror.
13469 * server.h: Optionally prototype strerror.
13470 * gdbreplay.c (perror_with_name): Use strerror.
13471 * linux-low.c (linux_attach_lwp): Use strerror.
13472 * utils.c (perror_with_name): Use strerror.
13473 * config.in, configure: Regenerated.
13474
134752003-06-28 Daniel Jacobowitz <drow@mvista.com>
13476
13477 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13478 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13479
134802003-06-20 Daniel Jacobowitz <drow@mvista.com>
13481
13482 * Makefile.in (SFILES): Update.
13483 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13484 low-sun3.c: Remove files.
13485
134862003-06-17 Daniel Jacobowitz <drow@mvista.com>
13487
13488 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13489 (linux_detach_one_process, linux_detach): New functions.
13490 (linux_target_ops): Add linux_detach.
13491 * server.c (main): Handle 'D' packet.
13492 * target.h (struct target_ops): Add "detach" member.
13493 (detach_inferior): Define.
13494
134952003-06-13 Mark Kettenis <kettenis@gnu.org>
13496
13497 From Kelley Cook <kelleycook@wideopenwest.com>:
13498 * configure.srv: Accept i[34567]86 variants.
13499
135002003-06-05 Daniel Jacobowitz <drow@mvista.com>
13501
13502 * linux-low.c (linux_wait_for_event): Correct comment typos.
13503 (linux_resume_one_process): Call check_removed_breakpoint.
13504 (linux_send_signal): New function.
13505 (linux_target_ops): Add linux_send_signal.
13506 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13507 of kill.
13508 * target.h (struct target_ops): Add send_signal.
13509
135102003-05-29 Jim Blandy <jimb@redhat.com>
13511
13512 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13513 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13514 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13515 away part of the register's value.
13516
135172003-03-26 Daniel Jacobowitz <drow@mvista.com>
13518
13519 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13520 (linux_wait_for_event, linux_init_signals): Likewise.
13521
135222003-03-17 Daniel Jacobowitz <drow@mvista.com>
13523
13524 * configure.in: Check for stdlib.h.
13525 * configure: Regenerated.
13526 * config.in: Regenerated.
13527
135282003-01-04 Andreas Schwab <schwab@suse.de>
13529
13530 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13531
135322003-01-02 Andrew Cagney <ac131313@redhat.com>
13533
13534 * Makefile.in: Remove obsolete code.
13535
135362002-11-20 Daniel Jacobowitz <drow@mvista.com>
13537
13538 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13539 defined(PT_FPR0_HI).
13540
135412002-11-17 Stuart Hughes <seh@zee2.com>
13542
13543 * linux-arm-low.c (arm_num_regs): Increase.
13544 (arm_regmap): Include status register.
13545
135462002-11-17 Daniel Jacobowitz <drow@mvista.com>
13547
13548 * linux-low.c (register_addr): Remove incorrect -1 check.
13549
135502002-08-29 Daniel Jacobowitz <drow@mvista.com>
13551
13552 * linux-low.c (linux_create_inferior): Call setpgid. Return
13553 the new PID.
13554 (unstopped_p, linux_signal_pid): Remove.
13555 (linux_target_ops): Remove linux_signal_pid.
13556 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13557 global instead of target method.
13558 * target.h (struct target_ops): Remove signal_pid. Update comment
13559 for create_inferior.
13560 * server.c (signal_pid): New variable.
13561 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
13562 gdbserver. Set the child to be the foreground process group.
13563 (attach_inferior): Set signal_pid.
13564
135652002-08-23 Daniel Jacobowitz <drow@mvista.com>
13566
13567 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13568
135692002-08-20 Jim Blandy <jimb@redhat.com>
13570
13571 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13572 default for this.
13573
135742002-08-01 Andrew Cagney <cagney@redhat.com>
13575
13576 * Makefile.in: Make chill references obsolete.
13577
135782002-07-24 Kevin Buettner <kevinb@redhat.com>
13579
13580 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13581 * configure: Regenerate.
13582 * config.in: Regenerate.
13583
135842002-07-09 David O'Brien <obrien@FreeBSD.org>
13585
13586 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13587 (perror_with_name, remote_close, remote_open, expect, play): Static.
13588
135892002-07-04 Michal Ludvig <mludvig@suse.cz>
13590
13591 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
13592 byte offsets instead of an array of indexes.
13593 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13594
135952002-06-13 Daniel Jacobowitz <drow@mvista.com>
13596
13597 * regcache.c: Add comment.
13598
135992002-06-11 Daniel Jacobowitz <drow@mvista.com>
13600
13601 * thread-db.c: New file.
13602 * proc-service.c: New file.
13603 * acinclude.m4: New file.
13604 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13605 proc-service.o, and thread-db.o.
13606 (linux-low.o): Add USE_THREAD_DB.
13607 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13608 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13609 * aclocal.m4: Regenerated.
13610 * config.in: Regenerated.
13611 * configure: Regenerated.
13612 * configure.in: Check for proc_service.h, sys/procfs.h,
13613 thread_db.h, and linux/elf.h headrs.
13614 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13615 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13616 Check for -lthread_db and thread support.
13617 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13618 PowerPC, and SuperH.
13619 * i387-fp.c: Constify arguments.
13620 * i387-fp.h: Likewise.
13621 * inferiors.c: (struct thread_info): Renamed from
13622 `struct inferior_info'. Remove PID member. Use generic inferior
13623 list header. All uses updated.
13624 (inferiors, signal_pid): Removed.
13625 (all_threads): New variable.
13626 (get_thread): Define.
13627 (add_inferior_to_list): New function.
13628 (for_each_inferior): New function.
13629 (change_inferior_id): New function.
13630 (add_inferior): Removed.
13631 (remove_inferior): New function.
13632 (add_thread): New function.
13633 (free_one_thread): New function.
13634 (remove_thread): New function.
13635 (clear_inferiors): Use for_each_inferior and free_one_thread.
13636 (find_inferior): New function.
13637 (find_inferior_id): New function.
13638 (inferior_target_data): Update argument type.
13639 (set_inferior_target_data): Likewise.
13640 (inferior_regcache_data): Likewise.
13641 (set_inferior_regcache_data): Likewise.
13642 * linux-low.c (linux_bp_reinsert): Remove.
13643 (all_processes, stopping_threads, using_thrads)
13644 (struct pending_signals, debug_threads, pid_of): New.
13645 (inferior_pid): Replace with macro.
13646 (struct inferior_linux_data): Remove.
13647 (get_stop_pc, add_process): New functions.
13648 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13649 Use add_process and add_thread.
13650 (linux_attach_lwp): New function, based on old linux_attach. Use
13651 add_process and add_thread. Set stop_expected for new threads.
13652 (linux_attach): New function.
13653 (linux_kill_one_process): New function.
13654 (linux_kill): Kill all LWPs.
13655 (linux_thread_alive): Use find_inferior_id.
13656 (check_removed_breakpoints, status_pending_p): New functions.
13657 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13658 Update. Use WNOHANG. Wait for cloned processes also. Update process
13659 struct for the found process.
13660 (linux_wait_for_event): New function.
13661 (linux_wait): Use it. Support LWPs.
13662 (send_sigstop, wait_for_sigstop, stop_all_processes)
13663 (linux_resume_one_process, linux_continue_one_process): New functions.
13664 (linux_resume): Support LWPs.
13665 (REGISTER_RAW_SIZE): Remove.
13666 (fetch_register): Use register_size instead. Call supply_register.
13667 (usr_store_inferior_registers): Likewise. Call collect_register.
13668 Fix recursive case.
13669 (regsets_fetch_inferior_registers): Improve error message.
13670 (regsets_store_inferior_registers): Add debugging.
13671 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13672 (unstopped_p, linux_signal_pid): New functions.
13673 (linux_target_ops): Add linux_signal_pid.
13674 (linux_init_signals): New function.
13675 (initialize_low): Call it. Initialize using_threads.
13676 * regcache.c (inferior_regcache_data): Add valid
13677 flag.
13678 (get_regcache): Fetch registers lazily. Add fetch argument
13679 and update all callers.
13680 (regcache_invalidate_one, regcache_invalidate): New
13681 functions.
13682 (new_register_cache): Renamed from create_register_cache.
13683 Return the new regcache.
13684 (free_register_cache): Change argument to a void *.
13685 (registers_to_string, registers_from_string): Call get_regcache
13686 with fetch flag set.
13687 (register_data): Make static. Pass fetch flag to get_regcache.
13688 (supply_register): Call get_regcache with fetch flag clear.
13689 (collect_register): Call get_regcache with fetch flag set.
13690 (collect_register_as_string): New function.
13691 * regcache.h: Update.
13692 * remote-utils.c (putpkt): Flush after debug output and use
13693 stderr.
13694 Handle input interrupts while waiting for an ACK.
13695 (input_interrupt): Use signal_pid method.
13696 (getpkt): Flush after debug output and use stderr.
13697 (outreg): Use collect_register_as_string.
13698 (new_thread_notify, dead_thread_notify): New functions.
13699 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13700 and general_thread.
13701 (look_up_one_symbol): Flush after debug output.
13702 * server.c (step_thread, server_waiting): New variables.
13703 (start_inferior): Don't use signal_pid. Update call to mywait.
13704 (attach_inferior): Update call to mywait.
13705 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13706 (main): Don't fetch/store registers explicitly. Use
13707 set_desired_inferior. Support proposed ``Hs'' packet. Update
13708 calls to mywait.
13709 * server.h: Update.
13710 (struct inferior_list, struct_inferior_list_entry): New.
13711 * target.c (set_desired_inferior): New.
13712 (write_inferior_memory): Constify.
13713 (mywait): New function.
13714 * target.h: Update.
13715 (struct target_ops): New signal_pid method.
13716 (mywait): Removed macro, added prototype.
13717
13718 * linux-low.h (regset_func): Removed.
13719 (regset_fill_func, regset_store_func): New.
13720 (enum regset_type): New.
13721 (struct regset_info): Add type field. Use new operation types.
13722 (struct linux_target_ops): stop_pc renamed to get_pc.
13723 Add decr_pc_after_break and breakpoint_at.
13724 (get_process, get_thread_proess, get_process_thread)
13725 (strut process_info, all_processes, linux_attach_lwp)
13726 (thread_db_init): New.
13727
13728 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13729 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13730 (the_low_target): Add new members.
13731 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13732 (i386_store_fpxregset): Constify.
13733 (target_regsets): Add new kind identifier.
13734 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13735 (i386_set_pc): Add debugging.
13736 (i386_breakpoint_at): New function.
13737 (the_low_target): Add new members.
13738 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13739 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13740 (mips_breakpoint_at): New.
13741 (the_low_target): Add new members.
13742 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13743 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13744 (the_low_target): Add new members.
13745 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13746 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13747 (the_low_target): Add new members.
13748 * linux-x86-64-low.c (target_regsets): Add new kind
13749 identifier.
13750
137512002-05-15 Daniel Jacobowitz <drow@mvista.com>
13752
13753 From Martin Pool <mbp@samba.org>:
13754 * server.c (gdbserver_usage): New function.
13755 (main): Call it.
13756
137572002-05-14 Daniel Jacobowitz <drow@mvista.com>
13758
13759 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13760 stop_at -> stop_pc.
13761
137622002-05-04 Andrew Cagney <ac131313@redhat.com>
13763
13764 * Makefile.in: Remove obsolete code.
13765
137662002-04-24 Michal Ludvig <mludvig@suse.cz>
13767
13768 * linux-low.c (regsets_fetch_inferior_registers),
13769 (regsets_store_inferior_registers): Removed cast to int from
13770 ptrace() calls.
13771 * regcache.h: Added declaration of struct inferior_info.
13772
137732002-04-20 Daniel Jacobowitz <drow@mvista.com>
13774
13775 * inferiors.c (struct inferior_info): Add regcache_data.
13776 (add_inferior): Call create_register_cache.
13777 (clear_inferiors): Call free_register_cache.
13778 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13779 * regcache.c (struct inferior_regcache_data): New.
13780 (registers): Remove.
13781 (get_regcache): New function.
13782 (create_register_cache, free_register_cache): New functions.
13783 (set_register_cache): Don't initialize the register cache here.
13784 (registers_to_string, registers_from_string, register_data): Call
13785 get_regcache.
13786 * regcache.h: Add prototypes.
13787 * server.h: Likewise.
13788
137892002-04-20 Daniel Jacobowitz <drow@mvista.com>
13790
13791 * mem-break.c: New file.
13792 * mem-break.h: New file.
13793 * Makefile.in: Add mem-break.o rule; update server.h
13794 dependencies.
13795 * inferiors.c (struct inferior_info): Add target_data
13796 member.
13797 (clear_inferiors): Free target_data member if set.
13798 (inferior_target_data, set_inferior_target_data): New functions.
13799 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13800 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13801 * linux-low.c (linux_bp_reinsert): New variable.
13802 (struct inferior_linux_data): New.
13803 (linux_create_inferior): Use set_inferior_target_data.
13804 (linux_attach): Likewise. Call add_inferior.
13805 (linux_wait_for_one_inferior): New function.
13806 (linux_wait): Call it.
13807 (linux_write_memory): Add const.
13808 (initialize_low): Call set_breakpoint_data.
13809 * linux-low.h (struct linux_target_ops): Add breakpoint
13810 handling members.
13811 * server.c (attach_inferior): Remove extra add_inferior
13812 call.
13813 * server.h: Include mem-break.h. Update inferior.c
13814 prototypes.
13815 * target.c (read_inferior_memory)
13816 (write_inferior_memory): New functions.
13817 * target.h (read_inferior_memory)
13818 (write_inferior_memory): Change macros to prototypes.
13819 (struct target_ops): Update comments. Add const to write_memory
13820 definition.
13821
138222002-04-11 Daniel Jacobowitz <drow@mvista.com>
13823
13824 * linux-low.c (usr_store_inferior_registers): Support
13825 registers which are allowed to fail to store.
13826 * linux-low.h (linux_target_ops): Likewise.
13827 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13828 (ppc_cannot_store_register): FPSCR may not be storable.
13829
138302002-04-09 Daniel Jacobowitz <drow@mvista.com>
13831
13832 * server.h: Include <string.h> if HAVE_STRING_H.
13833 * ChangeLog: Correct paths in last ChangeLog entry.
13834
138352002-04-09 Daniel Jacobowitz <drow@mvista.com>
13836
13837 * linux-low.h: Remove obsolete prototypes.
13838 (struct linux_target_ops): New.
13839 (extern the_low_target): New.
13840 * linux-low.c (num_regs, regmap): Remove declarations.
13841 (register_addr): Use the_low_target explicitly.
13842 (fetch_register): Likewise.
13843 (usr_fetch_inferior_registers): Likewise.
13844 (usr_store_inferior_registers): Likewise.
13845 * linux-arm-low.c (num_regs): Remove.
13846 (arm_num_regs): Define.
13847 (arm_regmap): Renamed from regmap, made static.
13848 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13849 made static.
13850 (arm_cannot_store_register): Renamed from cannot_store_register,
13851 made static.
13852 (the_low_target): New.
13853 * linux-i386-low.c (num_regs): Remove.
13854 (i386_num_regs): Define.
13855 (i386_regmap): Renamed from regmap, made static.
13856 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13857 made static.
13858 (i386_cannot_store_register): Renamed from cannot_store_register,
13859 made static.
13860 (the_low_target): New.
13861 * linux-ia64-low.c (num_regs): Remove.
13862 (ia64_num_regs): Define.
13863 (ia64_regmap): Renamed from regmap, made static.
13864 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13865 made static.
13866 (ia64_cannot_store_register): Renamed from cannot_store_register,
13867 made static.
13868 (the_low_target): New.
13869 * linux-m68k-low.c (num_regs): Remove.
13870 (m68k_num_regs): Define.
13871 (m68k_regmap): Renamed from regmap, made static.
13872 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13873 made static.
13874 (m68k_cannot_store_register): Renamed from cannot_store_register,
13875 made static.
13876 (the_low_target): New.
13877 * linux-mips-low.c (num_regs): Remove.
13878 (mips_num_regs): Define.
13879 (mips_regmap): Renamed from regmap, made static.
13880 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13881 made static.
13882 (mips_cannot_store_register): Renamed from cannot_store_register,
13883 made static.
13884 (the_low_target): New.
13885 * linux-ppc-low.c (num_regs): Remove.
13886 (ppc_num_regs): Define.
13887 (ppc_regmap): Renamed from regmap, made static.
13888 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13889 made static.
13890 (ppc_cannot_store_register): Renamed from cannot_store_register,
13891 made static.
13892 (the_low_target): New.
13893 * linux-s390-low.c (num_regs): Remove.
13894 (s390_num_regs): Define.
13895 (s390_regmap): Renamed from regmap, made static.
13896 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13897 made static.
13898 (s390_cannot_store_register): Renamed from cannot_store_register,
13899 made static.
13900 (the_low_target): New.
13901 * linux-sh-low.c (num_regs): Remove.
13902 (sh_num_regs): Define.
13903 (sh_regmap): Renamed from regmap, made static.
13904 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13905 made static.
13906 (sh_cannot_store_register): Renamed from cannot_store_register,
13907 made static.
13908 (the_low_target): New.
13909 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13910 (the_low_target): New.
13911
139122002-04-09 Daniel Jacobowitz <drow@mvista.com>
13913
13914 * Makefile.in: Add stamp-h target.
13915 * configure.in: Create stamp-h.
13916 * configure: Regenerated.
13917
139182002-04-09 Daniel Jacobowitz <drow@mvista.com>
13919
13920 * inferiors.c: New file.
13921 * target.c: New file.
13922 * target.h: New file.
13923 * Makefile.in: Add target.o and inferiors.o. Update
13924 dependencies.
13925 * linux-low.c (inferior_pid): New static variable,
13926 moved from server.c.
13927 (linux_create_inferior): Renamed from create_inferior.
13928 Call add_inferior. Return 0 on success instead of a PID.
13929 (linux_attach): Renamed from myattach.
13930 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13931 (linux_thread_alive): Renamed from mythread_alive.
13932 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13933 child dies.
13934 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13935 (regsets_store_inferior_registers): Correct error message.
13936 Add missing ``return 0''.
13937 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13938 (linux_store_registers): Renamed from store_inferior_registers.
13939 (linux_read_memory): Renamed from read_inferior_memory.
13940 (linux_write_memory): Renamed from write_inferior_memory.
13941 (linux_target_ops): New structure.
13942 (initialize_low): Call set_target_ops ().
13943 * remote-utils.c (unhexify): New function.
13944 (hexify): New function.
13945 (input_interrupt): Send signals to ``signal_pid''.
13946 * server.c (inferior_pid): Remove.
13947 (start_inferior): Update create_inferior call.
13948 (attach_inferior): Call add_inferior.
13949 (handle_query): New function.
13950 (main): Call handle_query for `q' packets.
13951 * server.h: Include "target.h". Remove obsolete prototypes.
13952 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13953
139542002-04-09 Daniel Jacobowitz <drow@mvista.com>
13955
13956 * Makefile.in: Add WARN_CFLAGS. Update configury
13957 dependencies.
13958 * configure.in: Check for <string.h>
13959 * configure: Regenerate.
13960 * config.in: Regenerate.
13961 * gdbreplay.c: Include needed system headers.
13962 (remote_open): Remove strchr prototype.
13963 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13964 * regcache.c (supply_register): Change buf argument to const void *.
13965 (supply_register_by_name): Likewise.
13966 (collect_register): Change buf argument to void *.
13967 (collect_register_by_name): Likewise.
13968 * regcache.h: Add missing prototypes.
13969 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13970 * server.c (handle_query): New function.
13971 (attached): New static variable, moved out of main.
13972 (main): Quiet longjmp clobber warnings.
13973 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13974 * utils.c (error): Remove NORETURN.
13975 (fatal): Likewise.
This page took 0.071904 seconds and 4 git commands to generate.