]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Fix PR remote/19840: gdb crashes on reverse-stepi
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
2afc13ff
PA
12016-04-12 Pedro Alves <palves@redhat.com>
2
3 * utils.c (prepare_to_throw_exception): Delete.
4
6e774b13
SM
52016-04-05 Simon Marchi <simon.marchi@ericsson.com>
6
7 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
8
4dca19f8
MK
92016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
10
11 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
12
d0a9981f
MK
132016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
14
15 * linux-aarch64-ipa.c: Add <elf.h> include.
16 * linux-ppc-ipa.c: Add <elf.h> include.
17 * linux-s390-ipa.c: Add <elf.h> include.
18
252db07e
MK
192016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
20
21 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
22 (get_raw_reg_ptr): Likewise.
23 (get_trace_state_variable_value_ptr): Likewise.
24 (set_trace_state_variable_value_ptr): Likewise.
25 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
26 char *.
27
14e2b6d9
MK
282016-03-31 Wei-cheng Wang <cole945@gmail.com>
29 Marcin Kościelnicki <koriakin@0x04.net>
30
31 PR/17221
32 * linux-ppc-low.c (emit_insns): New function.
33 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
34 (ppc_emit_prologue): New function.
35 (ppc_emit_epilogue): New function.
36 (ppc_emit_add): New function.
37 (ppc_emit_sub): New function.
38 (ppc_emit_mul): New function.
39 (ppc_emit_lsh): New function.
40 (ppc_emit_rsh_signed): New function.
41 (ppc_emit_rsh_unsigned): New function.
42 (ppc_emit_ext): New function.
43 (ppc_emit_zero_ext): New function.
44 (ppc_emit_log_not): New function.
45 (ppc_emit_bit_and): New function.
46 (ppc_emit_bit_or): New function.
47 (ppc_emit_bit_xor): New function.
48 (ppc_emit_bit_not): New function.
49 (ppc_emit_equal): New function.
50 (ppc_emit_less_signed): New function.
51 (ppc_emit_less_unsigned): New function.
52 (ppc_emit_ref): New function.
53 (ppc_emit_const): New function.
54 (ppc_emit_reg): New function.
55 (ppc_emit_pop): New function.
56 (ppc_emit_stack_flush): New function.
57 (ppc_emit_swap): New function.
58 (ppc_emit_stack_adjust): New function.
59 (ppc_emit_call): New function.
60 (ppc_emit_int_call_1): New function.
61 (ppc_emit_void_call_2): New function.
62 (ppc_emit_if_goto): New function.
63 (ppc_emit_goto): New function.
64 (ppc_emit_eq_goto): New function.
65 (ppc_emit_ne_goto): New function.
66 (ppc_emit_lt_goto): New function.
67 (ppc_emit_le_goto): New function.
68 (ppc_emit_gt_goto): New function.
69 (ppc_emit_ge_goto): New function.
70 (ppc_write_goto_address): New function.
71 (ppc_emit_ops_impl): New static variable.
72 (ppc64v1_emit_prologue): New function.
73 (ppc64v2_emit_prologue): New function.
74 (ppc64_emit_epilogue): New function.
75 (ppc64_emit_add): New function.
76 (ppc64_emit_sub): New function.
77 (ppc64_emit_mul): New function.
78 (ppc64_emit_lsh): New function.
79 (ppc64_emit_rsh_signed): New function.
80 (ppc64_emit_rsh_unsigned): New function.
81 (ppc64_emit_ext): New function.
82 (ppc64_emit_zero_ext): New function.
83 (ppc64_emit_log_not): New function.
84 (ppc64_emit_bit_and): New function.
85 (ppc64_emit_bit_or): New function.
86 (ppc64_emit_bit_xor): New function.
87 (ppc64_emit_bit_not): New function.
88 (ppc64_emit_equal): New function.
89 (ppc64_emit_less_signed): New function.
90 (ppc64_emit_less_unsigned): New function.
91 (ppc64_emit_ref): New function.
92 (ppc64_emit_const): New function.
93 (ppc64v1_emit_reg): New function.
94 (ppc64v2_emit_reg): New function.
95 (ppc64_emit_pop): New function.
96 (ppc64_emit_stack_flush): New function.
97 (ppc64_emit_swap): New function.
98 (ppc64v1_emit_call): New function.
99 (ppc64v2_emit_call): New function.
100 (ppc64v1_emit_int_call_1): New function.
101 (ppc64v2_emit_int_call_1): New function.
102 (ppc64v1_emit_void_call_2): New function.
103 (ppc64v2_emit_void_call_2): New function.
104 (ppc64_emit_if_goto): New function.
105 (ppc64_emit_eq_goto): New function.
106 (ppc64_emit_ne_goto): New function.
107 (ppc64_emit_lt_goto): New function.
108 (ppc64_emit_le_goto): New function.
109 (ppc64_emit_gt_goto): New function.
110 (ppc64_emit_ge_goto): New function.
111 (ppc64v1_emit_ops_impl): New static variable.
112 (ppc64v2_emit_ops_impl): New static variable.
113 (ppc_emit_ops): New function.
114 (linux_low_target): Wire in ppc_emit_ops.
115
a2174ba4
MK
1162016-03-31 Wei-cheng Wang <cole945@gmail.com>
117 Marcin Kościelnicki <koriakin@0x04.net>
118
119 PR/17221
120 * Makefile.in: Add powerpc-*-ipa.o
121 * configure.srv: Add ipa_obj for powerpc*-linux.
122 * linux-ppc-ipa.c: New file.
123 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
124 includes.
125 (PPC_FIELD): New macro.
126 (PPC_SEXT): New macro.
127 (PPC_OP6): New macro.
128 (PPC_BO): New macro.
129 (PPC_LI): New macro.
130 (PPC_BD): New macro.
131 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
132 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
133 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
134 (ppc_get_thread_area): New function.
135 (is_elfv2_inferior): New function.
136 (gen_ds_form): New function.
137 (GEN_STD): New macro.
138 (GEN_STDU): New macro.
139 (GEN_LD): New macro.
140 (GEN_LDU): New macro.
141 (gen_d_form): New function.
142 (GEN_ADDI): New macro.
143 (GEN_ADDIS): New macro.
144 (GEN_LI): New macro.
145 (GEN_LIS): New macro.
146 (GEN_ORI): New macro.
147 (GEN_ORIS): New macro.
148 (GEN_LWZ): New macro.
149 (GEN_STW): New macro.
150 (GEN_STWU): New macro.
151 (gen_xfx_form): New function.
152 (GEN_MFSPR): New macro.
153 (GEN_MTSPR): New macro.
154 (GEN_MFCR): New macro.
155 (GEN_MTCR): New macro.
156 (GEN_SYNC): New macro.
157 (GEN_LWSYNC): New macro.
158 (gen_x_form): New function.
159 (GEN_OR): New macro.
160 (GEN_MR): New macro.
161 (GEN_LWARX): New macro.
162 (GEN_STWCX): New macro.
163 (GEN_CMPW): New macro.
164 (gen_md_form): New function.
165 (GEN_RLDICL): New macro.
166 (GEN_RLDICR): New macro.
167 (gen_i_form): New function.
168 (GEN_B): New macro.
169 (GEN_BL): New macro.
170 (gen_b_form): New function.
171 (GEN_BNE): New macro.
172 (GEN_LOAD): New macro.
173 (GEN_STORE): New macro.
174 (gen_limm): New function.
175 (gen_atomic_xchg): New function.
176 (gen_call): New function.
177 (ppc_relocate_instruction): New function.
178 (ppc_install_fast_tracepoint_jump_pad): New function.
179 (ppc_get_min_fast_tracepoint_insn_len): New function.
180 (ppc_get_ipa_tdesc_idx): New function.
181 (the_low_target): Wire in the new functions.
182 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
183 tdescs.
184 * linux-ppc-tdesc.h: New file.
185
a13c4696
MK
1862016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
187
188 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
189 (alloc_jump_pad_buffer): New function.
190 * linux-amd64-ipa.c: Add <sys/mman.h> include.
191 (alloc_jump_pad_buffer): New function.
192 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
193 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
194 (alloc_jump_pad_buffer): New function.
195 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
196 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
197 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
198 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
199
1cda1512
MK
2002016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
201
202 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
203 * linux-amd64-ipa.c: Likewise.
204 * linux-i386-ipa.c: Likewise.
205 * linux-s390-ipa.c: Likewise.
206 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
207 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
208 set_trace_state_variable_value_ptr.
209 (struct ipa_sym_addresses): Likewise.
210 (symbol_list): Likewise.
211 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
212 accessing gdb_collect directly.
213 (gdb_collect_ptr_type): New typedef.
214 (get_raw_reg_ptr_type): New typedef.
215 (get_trace_state_variable_value_ptr_type): New typedef.
216 (set_trace_state_variable_value_ptr_type): New typedef.
217 (gdb_collect_ptr): New global.
218 (get_raw_reg_ptr): New global.
219 (get_trace_state_variable_value_ptr): New global.
220 (set_trace_state_variable_value_ptr): New global.
221 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
222 accessing get_raw_reg directly.
223 (get_get_tsv_func_addr): Likewise for
224 get_trace_state_variable_value_ptr.
225 (get_set_tsv_func_addr): Likewise for
226 set_trace_state_variable_value_ptr.
227 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
228
72fb5488
SM
2292016-03-30 Simon Marchi <simon.marchi@ericsson.com>
230
231 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
232
28170b88
MK
2332016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
234
235 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
236 packets.
237 (relocate_instruction): Remove own_buf.
238 * server.c (own_buf): Make global.
239 (handle_v_requests): Make global.
240 * server.h (own_buf): New declaration.
241 (handle_v_requests): New prototype.
242
f39e8743
MK
2432016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
244
245 PR 18377
246 * linux-s390-low.c (add_insns): New function.
247 (s390_emit_prologue): New function.
248 (s390_emit_epilogue): New function.
249 (s390_emit_add): New function.
250 (s390_emit_sub): New function.
251 (s390_emit_mul): New function.
252 (s390_emit_lsh): New function.
253 (s390_emit_rsh_signed): New function.
254 (s390_emit_rsh_unsigned): New function.
255 (s390_emit_ext): New function.
256 (s390_emit_log_not): New function.
257 (s390_emit_bit_and): New function.
258 (s390_emit_bit_or): New function.
259 (s390_emit_bit_xor): New function.
260 (s390_emit_bit_not): New function.
261 (s390_emit_equal): New function.
262 (s390_emit_less_signed): New function.
263 (s390_emit_less_unsigned): New function.
264 (s390_emit_ref): New function.
265 (s390_emit_if_goto): New function.
266 (s390_emit_goto): New function.
267 (s390_write_goto_address): New function.
268 (s390_emit_litpool): New function.
269 (s390_emit_const): New function.
270 (s390_emit_call): New function.
271 (s390_emit_reg): New function.
272 (s390_emit_pop): New function.
273 (s390_emit_stack_flush): New function.
274 (s390_emit_zero_ext): New function.
275 (s390_emit_swap): New function.
276 (s390_emit_stack_adjust): New function.
277 (s390_emit_set_r2): New function.
278 (s390_emit_int_call_1): New function.
279 (s390_emit_void_call_2): New function.
280 (s390_emit_eq_goto): New function.
281 (s390_emit_ne_goto): New function.
282 (s390_emit_lt_goto): New function.
283 (s390_emit_le_goto): New function.
284 (s390_emit_gt_goto): New function.
285 (s390_emit_ge_goto): New function.
286 (s390x_emit_prologue): New function.
287 (s390x_emit_epilogue): New function.
288 (s390x_emit_add): New function.
289 (s390x_emit_sub): New function.
290 (s390x_emit_mul): New function.
291 (s390x_emit_lsh): New function.
292 (s390x_emit_rsh_signed): New function.
293 (s390x_emit_rsh_unsigned): New function.
294 (s390x_emit_ext): New function.
295 (s390x_emit_log_not): New function.
296 (s390x_emit_bit_and): New function.
297 (s390x_emit_bit_or): New function.
298 (s390x_emit_bit_xor): New function.
299 (s390x_emit_bit_not): New function.
300 (s390x_emit_equal): New function.
301 (s390x_emit_less_signed): New function.
302 (s390x_emit_less_unsigned): New function.
303 (s390x_emit_ref): New function.
304 (s390x_emit_if_goto): New function.
305 (s390x_emit_const): New function.
306 (s390x_emit_call): New function.
307 (s390x_emit_reg): New function.
308 (s390x_emit_pop): New function.
309 (s390x_emit_stack_flush): New function.
310 (s390x_emit_zero_ext): New function.
311 (s390x_emit_swap): New function.
312 (s390x_emit_stack_adjust): New function.
313 (s390x_emit_int_call_1): New function.
314 (s390x_emit_void_call_2): New function.
315 (s390x_emit_eq_goto): New function.
316 (s390x_emit_ne_goto): New function.
317 (s390x_emit_lt_goto): New function.
318 (s390x_emit_le_goto): New function.
319 (s390x_emit_gt_goto): New function.
320 (s390x_emit_ge_goto): New function.
321 (s390_emit_ops): New function.
322 (struct linux_target_ops): Fill in emit_ops hook.
323
abd9baf9
MK
3242016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
325
326 PR 18377
327 * Makefile.in: Add s390 IPA files.
328 * configure.srv: Build IPA for s390.
329 * linux-s390-ipa.c: New file.
330 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
331 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
332 (tdesc_s390_linux32): Likewise.
333 (init_registers_s390_linux32v1): Likewise.
334 (tdesc_s390_linux32v1): Likewise.
335 (init_registers_s390_linux32v2): Likewise.
336 (tdesc_s390_linux32v2): Likewise.
337 (init_registers_s390_linux64): Likewise.
338 (tdesc_s390_linux64): Likewise.
339 (init_registers_s390_linux64v1): Likewise.
340 (tdesc_s390_linux64v1): Likewise.
341 (init_registers_s390_linux64v2): Likewise.
342 (tdesc_s390_linux64v2): Likewise.
343 (init_registers_s390_te_linux64): Likewise.
344 (tdesc_s390_te_linux64): Likewise.
345 (init_registers_s390_vx_linux64): Likewise.
346 (tdesc_s390_vx_linux64): Likewise.
347 (init_registers_s390_tevx_linux64): Likewise.
348 (tdesc_s390_tevx_linux64): Likewise.
349 (init_registers_s390x_linux64): Likewise.
350 (tdesc_s390x_linux64): Likewise.
351 (init_registers_s390x_linux64v1): Likewise.
352 (tdesc_s390x_linux64v1): Likewise.
353 (init_registers_s390x_linux64v2): Likewise.
354 (tdesc_s390x_linux64v2): Likewise.
355 (init_registers_s390x_te_linux64): Likewise.
356 (tdesc_s390x_te_linux64): Likewise.
357 (init_registers_s390x_vx_linux64): Likewise.
358 (tdesc_s390x_vx_linux64): Likewise.
359 (init_registers_s390x_tevx_linux64): Likewise.
360 (tdesc_s390x_tevx_linux64): Likewise.
361 (have_hwcap_s390_vx): New static variable.
362 (s390_arch_setup): Fill have_hwcap_s390_vx.
363 (s390_get_thread_area): New function.
364 (s390_ft_entry_gpr_esa): New const.
365 (s390_ft_entry_gpr_zarch): New const.
366 (s390_ft_entry_misc): New const.
367 (s390_ft_entry_fr): New const.
368 (s390_ft_entry_vr): New const.
369 (s390_ft_main_31): New const.
370 (s390_ft_main_64): New const.
371 (s390_ft_exit_fr): New const.
372 (s390_ft_exit_vr): New const.
373 (s390_ft_exit_misc): New const.
374 (s390_ft_exit_gpr_esa): New const.
375 (s390_ft_exit_gpr_zarch): New const.
376 (append_insns): New function.
377 (s390_relocate_instruction): New function.
378 (s390_install_fast_tracepoint_jump_pad): New function.
379 (s390_get_min_fast_tracepoint_insn_len): New function.
380 (s390_get_ipa_tdesc_idx): New function.
381 (struct linux_target_ops): Wire in the above functions.
382 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
383 * linux-s390-tdesc.h: New file.
384
a4105d04
MK
3852016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
386
387 * linux-s390-low.c (s390_supports_tracepoints): New function.
388 (struct linux_target_ops): Fill supports_tracepoints hook.
389
35ac8b3e
YQ
3902016-03-18 Yao Qi <yao.qi@linaro.org>
391
392 * linux-low.c (lwp_signal_can_be_delivered): New function.
393 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
394
94610ec4
YQ
3952016-03-18 Yao Qi <yao.qi@linaro.org>
396
397 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
398 0 if signal is enqueued. Remove 'signal' from one debugging
399 message. Move one debugging message to some lines below.
400 Remove code setting 'signal' to 0.
401
80aea927
YQ
4022016-03-18 Yao Qi <yao.qi@linaro.org>
403
404 * linux-low.c (linux_low_filter_event): Remove redundant
405 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
406
b04fd3be
MK
4072016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
408
409 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
410 (struct linux_target_ops): Wire in the above.
411
c40c8d4b
YQ
4122016-03-03 Yao Qi <yao.qi@linaro.org>
413
414 * linux-low.c: Update comments to start_step_over.
415
0f8288ae
YQ
4162016-03-03 Yao Qi <yao.qi@linaro.org>
417
418 PR server/19736
419 * linux-low.c (handle_extended_wait): Set child suspended
420 if event_lwp->bp_reinsert isn't zero.
421
fdbd04a8
YQ
4222016-03-02 Yao Qi <yao.qi@linaro.org>
423
424 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
425 enqueue_pending_signal.
426
6896a8fa
MK
4272016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
428
429 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
430 is actually loaded.
431
ab503087
MK
4322016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
433
434 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
435 (s390_regmap_3264) [!__s390x__]: New global.
436 (s390_collect_ptrace_register): Skip map entries containing -1.
437 (s390_supply_ptrace_register): Ditto.
438 (s390_fill_gprs_high): New function.
439 (s390_store_gprs_high): New function.
440 (s390_regsets): Add NT_S390_HIGH_GPRS.
441 (s390_get_hwcap): Enable on 31-bit.
442 (have_hwcap_s390_high_gprs): Enable on 31-bit.
443 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
444 Detect NT_S390_HIGH_GPRS.
445 (s390_usrregs_info_3264): Enable on 31-bit.
446 (s390_regs_info): Enable regs_info_3264 on 31-bit.
447 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
448
ae91f625
MK
4492016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
450
451 PR gdb/13808
452 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
453 * configure.srv: Ditto.
454 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
455 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
456 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
457 (init_registers_amd64_linux): Remove prototype.
458 (tdesc_amd64_linux): Remove declaration.
459 (get_ipa_tdesc): New function.
460 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
461 initialize remaining tdescs.
462 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
463 (init_registers_i386_linux): Remove prototype.
464 (tdesc_i386_linux): Remove declaration.
465 (get_ipa_tdesc): New function.
466 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
467 initialize remaining tdescs.
468 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
469 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
470 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
471 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
472 (x86_get_ipa_tdesc_idx): New function.
473 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
474 * linux-x86-tdesc.h: New file.
475 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
476 (target_get_ipa_tdesc_idx): New macro.
477 * tracepoint.c (ipa_tdesc_idx): New macro.
478 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
479 (symbol_list): Add ipa_tdesc_idx.
480 (cmd_qtstart): Write ipa_tdesc_idx in the target.
481 (ipa_tdesc): Remove.
482 (ipa_tdesc_idx): New variable.
483 (get_context_regcache): Use get_ipa_tdesc.
484 (gdb_collect): Ditto.
485 (gdb_probe): Ditto.
486 * tracepoint.h (get_ipa_tdesc): New prototype.
487 (ipa_tdesc): Remove.
488
e7ad2f14
PA
4892016-02-24 Pedro Alves <palves@redhat.com>
490
491 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
492 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
493 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
494 Factor out common code between the USE_SIGTRAP_SIGINFO and
495 !USE_SIGTRAP_SIGINFO blocks.
496 (linux_low_filter_event): Call save_stop_reason instead of
497 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
498 Update comments.
499 (linux_wait_1): Update comments.
500
657f9cde
WW
5012016-02-24 Wei-cheng Wang <cole945@gmail.com>
502
503 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
504 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
505 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
506 ppc_insert_point, ppc_remove_point.
507
b00b61e1
MK
5082016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
509
510 * linux-s390-low.c (s390_supports_z_point_type): New function.
511 (struct linux_target_ops): Wire s390_supports_z_point_type in.
512
553cb527
YQ
5132016-02-16 Yao Qi <yao.qi@linaro.org>
514
515 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
516 PC. Get pc from regcache_read_pc.
517
a5652c21
YQ
5182016-02-12 Yao Qi <yao.qi@linaro.org>
519
520 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
521 or linux_get_pc_32bit.
522 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
523
ed443b61
YQ
5242016-02-12 Yao Qi <yao.qi@linaro.org>
525
526 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
527 arm_linux_get_next_pcs_fixup.
528
020ecd38
MK
5292016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
530
531 * tracepoint.c (x_tracepoint_action_download): Change
532 write_inferior_data_ptr to write_inferior_data_pointer.
533 (cmd_qtstart): Likewise.
534 (write_inferior_data_ptr): Remove.
535 (download_agent_expr): Change write_inferior_data_ptr to
536 write_inferior_data_pointer.
537 (download_tracepoint_1): Likewise.
538 (download_tracepoint): Likewise.
539 (download_trace_state_variables): Likewise.
540
7cae9051
WW
5412016-02-11 Wei-cheng Wang <cole945@gmail.com>
542 Marcin Kościelnicki <koriakin@0x04.net>
543
544 * tracepoint.c (struct tracepoint_action_ops): Remove.
545 (struct tracepoint_action): Remove ops.
546 (m_tracepoint_action_download, r_tracepoint_action_download)
547 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
548 size and offset accordingly.
549 (m_tracepoint_action_ops, r_tracepoint_action_ops)
550 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
551 (tracepoint_action_send, tracepoint_action_download): New functions.
552 Helpers for trace action handlers.
553 (add_tracepoint_action): Remove setup actions ops.
554 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
555
9f6a71b4
YQ
5562016-02-10 Yao Qi <yao.qi@linaro.org>
557
558 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
559
1e94266c
SM
5602016-02-09 Simon Marchi <simon.marchi@ericsson.com>
561
562 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
563 to AC_OUTPUT.
564 * configure: Regenerate.
565
8adce034
SM
5662016-02-09 Simon Marchi <simon.marchi@ericsson.com>
567
568 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
569 void * to gdb_byte *.
570 * linux-low.c (siginfo_fixup): Likewise.
571 (linux_xfer_siginfo): Likewise.
572 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
573 Likewise.
574 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
575
93813b37
WT
5762016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
577
578 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
579 to srv_tgtobj.
580 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
581 to srv_tgtobj.
582 * linux-x86-low.c [__x86_64__]: Include
583 "nat/amd64-linux-siginfo.h".
584 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
585 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
586 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
587 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
588 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
589 (cpt_si_fd, si_timerid, si_overrun): Move from
590 nat/amd64-linux-siginfo.c.
591 * Makefile.in (amd64-linux-siginfo.o:): New rule.
592
8424cc97
SM
5932016-01-28 Simon Marchi <simon.marchi@ericsson.com>
594
595 * server.c (skip_to_semicolon): Remove.
596 (process_point_options): Use strchrnul instead of
597 skip_to_semicolon.
598
4d18591b
YQ
5992016-01-26 Yao Qi <yao.qi@linaro.org>
600
601 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
602 * linux-low.c (install_software_single_step_breakpoints): Don't
603 call regcache_read_pc.
604 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
605 argument pc.
606
d8020970
YQ
6072016-01-26 Yao Qi <yao.qi@linaro.org>
608
609 * linux-low.c (install_software_single_step_breakpoints): Call
610 regcache_read_pc instead of get_pc.
611
8b207339
YQ
6122016-01-26 Yao Qi <yao.qi@linaro.org>
613
614 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
615 (unblock_async_io): Rename to ...
616 (block_unblock_async_io): ... it. New function.
617 (enable_async_io): Don't install SIGIO handler. Unblock it
618 instead.
619 (disable_async_io): Don't ignore SIGIO. Block it instead.
620 (initialize_async_io): Install SIGIO handler. Don't call
621 unblock_async_io.
622
18879fef
YQ
6232016-01-26 Yao Qi <yao.qi@linaro.org>
624
625 * remote-utils.c (getpkt): If the buffer isn't empty, and the
626 first character is '\003', call *the_target->request_interrupt.
627
a0f8e08a
YQ
6282016-01-25 Yao Qi <yao.qi@linaro.org>
629
630 * remote-utils.c (new_thread_notify): Remove.
631 (dead_thread_notify): Likewise.
632 * remote-utils.h (new_thread_notify): Remove declaration.
633 (dead_thread_notify): Likewise.
634
cc5fd9ab
MK
6352016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
636
637 * gdb.trace/pending.exp: Fix expected message on continue.
638
99e8eb11
MK
6392016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
640
641 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
642 it works properly on big-endian machines where sizeof (CORE_ADDR)
643 != sizeof (void *).
644
a994041d
PA
6452016-01-21 Pedro Alves <palves@redhat.com>
646
647 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
648 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
649 * configure: Regenerate.
650
f7a6a40d
YQ
6512016-01-21 Yao Qi <yao.qi@linaro.org>
652
653 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
654 is_thumb and set it according to CPSR saved on the stack.
655 (get_next_pcs_syscall_next_pc): Pass is_thumb to
656 arm_sigreturn_next_pc.
657
6f69e520
YQ
6582016-01-18 Yao Qi <yao.qi@linaro.org>
659
660 * linux-low.c (linux_set_pc_64bit): New function.
661 (linux_get_pc_64bit): New function.
662 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
663 Declare.
664 * linux-sparc-low.c (debug_threads): Remove declaration.
665 (sparc_get_pc): Remove.
666 (the_low_target): Use linux_get_pc_64bit instead of
667 sparc_get_pc.
668 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
669 (the_low_target): Use linux_get_pc_64bit and
670 linux_set_pc_64bit.
671
276d4552
YQ
6722016-01-18 Yao Qi <yao.qi@linaro.org>
673
674 * linux-arm-low.c (debug_threads): Remove declaration.
675 (arm_get_pc, arm_set_pc): Remove.
676 (the_low_target): Use linux_get_pc_32bit and
677 linux_set_pc_32bit.
678 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
679 (the_low_target): Use linux_get_pc_32bit and
680 linux_set_pc_32bit.
681 * linux-cris-low.c (debug_threads): Remove declaration.
682 (cris_get_pc, cris_set_pc,): Remove.
683 (the_low_target): Use linux_get_pc_32bit and
684 linux_set_pc_32bit.
685 * linux-crisv32-low.c (debug_threads): Remove declaration.
686 (cris_get_pc, cris_set_pc): Remove.
687 (the_low_target): Use linux_get_pc_32bit and
688 linux_set_pc_32bit.
689 * linux-low.c: Include inttypes.h.
690 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
691 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
692 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
693 (the_low_target): Use linux_get_pc_32bit and
694 linux_set_pc_32bit.
695 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
696 (the_low_target): Use linux_get_pc_32bit and
697 linux_set_pc_32bit.
698 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
699 (the_low_target): Use linux_get_pc_32bit and
700 linux_set_pc_32bit.
701 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
702 (the_low_target): Use linux_get_pc_32bit and
703 linux_set_pc_32bit.
704 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
705 (the_low_target): Use linux_get_pc_32bit and
706 linux_set_pc_32bit.
707
eb0edac8
GB
7082016-01-18 Gary Benson <gbenson@redhat.com>
709
710 * configure.ac (AC_FUNC_FORK): New check.
711 * config.in: Regenerate.
712 * configure: Likewise.
713
1b451dda
YQ
7142016-01-14 Yao Qi <yao.qi@linaro.org>
715
716 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
717 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
718 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
719 arm_get_next_pcs_ctor.
720
82075af2
JS
7212016-01-12 Josh Stone <jistone@redhat.com>
722 Philippe Waroquiers <philippe.waroquiers@skynet.be>
723
724 * inferiors.h: Include "gdb_vecs.h".
725 (struct process_info): Add syscalls_to_catch.
726 * inferiors.c (remove_process): Free syscalls_to_catch.
727 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
728 syscall_return stops.
729 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
730 * server.c (handle_general_set): Handle QCatchSyscalls.
731 (handle_query): Report support for QCatchSyscalls.
732 * target.h (struct target_ops): Add supports_catch_syscall.
733 (target_supports_catch_syscall): New macro.
734 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
735 (struct lwp_info): Add syscall_state.
736 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
737 Maintain syscall_state and syscalls_to_catch across exec.
738 (get_syscall_trapinfo): New function, proxy to the_low_target.
739 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
740 (linux_low_filter_event): Toggle syscall_state entry/return for
741 syscall traps, and set it ignored for all others.
742 (gdb_catching_syscalls_p): New function.
743 (gdb_catch_this_syscall_p): New function.
744 (linux_wait_1): Handle SYSCALL_SIGTRAP.
745 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
746 (linux_supports_catch_syscall): New function.
747 (linux_target_ops): Install it.
748 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
749 (the_low_target): Install it.
750
8f13a3ce
MF
7512016-01-12 Mike Frysinger <vapier@gentoo.org>
752
753 * acinclude.m4: Include new ../warning.m4 file.
754 * configure: Regenerated.
755 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
756
5b3da067
MF
7572016-01-12 Mike Frysinger <vapier@gentoo.org>
758
759 * ax.c (is_goto_target): Mark static.
760 * linux-low.c (register_addr): Likewise.
761 (linux_fetch_registers, linux_store_registers): Likewise.
762 * mem-break.c (any_persistent_commands): Fix old prototype.
763 (add_commands_to_breakpoint): Mark static.
764 * regcache.c (find_register_by_name): Delete unused func.
765 * remote-utils.c (hex_or_minus_one): Mark static.
766 * server.c (monitor_show_help): Mark static.
767 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
768 handle_v_requests): Likewise.
769
bc504a31
PA
7702016-01-12 Pedro Alves <palves@redhat.com>
771
772 Remove use of the registered trademark symbol throughout.
773
5a0dd67a
YQ
7742016-01-08 Yao Qi <yao.qi@linaro.org>
775
776 * remote-utils.c (getpkt): If c is '\003', call target hook
777 request_interrupt.
778
b2ca446f
YQ
7792016-01-06 Yao Qi <yao.qi@linaro.org>
780
781 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
782 linux-aarch32-low.c.
783 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
784 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
785 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
786 (thumb2_breakpoint): Declare.
787 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
788 linux-aarch32-low.h.
789 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
790 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
791 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
792
edd88788
JB
7932016-01-01 Joel Brobecker <brobecker@adacore.com>
794
795 * gdbreplay.c (gdbreplay_version): Change copyright year in
796 version message.
797 * server.c (gdbserver_version): Likewise.
798
65da7f14
PP
7992015-12-28 Patrick Palka <patrick@parcs.ath.cx>
800
801 * server.c (crc32_table): Delete.
802 (crc32): Use libiberty's xcrc32 function.
803
4abd5ed2
JB
8042015-12-22 Joel Brobecker <brobecker@adacore.com>
805
806 * lynx-low.c (lynx_delete_thread_callback): New function.
807 (lynx_mourn): Properly delete our process and all of its
808 threads. Remove call to clear_inferiors.
809
0e50fe5c
JB
8102015-12-22 Joel Brobecker <brobecker@adacore.com>
811
812 * target.c (thread_search_callback): Add check that
813 the thread_stopped target callback is not NULL before
814 calling it.
815
35adc03f
YQ
8162015-12-21 Yao Qi <yao.qi@linaro.org>
817
818 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
819 arm breakpoint.
820
bd2b2909
AT
8212015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
822
823 * server.c (handle_query): Call target_supports_software_single_step.
824
7fe5e27e
AT
8252015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
826
827 * linux-low.c (single_step): New function.
828 (linux_resume_one_lwp_throw): Call single_step.
829 (start_step_over): Likewise.
830
d9311bfa
AT
8312015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
832
833 * Makefile.in (SFILES): Append arch/arm-linux.c,
834 arch/arm-get-next-pcs.c.
835 (arm-linux.o): New rule.
836 (arm-get-next-pcs.o): New rule.
837 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
838 arm-linux.o.
839 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
840 to linux-aarch32-low.c.
841 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
842 (arm_breakpoint_len, thumb_breakpoint): Likewise.
843 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
844 (thumb2_breakpoint_len): Likewise.
845 (arm_is_thumb_mode): Make non-static.
846 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
847 from linux-aarch32-low.c.
848 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
849 (arm_breakpoint_len, thumb_breakpoint): Likewise.
850 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
851 (thumb2_breakpoint_len): Likewise.
852 (arm_is_thumb_mode): New declaration.
853 * linux-arm-low.c: Include arch/arm-linux.h
854 aarch/arm-get-next-pcs.h, sys/syscall.h.
855 (get_next_pcs_ops): New struct.
856 (get_next_pcs_addr_bits_remove): New function.
857 (get_next_pcs_is_thumb): New function.
858 (get_next_pcs_read_memory_unsigned_integer): Likewise.
859 (arm_sigreturn_next_pc): Likewise.
860 (get_next_pcs_syscall_next_pc): Likewise.
861 (arm_gdbserver_get_next_pcs): Likewise.
862 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
863 Initialize.
864 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
865 * server.h: Include gdb_vecs.h.
866
68ce2059
AT
8672015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
868
869 * Makefile.in (SFILES): Append common/common-regcache.c.
870 (OBS): Append common-regcache.o.
871 (common-regcache.o): New rule.
872 * regcache.c (init_register_cache): Initialize cache to
873 REG_UNAVAILABLE.
874 (regcache_raw_read_unsigned): New function.
875 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
876 register_status enum.
877
fa5308bd
AT
8782015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
879
880 * linux-aarch64-low.c (the_low_targets): Rename
881 breakpoint_reinsert_addr to get_next_pcs.
882 * linux-arm-low.c (the_low_targets): Likewise.
883 * linux-bfin-low.c (the_low_targets): Likewise.
884 * linux-cris-low.c (the_low_targets): Likewise.
885 * linux-crisv32-low.c (the_low_targets): Likewise.
886 * linux-low.c (can_software_single_step): Likewise.
887 (install_software_single_step_breakpoints): New function.
888 (start_step_over): Use install_software_single_step_breakpoints.
889 * linux-low.h: New CORE_ADDR vector.
890 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
891 get_next_pcs.
892 * linux-mips-low.c (the_low_targets): Likewise.
893 * linux-nios2-low.c (the_low_targets): Likewise.
894 * linux-sparc-low.c (the_low_targets): Likewise.
895
4a6ed09b
PA
8962015-12-17 Pedro Alves <palves@redhat.com>
897
898 * linux-low.c (linux_kill_one_lwp): Remove references to
899 LinuxThreads.
900 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
901 to 'kill'.
902 (linux_init_signals): Delete.
903 (initialize_low): Adjust.
904 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
905
7544db95
PA
9062015-12-16 Pedro Alves <palves@redhat.com>
907
908 * configure.ac (compiler warning flags): When testing a
909 -Wno-foo option, check whether -Wfoo works instead.
910 * configure: Regenerate.
911
8020350c
DB
9122015-12-11 Don Breazeal <donb@codesourcery.com>
913
914 * server.c (process_serial_event): Don't exit from gdbserver
915 in remote mode if there are still active inferiors.
916
db91f502
YQ
9172015-12-11 Yao Qi <yao.qi@linaro.org>
918
919 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
920 arm_breakpoint_at if the process is 32-bit.
921
b37a6290
YQ
9222015-12-11 Yao Qi <yao.qi@linaro.org>
923
924 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
925 arm breakpoint.
926
17b1509a
YQ
9272015-12-07 Yao Qi <yao.qi@linaro.org>
928
929 * configure.srv: Append arm.o to srv_tgtobj for
930 aarch64*-*-linux* target.
931 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
932 from linux-arm-low.c.
933 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
934 (arm_breakpoint_len, thumb_breakpoint): Likewise.
935 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
936 (thumb2_breakpoint_len): Likewise.
937 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
938 (arm_breakpoint_kinds): Likewise.
939 (arm_breakpoint_kind_from_pc): Likewise.
940 (arm_sw_breakpoint_from_kind): Likewise.
941 (arm_breakpoint_kind_from_current_state): Likewise.
942 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
943 (arm_sw_breakpoint_from_kind): Declare.
944 (arm_breakpoint_kind_from_current_state): Declare.
945 (arm_breakpoint_at): Declare.
946 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
947 arm_sw_breakpoint_from_kind if process is 32-bit.
948 (aarch64_breakpoint_kind_from_pc): New function.
949 (aarch64_breakpoint_kind_from_current_state): New function.
950 (the_low_target): Initialize fields breakpoint_kind_from_pc
951 and breakpoint_kind_from_current_state.
952 * linux-arm-low.c (arm_breakpoint_kinds): Move to
953 linux-aarch32-low.c.
954 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
955 (arm_breakpoint, arm_breakpoint_len): Likewise.
956 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
957 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
958 (arm_is_thumb_mode): Likewise.
959 (arm_breakpoint_at): Likewise.
960 (arm_breakpoint_kind_from_pc): Likewise.
961 (arm_sw_breakpoint_from_kind): Likewise.
962 (arm_breakpoint_kind_from_current_state): Likewise.
963
964 Revert:
965 2015-08-04 Yao Qi <yao.qi@linaro.org>
966
967 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
968 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
969 * server.c (extended_protocol): Remove "static".
970 * server.h (extended_protocol): Declare it.
971
ece66d65
JS
9722015-12-04 Josh Stone <jistone@redhat.com>
973
974 * target.h (struct target_ops) <arch_setup>: Rename to ...
975 (struct target_ops) <post_create_inferior>: ... this.
976 (target_arch_setup): Rename to ...
977 (target_post_create_inferior): ... this, calling post_create_inferior.
978 * server.c (start_inferior): Update target_arch_setup calls to
979 target_post_create_inferior.
980 * linux-low.c (linux_low_ptrace_options): Forward declare.
981 (linux_arch_setup): Update its comment for general use.
982 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
983 (struct linux_target_ops): Use linux_post_create_inferior.
984 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
985 to post_create_inferior.
986 * nto-low.c (struct nto_target_ops): Likewise.
987 * spu-low.c (struct spu_target_ops): Likewise.
988 * win32-low.c (struct win32_target_ops): Likewise.
989
e58c48b4
AT
9902015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
991
992 * linux-arm-low.c: Remove duplicate arch/arm.h include.
993
fbec8956
AT
9942015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
995
996 * linux-arm-low.c (arm_reinsert_addr): Remove function.
997 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
998 * linux-cris-low.c (cris_reinsert_addr> Remove function.
999 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1000 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1001 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1002 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1003 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1004 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1005 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1006 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1007 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1008
9b4c5f87
AT
10092015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1010
1011 * linux-low.c (linux_look_up_symbols): Don't call
1012 linux_supports_traceclone.
1013 * linux-low.h (thread_db_init): Remove use_events argument.
1014 * thread-db.c (thread_db_use_event): Remove global variable.
1015 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1016 (struct thread_db) <td_create_bp>: Remove field.
1017 (thread_db_create_event): Remove function.
1018 (thread_db_enable_reporting): Likewise.
1019 (find_one_thread): Don't check for thread_db_use_events.
1020 (attach_thread): Likewise.
1021 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1022 (try_thread_db_load_1): Don't check for thread_db_use_events.
1023 (thread_db_init): Remove use_events argument and thread events
1024 handling.
1025 (remove_thread_event_breakpoints): Remove function.
1026 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1027
7d00775e
AT
10282015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1029
1030 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1031 New function.
1032 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1033 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1034 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1035 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1036 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1037 Initialize.
1038 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1039 New function.
1040 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1041 * linux-low.c (can_hardware_single_step): Use
1042 supports_hardware_single_step.
1043 (can_software_single_step): New function.
1044 (start_step_over): Call can_software_single_step.
1045 (linux_supports_hardware_single_step): New function.
1046 (struct target_ops) <supports_software_single_step>: Initialize.
1047 * linux-low.h (struct linux_target_ops)
1048 <supports_hardware_single_step>: Initialize.
1049 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1050 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1051 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1052 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1053 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1054 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1055 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1056 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1057 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1058 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1059 Initialize.
1060 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1061 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1062 Initialize.
1063 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1064 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1065 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1066 New function.
1067 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1068 * target.h (struct target_ops): <supports_software_single_step>:
1069 New field.
1070 (target_supports_software_single_step): New macro.
1071
2d97cd35
AT
10722015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1073
1074 * linux-low.c (linux_wait_1): Fix pc advance condition.
1075 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1076 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1077
769ef81f
AT
10782015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1079
1080 * linux-arm-low.c (arm_is_thumb_mode): New function.
1081 (arm_breakpoint_at): Use arm_is_thumb_mode.
1082 (arm_breakpoint_kind_from_current_state): New function.
1083 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1084 Initialize.
1085 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1086 (linux_breakpoint_kind_from_current_state): New function.
1087 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1088 * linux-low.h (struct linux_target_ops)
1089 <breakpoint_kind_from_current_state>: New field.
1090 * target.h (struct target_ops): Likewise.
1091 (target_breakpoint_kind_from_current_state): New macro.
1092
1bebeeca
PA
10932015-11-30 Pedro Alves <palves@redhat.com>
1094
1095 * linux-low.c (linux_resume): Wake up the event loop before
1096 returning.
1097
a67a9fae
PA
10982015-11-30 Pedro Alves <palves@redhat.com>
1099
1100 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1101 check.
1102 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1103 to -1.
1104 * target.c (struct thread_search): New structure.
1105 (thread_search_callback): New function.
1106 (prev_general_thread): New global.
1107 (prepare_to_access_memory, done_accessing_memory): New functions.
1108 * target.h (prepare_to_access_memory, done_accessing_memory):
1109 Replace macros with function declarations.
1110
f2faf941
PA
11112015-11-30 Pedro Alves <palves@redhat.com>
1112
1113 PR 14618
1114 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1115 report TARGET_WAITKIND_NO_RESUMED.
1116 * remote-utils.c (prepare_resume_reply): Handle
1117 TARGET_WAITKIND_NO_RESUMED.
1118 * server.c (report_no_resumed): New global.
1119 (handle_query) <qSupported>: Handle "no-resumed+". Report
1120 "no-resumed+" support.
1121 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1122 return error if the client doesn't support no-resumed events.
1123 (push_stop_notification): New function.
1124 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1125 events if the client supports them.
1126
a681f9c9
PA
11272015-11-30 Pedro Alves <palves@redhat.com>
1128
1129 * linux-low.c (thread_still_has_status_pending_p): Don't check
1130 vCont;t here.
1131 (lwp_resumed): New function.
1132 (status_pending_p_callback): Return early if the LWP is not
1133 supposed to be resumed.
1134
65706a29
PA
11352015-11-30 Pedro Alves <palves@redhat.com>
1136
1137 * linux-low.c (handle_extended_wait): Assert that the LWP's
1138 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1139 thread create events, leave the new child's status pending.
1140 (linux_low_filter_event): If GDB wants to hear about thread exit
1141 events, leave the LWP marked dead and don't delete it.
1142 (linux_wait_for_event_filtered): Don't check for thread exit.
1143 (filter_exit_event): New function.
1144 (linux_wait_1): Use it, when returning an exit event.
1145 (linux_resume_one_lwp_throw): Assert that the LWP's
1146 waitstatus is TARGET_WAITKIND_IGNORE.
1147 * remote-utils.c (prepare_resume_reply): Handle
1148 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1149 * server.c (report_thread_events): New global.
1150 (handle_general_set): Handle QThreadEvents.
1151 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1152 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1153 TARGET_WAITKIND_THREAD_EXITED.
1154 * server.h (report_thread_events): Declare.
1155
56cf4bed
PA
11562015-11-30 Pedro Alves <palves@redhat.com>
1157
1158 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1159 the thread's last_resume_kind was resume_stop.
1160
500c1d85
PA
11612015-11-30 Pedro Alves <palves@redhat.com>
1162
1163 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1164 before returning.
1165
de979965
PA
11662015-11-30 Pedro Alves <palves@redhat.com>
1167
1168 * server.c (handle_v_requests): Handle vCtrlC.
1169
34c65914
PA
11702015-11-30 Pedro Alves <palves@redhat.com>
1171
1172 * gdbthread.h (find_any_thread_of_pid): Declare.
1173 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1174 functions.
1175 * server.c (handle_query): If current_thread is NULL, look for
1176 another thread of the selected process.
1177
79efa585 11782015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1179 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1180
1181 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1182 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1183 name in reply.
1184 * target.h (struct target_ops) <thread_name>: New field.
1185 (target_thread_name): New macro.
1186
80d82c19
JB
11872015-11-23 Joel Brobecker <brobecker@adacore.com>
1188
1189 * regcache.h (regcache_invalidate_pid): Add declaration.
1190 * regcache.c (regcache_invalidate_pid): New function, extracted
1191 from regcache_invalidate.
1192 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1193 Add trivial documentation comment.
1194 * lynx-low.c: Use regcache_invalidate_pid instead of
1195 regcache_invalidate.
1196
64da5dd5
JB
11972015-11-23 Joel Brobecker <brobecker@adacore.com>
1198
1199 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1200 and Elf64_auxv_t if the target is Android.
1201
37ce4055
DE
12022015-11-22 Doug Evans <xdje42@gmail.com>
1203
1204 * target.h: #include <sys/types.h>.
1205
06e03fff
PA
12062015-11-19 Pedro Alves <palves@redhat.com>
1207
1208 * linux-low.c (linux_process_qsupported): Change prototype.
1209 Adjust.
1210 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1211 Change prototype.
1212 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1213 and adjust to loop over all features.
1214 * server.c (handle_query) <qSupported>: Adjust to call
1215 target_process_qsupported once, passing it a vector of unprocessed
1216 features.
1217 * target.h (struct target_ops) <process_qsupported>: Change
1218 prototype.
1219 (target_process_qsupported): Adjust.
1220
9a084706
PA
12212015-11-19 Pedro Alves <palves@redhat.com>
1222
1223 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1224 mode.
1225 * configure: Regenerate.
1226
dad44a1f
PA
12272015-11-19 Pedro Alves <palves@redhat.com>
1228
1229 * configure: Regenerate.
1230
231c0592
YQ
12312015-11-19 Yao Qi <yao.qi@linaro.org>
1232
1233 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1234 type to uint32_t.
1235
6c1c9a8b
YQ
12362015-11-19 Yao Qi <yao.qi@linaro.org>
1237
1238 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1239 (struct aarch64_operand): Move enum out.
1240
9caa3311
YQ
12412015-11-19 Yao Qi <yao.qi@linaro.org>
1242
1243 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1244 struct user_fpsimd_state *.
1245 (aarch64_store_fpregset): Likewise.
1246
6a69a054
YQ
12472015-11-19 Yao Qi <yao.qi@linaro.org>
1248
1249 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1250 struct user_pt_regs *.
1251 (aarch64_store_gregset): Likewise.
1252
1798301e
PA
12532015-11-18 Pedro Alves <palves@redhat.com>
1254
1255 * Makefile.in (all_object_files): Add $IPA_OBJS.
1256
ce7715e2
PA
12572015-11-17 Pedro Alves <palves@redhat.com>
1258
1259 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1260 GDB_SIGNAL_0 and gdb_signal_to_string.
1261
c0879059
PA
12622015-11-17 Pedro Alves <palves@redhat.com>
1263
1264 * win32-low.c (handle_output_debug_string): Remove parameter.
1265 (win32_kill): Remove our_status local and adjust call to
1266 handle_output_debug_string.
1267 (get_child_debug_event): Adjust call to
1268 handle_output_debug_string.
1269
1996e237
SM
12702015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1271
1272 * linux-mips-low.c (mips_fill_gregset): Add cast.
1273 (mips_store_gregset): Likewise.
1274 (mips_fill_fpregset): Likewise.
1275 (mips_store_fpregset): Likewise.
1276
cbec665b
SM
12772015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1278
1279 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1280 priv.
1281
eb3e3c67
SM
12822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1283
1284 * linux-mips-low.c (mips_linux_new_thread): Change type of
1285 watch_type to enum target_hw_bp_type.
1286
171de4b8
SM
12872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1290 Change return type to arm_hwbp_type.
1291
04248ead
SM
12922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1293
1294 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1295 (arm_store_gregset): Likewise.
1296 * linux-arm-low.c (arm_get_hwcap): Likewise.
1297 (arm_read_description): Likewise.
1298
04b3479c
SM
12992015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1300
1301 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1302
2bc84e8a
SM
13032015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1304
1305 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1306 (ppc_fill_vsxregset): Likewise.
1307 (ppc_store_vsxregset): Likewise.
1308 (ppc_fill_vrregset): Likewise.
1309 (ppc_store_vrregset): Likewise.
1310 (ppc_fill_evrregset): Likewise.
1311 (ppc_store_evrregset): Likewise.
1312
e6c5bb05
SM
13132015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1314
1315 * linux-ppc-low.c (ppc_usrregs_info): Remove
1316 forward-declaration.
1317 (ppc_arch_setup): Move lower in file.
1318
7ea45d72
SM
13192015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1320
1321 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1322 (ps_pdwrite): Likewise.
1323
69291610
HW
13242015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1325
1326 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1327 to after assert checks.
1328
b42945fd
SM
13292015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1330
1331 * proc-service.c (ps_pdread): Add/adjust casts.
1332 (ps_pdwrite): Add/adjust casts.
1333
d6f85c84
SM
13342015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1335
1336 * server.c (handle_search_memory_1): Cast return value of
1337 memmem.
1338
f98cd059
SM
13392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1340
1341 * server.c (write_qxfer_response): Change type of data to
1342 gdb_byte *.
1343
d2412fa5
PA
13442015-10-29 Pedro Alves <palves@redhat.com>
1345
1346 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1347
c17414a2
PA
13482015-10-29 Pedro Alves <palves@redhat.com>
1349
1350 * tracepoint.c (clear_installed_tracepoints): Add casts.
1351
e053fbc4
PA
13522015-10-29 Pedro Alves <palves@redhat.com>
1353
1354 * server.c (handle_v_cont, process_serial_event): Add enum
1355 gdb_signal casts to signal parsing code.
1356
add67df8
PA
13572015-10-29 Pedro Alves <palves@redhat.com>
1358
1359 * linux-low.h (NULL_REGSET): Define.
1360 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1361 * linux-arm-low.c (arm_regsets): Likewise.
1362 * linux-crisv32-low.c (cris_regsets): Likewise.
1363 * linux-m68k-low.c (m68k_regsets): Likewise.
1364 * linux-mips-low.c (mips_regsets): Likewise.
1365 * linux-nios2-low.c (nios2_regsets): Likewise.
1366 * linux-ppc-low.c (ppc_regsets): Likewise.
1367 * linux-s390-low.c (s390_regsets): Likewise.
1368 * linux-sh-low.c (sh_regsets): Likewise.
1369 * linux-sparc-low.c (sparc_regsets): Likewise.
1370 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1371 * linux-tile-low.c (tile_regsets): Likewise.
1372 * linux-x86-low.c (x86_regsets): Likewise.
1373 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1374
50bc912a
PA
13752015-10-29 Pedro Alves <palves@redhat.com>
1376
1377 * linux-low.h (NULL_REGSET): Define.
1378 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1379 * linux-arm-low.c (arm_regsets): Likewise.
1380 * linux-crisv32-low.c (cris_regsets): Likewise.
1381 * linux-m68k-low.c (m68k_regsets): Likewise.
1382 * linux-mips-low.c (mips_regsets): Likewise.
1383 * linux-nios2-low.c (nios2_regsets): Likewise.
1384 * linux-ppc-low.c (ppc_regsets): Likewise.
1385 * linux-s390-low.c (s390_regsets): Likewise.
1386 * linux-sh-low.c (sh_regsets): Likewise.
1387 * linux-sparc-low.c (sparc_regsets): Likewise.
1388 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1389 * linux-tile-low.c (tile_regsets): Likewise.
1390 * linux-x86-low.c (x86_regsets): Likewise.
1391 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1392
682b2546
DE
13932015-10-26 Doug Evans <dje@google.com>
1394
1395 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1396
963843d4
DE
13972015-10-26 Doug Evans <dje@google.com>
1398
1399 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1400
d41401ac
DE
14012015-10-26 Doug Evans <dje@google.com>
1402
1403 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1404 for debug_printf.
1405 (attach_thread, find_new_threads_callback): Ditto.
1406
3db28855
AT
14072015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1408
1409 * mem-break.h (set_breakpoint_data): Remove.
1410
fb78e89c
AT
14112015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1412
1413 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1414 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1415 (initialize_low): Remove set_breakpoint_data call.
1416 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1417 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1418 (initialize_low): Remove set_breakpoint_data call.
1419 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1420 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1421 (initialize_low): Remove set_breakpoint_data call.
1422
2e6ee069
AT
14232015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1424
1425 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1426 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1427 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1428 * target.h (target_breakpoint_kind_from_pc): New macro.
1429
1652a986
AT
14302015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1431
1432 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1433 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1434 the default breakpoint kind.
1435
abeead09
AT
14362015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1437
1438 * linux-arm-low.c (arm_supports_z_point_type): Add software
1439 breakpoint support.
1440
b0b4b501
AT
14412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1442
1443 * linux-arm-low.c: Refactor breakpoint definitions.
1444 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1445 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1446
8689682c
AT
14472015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1448
1449 * Makefile.in: Add arm.c/o.
1450 * configure.srv: Likewise.
1451 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1452 (arm_breakpoint_kind_from_pc): New function.
1453 (arm_sw_breakpoint_from_kind): Return proper kind.
1454 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1455
27165294
AT
14562015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1457
1458 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1459 removal.
1460 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1461 (struct raw_breakpoint) <size>: Remove.
1462 (struct raw_breakpoint) <kind>: Add.
1463 (bp_size): New function.
1464 (bp_opcode): Likewise.
1465 (find_raw_breakpoint_at): Adjust for kind.
1466 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1467 (remove_memory_breakpoint): Adjust for kind call bp_size.
1468 (set_raw_breakpoint_at): Adjust for kind.
1469 (set_breakpoint): Likewise.
1470 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1471 (delete_raw_breakpoint): Adjust for kind.
1472 (delete_breakpoint): Likewise.
1473 (find_gdb_breakpoint): Likewise.
1474 (set_gdb_breakpoint_1): Likewise.
1475 (set_gdb_breakpoint): Likewise.
1476 (delete_gdb_breakpoint_1): Likewise.
1477 (delete_gdb_breakpoint): Likewise.
1478 (uninsert_raw_breakpoint): Likewise.
1479 (reinsert_raw_breakpoint): Likewise.
1480 (set_breakpoint_data): Remove.
1481 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1482 (check_mem_read): Adjust for kind call bp_size.
1483 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1484 (clone_one_breakpoint): Adjust for kind.
1485 * mem-break.h (set_gdb_breakpoint): Likewise.
1486 (delete_gdb_breakpoint): Likewise.
1487 * server.c (process_serial_event): Likewise.
1488
dd373349
AT
14892015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1490
1491 * linux-aarch64-low.c (aarch64_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-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1497 (arm_sw_breakpoint_from_kind): New function.
1498 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1499 (struct linux_target_ops) <breakpoint>: Remove.
1500 (struct linux_target_ops) <breakpoint_len>: Remove.
1501 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1502 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1503 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1504 (struct linux_target_ops) <breakpoint>: Remove.
1505 (struct linux_target_ops) <breakpoint_len>: Remove.
1506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1508 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1509 (struct linux_target_ops) <breakpoint>: Remove.
1510 (struct linux_target_ops) <breakpoint_len>: Remove.
1511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1513 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1514 and sw_breakpoint_from_kind to increment the pc.
1515 (linux_breakpoint_kind_from_pc): New function.
1516 (linux_sw_breakpoint_from_kind): New function.
1517 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1518 (initialize_low): Call breakpoint_kind_from_pc and
1519 sw_breakpoint_from_kind to replace breakpoint_data/len.
1520 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1521 New field.
1522 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1523 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1524 (struct linux_target_ops) <breakpoint>: Remove.
1525 (struct linux_target_ops) <breakpoint_len>: Remove.
1526 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1528 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1529 (struct linux_target_ops) <breakpoint>: Remove.
1530 (struct linux_target_ops) <breakpoint_len>: Remove.
1531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1533 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1534 (struct linux_target_ops) <breakpoint>: Remove.
1535 (struct linux_target_ops) <breakpoint_len>: Remove.
1536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1538 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1539 (struct linux_target_ops) <breakpoint>: Remove.
1540 (struct linux_target_ops) <breakpoint_len>: Remove.
1541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1543 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1544 (struct linux_target_ops) <breakpoint>: Remove.
1545 (struct linux_target_ops) <breakpoint_len>: Remove.
1546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1548 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1549 (struct linux_target_ops) <breakpoint>: Remove.
1550 (struct linux_target_ops) <breakpoint_len>: Remove.
1551 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1552 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1553 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1554 (struct linux_target_ops) <breakpoint>: Remove.
1555 (struct linux_target_ops) <breakpoint_len>: Remove.
1556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1558 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1559 (struct linux_target_ops) <breakpoint>: Remove.
1560 (struct linux_target_ops) <breakpoint_len>: Remove.
1561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1563 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1564 (struct linux_target_ops) <breakpoint>: Remove.
1565 (struct linux_target_ops) <breakpoint_len>: Remove.
1566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1568 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1569 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1570 (struct linux_target_ops) <breakpoint>: Remove.
1571 (struct linux_target_ops) <breakpoint_len>: Remove.
1572 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1573 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1574 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1575 (struct linux_target_ops) <breakpoint>: Remove.
1576 (struct linux_target_ops) <breakpoint_len>: Remove.
1577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1578 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1579
4cd98a19
AT
15802015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1581
1582 * linux-cris-low.c (cris_get_pc): Remove void arg.
1583
774ee6d2
AR
15842015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1585
1586 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1587 variable name.
1588
833dcd29
AR
15892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1590
1591 * inferiors.c (thread_pid_matches_callback): New function.
1592 (find_thread_process): New function.
1593 (remove_thread): Reset current_thread.
1594 (remove_process): Assert threads have been removed first.
1595
8d689ee5
YQ
15962015-10-15 Yao Qi <yao.qi@linaro.org>
1597
1598 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1599 if it is 3.
1600 (aarch64_remove_point): Likewise.
1601 * regcache.c (regcache_register_size): New function.
1602
1c2e1515
YQ
16032015-10-12 Yao Qi <yao.qi@linaro.org>
1604
1605 * linux-aarch64-low.c: Update all callers as emit_load_store
1606 is renamed to aarch64_emit_load_store.
1607
e1c587c3
YQ
16082015-10-12 Yao Qi <yao.qi@linaro.org>
1609
1610 * linux-aarch64-low.c: Update all callers of function renaming
1611 from emit_insn to aarch64_emit_insn.
1612
b6542f81
YQ
16132015-10-12 Yao Qi <yao.qi@linaro.org>
1614
1615 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1616 arch/aarch64-insn.h.
1617 (struct aarch64_memory_operand): Likewise.
1618 (ENCODE): Likewise.
1619 (emit_insn): Move to arch/aarch64-insn.c.
1620 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1621 (emit_load_store): Move to arch/aarch64-insn.c.
1622 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1623 (can_encode_int32): Remove.
1624
246994ce
YQ
16252015-10-12 Yao Qi <yao.qi@linaro.org>
1626
1627 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1628 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1629 (aarch64_relocate_instruction): Likewise.
1630 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1631 (struct aarch64_insn_visitor): Likewise.
1632
0badd99f
YQ
16332015-10-12 Yao Qi <yao.qi@linaro.org>
1634
1635 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1636 (struct aarch64_insn_visitor): New.
1637 (struct aarch64_insn_relocation_data): New.
1638 (aarch64_ftrace_insn_reloc_b): New function.
1639 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1640 (aarch64_ftrace_insn_reloc_cb): Likewise.
1641 (aarch64_ftrace_insn_reloc_tb): Likewise.
1642 (aarch64_ftrace_insn_reloc_adr): Likewise.
1643 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1644 (aarch64_ftrace_insn_reloc_others): Likewise.
1645 (visitor): New.
1646 (aarch64_relocate_instruction): Use visitor.
1647
dfaffe9d
YQ
16482015-10-12 Yao Qi <yao.qi@linaro.org>
1649
1650 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1651 int. Add argument buf.
1652 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1653 aarch64_relocate_instruction.
1654
70b439f0
YQ
16552015-10-12 Yao Qi <yao.qi@linaro.org>
1656
1657 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1658 argument insn. Remove local variable insn. Don't call
1659 target_read_uint32.
1660 (aarch64_install_fast_tracepoint_jump_pad): Call
1661 target_read_uint32.
1662
7781c06f
YQ
16632015-09-30 Yao Qi <yao.qi@linaro.org>
1664
1665 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1666 (emit_load_store_pair): Likewise.
1667
9a3c8263
SM
16682015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1669
1670 * dll.c (match_dll): Add cast(s).
1671 (unloaded_dll): Likewise.
1672 * linux-low.c (second_thread_of_pid_p): Likewise.
1673 (delete_lwp_callback): Likewise.
1674 (count_events_callback): Likewise.
1675 (select_event_lwp_callback): Likewise.
1676 (linux_set_resume_request): Likewise.
1677 * server.c (accumulate_file_name_length): Likewise.
1678 (emit_dll_description): Likewise.
1679 (handle_qxfer_threads_worker): Likewise.
1680 (visit_actioned_threads): Likewise.
1681 * thread-db.c (any_thread_of): Likewise.
1682 * tracepoint.c (same_process_p): Likewise.
1683 (match_blocktype): Likewise.
1684 (build_traceframe_info_xml): Likewise.
1685
224c3ddb
SM
16862015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1687
1688 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1689 assignment.
1690 (gdb_unparse_agent_expr): Likewise.
1691 * hostio.c (require_data): Likewise.
1692 (handle_pread): Likewise.
1693 * linux-low.c (disable_regset): Likewise.
1694 (fetch_register): Likewise.
1695 (store_register): Likewise.
1696 (get_dynamic): Likewise.
1697 (linux_qxfer_libraries_svr4): Likewise.
1698 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1699 (set_fast_tracepoint_jump): Likewise.
1700 (uninsert_fast_tracepoint_jumps_at): Likewise.
1701 (reinsert_fast_tracepoint_jumps_at): Likewise.
1702 (validate_inserted_breakpoint): Likewise.
1703 (clone_agent_expr): Likewise.
1704 * regcache.c (init_register_cache): Likewise.
1705 * remote-utils.c (putpkt_binary_1): Likewise.
1706 (decode_M_packet): Likewise.
1707 (decode_X_packet): Likewise.
1708 (look_up_one_symbol): Likewise.
1709 (relocate_instruction): Likewise.
1710 (monitor_output): Likewise.
1711 * server.c (handle_search_memory): Likewise.
1712 (handle_qxfer_exec_file): Likewise.
1713 (handle_qxfer_libraries): Likewise.
1714 (handle_qxfer): Likewise.
1715 (handle_query): Likewise.
1716 (handle_v_cont): Likewise.
1717 (handle_v_run): Likewise.
1718 (captured_main): Likewise.
1719 * target.c (write_inferior_memory): Likewise.
1720 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1721 * tracepoint.c (init_trace_buffer): Likewise.
1722 (add_tracepoint_action): Likewise.
1723 (add_traceframe): Likewise.
1724 (add_traceframe_block): Likewise.
1725 (cmd_qtdpsrc): Likewise.
1726 (cmd_qtdv): Likewise.
1727 (cmd_qtstatus): Likewise.
1728 (response_source): Likewise.
1729 (response_tsv): Likewise.
1730 (cmd_qtnotes): Likewise.
1731 (gdb_collect): Likewise.
1732 (initialize_tracepoint): Likewise.
1733
afbe19f8
PL
17342015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1735
1736 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1737 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1738 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1739 <NOP>: New.
1740 (enum aarch64_condition_codes): New enum.
1741 (w0): New static global.
1742 (fp): Likewise.
1743 (lr): Likewise.
1744 (struct aarch64_memory_operand) <type>: New
1745 MEMORY_OPERAND_POSTINDEX type.
1746 (postindex_memory_operand): New helper function.
1747 (emit_ret): New function.
1748 (emit_load_store_pair): New function, factored out of emit_stp
1749 with support for MEMORY_OPERAND_POSTINDEX.
1750 (emit_stp): Rewrite using emit_load_store_pair.
1751 (emit_ldp): New function.
1752 (emit_load_store): Likewise.
1753 (emit_ldr): Mention post-index instruction in comment.
1754 (emit_ldrh): New function.
1755 (emit_ldrb): New function.
1756 (emit_ldrsw): Mention post-index instruction in comment.
1757 (emit_str): Likewise.
1758 (emit_subs): New function.
1759 (emit_cmp): Likewise.
1760 (emit_and): Likewise.
1761 (emit_orr): Likewise.
1762 (emit_orn): Likewise.
1763 (emit_eor): Likewise.
1764 (emit_mvn): Likewise.
1765 (emit_lslv): Likewise.
1766 (emit_lsrv): Likewise.
1767 (emit_asrv): Likewise.
1768 (emit_mul): Likewise.
1769 (emit_sbfm): Likewise.
1770 (emit_sbfx): Likewise.
1771 (emit_ubfm): Likewise.
1772 (emit_ubfx): Likewise.
1773 (emit_csinc): Likewise.
1774 (emit_cset): Likewise.
1775 (emit_nop): Likewise.
1776 (emit_ops_insns): New helper function.
1777 (emit_pop): Likewise.
1778 (emit_push): Likewise.
1779 (aarch64_emit_prologue): New function.
1780 (aarch64_emit_epilogue): Likewise.
1781 (aarch64_emit_add): Likewise.
1782 (aarch64_emit_sub): Likewise.
1783 (aarch64_emit_mul): Likewise.
1784 (aarch64_emit_lsh): Likewise.
1785 (aarch64_emit_rsh_signed): Likewise.
1786 (aarch64_emit_rsh_unsigned): Likewise.
1787 (aarch64_emit_ext): Likewise.
1788 (aarch64_emit_log_not): Likewise.
1789 (aarch64_emit_bit_and): Likewise.
1790 (aarch64_emit_bit_or): Likewise.
1791 (aarch64_emit_bit_xor): Likewise.
1792 (aarch64_emit_bit_not): Likewise.
1793 (aarch64_emit_equal): Likewise.
1794 (aarch64_emit_less_signed): Likewise.
1795 (aarch64_emit_less_unsigned): Likewise.
1796 (aarch64_emit_ref): Likewise.
1797 (aarch64_emit_if_goto): Likewise.
1798 (aarch64_emit_goto): Likewise.
1799 (aarch64_write_goto_address): Likewise.
1800 (aarch64_emit_const): Likewise.
1801 (aarch64_emit_call): Likewise.
1802 (aarch64_emit_reg): Likewise.
1803 (aarch64_emit_pop): Likewise.
1804 (aarch64_emit_stack_flush): Likewise.
1805 (aarch64_emit_zero_ext): Likewise.
1806 (aarch64_emit_swap): Likewise.
1807 (aarch64_emit_stack_adjust): Likewise.
1808 (aarch64_emit_int_call_1): Likewise.
1809 (aarch64_emit_void_call_2): Likewise.
1810 (aarch64_emit_eq_goto): Likewise.
1811 (aarch64_emit_ne_goto): Likewise.
1812 (aarch64_emit_lt_goto): Likewise.
1813 (aarch64_emit_le_goto): Likewise.
1814 (aarch64_emit_gt_goto): Likewise.
1815 (aarch64_emit_ge_got): Likewise.
1816 (aarch64_emit_ops_impl): New static global variable.
1817 (aarch64_emit_ops): New target function, return
1818 &aarch64_emit_ops_impl.
1819 (struct linux_target_ops): Install it.
1820
bb903df0
PL
18212015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1822
1823 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1824 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1825 aarch64-ipa.o.
1826 * linux-aarch64-ipa.c: New file.
1827 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1828 and endian.h.
1829 (aarch64_get_thread_area): New target method.
1830 (extract_signed_bitfield): New helper function.
1831 (aarch64_decode_ldr_literal): New function.
1832 (enum aarch64_opcodes): New enum.
1833 (struct aarch64_register): New struct.
1834 (struct aarch64_operand): New struct.
1835 (x0): New static global.
1836 (x1): Likewise.
1837 (x2): Likewise.
1838 (x3): Likewise.
1839 (x4): Likewise.
1840 (w2): Likewise.
1841 (ip0): Likewise.
1842 (sp): Likewise.
1843 (xzr): Likewise.
1844 (aarch64_register): New helper function.
1845 (register_operand): Likewise.
1846 (immediate_operand): Likewise.
1847 (struct aarch64_memory_operand): New struct.
1848 (offset_memory_operand): New helper function.
1849 (preindex_memory_operand): Likewise.
1850 (enum aarch64_system_control_registers): New enum.
1851 (ENCODE): New macro.
1852 (emit_insn): New helper function.
1853 (emit_b): New function.
1854 (emit_bcond): Likewise.
1855 (emit_cb): Likewise.
1856 (emit_tb): Likewise.
1857 (emit_blr): Likewise.
1858 (emit_stp): Likewise.
1859 (emit_ldp_q_offset): Likewise.
1860 (emit_stp_q_offset): Likewise.
1861 (emit_load_store): Likewise.
1862 (emit_ldr): Likewise.
1863 (emit_ldrsw): Likewise.
1864 (emit_str): Likewise.
1865 (emit_ldaxr): Likewise.
1866 (emit_stxr): Likewise.
1867 (emit_stlr): Likewise.
1868 (emit_data_processing_reg): Likewise.
1869 (emit_data_processing): Likewise.
1870 (emit_add): Likewise.
1871 (emit_sub): Likewise.
1872 (emit_mov): Likewise.
1873 (emit_movk): Likewise.
1874 (emit_mov_addr): Likewise.
1875 (emit_mrs): Likewise.
1876 (emit_msr): Likewise.
1877 (emit_sevl): Likewise.
1878 (emit_wfe): Likewise.
1879 (append_insns): Likewise.
1880 (can_encode_int32_in): New helper function.
1881 (aarch64_relocate_instruction): New function.
1882 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1883 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1884 (struct linux_target_ops): Install aarch64_get_thread_area,
1885 aarch64_install_fast_tracepoint_jump_pad and
1886 aarch64_get_min_fast_tracepoint_insn_len.
1887
787749ea
PL
18882015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1889
1890 * Makefile.in (aarch64-insn.o): New rule.
1891 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1892
9812b2e6
YQ
18932015-09-21 Yao Qi <yao.qi@linaro.org>
1894
1895 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1896
18fe412b
YQ
18972015-09-21 Yao Qi <yao.qi@linaro.org>
1898
1899 * tracepoint.c (max_jump_pad_size): Remove.
1900
a0cc84cd
YQ
19012015-09-18 Yao Qi <yao.qi@linaro.org>
1902
1903 * linux-aarch64-low.c: Don't include sys/uio.h.
1904 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1905
d78908cf
WW
19062015-09-16 Wei-cheng Wang <cole945@gmail.com>
1907
1908 * tracepoint.c (eval_result_type): Change prototype.
1909 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1910
d57e0d50
PA
19112015-09-15 Pedro Alves <palves@redhat.com>
1912
1913 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1914 Check whether to report exec events instead of checking whether
1915 multiprocess is enabled.
1916
5a676acc
PA
19172015-09-15 Pedro Alves <palves@redhat.com>
1918
1919 PR remote/18965
1920 * remote-utils.c (prepare_resume_reply): Merge
1921 TARGET_WAITKIND_VFORK_DONE switch case with the
1922 TARGET_WAITKIND_FORKED case.
1923
7c5d0fad
YQ
19242015-09-15 Yao Qi <yao.qi@linaro.org>
1925
1926 * server.c (handle_query): Check string comparison using
1927 "else if" instead of "if".
1928
750ce8d1
YQ
19292015-09-15 Yao Qi <yao.qi@linaro.org>
1930
1931 * server.c (vCont_supported): New global variable.
1932 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1933 matches. Append ";vContSupported+" to own_buf.
1934 (handle_v_requests): Append ";s;S" to own_buf if target supports
1935 hardware single step or vCont_supported is false.
1936 (capture_main): Set vCont_supported to zero.
1937
70b90b91
YQ
19382015-09-15 Yao Qi <yao.qi@linaro.org>
1939
1940 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1941 it to ...
1942 (linux_supports_hardware_single_step): ... New function.
1943 (linux_target_ops): Update.
1944 * lynx-low.c (lynx_target_ops): Set field
1945 supports_hardware_single_step to target_can_do_hardware_single_step.
1946 * nto-low.c (nto_target_ops): Likewise.
1947 * spu-low.c (spu_target_ops): Likewise.
1948 * win32-low.c (win32_target_ops): Likewise.
1949 * target.c (target_can_do_hardware_single_step): New function.
1950 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1951 Remove. <supports_hardware_single_step>: New field.
1952 (target_supports_conditional_breakpoints): Remove.
1953 (target_supports_hardware_single_step): New macro.
1954 (target_can_do_hardware_single_step): Declare.
1955 * server.c (handle_query): Use target_supports_hardware_single_step
1956 instead of target_supports_conditional_breakpoints.
1957
ade90bde
YQ
19582015-09-15 Yao Qi <yao.qi@linaro.org>
1959
1960 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1961 function.
1962 (struct linux_target_ops the_low_target): Install
1963 aarch64_linux_siginfo_fixup.
1964
94585166
DB
19652015-09-11 Don Breazeal <donb@codesourcery.com>
1966 Luis Machado <lgustavo@codesourcery.com>
1967
1968 * linux-low.c (linux_mourn): Static declaration.
1969 (linux_arch_setup): Move in front of
1970 handle_extended_wait.
1971 (linux_arch_setup_thread): New function.
1972 (handle_extended_wait): Handle exec events. Call
1973 linux_arch_setup_thread. Make event_lwp argument a
1974 pointer-to-a-pointer.
1975 (check_zombie_leaders): Do not check stopped threads.
1976 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1977 (linux_low_filter_event): Add lwp and thread for exec'ing
1978 non-leader thread if leader thread has been deleted.
1979 Refactor code into linux_arch_setup_thread and call it.
1980 Pass child lwp pointer by reference to handle_extended_wait.
1981 (linux_wait_for_event_filtered): Update comment.
1982 (linux_wait_1): Prevent clobbering exec event status.
1983 (linux_supports_exec_events): New function.
1984 (linux_target_ops) <supports_exec_events>: Initialize new member.
1985 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1986 new member.
1987 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1988 * server.c (report_exec_events): New global variable.
1989 (handle_query): Handle qSupported query for exec-events feature.
1990 (captured_main): Initialize report_exec_events.
1991 * server.h (report_exec_events): Declare new global variable.
1992 * target.h (struct target_ops) <supports_exec_events>: New
1993 member.
1994 (target_supports_exec_events): New macro.
1995 * win32-low.c (win32_target_ops) <supports_exec_events>:
1996 Initialize new member.
1997
0568462b
MM
19982015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1999
2000 * linux-low.c (linux_low_enable_btrace): Remove.
2001 (linux_target_ops): Replace linux_low_enable_btrace with
2002 linux_enable_btrace.
2003
39edd165
YQ
20042015-09-03 Yao Qi <yao.qi@linaro.org>
2005
2006 * linux-aarch64-low.c (aarch64_insert_point): Call
2007 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2008 returns true.
2009
1db33b5a
UW
20102015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2011
2012 * linux-low.c (check_stopped_by_breakpoint): Use
2013 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2014
ab290430
PA
20152015-08-27 Pedro Alves <palves@redhat.com>
2016
2017 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2018
8d749320
SM
20192015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2020
6711b7f8
SM
2021 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2022 the XNEW-family equivalent.
8d749320
SM
2023 (compile_bytecodes): Likewise.
2024 * dll.c (loaded_dll): Likewise.
2025 * event-loop.c (append_callback_event): Likewise.
2026 (create_file_handler): Likewise.
2027 (create_file_event): Likewise.
2028 * hostio.c (handle_open): Likewise.
2029 * inferiors.c (add_thread): Likewise.
2030 (add_process): Likewise.
2031 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2032 * linux-arm-low.c (arm_new_process): Likewise.
2033 (arm_new_thread): Likewise.
2034 * linux-low.c (add_to_pid_list): Likewise.
2035 (linux_add_process): Likewise.
2036 (handle_extended_wait): Likewise.
2037 (add_lwp): Likewise.
2038 (enqueue_one_deferred_signal): Likewise.
2039 (enqueue_pending_signal): Likewise.
2040 (linux_resume_one_lwp_throw): Likewise.
2041 (linux_resume_one_thread): Likewise.
2042 (linux_read_memory): Likewise.
2043 (linux_write_memory): Likewise.
2044 * linux-mips-low.c (mips_linux_new_process): Likewise.
2045 (mips_linux_new_thread): Likewise.
2046 (mips_add_watchpoint): Likewise.
2047 * linux-x86-low.c (initialize_low_arch): Likewise.
2048 * lynx-low.c (lynx_add_process): Likewise.
2049 * mem-break.c (set_raw_breakpoint_at): Likewise.
2050 (set_breakpoint): Likewise.
2051 (add_condition_to_breakpoint): Likewise.
2052 (add_commands_to_breakpoint): Likewise.
2053 (clone_agent_expr): Likewise.
2054 (clone_one_breakpoint): Likewise.
2055 * regcache.c (new_register_cache): Likewise.
2056 * remote-utils.c (look_up_one_symbol): Likewise.
2057 * server.c (queue_stop_reply): Likewise.
2058 (start_inferior): Likewise.
2059 (queue_stop_reply_callback): Likewise.
2060 (handle_target_event): Likewise.
2061 * spu-low.c (fetch_ppc_memory): Likewise.
2062 (store_ppc_memory): Likewise.
2063 * target.c (set_target_ops): Likewise.
2064 * thread-db.c (thread_db_load_search): Likewise.
2065 (try_thread_db_load_1): Likewise.
2066 * tracepoint.c (add_tracepoint): Likewise.
2067 (add_tracepoint_action): Likewise.
2068 (create_trace_state_variable): Likewise.
2069 (cmd_qtdpsrc): Likewise.
2070 (cmd_qtro): Likewise.
2071 (add_while_stepping_state): Likewise.
2072 * win32-low.c (child_add_thread): Likewise.
2073 (get_image_name): Likewise.
2074
ed8b7b42
YQ
20752015-08-25 Yao Qi <yao.qi@linaro.org>
2076
2077 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2078
db3cb7cb
YQ
20792015-08-25 Yao Qi <yao.qi@linaro.org>
2080
2081 * Makefile.in (aarch64-linux.o): New rule.
2082 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2083 srv_tgtobj.
2084 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2085 (aarch64_init_debug_reg_state): Make it extern.
2086 (aarch64_linux_prepare_to_resume): Remove.
2087
f6011a1c
YQ
20882015-08-25 Yao Qi <yao.qi@linaro.org>
2089
2090 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2091 lwp_arch_private_info and ptid_of_lwp.
2092
88e2cf7e
YQ
20932015-08-25 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2096 Find proc_info by find_process_pid. All callers updated.
2097
5e35436e
YQ
20982015-08-25 Yao Qi <yao.qi@linaro.org>
2099
2100 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2101 Remove.
2102 (debug_reg_change_callback): Remove.
2103 (aarch64_notify_debug_reg_change): Remove.
2104
4a8a7965
YQ
21052015-08-25 Yao Qi <yao.qi@linaro.org>
2106
2107 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2108 Call current_lwp_ptid.
2109
32a271ee
YQ
21102015-08-25 Yao Qi <yao.qi@linaro.org>
2111
2112 * linux-aarch64-low.c (debug_reg_change_callback): Use
2113 debug_printf.
2114
0d51c8d7
YQ
21152015-08-25 Yao Qi <yao.qi@linaro.org>
2116
2117 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2118
31a43dd5
YQ
21192015-08-25 Yao Qi <yao.qi@linaro.org>
2120
2121 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2122
8ee52567
YQ
21232015-08-25 Yao Qi <yao.qi@linaro.org>
2124
2125 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2126 the code.
2127
ff3f0f45
YQ
21282015-08-25 Yao Qi <yao.qi@linaro.org>
2129
2130 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2131 Remove.
2132 (debug_reg_change_callback): Remove argument entry and add argument
2133 lwp. Remove local variable thread. Don't print thread id in the
2134 debugging output. Don't check whether pid of thread equals to pid.
2135 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2136 iterate_over_lwps instead find_inferior.
2137
3d40fbb5
PA
21382015-08-24 Pedro Alves <palves@redhat.com>
2139
2140 * inferiors.c (get_first_process): New function.
2141 * inferiors.h (get_first_process): New declaration.
2142 * remote-utils.c (read_ptid): Default to the first process in the
2143 list, instead of to the current thread's process.
2144
438e1e42
PA
21452015-08-24 Pedro Alves <palves@redhat.com>
2146
2147 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2148 * event-loop.c: Likewise.
2149 * remote-utils.c: Likewise.
2150 * tracepoint.c: Likewise.
2151
a8c6d4fc
PA
21522015-08-24 Pedro Alves <palves@redhat.com>
2153
2154 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2155 ptid_get_lwp.
2156
99b0bb12
PA
21572015-08-21 Pedro Alves <palves@redhat.com>
2158
2159 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2160 instead of literal 1.
2161
f8904751
PA
21622015-08-21 Pedro Alves <palves@redhat.com>
2163
2164 * tdesc.c (default_description): Explicitly zero-initialize.
2165
465a859e
PA
21662015-08-21 Pedro Alves <palves@redhat.com>
2167
2168 PR gdb/18749
2169 * inferiors.c (remove_thread): Discard any pending stop reply for
2170 this thread.
2171 * server.c (remove_all_on_match_pid): Rename to ...
2172 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2173 instead of a pid.
2174 (discard_queued_stop_replies): Change parameter to a ptid. Now
2175 extern.
2176 (handle_v_kill, kill_inferior_callback, captured_main)
2177 (process_serial_event): Adjust.
2178 * server.h (discard_queued_stop_replies): Declare.
2179
f0db101d
PA
21802015-08-21 Pedro Alves <palves@redhat.com>
2181
2182 * linux-low.c (wait_for_sigstop): Always switch to no thread
2183 selected if the previously current thread dies.
2184 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2185 process instead of the current thread's.
2186 * remote-utils.c (input_interrupt): Don't check if there's no
2187 current thread.
2188 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2189 current thread to the general thread fails, error out.
2190 (handle_qxfer_auxv, handle_qxfer_libraries)
2191 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2192 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2193 (handle_query): Check if there's a thread selected instead of
2194 checking whether there's any thread in the thread list.
2195 (handle_qxfer_threads, handle_qxfer_btrace)
2196 (handle_qxfer_btrace_conf): Don't error out early if there's no
2197 thread in the thread list.
2198 (handle_v_cont, myresume): Don't set the current thread to the
2199 continue thread.
2200 (process_serial_event) <Hg handling>: Also set thread_id if the
2201 previous general thread is still alive.
2202 (process_serial_event) <g/G handling>: If setting the current
2203 thread to the general thread fails, error out.
2204 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2205 thread's lwp instead of the current thread's.
2206 * target.c (set_desired_thread): If the desired thread was not
2207 found, leave the current thread pointing to NULL. Return an int
2208 (boolean) indicating success.
2209 * target.h (set_desired_thread): Change return type to int.
2210
40045d91
MF
22112015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2212
2213 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2214 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2215 #includes.
2216 (ps_get_thread_area): New function.
2217
45face3b
GB
22182015-08-19 Gary Benson <gbenson@redhat.com>
2219
2220 * hostio.c (handle_pread): Do not attempt to read more data
2221 than hostio_reply_with_data can fit in a packet.
2222
16d5f642
JB
22232015-08-18 Joel Brobecker <brobecker@adacore.com>
2224
2225 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2226
a738da3a
MF
22272015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2228
2229 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2230
33ebda9d
PA
22312015-08-06 Pedro Alves <palves@redhat.com>
2232
2233 * tracepoint.c (expr_eval_result): Now an int.
2234
a44892be
PA
22352015-08-06 Pedro Alves <palves@redhat.com>
2236
2237 * gdbthread.h (struct regcache): Forward declare.
2238 (struct thread_info) <regcache_data>: Now a struct regcache
2239 pointer.
2240 * inferiors.c (inferior_regcache_data)
2241 (set_inferior_regcache_data): Now work with struct regcache
2242 pointers.
2243 * inferiors.h (struct regcache): Forward declare.
2244 (inferior_regcache_data, set_inferior_regcache_data): Now work
2245 with struct regcache pointers.
2246 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2247 (free_register_cache_thread): Remove struct regcache pointer
2248 casts.
2249
608a1e46
PA
22502015-08-06 Pedro Alves <palves@redhat.com>
2251
2252 * server.c (captured_main): On error, print the exception message
2253 to stderr, and if run_once is set, throw a quit.
2254
f0ce0d3a
PA
22552015-08-06 Pedro Alves <palves@redhat.com>
2256
2257 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2258 the current thread.
2259
bf47e248
PA
22602015-08-06 Pedro Alves <palves@redhat.com>
2261
2262 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2263 reading beyond the passed in buffer length.
2264
b6b9ffcc
PL
22652015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2266
2267 * tracepoint.c (symbol_list) <required>: Remove.
2268
863d01bd
PA
22692015-08-06 Pedro Alves <palves@redhat.com>
2270
2271 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2272 count if stopping and suspending threads.
2273 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2274 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2275 (linux_detach): Complete an ongoing step-over.
2276 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2277 throughout.
2278 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2279 (linux_wait_1): If passing a signal to the inferior after
2280 finishing a step-over, unsuspend and re-resume all lwps. If we
2281 see a single-step event but the thread should be continuing, don't
2282 pass the trap to gdb.
2283 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2284 internal_error instead of gdb_assert.
2285 (enqueue_pending_signal): New function.
2286 (check_ptrace_stopped_lwp_gone): Add debug output.
2287 (start_step_over): Use internal_error instead of gdb_assert.
2288 (complete_ongoing_step_over): New function.
2289 (linux_resume_one_thread): Don't resume a suspended thread.
2290 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2291 it stepping.
2292
00db26fa
PA
22932015-08-06 Pedro Alves <palves@redhat.com>
2294
2295 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2296 (linux_thread_alive): Use lwp_is_marked_dead.
2297 (extended_event_reported): Delete.
2298 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2299 instead of extended_event_reported.
2300 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2301 as well.
2302 (lwp_is_marked_dead): New function.
2303 (lwp_running): Use lwp_is_marked_dead.
2304 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2305 comment.
2306
ad071a30
PA
23072015-08-06 Pedro Alves <palves@redhat.com>
2308
2309 * linux-low.c (linux_wait_1): Move fork event output out of the
2310 !report_to_gdb check. Pass event_child->waitstatus to
2311 target_waitstatus_to_string instead of ourstatus.
2312
524b57e6
YQ
23132015-08-04 Yao Qi <yao.qi@linaro.org>
2314
2315 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2316 if current_thread is 32 bit.
2317
6085d6f6
YQ
23182015-08-04 Yao Qi <yao.qi@linaro.org>
2319
2320 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2321 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2322 * server.c (extended_protocol): Remove "static".
2323 * server.h (extended_protocol): Declare it.
2324
8a7e4587
YQ
23252015-08-04 Yao Qi <yao.qi@linaro.org>
2326
2327 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2328 both aarch64 and aarch32.
2329 (aarch64_set_pc): Likewise.
2330
3b53ae99
YQ
23312015-08-04 Yao Qi <yao.qi@linaro.org>
2332
2333 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2334 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2335 arm-with-neon.xml to srv_xmlfiles.
2336 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2337 (is_64bit_tdesc): New function.
2338 (aarch64_linux_read_description): New function.
2339 (aarch64_arch_setup): Call aarch64_linux_read_description.
2340 (regs_info): Rename to regs_info_aarch64.
2341 (aarch64_regs_info): Return right regs_info.
2342 (initialize_low_arch): Call initialize_low_arch_aarch32.
2343
bd9e6534
YQ
23442015-08-04 Yao Qi <yao.qi@linaro.org>
2345
2346 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2347 * linux-aarch32-low.c: New file.
2348 * linux-aarch32-low.h: New file.
2349 * linux-arm-low.c (arm_fill_gregset): Move it to
2350 linux-aarch32-low.c.
2351 (arm_store_gregset): Likewise.
2352 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2353 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2354 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2355 (regs_info): Rename to regs_info_arm.
2356 (arm_regs_info): Return regs_info_aarch32 if
2357 have_ptrace_getregset is 1 and target description is
2358 arm_with_neon or arm_with_vfpv3.
2359 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2360 Call initialize_low_arch_aarch32 instead.
2361
ded48a5e
YQ
23622015-08-04 Yao Qi <yao.qi@linaro.org>
2363
2364 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2365 * linux-low.c: ... here.
2366 * linux-low.h (have_ptrace_getregset): Declare it.
2367
96e9210f
PA
23682015-08-04 Pedro Alves <palves@redhat.com>
2369
2370 * thread-db.c (struct thread_db): Use new typedefs.
2371 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2372 CHK calls.
2373 (disable_thread_event_reporting): Cast result of dlsym to
2374 destination function pointer type.
2375 (thread_db_mourn): Use td_ta_delete_ftype.
2376
af60a1ef
SL
23772015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2378
2379 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2380 arch variant.
2381 (CDX_BREAKPOINT): Define for R2.
2382 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2383 (the_low_target): Add comments.
2384
e8b41681
YQ
23852015-07-30 Yao Qi <yao.qi@linaro.org>
2386
2387 * linux-arm-low.c (arm_hwcap): Remove it.
2388 (arm_read_description): New local variable arm_hwcap. Don't
2389 set arm_hwcap to zero.
2390
89abb039
YQ
23912015-07-30 Yao Qi <yao.qi@linaro.org>
2392
2393 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2394 Use regcache->tdesc instead.
2395 (arm_store_wmmxregset): Likewise.
2396 (arm_fill_vfpregset): Likewise.
2397 (arm_store_vfpregset): Likewise.
2398
deca266c
YQ
23992015-07-30 Yao Qi <yao.qi@linaro.org>
2400
2401 * linux-arm-low.c: Include arch/arm.h.
2402 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2403 (arm_store_gregset): Likewise.
2404
aa58a496
SM
24052015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2406
2407 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2408 ptrace's 4th parameter.
2409
50904b25
YQ
24102015-07-27 Yao Qi <yao.qi@linaro.org>
2411
2412 * configure.srv (case aarch64*-*-linux*): Don't set
2413 srv_linux_usrregs.
2414
5826e159
PA
24152015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2416
2417 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2418 sys/ptrace.h.
2419 * linux-arm-low.c: Likewise.
2420 * linux-cris-low.c: Likewise.
2421 * linux-crisv32-low.c: Likewise.
2422 * linux-low.c: Likewise.
2423 * linux-m68k-low.c: Likewise.
2424 * linux-mips-low.c: Likewise.
2425 * linux-nios2-low.c: Likewise.
2426 * linux-s390-low.c: Likewise.
2427 * linux-sparc-low.c: Likewise.
2428 * linux-tic6x-low.c: Likewise.
2429 * linux-tile-low.c: Likewise.
2430 * linux-x86-low.c: Likewise.
2431
54019719
PA
24322015-07-24 Pedro Alves <palves@redhat.com>
2433
2434 * config.in: Regenerate.
2435 * configure: Regenerate.
2436
eb7aa561
PA
24372015-07-24 Pedro Alves <palves@redhat.com>
2438
2439 * acinclude.m4: Include ../ptrace.m4.
2440 * configure.ac: Call GDB_AC_PTRACE.
2441 * config.in, configure: Regenerate.
2442
55d7b841
YQ
24432015-07-24 Yao Qi <yao.qi@linaro.org>
2444
2445 * linux-low.c (linux_create_inferior): Remove setting to
2446 proc->priv->new_inferior.
2447 (linux_attach): Likewise.
2448 (linux_low_filter_event): Likewise.
2449 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2450
c06cbd92
YQ
24512015-07-24 Yao Qi <yao.qi@linaro.org>
2452
2453 * linux-low.c (linux_arch_setup): New function.
2454 (linux_low_filter_event): If proc->tdesc is NULL and
2455 proc->attached is true, call the_low_target.arch_setup.
2456 Otherwise, keep status pending, and return.
2457 (linux_resume_one_lwp_throw): Don't call get_pc if
2458 thread->while_stepping isn't NULL. Don't call
2459 get_thread_regcache if proc->tdesc is NULL.
2460 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2461 (linux_target_ops): Install arch_setup.
2462 * server.c (start_inferior): Call the_target->arch_setup.
2463 * target.h (struct target_ops) <arch_setup>: New field.
2464 (target_arch_setup): New marco.
2465 * lynx-low.c (lynx_target_ops): Update.
2466 * nto-low.c (nto_target_ops): Update.
2467 * spu-low.c (spu_target_ops): Update.
2468 * win32-low.c (win32_target_ops): Update.
2469
5ae3ebba
YQ
24702015-07-24 Yao Qi <yao.qi@linaro.org>
2471
2472 * linux-low.c (linux_add_process): Don't set
2473 proc->priv->new_inferior.
2474 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2475 (linux_attach): Likewise.
2476
eb97750b
YQ
24772015-07-24 Yao Qi <yao.qi@linaro.org>
2478
2479 * server.c (start_inferior): Code refactor.
2480
51aee833
YQ
24812015-07-24 Yao Qi <yao.qi@linaro.org>
2482
2483 * server.c (process_serial_event): Set general_thread.
2484
af1b22f3
YQ
24852015-07-21 Yao Qi <yao.qi@linaro.org>
2486
2487 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2488 aarch64_linux_get_debug_reg_capacity.
2489
554717a3
YQ
24902015-07-17 Yao Qi <yao.qi@linaro.org>
2491
2492 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2493 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2494 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2495 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2496 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2497 (AARCH64_HWP_ALIGNMENT): Likewise.
2498 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2499 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2500 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2501 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2502 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2503 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2504 (struct aarch64_debug_reg_state): Likewise.
2505 (struct arch_lwp_info): Likewise.
2506 (aarch64_align_watchpoint): Likewise.
2507 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2508 (aarch64_watchpoint_length): Likewise.
2509 (aarch64_point_encode_ctrl_reg): Likewise
2510 (aarch64_point_is_aligned): Likewise.
2511 (aarch64_align_watchpoint): Likewise.
2512 (aarch64_linux_set_debug_regs):
2513 (aarch64_dr_state_insert_one_point): Likewise.
2514 (aarch64_dr_state_remove_one_point): Likewise.
2515 (aarch64_handle_breakpoint): Likewise.
2516 (aarch64_handle_aligned_watchpoint): Likewise.
2517 (aarch64_handle_unaligned_watchpoint): Likewise.
2518 (aarch64_handle_watchpoint): Likewise.
2519
c67ca4de
YQ
25202015-07-17 Yao Qi <yao.qi@linaro.org>
2521
2522 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2523 and don't aarch64_get_debug_reg_state. All callers update.
2524 (aarch64_handle_aligned_watchpoint): Likewise.
2525 (aarch64_handle_unaligned_watchpoint): Likewise.
2526 (aarch64_handle_watchpoint): Likewise.
2527 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2528 (aarch64_remove_point): Likewise.
2529
25abf979
YQ
25302015-07-17 Yao Qi <yao.qi@linaro.org>
2531
2532 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2533 debug_printf.
2534 (aarch64_handle_unaligned_watchpoint): Likewise.
2535
db1ff28b
JK
25362015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2537
2538 Revert the previous 3 commits:
2539 Move gdb_regex* to common/
2540 Move linux_find_memory_regions_full & co.
2541 gdbserver build-id attribute generator
2542
700ca40f
JK
25432015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2544 Jan Kratochvil <jan.kratochvil@redhat.com>
2545
2546 gdbserver build-id attribute generator.
2547 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2548 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2549 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2550 (find_phdr): New.
2551 (get_dynamic): Use find_pdhr to traverse program headers.
2552 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2553 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2554 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2555 (get_hex_build_id): New.
2556 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2557 to reply XML document.
2558
9904185c
JK
25592015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2560 Jan Kratochvil <jan.kratochvil@redhat.com>
2561
2562 * target.c: Include target/target-utils.h and fcntl.h.
2563 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2564 (target_fileio_read_stralloc): New functions.
2565
6e5b4429
JK
25662015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2567
2568 * Makefile.in (OBS): Add gdb_regex.o.
2569 (gdb_regex.o): New.
2570 * config.in: Rebuilt.
2571 * configure: Rebuilt.
2572
ddc98fbf
JK
25732015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2574 Jan Kratochvil <jan.kratochvil@redhat.com>
2575
2576 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2577 * Makefile.in (OBS): Add target-utils.o.
2578 (linux-maps.o, target-utils.o): New.
2579 * configure.srv (srv_linux_obj): Add linux-maps.o.
2580
e57bb7a0
PL
25812015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2582
2583 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2584 function, return 1.
2585 (the_low_target): Install it.
2586
586b02a9
PA
25872015-07-14 Pedro Alves <palves@redhat.com>
2588
2589 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2590 Instead, ignore ECHILD, and throw an error for other errnos.
2591
58c1b36c
PA
25922015-07-10 Pedro Alves <palves@redhat.com>
2593
2594 * event-loop.c (struct callback_event) <data>: Change type to
2595 gdb_client_data instance instead of gdb_client_data pointer.
2596 (append_callback_event): Adjust.
2597
421530db
PL
25982015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2599
2600 * linux-aarch64-low.c: Add comments for each linux_target_ops
2601 method. Remove comments already covered in target_ops and
2602 linux_target_ops definitions.
2603 (the_low_target): Add comments for each unimplemented method.
2604
c2d65f38
YQ
26052015-07-09 Yao Qi <yao.qi@linaro.org>
2606
2607 * linux-aarch64-low.c (aarch64_regmap): Remove.
2608 (aarch64_usrregs_info): Remove.
2609 (regs_info): Set field usrregs to NULL.
2610
b20a6524
MM
26112015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2612
2613 * linux-low.c: Include "rsp-low.h"
2614 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2615 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2616 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2617 (handle_btrace_enable_pt): New.
2618 (handle_btrace_general_set): Support "pt".
2619 (handle_btrace_conf_general_set): Support "pt:size".
2620
96c97461
PL
26212015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2622
2623 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2624 Z_PACKET_SW_BP.
2625
37d66942
PL
26262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2627
2628 * linux-aarch64-low.c: Remove comment about endianness.
2629 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2630 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2631 memcmp.
2632
dc06243f
GB
26332015-06-24 Gary Benson <gbenson@redhat.com>
2634
2635 * linux-i386-ipa.c (stdint.h): Do not include.
2636 * lynx-i386-low.c (stdint.h): Likewise.
2637 * lynx-ppc-low.c (stdint.h): Likewise.
2638 * mem-break.c (stdint.h): Likewise.
2639 * thread-db.c (stdint.h): Likewise.
2640 * tracepoint.c (stdint.h): Likewise.
2641 * win32-low.c (stdint.h): Likewise.
2642
124e13d9
SM
26432015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2644
2645 * server.c (write_qxfer_response): Update call to
2646 remote_escape_output.
2647
909c2cda
JK
26482015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2649 Jan Kratochvil <jan.kratochvil@redhat.com>
2650
2651 Merge multiple hex conversions.
2652 * gdbreplay.c (tohex): Rename to 'fromhex'.
2653 (logchar): Use fromhex.
2654
24c05f46
JK
26552015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2656
2657 * server.c (handle_qxfer_libraries): Set `version' attribute for
2658 <library-list>.
2659
14d2069a
GB
26602015-06-10 Gary Benson <gbenson@redhat.com>
2661
2662 * target.h (struct target_ops) <multifs_open>: New field.
2663 <multifs_unlink>: Likewise.
2664 <multifs_readlink>: Likewise.
2665 * linux-low.c (nat/linux-namespaces.h): New include.
2666 (linux_target_ops): Initialize the_target->multifs_open,
2667 the_target->multifs_unlink and the_target->multifs_readlink.
2668 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2669 * hostio.c (hostio_fs_pid): New static variable.
2670 (hostio_handle_new_gdb_connection): New function.
2671 (handle_setfs): Likewise.
2672 (handle_open): Use the_target->multifs_open as appropriate.
2673 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2674 (handle_readlink): Use the_target->multifs_readlink as
2675 appropriate.
2676 (handle_vFile): Handle vFile:setfs packets.
2677 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2678 after target_handle_new_gdb_connection.
2679
4b8b5e72
GB
26802015-06-10 Gary Benson <gbenson@redhat.com>
2681
2682 * configure.ac (AC_CHECK_FUNCS): Add setns.
2683 * config.in: Regenerate.
2684 * configure: Likewise.
2685 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2686 (linux-namespaces.o): New rule.
2687 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2688
3ac2e371
GB
26892015-06-09 Gary Benson <gbenson@redhat.com>
2690
2691 * hostio.c (handle_open): Process mode argument with
2692 fileio_to_host_mode.
2693
ca9b78ce
YQ
26942015-06-01 Yao Qi <yao.qi@linaro.org>
2695
2696 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2697 * linux-x86-low.c: Likewise.
2698
bfacd19d
DB
26992015-05-28 Don Breazeal <donb@codesourcery.com>
2700
2701 * linux-low.c (handle_extended_wait): Initialize
2702 thread_info.last_resume_kind for new fork children.
2703
452003ef
PA
27042015-05-15 Pedro Alves <palves@redhat.com>
2705
2706 * target.h (target_handle_new_gdb_connection): Rewrite using if
2707 wrapped in do/while.
2708
1041a03c
JB
27092015-05-14 Joel Brobecker <brobecker@adacore.com>
2710
2711 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2712 * configure, config.in: Regenerate.
2713 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2714 Declare typedef.
2715
c269dbdb
DB
27162015-05-12 Don Breazeal <donb@codesourcery.com>
2717
2718 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2719 PTRACE_EVENT_VFORK_DONE.
2720 (linux_low_ptrace_options, extended_event_reported): Add vfork
2721 events.
2722 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2723 and "vforkdone" for RSP 'T' Stop Reply Packet.
2724 * server.h (report_vfork_events): Declare
2725 global variable.
2726
3a8a0396
DB
27272015-05-12 Don Breazeal <donb@codesourcery.com>
2728
2729 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2730 (the_low_target) <new_fork>: Initialize new member.
2731 * linux-arm-low.c (arm_new_fork): New function.
2732 (the_low_target) <new_fork>: Initialize new member.
2733 * linux-low.c (handle_extended_wait): Call new target function
2734 new_fork.
2735 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2736 * linux-mips-low.c (mips_add_watchpoint): New function
2737 extracted from mips_insert_point.
2738 (the_low_target) <new_fork>: Initialize new member.
2739 (mips_linux_new_fork): New function.
2740 (mips_insert_point): Call mips_add_watchpoint.
2741 * linux-x86-low.c (x86_linux_new_fork): New function.
2742 (the_low_target) <new_fork>: Initialize new member.
2743
de0d863e
DB
27442015-05-12 Don Breazeal <donb@codesourcery.com>
2745
2746 * linux-low.c (handle_extended_wait): Implement return value,
2747 rename argument 'event_child' to 'event_lwp', handle
2748 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2749 (linux_low_ptrace_options): New function.
2750 (linux_low_filter_event): Call linux_low_ptrace_options,
2751 use different argument fo linux_enable_event_reporting,
2752 use return value from handle_extended_wait.
2753 (extended_event_reported): New function.
2754 (linux_wait_1): Call extended_event_reported and set
2755 status to report fork events.
2756 (linux_write_memory): Add pid to debug message.
2757 (reset_lwp_ptrace_options_callback): New function.
2758 (linux_handle_new_gdb_connection): New function.
2759 (linux_target_ops): Initialize new structure member.
2760 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2761 * lynx-low.c: Initialize new structure member.
2762 * remote-utils.c (prepare_resume_reply): Implement stop reason
2763 "fork" for "T" stop message.
2764 * server.c (handle_query): Call handle_new_gdb_connection.
2765 * server.h (report_fork_events): Declare global flag.
2766 * target.h (struct target_ops) <handle_new_gdb_connection>:
2767 New member.
2768 (target_handle_new_gdb_connection): New macro.
2769 * win32-low.c: Initialize new structure member.
2770
ddcbc397
DB
27712015-05-12 Don Breazeal <donb@codesourcery.com>
2772
2773 * mem-break.c (APPEND_TO_LIST): Define macro.
2774 (clone_agent_expr): New function.
2775 (clone_one_breakpoint): New function.
2776 (clone_all_breakpoints): New function.
2777 * mem-break.h: Declare new functions.
2778
89245bc0
DB
27792015-05-12 Don Breazeal <donb@codesourcery.com>
2780
2781 * linux-low.c (linux_supports_fork_events): New function.
2782 (linux_supports_vfork_events): New function.
2783 (linux_target_ops): Initialize new structure members.
2784 (initialize_low): Call linux_check_ptrace_features.
2785 * lynx-low.c (lynx_target_ops): Initialize new structure
2786 members.
2787 * server.c (report_fork_events, report_vfork_events):
2788 New global flags.
2789 (handle_query): Add new features to qSupported packet and
2790 response.
2791 (captured_main): Initialize new global variables.
2792 * target.h (struct target_ops) <supports_fork_events>:
2793 New member.
2794 <supports_vfork_events>: New member.
2795 (target_supports_fork_events): New macro.
2796 (target_supports_vfork_events): New macro.
2797 * win32-low.c (win32_target_ops): Initialize new structure
2798 members.
2799
835205d0
GB
28002015-05-12 Gary Benson <gbenson@redhat.com>
2801
2802 * server.c (handle_qxfer_exec_file): Use current process
2803 if annex is empty.
2804
21e94bd9
SL
28052015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2806
2807 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2808 Remove HAVE_PTRACE_GETREGS conditionals.
2809 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2810 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2811
45614f15
YQ
28122015-05-08 Yao Qi <yao.qi@linaro.org>
2813
2814 * linux-low.c (linux_supports_conditional_breakpoints): New
2815 function.
2816 (linux_target_ops): Install new target method.
2817 * lynx-low.c (lynx_target_ops): Install NULL hook for
2818 supports_conditional_breakpoints.
2819 * nto-low.c (nto_target_ops): Likewise.
2820 * spu-low.c (spu_target_ops): Likewise.
2821 * win32-low.c (win32_target_ops): Likewise.
2822 * server.c (handle_query): Check
2823 target_supports_conditional_breakpoints.
2824 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2825 New field.
2826 (target_supports_conditional_breakpoints): New macro.
2827
80ad801e
PA
28282015-05-06 Pedro Alves <palves@redhat.com>
2829
2830 PR server/18081
2831 * server.c (start_inferior): If the process exits, mourn it.
2832
819843c7
GB
28332015-04-21 Gary Benson <gbenson@redhat.com>
2834
2835 * hostio.c (fileio_open_flags_to_host): Factored out to
2836 fileio_to_host_openflags in common/fileio.c. Single use
2837 updated.
2838
a2d5a9d7
MF
28392015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2840
2841 * linux-xtensa-low.c (xtensa_fill_gregset)
2842 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2843 XCHAL_HAVE_LOOP.
2844
deb44829
MF
28452015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2846
2847 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2848 (regs_info): Replace usrregs pointer with NULL.
2849
e57f1de3
GB
28502015-04-17 Gary Benson <gbenson@redhat.com>
2851
2852 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2853 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2854 * server.c (handle_qxfer_exec_file): New function.
2855 (qxfer_packets): Add exec-file entry.
2856 (handle_query): Report qXfer:exec-file:read as supported packet.
2857
62828379
RN
28582015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2859
2860 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2861
b88bb450
GB
28622015-04-09 Gary Benson <gbenson@redhat.com>
2863
2864 * hostio-errno.c (errno_to_fileio_error): Remove function.
2865 Update caller to use remote_fileio_to_fio_error.
2866
c8f4bfdd
YQ
28672015-04-09 Yao Qi <yao.qi@linaro.org>
2868
2869 * linux-low.c (linux_insert_point): Call
2870 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2871 (linux_remove_point): Call remove_memory_breakpoint if type is
2872 raw_bkpt_type_sw.
2873 * linux-x86-low.c (x86_insert_point): Don't call
2874 insert_memory_breakpoint.
2875 (x86_remove_point): Don't call remove_memory_breakpoint.
2876
41f98f02
PA
28772015-04-01 Pedro Alves <palves@redhat.com>
2878 Cleber Rosa <crosa@redhat.com>
2879
2880 * server.c (gdbserver_usage): Reorganize and extend the usage
2881 message.
2882
2bf6fb9d
PA
28832015-03-24 Pedro Alves <palves@redhat.com>
2884
2885 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2886 output. Also dump TRAP_TRACE.
2887 (linux_low_filter_event): In debug output, distinguish a
2888 resume_stop SIGSTOP from a delayed SIGSTOP.
2889
369f6daa
GB
28902015-03-24 Gary Benson <gbenson@redhat.com>
2891
2892 * linux-x86-low.c (x86_linux_new_thread): Moved to
2893 nat/x86-linux.c.
2894 (x86_linux_prepare_to_resume): Likewise.
2895
8e5d4070
GB
28962015-03-24 Gary Benson <gbenson@redhat.com>
2897
2898 * Makefile.in (x86-linux-dregs.o): New rule.
2899 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2900 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2901 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2902 (x86_linux_dr_get): Likewise.
2903 (x86_linux_dr_set): Likewise.
2904 (update_debug_registers_callback): Likewise.
2905 (x86_linux_dr_set_addr): Likewise.
2906 (x86_linux_dr_get_addr): Likewise.
2907 (x86_linux_dr_set_control): Likewise.
2908 (x86_linux_dr_get_control): Likewise.
2909 (x86_linux_dr_get_status): Likewise.
2910 (x86_linux_update_debug_registers): Likewise.
2911
2b95d440
GB
29122015-03-24 Gary Benson <gbenson@redhat.com>
2913
2914 * linux-x86-low.c (x86_linux_update_debug_registers):
2915 New function, factored out from...
2916 (x86_linux_prepare_to_resume): ...this.
2917
14b0bc68
GB
29182015-03-24 Gary Benson <gbenson@redhat.com>
2919
2920 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2921 (x86_linux_dr_set): Likewise.
2922 (update_debug_registers_callback): Likewise.
2923 (x86_linux_dr_set_addr): Likewise.
2924 (x86_linux_dr_get_addr): Likewise.
2925 (x86_linux_dr_set_control): Likewise.
2926 (x86_linux_dr_get_control): Likewise.
2927 (x86_linux_dr_get_status): Likewise.
2928 (x86_linux_prepare_to_resume): Likewise.
2929
5dfe6ca8
GB
29302015-03-24 Gary Benson <gbenson@redhat.com>
2931
2932 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2933 Use perror_with_name. Pass string through gettext.
2934 (x86_linux_dr_set): Likewise.
2935
d33472ad
GB
29362015-03-24 Gary Benson <gbenson@redhat.com>
2937
2938 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2939 (x86_linux_dr_set_addr): ...this.
2940 (x86_dr_low_get_addr): Rename to...
2941 (x86_linux_dr_get_addr): ...this.
2942 (x86_dr_low_set_control): Rename to...
2943 (x86_linux_dr_set_control): ...this.
2944 (x86_dr_low_get_control): Rename to...
2945 (x86_linux_dr_get_control): ...this.
2946 (x86_dr_low_get_status): Rename to...
2947 (x86_linux_dr_get_status): ...this.
2948 (x86_dr_low): Update with new function names.
2949
4b134ca1
GB
29502015-03-24 Gary Benson <gbenson@redhat.com>
2951
2952 * Makefile.in (x86-linux.o): New rule.
2953 * configure.srv: Add x86-linux.o to relevant targets.
2954 * linux-low.c (lwp_set_arch_private_info): New function.
2955 (lwp_arch_private_info): Likewise.
2956 * linux-x86-low.c: Include nat/x86-linux.h.
2957 (arch_lwp_info): Removed structure.
2958 (update_debug_registers_callback):
2959 Use lwp_set_debug_registers_changed.
2960 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2961 and lwp_set_debug_registers_changed.
2962 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2963
34c703da
GB
29642015-03-24 Gary Benson <gbenson@redhat.com>
2965
2966 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2967 * linux-arm-low.c (arm_new_thread): Likewise.
2968 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2969 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2970 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2971 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2972
cff068da
GB
29732015-03-24 Gary Benson <gbenson@redhat.com>
2974
2975 * linux-low.c (ptid_of_lwp): New function.
2976 (lwp_is_stopped): Likewise.
2977 (lwp_stop_reason): Likewise.
2978 * linux-x86-low.c (update_debug_registers_callback):
2979 Use lwp_is_stopped.
2980 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2981 lwp_stop_reason.
2982
b2f7c7e8
GB
29832015-03-24 Gary Benson <gbenson@redhat.com>
2984
2985 * linux-low.h (linux_stop_lwp): Remove declaration.
2986
6d4ee8c6
GB
29872015-03-24 Gary Benson <gbenson@redhat.com>
2988
2989 * linux-low.h: Include nat/linux-nat.h.
2990 * linux-low.c (iterate_over_lwps_args): New structure.
2991 (iterate_over_lwps_filter): New function.
2992 (iterate_over_lwps): Likewise.
2993 * linux-x86-low.c (update_debug_registers_callback):
2994 Update signature to what iterate_over_lwps expects.
2995 Remove PID check that iterate_over_lwps now performs.
2996 (x86_dr_low_set_addr): Use iterate_over_lwps.
2997 (x86_dr_low_set_control): Likewise.
2998
70a0bb6b
GB
29992015-03-24 Gary Benson <gbenson@redhat.com>
3000
3001 * linux-x86-low.c (x86_debug_reg_state): New function.
3002 (x86_linux_prepare_to_resume): Use the above.
3003
7b669087
GB
30042015-03-24 Gary Benson <gbenson@redhat.com>
3005
3006 * linux-low.c (current_lwp_ptid): New function.
3007 * linux-x86-low.c: Include nat/linux-nat.h.
3008 (x86_dr_low_get_addr): Use current_lwp_ptid.
3009 (x86_dr_low_get_control): Likewise.
3010 (x86_dr_low_get_status): Likewise.
3011
eef49a3d
PA
30122015-03-20 Pedro Alves <palves@redhat.com>
3013
3014 * tracepoint.c (cmd_qtstatus): Make "str" const.
3015
b2333d22
PA
30162015-03-20 Pedro Alves <palves@redhat.com>
3017
3018 * server.c (handle_general_set): Make "req_str" const.
3019
23f238d3
PA
30202015-03-19 Pedro Alves <palves@redhat.com>
3021
3022 * linux-low.c (linux_resume_one_lwp): Rename to ...
3023 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3024 instead call perror_with_name.
3025 (check_ptrace_stopped_lwp_gone): New function.
3026 (linux_resume_one_lwp): Reimplement as wrapper around
3027 linux_resume_one_lwp_throw that swallows errors if the LWP is
3028 gone.
3029
91baf43f
PA
30302015-03-19 Pedro Alves <palves@redhat.com>
3031
3032 * linux-low.c (count_events_callback, select_event_lwp_callback):
3033 No longer check whether the thread has resume_stop as last resume
3034 kind.
3035
8bf3b159
PA
30362015-03-19 Pedro Alves <palves@redhat.com>
3037
3038 * linux-low.c (count_events_callback, select_event_lwp_callback):
3039 Use the lwp's status_pending_p field, not the thread's.
3040
b90fc188
PA
30412015-03-19 Pedro Alves <palves@redhat.com>
3042
3043 * linux-low.c (select_event_lwp_callback): Update comments to
3044 no longer mention SIGTRAP.
3045
464b0089
GB
30462015-03-18 Gary Benson <gbenson@redhat.com>
3047
3048 * server.c (handle_query): Do not report vFile:fstat as supported.
3049
aa9e327f
GB
30502015-03-11 Gary Benson <gbenson@redhat.com>
3051
3052 * hostio.c (sys/types.h): New include.
3053 (sys/stat.h): Likewise.
3054 (common-remote-fileio.h): Likewise.
3055 (handle_fstat): New function.
3056 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3057
791c0056
GB
30582015-03-11 Gary Benson <gbenson@redhat.com>
3059
3060 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3061 struct stat.st_blocks and struct stat.st_blksize.
3062 * configure: Regenerate.
3063 * config.in: Likewise.
3064 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3065 (OBS): Add common-remote-fileio.o.
3066 (common-remote-fileio.o): New rule.
3067
9a9df970
PA
30682015-03-09 Pedro Alves <palves@redhat.com>
3069
3070 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3071 'struct sockaddr' pointer in 'accept' call.
3072
9eb1356e
PA
30732015-03-09 Pedro Alves <palves@redhat.com>
3074
3075 Revert:
3076 2015-03-07 Pedro Alves <palves@redhat.com>
3077 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3078 or <winsock2.h> here. Instead include "gdb_socket.h".
3079 (remote_open): Use union gdb_sockaddr_u.
3080 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3081 or <winsock2.h> here. Instead include "gdb_socket.h".
3082 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3083 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3084 or <sys/un.h>.
3085 (init_named_socket, gdb_agent_helper_thread): Use union
3086 gdb_sockaddr_u.
3087
aac331e4
PA
30882015-03-07 Pedro Alves <palves@redhat.com>
3089
3090 * configure.ac (build_warnings): Move
3091 -Wdeclaration-after-statement to the C-specific set.
3092 * configure: Regenerate.
3093
366c75fc
PA
30942015-03-07 Pedro Alves <palves@redhat.com>
3095
3096 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3097 or <winsock2.h> here. Instead include "gdb_socket.h".
3098 (remote_open): Use union gdb_sockaddr_u.
3099 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3100 or <winsock2.h> here. Instead include "gdb_socket.h".
3101 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3102 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3103 or <sys/un.h>.
3104 (init_named_socket, gdb_agent_helper_thread): Use union
3105 gdb_sockaddr_u.
3106
492d29ea
PA
31072015-03-07 Pedro Alves <palves@redhat.com>
3108
3109 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3110 instead.
3111
60a191ed
YQ
31122015-03-06 Yao Qi <yao.qi@linaro.org>
3113
3114 * linux-aarch64-low.c (aarch64_insert_point): Use
3115 show_debug_regs as a boolean.
3116 (aarch64_remove_point): Likewise.
3117
f5771b1d
PA
31182015-03-05 Pedro Alves <palves@redhat.com>
3119
3120 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3121 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3122 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3123 * nto-low.c (nto_target_ops): Likewise.
3124 * spu-low.c (spu_target_ops): Likewise.
3125 * win32-low.c (win32_target_ops): Likewise.
3126
3e572f71
PA
31272015-03-04 Pedro Alves <palves@redhat.com>
3128
72f4393d 3129 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3130 Decide whether a breakpoint triggered based on the SIGTRAP's
3131 siginfo.si_code.
72f4393d
L
3132 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3133 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3134 (linux_low_filter_event): Check for breakpoints before checking
3135 watchpoints.
3136 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3137 siginfo.si_code.
72f4393d
L
3138 (linux_stopped_by_sw_breakpoint)
3139 (linux_supports_stopped_by_sw_breakpoint)
3140 (linux_stopped_by_hw_breakpoint)
3141 (linux_supports_stopped_by_hw_breakpoint): New functions.
3142 (linux_target_ops): Install new target methods.
3e572f71 3143
1ec68e26
PA
31442015-03-04 Pedro Alves <palves@redhat.com>
3145
3146 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3147 * server.c (swbreak_feature, hwbreak_feature): New globals.
3148 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3149 (captured_main): Clear swbreak_feature and hwbreak_feature.
3150 * server.h (swbreak_feature, hwbreak_feature): Declare.
3151 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3152 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3153 supports_stopped_by_hw_breakpoint>: New fields.
3154 (target_supports_stopped_by_sw_breakpoint)
3155 (target_stopped_by_sw_breakpoint)
3156 (target_supports_stopped_by_hw_breakpoint)
3157 (target_stopped_by_hw_breakpoint): Declare.
3158
15c66dd6
PA
31592015-03-04 Pedro Alves <palves@redhat.com>
3160
3161 enum lwp_stop_reason -> enum target_stop_reason
3162 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3163 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3164 (linux_wait_1, stuck_in_jump_pad_callback)
3165 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3166 (linux_stopped_by_watchpoint):
3167 * linux-low.h (enum lwp_stop_reason): Delete.
3168 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3169 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3170
98fc70d6
YQ
31712015-03-04 Yao Qi <yao.qi@linaro.org>
3172
3173 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3174
dd2ac174
GB
31752015-03-03 Gary Benson <gbenson@redhat.com>
3176
3177 * hostio.c (handle_vFile): Fix prefix lengths.
3178
d68e53f4
MM
31792015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3180
3181 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3182 ptr_bits.
3183
bf2d68ab
AA
31842015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3185
3186 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3187 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3188 (clean): Add "rm -f" for above C files.
3189 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3190 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3191 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3192 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3193 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3194 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3195 (init_registers_s390x_vx_linux64)
3196 (init_registers_s390x_tevx_linux64)
3197 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3198 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3199 declarations.
3200 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3201 (s390_store_vxrs_high): New functions.
3202 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3203 NT_S390_VXRS_HIGH.
3204 (s390_arch_setup): Add logic for selecting one of the new target
3205 descriptions. Activate the new vector regsets if applicable.
3206 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3207 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3208 and init_registers_s390x_tevx_linux64.
3209
c966a859
PA
32102015-03-01 Pedro Alves <palves@redhat.com>
3211
3212 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3213 parameter.
3214
4180215b
PA
32152015-02-27 Pedro Alves <palves@redhat.com>
3216
3217 * linux-x86-low.c (u_debugreg_offset): New function.
3218 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3219
749bab01
PA
32202015-02-27 Pedro Alves <palves@redhat.com>
3221
3222 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3223 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3224 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3225 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3226 (ps_lsetfpregs, ps_getpid)
3227 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3228 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3229 (ps_lsetxregs, ps_plog): Declare.
3230
3c14e5a3
PA
32312015-02-27 Pedro Alves <palves@redhat.com>
3232
3233 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3234 IP_AGENT_EXPORT_FUNC.
3235 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3236 IP_AGENT_EXPORT_FUNC.
3237 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3238 (IP_AGENT_EXPORT): Delete.
3239 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3240 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3241 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3242 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3243 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3244 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3245 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3246 (traceframe_read_count, traceframe_write_count)
3247 (traceframes_created, trace_state_variables, get_raw_reg)
3248 (get_trace_state_variable_value, set_trace_state_variable_value)
3249 (ust_loaded, helper_thread_id, cmd_buf): Use
3250 IPA_SYM_EXPORTED_NAME.
3251 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3252 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3253 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3254 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3255 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3256 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3257 EXTERN_C_PUSH/EXTERN_C_POP.
3258 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3259 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3260 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3261 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3262 (traceframe_write_count, traceframe_read_count)
3263 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3264 (about_to_request_buffer_space, get_trace_state_variable_value)
3265 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3266 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3267 EXTERN_C_PUSH/EXTERN_C_POP.
3268 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3269 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3270 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3271 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3272 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3273 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3274 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3275 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3276 Define.
3277 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3278 (IP_AGENT_EXPORT_VAR_DECL): Define.
3279 (tracing): Declare.
3280 (gdb_agent_get_raw_reg): Declare.
3281
fe978cb0
PA
32822015-02-27 Tom Tromey <tromey@redhat.com>
3283 Pedro Alves <palves@redhat.com>
3284
3285 Rename symbols whose names are reserved C++ keywords throughout.
3286
3bc3d82a
PA
32872015-02-27 Pedro Alves <palves@redhat.com>
3288
3289 * Makefile.in (COMPILER): New, get it from autoconf.
3290 (CXX): Get from autoconf instead.
3291 (COMPILE.pre): Use COMPILER.
3292 (CC-LD): Rename to ...
3293 (CC_LD): ... this. Use COMPILER.
3294 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3295 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3296 * acinclude.m4: Include build-with-cxx.m4.
3297 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3298 Disable -Werror by default if building in C++ mode.
3299 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3300 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3301 the C++ compiler. Save/restore CXXFLAGS too.
3302 * configure: Regenerate.
3303
07697489
PA
33042015-02-27 Pedro Alves <palves@redhat.com>
3305
3306 * acinclude.m4: Include libiberty.m4.
3307 * configure.ac: Call libiberty_INIT.
3308 * config.in, configure: Regenerate.
3309
9beb7c4e
PA
33102015-02-26 Pedro Alves <palves@redhat.com>
3311
3312 * linux-low.c (linux_wait_1): When incrementing the PC past a
3313 program breakpoint always use the_low_target.breakpoint_len as
3314 increment, rather than the maximum between that and
3315 the_low_target.decr_pc_after_break.
3316
8090aef2
PA
33172015-02-23 Pedro Alves <palves@redhat.com>
3318
3319 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3320 thread was doing a step-over; always adjust the PC if
3321 we stepped over a permanent breakpoint.
3322 (linux_wait_1): If we stepped over breakpoint that was on top of a
3323 permanent breakpoint, manually advance the PC past it.
3324
bc9540e8
PA
33252015-02-23 Pedro Alves <palves@redhat.com>
3326
3327 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3328 modes.
3329 (x86_fill_gregset, x86_store_gregset): Use it when handling
3330 $orig_eax.
3331
2db9a427
PA
33322015-02-20 Pedro Alves <palves@redhat.com>
3333
3334 * thread-db.c: Include "nat/linux-procfs.h".
3335 (thread_db_init): Skip listing new threads if the kernel supports
3336 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3337
afa8d396
PA
33382015-02-20 Pedro Alves <palves@redhat.com>
3339
3340 * linux-low.c (status_pending_p_callback): Use ptid_match.
3341
c9587f88
AT
33422015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3343
3344 PR breakpoints/16812
3345 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3346 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3347 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3348
b05ec7a5
AT
33492015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3350
3351 PR breakpoints/15956
3352 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3353
d33501a5
MM
33542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3355
3356 * linux-low.c (linux_low_btrace_conf): Print size.
3357 * server.c (handle_btrace_conf_general_set): New.
3358 (hanle_general_set): Call handle_btrace_conf_general_set.
3359 (handle_query): Report Qbtrace-conf:bts:size as supported.
3360
f4abbc16
MM
33612015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3362
3363 * linux-low.c (linux_low_enable_btrace): Update parameters.
3364 (linux_low_btrace_conf): New.
3365 (linux_target_ops)<to_btrace_conf>: Initialize.
3366 * server.c (current_btrace_conf): New.
3367 (handle_btrace_enable): Rename to ...
3368 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3369 to target_enable_btrace. Update comment. Update users.
3370 (handle_qxfer_btrace_conf): New.
3371 (qxfer_packets): Add btrace-conf entry.
3372 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3373 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3374 (target_ops)<read_btrace_conf>: New.
3375 (target_enable_btrace): Update parameters.
3376 (target_read_btrace_conf): New.
3377
043c3577
MM
33782015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3379
3380 * server.c (handle_btrace_general_set): Remove call to
3381 target_supports_btrace.
3382 (supported_btrace_packets): New.
3383 (handle_query): Call supported_btrace_packets.
3384 * target.h: include btrace-common.h.
3385 (btrace_target_info): Removed.
3386 (supports_btrace, target_supports_btrace): Update parameters.
3387
734b0e4b
MM
33882015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3389
3390 * Makefile.in (SFILES): Add common/btrace-common.c.
3391 (OBS): Add common/btrace-common.o.
3392 (btrace-common.o): Add build rules.
3393 * linux-low: Include btrace-common.h.
3394 (linux_low_read_btrace): Use struct btrace_data. Call
3395 btrace_data_init and btrace_data_fini.
3396
d6c146e9
PA
33972015-02-06 Pedro Alves <palves@redhat.com>
3398
3399 * thread-db.c (find_new_threads_callback): Add debug output.
3400
20ba1ce6
PA
34012015-02-04 Pedro Alves <palves@redhat.com>
3402
3403 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3404 (resume_stopped_resumed_lwps): New function.
3405 (linux_wait_for_event_filtered): Use it.
3406
8cc73a39
SDJ
34072015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3408
3409 * Makefile.in (SFILES): Add linux-personality.c.
3410 (linux-personality.o): New rule.
3411 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3412 list of objects to be built.
3413 * linux-low.c: Include nat/linux-personality.h.
3414 (linux_create_inferior): Remove code to disable address space
3415 randomization (moved to ../nat/linux-personality.c). Create
3416 cleanup to disable address space randomization.
3417
fb23d554
SDJ
34182015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3419
3420 * Makefile.in (posix-strerror.o): New rule.
3421 (mingw-strerror.o): Likewise.
3422 * configure: Regenerated.
3423 * configure.ac: Source file ../common/common.host. Initialize new
3424 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3425
cdf43629
YQ
34262015-01-14 Yao Qi <yao@codesourcery.com>
3427
3428 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3429 (ppc-linux.o): New rule.
3430 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3431 * configure.ac: AC_CHECK_FUNCS(getauxval).
3432 * config.in: Re-generated.
3433 * configure: Re-generated.
3434 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3435 ppc64_64bit_inferior_p
3436
514c5338
YQ
34372015-01-14 Yao Qi <yao@codesourcery.com>
3438
3439 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3440 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3441 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3442 (PT_ORIG_R3, PT_TRAP): Likewise.
3443 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3444 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3445 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3446
3368c1e5
JB
34472015-01-10 Joel Brobecker <brobecker@adacore.com>
3448
3449 * i387-fp.c (i387_cache_to_xsave): In look over
3450 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3451 zmmh_low_space field by use of zmmh_high_space.
3452
582511be
PA
34532015-01-09 Pedro Alves <palves@redhat.com>
3454
3455 * linux-low.c (step_over_bkpt): Move higher up in the file.
3456 (handle_extended_wait): Don't store the stop_pc here.
3457 (get_stop_pc): Adjust comments and rename to ...
3458 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3459 stopped for a software breakpoint or hardware breakpoint.
3460 (thread_still_has_status_pending_p): New function.
3461 (status_pending_p_callback): Use
3462 thread_still_has_status_pending_p. If the event is no longer
3463 interesting, resume the LWP.
3464 (handle_tracepoints): Add assert.
3465 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3466 (wstatus_maybe_breakpoint): New function.
3467 (cancel_breakpoint): Delete function.
3468 (check_stopped_by_watchpoint): New function, factored out from
3469 linux_low_filter_event.
3470 (lp_status_maybe_breakpoint): Delete function.
3471 (linux_low_filter_event): Remove filter_ptid argument.
3472 Leave thread group exits pending here. Store the LWP's stop PC.
3473 Always leave events pending.
3474 (linux_wait_for_event_filtered): Pull all events out of the
3475 kernel, and leave them all pending.
3476 (count_events_callback, select_event_lwp_callback): Consider all
3477 events.
3478 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3479 (select_event_lwp): Only give preference to the stepping LWP in
3480 all-stop mode. Adjust comments.
3481 (ignore_event): New function.
3482 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3483 references to cancel_breakpoints. Adjust to renames. Also give
3484 equal priority to all LWPs that have had events in non-stop mode.
3485 If reporting a software breakpoint event, unadjust the LWP's PC.
3486 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3487 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3488 Adjust.
3489 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3490 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3491 (linux_stopped_by_watchpoint): Adjust.
3492 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3493 * linux-low.h (enum lwp_stop_reason): New.
3494 (struct lwp_info) <stop_pc>: Adjust comment.
3495 <stopped_by_watchpoint>: Delete field.
3496 <stop_reason>: New field.
3497 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3498 * mem-break.c (software_breakpoint_inserted_here)
3499 (hardware_breakpoint_inserted_here): New function.
3500 * mem-break.h (software_breakpoint_inserted_here)
3501 (hardware_breakpoint_inserted_here): Declare.
3502 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3503 (cancel_breakpoints): Delete.
3504 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3505 (upload_fast_traceframes): Remove references to
3506 cancel_breakpoints.
3507
a33e3959
PA
35082015-01-09 Pedro Alves <palves@redhat.com>
3509
3510 * thread-db.c (find_new_threads_callback): Ignore thread if the
3511 kernel thread ID is -1.
3512
8784d563
PA
35132015-01-09 Pedro Alves <palves@redhat.com>
3514
3515 * linux-low.c (linux_attach_fail_reason_string): Move to
3516 nat/linux-ptrace.c, and rename.
3517 (linux_attach_lwp): Update comment.
3518 (attach_proc_task_lwp_callback): New function.
3519 (linux_attach): Adjust to rename and use
3520 linux_proc_attach_tgid_threads.
3521 (linux_attach_fail_reason_string): Delete declaration.
3522
76f2b779
JB
35232015-01-01 Joel Brobecker <brobecker@adacore.com>
3524
3525 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3526 * server.c (gdbserver_version): Likewise.
3527
fafcc06a
SDJ
35282014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3529
3530 * remote-utils.c: Include ctype.h.
3531 (input_interrupt): Explicitly handle the case when the char
3532 received is the NUL byte. Improve the printing of non-ASCII
3533 characters.
3534
beed38b8
JB
35352014-12-16 Joel Brobecker <brobecker@adacore.com>
3536
3537 * linux-low.c (linux_low_filter_event): Update call to
3538 linux_enable_event_reporting following the addition of
3539 a new parameter to that function.
3540
bf330350
CU
35412014-12-16 Catalin Udma <catalin.udma@freescale.com>
3542
3543 PR server/17457
3544 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3545 (AARCH64_FPCR_REGNO): Likewise.
3546 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3547 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3548 (aarch64_store_fpregset): Likewise.
3549
5227d625
JB
35502014-12-15 Joel Brobecker <brobecker@adacore.com>
3551
3552 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3553 Remove FIXME comment about assumption about N.
3554
f93b65a0
JB
35552014-12-13 Joel Brobecker <brobecker@adacore.com>
3556
3557 * configure.ac: If large-file support is disabled in GDBserver,
3558 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3559 * configure: Regenerate.
3560
e5a9158d
AA
35612014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3562
3563 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3564 warning upon ENODATA from ptrace.
3565 * linux-s390-low.c (s390_store_tdb): New.
3566 (s390_regsets): Add regset for NT_S390_TDB.
3567
feea5f36
AA
35682014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3569
3570 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3571 without a fill_function.
3572 * linux-s390-low.c (s390_fill_last_break): Remove.
3573 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3574 (s390_arch_setup): Use regset's size instead of fill_function for
3575 loop end condition.
3576
098dbe61
AA
35772014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3578
3579 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3580 the regset's store function when ptrace returned an error.
3581 * regcache.c (get_thread_regcache): Invalidate register cache
3582 before fetching inferior's registers.
3583
28eef672
AA
35842014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3585
3586 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3587 while-loop as for-loop.
3588 (regsets_store_inferior_registers): Likewise.
3589
bdca27a2
YQ
35902014-11-28 Yao Qi <yao@codesourcery.com>
3591
3592 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3593 * config.in, configure: Re-generate.
3594 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3595 is defined.
3596
9c232dda
YQ
35972014-11-21 Yao Qi <yao@codesourcery.com>
3598
3599 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3600 (AC_CHECK_HEADERS): Remove malloc.h.
3601 * configure: Re-generated.
3602 * config.in: Re-generated.
3603 * server.h: Don't include alloca.h and malloc.h.
3604 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3605 Don't include malloc.h.
3606
43968415
JB
36072014-11-17 Joel Brobecker <brobecker@adacore.com>
3608
3609 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3610 corresponding ERRNO check in same block.
3611
40e91bc7
PA
36122014-11-12 Pedro Alves <palves@redhat.com>
3613
3614 * server.c (cont_thread): Update comment.
3615 (start_inferior, attach_inferior): No longer clear cont_thread.
3616 (handle_v_cont): No longer set cont_thread.
3617 (captured_main): Clear cont_thread each time a GDB connects.
3618
c2c118cf
PA
36192014-11-12 Pedro Alves <palves@redhat.com>
3620
3621 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3622 thread, and don't resume all threads if the Hc thread has exited.
3623
78708b7c
PA
36242014-11-12 Pedro Alves <palves@redhat.com>
3625
3626 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3627 the process group instead of to a specific LWP.
3628
a2abc7de
PA
36292014-10-15 Pedro Alves <palves@redhat.com>
3630
3631 PR server/17487
3632 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3633 parameter.
3634 (arm_set_thread_context): Delete.
3635 (the_low_target): Adjust.
3636 * win32-i386-low.c (debug_registers_changed)
3637 (debug_registers_used): Delete.
3638 (update_debug_registers_callback): New function.
3639 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3640 needing to update their debug registers.
3641 (win32_get_current_dr): New function.
3642 (x86_dr_low_get_addr, x86_dr_low_get_control)
3643 (x86_dr_low_get_status): Fetch the debug register from the thread
3644 record's context.
3645 (i386_initial_stuff): Adjust.
3646 (i386_get_thread_context): Remove current_event parameter. Don't
3647 clear debug_registers_changed nor copy DR values to
3648 debug_reg_state.
3649 (i386_set_thread_context): Delete.
3650 (i386_prepare_to_resume): New function.
3651 (i386_thread_added): Mark the thread as needing to update irs
3652 debug registers.
3653 (the_low_target): Remove i386_set_thread_context and install
3654 i386_prepare_to_resume.
3655 * win32-low.c (win32_get_thread_context): Adjust.
3656 (win32_set_thread_context): Use SetThreadContext
3657 directly.
3658 (win32_prepare_to_resume): New function.
3659 (win32_require_context): New function, factored out from ...
3660 (thread_rec): ... this.
3661 (continue_one_thread): Call win32_prepare_to_resume on each thread
3662 we're about to continue.
3663 (win32_resume): Call win32_prepare_to_resume on the event thread.
3664 * win32-low.h (struct win32_thread_info)
3665 <debug_registers_changed>: New field.
3666 (struct win32_target_ops): Change prototype of set_thread_context,
3667 delete set_thread_context and add prepare_to_resume.
3668 (win32_require_context): New declaration.
3669
a442d071
GB
36702014-10-08 Gary Benson <gbenson@redhat.com>
3671
3672 * server.h: Do not include common-exceptions.h.
3673
6f1947e8
GB
36742014-10-08 Gary Benson <gbenson@redhat.com>
3675
3676 * server.h: Do not include cleanups.h.
3677
63b434a4
JH
36782014-09-30 James Hogan <james.hogan@imgtec.com>
3679
3680 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3681 mips64-dsp-linux.c.
3682
c4d9ceb6
YQ
36832014-09-23 Yao Qi <yao@codesourcery.com>
3684
3685 * linux-low.c (lp_status_maybe_breakpoint): New function.
3686 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3687 (count_events_callback): Likewise.
3688 (select_event_lwp_callback): Likewise.
3689 (cancel_breakpoints_callback): Likewise.
3690
89a5711c
DB
36912014-09-19 Don Breazeal <donb@codesourcery.com>
3692
3693 * linux-low.c (handle_extended_wait): Call
3694 linux_ptrace_get_extended_event.
3695 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3696 linux_is_extended_waitstatus.
3697
bffc0964
JB
36982014-09-16 Joel Brobecker <brobecker@adacore.com>
3699
3700 * Makefile.in (CPPFLAGS): Define.
3701 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3702 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3703
0bfdf32f
GB
37042014-09-16 Gary Benson <gbenson@redhat.com>
3705
3706 * inferiors.h (current_inferior): Renamed as...
3707 (current_thread): New variable. All uses updated.
3708 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3709 (maybe_move_out_of_jump_pad): Likewise.
3710 (cancel_breakpoint): Likewise.
3711 (linux_low_filter_event): Likewise.
3712 (wait_for_sigstop): Likewise.
3713 (linux_resume_one_lwp): Likewise.
3714 (need_step_over_p): Likewise.
3715 (start_step_over): Likewise.
3716 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3717 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3718 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3719 and save_inferior as saved_thread.
3720 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3721 saved_thread.
3722 (regcache_invalidate_thread): Likewise.
3723 * remote-utils.c (prepare_resume_reply): Likewise.
3724 * thread-db.c (thread_db_get_tls_address): Likewise.
3725 (disable_thread_event_reporting): Likewise.
3726 (remove_thread_event_breakpoints): Likewise.
3727 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3728 as saved_thread.
3729 * target.h (set_desired_inferior): Renamed as...
3730 (set_desired_thread): New declaration. All uses updated.
3731 * server.c (myresume): Updated comment to reference thread instead
3732 of inferior.
3733 (handle_serial_event): Likewise.
3734 (handle_target_event): Likewise.
3735
361c8ade
GB
37362014-09-12 Tom Tromey <tromey@redhat.com>
3737 Gary Benson <gbenson@redhat.com>
3738
3739 * regcache.h: Include common-regcache.h.
3740 (regcache_read_pc): Don't declare.
3741 * regcache.c (get_thread_regcache_for_ptid): New function.
3742
bd9269f7
GB
37432014-09-11 Tom Tromey <tromey@redhat.com>
3744 Gary Benson <gbenson@redhat.com>
3745
3746 * symbol.c: New file.
3747 * Makefile.in (SFILES): Add symbol.c.
3748 (OBS): Add symbol.o.
3749
f8c1d06b
GB
37502014-09-11 Gary Benson <gbenson@redhat.com>
3751
3752 * target.c (target_stop_ptid, target_continue_ptid): New
3753 functions.
3754
721ec300
GB
37552014-09-11 Tom Tromey <tromey@redhat.com>
3756 Gary Benson <gbenson@redhat.com>
3757
3758 * target.h: Include target/target.h.
3759 * target.c (target_read_memory, target_read_uint32)
3760 (target_write_memory): New functions.
3761
c5e92cca
GB
37622014-09-11 Gary Benson <gbenson@redhat.com>
3763
3764 * server.h (debug_hw_points): Don't declare.
3765 * server.c (debug_hw_points): Don't define. Replace all uses
3766 with show_debug_regs.
3767 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3768 all uses with show_debug_regs.
3769
2e4bb98a
EBM
37702014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3771
3772 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3773 endianness into account.
3774 (ppc_supply_ptrace_register): Likewise.
3775
ac740bc7
JH
37762014-09-03 James Hogan <james.hogan@imgtec.com>
3777
3778 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3779 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3780
97ea6506
GB
37812014-09-03 Gary Benson <gbenson@redhat.com>
3782
3783 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3784 ALL_DEBUG_ADDRESS_REGISTERS.
3785
df7e5265
GB
37862014-09-02 Gary Benson <gbenson@redhat.com>
3787
3788 * i386-low.h: Renamed as...
3789 * x86-low.h: New file. All type, function and variable name
3790 prefixes changed from "i386_" to "x86_". All references updated.
3791 * i386-low.c: Renamed as...
3792 * x86-low.c: New file. All type, function and variable name
3793 prefixes changed from "i386_" to "x86_". All references updated.
3794
ed859da7
GB
37952014-09-02 Gary Benson <gbenson@redhat.com>
3796
3797 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3798 (x86_linux_new_thread): Likewise.
3799
860789c7
GB
38002014-08-29 Gary Benson <gbenson@redhat.com>
3801
3802 * server.h (setjmp.h): Do not include.
3803 (toplevel): Do not declare.
3804 (common-exceptions.h): Include.
3805 (cleanups.h): Likewise.
3806 * server.c (toplevel): Do not define.
3807 (exit_code): New static global.
3808 (detach_or_kill_for_exit_cleanup): New function.
3809 (main): New function. Original main renamed to...
3810 (captured_main): New function.
3811 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3812
ff55e1b5
GB
38132014-08-29 Gary Benson <gbenson@redhat.com>
3814
3815 * Makefile.in (SFILES): Add common/common-exceptions.c.
3816 (OBS): Add common-exceptions.o.
3817 (common-exceptions.o): New rule.
3818 * utils.c (prepare_to_throw_exception): New function.
3819
e9bcb658
GB
38202014-08-29 Gary Benson <gbenson@redhat.com>
3821
3822 * config.in: Regenerate.
3823 * configure: Likewise.
3824
e3180625
GB
38252014-08-29 Gary Benson <gbenson@redhat.com>
3826
3827 * Makefile.in (SFILES): Add common/cleanups.c.
3828 (OBS): cleanups.o.
3829 (cleanups.o): New rule.
3830
e3d6ba5d
GB
38312014-08-29 Gary Benson <gbenson@redhat.com>
3832
3833 * utils.c (internal_vwarning): New function.
3834
7096e886
GB
38352014-08-28 Gary Benson <gbenson@redhat.com>
3836
3837 * utils.h (fatal): Remove declaration.
3838 * utils.c (fatal): Remove function.
3839
14ce3192
GB
38402014-08-28 Gary Benson <gbenson@redhat.com>
3841
3842 * tracepoint.c (gdb_agent_init): Replace fatal with
3843 perror_with_name.
3844 (initialize_tracepoint): Likewise.
3845
50278d59
GB
38462014-08-28 Gary Benson <gbenson@redhat.com>
3847
3848 * remote-utils.c (remote_prepare): Replace fatal with error.
3849
aa96c426
GB
38502014-08-28 Gary Benson <gbenson@redhat.com>
3851
3852 * linux-low.c (linux_async): Replace fatal with warning.
3853 Tidy up and return.
3854 (linux_start_non_stop): Return -1 if linux_async failed.
3855
f7160e97
GB
38562014-08-28 Gary Benson <gbenson@redhat.com>
3857
3858 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3859 gdb_assert.
3860 (i386_dr_low_get_addr): Remove vague comment.
3861 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3862 gdb_assert.
3863
38e08fca
GB
38642014-08-28 Gary Benson <gbenson@redhat.com>
3865
3866 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3867 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3868 internal_error.
3869 (linux_resume_one_lwp): Likewise.
3870 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3871 gdb_assert.
3872 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3873 with internal_error.
3874 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3875 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3876 (find_register_by_name): Replace fatal with internal_error.
3877 (find_regno): Likewise.
3878 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3879 * thread-db.c (thread_db_create_event): Likewise.
3880 (thread_db_load_search): Likewise.
3881 (try_thread_db_load_1): Likewise.
3882 * tracepoint.c (get_jump_space_head): Replace fatal with
3883 internal_error.
3884 (claim_trampoline_space): Likewise.
3885 (have_fast_tracepoint_trampoline_buffer): Likewise.
3886 (cmd_qtstart): Likewise.
3887 (stop_tracing): Likewise.
3888 (fast_tracepoint_collecting): Likewise.
3889 (target_malloc): Likewise.
3890 (download_tracepoint): Likewise.
3891 (download_trace_state_variables): Replace check with gdb_assert.
3892 (upload_fast_traceframes): Replace fatal with internal_error.
3893
34abf635
GB
38942014-08-19 Tom Tromey <tromey@redhat.com>
3895 Gary Benson <gbenson@redhat.com>
3896
3897 * Makefile.in (SFILES): Add common/common-debug.c.
3898 (OBS): Add common-debug.o.
3899 (common-debug.o): New rule.
3900 * debug.h (debug_printf): Don't declare.
3901 * debug.c (debug_printf): Renamed and rewritten as...
3902 (debug_vprintf): New function.
3903
f6e94d78
GB
39042014-08-19 Gary Benson <gbenson@redhat.com>
3905
3906 * utils.h: Do not include print-utils.h.
3907
9239eeab
GB
39082014-08-19 Tom Tromey <tromey@redhat.com>
3909 Gary Benson <gbenson@redhat.com>
3910
3911 * server.h: Add static assertion.
3912 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3913
ef87c8bb
GB
39142014-08-19 Tom Tromey <tromey@redhat.com>
3915 Gary Benson <gbenson@redhat.com>
3916
3917 * Makefile.in (SFILES): Add common/errors.c.
3918 (OBS): Add errors.o.
3919 (IPA_OBS): Add errors-ipa.o.
3920 (errors.o): New rule.
3921 (errors-ipa.o): Likewise.
3922 * utils.h (perror_with_name, error, warning): Don't declare.
3923 * utils.c (warning): Renamed and rewritten as...
3924 (vwarning): New function.
3925 (error): Renamed and rewritten as...
3926 (verror): New function.
3927 (internal_error): Renamed and rewritten as...
3928 (internal_verror): New function.
3929
bb974a24
GB
39302014-08-07 Gary Benson <gbenson@redhat.com>
3931
3932 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3933 * configure: Regenerate.
3934 * config.in: Likewise.
3935 * server.h: Do not include errno.h.
3936 * event-loop.c: Likewise.
3937 * hostio-errno.c: Likewise.
3938 * linux-low.c: Likewise.
3939 * remote-utils.c: Likewise.
3940 * spu-low.c: Likewise.
3941 * utils.c: Likewise.
3942 * gdbreplay.c: Unconditionally include errno.h.
3943
6d3d12eb
GB
39442014-08-07 Gary Benson <gbenson@redhat.com>
3945
3946 * server.h: Do not include string.h.
3947 * event-loop.c: Likewise.
3948 * linux-low.c: Likewise.
3949 * regcache.c: Likewise.
3950 * remote-utils.c: Likewise.
3951 * spu-low.c: Likewise.
3952 * utils.c: Likewise.
3953
dccbb609
GB
39542014-08-07 Gary Benson <gbenson@redhat.com>
3955
3956 * server.h: Do not include gdb_assert.h.
3957
e76df0d0
GB
39582014-08-07 Gary Benson <gbenson@redhat.com>
3959
3960 * server.h: Do not include common-utils.h.
3961
4cb9c816
GB
39622014-08-07 Gary Benson <gbenson@redhat.com>
3963
3964 * server.h: Do not include ptid.h.
3965 * notif.h: Likewise.
3966
3995eeee
GB
39672014-08-07 Gary Benson <gbenson@redhat.com>
3968
3969 * server.h: Do not include gdb_locale.h.
3970
cb9f1a9b
GB
39712014-08-07 Gary Benson <gbenson@redhat.com>
3972
3973 * server.h: Do not include gdb/signals.h.
3974 * win32-low.c: Likewise.
3975
a5fceff8
GB
39762014-08-07 Gary Benson <gbenson@redhat.com>
3977
3978 * server.h: Do not include pathmax.h.
3979
b9391142
GB
39802014-08-07 Gary Benson <gbenson@redhat.com>
3981
3982 * server.h: Do not include libiberty.h.
3983 * linux-bfin-low.c: Likewise.
3984
0e443c87
GB
39852014-08-07 Gary Benson <gbenson@redhat.com>
3986
3987 * server.h: Do not include ansidecl.h.
3988
8ebb3f56
GB
39892014-08-07 Gary Benson <gbenson@redhat.com>
3990
3991 * linux-x86-low.c: Do not include stddef.h.
3992 * lynx-ppc-low.c: Likewise.
3993 * tracepoint.c: Likewise.
3994
8980bdf6
GB
39952014-08-07 Gary Benson <gbenson@redhat.com>
3996
3997 * server.h: Do not include stdarg.h.
3998 * nto-low.c: Likewise.
3999
d7096f71
GB
40002014-08-07 Gary Benson <gbenson@redhat.com>
4001
4002 * server.h: Do not include stdlib.h.
4003 * inferiors.c: Likewise.
4004 * linux-low.c: Likewise.
4005 * regcache.c: Likewise.
4006 * spu-low.c: Likewise.
4007 * tracepoint.c: Likewise.
4008 * utils.c: Likewise.
4009
d02f550d
GB
40102014-08-07 Gary Benson <gbenson@redhat.com>
4011
4012 * server.h: Do not include stdio.h.
4013 * linux-low.c: Likewise.
4014 * remote-utils.c: Likewise.
4015 * spu-low.c: Likewise.
4016 * utils.c: Likewise.
4017 * wincecompat.c: Likewise.
4018
87f6c4e3
GB
40192014-08-06 Gary Benson <gbenson@redhat.com>
4020
4021 * regcache.c (init_register_cache): Move conditionals inside if.
4022
7089dca4
GB
40232014-08-06 Gary Benson <gbenson@redhat.com>
4024
4025 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4026
462f517e
GB
40272014-07-31 Gary Benson <gbenson@redhat.com>
4028
4029 * ax.h: Do not include server.h.
4030 * gdbthread.h: Likewise.
4031 * lynx-low.h: Likewise.
4032 * notif.h: Likewise.
4033
976411d6
GB
40342014-07-30 Gary Benson <gbenson@redhat.com>
4035
4036 * server.h: Include common-defs.h.
4037 Do not include config.h or build-gnulib-gdbserver/config.h.
4038
d41f6d8e
GB
40392014-07-30 Gary Benson <gbenson@redhat.com>
4040
4041 * hostio-errno.c: Move server.h to top of includes list.
4042 * inferiors.c: Likewise.
4043 * linux-x86-low.c: Likewise.
4044 * notif.c: Include server.h.
4045
314c6a35
TT
40462014-07-24 Tom Tromey <tromey@redhat.com>
4047 Gary Benson <gbenson@redhat.com>
4048
4049 * server.h (CORE_ADDR): Now unsigned.
4050
69ff6be5
PA
40512014-07-16 Pedro Alves <palves@redhat.com>
4052
4053 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4054
ce9e3fe7
PA
40552014-07-15 Pedro Alves <palves@redhat.com>
4056
4057 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4058 copy.
4059
e76126e8
PA
40602014-07-11 Pedro Alves <palves@redhat.com>
4061
4062 * linux-low.c (kill_wait_lwp): New function, based on
4063 kill_one_lwp_callback, but use my_waitpid directly.
4064 (kill_one_lwp_callback, linux_kill): Use it.
4065
8e9db26e
PA
40662014-06-23 Pedro Alves <palves@redhat.com>
4067
4068 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4069 before setting DR0..DR3.
4070
698b3e08
GB
40712014-06-20 Gary Benson <gbenson@redhat.com>
4072
4073 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4074 * configure: Regenerated.
4075 * config.in: Likewise.
4076
125f8a3d
GB
40772014-06-20 Gary Benson <gbenson@redhat.com>
4078
4079 * Makefile.in (SFILES): Update locations for files moved
4080 from common to nat.
4081 (object file files): Reordered.
4082
42995dbd
GB
40832014-06-20 Gary Benson <gbenson@redhat.com>
4084
4085 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4086 (i386_dr_low_set_addr): Likewise.
4087 (i386_dr_low_get_addr): Likewise.
4088 (i386_dr_low_can_set_control): Likewise.
4089 (i386_dr_low_set_control): Likewise.
4090 (i386_dr_low_get_control): Likewise.
4091 (i386_dr_low_get_status): Likewise.
4092 (i386_get_debug_register_length): Likewise.
4093 * linux-x86-low.c (i386_dr_low_set_addr):
4094 Changed signature. Made static.
4095 (i386_dr_low_get_addr): Likewise.
4096 (i386_dr_low_set_control): Likewise.
4097 (i386_dr_low_get_control): Likewise.
4098 (i386_dr_low_get_status): Likewise.
4099 (i386_dr_low): New global variable.
4100 * win32-i386-low.c (i386_dr_low_set_addr):
4101 Changed signature. Made static.
4102 (i386_dr_low_get_addr): Likewise.
4103 (i386_dr_low_set_control): Likewise.
4104 (i386_dr_low_get_control): Likewise.
4105 (i386_dr_low_get_status): Likewise.
4106 (i386_dr_low): New global variable.
4107
e1d2394b
MS
41082014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4109
4110 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4111 * Makefile.in (AR, AR_FLAGS): Define.
4112 * configure: Regenerate.
4113
3a8ee006
GB
41142014-06-19 Gary Benson <gbenson@redhat.com>
4115
4116 * Makefile.in (i386-dregs.o): New rule.
4117 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4118 * i386-low.c (target.h): Remove include.
4119 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4120 (DR_CONTROL_SHIFT): Likewise.
4121 (DR_CONTROL_SIZE): Likewise.
4122 (DR_RW_EXECUTE): Likewise.
4123 (DR_RW_WRITE): Likewise.
4124 (DR_RW_READ): Likewise.
4125 (DR_RW_IORW): Likewise.
4126 (DR_LEN_1): Likewise.
4127 (DR_LEN_2): Likewise.
4128 (DR_LEN_4): Likewise.
4129 (DR_LEN_8): Likewise.
4130 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4131 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4132 (DR_ENABLE_SIZE): Likewise.
4133 (DR_LOCAL_SLOWDOWN): Likewise.
4134 (DR_GLOBAL_SLOWDOWN): Likewise.
4135 (DR_CONTROL_RESERVED): Likewise.
4136 (I386_DR_CONTROL_MASK): Likewise.
4137 (I386_DR_VACANT): Likewise.
4138 (I386_DR_LOCAL_ENABLE): Likewise.
4139 (I386_DR_GLOBAL_ENABLE): Likewise.
4140 (I386_DR_DISABLE): Likewise.
4141 (I386_DR_SET_RW_LEN): Likewise.
4142 (I386_DR_GET_RW_LEN): Likewise.
4143 (I386_DR_WATCH_HIT): Likewise.
4144 (i386_wp_op_t): Likewise.
4145 (i386_show_dr): Likewise.
4146 (i386_length_and_rw_bits): Likewise.
4147 (i386_insert_aligned_watchpoint): Likewise.
4148 (i386_remove_aligned_watchpoint): Likewise.
4149 (i386_handle_nonaligned_watchpoint): Likewise.
4150 i386_update_inferior_debug_regs(): Likewise.
4151 (i386_dr_insert_watchpoint): Likewise.
4152 (i386_dr_remove_watchpoint): Likewise.
4153 (i386_dr_region_ok_for_watchpoint): Likewise.
4154 (i386_dr_stopped_data_address): Likewise.
4155 (i386_dr_stopped_by_watchpoint): Likewise.
4156
8f26655c
GB
41572014-06-19 Gary Benson <gbenson@redhat.com>
4158
4159 * i386-low.c (i386_dr_show): Renamed to
4160 i386_show_dr and made static. All uses updated.
4161 (i386_dr_length_and_rw_bits): Renamed to
4162 i386_length_and_rw_bits and made static.
4163 All uses updated.
4164 (i386_dr_insert_aligned_watchpoint): Renamed to
4165 i386_insert_aligned_watchpoint and made static.
4166 All uses updated.
4167 (i386_dr_remove_aligned_watchpoint): Renamed to
4168 i386_remove_aligned_watchpoint and made static.
4169 All uses updated.
4170 (i386_dr_update_inferior_debug_regs): Renamed to
4171 i386_update_inferior_debug_regs and made static.
4172 All uses updated.
4173
b9228891
GB
41742014-06-18 Gary Benson <gbenson@redhat.com>
4175
5171def3
GB
4176 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4177 (i386_dr_low_can_set_control): Likewise.
4178 (i386_get_debug_register_length): Likewise.
4179 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4180 (i386_dr_low_can_set_control): Likewise.
4181 (i386_get_debug_register_length): Likewise.
4182
41832014-06-17 Gary Benson <gbenson@redhat.com>
4184
b9228891
GB
4185 * i386-low.h (i386-dregs.h): New include.
4186 (DR_FIRSTADDR): Now in i386-dregs.h.
4187 (DR_LASTADDR): Likewise.
4188 (DR_NADDR): Likewise.
4189 (DR_STATUS): Likewise.
4190 (DR_CONTROL): Likewise.
4191 (i386_debug_reg_state): Likewise.
4192 (i386_dr_insert_watchpoint): Likewise.
4193 (i386_dr_remove_watchpoint): Likewise.
4194 (i386_dr_region_ok_for_watchpoint): Likewise.
4195 (i386_dr_stopped_data_address): Likewise.
4196 (i386_dr_stopped_by_watchpoint): Likewise.
4197 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4198
4be83cc2
GB
41992014-06-18 Gary Benson <gbenson@redhat.com>
4200
4201 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4202 i386_dr_insert_watchpoint.
4203 (i386_low_remove_watchpoint): Renamed to
4204 i386_dr_remove_watchpoint.
4205 (i386_low_region_ok_for_watchpoint): Renamed to
4206 i386_dr_region_ok_for_watchpoint.
4207 (i386_low_stopped_data_address): Renamed to
4208 i386_dr_stopped_data_address.
4209 (i386_low_stopped_by_watchpoint): Renamed to
4210 i386_dr_stopped_by_watchpoint.
4211 * i386-low.c (i386_show_dr): Renamed to
4212 i386_dr_show and made nonstatic. All uses updated.
4213 (i386_length_and_rw_bits): Renamed to
4214 i386_dr_length_and_rw_bits and made nonstatic.
4215 All uses updated.
4216 (i386_insert_aligned_watchpoint): Renamed to
4217 i386_dr_insert_aligned_watchpoint and made nonstatic.
4218 All uses updated.
4219 (i386_remove_aligned_watchpoint): Renamed to
4220 i386_dr_remove_aligned_watchpoint and made nonstatic.
4221 All uses updated.
4222 (i386_update_inferior_debug_regs): Renamed to
4223 i386_dr_update_inferior_debug_regs and made nonstatic.
4224 All uses updated.
4225 (i386_low_insert_watchpoint): Renamed to
4226 i386_dr_insert_watchpoint. All uses updated.
4227 (i386_low_remove_watchpoint): Renamed to
4228 i386_dr_remove_watchpoint. All uses updated.
4229 (i386_low_region_ok_for_watchpoint): Renamed to
4230 i386_dr_region_ok_for_watchpoint. All uses updated.
4231 (i386_low_stopped_data_address): Renamed to
4232 i386_dr_stopped_data_address. All uses updated.
4233 (i386_low_stopped_by_watchpoint): Renamed to
4234 i386_dr_stopped_by_watchpoint. All uses updated.
4235
131aa0d4
GB
42362014-06-18 Gary Benson <gbenson@redhat.com>
4237
4238 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4239 (i386_dr_low_can_set_control): Likewise.
4240 (i386_insert_aligned_watchpoint): New check.
4241
d9305f7f
GB
42422014-06-18 Gary Benson <gbenson@redhat.com>
4243
4244 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4245 Renamed to state.
4246
e927c9fc
GB
42472014-06-18 Gary Benson <gbenson@redhat.com>
4248
4249 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4250 instead of fatal and error.
4251 (i386_handle_nonaligned_watchpoint): Likewise.
4252
1b6d4134
GB
42532014-06-18 Gary Benson <gbenson@redhat.com>
4254
4255 * i386-low.c (i386_get_debug_register_length): New macro.
4256 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4257 (i386_show_dr): Use debug_printf instead of fprintf. Use
4258 phex to format values.
4259
6e62758f
GB
42602014-06-18 Gary Benson <gbenson@redhat.com>
4261
4262 * i386-low.h: Comment changes.
4263 * i386-low.c: Likewise.
4264
fc6e2f03
GB
42652014-06-18 Gary Benson <gbenson@redhat.com>
4266
4267 * i386-low.c: Whitespace changes.
4268
f9d1eeed
TT
42692014-06-12 Tom Tromey <tromey@redhat.com>
4270
4271 * utils.c (freeargv): Remove.
4272
0b04e523
TT
42732014-06-12 Tom Tromey <tromey@redhat.com>
4274
4275 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4276 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4277 (parse_debug_format_options): Likewise.
4278 (gdbserver_usage): Likewise.
4279 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4280 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4281 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4282 against libiberty.
4283 ($(LIBGNU)): Depend on libiberty.
4284 (all-lib): Recurse into all subdirs.
4285 (install-only): Invoke "install" target in subdirs.
4286 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4287 targets.
4288 * configure: Rebuild.
4289 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4290 for vasprintf, vsnprintf, or gettimeofday.
4291 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4292 srv_tgtobj.
4293
270c9937
JB
42942014-06-05 Joel Brobecker <brobecker@adacore.com>
4295
4296 * development.sh: Delete.
4297 * Makefile.in (config.status): Adjust dependency on development.sh.
4298 * configure.ac: Adjust development.sh source call.
4299 * configure: Regenerate.
4300
0a261ed8
PA
43012014-06-02 Pedro Alves <palves@redhat.com>
4302
4303 * ax.c (gdb_free_agent_expr): New function.
4304 * ax.h (gdb_free_agent_expr): New declaration.
4305 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4306 list.
4307 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4308 static.
4309 (clear_breakpoint_conditions_and_commands): New function.
4310 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4311 (clear_breakpoint_conditions_and_commands): New declaration.
4312
e9dae05e
RR
43132014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4314
4315 * linux-aarch64-low.c (asm/ptrace.h): Include.
4316
5876f503
JK
43172014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4318
4319 Fix TLS access for -static -pthread.
4320 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4321 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4322 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4323
802e8e6d
PA
43242014-05-20 Pedro Alves <palves@redhat.com>
4325
4326 * linux-aarch64-low.c (aarch64_insert_point)
4327 (aarch64_remove_point): No longer check whether the type is
4328 supported here. Adjust to new interface.
4329 (the_low_target): Install aarch64_supports_z_point_type as
4330 supports_z_point_type method.
4331 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4332 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4333 instead of a Z packet char. Adjust.
4334 (arm_supports_z_point_type): New function.
4335 (arm_insert_point, arm_remove_point): Adjust to new interface.
4336 (the_low_target): Install arm_supports_z_point_type.
4337 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4338 (cris_insert_point, cris_remove_point): Adjust to new interface.
4339 Don't check whether the type is supported here.
4340 (the_low_target): Install cris_supports_z_point_type.
4341 * linux-low.c (linux_supports_z_point_type): New function.
4342 (linux_insert_point, linux_remove_point): Adjust to new interface.
4343 * linux-low.h (struct linux_target_ops) <insert_point,
4344 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4345 raw_breakpoint pointer parameter.
4346 <supports_z_point_type>: New method.
4347 * linux-mips-low.c (mips_supports_z_point_type): New function.
4348 (mips_insert_point, mips_remove_point): Adjust to new interface.
4349 Use mips_supports_z_point_type.
4350 (the_low_target): Install mips_supports_z_point_type.
4351 * linux-ppc-low.c (the_low_target): Install NULL as
4352 supports_z_point_type method.
4353 * linux-s390-low.c (the_low_target): Install NULL as
4354 supports_z_point_type method.
4355 * linux-sparc-low.c (the_low_target): Install NULL as
4356 supports_z_point_type method.
4357 * linux-x86-low.c (x86_supports_z_point_type): New function.
4358 (x86_insert_point): Adjust to new insert_point interface. Use
4359 insert_memory_breakpoint. Adjust to new
4360 i386_low_insert_watchpoint interface.
4361 (x86_remove_point): Adjust to remove_point interface. Use
4362 remove_memory_breakpoint. Adjust to new
4363 i386_low_remove_watchpoint interface.
4364 (the_low_target): Install x86_supports_z_point_type.
4365 * lynx-low.c (lynx_target_ops): Install NULL as
4366 supports_z_point_type callback.
4367 * nto-low.c (nto_supports_z_point_type): New.
4368 (nto_insert_point, nto_remove_point): Adjust to new interface.
4369 (nto_target_ops): Install nto_supports_z_point_type.
4370 * mem-break.c: Adjust intro comment.
4371 (struct raw_breakpoint) <raw_type, size>: New fields.
4372 <inserted>: Update comment.
4373 <shlib_disabled>: Delete field.
4374 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4375 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4376 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4377 (raw_bkpt_type_to_target_hw_bp_type): New function.
4378 (find_enabled_raw_code_breakpoint_at): New function.
4379 (find_raw_breakpoint_at): New type and size parameters. Use them.
4380 (insert_memory_breakpoint): New function, based off
4381 set_raw_breakpoint_at.
4382 (remove_memory_breakpoint): New function.
4383 (set_raw_breakpoint_at): Reimplement.
4384 (set_breakpoint): New, based on set_breakpoint_at.
4385 (set_breakpoint_at): Reimplement.
4386 (delete_raw_breakpoint): Go through the_target->remove_point
4387 instead of assuming memory breakpoints.
4388 (find_gdb_breakpoint_at): Delete.
4389 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4390 (find_gdb_breakpoint): New function.
4391 (set_gdb_breakpoint_at): Delete.
4392 (z_type_supported): New function.
4393 (set_gdb_breakpoint_1): New function, loosely based off
4394 set_gdb_breakpoint_at.
4395 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4396 (delete_gdb_breakpoint_at): Delete.
4397 (delete_gdb_breakpoint_1): New function, loosely based off
4398 delete_gdb_breakpoint_at.
4399 (delete_gdb_breakpoint): New function.
4400 (clear_gdb_breakpoint_conditions): Rename to ...
4401 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4402 breakpoint.
4403 (add_condition_to_breakpoint): Make static.
4404 (add_breakpoint_condition): Take a struct breakpoint pointer
4405 instead of an address. Adjust.
4406 (gdb_condition_true_at_breakpoint): Rename to ...
4407 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4408 z_type parameter.
4409 (gdb_condition_true_at_breakpoint): Reimplement.
4410 (add_breakpoint_commands): Take a struct breakpoint pointer
4411 instead of an address. Adjust.
4412 (gdb_no_commands_at_breakpoint): Rename to ...
4413 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4414 parameter. Return true if no breakpoint was found. Change debug
4415 output.
4416 (gdb_no_commands_at_breakpoint): Reimplement.
4417 (run_breakpoint_commands): Rename to ...
4418 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4419 and change return type to boolean.
4420 (run_breakpoint_commands): New function.
4421 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4422 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4423 breakpoint. Go through the_target->remove_point instead of
4424 assuming memory breakpoint.
4425 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4426 software and hardware breakpoints.
4427 (reinsert_raw_breakpoint): Go through the_target->insert_point
4428 instead of assuming memory breakpoint.
4429 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4430 software and hardware breakpoints.
4431 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4432 Check both software and hardware breakpoints.
4433 (validate_inserted_breakpoint): Assert the breakpoint is a
4434 software breakpoint. Set the inserted flag to -1 instead of
4435 setting shlib_disabled.
4436 (delete_disabled_breakpoints): Adjust.
4437 (validate_breakpoints): Only validate software breakpoints.
4438 Adjust to inserted flag change.
4439 (check_mem_read, check_mem_write): Skip breakpoint types other
4440 than software breakpoints. Adjust to inserted flag change.
4441 * mem-break.h (enum raw_bkpt_type): New enum.
4442 (raw_breakpoint, struct process_info): Forward declare.
4443 (Z_packet_to_target_hw_bp_type): Delete declaration.
4444 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4445 (set_gdb_breakpoint, delete_gdb_breakpoint)
4446 (clear_breakpoint_conditions): New declarations.
4447 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4448 (breakpoint_inserted_here): Update comment.
4449 (add_breakpoint_condition, add_breakpoint_commands): Replace
4450 address parameter with a breakpoint pointer parameter.
4451 (gdb_breakpoint_here): Update comment.
4452 (delete_gdb_breakpoint_at): Delete.
4453 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4454 * server.c (process_point_options): Take a struct breakpoint
4455 pointer instead of an address. Adjust.
4456 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4457 delete_gdb_breakpoint.
4458 * spu-low.c (spu_target_ops): Install NULL as
4459 supports_z_point_type method.
4460 * target.h: Include mem-break.h.
4461 (struct target_ops) <prepare_to_access_memory>: Update comment.
4462 <supports_z_point_type>: New field.
4463 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4464 instead of a char. Also take a raw breakpoint pointer.
4465 * win32-arm-low.c (the_low_target): Install NULL as
4466 supports_z_point_type.
4467 * win32-i386-low.c (i386_supports_z_point_type): New function.
4468 (i386_insert_point, i386_remove_point): Adjust to new interface.
4469 (the_low_target): Install i386_supports_z_point_type.
4470 * win32-low.c (win32_supports_z_point_type): New function.
4471 (win32_insert_point, win32_remove_point): Adjust to new interface.
4472 (win32_target_ops): Install win32_supports_z_point_type.
4473 * win32-low.h (struct win32_target_ops):
4474 <supports_z_point_type>: New method.
4475 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4476 instead of a char. Also take a raw breakpoint pointer.
4477
932539e3
PA
44782014-05-20 Pedro Alves <palves@redhat.com>
4479
4480 * mem-break.h: Include break-common.h.
4481 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4482 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4483 (Z_packet_to_target_hw_bp_type): New declaration.
4484 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4485 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4486 (Z_PACKET_ACCESS_WP): Delete macros.
4487 (Z_packet_to_hw_type): Delete function.
4488 * i386-low.h: Don't include break-common.h here.
4489 (Z_packet_to_hw_type): Delete declaration.
4490 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4491 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4492 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4493 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4494 * linux-aarch64-low.c: Don't include break-common.h here.
4495 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4496 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4497 (Z_packet_to_target_hw_bp_type): Delete function.
4498 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4499 function.
4500 (mips_insert_point, mips_remove_point): Use
4501 Z_packet_to_target_hw_bp_type.
4502
4ff0d3d8
PA
45032014-05-20 Pedro Alves <palves@redhat.com>
4504
4505 * linux-aarch64-low.c: Include break-common.h.
4506 (enum target_point_type): Delete.
4507 (Z_packet_to_point_type): Rename to ...
4508 (Z_packet_to_target_hw_bp_type): ... this, and return a
4509 target_hw_bp_type instead.
4510 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4511 instead of an enum target_point_type.
4512 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4513 breakpoint type.
4514 (aarch64_dr_state_insert_one_point)
4515 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4516 (aarch64_handle_aligned_watchpoint)
4517 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4518 Take an enum target_hw_bp_type instead of an enum
4519 target_point_type.
4520 (aarch64_supports_z_point_type): New function.
4521 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4522 use Z_packet_to_target_hw_bp_type.
4523
786dc519
JB
45242014-05-20 Joel Brobecker <brobecker@adacore.com>
4525
4526 * configure.ac: Only use -Werror by default when DEVELOPMENT
4527 is true.
4528 * configure: Regenerate.
4529
9e0aa64f
JK
45302014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4531
4532 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4533 * linux-x86-low.c (X86_64_USER_REGS): New.
4534 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4535
2b577b92
YQ
45362014-04-28 Yao Qi <yao@codesourcery.com>
4537
4538 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4539 name.
4540
94611da2
PA
45412014-04-25 Pedro Alves <palves@redhat.com>
4542
4543 PR server/16255
4544 * linux-low.c (linux_attach_fail_reason_string): New function.
4545 (linux_attach_lwp): Delete.
4546 (linux_attach_lwp_1): Rename to ...
4547 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4548 argument. Remove "initial" parameter. Return int instead of
4549 void. Don't error or warn here.
4550 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4551 failure to attach to the tgid. Call warning when failing to
4552 attach to an lwp.
4553 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4554 argument. Remove "initial" parameter. Return int instead of
4555 void. Don't error or warn here.
4556 (linux_attach_fail_reason_string): New declaration.
4557 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4558 interface change. Use linux_attach_fail_reason_string.
4559
01f9f808
MS
45602014-04-24 Michael Sturm <michael.sturm@mintel.com>
4561 Walfred Tedeschi <walfred.tedeschi@intel.com>
4562
4563 * Makefile.in: Added rules to handle new files
4564 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4565 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4566 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4567 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4568 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4569 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4570 x32-avx512-linux.o.
4571 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4572 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4573 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4574 i386/x32-avx512.xml.
4575 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4576 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4577 i386/x32-avx512-linux.xml.
4578 * i387-fp.c (num_avx512_k_registers): New constant for number
4579 of K registers.
4580 (num_avx512_zmmh_low_registers): New constant for number of
4581 lower ZMM registers (0-15).
4582 (num_avx512_zmmh_high_registers): New constant for number of
4583 higher ZMM registers (16-31).
4584 (num_avx512_ymmh_registers): New contant for number of higher
4585 YMM registers (ymm16-31 added by avx521 on x86_64).
4586 (num_avx512_xmm_registers): New constant for number of higher
4587 XMM registers (xmm16-31 added by AVX512 on x86_64).
4588 (struct i387_xsave): Add space for AVX512 registers.
4589 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4590 Add code to handle AVX512 registers.
4591 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4592 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4593 prototypei from generated file.
4594 (tdesc_amd64_avx512_linux): Likewise.
4595 (init_registers_x32_avx512_linux): Likewise.
4596 (tdesc_x32_avx512_linux): Likewise.
4597 (init_registers_i386_avx512_linux): Likewise.
4598 (tdesc_i386_avx512_linux): Likewise.
4599 (x86_64_regmap): Add AVX512 registers.
4600 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4601 mask.
4602 (initialize_low_arch): Add code to initialize AVX512 registers.
4603
51aa91f9
PA
46042014-04-23 Pedro Alves <palves@redhat.com>
4605
4606 * mem-break.c (find_gdb_breakpoint_at): Make static.
4607 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4608
a4165e94
PA
46092014-04-23 Pedro Alves <palves@redhat.com>
4610
4611 * i386-low.c: Don't include break-common.h here.
4612 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4613 prototype to take target_hw_bp_type as argument instead of a Z
4614 packet char.
4615 * i386-low.h: Include break-common.h here.
4616 (Z_packet_to_hw_type): Declare.
4617 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4618 prototypes.
4619 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4620 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4621 (x86_remove_point): Convert the packet number to a
4622 target_hw_bp_type before calling i386_low_remove_watchpoint.
4623 * win32-i386-low.c (i386_insert_point): Convert the packet number
4624 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4625 (i386_remove_point): Convert the packet number to a
4626 target_hw_bp_type before calling i386_low_remove_watchpoint.
4627
b8acf843
PA
46282014-04-23 Pedro Alves <palves@redhat.com>
4629
4630 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4631
d708bcd1
PA
46322014-04-10 Pedro Alves <palves@redhat.com>
4633
4634 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4635 Check if the condition or command is NULL before checking if the
4636 breakpoint is known. On success, return true.
4637 * mem-break.h (add_breakpoint_condition): Document return.
4638 (add_breakpoint_commands): Add describing comment.
4639 * server.c (skip_to_semicolon): New function.
4640 (process_point_options): Use it.
4641
2eec7d5b
PA
46422014-04-09 Pedro Alves <palves@redhat.com>
4643
4644 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4645 to lwpid_of.
4646
fa96cb38
PA
46472014-02-27 Pedro Alves <palves@redhat.com>
4648
4649 PR 12702
4650 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4651 macros.
4652 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4653 output.
4654 (last_thread_of_process_p): Take a PID argument instead of a
4655 thread pointer.
4656 (linux_wait_for_lwp): Delete.
4657 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4658 functions.
4659 (linux_low_filter_event): New function, party factored out from
4660 linux_wait_for_event.
4661 (linux_wait_for_event): Rename to ...
4662 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4663 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4664 sigsuspend. Check for zombie leaders.
4665 (linux_wait_for_event): Reimplement as wrapper around
4666 linux_wait_for_event_filtered.
4667 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4668 a normal or signal exit is seen, it's the whole process exiting.
4669 (wait_for_sigstop): No longer a for_each_inferior callback.
4670 Rewrite on top of linux_wait_for_event_filtered.
4671 (stop_all_lwps): Call wait_for_sigstop directly.
4672 * server.c (resume, handle_target_event): Handle
4673 TARGET_WAITKIND_NO_RESUMED.
4674
d763de10
JB
46752014-02-26 Joel Brobecker <brobecker@adacore.com>
4676
4677 * win32-low.c (psapi_get_dll_name,
4678 * win32_CreateToolhelp32Snapshot): Delete.
4679 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4680 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4681 Delete.
4682 (handle_load_dll): Add function description.
4683 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4684
850a0f76
JB
46852014-02-26 Joel Brobecker <brobecker@adacore.com>
4686
4687 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4688 Add comment.
4689 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4690 base address when calling win32_add_one_solib.
4691 (handle_load_dll): Delete local variable load_addr.
4692 Remove 0x1000 offset applied to DLL base address when calling
4693 win32_add_one_solib.
4694 (handle_unload_dll): Add comment.
4695
f25b3fc3
JB
46962014-02-26 Joel Brobecker <brobecker@adacore.com>
4697
4698 * win32-low.c (win32_add_all_dlls): Renames
4699 win32_ensure_ntdll_loaded. Rewrite function documentation.
4700 Adjust implementation to always load all DLLs.
4701 Add 0x1000 offset to DLL base address when calling
4702 win32_add_one_solib.
4703 (child_initialization_done): New static global.
4704 (do_initial_child_stuff): Set child_initialization_done to
4705 zero during child initialization, and 1 after. Replace call
4706 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4707 Add comment.
4708 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4709 (handle_unload_dll): Add function documentation.
4710 (get_child_debug_event): Ignore load and unload DLL events
4711 during child initialization.
4712
d86d4aaf
DE
47132014-02-20 Doug Evans <dje@google.com>
4714
3bc32da3 4715 Remove global all_lwps.
d86d4aaf
DE
4716 * inferiors.h (ptid_of): Move here from linux-low.h.
4717 (pid_of, lwpid_of): Ditto.
4718 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4719 parameter is a struct thread_info * now.
4720 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4721 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4722 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4723 directly.
4724 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4725 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4726 * linux-arm-low.c (update_registers_callback): Update, "entry"
4727 parameter is a struct thread_info * now.
4728 Fetch lwpid from current_inferior directly.
4729 (arm_insert_point): Pass &all_threads to find_inferior instead of
4730 &all_lwps.
4731 (arm_remove_point): Ditto.
4732 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4733 (arm_prepare_to_resume): Fetch pid from thread.
4734 (arm_read_description): Fetch lwpid from current_inferior directly.
4735 * linux-low.c (all_lwps): Delete.
4736 (delete_lwp): Delete call to remove_inferior.
4737 (handle_extended_wait): Fetch lwpid from thread.
4738 (add_lwp): Don't set lwp->entry.id. Remove call to
4739 add_inferior_to_list.
4740 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4741 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4742 (kill_one_lwp_callback): Ditto.
4743 (linux_kill): Don't dereference NULL pointer.
4744 Fetch ptid,lwpid from thread.
4745 (get_detach_signal): Fetch ptid from thread.
4746 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4747 Simplify call to regcache_invalidate_thread.
4748 (delete_lwp_callback): Update, "entry" parameter is a
4749 struct thread_info * now. Fetch pid from thread.
4750 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4751 (status_pending_p_callback): Update, "entry" parameter is a
4752 struct thread_info * now. Fetch ptid from thread.
4753 (find_lwp_pid): Update, "entry" parameter is a
4754 struct thread_info * now.
4755 (linux_wait_for_lwp): Fetch pid from thread.
4756 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4757 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4758 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4759 (dequeue_one_deferred_signal): Ditto.
4760 (cancel_breakpoint): Fetch ptid from current_inferior.
4761 (linux_wait_for_event): Pass &all_threads to find_inferior,
4762 not &all_lwps. Fetch ptid, lwpid from thread.
4763 (count_events_callback): Update, "entry" parameter is a
4764 struct thread_info * now.
4765 (select_singlestep_lwp_callback): Ditto.
4766 (select_event_lwp_callback): Ditto.
4767 (cancel_breakpoints_callback): Ditto.
4768 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4769 not &all_lwps.
4770 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4771 (unsuspend_one_lwp): Update, "entry" parameter is a
4772 struct thread_info * now.
4773 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4774 not &all_lwps.
4775 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4776 Fetch lwpid from thread, not lwp.
4777 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4778 Pass &all_threads to find_inferior, not &all_lwps.
4779 (send_sigstop): Fetch lwpid from thread, not lwp.
4780 (send_sigstop_callback): Update, "entry" parameter is a
4781 struct thread_info * now.
4782 (suspend_and_send_sigstop_callback): Ditto.
4783 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4784 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4785 struct thread_info * now.
4786 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4787 from thread, lwp.
4788 (lwp_running): Update, "entry" parameter is a
4789 struct thread_info * now.
4790 (stop_all_lwps): Fetch ptid from thread.
4791 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4792 (linux_resume_one_lwp): Fetch lwpid from thread.
4793 (linux_set_resume_request): Update, "entry" parameter is a
4794 struct thread_info * now. Fetch pid, lwpid from thread.
4795 (resume_status_pending_p): Update, "entry" parameter is a
4796 struct thread_info * now.
4797 (need_step_over_p): Ditto. Fetch lwpid from thread.
4798 (start_step_over): Fetch lwpid from thread.
4799 (linux_resume_one_thread): Update, "entry" parameter is a
4800 struct thread_info * now. Fetch lwpid from thread.
4801 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4802 (proceed_one_lwp): Update, "entry" parameter is a
4803 struct thread_info * now. Fetch lwpid from thread.
4804 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4805 struct thread_info * now.
4806 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4807 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4808 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4809 directly.
4810 (regsets_store_inferior_registers): Ditto.
4811 (fetch_register, store_register): Ditto.
4812 (linux_read_memory, linux_write_memory): Ditto.
4813 (linux_request_interrupt): Ditto.
4814 (linux_read_auxv): Ditto.
4815 (linux_xfer_siginfo): Ditto.
4816 (linux_qxfer_spu): Ditto.
4817 (linux_qxfer_libraries_svr4): Ditto.
4818 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4819 moved to inferiors.h.
4820 (get_lwp): Delete.
4821 (get_thread_lwp): Update.
4822 (struct lwp_info): Delete member "entry". Simplify comment for
4823 member "thread".
4824 (all_lwps): Delete.
4825 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4826 current_inferior directly.
4827 (update_watch_registers_callback): Update, "entry" parameter is a
4828 struct thread_info * now. Fetch pid from thread.
4829 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4830 (mips_insert_point): Fetch lwpid from current_inferior.
4831 Pass &all_threads to find_inferior, not &all_lwps.
4832 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4833 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4834 directly.
4835 (mips_stopped_data_address): Ditto.
4836 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4837 directly.
4838 * linux-tile-low.c (tile_arch_setup): Ditto.
4839 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4840 (update_debug_registers_callback): Update, "entry" parameter is a
4841 struct thread_info * now. Fetch pid from thread.
4842 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4843 Pass &all_threads to find_inferior, not &all_lwps.
4844 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4845 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4846 Pass &all_threads to find_inferior, not &all_lwps.
4847 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4848 (i386_dr_low_get_status): Ditto.
4849 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4850 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4851 (x86_linux_read_description): Ditto.
4852 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4853
3b8361aa
DE
48542014-02-20 Doug Evans <dje@google.com>
4855
4856 * inferiors.c (get_first_inferior): Fix buglet.
4857
f7667f0d
DE
48582014-02-19 Doug Evans <dje@google.com>
4859
4860 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4861 * inferiors.c (add_thread): Change result type to struct thread_info *.
4862 All callers updated.
4863 (add_lwp): Call add_thread here instead of in callers.
4864 All callers updated.
4865 * linux-low.h (get_lwp_thread): Rewrite.
4866 (struct lwp_info): New member "thread".
4867
b3312d80
DE
48682014-02-19 Doug Evans <dje@google.com>
4869
4870 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4871 All callers updated.
4872
ecc6f45c
DE
48732014-02-19 Doug Evans <dje@google.com>
4874
4875 * inferiors.c (add_thread): Fix whitespace.
4876
649ebbca
DE
48772014-02-19 Doug Evans <dje@google.com>
4878
4879 * dll.c (clear_dlls): Replace accessing list implemention details
4880 with API function.
4881 * gdbthread.h (get_first_thread): Declare.
4882 * inferiors.c (for_each_inferior_with_data): New function.
4883 (get_first_thread): New function.
4884 (find_thread_ptid): Simplify.
4885 (get_first_inferior): New function.
4886 (clear_list): Delete.
4887 (one_inferior_p): New function.
4888 (clear_inferior_list): New function.
4889 (clear_inferiors): Update.
4890 * inferiors.h (for_each_inferior_with_data): Declare.
4891 (clear_inferior_list): Declare.
4892 (one_inferior_p): Declare.
4893 (get_first_inferior): Declare.
4894 * linux-low.c (linux_wait_for_event): Replace accessing list
4895 implemention details with API function.
4896 * server.c (target_running): Ditto.
4897 (accumulate_file_name_length): New function.
4898 (emit_dll_description): New function.
4899 (handle_qxfer_libraries): Replace accessing list implemention
4900 details with API function.
4901 (handle_qxfer_threads_worker): New function.
4902 (handle_qxfer_threads_proper): Replace accessing list implemention
4903 details with API function.
4904 (handle_query): Ditto.
4905 (visit_actioned_threads_callback_ftype): New typedef.
4906 (visit_actioned_threads_data): New struct.
4907 (visit_actioned_threads): Rewrite to be find_inferior callback.
4908 (resume): Call find_inferior.
4909 (handle_status): Replace accessing list implemention
4910 details with API function.
4911 (process_serial_event): Replace accessing list implemention details
4912 with API function.
4913 * target.c (set_desired_inferior): Replace accessing list implemention
4914 details with API function.
4915 * tracepoint.c (same_process_p): New function.
4916 (gdb_agent_about_to_close): Replace accessing list implemention
4917 details with API function.
4918 * win32-low.c (child_delete_thread): Replace accessing list
4919 implemention details with API function.
4920 (match_dll_by_basename): New function.
4921 (dll_is_loaded_by_basename): New function.
4922 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4923 details call to dll_is_loaded_by_basename.
4924
80894984
DE
49252014-02-19 Doug Evans <dje@google.com>
4926
4927 * dll.h (struct dll_info): Add comment.
4928 * gdbthread.h (struct thread_info): Add comment.
4929 (current_ptid): Simplify.
4930 * inferiors.c (add_process): Update.
4931 (remove_process): Update.
4932 * inferiors.h (struct process_info): Rename member "head" to "entry".
4933 * linux-low.c (delete_lwp): Update.
4934 (add_lwp): Update.
4935 (last_thread_of_process_p): Update.
4936 (kill_one_lwp_callback, linux_kill): Update.
4937 (status_pending_p_callback): Update.
4938 (wait_for_sigstop): Update. Simplify read of ptid.
4939 (start_step_over): Update.
4940 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4941 (get_lwp_thread): Update.
4942 (struct lwp_info): Rename member "head" to "entry".
4943 * regcache.h (inferior_list_entry): Delete.
4944 * server.c (kill_inferior_callback): Update.
4945 (detach_or_kill_inferior_callback): Update.
4946 (print_started_pid): Update.
4947 (print_attached_pid): Update.
4948 (process_serial_event): Simplify read of ptid.
4949 * thread-db.c (thread_db_create_event): Update.
4950 (thread_db_get_tls_address): Update.
4951 * win32-low.c (current_inferior_ptid): Simplify.
4952
46917d26
TT
49532014-02-19 Tom Tromey <tromey@redhat.com>
4954
4955 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4956 argument.
4957 (target_supports_btrace): Update.
4958
0759a81e
YQ
49592014-02-14 Yao Qi <yao@codesourcery.com>
4960
4961 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4962 (rsp-low-ipa.o): New target.
4963
a7191e8b
TT
49642014-02-12 Tom Tromey <tromey@redhat.com>
4965
4966 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4967 convert_ascii_to_int.
4968 * regcache.c (registers_to_string): Likewise.
4969 * remote-utils.c (decode_M_packet): Likewise.
4970 * server.c (process_serial_event): Likewise.
4971
ff0e980e
TT
49722014-02-12 Tom Tromey <tromey@redhat.com>
4973
4974 * server.c (handle_query, handle_v_run): Use hex2bin, not
4975 unhexify.
4976 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4977
e9371aff
TT
49782014-02-12 Tom Tromey <tromey@redhat.com>
4979
4980 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4981 convert_int_to_ascii.
4982 * regcache.c (registers_to_string, collect_register_as_string):
4983 Likewise.
4984 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4985 Likewise.
4986 * server.c (process_serial_event): Likewise.
4987 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4988 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4989
971dc0b8
TT
49902014-02-12 Tom Tromey <tromey@redhat.com>
4991
4992 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4993 bin2hex, not hexify.
4994 * tracepoint.c (cmd_qtstatus): Likewise.
4995
0a822afb
TT
49962014-02-12 Tom Tromey <tromey@redhat.com>
4997
4998 * remote-utils.c (monitor_output): Pass explicit length to
4999 hexify.
5000
9c3d6531
TT
50012014-02-12 Tom Tromey <tromey@redhat.com>
5002
5003 * tracepoint.c: Include rsp-low.h.
5004 * server.c: Include rsp-low.h.
5005 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5006 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5007 declare.
5008 * remote-utils.c: Include rsp-low.h.
5009 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5010 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5011 (convert_int_to_ascii, convert_ascii_to_int): Move to
5012 common/rsp-low.c.
5013 * regcache.c: Include rsp-low.h.
5014 * ax.c: Include rsp-low.h.
5015 * Makefile.in (SFILES): Add common/rsp-low.c.
5016 (OBS): Add rsp-low.o.
5017 (rsp-low.o): New target.
5018
01fd3ea5
TT
50192014-02-12 Tom Tromey <tromey@redhat.com>
5020
5021 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5022 Include print-utils.h.
5023 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5024 (plongest, thirty_two, phex_nz): Remove.
5025 * Makefile.in (SFILES): Add common/print-utils.c.
5026 (OBS): Add print-utils.o.
5027 (print-utils-ipa.o): New target.
5028 (print-utils.o): New target.
5029 (IPA_OBJS): Add print-utils-ipa.o.
5030
e99dc820
TT
50312014-02-06 Tom Tromey <tromey@redhat.com>
5032
5033 * Makefile.in (SFILES): Fix indentation.
5034
ee1e2d4f
DE
50352014-02-05 Doug Evans <dje@google.com>
5036
5037 * linux-low.c (linux_wait_for_event): Improve comment.
5038 (linux_wait_1): Keep current_inferior in sync with event_child.
5039
f5a02773
DE
50402014-01-22 Doug Evans <dje@google.com>
5041
5042 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5043
87ce2a04
DE
50442014-01-22 Doug Evans <dje@google.com>
5045
5046 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5047 * configure: Regenerate.
5048 * config.in: Regenerate.
5049 * Makefile.in (SFILES): Add debug.c.
5050 (OBS): Add debug.o.
5051 * debug.c: New file.
5052 * debug.h: New file.
5053 * linux-aarch64-low.c (*): Update all debugging printfs to use
5054 debug_printf instead of fprintf.
5055 * linux-arm-low.c (*): Ditto.
5056 * linux-cris-low.c (*): Ditto.
5057 * linux-crisv32-low.c (*): Ditto.
5058 * linux-m32r-low.c (*): Ditto.
5059 * linux-sparc-low.c (*): Ditto.
5060 * linux-x86.c (*): Ditto.
5061 * linux-low.c (*): Ditto.
5062 (linux_wait_1): Add calls to debug_enter, debug_exit.
5063 (linux_wait): Remove redundant debugging printf.
5064 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5065 (linux_resume, unstop_all_lwps): Ditto.
5066 * mem-break.c (*): Update all debugging printfs to use
5067 debug_printf instead of fprintf.
5068 * remote-utils.c (*): Ditto.
5069 * thread-db.c (*): Ditto.
5070 * server.c #include <ctype.h>, "gdb_vecs.h".
5071 (debug_threads): Moved to debug.c.
5072 (*): Update all debugging printfs to use debug_printf instead of
5073 fprintf.
5074 (start_inferior): Replace call to fflush with call to debug_flush.
5075 (monitor_show_help): Mention set debug-format.
5076 (parse_debug_format_options): New function.
5077 (handle_monitor_command): Handle "monitor set debug-format".
5078 (gdbserver_usage): Mention --debug-format.
5079 (main): Parse --debug-format.
5080 * server.h (debug_threads): Declaration moved to debug.h.
5081 #include "debug.h".
5082 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5083 trace_debug_1 that uses debug_printf.
5084 (tracepoint_look_up_symbols): Update all debugging printfs to use
5085 debug_printf instead of fprintf.
5086
e671835b
BS
50872014-01-20 Baruch Siach <baruch@tkos.co.il>
5088
5089 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5090 sys/ptrace.h.
5091
b5737fa9
PA
50922014-01-17 Pedro Alves <palves@redhat.com>
5093
ea38d2a9 5094 PR build/16445
c7faa97a
PA
5095 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5096 defined after including gdb_proc_service.h.
b5737fa9 5097
40ed484e
DE
50982014-01-16 Doug Evans <dje@google.com>
5099
5100 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5101 (match_dll): Use it.
5102
969c39fb
MM
51032014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5104
5105 * target.h (target_ops) <read_btrace>: Change parameters and
5106 return type to allow error reporting.
5107 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5108 trace reading errors on.
5109 * linux-low.c (linux_low_read_btrace): Pass trace reading
5110 errors on.
5111 (linux_low_disable_btrace): New.
5112
ab7f45ba
DE
51132014-01-15 Doug Evans <dje@google.com>
5114
5115 * inferiors.c (thread_id_to_gdb_id): Delete.
5116 * inferiors.h (thread_id_to_gdb_id): Delete.
5117
66af0f44
EZ
51182014-01-13 Eli Zaretskii <eliz@gnu.org>
5119
5120 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5121 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5122 versions.
5123
9939e131
PA
51242014-01-08 Pedro Alves <palves@redhat.com>
5125
5126 * server.c (handle_status): Don't discard previous queued stop
5127 replies or thread's pending status here.
5128 (main) <disconnection>: Do it here instead.
5129
b7ea362b
PA
51302014-01-08 Pedro Alves <palves@redhat.com>
5131
5132 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5133 * server.c (visit_actioned_threads, handle_pending_status): New
5134 function.
5135 (handle_v_cont): Factor out parts to ...
5136 (resume): ... this new function. If in all-stop, and a thread
5137 being resumed has a pending status, report it without actually
5138 resuming.
5139 (myresume): Adjust to use the new 'resume' function.
5140 (clear_pending_status_callback, set_pending_status_callback)
5141 (find_status_pending_thread_callback): New functions.
5142 (handle_status): Handle the case of multiple threads having
5143 interesting statuses to report. Report threads' real last signal
5144 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5145 with an interesting thread to report the status for, instead of
5146 always reporting the status of the first thread.
5147
28498c42
JB
51482014-01-01 Joel Brobecker <brobecker@adacore.com>
5149
5150 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5151 * gdbreplay.c (gdbreplay_version): Likewise.
5152
f45c82da
YZ
51532013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5154
5155 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5156 iov.iov_len with the real length in use.
5157
379a5e2d
JB
51582013-12-13 Joel Brobecker <brobecker@adacore.com>
5159
5160 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5161 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5162 for all targets that use win32-low.c.
5163 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5164 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5165
4210d83e
PA
51662013-12-13 Pedro Alves <palves@redhat.com>
5167
5168 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5169 if equal to TARGET_WAITKIND_LOADED.
5170 * win32-low.c (cached_status): New static global.
5171 (win32_wait): Add declaration.
5172 (do_initial_child_stuff): Flush all initial pending debug events
5173 up to the initial breakpoint.
5174 (win32_wait): If CACHED_STATUS was set, return that instead
5175 of doing a real wait. Remove the code resuming the execution
5176 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5177 during the initial phase. Also remove the code changing
5178 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5179 TARGET_WAITKIND_STOPPED.
5180
e7f0d979
YQ
51812013-12-11 Yao Qi <yao@codesourcery.com>
5182
5183 * notif.c (handle_notif_ack): Return 0 if no notification
5184 matches.
5185
ebcf782c
DE
51862013-11-20 Doug Evans <dje@google.com>
5187
5188 * linux-low.c (linux_set_resume_request): Fix comment.
5189
20ad9378
DE
51902013-11-20 Doug Evans <dje@google.com>
5191
5192 * linux-low.c (resume_status_pending_p): Tweak comment.
5193
a196ebeb
WT
51942013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5195
5196 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5197 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5198 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5199 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5200 (srv_amd64_regobj): Add amd64-mpx.o.
5201 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5202 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5203 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5204 * i387-fp.c (num_pl_bnd_register) Added constant.
5205 (num_pl_bnd_cfg_registers) Added constant.
5206 (struct i387_xsave) Added reserved area and MPX fields.
5207 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5208 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5209 function.
5210 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5211 (init_registers_amd64_mpx_linux): Declare new function.
5212 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5213 (x86_64_regmap): Add MPX registers.
5214 (x86_linux_read_description): Add MPX case.
5215 (initialize_low_arch): Initialize MPX targets.
5216
0080a2f6
TT
52172013-11-18 Tom Tromey <tromey@redhat.com>
5218
5219 * configure: Rebuild.
5220 * configure.ac: Don't check for stdlib.h.
5221 * gdbreplay.c: Unconditionally include stdlib.h.
5222
2978b111
TT
52232013-11-18 Tom Tromey <tromey@redhat.com>
5224
5225 * config.in: Rebuild.
5226 * configure: Rebuild.
5227 * configure.ac: Don't use AC_HEADER_DIRENT.
5228
a3d08894
TT
52292013-11-18 Tom Tromey <tromey@redhat.com>
5230
5231 * server.h: Don't check HAVE_STRING_H.
5232 * gdbreplay.c: Don't check HAVE_STRING_H.
5233 * configure: Rebuild.
5234
0a5dd17d
TT
52352013-11-18 Tom Tromey <tromey@redhat.com>
5236
5237 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5238 LIBGNU.
5239
1bd2f0ba
TT
52402013-11-08 Tom Tromey <tromey@redhat.com>
5241
5242 * configure, config.in: Rebuild.
5243 * configure.ac: Remove unused configury.
5244
3266f10b
TT
52452013-11-08 Tom Tromey <tromey@redhat.com>
5246
5247 * acinclude.m4: Include common.m4, codeset.m4.
5248 * configure, config.in: Rebuild.
5249 * configure.ac: Use GDB_AC_COMMON.
5250
6682d959
AA
52512013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5252
5253 * linux-s390-low.c (HWCAP_S390_TE): New define.
5254 (s390_arch_setup): Consider the TE field in the HWCAP for
5255 determining 'have_regset_tdb'.
5256
fd0a4d76
SDJ
52572013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5258
5259 PR gdb/16014
5260 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5261 call to sizeof.
5262
1a3d890b
PA
52632013-10-02 Pedro Alves <palves@redhat.com>
5264
5265 * server.c (process_serial_event): Don't output "GDBserver
5266 exiting" if GDB is connected through stdio.
5267 * target.c (mywait): Likewise, be silent if GDB is connected
5268 through stdio.
5269
97ad4581
JB
52702013-10-01 Joel Brobecker <brobecker@adacore.com>
5271
5272 * lynx-low.c (lynx_add_threads_after_attach): New function.
5273 (lynx_attach): Remove call to add_thread. Add call to
5274 lynx_add_threads_after_attach instead.
5275
5b4e221c
MF
52762013-09-28 Mike Frysinger <vapier@gentoo.org>
5277
5278 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5279 * config.in, configure: Regenerated.
5280
ee47b2f8
YQ
52812013-09-18 Yao Qi <yao@codesourcery.com>
5282
5283 PR server/15959
5284 * server.c (start_inferior): Clear 'resume_info'.
5285
d6707650 52862013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5287
d6707650
JW
5288 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5289 for each register.
5290
9243dd0e 52912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5292
9243dd0e
JW
5293 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5294 linux-tile-low.o to srv_tgtobj.
5295
c623a6ef
WN
52962013-09-16 Will Newton <will.newton@linaro.org>
5297
5298 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5299 out regs.
5300
fb71d39e
PA
53012013-09-06 Pedro Alves <palves@redhat.com>
5302
5303 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5304 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5305 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5306 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5307 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5308 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5309
8e7e9910
PA
53102013-09-06 Pedro Alves <palves@redhat.com>
5311
5312 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5313 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5314
7c3a12ca
PA
53152013-09-06 Pedro Alves <palves@redhat.com>
5316
5317 * linux-amd64-ipa.c: Include tracepoint.h.
5318 * linux-i386-ipa.c: Include tracepoint.h.
5319
8eb3d7b6
RW
53202013-09-06 Ricard Wanderlof <ricardw@axis.com>
5321
5322 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5323 (ps_get_thread_area): New function.
5324
eddddb9d
RW
53252013-09-06 Ricard Wanderlof <ricardw@axis.com>
5326
5327 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5328 (initialize_low_arch): Call init_registers_crisv32 rather than
5329 init_register_crisv32.
5330
533b0600
PA
53312013-09-05 Pedro Alves <palves@redhat.com>
5332
5333 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5334 to ...
5335 * hostio.h: ... this new file.
5336 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5337 win32-low.c: Include hostio.h.
5338
0ce3d3b5
PA
53392013-09-05 Pedro Alves <palves@redhat.com>
5340
5341 * server.h (gdb_client_data, handler_func, callback_handler_func)
5342 (delete_file_handler, add_file_handler, append_callback_event)
5343 (delete_callback_event, start_event_loop, initialize_event_loop):
5344 Move to event-loop.h and include it.
5345 * event-loop.h: New file.
5346
799cdc37
PA
53472013-09-05 Pedro Alves <palves@redhat.com>
5348
5349 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5350 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5351 (loaded_dll, unloaded_dll): Move to ...
5352 * dll.h: ... this new file.
5353 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5354
6a6bbd9d
PA
53552013-09-05 Pedro Alves <palves@redhat.com>
5356
5357 * server.h (current_process, get_thread_process, all_processes)
5358 (add_inferior_to_list, for_each_inferior, current_inferior)
5359 (remove_inferior, add_process, remove_process, find_process_pid)
5360 (have_started_inferiors_p, have_attached_inferiors_p)
5361 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5362 (clear_inferiors, find_inferior, find_inferior_id)
5363 (inferior_target_data, set_inferior_target_data)
5364 (inferior_regcache_data, set_inferior_regcache_data): Move to
5365 inferiors.h, and include it.
5366 * inferiors.h: New file.
5367
f699aaba
PA
53682013-09-05 Pedro Alves <palves@redhat.com>
5369
5370 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5371 Move ...
72f4393d 5372 * ax.h: ... here.
f699aaba 5373
c144c7a0
PA
53742013-09-05 Pedro Alves <palves@redhat.com>
5375
5376 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5377 tracepoint.h.
5378 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5379 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5380 (handle_tracepoint_general_set, handle_tracepoint_query)
5381 (tracepoint_finished_step, tracepoint_was_hit)
5382 (release_while_stepping_state_list, current_traceframe)
5383 (in_readonly_region, traceframe_read_mem)
5384 (fetch_traceframe_registers, traceframe_read_sdata)
5385 (traceframe_read_info, struct fast_tpoint_collect_status)
5386 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5387 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5388 (supply_fast_tracepoint_registers)
5389 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5390 (ipa_tdesc, claim_trampoline_space)
5391 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5392 (agent_mem_read, agent_get_trace_state_variable_value)
5393 (agent_set_trace_state_variable_value, agent_tsv_read)
5394 (agent_mem_read_string, get_raw_reg_func_addr)
5395 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5396 * tracepoint.h: ... this new file.
5397
ff42e6ab
PA
53982013-09-05 Pedro Alves <palves@redhat.com>
5399
5400 * server.h (perror_with_name, error, fatal, warning, paddress)
5401 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5402 include it.
5403 * utils.h: New file.
5404
541af0f4
PA
54052013-09-05 Pedro Alves <palves@redhat.com>
5406
5407 * server.h (remote_debug, noack_mode, transport_is_reliable)
5408 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5409 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5410 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5411 (write_enn, initialize_async_io, enable_async_io)
5412 (disable_async_io, check_remote_input_interrupt_request)
5413 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5414 (dead_thread_notify, prepare_resume_reply)
5415 (decode_address_to_semicolon, decode_address, decode_m_packet)
5416 (decode_M_packet, decode_X_packet, decode_xfer_write)
5417 (decode_search_memory_packet, unhexify, hexify)
5418 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5419 (look_up_one_symbol, relocate_instruction)
5420 (monitor_output): Move to remote-utils.h, and include it.
5421 * remote-utils.h: New file.
5422
eebdf26b
PA
54232013-09-05 Pedro Alves <palves@redhat.com>
5424
5425 * server.h (_): Delete.
5426
3aafd2ff
PA
54272013-09-02 Pedro Alves <palves@redhat.com>
5428
5429 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5430 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5431 allocated.
5432 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5433
cee83bcb
PM
54342013-09-02 Pierre Muller <muller@sourceware.org>
5435
5436 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5437 or WriteProcessMemory complete successfully and handle
5438 ERROR_PARTIAL_COPY error.
5439
9a13b2fa
PA
54402013-09-02 Pedro Alves <palves@redhat.com>
5441
5442 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5443 error instead of EIO.
5444
602e3198
JK
54452013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5446
5447 PR server/15604
5448 * linux-low.c: Include filestuff.h.
5449 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5450 * lynx-low.c: Include filestuff.h.
5451 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5452 * server.c: Include filestuff.h.
5453 (main): Call notice_open_fds.
5454 * spu-low.c: Include filestuff.h.
5455 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5456
96d7229d
LM
54572013-08-22 Luis Machado <lgustavo@codesourcery.com>
5458
5459 * Makefile.in: Explain why ../target and ../nat are not
5460 listed as include file search paths.
5461 (linux-waitpid.o): New object file rule.
5462 * configure.srv (srv_native_linux_obj): New variable.
5463 Replace all occurrences of linux native object files with
5464 $srv_native_linux_obj.
5465 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5466 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5467 (linux_enable_event_reporting): Remove declaration.
5468 (my_waitpid): Moved to common/linux-waitpid.c.
5469 (linux_wait_for_event): Pass ptid when calling
5470 linux_enable_event_reporting.
5471 (linux_supports_tracefork_flag): Remove.
5472 (linux_enable_event_reporting): Likewise.
5473 (linux_tracefork_grandchild): Remove.
5474 (STACK_SIZE): Moved to common/linux-ptrace.c.
5475 (linux_tracefork_child): Remove.
5476 (linux_test_for_tracefork): Remove.
5477 (linux_look_up_symbols): Call linux_supports_traceclone.
5478 (initialize_low): Remove call to linux_test_for_tracefork.
5479 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5480 common/linux-ptrace.h.
5481 (PTRACE_TYPE_ARG4): Likewise.
5482 Include linux-ptrace.h.
5483
32940073
PA
54842013-08-21 Pedro Alves <palves@redhat.com>
5485
5486 * config.in: Renegerate.
5487
33b60d58 54882013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5489
33b60d58
LM
5490 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5491 (SFILES): Remove $(srcdir)/common/target-common.c and
5492 add $(srcdir)/target/waitstatus.c.
5493 (OBS): Remove target-common.o and add waitstatus.o.
5494 (server_h): Remove $(srcdir)/../common/target-common.h and
5495 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5496 and $(srcdir)/../target/waitstatus.h.
5497 (target-common.o): Remove.
5498 (waitstatus.o): New target object file.
5499 * target.h: Do not include target-common.h and
5500 include target/resume.h, target/wait.h and
5501 target/waitstatus.h.
5502
b8e1b30e
LM
55032013-08-13 Luis Machado <lgustavo@codesourcery.com>
5504
5505 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5506 to PTRACE_TYPE_ARG3.
5507 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5508 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5509 PTRACE_TYPE_ARG4.
5510 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5511 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5512
7a60ad40
YQ
55132013-07-27 Jie Zhang <jie@codesourcery.com>
5514 Daniel Jacobowitz <dan@codesourcery.com>
5515 Yao Qi <yao@codesourcery.com>
5516
5517 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5518 (mips-linux-watch.o): New rule.
5519 (mips_linux_watch_h): New variable.
5520 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5521 srv_tgtobj.
5522 * linux-mips-low.c: Include mips-linux-watch.h.
5523 (struct arch_process_info, struct arch_lwp_info): New.
5524 (update_watch_registers_callback): New function.
5525 (mips_linux_new_process, mips_linux_new_thread) New functions.
5526 (mips_linux_prepare_to_resume, mips_insert_point): New
5527 functions.
5528 (mips_remove_point, mips_stopped_by_watchpoint): New
5529 functions.
5530 (rsp_bp_type_to_target_hw_bp_type): New function.
5531 (mips_stopped_data_address): New function.
5532 (the_low_target): Add watchpoint support functions.
5533
de6f69ad
YQ
55342013-07-27 Yao Qi <yao@codesourcery.com>
5535
5536 * i386-low.c: Include break-common.h.
5537 (enum target_hw_bp_type): Remove.
5538
3360c0bf
LM
55392013-07-24 Luis Machado <lgustavo@codesourcery.com>
5540
5541 * Makefile.in (SFILES): /common/target-common.c.
5542 (OBS): Add target-common.o.
5543 (server_h): Add $(srcdir)/../common/target-common.h.
5544 (target-common.o): New target.
5545 * server.c (queue_stop_reply_callback): Free
5546 status string after use.
5547 * target.c (target_waitstatus_to_string): Remove.
5548 * target.h: Include target-common.h.
5549 (resume_kind): Likewise.
5550 (target_waitkind): Likewise.
5551 (target_waitstatus): Likewise.
5552 (TARGET_WNOHANG): Likewise.
5553
bd885420
YQ
55542013-07-04 Yao Qi <yao@codesourcery.com>
5555
5556 * Makefile.in (host_alias): Use @host_noncanonical@.
5557 (target_alias): Use @target_noncanonical@.
5558 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5559 ACX_NONCANONICAL_HOST.
5560 * configure: Regenerated.
5561
5562 Revert:
5563 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5564
5565 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5566 * configure: Rebuild.
5567 * Makefile.in (version_host, version_target): Get from configure.
5568 (version.c): Use $(version_host) and $(version_target).
5569
17ef446e
PA
55702013-07-03 Pedro Alves <palves@redhat.com>
5571
5572 * Makefile.in (config.status): Depend on development.sh.
5573 * acinclude.m4: Include libmcheck.m4.
5574 * configure: Regenerate.
5575
7a9a7487
MG
55762013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5577
5578 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5579 attribute inside the parentheses.
5580 (winapi_DebugSetProcessKillOnExit): Ditto.
5581 (winapi_DebugBreakProcess): Ditto.
5582 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5583
49b64de6
MG
55842013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5585
5586 * notif.h (notif_event): Add a dummy member to avoid compiler
5587 errors.
5588
d5749ee7
PA
55892013-07-01 Pedro Alves <palves@redhat.com>
5590
5591 * hostio.c (HOSTIO_PATH_MAX): Define.
5592 (require_filename, handle_open, handle_unlink, handle_readlink):
5593 Use it.
5594
d8d2a3ee
PA
55952013-07-01 Pedro Alves <palves@redhat.com>
5596
5597 * server.h: Include "pathmax.h".
5598 * linux-low.c: Don't include sys/param.h.
5599 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5600 MAXPATHLEN.
5601 * win32-low.c: Don't include sys/param.h.
5602 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5603
bc7dea8d
PA
56042013-07-01 Pedro Alves <palves@redhat.com>
5605
5606 * event-loop.c: Don't check HAVE_UNISTD_H before including
5607 <unistd.h>.
5608 * gdbreplay.c: Likewise.
5609 * remote-utils.c: Likewise.
5610 * server.c: Likewise.
5611 * configure.ac: Don't check for unistd.h.
5612 * configure: Regenerate.
5613
d6c2da54
TT
56142013-06-28 Tom Tromey <tromey@redhat.com>
5615
5616 * Makefile.in (version.c): Use version.in, not
5617 common/version.in.
5618
257b6bec
MG
56192013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5620
5621 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5622 * configure: Rebuild.
5623 * Makefile.in (version_host, version_target): Get from configure.
5624 (version.c): Use $(version_host) and $(version_target).
5625
86ebe149
DK
56262013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5627
5628 Fix trace-status to output user name without trailing colon.
5629 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5630
f30aa5af
DK
56312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5632
5633 Fix trace-status to output proper start-time and stop-time.
5634 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5635 output start time and stop time in hex as gdb expects.
5636
28a93511
YQ
56372013-06-26 Pedro Alves <pedro@codesourcery.com>
5638
5639 * tracepoint.c (build_traceframe_info_xml): Output trace state
5640 variables present in the trace buffer.
5641
01208463
TT
56422013-06-24 Tom Tromey <tromey@redhat.com>
5643
5644 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5645 create-version.sh.
5646 (version.o): Remove.
5647 * gdbreplay.c: Include version.h.
5648 (version, host_name): Don't declare.
5649 * server.h: Include version.h.
5650 (version, host_name): Don't declare.
5651
760256f9
PA
56522013-06-12 Pedro Alves <palves@redhat.com>
5653
5654 * linux-x86-low.c (linux_is_elf64): Delete global.
5655 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5656 with local linux_pid_exe_is_elf_64_file use.
5657
030031ee
PA
56582013-06-11 Pedro Alves <palves@redhat.com>
5659
5660 * linux-low.c (regset_disabled, disable_regset): New functions.
5661 (regsets_fetch_inferior_registers)
5662 (regsets_store_inferior_registers): Use them.
5663 (initialize_regsets_info); Don't allocate the disabled_regsets
5664 array here.
5665 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5666 comment.
5667
5da6eb0a
PA
56682013-06-11 Pedro Alves <palves@redhat.com>
5669
5670 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5671 xmalloc.
5672
7e5aaa09
PA
56732013-06-11 Pedro Alves <palves@redhat.com>
5674
5675 * linux-x86-low.c (initialize_low_arch): Call
5676 init_registers_x32_avx_linux.
5677
d878444c
JK
56782013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5679
5680 Fix compatibility with Android Bionic.
5681 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5682 it is not empty.
5683
3aee8918
PA
56842013-06-07 Pedro Alves <palves@redhat.com>
5685
5f2b57b5 5686 PR server/14823
3aee8918
PA
5687 * Makefile.in (OBS): Add tdesc.o.
5688 (IPA_OBJS): Add tdesc-ipa.o.
5689 (tdesc-ipa.o): New rule.
5690 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5691 interface.
5692 * linux-low.c (new_inferior): Delete.
5693 (disabled_regsets, num_regsets): Delete.
5694 (linux_add_process): Adjust to set the new per-process
5695 new_inferior flag.
5696 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5697 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5698 was a stop. When calling arch_setup, switch the current inferior
5699 to the thread that got an event.
5700 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5701 (regsets_fetch_inferior_registers)
5702 (regsets_store_inferior_registers): New regsets_info parameter.
5703 Adjust to use it.
5704 (linux_register_in_regsets): New regs_info parameter. Adjust to
5705 use it.
5706 (register_addr, fetch_register, store_register): New usrregs_info
5707 parameter. Adjust to use it.
5708 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5709 parameter regs_info. Adjust to use it.
5710 (linux_fetch_registers): Get the current inferior's regs_info, and
5711 adjust to use it.
5712 (linux_store_registers): Ditto.
5713 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5714 (initialize_low): Don't initialize the target_regsets here. Call
5715 initialize_low_arch.
5716 * linux-low.h (target_regsets): Delete declaration.
5717 (struct regsets_info): New.
5718 (struct usrregs_info): New.
5719 (struct regs_info): New.
5720 (struct process_info_private) <new_inferior>: New field.
5721 (struct linux_target_ops): Delete the num_regs, regmap, and
5722 regset_bitmap fields. New field regs_info.
5723 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5724 * i387-fp.c (num_xmm_registers): Delete.
5725 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5726 calls to new interface.
5727 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5728 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5729 Infer the number of xmm registers from the regcache's target
5730 description.
5731 * i387-fp.h (num_xmm_registers): Delete.
5732 * inferiors.c (add_thread): Don't install the thread's regcache
5733 here.
5734 * proc-service.c (gregset_info): Fetch the current inferior's
5735 regs_info. Adjust to use it.
5736 * regcache.c: Include tdesc.h.
5737 (register_bytes, reg_defs, num_registers)
5738 (gdbserver_expedite_regs): Delete.
5739 (get_thread_regcache): If the thread doesn't have a regcache yet,
5740 create one, instead of aborting gdbserver.
5741 (regcache_invalidate_one): Rename to ...
5742 (regcache_invalidate_thread): ... this.
5743 (regcache_invalidate_one): New.
5744 (regcache_invalidate): Only invalidate registers of the current
5745 process.
5746 (init_register_cache): Add target_desc parameter, and use it.
5747 (new_register_cache): Ditto. Assert the target description has a
5748 non zero registers_size.
5749 (regcache_cpy): Add assertions. Adjust.
5750 (realloc_register_cache, set_register_cache): Delete.
5751 (registers_to_string, registers_from_string): Adjust.
5752 (find_register_by_name, find_regno, find_register_by_number)
5753 (register_cache_size): Add target_desc parameter, and use it.
5754 (free_register_cache_thread, free_register_cache_thread_one)
5755 (regcache_release, register_cache_size): New.
5756 (register_size): Add target_desc parameter, and use it.
5757 (register_data, supply_register, supply_register_zeroed)
5758 (supply_regblock, supply_register_by_name, collect_register)
5759 (collect_register_as_string, collect_register_by_name): Adjust.
5760 * regcache.h (struct target_desc): Forward declare.
5761 (struct regcache) <tdesc>: New field.
5762 (init_register_cache, new_register_cache): Add target_desc
5763 parameter.
5764 (regcache_invalidate_thread): Declare.
5765 (regcache_invalidate_one): Delete declaration.
5766 (regcache_release): Declare.
5767 (find_register_by_number, register_cache_size, register_size)
5768 (find_regno): Add target_desc parameter.
5769 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5770 declarations.
5771 * remote-utils.c: Include tdesc.h.
5772 (outreg, prepare_resume_reply): Adjust.
5773 * server.c: Include tdesc.h.
5774 (gdbserver_xmltarget): Delete declaration.
5775 (get_features_xml, process_serial_event): Adjust.
5776 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5777 declare.
5778 (struct process_info) <tdesc>: New field.
5779 (ipa_tdesc): Declare.
5780 * tdesc.c: New file.
5781 * tdesc.h: New file.
5782 * tracepoint.c: Include tdesc.h.
5783 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5784 (get_context_regcache): Adjust to pass ipa_tdesc down.
5785 (do_action_at_tracepoint): Adjust to get the register cache size
5786 from the context regcache's description.
5787 (traceframe_walk_blocks): Adjust to get the register cache size
5788 from the current trace frame's description.
5789 (traceframe_get_pc): Adjust to get current trace frame's
5790 description and pass it down.
5791 (gdb_collect): Adjust to get the register cache size from the
5792 IPA's description.
5793 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5794 (gdbserver_xmltarget): Delete.
5795 (initialize_low_tracepoint): Set the ipa's target description.
5796 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5797 (initialize_low_tracepoint): Set the ipa's target description.
5798 * linux-x86-low.c: Include tdesc.h.
5799 [__x86_64__] (is_64bit_tdesc): New.
5800 (ps_get_thread_area, x86_get_thread_area): Use it.
5801 (i386_cannot_store_register): Rename to ...
5802 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5803 (i386_cannot_fetch_register): Rename to ...
5804 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5805 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5806 to new interface.
5807 (target_regsets): Rename to ...
5808 (x86_regsets): ... this.
5809 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5810 interface.
5811 (x86_siginfo_fixup): Use is_64bit_tdesc.
5812 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5813 (tdesc_x32_avx_linux, tdesc_x32_linux)
5814 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5815 Declare.
5816 (x86_linux_update_xmltarget): Delete.
5817 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5818 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5819 (AMD64_LINUX_USER64_CS): New.
5820 (x86_linux_read_description): New, based on
5821 x86_linux_update_xmltarget.
5822 (same_process_callback): New.
5823 (x86_arch_setup_process_callback): New.
5824 (x86_linux_update_xmltarget): New.
5825 (x86_regsets_info): New.
5826 (amd64_linux_regs_info): New.
5827 (i386_linux_usrregs_info): New.
5828 (i386_linux_regs_info): New.
5829 (x86_linux_regs_info): New.
5830 (x86_arch_setup): Reimplement.
5831 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5832 (x86_emit_ops): Ditto.
5833 (the_low_target): Adjust. Install x86_linux_regs_info,
5834 x86_cannot_fetch_register, and x86_cannot_store_register.
5835 (initialize_low_arch): New.
5836 * linux-ia64-low.c (tdesc_ia64): Declare.
5837 (ia64_fetch_register): Adjust.
5838 (ia64_usrregs_info, regs_info): New globals.
5839 (ia64_regs_info): New function.
5840 (the_low_target): Adjust.
5841 (initialize_low_arch): New function.
5842 * linux-sparc-low.c (tdesc_sparc64): Declare.
5843 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5844 Adjust.
5845 (sparc_arch_setup): New function.
5846 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5847 (the_low_target): Adjust.
5848 (initialize_low_arch): New function.
5849 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5850 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5851 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5852 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5853 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5854 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5855 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5856 (tdesc_powerpc_isa205_vsx64l): Declare.
5857 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5858 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5859 (ppc_set_pc, ppc_get_hwcap): Adjust.
5860 (ppc_usrregs_info): Forward declare.
5861 (!__powerpc64__) ppc_regmap_adjusted: New global.
5862 (ppc_arch_setup): Adjust to the current process'es target
5863 description.
5864 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5865 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5866 (ppc_store_evrregset): Adjust.
5867 (target_regsets): Rename to ...
5868 (ppc_regsets): ... this, and make static.
5869 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5870 (ppc_regs_info): New function.
5871 (the_low_target): Adjust.
5872 (initialize_low_arch): New function.
5873 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5874 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5875 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5876 (tdesc_s390x_linux64v2): Declare.
5877 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5878 (s390_fill_gregset, s390_store_last_break): Adjust.
5879 (target_regsets): Rename to ...
5880 (s390_regsets): ... this, and make static.
5881 (s390_get_pc, s390_set_pc): Adjust.
5882 (s390_get_hwcap): New target_desc parameter, and use it.
5883 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5884 (s390_arch_setup): Adjust to set the current process'es target
5885 description. Don't adjust the regmap.
5886 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5887 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5888 (regs_info_3264): New globals.
5889 (s390_regs_info): New function.
5890 (the_low_target): Adjust.
5891 (initialize_low_arch): New function.
5892 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5893 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5894 [__mips64] (init_registers_mips_linux)
5895 (init_registers_mips_dsp_linux): Delete defines.
5896 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5897 (have_dsp): New global.
5898 (mips_read_description): New, based on mips_arch_setup.
5899 (mips_arch_setup): Reimplement.
5900 (get_usrregs_info): New function.
5901 (mips_cannot_fetch_register, mips_cannot_store_register)
5902 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5903 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5904 (target_regsets): Rename to ...
5905 (mips_regsets): ... this, and make static.
5906 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5907 (dsp_regs_info, regs_info): New globals.
5908 (mips_regs_info): New function.
5909 (the_low_target): Adjust.
5910 (initialize_low_arch): New function.
5911 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5912 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5913 Declare.
5914 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5915 (arm_read_description): New, with bits factored from
5916 arm_arch_setup.
5917 (arm_arch_setup): Reimplement.
5918 (target_regsets): Rename to ...
5919 (arm_regsets): ... this, and make static.
5920 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5921 (arm_regs_info): New function.
5922 (the_low_target): Adjust.
5923 (initialize_low_arch): New function.
5924 * linux-m68k-low.c (tdesc_m68k): Declare.
5925 (target_regsets): Rename to ...
5926 (m68k_regsets): ... this, and make static.
5927 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5928 (m68k_regs_info): New function.
5929 (m68k_arch_setup): New function.
5930 (the_low_target): Adjust.
5931 (initialize_low_arch): New function.
5932 * linux-sh-low.c (tdesc_sharch): Declare.
5933 (target_regsets): Rename to ...
5934 (sh_regsets): ... this, and make static.
5935 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5936 (sh_regs_info, sh_arch_setup): New functions.
5937 (the_low_target): Adjust.
5938 (initialize_low_arch): New function.
5939 * linux-bfin-low.c (tdesc_bfin): Declare.
5940 (bfin_arch_setup): New function.
5941 (bfin_usrregs_info, regs_info): New globals.
5942 (bfin_regs_info): New function.
5943 (the_low_target): Adjust.
5944 (initialize_low_arch): New function.
5945 * linux-cris-low.c (tdesc_cris): Declare.
5946 (cris_arch_setup): New function.
5947 (cris_usrregs_info, regs_info): New globals.
5948 (cris_regs_info): New function.
5949 (the_low_target): Adjust.
5950 (initialize_low_arch): New function.
5951 * linux-cris-low.c (tdesc_crisv32): Declare.
5952 (cris_arch_setup): New function.
5953 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5954 (cris_regs_info): New function.
5955 (the_low_target): Adjust.
5956 (initialize_low_arch): New function.
5957 * linux-m32r-low.c (tdesc_m32r): Declare.
5958 (m32r_arch_setup): New function.
5959 (m32r_usrregs_info, regs_info): New globals.
5960 (m32r_regs_info): Adjust.
5961 (initialize_low_arch): New function.
5962 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5963 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5964 (tic6x_usrregs_info): Forward declare.
5965 (tic6x_read_description): New function, based on ...
5966 (tic6x_arch_setup): ... this. Reimplement.
5967 (target_regsets): Rename to ...
5968 (tic6x_regsets): ... this, and make static.
5969 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5970 (tic6x_regs_info): New function.
5971 (the_low_target): Adjust.
5972 (initialize_low_arch): New function.
5973 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5974 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5975 (target_regsets): Rename to ...
5976 (xtensa_regsets): ... this, and make static.
5977 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5978 globals.
5979 (xtensa_arch_setup, xtensa_regs_info): New functions.
5980 (the_low_target): Adjust.
5981 (initialize_low_arch): New function.
5982 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5983 (nios2_arch_setup): Set the current process'es tdesc.
5984 (target_regsets): Rename to ...
5985 (nios2_regsets): ... this.
5986 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5987 (nios2_regs_info): New function.
5988 (the_low_target): Adjust.
5989 (initialize_low_arch): New function.
a261b8f5
PA
5990 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5991 (aarch64_arch_setup): Set the current process'es tdesc.
5992 (target_regsets): Rename to ...
5993 (aarch64_regsets): ... this.
5994 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5995 (aarch64_regs_info): New function.
5996 (the_low_target): Adjust.
5997 (initialize_low_arch): New function.
3aee8918
PA
5998 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5999 globals.
6000 (target_regsets): Rename to ...
6001 (tile_regsets): ... this.
6002 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6003 (tile_regs_info): New function.
6004 (tile_arch_setup): Set the current process'es tdesc.
6005 (the_low_target): Adjust.
6006 (initialize_low_arch): New function.
6007 * spu-low.c (tdesc_spu): Declare.
6008 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6009 * win32-arm-low.c (tdesc_arm): Declare.
6010 (arm_arch_setup): New function.
6011 (the_low_target): Install arm_arch_setup instead of
6012 init_registers_arm.
6013 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6014 (init_windows_x86): Rename to ...
6015 (i386_arch_setup): ... this. Set `win32_tdesc'.
6016 (the_low_target): Adjust.
6017 * win32-low.c (win32_tdesc): New global.
6018 (child_add_thread): Don't create the thread cache here.
6019 (do_initial_child_stuff): Set the new process'es tdesc.
6020 * win32-low.h (struct target_desc): Forward declare.
6021 (win32_tdesc): Declare.
6022 * lynx-i386-low.c (tdesc_i386): Declare global.
6023 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6024 * lynx-low.c (lynx_tdesc): New global.
6025 (lynx_add_process): Set the new process'es tdesc.
6026 * lynx-low.h (struct target_desc): Forward declare.
6027 (lynx_tdesc): Declare global.
6028 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6029 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6030 * nto-low.c (nto_tdesc): New global.
6031 (do_attach): Set the new process'es tdesc.
6032 * nto-low.h (struct target_desc): Forward declare.
6033 (nto_tdesc): Declare.
6034 * nto-x86-low.c (tdesc_i386): Declare.
6035 (nto_x86_arch_setup): Set `nto_tdesc'.
6036
b1fbec62
GB
60372013-06-04 Gary Benson <gbenson@redhat.com>
6038
6039 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6040 to qSupported response when appropriate.
6041 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6042 with nonzero-length annex.
6043 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6044 arguments supplied in annex.
6045
d1ec4ce7
DE
60462013-05-31 Doug Evans <dje@google.com>
6047
ac44adcb 6048 PR server/15594
d1ec4ce7
DE
6049 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6050 64 bits in 64-cross-32 environment.
6051
9b25f2d3
PA
60522013-05-28 Pedro Alves <palves@redhat.com>
6053
6054 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6055 (aarch64-without-fpu.c): Delete rule.
6056 * configure.srv (aarch64*-*-linux*): Remove references to
6057 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6058 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6059 declaration.
6060
6740dc9c
PA
60612013-05-24 Pedro Alves <palves@redhat.com>
6062
6063 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6064 instead of strchr/decode_address. Error if the range isn't split
6065 with a ','. Don't assume there's be a ':' in the action.
6066
c2d6af84
PA
60672013-05-23 Yao Qi <yao@codesourcery.com>
6068 Pedro Alves <palves@redhat.com>
6069
6070 * linux-low.c (lwp_in_step_range): New function.
6071 (linux_wait_1): If the thread was range stepping and stopped
6072 outside the stepping range, report the stop to GDB. Otherwise,
6073 continue stepping. Add range stepping debug output.
6074 (linux_set_resume_request): Copy the step range from the resume
6075 request to the lwp.
6076 (linux_supports_range_stepping): New.
6077 (linux_target_ops) <supports_range_stepping>: Set to
6078 linux_supports_range_stepping.
6079 * linux-low.h (struct linux_target_ops)
6080 <supports_range_stepping>: New field.
6081 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6082 * linux-x86-low.c (x86_supports_range_stepping): New.
6083 (the_low_target) <supports_range_stepping>: Set to
6084 x86_supports_range_stepping.
6085 * server.c (handle_v_cont): Handle 'r' action.
6086 (handle_v_requests): Append ";r" if the target supports range
6087 stepping.
6088 * target.h (struct thread_resume) <step_range_start,
6089 step_range_end>: New fields.
6090 (struct target_ops) <supports_range_stepping>:
6091 New field.
6092 (target_supports_range_stepping): New macro.
6093
58794e1a
JB
60942013-05-17 Joel Brobecker <brobecker@adacore.com>
6095
6096 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6097 confusion in comment.
6098
d631c5a7
JB
60992013-05-17 Joel Brobecker <brobecker@adacore.com>
6100
6101 * lynx-low.c (struct process_info_private): New type.
6102 (lynx_add_process): New function.
6103 (lynx_create_inferior, lynx_attach): Replace calls to
6104 add_process by calls to lynx_add_process.
6105 (lynx_resume): If PTID is null, then try using
6106 current_process()->private->last_wait_event_ptid.
6107 Add comments.
6108 (lynx_clear_inferiors): Delete. The contents of that function
6109 has been inlined in lynx_mourn;
6110 (lynx_wait_1): Save the ptid in the process's private data.
6111 (lynx_mourn): Free the process' private data. Replace call
6112 to lynx_clear_inferiors by call to clear_inferiors.
6113
96f7a20f
YQ
61142013-05-17 Yao Qi <yao@codesourcery.com>
6115
6116 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6117 the right place.
6118
db0dfaa0
LM
61192013-05-16 Luis Machado <lgustavo@codesourcery.com>
6120
6121 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6122 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6123 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6124 PT_TEXT_END_ADDR guards. Update comments.
6125 (linux_target_op) <read_offsets>: Conditionally define to
6126 linux_read_offsets if the target is UCLIBC and if it defines
6127 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6128
68f5f838
SL
61292013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6130 Andrew Jenner <andrew@codesourcery.com>
6131
6132 * Makefile.in (SFILES): Add linux-nios2-low.c.
6133 (clean): Add action to delete nios2-linux.c.
6134 (nios2-linux.c): New rule.
6135 * configure.srv: Add nios2*-*-linux*.
6136 * linux-nios2-low.c: New.
6137
1ebff1fd
HAQ
61382013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6139
6140 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6141
f6150862
HZ
61422013-04-25 Hui Zhu <hui@codesourcery.com>
6143
6144 PR gdb/15186
f6150862
HZ
6145 * ax.c (ax_printf): Add fflush.
6146
614c279d
TT
61472013-04-22 Tom Tromey <tromey@redhat.com>
6148
6149 * Makefile.in (SFILES): Add filestuff.c.
6150 (OBS): Add filestuff.o.
6151 (filestuff.o): New target.
6152 * config.in, configure: Rebuild.
6153 * configure.ac: Check for fdwalk, pipe2.
6154
7d4e5717
PA
61552013-04-17 Pedro Alves <palves@redhat.com>
6156
6157 * configure.ac (USE_THREAD_DB): Delete variable.
6158 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6159 Don't AC_SUBST USE_THREAD_DB.
6160 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6161 * config.in, configure: Regenerate.
6162
d5c93e41
PA
61632013-04-16 Pedro Alves <palves@redhat.com>
6164
6165 * linux-low.h (struct lwp_info) <thread_known>: Move under
6166 the USE_THREAD_DB #ifdef.
6167
04f5fe89
PA
61682013-04-16 Pedro Alves <palves@redhat.com>
6169
6170 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6171 (linux-low.o): Delete rule.
6172 * linux-low.h: Always include "gdb_thread_db.h" instead of
6173 conditionally including thread_db.h.
6174 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6175 HAVE_THREAD_DB_H.
6176
480b27bf
JK
61772013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6178
6179 * Makefile.in (install-only): Fix make install regression.
6180
43662968
JK
61812013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6182
6183 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6184 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6185 installation.
6186 * gdbserver.1: Remove.
6187
3e74e146
PA
61882013-03-22 Pedro Alves <palves@redhat.com>
6189
6190 * linux-low.c (handle_extended_wait): Don't call
6191 linux_enable_event_reporting.
6192
a8347a2a
TT
61932013-03-15 Tony Theodore <tonyt@logyst.com>
6194
6195 PR build/9098:
6196 * Makefile.in (SHELL): Use @SHELL@.
6197
eeb56fa7
SDJ
61982013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6199
6200 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6201 compiler warning.
6202
4fa7e2ff
JB
62032013-03-13 Joel Brobecker <brobecker@adacore.com>
6204
6205 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6206 Remove extraneous NULL element.
6207
8ddb1965
YQ
62082013-03-13 Yao Qi <yao@codesourcery.com>
6209
6210 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6211 'V' block in trace frame.
6212
9accd112
MM
62132013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6214
6215 * target.h (struct target_ops): Add btrace ops.
6216 (target_supports_btrace): New macro.
6217 (target_enable_btrace): New macro.
6218 (target_disable_btrace): New macro.
6219 (target_read_btrace): New macro.
6220 * gdbthread.h (struct thread_info): Add btrace field.
6221 * server.c: Include btrace-common.h.
6222 (handle_btrace_general_set): New function.
6223 (handle_btrace_enable): New function.
6224 (handle_btrace_disable): New function.
6225 (handle_general_set): Call handle_btrace_general_set.
6226 (handle_qxfer_btrace): New function.
6227 (struct qxfer qxfer_packets[]): Add btrace entry.
6228 * inferiors.c (remove_thread): Disable btrace.
6229 * linux-low: Include linux-btrace.h.
6230 (linux_low_enable_btrace): New function.
6231 (linux_low_read_btrace): New function.
6232 (linux_target_ops): Add btrace ops.
6233 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6234 Add srv_linux_btrace=yes.
6235 (x86_64-*-linux*): Add linux-btrace.o.
6236 Add srv_linux_btrace=yes.
6237 * configure.ac: Define HAVE_LINUX_BTRACE.
6238 * config.in: Regenerated.
6239 * configure: Regenerated.
6240
5cc22e4c
MM
62412013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6242
6243 * server.c (handle_qxfer): Preserve error message if -3 is
6244 returned.
6245 (qxfer): Document the -3 return value.
6246
7c97f91e
MM
62472013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6248
6249 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6250 (linux_btrace_h): New variable.
6251 (linux-btrace.o): New rule.
6252
be9a119c 62532013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6254 Hafiz Abid Qadeer <abidh@codesourcery.com>
6255
6256 * tracepoint.c (trace_buffer_size): New global.
6257 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6258 (init_trace_buffer): Change to one-argument function. Allocate
6259 trace buffer memory.
6260 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6261 handle QTBuffer:size packet.
6262 (cmd_bigqtbuffer_size): New function.
6263 (initialize_tracepoint): Call init_trace_buffer with
6264 DEFAULT_TRACE_BUFFER_SIZE.
6265 * server.c (handle_query): Add QTBuffer:size in the
6266 supported packets.
6267
e64f7499
YQ
62682013-03-07 Yao Qi <yao@codesourcery.com>
6269
6270 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6271 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6272 of -1.
6273 (cmd_qtsp): Adjust condition. Do post increment.
6274 Set cur_action and cur_step_action back to 0.
6275
f0ae6fc3
PA
62762013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6277
6278 PR server/15236
6279 * linux-low.c (linux_write_memory): Return early success if LEN is
6280 zero.
6281
b5b0b0af
CV
62822013-03-05 Corinna Vinschen <vinschen@redhat.de>
6283
334ad4a8 6284 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6285
589bc927
TT
62862013-02-28 Tom Tromey <tromey@redhat.com>
6287
6288 * configure.ac: Invoke AC_SYS_LARGEFILE.
6289 * configure, config.in: Rebuild.
6290
dfe07582
CV
62912013-02-28 Corinna Vinschen <vinschen@redhat.com>
6292
6293 * win32-low.c: Throughout, fix format strings and casts of
6294 printf-like functions to avoid type related warnings on all
6295 platforms.
6296 (get_child_debug_event): Print dwDebugEventCode as hex since
6297 that's how it's usually documented.
6298
736cd585
YQ
62992013-02-28 Yao Qi <yao@codesourcery.com>
6300
6301 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6302 pulongest.
6303
e1f58301
JW
63042013-02-27 Jiong Wang <jiwang@tilera.com>
6305
6306 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6307 (reg-tilegx32.c): New rule.
6308 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6309 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6310 different register info initializer according to elf class.
6311 (init_registers_tilgx32): New function. The tilegx32 register info
6312 initializer.
6313 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6314 (tile_store_gregset): Likewise.
6315
d171ca78
YQ
63162013-02-27 Yao Qi <yao@codesourcery.com>
6317
6318 * server.c (process_point_options): Print debug message when
6319 debug_threads is true.
6320
282bbdf3
YQ
63212013-02-26 Yao Qi <yao@codesourcery.com>
6322
6323 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6324
aca22551
PA
63252013-02-19 Pedro Alves <palves@redhat.com>
6326 Kai Tietz <ktietz@redhat.com>
6327
6328 PR gdb/15161
6329
6330 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6331 instead of strtoul to extract address from packet.
6332 (process_serial_event) <'z'>: Likewise.
6333
4f3cee1c
YQ
63342013-02-18 Yao Qi <yao@codesourcery.com>
6335
6336 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6337
8e1d55a3
PA
63382013-02-14 Pedro Alves <palves@redhat.com>
6339
6340 Plug memory leak.
6341
6342 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6343 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6344
458820da
PA
63452013-02-14 Pedro Alves <palves@redhat.com>
6346
6347 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6348
baea0dae
PA
63492013-02-14 Pedro Alves <palves@redhat.com>
6350
6351 * tracepoint.c (save_string): Delete.
6352 (add_tracepoint_action): Use savestring instead of save_string.
6353
0b1afbb3
PA
63542013-02-12 Pedro Alves <palves@redhat.com>
6355
6356 * linux-xtensa-low.c: Ditto.
6357 * xtensa-xtregs.c: Ditto.
6358
8a4ac37e
PA
63592013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6360
6361 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6362 thread_db.
6363
148de6bb
MS
63642013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6365
6366 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6367 aarch64_num_wp_regs and aarch64_num_bp_regs to
6368 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6369
55fac6e0
MS
63702013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6371
6372 * linux-aarch64-low.c (ps_get_thread_area): Replace
6373 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6374
176eb98c
MS
63752013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6376 Marcus Shawcroft <marcus.shawcroft@arm.com>
6377 Nigel Stephens <nigel.stephens@arm.com>
6378 Yufeng Zhang <yufeng.zhang@arm.com>
6379
6380 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6381 (aarch64.c, aarch64-without-fpu.c): New targets.
6382 * configure.srv (aarch64*-*-linux*): New.
6383 * linux-aarch64-low.c: New file.
6384
56f7af9c
MS
63852013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6386
43aaf8b6 6387 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6388 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6389 (dequeue_one_deferred_signal, linux_resume_one_thread)
6390 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6391 (linux_tracefork_grandchild, linux_test_for_tracefork)
6392 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6393 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6394 where the argument is 0.
6395
60f662b0
YQ
63962013-01-25 Yao Qi <yao@codesourcery.com>
6397
6398 * event-loop.c: Include "queue.h".
6399 (gdb_event_p): New typedef.
6400 (struct gdb_event) <next_event>: Remove.
6401 (event_queue): Change to QUEUE(gdb_event_p).
6402 (async_queue_event): Remove.
6403 (gdb_event_xfree): New.
6404 (initialize_event_loop): New.
6405 (process_event): Use API from QUEUE.
6406 (wait_for_event): Likewise.
6407 * server.c (main): Call initialize_event_loop.
6408 * server.h (initialize_event_loop): Declare.
6409
5ae4861a
YQ
64102013-01-18 Yao Qi <yao@codesourcery.com>
6411
6412 * ax.h (struct eval_agent_expr_context): New.
6413 (gdb_eval_agent_expr): Update declaration.
6414 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6415 TFRAME. Add new argument CTX.
6416 * server.h (struct eval_agent_expr_context): Declare.
6417 (agent_mem_read, agent_tsv_read): Update declaration.
6418 (agent_mem_read_string): Likewise.
6419 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6420 (add_traceframe_block): Add new argument TPOINT.
6421 Increase TPOINT->traceframe_usage.
6422 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6423 eval_tracepoint_agent_expr.
6424 (condition_true_at_tracepoint): Likewise.
6425 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6426 (agent_mem_read_string, agent_tsv_read): Likewise.
6427
85e00e85
YQ
64282013-01-16 Yao Qi <yao@codesourcery.com>
6429
6430 * linux-low.c (linux_resume_one_lwp): Don't check
6431 'lwp->bp_reinsert != 0'.
6432
4039cf45
JB
64332013-01-07 Joel Brobecker <brobecker@adacore.com>
6434 Pedro Alves <palves@redhat.com>
6435
6436 * lynx-low.c (ptrace_request_to_str): Define a temporary
6437 macro and use it to simplify this function's implementation.
6438
9044dee2
JB
64392013-01-07 Joel Brobecker <brobecker@adacore.com>
6440
6441 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6442 sets errno.
6443
e6352c8f
JB
64442013-01-07 Joel Brobecker <brobecker@adacore.com>
6445
6446 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6447
50681a27
JB
64482013-01-07 Joel Brobecker <brobecker@adacore.com>
6449
6450 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6451
3f6e77ef
JB
64522013-01-07 Joel Brobecker <brobecker@adacore.com>
6453
6454 * lynx-low.c (lynx_resume): Use the resume_info parameter
6455 to determine the ptid for the lynx_ptrace call, unless
6456 it is equal to minus_one_ptid, in which case we use the
6457 ptid of the current_inferior.
6458 (lynx_wait_1): After having received a thread create/exit
6459 event, resume the inferior's execution using the signaling
6460 thread's ptid, rather than the old ptid.
6461
7fda33ae
JB
64622013-01-07 Joel Brobecker <brobecker@adacore.com>
6463
6464 * lynx-low.c (lynx_resume): Delete variable ret.
6465
b9786c74
JB
64662013-01-01 Joel Brobecker <brobecker@adacore.com>
6467
6468 * gdbreplay.c (gdbreplay_version): Update copyright year.
6469 * server.c (gdbserver_version): Likewise.
6470
8b93d60f
JB
64712012-12-17 Joel Brobecker <brobecker@adacore.com>
6472
6473 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6474 new thread.
6475
037335a7
JB
64762012-12-17 Joel Brobecker <brobecker@adacore.com>
6477
6478 * lynx-low.c (ptrace_request_to_str): Add handling for
6479 PTRACE_GETTRACESIG.
6480
52d4cbd8
JB
64812012-12-17 Joel Brobecker <brobecker@adacore.com>
6482
6483 * lynx-low.c (lynx_attach): Delete variable new_process.
6484
ab8f6ca9
JB
64852012-12-17 Joel Brobecker <brobecker@adacore.com>
6486
6487 * lynx-low.c (lynx_create_inferior): Delete variable
6488 new_process.
6489
78cbc024
JB
64902012-12-17 Joel Brobecker <brobecker@adacore.com>
6491
6492 * lynx-low.c (ptrace_request_to_str): Do not handle
6493 PTRACE_GETTHREADLIST if this macro does not exist.
6494
14a00470
YQ
64952012-12-15 Yao Qi <yao@codesourcery.com>
6496
6497 * Makefile.in (OBS): Add notif.o.
6498 * notif.c, notif.h: New.
6499 * server.c: Include "notif.h".
6500 (struct vstop_notif) <next>: Remove.
6501 <base>: New field.
6502 (queue_stop_reply): Update.
6503 (push_event, send_next_stop_reply): Remove.
6504 (discard_queued_stop_replies): Update.
6505 (notif_stop): New variable.
6506 (handle_v_stopped): Remove.
6507 (handle_v_requests): Don't call handle_v_stopped. Call
6508 handle_ack_notif instead.
6509 (queue_stop_reply_callback): Call notif_event_enque instead
6510 of queue_stop_reply.
6511 (handle_status): Don't call send_next_stop_reply, call
6512 notif_write_event instead.
6513 (kill_inferior_callback): Likewise.
6514 (detach_or_kill_inferior_callback): Likewise.
6515 (main): Call initialize_notif.
6516 (process_serial_event): Call QUEUE_is_empty.
6517 (handle_target_event): Call notif_push instead of push event.
6518 * server.h (push_event): Remove declaration.
6519
61c125b9
TT
65202012-12-10 Tom Tromey <tromey@redhat.com>
6521
6522 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6523 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6524 macros.
6525 (.c.o): Rewrite.
6526 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6527 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6528 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6529 (amd64-linux-ipa.o, ax.o): Rewrite.
6530 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6531 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6532 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6533 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6534 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6535 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6536 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6537 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6538 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6539 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6540 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6541 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6542 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6543 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6544 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6545 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6546 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6547 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6548 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6549 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6550 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6551 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6552 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6553 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6554 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6555 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6556 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6557 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6558 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6559 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6560 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6561 (reg-tilegx.o): Remove.
6562 (all_object_files): New macro.
6563 Include .deps files.
6564 * aclocal.m4, configure: Rebuild.
6565 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6566 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6567 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6568
e90e9ad9
TT
65692012-12-05 Tom Tromey <tromey@redhat.com>
6570
6571 PR gdb/14917:
6572 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6573
02d403bf 65742012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6575
6576 * configure.ac: Check for linux/perf_event.h.
6577 * config.in: Regenerated.
6578 * configure: Regenerated.
6579
0270a750
PA
65802012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6581
6582 * hostio.c (handle_readlink): Decrease buffer size
6583 parameter passed to readlink by one byte.
6584
8c29b58e
YQ
65852012-11-26 Yao Qi <yao@codesourcery.com>
6586
6587 * configure.ac (build_warnings): Append '-Wempty-body'.
6588 * configure: Regenerated.
6589 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6590 body.
6591
8bdce1ff
PM
65922012-11-15 Pierre Muller <muller@sourceware.org>
6593
6594 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6595 * config.in: Regenerate.
6596 * configure: Regenerate.
6597 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6598 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6599 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6600 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6601 header.
6602 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6603 instead of <sys/wait.h> header.
6604 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6605
02d403bf 66062012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6607
6608 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6609 (various make rules): Remove -DGDBSERVER
6610
fbd5db48
YQ
66112012-11-09 Yao Qi <yao@codesourcery.com>
6612
6613 * spu-low.c (current_ptid): Move it to ..
6614 * gdbthread.h: ... here. New.
6615 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6616 * server.c (myresume, process_serial_event): Likewise.
6617 * thread-db.c (thread_db_find_new_threads): Likewise.
6618 * tracepoint.c (run_inferior_command): Likewise.
6619
b3dc46ff
AB
66202012-10-01 Andrew Burgess <aburgess@broadcom.com>
6621
6622 * server.c (handle_search_memory_1): Include access length in
6623 warning message.
6624
07c04788
HPN
66252012-09-05 Michael Brandt <michael.brandt@axis.com>
6626
6627 * linux-crisv32-low.c: Fix compile errors.
6628
918d227b
YQ
66292012-09-04 Yao Qi <yao@codesourcery.com>
6630
6631 * tracepoint.c (cmd_qtsv): Adjust debug message.
6632 Don't check CUR_TPOINT.
6633
18c1b81a
YQ
66342012-08-28 Yao Qi <yao@codesourcery.com>
6635
6636 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6637 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6638 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6639 Remove declarations of xmalloc, xreallloc, xstrdup and
6640 freeargv.
6641 * Makefile.in (libiberty_h): New.
6642 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6643 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6644
dc82f37b
YQ
66452012-08-23 Yao Qi <yao@codesourcery.com>
6646
6647 * server.h: Remove declaration of 'xsnprintf'.
6648
406b1477
KS
66492012-08-22 Keith Seitz <keiths@redhat.com>
6650
6651 * server.h: Include build-gnulib-gbserver/config.h.
6652 * gdbreplay.c: Likewise.
6653
e6712ff1
DE
66542012-08-08 Doug Evans <dje@google.com>
6655
6656 * Makefile.in (SFILES): Add gdb_vecs.c.
6657 (OBS): Add gdb_vecs.o.
6658 (gdb_vecs_h, host_defs_h): New variables.
6659 (thread-db.o): Add $(gdb_vecs_h) dependency.
6660 (gdb_vecs.o): New rule.
6661 * thread-db.c: #include "gdb_vecs.h".
6662 (thread_db_load_search): Use a vector to iterate over path elements.
6663 Handle text appearing after "$pdir".
6664
6665 * configure.ac: Add check for strstr.
6666 * config.in: Regenerate.
6667 * configure: Regenerate.
6668
7c3270ae
UW
66692012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6670
6671 * hostio.c (handle_pread): If pread fails, fall back to attempting
6672 lseek/read.
6673 (handle_pwrite): Likewise for pwrite.
6674
b62e2b27
UW
66752012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6676
6677 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6678 between unsupported TYPE and unimplementable ADDR/LEN combination.
6679 (arm_insert_point): Act on new return value.
6680
78a99e91
PA
66812012-07-31 Pedro Alves <palves@redhat.com>
6682
6683 * server.c (process_point_options): Only skip tokens if we find
6684 one that is unrecognized. Don't treat 'X' specially while
6685 skipping unrecognized tokens.
6686
fcf303ab
UW
66872012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6688
6689 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6690 to 4-byte-align HW breakpoint addresses for Thumb.
6691
7255706c
YQ
66922012-07-27 Yao Qi <yao@codesourcery.com>
6693
6694 PR remote/14161.
6695
6696 * server.h: Declare gdb_agent_about_to_close.
6697 * target.c (kill_inferior): Include "agent.h".
6698 New. Send command 'kill'.
6699 * target.h (kill_inferior): Removed macro.
6700 * tracepoint.c (gdb_agent_about_to_close): New.
6701 (gdb_agent_helper_thread): Handle command 'close'.
6702 Wait endlessly until the inferior stops.
6703 Install gdb_agent_remove_socket to atexit hook.
6704 (agent_socket_name): New static variable.
6705 (gdb_agent_socket_init): Replace local variable 'name' with
6706 'agent_socket_name'.
6707 (gdb_agent_remove_socket): New.
6708
5a3f286f
YQ
67092012-07-27 Yao Qi <yao@codesourcery.com>
6710
6711 * server.c (process_point_options): Stop at 'X' when parsing.
6712
961bd387
ME
67132012-07-19 Michael Eager <eager@eagercon.com>
6714
a261b8f5 6715 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6716 to hw_execute.
6717 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6718 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6719 hardware breakpoint.
6720
aa7c7447
JK
67212012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6722
6723 * gdbserver/linux-low.c (initialize_low): Call
6724 linux_ptrace_init_warnings.
6725
7f216e7c
DE
67262012-07-02 Doug Evans <dje@google.com>
6727
6728 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6729 pointer to int.
6730
d3ce09f5
SS
67312012-07-02 Stan Shebs <stan@codesourcery.com>
6732
6733 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6734 (ax.o): Add it to build rule.
6735 (ax-ipa.o): Ditto.
6736 (OBS): Add format.o.
6737 (IPA_OBS): Add format.o.
6738 * server.c (handle_query): Claim support for breakpoint commands.
6739 (process_point_options): Add command case.
6740 (process_serial_event): Leave running if there are printfs in
6741 effect.
6742 * mem-break.h (any_persistent_commands): Declare.
6743 (add_breakpoint_commands): Declare.
6744 (gdb_no_commands_at_breakpoint): Declare.
6745 (run_breakpoint_commands): Declare.
6746 * mem-break.c (struct point_command_list): New struct.
6747 (struct breakpoint): New field command_list.
6748 (any_persistent_commands): New function.
6749 (add_commands_to_breakpoint): New function.
6750 (add_breakpoint_commands): New function.
6751 (gdb_no_commands_at_breakpoint): New function.
6752 (run_breakpoint_commands): New function.
6753 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6754 locally.
6755 * ax.c: Include format.h.
6756 (ax_printf): New function.
6757 (gdb_eval_agent_expr): Add printf opcode.
6758
2f8f6aed
YQ
67592012-06-13 Yao Qi <yao@codesourcery.com>
6760
6761 * server.c (start_inferior): Remove duplicated writes to fields
6762 'last_resume_kind' and 'last_status' of 'current_inferior'.
6763
0c9070b3
YQ
67642012-06-12 Yao Qi <yao@codesourcery.com>
6765 Pedro Alves <palves@redhat.com>
6766
6767 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6768 comment.
6769 * server.c (handle_v_cont): Extend comment.
6770
c52daf70
YQ
67712012-06-11 Yao Qi <yao@codesourcery.com>
6772
6773 * linux-low.c (linux_attach): Add 'static'.
6774
d38bbb0a
YQ
67752012-06-06 Yao Qi <yao@codesourcery.com>
6776
6777 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6778
89dc0afd
JK
67792012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6780
6781 Fix gcc -flto compilation warning.
6782 * server.c (main): Make variable multi_mode and attach volatile.
6783
75f62ce7
TJB
67842012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6785
6786 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6787 if the platform doesn't know about it.
6788
65f479b6
PA
67892012-05-30 Jeff Kenton <jkenton@tilera.com>
6790
6791 * Makefile.in (SFILES): Add linux-tile-low.c.
6792 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6793 * configure.srv: Handle tilegx-*-linux*.
6794 * linux-tile-low.c: New file.
6795
0c5bf5a9
JK
67962012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6797
6798 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6799
a493e3e2
PA
68002012-05-24 Pedro Alves <palves@redhat.com>
6801
6802 PR gdb/7205
6803
43aaf8b6 6804 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6805
2ea28649
PA
68062012-05-24 Pedro Alves <palves@redhat.com>
6807
6808 PR gdb/7205
6809
6810 Replace target_signal with gdb_signal throughout.
6811
8d409d16
MR
68122012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6813
6814 * linux-low.c (linux_store_registers): Avoid the copying sequence
6815 when no data has been retrieved by ptrace.
6816
23512c01
MGD
68172012-05-22 Will Deacon <will.deacon@arm.com>
6818
6819 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6820 Include asm/ptrace.h.
6821 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6822 already defined.
6823
4934b29e
MR
68242012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6825
6826 * linux-low.c (linux_store_registers): Don't re-retrieve data
6827 with ptrace that has already been obtained from /proc. Always
6828 copy any data retrieved with ptrace to the buffer supplied.
6829
bde24c0a
PA
68302012-05-11 Yao Qi <yao@codesourcery.com>
6831 Pedro Alves <palves@redhat.com>
6832
6833 * linux-low.c (enum stopping_threads_kind): New.
6834 (stopping_threads): Change type to `enum stopping_threads_kind'.
6835 (handle_extended_wait): If stopping and suspending threads, leave
6836 the new_lwp suspended too.
6837 (linux_wait_for_event): Adjust.
6838 (stop_all_lwps): Set `stopping_threads' to
6839 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6840 whether we're suspending threads or just stopping them. Assert no
6841 recursion happens.
6842
623b6bdf
YQ
68432012-04-29 Yao Qi <yao@codesourcery.com>
6844
6845 * server.h: Move some code to ...
6846 * gdbthread.h: ... here. New.
6847 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6848 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6849 (nto-low.o, win32-low.o): Likewise.
6850 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6851 * regcache.c, remote-utils.c, server.c: Likewise.
6852 * target.c, tracepoint.c, win32-low.c: Likewise.
6853
f15f9948
TJB
68542012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6855
6856 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6857 (PTRACE_ARG4_TYPE): Likewise.
6858 (PTRACE_XFER_TYPE): Likewise.
6859 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6860 ptrace to PTRACE_ARG3_TYPE.
6861 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6862 (PTRACE_ARG4_TYPE): Likewise.
6863 (PTRACE_XFER_TYPE): Likewise.
6864 (linux_detach_one_lwp): Cast fourth argument of
6865 ptrace to long then PTRACE_ARG4_TYPE.
6866 (regsets_fetch_inferior_registers): Cast third argument of
6867 ptrace to long then PTRACE_ARG3_TYPE.
6868 (regsets_store_inferior_registers): Likewise.
6869
38ea300a
PA
68702012-04-20 Pedro Alves <palves@redhat.com>
6871
6872 * configure: Regenerate.
6873
c971b7fa
PA
68742012-04-19 Pedro Alves <palves@redhat.com>
6875
43aaf8b6 6876 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6877 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6878 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6879 (all, install-only, uninstall, clean-info, all-lib, clean): No
6880 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6881 (maintainer-clean realclean distclean): Use subdir_do.
6882 (subdir_do): New.
6883 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6884 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6885 * acinclude.m4: Include acx_configure_dir.m4.
6886 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6887 calls. Call AC_PROG_RANLIB. Configure gnulib using
6888 ACX_CONFIGURE_DIR.
6889 (GNULIB): New.
6890 (GNULIB_STDINT_H): Adjust.
6891 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6892 * gdbreplay.c: Include build-gnulib/config.h.
6893 * server.h: Likewise.
6894 * aclocal.m4: Regenerate.
6895 * config.in: Regenerate.
6896 * configure: Regenerate.
c971b7fa 6897
809277f8
PA
68982012-04-19 Pedro Alves <palves@redhat.com>
6899
6900 * Makefile.in (LIBGNU, INCGNU): Adjust.
6901 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6902 (all, install-only, uninstall, clean-info, all-lib, clean)
6903 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6904 * configure.ac: Adjust AC_OUTPUT output.
6905 * aclocal.m4: Regenerate.
6906 * configure: Regenerate.
6907
fd9bb8b8
PA
69082012-04-19 Pedro Alves <palves@redhat.com>
6909
6910 * Makefile.in (generated_files): New.
6911 (server_h): Remove the explicit dependency on config.h, and depend
6912 on $generated_files.
6913
1c298c66
PA
69142012-04-19 Pedro Alves <palves@redhat.com>
6915
6916 * Makefile.in (INCGNU): Add -Ignulib.
6917
57c4b50b
PA
69182012-04-19 Pedro Alves <palves@redhat.com>
6919
6920 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6921 (INCGNU): ... this, and spell out -I here.
6922 (GNULIB_LIB): Rename to ...
6923 (LIBGNU): ... this.
6924 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6925
1030e047
PA
69262012-04-19 Pedro Alves <palves@redhat.com>
6927
6928 * config.in: Regenerate.
6929
447d4319
PA
69302012-04-19 Pedro Alves <palves@redhat.com>
6931
6932 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6933 * server.h (memmem): Remove declaration.
6934 * config.in: Regenerate.
6935 * configure: Regenerate.
6936
aad9eab9
YQ
69372012-04-19 Yao Qi <yao@codesourcery.com>
6938
6939 * Makefile.in (SFILES): Add common/vec.c.
6940 (OBS): Add vec.o.
6941 (vec.o): New rule.
6942
3e10640f
YQ
69432012-04-19 Yao Qi <yao@codesourcery.com>
6944
6945 * remote-utils.c (prepare_resume_reply): Replace with macro
6946 target_core_of_thread.
6947 * server.c (handle_qxfer_threads_proper): Likewise.
6948 * target.h (traget_core_of_thread): New macro.
6949
71622373
PA
69502012-04-18 Pedro Alves <palves@redhat.com>
6951
6952 * aclocal.m4: Regenerate.
6953 * configure: Regenerate.
6954
80d26939
YQ
69552012-04-16 Yao Qi <yao@codesourcery.com>
6956
6957 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6958 duplicated on address.
6959
42476b70
YQ
69602012-04-16 Yao Qi <yao@codesourcery.com>
6961
6962 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6963 (struct tracepoint_action_ops) <send>: New field.
6964 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6965 (agent_expr_send, x_tracepoint_action_send): New.
6966 (l_tracepoint_action_send): New.
6967 (cmd_qtdp): Download and install tracepoint
6968 according to `use_agent'.
6969 (run_inferior_command): Add one more parameter `len'.
6970 Update callers.
6971 (tracepoint_send_agent): New.
6972 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6973
7bc83639
YQ
69742012-04-16 Yao Qi <yao@codesourcery.com>
6975
6976 * tracepoint.c (download_tracepoints): Moved to ...
6977 (cmd_qtstart): ... here.
6978
5f18041e
YQ
69792012-04-14 Yao Qi <yao@codesourcery.com>
6980
6981 * tracepoint.c: Include inttypes.h.
6982 (struct collect_memory_action): Use sized types.
6983 (struct tracepoint): Likewise.
6984 (cmd_qtdp, stop_tracing): Update print specifiers.
6985 (cmd_qtp, response_tracepoint): Likewise.
6986 (collect_data_at_tracepoint): Likewise.
6987 (collect_data_at_step): Likewise.
6988
55a8c076
YQ
69892012-04-14 Yao Qi <yao@codesourcery.com>
6990
6991 Import gnulib module inttypes.
6992 * aclocal.m4, config.in, configure: Regenerated.
6993
dc750257
YQ
69942012-04-14 Yao Qi <yao@codesourcery.com>
6995
6996 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6997 Makefile and config.status at last.
6998
0ab5faf9
YQ
69992012-04-13 Yao Qi <yao@codesourcery.com>
7000
7001 * tracepoint.c: Include stdint.h unconditionally.
7002
18f5fd81
TJB
70032012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7004
7005 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7006 on BFD_HAVE_SYS_PROCFS_TYPE.
7007 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7008 * configure: Regenerate.
7009 * config.in: Likewise.
7010
4d47af5c
L
70112012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7012
7013 * Makefile.in (clean): Also remove x32.c x32-linux.c
7014 x32-avx.c x32-avx-linux.c.
7015 (x32.o): New target.
7016 (x32.c): Likewise.
7017 (x32-linux.o): Likewise.
7018 (x32-linux.c): Likewise.
7019 (x32-avx.o): Likewise.
7020 (x32-avx.c): Likewise.
7021 (x32-avx-linux.o): Likewise.
7022 (x32-avx-linux.c): Likewise.
7023
7024 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7025 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7026 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7027 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7028 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7029 i386/x32-avx-linux.xml.
7030
7031 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7032 (init_registers_x32_avx_linux): Likwise.
7033 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7034 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7035
ecedbe58
PA
70362012-04-13 Pedro Alves <palves@redhat.com>
7037
7038 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7039 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7040 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7041 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7042 the sub-make.
7043
c92b5177
L
70442012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7045
7046 * linux-x86-low.c (compat_x32_clock_t): New.
7047 (compat_x32_siginfo_t): Likewise.
7048 (compat_x32_siginfo_from_siginfo): Likewise.
7049 (siginfo_from_compat_x32_siginfo): Likewise.
7050 (linux_is_elf64): Likewise.
7051 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7052 and siginfo_from_compat_x32_siginfo for x32.
7053 (x86_arch_setup): Set linux_is_elf64.
7054
214d508e
L
70552012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7056
7057 PR gdb/13969
7058 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7059 e_machine field.
7060 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7061 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7062 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7063 compatible with process.
7064
c9a1864a
YQ
70652012-04-12 Yao Qi <yao@codesourcery.com>
7066
7067 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7068 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7069 (install-only, install-info, clean): Handle sub dir gnulib.
7070 (all-lib, am--refresh): New targets.
7071 (memmem.o): Remove target.
7072 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7073 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7074 (AC_REPLACE_FUNCS): Remove memmem.
7075 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7076 (AC_OUTPUT): Generate Makefile in gnulib/.
7077 * aclocal.m4, config.in, configure: Regenerated.
7078
367ba2c2
MR
70792012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7080
7081 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7082
9d236627
PA
70832012-04-05 Pedro Alves <palves@redhat.com>
7084
7085 -Werror=strict-aliasing
7086
7087 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7088 pointer.
7089
111217b3
PA
70902012-04-04 Pedro Alves <palves@redhat.com>
7091
7092 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7093 (sparc_store_gregset_from_stack, sparc_store_gregset)
7094 (sparc_breakpoint_at): Fix formatting.
7095
8365dcf5
TJB
70962012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7097
7098 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7099 are available.
7100 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7101 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7102 * config.in: Regenerate.
7103 * configure: Likewise.
7104
689cc2ae
PA
71052012-03-29 Pedro Alves <palves@redhat.com>
7106
7107 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7108 Correct ptrace arguments.
7109
c14dfd32
PA
71102012-03-28 Pedro Alves <palves@redhat.com>
7111
7112 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7113 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7114 (IA64_FR1_REGNUM): New defines.
7115 (ia64_fetch_register): New.
7116 (the_low_target): Install it.
7117 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7118 field.
7119 * linux-low.c (linux_fetch_registers): Try the
7120 the_low_target.fetch_register hook first.
7121
7122 * linux-arm-low.c (the_low_target): Adjust.
7123 * linux-bfin-low.c (the_low_target): Adjust.
7124 * linux-cris-low.c (the_low_target): Adjust.
7125 * linux-crisv32-low.c (the_low_target): Adjust.
7126 * linux-m32r-low.c (the_low_target): Adjust.
7127 * linux-m68k-low.c (the_low_target): Adjust.
7128 * linux-mips-low.c (the_low_target): Adjust.
7129 * linux-ppc-low.c (the_low_target): Adjust.
7130 * linux-s390-low.c (the_low_target): Adjust.
7131 * linux-sh-low.c (the_low_target): Adjust.
7132 * linux-sparc-low.c (the_low_target): Adjust.
7133 * linux-tic6x-low.c (the_low_target): Adjust.
7134 * linux-x86-low.c (the_low_target): Adjust.
7135 * linux-xtensa-low.c (the_low_target): Adjust.
7136
63c88e13
PA
71372012-03-26 Pedro Alves <palves@redhat.com>
7138
7139 * server.c (handle_qxfer_libraries): Don't bail early if
7140 the_target->qxfer_libraries_svr4 is not NULL.
7141
fb723180
PA
71422012-03-26 Pedro Alves <palves@redhat.com>
7143
7144 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7145
0afae3cf
PA
71462012-03-23 Pedro Alves <palves@redhat.com>
7147
7148 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7149 "library-list-svr4" element's start tag when the the DSO list is
7150 empty.
7151
485f1ee4
PA
71522012-03-23 Pedro Alves <palves@redhat.com>
7153
7154 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7155 a variable whose type size is the same as the inferior's pointer
7156 size.
7157
a5362b9a
TS
71582012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7159
7160 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7161 struct siginfo.
7162 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7163 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7164 * linux-low.h: Include <signal.h>.
7165 (struct siginfo): Remove forward declaration.
7166 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7167 struct siginfo.
7168
d226c142
MF
71692012-03-21 Mike Frysinger <vapier@gentoo.org>
7170
7171 * .gitignore: Ignore more files.
7172
122f36ef
PA
71732012-03-19 Pedro Alves <palves@redhat.com>
7174 Jan Kratochvil <jan.kratochvil@redhat.com>
7175
7176 * server.c (cont_thread, general_thread): Add describing comments.
7177 (start_inferior): Clear `cont_thread'.
7178 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7179 of a process.
7180
fc3e5175
YQ
71812012-03-15 Yao Qi <yao@codesourcery.com>
7182
7183 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7184 handling to ...
7185 (cmd_qtdp): ... here.
7186
8d0d92cd
YQ
71872012-03-15 Yao Qi <yao@codesourcery.com>
7188
7189 * tracepoint.c (struct tracepoint_action_ops): New.
7190 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7191 (m_tracepoint_action_download): New.
7192 (r_tracepoint_action_download): New.
7193 (x_tracepoint_action_download): New.
7194 (l_tracepoint_action_download): New.
7195 (add_tracepoint_action): Install `action->ops' according type.
7196 (download_tracepoint_1): Move code `download' function pointer
7197 of various tracepoint_action_ops.
7198
87b0bb13
JK
71992012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7200
7201 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7202 linux_ptrace_attach_warnings.
7203
5f572dec
JK
72042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7205
7206 * Makefile.in (linux-ptrace.o): New.
7207 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7208 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7209 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7210 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7211 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7212 of these targets.
7213 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7214
f4647387
YQ
72152012-03-08 Yao Qi <yao@codesourcery.com>
7216 Pedro Alves <palves@redhat.com>
7217
7218 Fix PR server/13392.
7219 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7220 offset of JMP insn.
7221 * tracepoint.c (remove_tracepoint): New.
7222 (cmd_qtdp): Call remove_tracepoint when failed to install.
7223
9b224c5e
PA
72242012-03-07 Pedro Alves <palves@redhat.com>
7225
7226 * linux-low.c (get_detach_signal): New.
7227 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7228 Pass on pending signals to PTRACE_DETACH. Check the result of the
7229 ptrace call.
7230 * server.c (program_signals, program_signals_p): New.
7231 (handle_general_set): Handle QProgramSignals.
7232 * server.h (program_signals, program_signals_p): Declare.
7233
e237a7e2
JK
72342012-03-05 Pedro Alves <palves@redhat.com>
7235 Jan Kratochvil <jan.kratochvil@redhat.com>
7236
7237 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7238 New comment why.
7239
5808517f
YQ
72402012-03-03 Yao Qi <yao@codesourcery.com>
7241
7242 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7243 agent_look_up_symbols.
7244
58b4daa5
YQ
72452012-03-03 Yao Qi <yao@codesourcery.com>
7246
7247 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7248 (linux-x86-low.o): Likewise.
7249 * server.h: Remove in_process_agent_loaded.
7250 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7251 common/agent.c.
7252 Update callers.
7253
8ffcbaaf
YQ
72542012-03-03 Yao Qi <yao@codesourcery.com>
7255
7256 * tracepoint.c (gdb_agent_capability): New global.
7257 (in_process_agent_loaded_ust): Renamed to
7258 `in_process_agent_supports_ust'.
7259 Update callers.
7260 (in_process_agent_supports_ust): Call agent_capability_check.
7261 (clear_installed_tracepoints): Assert that agent supports
7262 agent.
7263
d1feda86
YQ
72642012-03-03 Yao Qi <yao@codesourcery.com>
7265
7266 * linux-low.c (linux_supports_agent): New.
7267 (linux_target_ops): Initialize field `supports_agent' with
7268 linux_supports_agent.
7269 * target.h (struct target_ops) <supports_agent>: New.
7270 (target_supports_agent): New macro.
7271 * server.c (handle_general_set): Handle packet 'QAgent'.
7272 (handle_query): Send `QAgent+'.
7273 * Makefile.in (server.o): Depends on agent.h.
7274
2fa291ac
YQ
72752012-03-03 Yao Qi <yao@codesourcery.com>
7276
7277 * Makefile.in (OBS): Add agent.o.
7278 Add new rule for agent.o.
7279 Track dependence of tracepoint.c on agent.h.
7280 * tracepoint.c (run_inferior_command_1):
7281 (run_inferior_command): Call agent_run_command.
7282 (gdb_ust_connect_sync_socket): Deleted. Move it to
7283 common/agent.c.
7284 (resume_thread, stop_thread): Likewise.
7285 (gdb_ust_socket_init): Renamed to ...
7286 (gdb_agent_socket_init): ... New.
7287 (gdb_ust_thread): Renamed to ...
7288 (gdb_agent_helper_thread): ... New.
7289 (gdb_ust_init): Move some code to ...
7290 (gdb_agent_init): ... here. New.
7291 [HAVE_UST]: Call gdb_ust_init.
7292 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7293 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7294 * config.in, configure: Regenerated.
7295
05044653
PA
72962012-03-02 Pedro Alves <palves@redhat.com>
7297
7298 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7299 * linux-low.c (struct simple_pid_list): New.
7300 (stopped_pids): New a struct simple_pid_list pointer.
7301 (add_to_pid_list, pull_pid_from_list): New.
7302 (handle_extended_wait): Don't assume the first signal new children
7303 report is SIGSTOP. Adjust call to pull_pid_from_list.
7304 (linux_wait_for_lwp): Adjust.
7305
8d00225b
YQ
73062012-03-02 Yao Qi <yao@codesourcery.com>
7307
7308 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7309 debug log.
7310
19560ba5
YQ
73112012-03-02 Yao Qi <yao@codesourcery.com>
7312
7313 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7314 `stop_pc' and `tpoint'. Update caller.
7315
1faeff08
MR
73162012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7317
7318 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7319 * linux-low.c (use_linux_regsets): New macro.
7320 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7321 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7322 (linux_register_in_regsets): New function.
7323 (usr_fetch_inferior_registers): Skip registers covered by
7324 regsets.
7325 (usr_store_inferior_registers): Likewise.
7326 (usr_fetch_inferior_registers): New macro.
7327 (usr_store_inferior_registers): Likewise.
7328 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7329 (linux_store_registers): Likewise.
7330 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7331 prototype.
7332 (init_registers_mips64_dsp_linux): Likewise.
7333 (init_registers_mips_linux): New macro.
7334 (init_registers_mips_dsp_linux): Likewise.
7335 (mips_dsp_num_regs): Likewise.
7336 (DSP_BASE, DSP_CONTROL): New fallback macros.
7337 (mips_base_regs): New macro.
7338 (mips_regmap): Use it. Fix the size.
7339 (mips_dsp_regmap): New variable.
7340 (mips_dsp_regset_bitmap): Likewise.
7341 (mips_arch_setup): New function.
7342 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7343 than mips_regmap.
7344 (mips_cannot_store_register): Likewise.
7345 (the_low_target): Update .arch_setup, .num_regs and .regmap
7346 initializers. Add .regset_bitmap initializer.
7347 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7348 initializer.
7349 * linux-bfin-low.c (the_low_target): Likewise.
7350 * linux-cris-low.c (the_low_target): Likewise.
7351 * linux-crisv32-low.c (the_low_target): Likewise.
7352 * linux-ia64-low.c (the_low_target): Likewise.
7353 * linux-m32r-low.c (the_low_target): Likewise.
7354 * linux-m68k-low.c (the_low_target): Likewise.
7355 * linux-ppc-low.c (the_low_target): Likewise.
7356 * linux-s390-low.c (the_low_target): Likewise.
7357 * linux-sh-low.c (the_low_target): Likewise.
7358 * linux-sparc-low.c (the_low_target): Likewise.
7359 * linux-tic6x-low.c (the_low_target): Likewise.
7360 * linux-x86-low.c (the_low_target): Likewise.
7361 * linux-xtensa-low.c (the_low_target): Likewise.
7362 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7363 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7364 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7365 srv_xmlfiles.
7366 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7367 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7368
c03e6ccc
YQ
73692012-02-29 Yao Qi <yao@codesourcery.com>
7370 Pedro Alves <palves@redhat.com>
7371
7372 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7373 `step_over_finished' is true.
7374
644cebc9
PA
73752012-02-27 Pedro Alves <palves@redhat.com>
7376
7377 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7378 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7379
c14d7ab2
PA
73802012-02-27 Pedro Alves <palves@redhat.com>
7381
7382 PR server/9684
7383 * linux-low.c (pid_is_stopped): New.
7384 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7385
412c89dd
LM
73862012-02-25 Luis Machado <lgustavo@codesourcery.com>
7387
7388 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7389 of conditions.
7390
b745defe
MR
73912012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7392
7393 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7394
9f3a5c85
LM
73952012-02-24 Luis Machado <lgustavo@codesourcery>
7396
7397 * server.c (handle_query): Advertise support for target-side
7398 breakpoint condition evaluation.
7399 (process_point_options): New function.
7400 (process_serial_event): When inserting a breakpoint, check for
7401 a target-side condition that should be evaluated.
7402
7403 * mem-break.c: Include regcache.h and ax.h.
7404 (point_cond_list_t): New data structure.
7405 (breakpoint) <cond_list>: New field.
7406 (find_gdb_breakpoint_at): Make non-static.
7407 (delete_gdb_breakpoint_at): Clear any target-side
7408 conditions.
7409 (clear_gdb_breakpoint_conditions): New function.
7410 (add_condition_to_breakpoint): Likewise.
7411 (add_breakpoint_condition): Likewise.
7412 (gdb_condition_true_at_breakpoint): Likewise.
7413 (gdb_breakpoint_here): Return result directly instead
7414 of going through a local variable.
7415
7416 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7417 (clear_gdb_breakpoint_conditions): Likewise.
7418 (add_breakpoint_condition): Likewise.
7419 (gdb_condition_true_at_breakpoint): Likewise.
7420
7421 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7422 (need_step_over_p): Take target-side breakpoint condition into
7423 consideration.
7424
5e1dc496
LM
74252012-02-24 Luis Machado <lgustavo@codesourcery>
7426
7427 * server.h: Include tracepoint.h.
7428 (agent_mem_read, agent_get_trace_state_variable_value,
7429 agent_set_trace_state_variable_value,
7430 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7431 get_set_tsv_func_addr): New prototypes.
7432
7433 * ax.h: New include file.
7434 * ax.c: New source file.
7435
7436 * tracepoint.c: Include ax.h.
7437 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7438 agent_expr, eval_result_type): Move to ax.h.
7439 (parse_agent_expr): Rename to ...
7440 (gdb_parse_agent_expr): ... this, make it non-static and move
7441 to ax.h.
7442 (unparse_agent_expr) Rename to ...
7443 (gdb_unparse_agent_expr): ... this, make it non-static and move
7444 to ax.h.
7445 (eval_agent_expr): Rename to ...
7446 (eval_tracepoint_agent_expr): ... this.
7447 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7448 forward declarations.
7449 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7450 (agent_get_trace_state_variable_value): New function.
7451 (agent_set_trace_state_variable_value): New function.
7452 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7453 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7454 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7455 (condition_true_at_tracepoint): Likewise.
7456 (parse_agent_expr): Rename to ...
7457 (gdb_parse_agent_expr): ... this and move to ax.c.
7458 (unparse_agent_expr): Rename to ...
7459 (gdb_unparse_agent_expr): ... this and move to ax.c.
7460 (gdb_agent_op_name): Move to ax.c.
7461 (eval_agent_expr): Rename to ...
7462 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7463 and move to ax.c.
7464 (eval_tracepoint_agent_expr): New function.
7465 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7466 non-static.
5e1dc496
LM
7467 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7468 ax.c.
7469 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7470 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7471 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7472 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7473 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7474 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7475 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7476 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7477 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7478 (compile_bytecodes): Remove forward declaration.
7479 (is_goto_target): Move to ax.c.
7480 (compile_bytecodes): Move to ax.c and call
7481 agent_get_trace_state_variable_value (...) and
7482 agent_set_trace_state_variable_value (...).
7483
7484 * Makefile.in: Update ax.c and IPA dependencies.
7485
277e4e52
PA
74862012-02-24 Pedro Alves <palves@redhat.com>
7487
7488 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7489 (cmd_bigqtbuffer_circular): ... this. Only handle
7490 'QTBuffer:circular:'.
7491 (handle_tracepoint_general_set): Adjust.
7492
bf4c19f7
YQ
74932012-02-16 Yao Qi <yao@codesourcery.com>
7494
7495 * inferiors.c: Move code to ...
7496 * dll.c: .... here. New.
7497 * server.h: Declare clear_dlls.
7498 * Makefile.in (SFILES): Add dll.c.
7499 (OBS): Add dll.o
7500 (dll.o): New rule.
7501
d73f2619
YQ
75022012-02-11 Yao Qi <yao@codesourcery.com>
7503
7504 * server.c: (handle_monitor_command): Add a new parameter
7505 `own_buf'.
7506 (handle_query): Update caller.
7507
f8255c2a
JB
75082012-02-09 Joel Brobecker <brobecker@adacore.com>
7509
7510 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7511 * configure, config.in: Regenerate.
7512 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7513 is not defined.
7514
da84f473
PA
75152012-02-02 Pedro Alves <palves@redhat.com>
7516
7517 Try SIGKILL first, then PTRACE_KILL.
7518 * linux-low.c (linux_kill_one_lwp): New.
7519 (linux_kill_one_lwp): Rename to ...
7520 (kill_one_lwp_callback): ... this. Use the new
7521 linux_kill_one_lwp.
7522
e886a173
PA
75232012-02-02 Pedro Alves <palves@redhat.com>
7524
7525 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7526 inferior.
7527
be07f1a2
PA
75282012-01-27 Pedro Alves <palves@redhat.com>
7529
7530 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7531 (elf_64_file_p): Make static.
7532 (linux_pid_exe_is_elf_64_file): New.
7533 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7534 Delete declarations.
7535 (linux_pid_exe_is_elf_64_file): Declare.
7536 * linux-x86-low.c (x86_arch_setup): Use
7537 linux_pid_exe_is_elf_64_file.
7538
d8301ad1
JK
75392012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7540
7541 * linux-low.c (linux_wait_for_event_1): Rename to ...
7542 (linux_wait_for_event): ... here and merge it with former
7543 linux_wait_for_event - new variable wait_ptid, use it.
7544 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7545
01b17894
PA
75462012-01-23 Pedro Alves <palves@redhat.com>
7547
7548 * server.c (main): Avoid yet another case of infinite loop while
7549 detaching/killing after a longjmp.
7550
e825046f
JK
75512012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7552
7553 Code cleanup.
7554 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7555
b9e7b9c3
UW
75562012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7557
7558 * hostio.c (handle_readlink): New function.
7559 (handle_vFile): Call it to handle "vFile:readlink" packets.
7560
901f9912
UW
75612012-01-20 Pedro Alves <palves@redhat.com>
7562 Ulrich Weigand <ulrich.weigand@linaro.org>
7563
7564 * server.c (handle_v_requests): Only support vAttach and vRun to
7565 start multiple processes when in extended protocol mode.
7566
fc1ab1a0
PA
75672012-01-17 Pedro Alves <palves@redhat.com>
7568
7569 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7570 memalign plus mprotect to allocate the scratch buffer.
7571
7d5d4e98
PA
75722012-01-13 Pedro Alves <palves@redhat.com>
7573
7574 * server.c (attach_inferior): Clear `cont_thread'.
7575
f128d5e9
PA
75762012-01-13 Pedro Alves <palves@redhat.com>
7577
7578 * server.c (main): Avoid infinite loop while detaching/killing
7579 after a longjmp.
7580
06db92f0
DE
75812012-01-09 Doug Evans <dje@google.com>
7582
7583 * server.c (start_inferior): Set last_ptid in --wrapper case.
7584
32d92999
YQ
75852012-01-06 Yao Qi <yao@codesourcery.com>
7586
7587 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7588 defined.
7589 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7590
5e0a92a9
YQ
75912012-01-04 Yao Qi <yao@codesourcery.com>
7592
7593 * tracepoint.c (cmd_qtdp): Print debug message
7594 for static tracepoint.
7595
ae639e8c
YQ
75962012-01-04 Yao Qi <yao@codesourcery.com>
7597
7598 * tracepoint.c (trace_vdebug): Differentiate debug message
7599 between gdbserver and IPA.
7600
f72429c5
YQ
76012012-01-03 Yao Qi <yao@codesourcery.com>
7602
7603 * tracepoint.c (tracepoint_was_hit): Don't collect for
7604 static tracepoint.
7605
12c3e59c
JB
76062012-01-02 Joel Brobecker <brobecker@adacore.com>
7607
7608 * terminal.h: Reformat copyright header.
7609
67827812
JB
76102012-01-02 Joel Brobecker <brobecker@adacore.com>
7611
7612 * server.c (gdbserver_version): Update copyright year.
7613 * gdbreplay.c (gdbreplay_version): Likewise.
7614
3e52c33d
JK
76152011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7616
7617 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7618
7619 Revert:
7620 2011-12-18 Hui Zhu <teawater@gmail.com>
7621 * linux-low.c (linux_create_inferior): Save return value to ret.
7622
66f1260e
HZ
76232011-12-18 Hui Zhu <teawater@gmail.com>
7624
7625 * linux-low.c (linux_create_inferior): Save return value to ret.
7626
e77616d7
DE
76272011-12-16 Doug Evans <dje@google.com>
7628
e7b06c57
DE
7629 * linux-low.c (linux_create_inferior): If stdio connection,
7630 redirect stdin from /dev/null, stdout to stderr.
7631 * remote-utils.c (remote_is_stdio): New static global.
7632 (remote_connection_is_stdio): New function.
7633 (remote_prepare): Handle stdio connection.
7634 (remote_open): Ditto.
7635 (remote_close): Don't close stdin for stdio connections.
7636 (read_prim,write_prim): New functions. Replace all calls to
7637 read/write to these.
7638 * server.c (main): Watch for "-" argument. Move call to
7639 remote_prepare before start_inferior.
7640 * server.h (STDIO_CONNECTION_NAME): New macro.
7641 (remote_connection_is_stdio): Declare.
7642
e77616d7
DE
7643 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7644 in debugging output.
7645
82067193
YQ
76462011-12-15 Yao Qi <yao@codesourcery.com>
7647
7648 * tracepoint.c: Include sys/syscall.h.
7649 (gdb_ust_thread): Remove preprocessor conditional.
7650
82bfbe7e
PA
76512011-12-14 Pedro Alves <pedro@codesourcery.com>
7652
7653 * linux-low.c (linux_detach_one_lwp): Call
7654 the_low_target.prepare_to_resume before detaching.
7655
712c6575
YQ
76562011-12-14 Yao Qi <yao@codesourcery.com>
7657
7658 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7659 of write.
7660
d54d1edf
YQ
76612011-12-14 Yao Qi <yao@codesourcery.com>
7662
7663 * i386-low.c (i386_low_stopped_data_address): Initialize local
7664 variable `control'.
7665
6210a125
PA
76662011-12-13 Pedro Alves <pedro@codesourcery.com>
7667
7668 PR remote/13492
7669
7670 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7671 DR_CONTROL unless necessary. Extend comments.
7672 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7673 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7674
2ece8244
YQ
76752011-12-13 Yao Qi <yao@codesourcery.com>
7676
7677 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7678 macros.
7679 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7680
784867a5
JK
76812011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7682
7683 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7684 Print new debug message for such case.
7685
6bf36717
JK
76862011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7687
7688 Fix overlapping memcpy.
7689 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7690 the read_inferior_memory transfer.
7691 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7692 write_inferior_memory transfer.
7693 (set_fast_tracepoint_jump): New variable buf. Use it for the
7694 read_inferior_memory and write_inferior_memory transfers.
7695 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7696 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7697 Use it for the write_inferior_memory transfer.
7698 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7699 buffers.
7700
50275556
MR
77012011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7702
7703 * linux-low.c (fetch_register, store_register): Make code
7704 consistent, fix formatting.
7705
7325beb4
MR
77062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7707
7708 * linux-low.c (usr_store_inferior_registers): Factor out code
7709 to handle individual registers into...
7710 (store_register): ... this new function.
7711
c642a434
UW
77122011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7713
7714 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7715 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7716 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7717 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7718 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7719 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7720 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7721 (srv_xmlfiles): Add new XML files.
7722
7723 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7724 and <sys/uio.h>.
7725 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7726 (init_registers_s390_linux32v1): Add prototype.
7727 (init_registers_s390_linux32v2): Likewise.
7728 (init_registers_s390_linux64v1): Likewise.
7729 (init_registers_s390_linux64v2): Likewise.
7730 (init_registers_s390x_linux64v1): Likewise.
7731 (init_registers_s390x_linux64v2): Likewise.
7732 (s390_num_regs): Increment to 52.
7733 (s390_regmap): Add orig_r2 register.
7734 (s390_num_regs_3264): Increment to 68.
7735 (s390_regmap_3264): Add orig_r2 register.
7736 (s390_collect_ptrace_register): Handle orig_r2 register.
7737 (s390_supply_ptrace_register): Likewise.
7738 (s390_fill_last_break): New function.
7739 (s390_store_last_break): Likewise.
7740 (s390_fill_system_call): New function.
7741 (s390_store_system_call): Likewise.
7742 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7743 register sets.
7744 (s390_check_regset): New function.
7745 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7746 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7747 Update target_regsets for available register sets.
7748
2268b414
JK
77492011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7750 Jan Kratochvil <jan.kratochvil@redhat.com>
7751
7752 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7753 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7754 New.
7755 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7756 * linux-low.h (struct process_info_private): New member r_debug.
7757 * server.c (handle_qxfer_libraries): Call
7758 the_target->qxfer_libraries_svr4.
7759 (handle_qxfer_libraries_svr4): New function.
7760 (qxfer_packets): New entry "libraries-svr4".
7761 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7762 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7763 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7764 PACKET_qXfer_libraries_svr4.
7765
d6db1fab
UW
77662011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7767
7768 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7769 PSW address/mask between 8-byte and 16-byte formats.
7770 (s390_supply_ptrace_register): Likewise.
7771 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7772 basic addressing mode bit.
7773
242f5f1c
SS
77742011-11-24 Stan Shebs <stan@codesourcery.com>
7775
7776 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7777
f196051f
SS
77782011-11-17 Stan Shebs <stan@codesourcery.com>
7779
7780 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7781 (tracing_start_time): New global.
7782 (tracing_stop_time): New global.
7783 (tracing_user_name): New global.
7784 (tracing_notes): New global.
7785 (tracing_stop_note): New global.
7786 (cmd_qtstart): Set traceframe_usage, start_time.
7787 (stop_tracing): Set stop_time.
7788 (cmd_qtstatus): Report additional status.
7789 (cmd_qtp): New function.
7790 (handle_tracepoint_query): Call it.
7791 (cmd_qtnotes): New function.
7792 (handle_tracepoint_general_set): Call it.
7793 (get_timestamp): Rename from tsv_get_timestamp.
7794
405f8e94
SS
77952011-11-14 Stan Shebs <stan@codesourcery.com>
7796 Kwok Cheung Yeung <kcy@codesourcery.com>
7797
7798 * linux-x86-low.c (small_jump_insn): New.
7799 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7800 trampoline and error message, build a trampoline and issue a small
7801 jump instruction to it.
7802 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7803 trampoline and error message.
7804 (x86_get_min_fast_tracepoint_insn_len): New.
7805 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7806 * linux-low.h (struct linux_target_ops): Add arguments to
7807 install_fast_tracepoint_jump_pad operation, add new operation.
7808 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7809 arguments.
7810 (linux_get_min_fast_tracepoint_insn_len): New function.
7811 (linux_target_op): Add new operation.
7812 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7813 (gdb_trampoline_buffer_end): Ditto.
7814 (gdb_trampoline_buffer_error): Ditto.
7815 (struct ipa_sym_addresses): Add fields for new IPA variables.
7816 (symbol_list): Add entries for new IPA variables.
7817 (struct tracepoint): Add fields to hold the address range of the
7818 trampoline used by the tracepoint.
7819 (trampoline_buffer_head): New static variable.
7820 (trampoline_buffer_tail): Ditto.
7821 (claim_trampoline_space): New function.
7822 (have_fast_tracepoint_trampoline_buffer): New function.
7823 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7824 structure.
7825 (install_fast_tracepoint): Ditto, also add error buffer argument.
7826 (cmd_qtminftpilen): New function.
7827 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7828 (fast_tracepoint_from_trampoline_address): New function.
7829 (fast_tracepoint_collecting): Handle trampoline as part of jump
7830 pad space.
7831 (set_trampoline_buffer_space): New function.
7832 (initialize_tracepoint): Initialize new IPA variables.
7833 * target.h (struct target_ops): Add arguments to
7834 install_fast_tracepoint_jump_pad operation, add new
7835 get_min_fast_tracepoint_insn_len operation.
7836 (target_get_min_fast_tracepoint_insn_len): New.
7837 (install_fast_tracepoint_jump_pad): Add arguments.
7838 * server.h (IPA_BUFSIZ): Define.
7839 * linux-i386-ipa.c: Include extra header files.
7840 (initialize_fast_tracepoint_trampoline_buffer): New function.
7841 (initialize_low_tracepoint): Call it.
7842 * server.h (set_trampoline_buffer_space): Declare.
7843 (claim_trampoline_space): Ditto.
7844 (have_fast_tracepoint_trampoline_buffer): Ditto.
7845
1e4d1764
YQ
78462011-11-14 Yao Qi <yao@codesourcery.com>
7847
7848 * server.c (handle_query): Handle InstallInTrace for qSupported.
7849 * tracepoint.c (add_tracepoint): Sort list.
7850 (install_tracepoint, download_tracepoint): New.
7851 (cmd_qtdp): Call them to install and download tracepoints.
7852 (sort_tracepoints): Removed.
7853 (cmd_qtstart): Update.
7854
5c73ff4e
YQ
78552011-11-14 Yao Qi <yao@codesourcery.com>
7856
7857 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7858 * mem-break.h: Declare.
7859 * tracepoint.c (cmd_qtstart): Move some code to ...
7860 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7861 New.
7862 (download_tracepoints): Move some code to ...
7863 (download_tracepoint_1): ... here. New.
7864
86a30030
YQ
78652011-11-08 Yao Qi <yao@codesourcery.com>
7866
7867 * remote-utils.c (relocate_instruction): A comment fix.
7868
8d26e50c
JB
78692011-11-07 Joel Brobecker <brobecker@adacore.com>
7870
7871 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7872 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7873 dr_status_mirror and dr_control_mirror from debug_reg_state.
7874 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7875 (i386_initial_stuff): Remove use of deleted globals.
7876 (i386_get_thread_context, i386_set_thread_context,
7877 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7878 from debug_reg_state.
7879
a59306a3
YQ
78802011-11-05 Yao Qi <yao@codesourcery.com>
7881
7882 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7883 address as TPOINT's.
7884
3065dfb6
SS
78852011-11-02 Stan Shebs <stan@codesourcery.com>
7886
7887 * tracepoint.c (agent_mem_read_string): New function.
7888 (eval_agent_expr): Call it for tracenz.
7889 * server.c (handle_query): Report support for tracenz.
7890
fd0d8c7c
YQ
78912011-11-02 Yao Qi <yao@codesourcery.com>
7892
7893 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7894
609086b1
YQ
78952011-11-02 Yao Qi <yao@codesourcery.com>
7896
7897 * target.h: Fix a typo in comment.
7898
b9fd1791
PA
78992011-10-31 Pedro Alves <pedro@codesourcery.com>
7900
7901 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7902 clobber the breakpoints' shadows with fast tracepoint jumps.
7903 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7904 * target.c (write_inferior_memory): Also pass MYADDR down to
7905 check_mem_write.
7906
03583c20
UW
79072011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7908
7909 * configure.ac: Check support for personality routine.
7910 * configure: Regenerate.
7911 * config.in: Likewise.
7912 * linux-low.c: Include <sys/personality.h>.
7913 Define ADDR_NO_RANDOMIZE if necessary.
7914 (linux_create_inferior): Disable address space randomization when
7915 forking inferior, if requested.
7916 (linux_supports_disable_randomization): New function.
7917 (linux_target_ops): Install it.
7918 * server.h (disable_randomization): Declare.
7919 * server.c (disable_randomization): New global variable.
7920 (handle_general_set): Handle QDisableRandomization.
7921 (handle_query): Likewise for qSupported.
7922 (main): Support --disable-randomization and --no-disable-randomization
7923 command line arguments.
7924 * target.h (struct target_ops): Add supports_disable_randomization.
7925 (target_supports_disable_randomization): New macro.
7926
723b724b
MF
79272011-09-29 Mike Frysinger <vapier@gentoo.org>
7928
7929 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7930 ifdef check.
7931 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7932 [!PT_GETDSBT] (target_loadmap): New definition.
7933 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7934 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7935 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7936 and PT_GETDSBT to LINUX_LOADMAP.
7937 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7938 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7939
55329a5c 79402011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7941
7942 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7943 (arm_linux_hwbp_cap): New static variable.
7944 (arm_linux_get_hwbp_cap): Replace by ...
7945 (arm_linux_init_hwbp_cap): ... this new function.
7946 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7947 (arm_linux_get_hw_watchpoint_count): Likewise.
7948 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7949 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7950 (arm_prepare_to_resume): Use perror_with_name instead of error.
7951
55329a5c 79522011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7953
7954 * linux-arm-low.c: Include <signal.h>.
7955 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7956 (struct arm_linux_hwbp_cap): New data type.
7957 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7958 (struct arm_linux_hw_breakpoint): New data type.
7959 (MAX_BPTS, MAX_WPTS): Define.
7960 (struct arch_process_info, struct arch_lwp_info): New data types.
7961 (arm_linux_get_hwbp_cap): New function.
7962 (arm_linux_get_hw_breakpoint_count): Likewise.
7963 (arm_linux_get_hw_watchpoint_count): Likewise.
7964 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7965 (arm_hwbp_control_initialize): Likewise.
7966 (arm_hwbp_control_is_enabled): Likewise.
7967 (arm_hwbp_control_is_initialized): Likewise.
7968 (arm_hwbp_control_disable): Likewise.
7969 (arm_linux_hw_breakpoint_equal): Likewise.
7970 (arm_linux_hw_point_initialize): Likewise.
7971 (struct update_registers_data): New data structure.
7972 (update_registers_callback: New function.
7973 (arm_insert_point): Likewise.
7974 (arm_remove_point): Likewise.
7975 (arm_stopped_by_watchpoint): Likewise.
7976 (arm_stopped_data_address): Likewise.
7977 (arm_new_process): Likewise.
7978 (arm_new_thread): Likewise.
7979 (arm_prepare_to_resume): Likewise.
7980 (the_low_target): Register arm_insert_point, arm_remove_point,
7981 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7982 arm_new_thread, and arm_prepare_to_resume.
7983
6b9801d4
SS
79842011-09-15 Stan Shebs <stan@codesourcery.com>
7985
7986 * server.h (struct emit_ops): Add compare-goto fields.
7987 * tracepoint.c (gdb_agent_op_sizes): New table.
7988 (emit_eq_goto): New function.
7989 (emit_ne_goto): New function.
7990 (emit_lt_goto): New function.
7991 (emit_le_goto): New function.
7992 (emit_gt_goto): New function.
7993 (emit_ge_goto): New function.
7994 (is_goto_target): New function.
7995 (compile_bytecodes): Recognize special cases of compare-goto
7996 combinations and call specialized emitters for them.
7997 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7998 (amd64_emit_ne_goto): New function.
7999 (amd64_emit_lt_goto): New function.
8000 (amd64_emit_le_goto): New function.
8001 (amd64_emit_gt_goto): New function.
8002 (amd64_emit_ge_goto): New function.
8003 (amd64_emit_ops): Add the new functions.
8004 (i386_emit_eq_goto): New function.
8005 (i386_emit_ne_goto): New function.
8006 (i386_emit_lt_goto): New function.
8007 (i386_emit_le_goto): New function.
8008 (i386_emit_gt_goto): New function.
8009 (i386_emit_ge_goto): New function.
8010 (i386_emit_ops): Add the new functions.
8011
bf15cbda
SS
80122011-09-08 Stan Shebs <stan@codesourcery.com>
8013
8014 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8015 (i386_emit_epilogue): Restore %ebx.
8016
943ca1dd
JZ
80172011-08-31 Jie Zhang <jzhang918@gmail.com>
8018
8019 * server.c (step_thread): Remove definition.
8020 (process_serial_event): Don't handle Hs.
8021 * server.h (step_thread): Remove declaration.
8022 * target.c (set_desired_inferior): Remove use of step_thread.
8023
e3deef73
LM
80242011-08-24 Luis Machado <lgustavo@codesourcery.com>
8025
8026 * linux-low.c: Include linux-procfs.h.
8027 (linux_attach_lwp_1): Update comments.
8028 (linux_attach): Scan for existing threads when attaching to a
8029 process that is the tgid.
8030 * Makefile.in: Update dependencies.
8031
13da1c97
LM
80322011-08-24 Luis Machado <lgustavo@codesourcery.com>
8033
8034 * configure.srv: Add linux-procfs.o dependencies.
8035
881127c9
YQ
80362011-08-14 Yao Qi <yao@codesourcery.com>
8037
8038 * target.h (struct target_ops): Fix indent.
8039 * win32-low.c (win32_target_ops): Fix comment.
8040
58dbd541
YQ
80412011-08-14 Andrew Jenner <andrew@codesourcery.com>
8042 Yao Qi <yao@codesourcery.com>
8043
8044 * Makefile.in (clean): Remove tic6x-*.c files.
8045 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8046 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8047 (tic6x-c64xp-linux.c): Likewise.
8048 * configure.srv: Add support for tic6x-*-uclinux.
8049 * linux-tic6x-low.c: New.
8050 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8051
78d85199
YQ
80522011-08-14 Andrew Stubbs <ams@codesourcery.com>
8053 Yao Qi <yao@codesourcery.com>
8054
8055 * target.h (struct target_ops): Add read_loadmap.
8056 * linux-low.c (struct target_loadseg): New type.
8057 (struct target_loadmap): New type.
8058 (linux_read_loadmap): New function.
8059 (linux_target_ops): Add linux_read_loadmap.
8060 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8061 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8062 to NULL.
78d85199 8063
a959a88d
EZ
80642011-08-05 Eli Zaretskii <eliz@gnu.org>
8065
8066 * win32-low.c: Include <stdint.h>.
8067
1ced966e
PA
80682011-07-22 Pedro Alves <pedro@codesourcery.com>
8069
8070 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8071 to the inferior here.
8072 (i386_remove_aligned_watchpoint): Ditto.
8073 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8074 fit part of the watchpoint in the debug registers.
8075 (i386_update_inferior_debug_regs): New.
8076 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8077 registers, and only update the inferior on success.
8078 (i386_low_remove_watchpoint): Ditto.
8079
d26e3629
KY
80802011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8081
8082 * linux-low.c (compare_ints, unique, list_threads, show_process,
8083 linux_core_of_thread): Delete.
8084 (linux_target_ops): Change linux_core_of_thread to
8085 linux_common_core_of_thread.
8086 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8087 * utils.c (malloc_failure): Change type of argument.
8088 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8089 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8090 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8091 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8092 (IPA_OBJS): Add common-utils-ipa.o.
8093 (ptid_h, linux_osdata_h): New macros.
8094 (server_h): Add common/common-utils.h, common/xml-utils.h,
8095 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8096 common/ptid.h.
8097 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8098 ptid.o, buffer.o): New rules.
8099 (linux-low.o): Add common/linux-osdata.h as a dependency.
8100 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8101 * configure.ac: Add AC_HEADER_DIRENT check.
8102 * config.in: Regenerate.
8103 * configure: Regenerate.
8104 * remote-utils.c (xml_escape_text): Delete.
8105 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8106 buffer_xml_printf): Move to common/buffer.c.
8107 * server.c (main): Remove call to initialize_inferiors.
8108 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8109 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8110 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8111 internal_error, gdb_assert, gdb_assert_fail): Delete.
8112 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8113 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8114 common/buffer.h.
8115 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8116 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8117 initialize_inferiors): Delete.
8118
2275a1a7
PA
81192011-07-20 Pedro Alves <pedro@codesourcery.com>
8120
8121 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8122 symbol error.
8123
0a5b1e09
PA
81242011-05-31 Pedro Alves <pedro@codesourcery.com>
8125
8126 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8127 assertion.
8128 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8129
6938fd34
YQ
81302011-05-26 Yao Qi <yao@codesourcery.com>
8131
8132 * Makefile.in (thread-db.o): Track dependence to
8133 common/gdb_thread_db.h.
8134 * thread-db.c: include gdb_thread_db.h from right place.
8135
b481f9e0
TT
81362011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8137
8138 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8139 __FILE__ and __LINE__ to internal_error.
8140
98a5dd13
DE
81412011-05-13 Doug Evans <dje@google.com>
8142
8143 * thread-db.c (try_thread_db_load_from_sdir): New function.
8144 (try_thread_db_load_from_dir): New function.
8145 (thread_db_load_search): Handle $sdir, ignore $pdir.
8146 Remove trying of system directories if search of
8147 libthread-db-search-path fails, that is now done via $sdir.
8148
d248b706
KY
81492011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8150
8151 * server.c (handle_query): Add EnableDisableTracepoints to the list
8152 of supported features.
43aaf8b6 8153 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8154 tracepoints.
43aaf8b6
PA
8155 (cmd_qtenable_disable): New.
8156 (cmd_qtstart): Install tracepoints even if disabled.
8157 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8158 receiving a QTEnable or QTDisable packet.
8159 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8160 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8161 tracepoints.
8162 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8163
84e578fb
DE
81642011-05-10 Doug Evans <dje@google.com>
8165
8166 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8167
71f55dd8
DE
81682011-05-04 Doug Evans <dje@google.com>
8169
8170 * linux-low.c (linux_join): Skip process lookup.
8171 * spu-low.c (spu_join): Ditto.
8172 * server.c (join_inferiors_callback): Delete.
8173 (process_serial_event): For 'D' packet (detach) call join_inferior
8174 directly.
8175
4d393d60
JM
81762011-05-04 Joseph Myers <joseph@codesourcery.com>
8177
8178 * README: Don't mention xscale*-*-linux*.
8179 * configure.srv (xscale*-*-linux*): Don't handle target.
8180
b00ad6ff
NF
81812011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8182
8183 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8184 casting pointers.
8185 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8186 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8187 (i386_emit_void_call_2): Likewise.
8188
af96c192
YQ
81892011-04-26 Yao Qi <yao@codesourcery.com>
8190
43aaf8b6
PA
8191 * linux-low.c: Move common macros to linux-ptrace.h.
8192 Include linux-ptrace.h.
af96c192
YQ
8193 * Makefile.in (linux_ptrace_h): New.
8194 (linux-low.o): Depends on linux-ptrace.h.
8195
03f2bd59
JK
81962011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8197
8198 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8199 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8200 (remote_prepare): New function with most of the TCP code from ...
8201 (remote_open): ... here. Detect PORT here unconditionally. Move also
8202 setting transport_is_reliable.
8203 * server.c (run_once): New variable.
8204 (gdbserver_usage): Document it.
8205 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8206 the first run if RUN_ONCE.
8207 * server.h (run_once, remote_prepare): New declarations.
8208
7a9dd1b2
TT
82092011-04-19 Tom Tromey <tromey@redhat.com>
8210
8211 * win32-low.c (handle_load_dll): Remove duplicate "the".
8212
81239425
PM
82132011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8214
8215 Remove support for old Cygwin 1.5 versions.
8216 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8217 function to avoid warning.
8218 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8219 warning.
8220
9e0627f1
PM
82212011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8222
8223 * gdbserver/server.h (Macro _): Define it if not available.
8224
588eebee
MS
82252011-03-14 Michael Snyder <msnyder@vmware.com>
8226
348af9f7 8227 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8228
43f70d4c
JB
82292011-03-10 Joel Brobecker <brobecker@adacore.com>
8230
8231 * Makefile.in (maintainer-clean realclean distclean): Remove
8232 "make ... subdir_do" command.
8233
348af9f7
MS
82342011-03-10 Michael Snyder <msnyder@vmware.com>
8235
8236 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8237
8238 * server.c (handle_v_run): Free alloced buffer on early return.
8239
e637a4f5
YQ
82402011-03-09 Yao Qi <yao@codesourcery.com>
8241
8242 Revert:
8243 2011-03-04 Yao Qi <yao@codesourcery.com>
8244
8245 * Makefile.in: Remove GNU make feature --directory.
8246
8247 2011-03-05 Yao Qi <yao@codesourcery.com>
8248
8249 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8250 (subdir_do): New make target. Copied from gdb/Makefile.
8251 (maintainer-clean, realclean, distclean, clean): Call corresponding
8252 make targets in common/Makefile.
8253
8254 2011-02-11 Yao Qi <yao@codesourcery.com>
8255
8256 * configure.ac: Call AC_PROG_RANLIB.
8257 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8258 * configure: Regenerate.
8259
e6edda56
JK
82602011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8261
8262 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8263
e5141119
JB
82642011-03-06 Yao Qi <yao@codesourcery.com>
8265
8266 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8267
64794aa4
JB
82682011-03-05 Yao Qi <yao@codesourcery.com>
8269
8270 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8271 (subdir_do): New make target. Copied from gdb/Makefile.
8272 (maintainer-clean, realclean, distclean, clean): Call corresponding
8273 make targets in common/Makefile.
8274
7a762829
YQ
82752011-03-04 Yao Qi <yao@codesourcery.com>
8276
8277 * Makefile.in: Remove GNU make feature --directory.
8278
348af9f7
MS
82792011-03-04 Michael Snyder <msnyder@vmware.com>
8280
8281 * server.c (queue_stop_reply): Call xmalloc not malloc.
8282
82832011-03-02 Michael Snyder <msnyder@vmware.com>
8284
8285 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8286
9f72fee2
MS
82872011-02-28 Michael Snyder <msnyder@vmware.com>
8288
588eebee
MS
8289 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8290 (cmd_qtframe): Ditto.
8291 (cmd_qtbuffer): Ditto.
8292 (cmd_bigqtbuffer): Ditto.
8293
9f72fee2
MS
8294 * utils.c (decimal2str): Initialize 'width' to nine, then
8295 don't mess with it.
8296
8040bd49
UW
82972011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8298
8299 * hostio.c (require_data): Free *data, not data.
8300
7e52cbd0
JK
83012011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8302
8303 * hostio.c (require_data): Use free, not xfree.
8304
9130f83e
MS
83052011-02-27 Michael Snyder <msnyder@vmware.com>
8306
4b812f4e
MS
8307 * server.c (handle_query): Discard unused value.
8308
9130f83e
MS
8309 * hostio.c (require_data): Free malloc memory before returning
8310 error.
8311
69d37113
MS
83122011-02-26 Michael Snyder <msnyder@vmware.com>
8313
8314 * linux-low.c (list_threads): Call closedir for dirent.
8315
35f5825a
MS
83162011-02-27 Michael Snyder <msnyder@vmware.com>
8317
2a589cef
MS
8318 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8319 a case statement falls through.
8320
0adea5f7
MS
8321 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8322
35f5825a
MS
8323 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8324 in comparison.
8325
238f1c74
MS
83262011-02-26 Michael Snyder <msnyder@vmware.com>
8327
8328 * utils.c (decimal2str): Eliminate dead code and dead param.
8329 (pulongest): Drop dead param from call to decimal2str.
8330 (plongest): Ditto.
8331
633ff500
JB
83322011-02-24 Joel Brobecker <brobecker@adacore.com>
8333
8334 Revert the following patch (not approved yet):
8335 2011-02-21 Hui Zhu <teawater@gmail.com>
8336 * tracepoint.c (tp_printf): New function.
8337 (eval_agent_expr): Handle gdb_agent_op_printf.
8338
f9c6ff72
HZ
83392011-02-21 Hui Zhu <teawater@gmail.com>
8340
8341 * tracepoint.c (tp_printf): New function.
8342 (eval_agent_expr): Handle gdb_agent_op_printf.
8343
94d5e490
TT
83442011-02-18 Tom Tromey <tromey@redhat.com>
8345
8346 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8347 (tracepoint.o): Likewise.
8348 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8349 (gdb_agent_op_names): Likewise.
8350
c7f96d2b
TT
83512011-02-18 Tom Tromey <tromey@redhat.com>
8352
8353 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8354 gdb_agent_op_rot>: New constants.
8355 (gdb_agent_op_names): Add pick and roll.
8356 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8357 cases.
8358
0feedb2c
JK
83592011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8360
8361 * aclocal.m4: Regenerated with aclocal-1.11.1.
8362
b3b9301e
PA
83632011-02-14 Pedro Alves <pedro@codesourcery.com>
8364
8365 * server.c (handle_qxfer_traceframe_info): New.
8366 (qxfer_packets): Register "traceframe-info".
8367 (handle_query): Report support for qXfer:traceframe-info:read+.
8368 * tracepoint.c (match_blocktype): New.
8369 (traceframe_find_block_type): Rename to ...
8370 (traceframe_walk_blocks): ... this. Add callback filter argument,
8371 and use it.
8372 (traceframe_find_block_type): New, reimplemented on top of
8373 traceframe_walk_blocks.
8374 (build_traceframe_info_xml): New.
8375 (traceframe_read_info): New.
8376 * server.h (traceframe_read_info): Declare.
8377
4f3e6fb7
YQ
83782011-02-11 Yao Qi <yao@codesourcery.com>
8379
8380 * configure.ac: Call AC_PROG_RANLIB.
8381 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8382 * configure: Regenerate.
8383
764880b7
PA
83842011-02-07 Pedro Alves <pedro@codesourcery.com>
8385
8386 * server.c (gdb_read_memory): Change return semantics to allow
8387 partial transfers.
8388 (handle_search_memory_1): Adjust.
8389 (process_serial_event) <'m' packet>: Handle partial transfers.
8390 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8391
1c79eb8a
PA
83922011-01-28 Pedro Alves <pedro@codesourcery.com>
8393
8394 * regcache.c (init_register_cache): Initialize
8395 regcache->register_status.
8396 (free_register_cache): Release regcache->register_status.
8397 (regcache_cpy): Copy register_status.
8398 (registers_to_string): Print 'x's for unavailable registers.
8399 (supply_register): Mark the register's status valid or
8400 unavailable, depending on whether a buffer was passed in or not.
8401 (supply_register_zeroed): New.
8402 (supply_regblock): Mark the registers' status valid or
8403 unavailable, depending on whether a buffer was passed in or not.
8404 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8405 (struct regcache): New `register_status' field.
8406 (supply_register_zeroed): Declare.
8407 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8408 supply_register_zeroed, rather than passing a NULL buffer to
8409 supply_register.
8410 * tracepoint.c (fetch_traceframe_registers): Update comment.
8411
85724a0e
PA
84122011-01-28 Pedro Alves <pedro@codesourcery.com>
8413
8414 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8415 buffer explicit.
8416
d08aafef
PA
84172011-01-25 Pedro Alves <pedro@codesourcery.com>
8418
8419 * server.h (decode_xfer_write): Change prototype.
8420 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8421 and don't extract the annex here.
8422 * server.c (decode_xfer_read): Remove `annex' parameter,
8423 and don't extract the annex here.
8424 (decode_xfer): New.
8425 (struct qxfer): New.
8426 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8427 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8428 (handle_qxfer_statictrace): New functions, abstracted out from
8429 handle_query, and made to use the struct qxfer interface.
8430 (handle_threads_qxfer_proper): Rename to ...
8431 (handle_qxfer_threads_proper): ... this.
8432 (handle_threads_qxfer): Rename to ...
8433 (handle_qxfer_threads): ... this. Adjust.
8434 (qxfer_packets): New array.
8435 (handle_qxfer): New function.
8436 (handle_query): Use handle_qxfer.
8437
493e2a69
MS
84382011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8439
8440 * gdbreplay.c: Shorten lines of >= 80 columns.
8441 * linux-low.c: Ditto.
8442 * linux-ppc-low.c: Ditto.
8443 * linux-s390-low.c: Ditto.
8444 * linux-sparc-low.c: Ditto.
8445 * linux-x86-low.c: Ditto.
8446 * linux-xtensa-low.c: Ditto.
8447 * mem-break.c: Ditto.
8448 * nto-low.c: Ditto.
8449 * regcache.h: Ditto.
8450 * remote-utils.c: Ditto.
8451 * server.c: Ditto.
8452 * server.h: Ditto.
8453 * thread-db.c: Ditto.
8454 * tracepoint.c: Ditto.
8455 * utils.c: Ditto.
8456 * win32-low.h: Ditto.
8457
44944448
JB
84582011-01-05 Joel Brobecker <brobecker@adacore.com>
8459
8460 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8461 update.
8462
71ce852c
JB
84632011-01-01 Joel Brobecker <brobecker@adacore.com>
8464
8465 * server.c (gdbserver_version): Update copyright year in version
8466 output.
8467 * gdbreplay.c (gdbreplay_version): Ditto.
8468
eb826dc6
MF
84692010-12-29 Jie Zhang <jie.zhang@analog.com>
8470
8471 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8472 * linux-bfin-low.c: New file.
8473 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8474 PT_DATA_ADDR for BFIN targets.
8475 * Makefile.in (SFILES): Add linux-bfin-low.c.
8476 (clean): Remove reg-bfin.c.
8477 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8478 * README: Mention supported Blackfin targets.
8479
39ab222a
MF
84802010-12-23 Mike Frysinger <vapier@gentoo.org>
8481
8482 * .gitignore: New file.
8483
a1f2ce7d
MF
84842010-11-16 Mike Frysinger <vapier@gentoo.org>
8485
8486 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8487
f474844c
JZ
84882010-10-22 Jie Zhang <jie@codesourcery.com>
8489
8490 * Makefile.in: Add FLAGS_TO_PASS variable.
8491 (install): Remove dependency of install-only and recursively
8492 invoke make for install-only.
8493
f1048712
DE
84942010-10-04 Doug Evans <dje@google.com>
8495
8496 * Makefile.in (uninstall): Use $(DESTDIR).
8497
b53a1623
PA
84982010-09-24 Pedro Alves <pedro@codesourcery.com>
8499
e6ee044d
PA
8500 PR gdb/11842
8501
b53a1623
PA
8502 * linux-x86-low.c (compat_siginfo_from_siginfo)
8503 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8504 si_code is < 0. Check for si_code == SI_TIMER before checking for
8505 si_code < 0.
8506
fa1bd1e4
JB
85072010-09-13 Joel Brobecker <brobecker@adacore.com>
8508
8509 * lynx-i386-low.c: New file.
8510 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8511
47fac8f8
JB
85122010-09-13 Joel Brobecker <brobecker@adacore.com>
8513
8514 * lynx-low.c (ptrace_request_to_str): Remove handling for
8515 request values that have been removed in LynxOS 5.x.
8516
1adfc54d
JB
85172010-09-13 Joel Brobecker <brobecker@adacore.com>
8518
8519 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8520 <ptrace.h>
8521
c2a66c29
NS
85222010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8523
8524 * configure.ac: Add --enable-inprocess-agent option.
8525 * configure: Rebuilt.
8526
32fcada3
YQ
85272010-09-06 Yao Qi <yao@codesourcery.com>
8528
8529 * linux-low.c (linux_kill): Remove unused variable.
8530 (linux_stabilize_threads): Likewise.
8531 * server.c (start_inferior): Likewise.
8532 (queue_stop_reply_callback): Likewise.
8533 * tracepoint.c (do_action_at_tracepoint): Likewise.
8534
0cccb683
YQ
85352010-09-06 Yao Qi <yao@codesourcery.com>
8536
8537 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8538 on return.
8539
423ec54c
JK
85402010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8541
8542 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8543
12ac6819
PA
85442010-09-06 Pedro Alves <pedro@codesourcery.com>
8545
8546 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8547 "$(IPA_DEPFILES)".
8548
8ed54b31
JB
85492010-09-01 Joel Brobecker <brobecker@adacore.com>
8550
8551 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8552 gdbserver/lynx-ppc-low.c: New files.
8553 * Makefile.in (lynx_low_h): New variable.
8554 (lynx-low.o, lynx-ppc-low.o): New rules.
8555 * configure.ac: On LynxOS, link with -lnetinet.
8556 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8557 * configure: regenerate.
8558
bb0116a4
JB
85592010-09-01 Joel Brobecker <brobecker@adacore.com>
8560
8561 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8562 * configure.ac: Add check for vasprintf and vsnprintf.
8563 * configure, config.in: Regenerate.
8564 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8565
a778ab81 85662010-09-01 Joel Brobecker <brobecker@adacore.com>
8567
8568 * gdbreplay.c: Move include of alloca.h up, next to include of
8569 malloc.h.
8570 * server.h: Add include of malloc.h.
8571 * mem-break.c: Remove include of malloc.h.
8572 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8573
8b034a19 85742010-09-01 Joel Brobecker <brobecker@adacore.com>
8575
8576 * Makefile.in (memmem.o): Build with -Wno-error.
8577
85782010-09-01 Joel Brobecker <brobecker@adacore.com>
8579
8580 * utils.c (xsnprintf): Make non-static.
8581 * server.h: Add xsnprintf declaration.
8582 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8583 replace calls to snprintf by calls to xsnprintf throughout.
8584
85852010-09-01 Joel Brobecker <brobecker@adacore.com>
8586
8587 * configure.ac: Add configure check for alloca.
8588 * configure, config.in: Regenerate.
8589 * server.h: Include alloca.h if it exists.
8590 * gdbreplay.c: Include alloca.h if it exists.
8591
1a981360
PA
85922010-08-28 Pedro Alves <pedro@codesourcery.com>
8593
8594 * linux-low.c (__SIGRTMIN): Define if not already defined.
8595 (linux_create_inferior): Check for __ANDROID__ rather than
8596 __SIGRTMIN.
8597 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8598 are already deferred.
8599 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8600 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8601 stopped and already has a pending signal to report.
8602 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8603 a pending signal to report or is moving out of a jump pad.
8604 (linux_init_signals): Check for __ANDROID__ rather than
8605 __SIGRTMIN.
8606
b4d51a55
PA
86072010-08-28 Pedro Alves <pedro@codesourcery.com>
8608
8609 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8610 debug_threads check. Avoid a linear search when not doing debug
8611 output.
8612
ec48365d
PA
86132010-08-27 Pedro Alves <pedro@codesourcery.com>
8614
8615 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8616 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8617 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8618 (process_event): Change local fd's type to gdb_fildes_t.
8619 (create_file_handler): Adjust prototype.
8620 (delete_file_handler): Adjust prototype.
8621 (handle_file_event): Adjust prototype. Use pfildes.
8622 (create_file_event): Adjsut prototype.
8623 * remote-utils.c (remote_desc, listen_desc): Change type to
8624 gdb_fildes_t.
8625 * server.h: New gdb_fildes_t typedef.
8626 [USE_WIN32API]: Include winsock2.h.
8627 (delete_file_handler, add_file_handler): Adjust prototypes.
8628 (pfildes): Declare.
8629 * utils.c (pfildes): New.
8630
854d88f0
PA
86312010-08-27 Pedro Alves <pedro@codesourcery.com>
8632
8633 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8634 * configure: Regenerate.
8635
0146f85b
PA
86362010-08-27 Pedro Alves <pedro@codesourcery.com>
8637
8638 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8639 (linux_done_accessing_memory): ... this.
8640 (linux_target_ops): Adjust.
8641 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8642 * nto-low.c (nto_target_ops): Adjust comment.
8643 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8644 * spu-low.c (spu_target_ops): Adjust comment.
8645 * target.h (target_ops): Rename unprepare_to_access_memory field
8646 to done_accessing_memory.
8647 (unprepare_to_access_memory): Rename to ...
8648 (done_accessing_memory): ... this.
8649
90d74c30
PA
86502010-08-26 Pedro Alves <pedro@codesourcery.com>
8651
8652 * linux-low.c (linux_prepare_to_access_memory): New.
8653 (linux_unprepare_to_access_memory): New.
8654 (linux_target_ops): Install them.
8655 * server.c (read_memory): Rename to ...
8656 (gdb_read_memory): ... this. Use
8657 prepare_to_access_memory/prepare_to_access_memory.
8658 (write_memory): Rename to ...
8659 (gdb_write_memory): ... this. Use
8660 prepare_to_access_memory/prepare_to_access_memory.
8661 (handle_search_memory_1): Adjust.
8662 (process_serial_event): Adjust.
8663 * target.h (struct target_ops): New fields
8664 prepare_to_access_memory and unprepare_to_access_memory.
8665 (prepare_to_access_memory, unprepare_to_access_memory): New.
8666 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8667 prepare_to_access_memory/prepare_to_access_memory.
8668 * nto-low.c (nto_target_ops): Adjust.
8669 * spu-low.c (spu_target_ops): Adjust.
8670 * win32-low.c (win32_target_ops): Adjust.
8671
fd467969
PA
86722010-08-26 Pedro Alves <pedro@codesourcery.com>
8673
8674 * Makefile.in (WARN_CFLAGS): Get it from configure.
8675 (WERROR_CFLAGS): New.
8676 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8677 * configure.ac: Introduce --enable-werror, which adds -Werror to
8678 the compiler command line. Enabled by default. Disable with
8679 --disable-werror. Add -Wdeclaration-after-statement
8680 Wpointer-arith and -Wformat-nonliteral to warning flags.
8681 * configure: Regenerate.
8682
331e2f5f
PA
86832010-08-26 Pedro Alves <pedro@codesourcery.com>
8684
8685 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8686
e581f2b4
PA
86872010-08-26 Pedro Alves <pedro@codesourcery.com>
8688
8689 * gdbreplay.c (remote_error): New.
8690 (gdbchar): New.
8691 (expect): Use gdbchar. Check for error reading from GDB.
8692 Clarify sync error output.
8693 (play): Check for errors writing to GDB.
8694 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8695 * remote-utils.c (getpkt): Check for errors writing to the remote
8696 descriptor.
8697
3c11dd79
PA
86982010-08-25 Pedro Alves <pedro@codesourcery.com>
8699
8700 * linux-low.c (linux_wait_1): Move non-debugging code out of
8701 `debug_threads' control.
8702
d20a8ad9
PA
87032010-08-25 Pedro Alves <pedro@codesourcery.com>
8704
8705 * linux-low.c (linux_wait_1): Don't set last_status here.
8706 * server.c (push_event, queue_stop_reply_callback): Assert we're
8707 not pushing a TARGET_WAITKIND_IGNORE event.
8708 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8709 (myresume, handle_target_event): Set the thread's last_resume_kind
8710 and last_status from the target returned status.
8711
964e4306
PA
87122010-08-25 Pedro Alves <pedro@codesourcery.com>
8713
8714 PR threads/10729
8715
8716 * linux-x86-low.c (update_debug_registers_callback): New.
8717 (i386_dr_low_set_addr): Use it.
8718 (i386_dr_low_get_addr): New.
8719 (i386_dr_low_set_control): Use update_debug_registers_callback.
8720 (i386_dr_low_get_control): New.
8721 (i386_dr_low_get_status): Adjust.
8722 * linux-low.c (linux_stop_lwp): New.
8723 * linux-low.h (linux_stop_lwp): Declare.
8724
8725 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8726 argument instead of a i386_debug_reg_state.
8727 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8728 a i386_debug_reg_state.
8729 (i386_insert_aligned_watchpoint): Adjust.
8730 (i386_remove_aligned_watchpoint): Adjust.
8731 (i386_low_stopped_data_address): Read the debug registers from the
8732 inferior instead of from the mirrors.
8733 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8734 (i386_dr_low_get_addr): Declare.
8735 (i386_dr_low_get_control): Declare.
8736 (i386_dr_low_get_status): Change prototype.
8737
8738 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8739 (i386_dr_low_get_addr): New.
8740 (i386_dr_low_get_control): New.
8741 (i386_dr_low_get_status): Adjust prototype. Return
8742 dr_status_mirror.
8743 (i386_initial_stuff): Clear dr_status_mirror and
8744 dr_control_mirror.
8745 (i386_get_thread_context): Adjust.
8746 (i386_set_thread_context): Adjust.
8747 (i386_thread_added): Adjust.
8748
5f21a75b
PA
87492010-08-24 Pedro Alves <pedro@codesourcery.com>
8750
8751 * linux-low.h (linux_thread_area): Delete declaration.
8752
3e4c1235
TS
87532010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8754
8755 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8756 after its termination.
8757
1971b033
PA
87582010-08-09 Pedro Alves <pedro@codesourcery.com>
8759
8760 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8761 (gdb_wants_all_stopped): Delete.
8762 (linux_wait_1): Don't call them.
8763 * server.c (handle_v_cont): Tag all threads as want-stopped.
8764 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8765 stopped as "client-wants-stopped".
8766
310444ac
PA
87672010-07-31 Pedro Alves <pedro@codesourcery.com>
8768
8769 * Makefile.in (signals_h): New.
8770 (server_h): Depend on it.
8771 (server.o): Don't depend on $(signals_def).
8772 (signals.o): Depend on $(signals_def).
8773
a19cae16
JK
87742010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8775
8776 * Makefile.in (signals_def): New.
8777 (server_h): Append include/gdb/signals.h and signals_def.
8778 (server.o): Append signals_def.
8779
30d50328
JK
87802010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8781
8782 * server.c (handle_target_event): Use target_signal_to_host for
8783 resume_info.sig initialization.
8784 * target.h (struct thread_resume) <sig>: New comment.
8785
5c3216e2
OS
87862010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8787
c6f46ca0
OS
8788 * server.c (handle_query): strcpy() the returned string from paddress()
8789 instead of sprintf().
5c3216e2
OS
8790 * utils.c (paddress): Return phex_nz().
8791
6bd31874
JB
87922010-07-07 Joel Brobecker <brobecker@adacore.com>
8793
8794 * server.c (handle_v_cont): Call mourn_inferior if process
8795 just exited.
8796 (myresume): Likewise.
8797
0fb4aa4b
PA
87982010-07-01 Pedro Alves <pedro@codesourcery.com>
8799
8800 Static tracepoints, and integration with UST.
8801
8802 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8803 * mem-break.c (uninsert_all_breakpoints)
8804 (reinsert_all_breakpoints): New.
8805 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8806 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8807 (gdb_agent_ust_loaded, helper_thread_id)
8808 (gdb_agent_helper_thread_id): New macros.
8809 (struct ipa_sym_addresses): Add addr_ust_loaded,
8810 addr_helper_thread_id, addr_cmd_buf.
8811 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8812 (in_process_agent_loaded_ust): New.
8813 (write_e_ust_not_loaded): New.
8814 (maybe_write_ipa_ust_not_loaded): New.
8815 (struct collect_static_trace_data_action): New.
8816 (enum tracepoint_type) <static_tracepoint>: New.
8817 (struct tracepoint) <handle>: Mention static tracepoints.
8818 (struct static_tracepoint_ctx): New.
8819 (CMD_BUF_SIZE): New.
8820 (add_tracepoint_action): Handle static tracepoint actions.
8821 (unprobe_marker_at): New.
8822 (clear_installed_tracepoints): Handle static tracepoints.
8823 (cmd_qtdp): Handle static tracepoints.
8824 (probe_marker_at): New.
8825 (cmd_qtstart): Handle static tracepoints.
8826 (response_tracepoint): Handle static tracepoints.
8827 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8828 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8829 (get_context_regcache): Handle static tracepoints.
8830 (do_action_at_tracepoint): Handle static tracepoint actions.
8831 (traceframe_find_block_type): Handle static trace data blocks.
8832 (traceframe_read_sdata): New.
8833 (download_tracepoints): Download static tracepoint actions.
8834 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8835 (GDB_PROBE_NAME): New.
8836 (ust_ops): New.
8837 (GET_UST_SYM): New.
8838 (USTF): New.
8839 (dlsym_ust): New.
8840 (ust_marker_to_static_tracepoint): New.
8841 (gdb_probe): New.
8842 (collect_ust_data_at_tracepoint): New.
8843 (gdb_ust_probe): New.
8844 (UNIX_PATH_MAX, SOCK_DIR): New.
8845 (gdb_ust_connect_sync_socket): New.
8846 (resume_thread, stop_thread): New.
8847 (run_inferior_command): New.
8848 (init_named_socket): New.
8849 (gdb_ust_socket_init): New.
8850 (cstr_to_hexstr): New.
8851 (next_st): New.
8852 (first_marker, next_marker): New.
8853 (response_ust_marker): New.
8854 (cmd_qtfstm, cmd_qtsstm): New.
8855 (unprobe_marker_at, probe_marker_at): New.
8856 (cmd_qtstmat, gdb_ust_thread): New.
8857 (gdb_ust_init): New.
8858 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8859 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8860 (ST_REGENTRY): New.
8861 (x86_64_st_collect_regmap): New.
8862 (X86_64_NUM_ST_COLLECT_GREGS): New.
8863 (AMD64_RIP_REGNUM): New.
8864 (supply_static_tracepoint_registers): New.
8865 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8866 (ST_REGENTRY): New.
8867 (i386_st_collect_regmap): New.
8868 (i386_NUM_ST_COLLECT_GREGS): New.
8869 (supply_static_tracepoint_registers): New.
8870 * server.c (handle_query): Handle qXfer:statictrace:read.
8871 <qSupported>: Report support for StaticTracepoints, and
8872 qXfer:statictrace:read features.
8873 * server.h (traceframe_read_sdata)
8874 (supply_static_tracepoint_registers): Declare.
8875 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8876 (unpack_varlen_hex): Include in IPA build.
8877 * Makefile.in (ustlibs, ustinc): New.
8878 (IPA_OBJS): Add remote-utils-ipa.o.
8879 ($(IPA_LIB)): Link -ldl and -lpthread.
8880 (UST_CFLAGS): New.
8881 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8882 * config.in, configure: Regenerate.
8883
9e4344e5
PA
88842010-06-20 Ian Lance Taylor <iant@google.com>
8885 Pedro Alves <pedro@codesourcery.com>
8886
8887 * linux-x86-low.c (always_true): Delete.
8888 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8889 trying to fool the compiler with always_true.
8890
c6beb2cb
PA
88912010-06-20 Pedro Alves <pedro@codesourcery.com>
8892
8893 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8894 conditions in gdbserver.
8895
d2ed6730
UW
88962010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8897
8898 * spu-low.c (spu_read_memory): Wrap around local store limit.
8899 (spu_write_memory): Likewise.
8900
4e29fb54
PA
89012010-06-15 Pedro Alves <pedro@codesourcery.com>
8902
8903 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8904 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8905 LONGEST uses.
8906 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8907 uses.
8908 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8909 uses with LONGEST uses.
8910
6a271cae
PA
89112010-06-14 Stan Shebs <stan@codesourcery.com>
8912 Pedro Alves <pedro@codesourcery.com>
8913
8914 Bytecode compiler.
8915
8916 * linux-x86-low.c: Include limits.h.
8917 (add_insns): New.
8918 (always_true): New.
8919 (EMIT_ASM): New.
8920 (EMIT_ASM32): New.
8921 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8922 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8923 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8924 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8925 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8926 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8927 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8928 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8929 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8930 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8931 (amd64_emit_void_call_2): New.
8932 (amd64_emit_ops): New.
8933 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8934 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8935 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8936 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8937 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8938 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8939 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8940 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8941 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8942 (i386_emit_stack_adjust, i386_emit_int_call_1)
8943 (i386_emit_void_call_2): New.
8944 (i386_emit_ops): New.
8945 (x86_emit_ops): New.
8946 (the_low_target): Install x86_emit_ops.
8947 * server.h (struct emit_ops): New.
8948 (get_raw_reg_func_addr): Declare.
8949 (current_insn_ptr, emit_error): Declare.
8950 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8951 (set_trace_state_variable_value): New defines.
8952 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8953 addr_get_trace_state_variable_value and
8954 addr_set_trace_state_variable_value.
8955 (symbol_list): New fields for get_raw_reg,
8956 get_trace_state_variable_value and set_trace_state_variable_value.
8957 (condfn): New typedef.
8958 (struct tracepoint): New field `compiled_cond'.
8959 (do_action_at_tracepoint): Clear compiled_cond.
8960 (get_trace_state_variable_value, set_trace_state_variable_value):
8961 Export in the IPA.
8962 (condition_true_at_tracepoint): If there's a compiled condition,
8963 run that.
8964 (current_insn_ptr, emit_error): New globals.
8965 (struct bytecode_address): New.
8966 (get_raw_reg_func_addr): New.
8967 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8968 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8969 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8970 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8971 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8972 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8973 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8974 (compile_tracepoint_condition, compile_bytecodes): New.
8975 * target.h (emit_ops): Forward declare.
8976 (struct target_ops): New field emit_ops.
8977 (target_emit_ops): New.
8978 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8979 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8980 * linux-low.c (linux_emit_ops): New.
8981 (linux_target_ops): Install it.
8982 * linux-low.h (struct linux_target_ops): New field emit_ops.
8983
92b72907
UW
89842010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8985
8986 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8987 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8988
fa593d66
PA
89892010-06-01 Pedro Alves <pedro@codesourcery.com>
8990 Stan Shebs <stan@codesourcery.com>
8991
8992 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8993 (all): Depend on $(extra_libraries).
8994 (install-only): Install the IPA.
8995 (IPA_OBJS, IPA_LIB): New.
8996 (clean): Remove the IPA lib.
8997 (IPAGENT_CFLAGS): New.
8998 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8999 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9000 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9001 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9002 * configure.ac: Check for atomic builtins support in the compiler.
9003 (IPA_DEPFILES, extra_libraries): Define.
9004 * configure.srv (ipa_obj): Add description.
9005 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9006 (i[34567]86-*-linux*): Set ipa_obj.
9007 (x86_64-*-linux*): Set ipa_obj.
9008 * linux-low.c (stabilizing_threads): New.
9009 (supports_fast_tracepoints): New.
9010 (linux_detach): Stabilize threads before detaching.
9011 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9012 the lwp is either not stabilizing, or is moving out of a jump pad.
9013 (linux_fast_tracepoint_collecting): New.
9014 (maybe_move_out_of_jump_pad): New.
9015 (enqueue_one_deferred_signal): New.
9016 (dequeue_one_deferred_signal): New.
9017 (linux_wait_for_event_1): If moving out of a jump pad, defer
9018 pending signals to later.
9019 (linux_stabilize_threads): New.
9020 (linux_wait_1): Check if threads need moving out of jump pads, and
9021 do it if so.
9022 (stuck_in_jump_pad_callback): New.
9023 (move_out_of_jump_pad_callback): New.
9024 (lwp_running): New.
9025 (linux_resume_one_lwp): Handle moving out of jump pads.
9026 (linux_set_resume_request): Dequeue deferred signals.
9027 (need_step_over_p): Also step over fast tracepoint jumps.
9028 (start_step_over): Also uninsert fast tracepoint jumps.
9029 (finish_step_over): Also reinsert fast tracepoint jumps.
9030 (linux_install_fast_tracepoint_jump): New.
9031 (linux_target_ops): Install linux_stabilize_threads and
9032 linux_install_fast_tracepoint_jump_pad.
9033 * linux-low.h (linux_target_ops) <get_thread_area,
9034 install_fast_tracepoint_jump_pad>: New fields.
9035 (struct lwp_info) <collecting_fast_tracepoint,
9036 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9037 (linux_get_thread_area): Declare.
9038 * linux-x86-low.c (jump_insn): New.
9039 (x86_get_thread_area): New.
9040 (append_insns): New.
9041 (push_opcode): New.
9042 (amd64_install_fast_tracepoint_jump_pad): New.
9043 (i386_install_fast_tracepoint_jump_pad): New.
9044 (x86_install_fast_tracepoint_jump_pad): New.
9045 (the_low_target): Install x86_get_thread_area and
9046 x86_install_fast_tracepoint_jump_pad.
9047 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9048 (struct fast_tracepoint_jump): New.
9049 (fast_tracepoint_jump_insn): New.
9050 (fast_tracepoint_jump_shadow): New.
9051 (find_fast_tracepoint_jump_at): New.
9052 (fast_tracepoint_jump_here): New.
9053 (delete_fast_tracepoint_jump): New.
9054 (set_fast_tracepoint_jump): New.
9055 (uninsert_fast_tracepoint_jumps_at): New.
9056 (reinsert_fast_tracepoint_jumps_at): New.
9057 (set_breakpoint_at): Use write_inferior_memory.
9058 (uninsert_raw_breakpoint): Use write_inferior_memory.
9059 (check_mem_read): Mask out fast tracepoint jumps.
9060 (check_mem_write): Mask out fast tracepoint jumps.
9061 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9062 (set_fast_tracepoint_jump): Declare.
9063 (delete_fast_tracepoint_jump)
9064 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9065 (reinsert_fast_tracepoint_jumps_at): Declare.
9066 * regcache.c: Don't compile many functions when building the
9067 in-process agent library.
9068 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9069 the register buffer in the heap.
9070 (free_register_cache): If the register buffer isn't owned by the
9071 regcache, don't free it.
9072 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9073 pre-existing register caches.
9074 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9075 type.
9076 (convert_ascii_to_int): : Constify `from' parameter type.
9077 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9078 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9079 the needed buffer in-place.
9080 (relocate_instruction): New.
9081 * server.c (handle_query) <qSymbols>: If the target supports
9082 tracepoints, give it a chance of looking up symbols. Report
9083 support for fast tracepoints.
9084 (handle_status): Stabilize threads.
9085 (process_serial_event): Adjust.
9086 * server.h (struct fast_tracepoint_jump): Forward declare.
9087 (struct process_info) <fast_tracepoint_jumps>: New field.
9088 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9089 (decode_X_packet, decode_M_packet): Adjust.
9090 (relocate_instruction): Declare.
9091 (in_process_agent_loaded): Declare.
9092 (tracepoint_look_up_symbols): Declare.
9093 (struct fast_tpoint_collect_status): Declare.
9094 (fast_tracepoint_collecting): Declare.
9095 (force_unlock_trace_buffer): Declare.
9096 (handle_tracepoint_bkpts): Declare.
9097 (initialize_low_tracepoint)
9098 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9099 * target.h (struct target_ops) <stabilize_threads,
9100 install_fast_tracepoint_jump_pad>: New fields.
9101 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9102 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9103 [HAVE_STDINT_H]: Include stdint.h.
9104 (trace_debug_1): Rename to ...
9105 (trace_vdebug): ... this.
9106 (trace_debug): Rename to ...
9107 (trace_debug_1): ... this. Add `level' parameter.
9108 (trace_debug): New.
9109 (ATTR_USED, ATTR_NOINLINE): New.
9110 (IP_AGENT_EXPORT): New.
9111 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9112 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9113 (about_to_request_buffer_space, trace_buffer_is_full)
9114 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9115 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9116 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9117 (traceframe_write_count, traceframes_created)
9118 (trace_state_variables)
9119 New renaming defines.
9120 (struct ipa_sym_addresses): New.
9121 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9122 (symbol_list): New.
9123 (ipa_sym_addrs): New.
9124 (all_tracepoint_symbols_looked_up): New.
9125 (in_process_agent_loaded): New.
9126 (write_e_ipa_not_loaded): New.
9127 (maybe_write_ipa_not_loaded): New.
9128 (tracepoint_look_up_symbols): New.
9129 (debug_threads) [IN_PROCESS_AGENT]: New.
9130 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9131 (UNKNOWN_SIDE_EFFECTS): New.
9132 (stop_tracing): New.
9133 (flush_trace_buffer): New.
9134 (stop_tracing_bkpt): New.
9135 (flush_trace_buffer_bkpt): New.
9136 (read_inferior_integer): New.
9137 (read_inferior_uinteger): New.
9138 (read_inferior_data_pointer): New.
9139 (write_inferior_data_pointer): New.
9140 (write_inferior_integer): New.
9141 (write_inferior_uinteger): New.
9142 (struct collect_static_trace_data_action): Delete.
9143 (enum tracepoint_type): New.
9144 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9145 <actions_str, step_actions, step_actions_str>: Only include in
9146 GDBserver.
fa593d66
PA
9147 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9148 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9149 (tracepoints): Use IP_AGENT_EXPORT.
9150 (last_tracepoint): Don't include in the IPA.
9151 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9152 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9153 (alloced_trace_state_variables): New.
9154 (trace_state_variables): Use IP_AGENT_EXPORT.
9155 (traceframe_t): Delete unused variable.
9156 (circular_trace_buffer): Don't include in the IPA.
9157 (trace_buffer_start): Delete.
9158 (struct trace_buffer_control): New.
9159 (trace_buffer_free): Delete.
9160 (struct ipa_trace_buffer_control): New.
9161 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9162 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9163 New.
9164 (trace_buffer_ctrl): New.
9165 (TRACE_BUFFER_CTRL_CURR): New.
9166 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9167 Reimplement as macros.
9168 (trace_buffer_wrap): Delete.
9169 (traceframe_write_count, traceframe_read_count)
9170 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9171 (struct tracepoint_hit_ctx) <type>: New field.
9172 (struct fast_tracepoint_ctx): New.
9173 (memory_barrier): New.
9174 (cmpxchg): New.
9175 (record_tracepoint_error): Update atomically in the IPA.
9176 (clear_inferior_trace_buffer): New.
9177 (about_to_request_buffer_space): New.
9178 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9179 updating the same buffer.
9180 (add_tracepoint): Default the tracepoint's type to trap
9181 tracepoint, and orig_size to -1.
9182 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9183 internal variables.
9184 (create_trace_state_variable): New parameter `gdb'. Handle it.
9185 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9186 (cmd_qtdp): Handle fast tracepoints.
9187 (cmd_qtdv): Adjust.
9188 (max_jump_pad_size): New.
9189 (gdb_jump_pad_head): New.
9190 (get_jump_space_head): New.
9191 (claim_jump_space): New.
9192 (sort_tracepoints): New.
9193 (MAX_JUMP_SIZE): New.
9194 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9195 IPA.
9196 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9197 support. Upload fast traceframes, and delete internal IPA
9198 breakpoints.
9199 (stop_tracing_handler): New.
9200 (flush_trace_buffer_handler): New.
9201 (cmd_qtstop): Upload fast tracepoints.
9202 (response_tracepoint): Handle fast tracepoints.
9203 (tracepoint_finished_step): Upload fast traceframes. Set the
9204 tracepoint hit context's tracepoint type.
9205 (handle_tracepoint_bkpts): New.
9206 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9207 type. Add comment about fast tracepoints.
9208 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9209 non-existing action_str field.
9210 (get_context_regcache): Handle fast tracepoints.
9211 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9212 to the regcache.
9213 (fast_tracepoint_from_jump_pad_address): New.
9214 (fast_tracepoint_from_ipa_tpoint_address): New.
9215 (collecting_t): New.
9216 (force_unlock_trace_buffer): New.
9217 (fast_tracepoint_collecting): New.
9218 (collecting): New.
9219 (gdb_collect): New.
9220 (write_inferior_data_ptr): New.
9221 (target_tp_heap): New.
9222 (target_malloc): New.
9223 (download_agent_expr): New.
9224 (UALIGN): New.
9225 (download_tracepoints): New.
9226 (download_trace_state_variables): New.
9227 (upload_fast_traceframes): New.
9228 (IPA_FIRST_TRACEFRAME): New.
9229 (IPA_NEXT_TRACEFRAME_1): New.
9230 (IPA_NEXT_TRACEFRAME): New.
9231 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9232 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9233 (gdb_jump_pad_buffer_end): New.
9234 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9235 (initialize_tracepoint): Adjust.
9236 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9237 buffer. Initialize the low module.
9238 * utils.c (PREFIX, TOOLNAME): New.
9239 (malloc_failure): Use PREFIX.
9240 (error): In the IPA, an error causes an exit.
9241 (fatal, warning): Use PREFIX.
9242 (internal_error): Use TOOLNAME.
9243 (NUMCELLS): Increase to 10.
9244 * configure, config.in: Regenerate.
9245
d149dd1d
PA
92462010-06-01 Pedro Alves <pedro@codesourcery.com>
9247
9248 * server.c (handle_query) <qSupported>: Do two passes over the
9249 qSupported string to avoid nesting strtok.
9250
f6528abd
JK
92512010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9252
9253 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9254 (CDEPS): New.
9255 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9256 -Wl,--dynamic-list.
9257 * configure: Regenerate.
9258 * proc-service.list: New.
9259
ca2a87a0
JK
92602010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9261
9262 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9263 New comment.
9264
363a6e9f
OS
92652010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9266
9267 * gdbreplay.c (remote_open): Check error return from socket() call by
9268 its equality to -1 not by it being negative.
9269 * remote-utils.c (remote_open): Likewise.
9270
d23b6cb1
PA
92712010-05-23 Pedro Alves <pedro@codesourcery.com>
9272
9273 * config.h: Regenerate.
9274
28d3cf85
MK
92752010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9276
9277 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9278 doesn't provide PTRACE_GET_THREAD_AREA.
9279
fea36a59
MK
92802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9281
9282 * linux-m68k-low.c: Include <asm/ptrace.h>
9283 (ps_get_thread_area): Implement.
9284
24b066ba
DE
92852010-05-03 Doug Evans <dje@google.com>
9286
9287 * event-loop.c (struct callback_event): New struct.
9288 (callback_list): New global.
9289 (append_callback_event, delete_callback_event): New functions.
9290 (process_callback): New function.
9291 (start_event_loop): Call it.
9292 * remote-utils.c (NOT_SCHEDULED): Define.
9293 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9294 moved out of readchar.
9295 (readchar): Rewrite. Call reschedule before returning.
9296 (reset_readchar): New function.
9297 (remote_close): Call it.
9298 (process_remaining, reschedule): New functions.
9299 * server.h (callback_handler_func): New typedef.
9300 (append_callback_event, delete_callback_event): Declare.
9301
9836d6ea
PA
93022010-05-03 Pedro Alves <pedro@codesourcery.com>
9303
9304 * proc-service.c (ps_pglobal_lookup): Use
9305 thread_db_look_up_one_symbol.
9306 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9307 parameter. Use it instead of all_symbols_looked_up.
9308 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9309 field.
9310 (all_symbols_looked_up): Don't declare.
9311 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9312 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9313 field.
9314 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9315 Set all_symbols_looked_up here.
9316 (thread_db_look_up_one_symbol): New.
9317 (thread_db_get_tls_address): Adjust.
9318 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9319 thread_db object on the heap, and tentatively set it in the
9320 process structure.
9321 (thread_db_init): Don't set all_symbols_looked_up here.
9322 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9323
7984d532
PA
93242010-05-03 Pedro Alves <pedro@codesourcery.com>
9325
9326 * linux-low.c (linux_kill, linux_detach): Adjust.
9327 (status_pending_p_callback): Remove redundant statement. Check
9328 for !TARGET_WAITIKIND_IGNORE, instead of
9329 TARGET_WAITKIND_STOPPED.
9330 (handle_tracepoints): Make sure LWP is locked. Adjust.
9331 (linux_wait_for_event_1): Adjust.
9332 (linux_cancel_breakpoints): New.
9333 (unsuspend_one_lwp): New.
9334 (unsuspend_all_lwps): New.
9335 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9336 (send_sigstop_callback): Change return type to int, add new
9337 `except' parameter and handle it.
9338 (suspend_and_send_sigstop_callback): New.
9339 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9340 pass them down. If SUSPEND, also increment the lwp's suspend
9341 count.
9342 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9343 (need_step_over_p): Don't consider suspended LWPs.
9344 (start_step_over): Adjust.
9345 (proceed_one_lwp): Change return type to int, add new `except'
9346 parameter and handle it.
9347 (unsuspend_and_proceed_one_lwp): New.
9348 (proceed_all_lwps): Use find_inferior instead of
9349 for_each_inferior.
9350 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9351 also decrement the suspend count of LWPs. Pass `except' down,
9352 instead of hacking its suspend count.
9353 (linux_pause_all): Add `freeze' parameter. Adjust.
9354 (linux_unpause_all): New.
9355 (linux_target_ops): Install linux_unpause_all.
9356 * server.c (handle_status): Adjust.
9357 * target.h (struct target_ops): New fields `unpause_all' and
9358 `cancel_breakpoints'. Add new parameter to `pause_all'.
9359 (pause_all): Add new `freeze' parameter.
9360 (unpause_all): New.
9361 (cancel_breakpoints): New.
9362 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9363 cancel breakpoints.
9364 (cmd_qtstart): Pause threads.
9365 (stop_tracing): Pause threads, and cancel breakpoints.
9366 * win32-low.c (win32_target_ops): Adjust.
9367
e471f25b
PA
93682010-05-03 Pedro Alves <pedro@codesourcery.com>
9369
9370 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9371 the inferior right away from here...
9372 (linux_wait_1): ... to here, and adjust to check the thread's
9373 last_resume_kind instead of the lwp's step or stop_expected flags.
9374
1915ef4f
PA
93752010-05-02 Pedro Alves <pedro@codesourcery.com>
9376
9377 * README: Use consistent `GDB' and `GDBserver' spellings.
9378
f9e39928
PA
93792010-05-02 Pedro Alves <pedro@codesourcery.com>
9380
9381 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9382 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9383 (linux_detach_one_lwp): Assume the lwp is stopped.
9384 (any_thread_of): Delete.
9385 (linux_detach): Stop all lwps here. Don't blindly delete all
9386 breakpoints.
9387 (delete_lwp_callback): New.
9388 (linux_mourn): Delete all lwps of the process that is gone.
9389 (linux_wait_1): Don't delete the last lwp of the process here.
9390 * mem-break.h (mark_breakpoints_out): Declare.
9391 * mem-break.c (mark_breakpoints_out): New.
9392 (free_all_breakpoints): Use it.
9393 * server.c (handle_target_event): If the process is gone, mark
9394 breakpoints out.
9395 * thread-db.c (struct thread_db) <create_bp>: New field.
9396 (thread_db_enable_reporting): Fix prototype. Store a thread event
9397 breakpoint reference in the thread_db struct.
9398 (thread_db_load_search): Clear the thread_db object.
9399 (try_thread_db_load_1): Ditto.
9400 (switch_to_process): New.
9401 (disable_thread_event_reporting): Use it.
9402 (remove_thread_event_breakpoints): New.
9403 (thread_db_detach, thread_db_mourn): Use it.
9404
1e7fc18c
PA
94052010-05-01 Pedro Alves <pedro@codesourcery.com>
9406
9407 * linux-low.c (linux_enable_event_reporting): New.
9408 (linux_wait_for_event_1, handle_extended_wait): Use it.
9409
02fc4de7
PA
94102010-04-30 Pedro Alves <pedro@codesourcery.com>
9411
9412 * linux-low.c (linux_kill_one_lwp, linux_kill)
9413 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9414 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9415 SIGSTOP even if the LWP is stopped.
9416 (send_sigstop_callback): New.
9417 (stop_all_lwps): Use send_sigstop_callback instead.
9418 (linux_resume_one_thread): Adjust.
9419 (proceed_one_lwp): Still proceed an LWP that the client has
9420 requested to stop, if we haven't reported it as stopped yet. Make
9421 sure that LWPs the client want stopped, have a pending SIGSTOP.
9422
bc3b5632
DE
94232010-04-26 Doug Evans <dje@google.com>
9424
ae1ada35
DE
9425 * server.c (handle_general_set): Make static.
9426
bc3b5632
DE
9427 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9428 Print received char after testing for error/eof instead of before.
9429 (input_interrupt): Tweak comment.
9430
65730243
DE
94312010-04-23 Doug Evans <dje@google.com>
9432
9433 * server.c (start_inferior): Print inferior argv if --debug.
9434
a8ae7dc0
AR
94352010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9436
9437 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9438 * nto-x86-low.c: Include server.h
9439
1c07cc19
PM
94402010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9441
9442 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9443 be consistent with other sources of this directory.
9444 (init_registers_amd64): Correct name of source file of this function
9445 in the comment.
9446
e0a61e09
PM
94472010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9448
9449 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9450 64-bit executables.
9451
54709339
PM
94522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9453
9454 * win32-i386-low.c: Add 64-bit support.
9455 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9456 (init_registers_amd64): Declare.
9457 (mappings): Add 64-bit version of array.
9458 (init_windows_x86): New function.
9459 (the_low_target): Change init_arch field to init_windows_x86.
9460
e8f0053d
PM
94612010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9462
9463 * win32-low.c: Adapt to support also 64-bit architecture.
9464 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9465 (get_image_name): Use SIZE_T type for local variable `done'.
9466 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9467 (toolhelp_get_dll_name): Idem.
9468 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9469 Use uintptr_t typecast to avoid warning.
9470 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9471 (handle_exception): Use phex_nz to avoid warning.
9472 (win32_wait): Remove unused local variable `process'.
9473
c481e77e
PM
94742010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9475
9476 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9477 `amd64-avx.o'.
9478
12ea4b69
PM
94792010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9480
9481 * configure.ac: Use `ws2_32' library for srv_mingw.
9482 * configure: Regenerate.
9483 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9484 * remote-utils.c: Likewise.
9485
f6d1620c
L
94862010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9487
9488 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9489 if __x86_64__ is defined.
9490
8e642873
PM
94912010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9492
9493 * configure: Regenerate.
9494
711e434b
PM
94952010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9496
9497 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9498 * target.h (target_ops): New get_tib_address field.
9499 * win32-low.h (win32_thread_info): Add thread_local_base field.
9500 * win32-low.c (child_add_thread): Add tlb argument.
9501 Set thread_local_base field to TLB.
9502 (get_child_debug_event): Adapt to child_add_thread change.
9503 (win32_get_tib_address): New function.
9504 (win32_target_ops): Set get_tib_address field to
9505 win32_get_tib_address.
9506 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9507
505106cd
PA
95082010-04-12 Pedro Alves <pedro@codesourcery.com>
9509
505106cd
PA
9510 * linux-low.c (linux_mourn): Also remove the process.
9511 * server.c (handle_target_event): Don't remove the process here.
9512 * nto-low.c (nto_mourn): New.
9513 (nto_target_ops): Install it.
9514 * spu-low.c (spu_mourn): New.
9515 (spu_target_ops): Install it.
9516 * win32-low.c (win32_mourn): New.
9517 (win32_target_ops): Install it.
9518
e8470a06
PA
95192010-04-12 Pedro Alves <pedro@codesourcery.com>
9520
9521 * server.h (buffer_xml_printf): Remove redundant `;'.
9522
45ba0d02
PA
95232010-04-12 Pedro Alves <pedro@codesourcery.com>
9524
9525 * regcache.c (set_register_cache): Invalidate regcaches before
9526 changing the register cache layout.
9527 (regcache_invalidate_one): Allow a NULL regcache.
9528 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9529 regcaches before changing the register cache layout or the target
9530 regsets.
9531
59e04013
L
95322010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9533
9534 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9535 variable warning on Linux/x86-64.
9536
8336d594
PA
95372010-04-11 Pedro Alves <pedro@codesourcery.com>
9538
9539 GDBserver disconnected tracing support.
9540
9541 * linux-low.c (linux_remove_process): Delete.
9542 (add_lwp): Don't set last_resume_kind here.
9543 (linux_kill): Use `mourn'.
9544 (linux_detach): Use `thread_db_detach', and `mourn'.
9545 (linux_mourn): New.
9546 (linux_attach_lwp_1): Adjust comment.
9547 (linux_attach): last_resume_kind moved the thread_info; adjust.
9548 (status_pending_p_callback): Adjust.
9549 (linux_wait_for_event_1): Adjust.
9550 (count_events_callback, select_singlestep_lwp_callback)
9551 (select_event_lwp_callback, cancel_breakpoints_callback)
9552 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9553 (proceed_one_lwp): Adjust.
9554 (linux_async): Add debug output.
9555 (linux_thread_stopped): New.
9556 (linux_pause_all): New.
9557 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9558 linux_pause_all.
9559 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9560 (thread_db_free): Delete declaration.
9561 (thread_db_detach, thread_db_mourn): Declare.
9562 * thread-db.c (thread_db_init): Use thread_db_mourn.
9563 (thread_db_free): Delete, split in two.
9564 (disable_thread_event_reporting): New.
9565 (thread_db_detach): New.
9566 (thread_db_mourn): New.
9567
9568 * server.h (struct thread_info) <last_resume_kind>: New field.
9569 <attached>: Add comment.
9570 <gdb_detached>: New field.
9571 (handler_func): Change return type to int.
9572 (handle_serial_event, handle_target_event): Ditto.
9573 (gdb_connected): Declare.
9574 (tracing): Delete.
9575 (disconnected_tracing): Declare.
9576 (stop_tracing): Declare.
9577
9578 * server.c (handle_query) <qSupported>: Report support for
9579 disconnected tracing.
9580 (queue_stop_reply_callback): Account for running threads.
9581 (gdb_wants_thread_stopped): New.
9582 (gdb_wants_all_threads_stopped): New.
9583 (gdb_reattached_process): New.
9584 (handle_status): Clear the `gdb_detached' flag of all processes.
9585 In all-stop, stop all threads.
9586 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9587 (process_serial_event): If the remote connection breaks, or if an
9588 exit was forced with "monitor exit", force an event loop exit.
9589 Handle disconnected tracing on detach.
9590 (handle_serial_event): Adjust.
9591 (handle_target_event): If GDB isn't connected, forward events back
9592 to the inferior, unless the last process exited, in which case,
9593 exit gdbserver. Adjust interface.
9594
9595 * remote-utils.c (remote_open): Don't block in accept. Instead
9596 register an event loop source on the listen socket file
9597 descriptor. Refactor bits into ...
9598 (listen_desc): ... this new global.
9599 (gdb_connected): ... this new function.
9600 (enable_async_notification): ... this new function.
9601 (handle_accept_event): ... this new function.
9602 (remote_close): Clear remote_desc.
9603
9604 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9605
9606 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9607 New fields.
9608 (mourn_inferior): Define.
9609 (target_process_qsupported): Avoid the dangling else problem.
9610 (thread_stopped): Define.
9611 (pause_all): Define.
9612 (target_waitstatus_to_string): Declare.
9613 * target.c (target_waitstatus_to_string): New.
9614
9615 * tracepoint.c (tracing): Make extern.
9616 (disconnected_tracing): New.
9617 (stop_tracing): Make extern. Handle tracing stops due to GDB
9618 disconnecting.
9619 (cmd_qtdisconnected): New.
9620 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9621 (handle_tracepoint_general_set): Handle QTDisconnected.
9622
9623 * event-loop.c (event_handler_func): Change return type to int.
9624 (process_event): Bail out if the event handler wants the event
9625 loop to stop.
9626 (handle_file_event): Ditto.
9627 (start_event_loop): Bail out if the event handler wants the event
9628 loop to stop.
9629
9630 * nto-low.c (nto_target_ops): Adjust.
9631 * spu-low.c (spu_wait): Don't remove the process here.
9632 (spu_target_ops): Adjust.
9633 * win32-low.c (win32_wait): Don't remove the process here.
9634 (win32_target_ops): Adjust.
9635
5d267c4c
PA
96362010-04-11 Pedro Alves <pedro@codesourcery.com>
9637
9638 * regcache.c (realloc_register_cache): Invalidate inferior's
9639 regcache before recreating it.
9640
623ccd72
PA
96412010-04-09 Pedro Alves <pedro@codesourcery.com>
9642
9643 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9644
219f2f23
PA
96452010-04-09 Stan Shebs <stan@codesourcery.com>
9646 Pedro Alves <pedro@codesourcery.com>
9647
9648 * server.h (LONGEST): New.
9649 (struct thread_info) <while_stepping>: New field.
9650 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9651 Declare.
9652 (initialize_tracepoint, handle_tracepoint_general_set)
9653 (handle_tracepoint_query, tracepoint_finished_step)
9654 (tracepoint_was_hit, release_while_stepping_state_list):
9655 (current_traceframe): Declare.
9656 * server.c (handle_general_set): Handle tracepoint packets.
9657 (read_memory): New.
9658 (write_memory): New.
9659 (handle_search_memory_1): Use read_memory.
9660 (handle_query): Report support for conditional tracepoints, trace
9661 state variables, and tracepoint sources. Handle tracepoint
9662 queries.
9663 (main): Initialize the tracepoints module.
9664 (process_serial_event): Handle traceframe reads/writes.
9665
9666 * linux-low.c (handle_tracepoints): New.
9667 (linux_wait_1): Call it.
9668 (linux_resume_one_lwp): Handle while-stepping.
9669 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9670 (linux_target_ops): Install them.
9671 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9672 New field.
9673 * linux-x86-low.c (x86_supports_tracepoints): New.
9674 (the_low_target). Install it.
9675
9676 * mem-break.h (delete_breakpoint): Declare.
9677 * mem-break.c (delete_breakpoint): Make external.
9678
9679 * target.h (struct target_ops): Add `supports_tracepoints',
9680 `read_pc', and `write_pc' fields.
9681 (target_supports_tracepoints): Define.
9682 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9683 (phex_nz): New.
9684
9685 * regcache.h (struct regcache) <registers_owned>: New field.
9686 (init_register_cache, regcache_cpy): Declare.
9687 (regcache_read_pc, regcache_write_pc): Declare.
9688 (register_cache_size): Declare.
9689 (supply_regblock): Declare.
9690 * regcache.c (init_register_cache): New.
9691 (new_register_cache): Use it.
9692 (regcache_cpy): New.
9693 (register_cache_size): New.
9694 (supply_regblock): New.
9695 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9696
219f2f23
PA
9697 * tracepoint.c: New.
9698
9699 * Makefile.in (OBS): Add tracepoint.o.
9700 (tracepoint.o): New rule.
9701
3a13a53b
L
97022010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9703
9704 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9705 (i386-mmx.o): New.
9706 (i386-mmx.c): Likewise.
9707 (i386-mmx-linux.o): Likewise.
9708 (i386-mmx-linux.c): Likewise.
9709
9710 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9711 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9712 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9713 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9714
9715 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9716 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9717 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9718
1570b33e
L
97192010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9720
9721 * Makefile.in (clean): Updated.
9722 (i386-avx.o): New.
9723 (i386-avx.c): Likewise.
9724 (i386-avx-linux.o): Likewise.
9725 (i386-avx-linux.c): Likewise.
9726 (amd64-avx.o): Likewise.
9727 (amd64-avx.c): Likewise.
9728 (amd64-avx-linux.o): Likewise.
9729 (amd64-avx-linux.c): Likewise.
9730
9731 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9732 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9733 (srv_amd64_regobj): Add amd64-avx.o.
9734 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9735 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9736 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9737 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9738 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9739 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9740 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9741
9742 * i387-fp.c: Include "i386-xstate.h".
9743 (i387_xsave): New.
9744 (i387_cache_to_xsave): Likewise.
9745 (i387_xsave_to_cache): Likewise.
9746 (x86_xcr0): Likewise.
9747
9748 * i387-fp.h (i387_cache_to_xsave): Likewise.
9749 (i387_xsave_to_cache): Likewise.
9750 (x86_xcr0): Likewise.
9751
9752 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9753 * linux-crisv32-low.c (target_regsets): Likewise.
9754 * linux-m68k-low.c (target_regsets): Likewise.
9755 * linux-mips-low.c (target_regsets): Likewise.
9756 * linux-ppc-low.c (target_regsets): Likewise.
9757 * linux-s390-low.c (target_regsets): Likewise.
9758 * linux-sh-low.c (target_regsets): Likewise.
9759 * linux-sparc-low.c (target_regsets): Likewise.
9760 * linux-xtensa-low.c (target_regsets): Likewise.
9761
9762 * linux-low.c: Include <sys/uio.h>.
9763 (regsets_fetch_inferior_registers): Support nt_type.
9764 (regsets_store_inferior_registers): Likewise.
9765 (linux_process_qsupported): New.
9766 (linux_target_ops): Add linux_process_qsupported.
9767
9768 * linux-low.h (regset_info): Add nt_type.
9769 (linux_target_ops): Add process_qsupported.
9770
9771 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9772 and <sys/uio.h>.
9773 (init_registers_i386_avx_linux): New.
9774 (init_registers_amd64_avx_linux): Likewise.
9775 (xmltarget_i386_linux_no_xml): Likewise.
9776 (xmltarget_amd64_linux_no_xml): Likewise.
9777 (PTRACE_GETREGSET): Likewise.
9778 (PTRACE_SETREGSET): Likewise.
9779 (x86_fill_xstateregset): Likewise.
9780 (x86_store_xstateregset): Likewise.
9781 (use_xml): Likewise.
9782 (x86_linux_update_xmltarget): Likewise.
9783 (x86_linux_process_qsupported): Likewise.
9784 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9785 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9786 init_registers_i386_linux here. Call
9787 x86_linux_update_xmltarget.
9788 (the_low_target): Add x86_linux_process_qsupported.
9789
9790 * server.c (handle_query): Call target_process_qsupported.
9791
9792 * target.h (target_ops): Add process_qsupported.
9793 (target_process_qsupported): New.
9794
fc7238bb
PA
97952010-04-03 Pedro Alves <pedro@codesourcery.com>
9796
9797 * inferiors.c (add_thread): Set last_status kind to
9798 TARGET_WAITKIND_IGNORE.
9799 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9800 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9801 (linux_wait_1): Move `thread' local definition to block that uses
9802 it. Don't NULL initialize `event_child'.
9803 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9804 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9805 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9806
bdabb078
PA
98072010-04-01 Pedro Alves <pedro@codesourcery.com>
9808
9809 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9810 an extended waitstatus, or by a watchpoint.
9811 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9812 thread was stepping or has been stopped by a watchpoint.
9813
d3bbe7a0
PA
98142010-04-01 Pedro Alves <pedro@codesourcery.com>
9815
9816 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9817 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9818 of another, then delete the previous, and validate all
9819 breakpoints.
9820 (validate_inserted_breakpoint): New.
9821 (delete_disabled_breakpoints): New.
9822 (validate_breakpoints): New.
9823 (check_mem_read): Validate breakpoints before trusting their
9824 shadow. Delete disabled breakpoints.
9825 (check_mem_write): Validate breakpoints before trusting they
9826 should be inserted. Delete disabled breakpoints.
9827 * mem-break.h (validate_breakpoints):
9828 * server.c (handle_query): Validate breakpoints when we see a
9829 qSymbol query.
9830
8b07ae33
PA
98312010-04-01 Pedro Alves <pedro@codesourcery.com>
9832
9833 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9834 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9835 if we could tell there's a GDB breakpoint at stop_pc.
9836 (need_step_over_p): Don't do a step over if we find a GDB
9837 breakpoint at the resume PC.
9838
9839 * mem-break.c (struct raw_breakpoint): New.
9840 (enum bkpt_type): New type `gdb_breakpoint'.
9841 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9842 fields. New field `raw'.
9843 (find_raw_breakpoint_at): New.
9844 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9845 breakpoint instead.
9846 (set_breakpoint_at): Adjust.
9847 (delete_raw_breakpoint): New.
9848 (release_breakpoint): New.
9849 (delete_breakpoint): Rename to...
9850 (delete_breakpoint_1): ... this. Add proc parameter. Use
9851 release_breakpoint. Return ENOENT.
9852 (delete_breakpoint): Reimplement.
9853 (find_breakpoint_at): Delete.
9854 (find_gdb_breakpoint_at): New.
9855 (delete_breakpoint_at): Delete.
9856 (set_gdb_breakpoint_at): New.
9857 (delete_gdb_breakpoint_at): New.
9858 (gdb_breakpoint_here): New.
9859 (set_reinsert_breakpoint): Use release_breakpoint.
9860 (uninsert_breakpoint): Rename to ...
9861 (uninsert_raw_breakpoint): ... this.
9862 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9863 (reinsert_raw_breakpoint): Change parameter type to
9864 raw_breakpoint.
9865 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9866 instead.
9867 (check_breakpoints): Adjust. Use release_breakpoint.
9868 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9869 (breakpoint_inserted_here): Ditto.
9870 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9871 Don't trust the breakpoint's shadow if it is not inserted.
9872 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9873 (delete_all_breakpoints): Adjust.
9874 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9875 use delete_breakpoint_1.
9876
9877 * mem-break.h (breakpoints_supported): Delete declaration.
9878 (set_gdb_breakpoint_at): Declare.
9879 (gdb_breakpoint_here): Declare.
9880 (delete_breakpoint_at): Delete.
9881 (delete_gdb_breakpoint_at): Declare.
9882
9883 * server.h (struct raw_breakpoint): Forward declare.
9884 (struct process_info): New field `raw_breakpoints'.
9885
9886 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9887 breakpoints.
9888
6bf5e0ba
PA
98892010-03-24 Pedro Alves <pedro@codesourcery.com>
9890
9891 * linux-low.c (status_pending_p_callback): Fix comment.
9892 (linux_wait_for_event_1): Move most of the internal breakpoint
9893 handling from here...
9894 (linux_wait_1): ... to here.
9895 (count_events_callback): New.
9896 (select_singlestep_lwp_callback): New.
9897 (select_event_lwp_callback): New.
9898 (cancel_breakpoints_callback): New.
9899 (select_event_lwp): New.
9900 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9901 priority to all LWPs that have had events that should be reported
9902 to the client. Cancel breakpoints when about to reporting the
9903 event to the client, not while stopping lwps. No longer cancel
9904 finished single-steps here.
9905 (cancel_finished_single_step): Delete.
9906 (cancel_finished_single_steps): Delete.
9907
414a389f
PA
99082010-03-24 Pedro Alves <pedro@codesourcery.com>
9909
9910 * mem-break.c (enum bkpt_type): New.
9911 (struct breakpoint): New field `type'.
9912 (set_breakpoint_at): Change return type to struct breakpoint
9913 pointer. Set type to `other_breakpoint' by default.
9914 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9915 in the breakpoint list.
9916 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9917 (reinsert_breakpoint): Rename to ...
9918 (reinsert_raw_breakpoint): ... this.
9919 (reinsert_breakpoints_at): Adjust.
9920 * mem-break.h (struct breakpoint): Declare.
9921 (set_breakpoint_at): Change return type to struct breakpoint
9922 pointer.
9923
2280c721
PA
99242010-03-24 Pedro Alves <pedro@codesourcery.com>
9925
9926 * server.c (handle_query): Assign, not compare.
9927
d50171e4
PA
99282010-03-24 Pedro Alves <pedro@codesourcery.com>
9929
9930 Teach linux gdbserver to step-over-breakpoints.
9931
9932 * linux-low.c (can_hardware_single_step): New.
9933 (supports_breakpoints): New.
9934 (handle_extended_wait): If stopping threads, read the stop pc of
9935 the new cloned LWP.
9936 (get_pc): New.
9937 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9938 low target doesn't support retrieving the PC.
9939 (add_lwp): Set last_resume_kind to resume_continue.
9940 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9941 (linux_attach): Don't clear stop_expected. Set the lwp's
9942 last_resume_kind to resume_stop.
9943 (linux_detach_one_lwp): Don't check for removed breakpoints.
9944 (check_removed_breakpoint): Delete.
9945 (status_pending_p): Rename to ...
9946 (status_pending_p_callback): ... this. Don't check for removed
9947 breakpoints. Don't consider threads that are stopped from GDB's
9948 perspective.
9949 (linux_wait_for_lwp): Always read the stop_pc here.
9950 (cancel_breakpoint): New.
9951 (step_over_bkpt): New global.
9952 (linux_wait_for_event_1): Implement stepping over breakpoints.
9953 (gdb_wants_lwp_stopped): New.
9954 (gdb_wants_all_stopped): New.
9955 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9956 single-step traps here. Store the thread's last reported target
9957 wait status.
9958 (send_sigstop): Don't clear stop_expected. Always set it,
9959 instead.
9960 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9961 (cancel_finished_single_step): New.
9962 (cancel_finished_single_steps): New.
9963 (wait_for_sigstop): Don't cancel finished single-step traps here.
9964 (linux_resume_one_lwp): Don't check for removed breakpoints.
9965 Don't set `step' on non-hardware step archs.
9966 (linux_set_resume_request): Ignore resume_stop requests if already
9967 stopping or stopped. Set the lwp's last_resume_kind.
9968 (resume_status_pending_p): Don't check for removed breakpoints.
9969 (need_step_over_p): New.
9970 (start_step_over): New.
9971 (finish_step_over): New.
9972 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9973 requests. Clear the thread's last reported target waitstatus.
9974 Don't use the `suspended' flag. Don't consider pending breakpoints.
9975 (linux_resume): Start a step-over if necessary.
9976 (proceed_one_lwp): New.
9977 (proceed_all_lwps): New.
9978 (unstop_all_lwps): New.
9979 * linux-low.h (struct lwp_info): Rewrite comment for the
9980 `suspended' flag. Add the `stop_pc' field. Delete the
9981 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9982 Add `'last_resume_kind' and `need_step_over' fields.
9983 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9984 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9985 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9986 (set_raw_breakpoint_at): New.
9987 (set_breakpoint_at): Rewrite to use it.
9988 (reinsert_breakpoint_handler): Delete.
9989 (set_reinsert_breakpoint): New.
9990 (reinsert_breakpoint_by_bp): Delete.
9991 (delete_reinsert_breakpoints): New.
9992 (uninsert_breakpoint): Rewrite.
9993 (uninsert_breakpoints_at): New.
9994 (reinsert_breakpoint): Rewrite.
9995 (reinsert_breakpoints_at): New.
9996 (check_breakpoints): Rewrite.
9997 (breakpoint_here): New.
9998 (breakpoint_inserted_here): New.
9999 (check_mem_read): Adjust.
10000 * mem-break.h (breakpoints_supported, breakpoint_here)
10001 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10002 (reinsert_breakpoint_by_bp): Delete declaration.
10003 (delete_reinsert_breakpoints): Declare.
10004 (reinsert_breakpoint): Delete declaration.
10005 (reinsert_breakpoints_at): Declare.
10006 (uninsert_breakpoint): Delete declaration.
10007 (uninsert_breakpoints_at): Declare.
10008 (check_breakpoints): Adjust prototype.
10009 * server.h: Adjust include order.
10010 (struct thread_info): Declare here. Add a `last_status' field.
10011
30ba68cb
MS
100122010-03-23 Michael Snyder <msnyder@vmware.com>
10013
10014 * server.c (crc32): New function.
10015 (handle_query): Add handling for 'qCRC:' request.
10016
b9a881c2
PA
100172010-03-23 Pedro Alves <pedro@codesourcery.com>
10018
10019 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10020 lwp had been stopped by a watchpoint.
10021
e92d13d5
PA
100222010-03-16 Pedro Alves <pedro@codesourcery.com>
10023
10024 * server.h (internal_error): Declare.
10025 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10026 * utils.c (internal_error): New function.
10027
64daa791
AS
100282010-03-15 Andreas Schwab <schwab@redhat.com>
10029
10030 * configure.srv: Fix typo setting srv_regobj.
10031
f52cd8cd
PA
100322010-03-15 Pedro Alves <pedro@codesourcery.com>
10033
10034 * linux-low.c (fetch_register): Avoid passing a non string literal
10035 format to `error'.
10036 (usr_store_inferior_registers): Ditto.
10037
93ae6fdc
PA
100382010-03-14 Pedro Alves <pedro@codesourcery.com>
10039
10040 * linux-low.c (linux_write_memory): Bail out early if peeking
10041 memory failed.
10042
c3adc08c
PA
100432010-03-14 Pedro Alves <pedro@codesourcery.com>
10044
10045 * linux-low.h (struct lwp_info): New fields
10046 `stopped_by_watchpoint' and `stopped_data_address'.
10047 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10048 here, and cache them in the lwp object.
10049 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10050 directly.
10051 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10052 field.
10053 (linux_stopped_by_watchpoint): Rewrite.
10054 (linux_stopped_data_address): Rewrite.
10055
bce522a2
PA
100562010-03-06 Simo Melenius <simo.melenius@iki.fi>
10057
10058 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10059 switching the current inferior, not before.
10060
90884b2b
L
100612010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10062
10063 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10064 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10065 i386-linux.c and amd64-linux.c.
10066 (reg-i386.o): Removed.
10067 (reg-i386.c): Likewise.
10068 (reg-i386-linux.o): Likewise.
10069 (reg-i386-linux.c): Likewise.
10070 (reg-x86-64.o): Likewise.
10071 (reg-x86-64.c): Likewise.
10072 (reg-x86-64-linux.o): Likewise.
10073 (reg-x86-64-linux.c): Likewise.
10074 (i386.o): New.
10075 (i386.c): Likewise.
10076 (i386-linux.o): Likewise.
10077 (i386-linux.c): Likewise.
10078 (amd64.o): Likewise.
10079 (amd64.c): Likewise.
10080 (amd64-linux.o): Likewise.
10081 (amd64-linux.c): Likewise.
10082
10083 * configure.srv (srv_i386_regobj): New.
10084 (srv_i386_linux_regobj): Likewise.
10085 (srv_amd64_regobj): Likewise.
10086 (srv_amd64_linux_regobj): Likewise.
10087 (srv_i386_32bit_xmlfiles): Likewise.
10088 (srv_i386_64bit_xmlfiles): Likewise.
10089 (srv_i386_xmlfiles): Likewise.
10090 (srv_amd64_xmlfiles): Likewise.
10091 (srv_i386_linux_xmlfiles): Likewise.
10092 (srv_amd64_linux_xmlfiles): Likewise.
10093 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10094 srv_xmlfiles to $srv_i386_xmlfiles.
10095 (i[34567]86-*-mingw32ce*): Likewise.
10096 (i[34567]86-*-mingw*): Likewise.
10097 (i[34567]86-*-nto*): Likewise.
10098 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10099 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10100 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10101 (x86_64-*-linux*): Likewise.
10102
10103 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10104 (init_registers_amd64_linux): New.
10105 (x86_arch_setup): Replace init_registers_x86_64_linux with
10106 init_registers_amd64_linux.
10107
193f13e6
MK
101082010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10109
10110 * configure.ac: Check for libdl. If it is not available link against
10111 static libthread_db.
10112 * configure: Regenerate.
10113
85d721b8
PA
101142010-02-22 Pedro Alves <pedro@codesourcery.com>
10115
10116 PR9605
10117
10118 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10119 handing a read watchpoint.
10120 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10121
6076632b
DE
101222010-02-12 Doug Evans <dje@google.com>
10123
10124 * linux-low.c (linux_supports_tracefork_flag): Document.
10125 (linux_look_up_symbols): Add comment.
10126
3327ccf7
L
101272010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10128
10129 * regcache.c (supply_register): Clear regcache if buf is NULL.
10130
0718675c 101312010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10132 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10133
10134 * inferiors.c (find_inferior): Add function documentation.
10135 (unloaded_dll): Handle the case where the unloaded dll has not
10136 been previously registered in the dll list.
10137
177321bd
DJ
101382010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10139
10140 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10141 (thumb2_breakpoint): New.
10142 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10143
2b009048
DJ
101442010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10145
10146 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10147 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10148 breakpoints.
10149
3be029c7
PA
101502010-01-21 Pedro Alves <pedro@codesourcery.com>
10151
10152 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10153
18f5de3b
JK
101542010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10155
10156 * linux-s390-low.c (s390_collect_ptrace_register)
10157 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10158
3743bb4f
DE
101592010-01-21 Doug Evans <dje@google.com>
10160
14ce3065
DE
10161 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10162 (PTRACE_ARG4_TYPE): New macro.
10163 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10164 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10165 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10166 (usr_store_inferior_registers): Ditto.
10167 (linux_read_memory, linux_write_memory): Ditto.
10168 (linux_test_for_tracefork): Ditto.
10169
3743bb4f
DE
10170 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10171 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10172
8b315be5
PA
101732010-01-21 Pedro Alves <pedro@codesourcery.com>
10174
10175 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10176 target.
10177
85492558
PA
101782010-01-21 Pedro Alves <pedro@codesourcery.com>
10179
10180 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10181 prototype to take a regcache. Adjust.
10182
442ea881
PA
101832010-01-20 Pedro Alves <pedro@codesourcery.com>
10184
10185 * regcache.h (struct thread_info): Forward declare.
10186 (struct regcache): New.
10187 (new_register_cache): Adjust prototype.
10188 (get_thread_regcache): Declare.
10189 (free_register_cache): Adjust prototype.
10190 (registers_to_string, registers_from_string): Ditto.
10191 (supply_register, supply_register_by_name, collect_register)
10192 (collect_register_as_string, collect_register_by_name): Ditto.
10193 * regcache.c (struct inferior_regcache_data): Delete.
10194 (get_regcache): Rename to ...
10195 (get_thread_regcache): ... this. Adjust. Switch inferior before
10196 fetching registers.
10197 (regcache_invalidate_one): Adjust.
10198 (regcache_invalidate): Fix prototype.
10199 (new_register_cache): Return the new register cache.
10200 (free_register_cache): Change prototype.
10201 (realloc_register_cache): Adjust.
10202 (registers_to_string): Change prototype to take a regcache. Adjust.
10203 (registers_from_string): Ditto.
10204 (register_data): Ditto.
10205 (supply_register): Ditto.
10206 (supply_register_by_name): Ditto.
10207 (collect_register): Ditto.
10208 (collect_register_as_string): Ditto.
10209 (collect_register_by_name): Ditto.
10210 * server.c (process_serial_event): Adjust.
10211 * linux-low.h (regset_fill_func, regset_store_func): Change
10212 prototype.
10213 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10214 Change prototype.
10215 * linux-low.c (get_stop_pc): Adjust.
10216 (check_removed_breakpoint): Adjust.
10217 (linux_wait_for_event): Adjust.
10218 (linux_resume_one_lwp): Adjust.
10219 (fetch_register): Add regcache parameter. Adjust.
10220 (usr_store_inferior_registers): Ditto.
10221 (regsets_fetch_inferior_registers): Ditto.
10222 (regsets_store_inferior_registers): Ditto.
10223 (linux_fetch_registers, linux_store_registers): Ditto.
10224 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10225 regcache. Adjust.
43aaf8b6
PA
10226 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10227 Ditto.
442ea881
PA
10228 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10229 prototype to take a regcache.
10230 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10231 * remote-utils.c (convert_ascii_to_int, outreg)
10232 (prepare_resume_reply): Change prototype to take a regcache.
10233 Adjust.
10234 * target.h (struct target_ops) <fetch_registers, store_registers>:
10235 Change prototype to take a regcache.
10236 (fetch_inferior_registers, store_inferior_registers): Change
10237 prototype to take a regcache. Adjust.
10238 * proc-service.c (ps_lgetregs): Adjust.
10239 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10240 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10241 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10242 take a regcache. Adjust.
10243 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10244 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10245 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10246 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10247 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10248 (cris_cannot_fetch_register):
10249 (cris_breakpoint_at): Change prototype to take a regcache.
10250 Adjust.
10251 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10252 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10253 to take a regcache. Adjust.
10254 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10255 Adjust.
10256 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10257 take a regcache. Adjust.
10258 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10259 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10260 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10261 * linux-mips-low.c (mips_get_pc):
10262 (mips_set_pc): Change prototype to take a regcache. Adjust.
10263 (mips_reinsert_addr): Adjust.
10264 (mips_collect_register): Change prototype to take a regcache.
10265 Adjust.
10266 (mips_supply_register):
10267 (mips_collect_register_32bit, mips_supply_register_32bit)
10268 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10269 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10270 * linux-ppc-low.c (ppc_supply_ptrace_register)
10271 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10272 (parse_spufs_run): Adjust.
10273 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10274 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10275 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10276 take a regcache. Adjust.
10277 * linux-s390-low.c (s390_collect_ptrace_register)
10278 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10279 (s390_set_pc): Change prototype to take a regcache. Adjust.
10280 (s390_arch_setup): Adjust.
10281 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10282 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10283 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10284 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10285 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10286 regcache. Adjust.
10287 (sparc_breakpoint_at): Adjust.
10288 * linux-xtensa-low.c (xtensa_fill_gregset):
10289 (xtensa_store_gregset):
10290 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10291 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10292 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10293 prototype to take a regcache. Adjust.
10294 * win32-arm-low.c (arm_fetch_inferior_register)
10295 (arm_store_inferior_register): Change prototype to take a
10296 regcache. Adjust.
10297 * win32-i386-low.c (i386_fetch_inferior_register)
10298 (i386_store_inferior_register): Change prototype to take a
10299 regcache. Adjust.
10300 * win32-low.c (child_fetch_inferior_registers)
10301 (child_store_inferior_registers): Change prototype to take a
10302 regcache. Adjust.
10303 (win32_wait): Adjust.
10304 (win32_fetch_inferior_registers): Change prototype to take a
10305 regcache. Adjust.
10306 (win32_store_inferior_registers): Adjust.
10307 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10308 store_inferior_register>: Change prototype to take a regcache.
10309
60c3d7b0
DE
103102010-01-20 Doug Evans <dje@google.com>
10311
10312 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10313 #ifdef.
10314 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10315 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10316
dc146f7c
VP
103172010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10318
10319 * linux-low.c (linux_core_of_thread): New.
10320 (compare_ints, show_process, list_threads): New.
10321 (linux_qxfer_osdata): Report threads and cores.
10322 (linux_target_op): Register linux_core_of_thread.
10323 * remote-utils.c (prepare_resume_reply): Report the core.
10324 (buffer_xml_printf): Support %d specifier.
10325 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10326 New.
10327 (handle_query): Handle qXfer:threads. Announce availability
10328 thereof.
10329 * target.h (struct target_ops): New field core_of_thread.
10330
7803799a
UW
103312010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10332
10333 * Makefile.in (clean): Remove new generated files.
10334 (reg-s390.o, reg-s390.c): Remove rules.
10335 (reg-s390x.o, reg-s390x.c): Likewise.
10336 (s390-linux32.o, s390-linux32.c): Add rules.
10337 (s390-linux64.o, s390-linux64.c): Likewise.
10338 (s390x-linux64.o, s390x-linux64.c): Likewise.
10339 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10340 * linux-s390-low.c: Include <elf.h>.
10341 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10342 (init_registers_s390): Remove prototype.
10343 (init_registers_s390x): Likewise.
10344 (init_registers_s390_linux32): Add prototype.
10345 (init_registers_s390_linux64): Likewise.
10346 (init_registers_s390x_linux64): Likewise.
10347 (s390_num_regs_3264): New define.
10348 (s390_regmap_3264): New global variable.
10349 (s390_cannot_fetch_register): Remove obsolete check.
10350 (s390_cannot_store_register): Likewise.
10351 (s390_collect_ptrace_register): Handle upper/lower register halves.
10352 (s390_supply_ptrace_register): Likewise.
10353 (s390_fill_gregset): Update to register number changes.
10354 (s390_get_hwcap): New routine.
10355 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10356 Install appropriate regmap and register set.
10357
6e7ffa39
JB
103582010-01-01 Joel Brobecker <brobecker@adacore.com>
10359
10360 * server.c (gdbserver_version): Update copyright year to 2010.
10361 * gdbreplay.c (gdbreplay_version): Likewise.
10362
957f3f49
DE
103632009-12-28 Doug Evans <dje@google.com>
10364
10365 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10366 elf/external.h. Include <elf.h> instead but only if necessary.
10367
ca5c370d
PA
103682009-12-28 Pedro Alves <pedro@codesourcery.com>
10369
10370 * linux-low.c (linux_remove_process): Remove `detaching'
10371 parameter. Don't release/detach from thread_db here.
10372 (linux_kill): Release/detach from thread_db here, ...
10373 (linux_detach): ... and here, before actually detaching.
10374 (linux_wait_1): ... and here, when a process exits.
10375 * thread-db.c (any_thread_of): New.
10376 (thread_db_free): Switch the current inferior to a thread of the
10377 passed in process.
10378
4ee62156
DE
103792009-12-21 Doug Evans <dje@google.com>
10380
d90e6a88
DE
10381 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10382
c5f62d5f
DE
10383 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10384 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10385 warning ifndef __NR_tkill. Move setting of errno there too.
10386 Delete unnecessary resetting of errno after syscall.
10387 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10388
10e86dd7
DE
10389 * configure.ac: Check for dladdr.
10390 * config.in: Regenerate.
10391 * configure: Regenerate.
10392 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10393 (try_thread_db_load): Update.
10394
4ee62156
DE
10395 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10396
00f515da
DE
103972009-12-18 Doug Evans <dje@google.com>
10398
e9464885
DE
10399 * event-loop.c: Include unistd.h if it exists.
10400
07d4f67e
DE
10401 * linux-low.c (my_waitpid): Move definition away from being in
10402 between linux_tracefork_child/linux_test_for_tracefork.
10403
00f515da
DE
10404 * gdb_proc_service.h (psaddr_t): Fix type.
10405 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10406 signature to match glibc.
10407
1de1badb
DE
104082009-12-16 Doug Evans <dje@google.com>
10409
10410 * linux-low.c (linux_read_memory): Fix argument to read.
10411
aeeb81d1
PA
104122009-11-26 Pedro Alves <pedro@codesourcery.com>
10413
10414 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10415 events, don't leave current_inferior pointing at null.
10416
10357975
PA
104172009-11-26 Pedro Alves <pedro@codesourcery.com>
10418
10419 * win32-low.c (LOG): Delete.
10420 (OUTMSG): Output to stderr.
10421 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10422 on compile time LOG macro.
10423 (win32_wait): Fix debug output.
10424
cf6e3471
PA
104252009-11-26 Pedro Alves <pedro@codesourcery.com>
10426
10427 * win32-low.c (win32_add_one_solib): If the dll name is
10428 "ntdll.dll", prepend the system directory to the dll path.
10429
0c85e18e
MK
104302009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10433
9ac544ce 104342009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10435 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10436
10437 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10438 * configure.ac: Check for __mcoldfire__ and set
10439 gdb_cv_m68k_is_coldfire.
10440 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10441 reg-cf.o and reg-m68k.o.
10442 * configure: Regenerated.
10443
fd7dd3e6
PA
104442009-11-16 Pedro Alves <pedro@codesourcery.com>
10445
10446 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10447 Pass it to thread_db_free.
10448 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10449 proper `detaching' argument to linux_remove_process.
10450 * linux-low.h (thread_db_free): Add `detaching' parameter.
10451 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10452 to thread_db_free.
10453 (thread_db_free): Add `detaching' parameter. Only
10454 call td_ta_clear_event if detaching from process.
10455
75aa492e
MK
104562009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10457
10458 * thread-db.c (thread_db_free): Fix typo.
10459
21e1bee4
PP
104602009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10461
10462 PR gdb/10838
10463 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10464
8838b45e
NS
104652009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10466
10467 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10468 with an i686 compiler.
10469 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10470 needed.
10471 * configure: Rebuilt.
10472
8a35fb51
SL
104732009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10474
10475 PR gdb/10783
10476
10477 * server.c (handle_search_memory_1): Correct read_addr initialization
10478 in loop for searching subsequent chunks.
10479
96f15937
PP
104802009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10481
10482 * configure.ac: New --with-libthread-db option.
10483 * thread-db.c: Allow direct dependence on libthread_db.
10484 (thread_db_free): Adjust.
10485 * config.in: Regenerate.
10486 * configure: Likewise.
889bf7c5 10487
5f7d1694
PP
104882009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10489
10490 PR gdb/10757
10491 * thread-db.c (attach_thread): New function.
10492 (maybe_attach_thread): Return success/failure.
10493 (find_new_threads_callback): Adjust.
889bf7c5
PA
10494 (thread_db_find_new_threads): Loop until no new threads.
10495
88e3b899
PA
104962009-10-13 Pedro Alves <pedro@codesourcery.com>
10497
10498 * proc-service.c (ps_lgetregs): Formatting.
10499
cdbfd419
PP
105002009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10501
10502 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10503 * configure.ac: Adjust.
10504 * linux-low.h (struct process_info_private): Move members to struct
10505 thread_db.
10506 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10507 * linux-low.c (linux_remove_process): Adjust.
10508 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10509 * server.c (handle_query): Move code ...
10510 (handle_monitor_command): ... here. New function.
10511 * target.h (struct target_ops): New member.
10512 * thread-db.c (struct thread_db): New.
10513 (libthread_db_search_path): New variable.
10514 (thread_db_create_event, thread_db_enable_reporting)
10515 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10516 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10517 (try_thread_db_load_1, dladdr_to_soname): New functions.
10518 (try_thread_db_load, thread_db_load_search): New functions.
10519 (thread_db_init): Search for libthread_db.
10520 (thread_db_free): New function.
10521 (thread_db_handle_monitor_command): Likewise.
10522 * config.in: Regenerate.
10523 * configure: Regenerate.
889bf7c5 10524
4168d2d6
UW
105252009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10526
10527 * spu-low.c (spu_kill): Wait for inferior to terminate.
10528 Call clear_inferiors.
10529 (spu_detach): Call clear_inferiors.
10530
81ecdfbb
RW
105312009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10532
10533 * aclocal.m4: Regenerate.
10534 * config.in: Likewise.
10535 * configure: Likewise.
10536
0b9ff2c0
UW
105372009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10538
10539 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10540 (parse_spufs_run): New function.
10541 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10542 (ppc_breakpoint_at): Handle SPU breakpoints.
10543
efcbbd14
UW
105442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10545
10546 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10547 (SPUFS_MAGIC): Define.
10548 (spu_enumerate_spu_ids): New function.
10549 (linux_qxfer_spu): New function.
10550 (linux_target_ops): Install linux_qxfer_spu.
10551
f4d9bade
UW
105522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10553
10554 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10555 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10556 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10557 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10558 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10559 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10560 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10561 (init_registers_powerpc_cell32l): Add prototype.
10562 (init_registers_powerpc_cell64l): Likewise.
10563 (ppc_arch_setup): Detect Cell/B.E. architecture.
10564
96e946ca
RW
105652009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10566
10567 * Makefile.in (datarootdir): New variable.
10568
58d6951d
DJ
105692009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10570
10571 * linux-low.c (linux_write_memory): Update debugging output.
10572 * Makefile.in (clean): Add new descriptions.
10573 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10574 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10575 * configure.srv: Add new files for arm*-*-linux*.
10576 * linux-arm-low.c: Add new declarations.
10577 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10578 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10579 (HWCAP_VFPv3D16): New.
10580 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10581 instead of __IWMMXT__.
10582 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10583 (arm_arch_setup): New.
10584 (target_regsets): Remove #ifdef. Add VFP regset.
10585 (the_low_target): Use arm_arch_setup.
10586
12b42a12
DJ
105872009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10588
10589 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10590 the main thread again.
10591
ac8c974e
AR
105922009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10593
10594 Adding Neutrino gdbserver.
10595 * configure: Regenerated.
10596 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10597 * configure.srv (i[34567]86-*-nto*): New target.
10598 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10599 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10600 (nto_comctrl) [__QNX__]: New function.
10601 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10602
4424e0c3 106032009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10604
10605 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10606 srv_tgtobj.
10607
912cf4ba
PA
106082009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10609 Pedro Alves <pedro@codesourcery.com>
10610
10611 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10612 don't support CONTEXT_EXTENDED_REGISTERS.
10613 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10614 (the_low_target): Install them.
10615 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10616 failing with ERROR_PIPE_NOT_CONNECTED.
10617
aa5ca48f
DE
106182009-06-30 Doug Evans <dje@google.com>
10619 Pierre Muller <muller@ics.u-strasbg.fr>
10620
10621 Add h/w watchpoint support to x86-linux, win32-i386.
10622 * Makefile.in (SFILES): Add i386-low.c
10623 (i386_low_h): Define.
10624 (i386-low.o): Add dependencies.
10625 (linux-x86-low.o): Add i386-low.h dependency.
10626 (win32-i386-low.o): Ditto.
10627 * i386-low.c: New file.
10628 * i386-low.h: New file.
10629 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10630 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10631 * linux-low.c (linux_add_process): Initialize arch_private.
10632 (linux_remove_process): Free arch_private.
10633 (add_lwp): Initialize arch_private.
10634 (delete_lwp): Free arch_private.
10635 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10636 provided.
10637 * linux-low.h (process_info_private): New member arch_private.
10638 (lwp_info): New member arch_private.
10639 (linux_target_ops): New members new_process, new_thread,
10640 prepare_to_resume.
10641 (ptid_of): New macro.
10642 * linux-x86-low.c: Include stddef.h, i386-low.h.
10643 (arch_process_info): New struct.
10644 (arch_lwp_info): New struct.
10645 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10646 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10647 (i386_dr_low_get_status): New function.
10648 (x86_insert_point, x86_remove_point): New functions.
10649 (x86_stopped_by_watchpoint): New function.
10650 (x86_stopped_data_address): New function.
10651 (x86_linux_new_process, x86_linux_new_thread): New functions.
10652 (x86_linux_prepare_to_resume): New function.
10653 (the_low_target): Add entries for insert_point, remove_point,
10654 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10655 prepare_to_resume.
10656 * server.c (debug_hw_points): New global.
10657 (monitor_show_help): Document set debug-hw-points.
10658 (handle_query): Process "set debug-hw-points".
10659 * server.h (debug_hw_points): Declare.
10660 (paddress): Declare.
10661 * utils.c (NUMCELLS, CELLSIZE): New macros.
10662 (get_sell, xsnprintf, paddress): New functions.
10663 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10664 remove_point, stopped_by_watchpoint, stopped_data_address.
10665 * win32-i386-low.c: Include i386-low.h.
10666 (debug_reg_state): Replaces dr.
10667 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10668 (i386_dr_low_get_status): New function.
10669 (i386_insert_point, i386_remove_point): New functions.
10670 (i386_stopped_by_watchpoint): New function.
10671 (i386_stopped_data_address): New function.
10672 (i386_initial_stuff): Update.
10673 (get_thread_context,set_thread_context,i386_thread_added): Update.
10674 (the_low_target): Add entries for insert_point,
10675 remove_point, stopped_by_watchpoint, stopped_data_address.
10676 * win32-low.c (win32_insert_watchpoint): New function.
10677 (win32_remove_watchpoint): New function.
10678 (win32_stopped_by_watchpoint): New function.
10679 (win32_stopped_data_address): New function.
10680 (win32_target_ops): Add entries for insert_watchpoint,
10681 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10682 * win32-low.h (win32_target_ops): New members insert_point,
10683 remove_point, stopped_by_watchpoint, stopped_data_address.
10684
d993e290
PA
106852009-06-25 Pedro Alves <pedro@codesourcery.com>
10686
10687 * server.c (process_serial_event): Re-return unsupported, not
10688 error, if the type isn't recognized. Re-allow supporting only
10689 insert or remove packets. Also call require_running for
10690 breakpoints. Add missing break statement to default case. Tidy.
10691 * target.h (struct target_ops): Rename insert_watchpoint to
10692 insert_point, and remove_watchpoint to remove_point.
10693
10694 * linux-low.h (struct linux_target_ops): Likewise.
10695 * linux-low.c (linux_insert_watchpoint): Rename to ...
10696 (linux_insert_point): ... this. Adjust.
10697 (linux_remove_watchpoint): Rename to ...
10698 (linux_remove_point): ... this. Adjust.
10699 (linux_target_ops): Adjust.
10700 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10701 (cris_insert_point): ... this.
10702 (cris_remove_watchpoint): Rename to ...
10703 (cris_remove_point): ... this.
10704 (the_low_target): Adjust.
10705
0f54c268
PM
107062009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10707
10708 * server.c (handle_v_kill): Pass signal_pid to
10709 kill_inferior if multi_process is zero.
10710
c6314022
AR
107112009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10712
10713 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10714 * target.h (target_ops): Comment for *_watchpoint to make it clear
10715 the functions can get types '0' and '1'.
10716
4463ce24
AR
107172009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10718
10719 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10720 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10721 * regcache.c (get_regcache): Likewise.
10722 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10723 * win32-low.c (child_fetch_inferior_registers): Remove check for
10724 regno 0.
10725
cf8fd78b
PA
107262009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10727 Pedro Alves <pedro@codesourcery.com>
10728
10729 * target.h (struct target_ops) <supports_multi_process>: New
10730 callback.
10731 (target_supports_multi_process): New.
10732 * server.c (handle_query): Even if GDB reports support, only
10733 enable multi-process if the target also supports it. Report
10734 multi-process support only if the target backend supports it.
10735 * linux-low.c (linux_supports_multi_process): New function.
10736 (linux_target_ops): Install it as target_supports_multi_process
10737 callback.
10738
47c0c975
DE
107392009-05-24 Doug Evans <dje@google.com>
10740
e09875d4
DE
10741 Global renaming of find_thread_pid to find_thread_ptid.
10742 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10743 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10744 All callers updated.
10745
e27d73f6
DE
10746 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10747 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10748 directly.
10749
47c0c975
DE
10750 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10751 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10752 (linux_resume_one_lwp): Ditto.
10753
2acc282a
DE
107542009-05-23 Doug Evans <dje@google.com>
10755
10756 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10757 from struct inferior_list_entry * to struct lwp_info *.
10758 All callers updated.
10759
9f1036c1
DE
107602009-05-13 Doug Evans <dje@google.com>
10761
10762 * linux-x86-low.c: Don't include assert.h.
10763 (x86_siginfo_fixup): Use fatal, not assert.
10764 (x86_arch_setup): Fix comment.
10765
d0722149
DE
107662009-05-12 Doug Evans <dje@google.com>
10767
10768 Biarch support for i386/amd64 gdbserver.
10769 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10770 Add linux-x86-low.c.
10771 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10772 (linux-x86-low.o): Add.
10773 * linux-x86-64-low.c: Delete.
10774 * linux-i386-low.c: Delete.
10775 * linux-x86-low.c: New file.
10776 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10777 linux-x86-low.o.
10778 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10779 linux-x86-low.o.
10780 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10781 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10782 (linux_child_pid_to_exec_file): New function.
10783 (elf_64_header_p, elf_64_file_p): New functions.
10784 (siginfo_fixup): New function.
10785 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10786 give target a chance to convert layout.
10787 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10788 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10789
fdeb2a12
DE
107902009-05-07 Doug Evans <dje@google.com>
10791
10792 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10793 (regsets_store_inferior_registers): Ditto.
10794
a6dbe5df
PA
107952009-05-06 Pedro Alves <pedro@codesourcery.com>
10796
10797 PR server/10048
10798
10799 * linux-low.c (must_set_ptrace_flags): Delete.
10800 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10801 of the global.
10802 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10803 `lwp->must_set_ptrace_flags' instead.
ba42693b 10804 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10805 (linux_wait_1): ... not here.
10806
5091eb23
DE
108072009-04-30 Doug Evans <dje@google.com>
10808
9f767825
DE
10809 * inferiors.c (started_inferior_callback): New function.
10810 (attached_inferior_callback): New function.
10811 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10812 * server.c (print_started_pid, print_attached_pid): New functions.
10813 (detach_or_kill_for_exit): New function.
10814 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10815 * server.h (have_started_inferiors_p): Declare.
10816 (have_attached_inferiors_p): Declare.
10817
5091eb23
DE
10818 * inferiors.c (remove_process): Fix memory leak, free process.
10819 * linux-low.c (linux_remove_process): New function.
10820 (linux_kill): Call it instead of remove_process.
10821 (linux_detach, linux_wait_1): Ditto.
10822
155c8968
PA
108232009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10824
10825 * configure.srv: Add x86 Windows CE target.
10826
7fe519cb
UW
108272009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10828
10829 * inferiors.c (get_thread_process): Make global.
10830 * server.h (get_thread_process): Add prototype.
10831 * thread-db.c (find_one_thread): Use get_thread_process
10832 instead of current_process.
10833 (thread_db_get_tls_address): Do not crash if called when
10834 thread layer is not yet initialized.
10835
5472f405
UW
108362009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10837
10838 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10839 * spu-low.c (current_tid): Rename to ...
10840 (current_ptid): ... this.
10841 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10842 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10843 ptid_get_lwp (current_ptid) instead of current_tid.
10844 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10845 instead of current_tid. Use find_process_pid to verify pid
10846 argument is valid. Pass proper argument to remove_process.
10847 (spu_thread_alive): Compare current_ptid instead of current_tid.
10848 (spu_resume): Likewise.
10849
55ac2b99
PA
108502009-04-02 Pedro Alves <pedro@codesourcery.com>
10851
10852 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10853 variable.
10854
95954743
PA
108552009-04-01 Pedro Alves <pedro@codesourcery.com>
10856
10857 Implement the multiprocess extensions, and add linux multiprocess
10858 support.
10859
10860 * server.h (ULONGEST): Declare.
10861 (struct ptid, ptid_t): New.
10862 (minus_one_ptid, null_ptid): Declare.
10863 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10864 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10865 (struct inferior_list_entry): Change `id' type from unsigned from
10866 to ptid_t.
10867 (struct sym_cache, struct breakpoint, struct
10868 process_info_private): Forward declare.
10869 (struct process_info): Declare.
10870 (current_process): Declare.
10871 (all_processes): Declare.
10872 (initialize_inferiors): Declare.
10873 (add_thread): Adjust to use ptid_t.
10874 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10875 (add_process, remove_process, find_thread_pid): Declare.
10876 (find_inferior_id): Adjust to use ptid_t.
10877 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10878 (multi_process): Declare.
10879 (push_event): Adjust to use ptid_t.
10880 (read_ptid, write_ptid): Declare.
10881 (prepare_resume_reply): Adjust to use ptid_t.
10882 (clear_symbol_cache): Declare.
10883 * inferiors.c (all_processes): New.
10884 (null_ptid, minus_one_ptid): New.
10885 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10886 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10887 (add_thread): Change unsigned long to ptid. Remove gdb_id
10888 parameter. Adjust.
10889 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10890 (gdb_id_to_thread): Rename to ...
10891 (find_thread_pid): ... this. Change unsigned long to ptid.
10892 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10893 (loaded_dll, pull_pid_from_list): Adjust.
10894 (add_process, remove_process, find_process_pid)
10895 (get_thread_process, current_process, initialize_inferiors): New.
10896 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10897 (struct target_waitstatus) <related_pid>: Ditto.
10898 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10899 return type to int.
10900 (struct target_ops) <join>: Add `pid' argument.
10901 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10902 (struct target_ops) <wait>: Add `ptid' field. Change return type
10903 to ptid.
10904 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10905 (mywait): Add `ptid' argument. Change return type to ptid_t.
10906 (target_pid_to_str): Declare.
10907 * target.c (set_desired_inferior): Adjust to use ptids.
10908 (mywait): Add new `ptid' argument. Adjust.
10909 (target_pid_to_str): New.
10910 * mem-break.h (free_all_breakpoints): Declare.
10911 * mem-break.c (breakpoints): Delelete.
10912 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10913 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10914 to use per-process breakpoint list.
10915 (free_all_breakpoints): New.
10916 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10917 (symbol_cache, all_symbols_looked_up): Delete.
10918 (hexchars): New.
10919 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10920 read_ptid): New.
10921 (prepare_resume_reply): Change ptid argument's type from unsigned
10922 long to ptid_t. Adjust. Implement W;process and X;process.
10923 (free_sym_cache, clear_symbol_cache): New.
10924 (look_up_one_symbol): Adjust to per-process symbol cache. *
10925 * server.c (cont_thread, general_thread, step_thread): Change type
10926 to ptid_t.
10927 (attached): Delete.
10928 (multi_process): New.
10929 (last_ptid): Change type to ptid_t.
10930 (struct vstop_notif) <ptid>: Change type to ptid_t.
10931 (queue_stop_reply, push_event): Change `ptid' argument's type to
10932 ptid_t.
10933 (discard_queued_stop_replies): Add `pid' argument.
10934 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10935 changes. Don't reference the `attached' global.
10936 (attach_inferior): Adjust to mywait interface changes.
10937 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10938 features. Handle and report "multiprocess+". Handle
10939 "qAttached:PID".
10940 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10941 changes.
10942 (handle_v_kill): New.
10943 (handle_v_stopped): Adjust to use target_pid_to_str.
10944 (handle_v_requests): Allow multiple attaches and runs when
10945 multiprocess extensions are in effect. Handle "vKill".
10946 (myresume): Adjust to use ptids.
10947 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10948 (handle_status): Adjust to discard_queued_stop_replies interface
10949 change.
10950 (first_thread_of, kill_inferior_callback)
10951 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10952 (main): Call initialize_inferiors. Adjust to use ptids, killing
10953 and detaching from all inferiors. Handle multiprocess packet
10954 variants.
10955 * linux-low.h: Include gdb_proc_service.h.
10956 (struct process_info_private): New.
10957 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10958 <lwpid_of>: Use ptid_get_lwp.
10959 (get_lwp_thread): Adjust.
10960 (struct lwp_info): Add `dead' member.
10961 (find_lwp_pid): Declare.
10962 * linux-low.c (thread_db_active): Delete.
10963 (new_inferior): Adjust comment.
10964 (inferior_pid): Delete.
10965 (linux_add_process): New.
10966 (handle_extended_wait): Adjust.
10967 (add_lwp): Change unsigned long to ptid.
10968 (linux_create_inferior): Add process to processes table. Adjust
10969 to use ptids. Don't set new_inferior here.
10970 (linux_attach_lwp): Rename to ...
10971 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10972 it. Adjust to use ptids.
10973 (linux_attach_lwp): New.
10974 (linux_attach): Add process to processes table. Don't set
10975 new_inferior here.
10976 (struct counter): New.
10977 (second_thread_of_pid_p, last_thread_of_process_p): New.
10978 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10979 multiple processes.
10980 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10981 processes. Remove process from process table.
10982 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10983 to multiple processes.
10984 (any_thread_of): New.
10985 (linux_detach): Add `pid' argument, and handle it. Remove process
10986 from processes table.
10987 (linux_join): Add `pid' argument. Handle it.
10988 (linux_thread_alive): Change unsighed long argument to ptid_t.
10989 Consider dead lwps as not being alive.
10990 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10991 threads we're not interested in.
10992 (same_lwp, find_lwp_pid): New.
10993 (linux_wait_for_lwp): Change `pid' argument's type from int to
10994 ptid_t. Adjust.
10995 (linux_wait_for_event): Rename to ...
10996 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10997 from int to ptid_t. Adjust.
10998 (linux_wait_for_event): New.
10999 (linux_wait_1): Add `ptid' argument. Change return type to
11000 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11001 that exit from the process table.
11002 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11003 Adjust.
11004 (mark_lwp_dead): New.
11005 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11006 stopping all threads, mark its main lwp as dead.
11007 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11008 ptids.
11009 (fetch_register, usr_store_inferior_registers)
11010 (regsets_fetch_inferior_registers)
11011 (regsets_store_inferior_registers, linux_read_memory)
11012 (linux_write_memory): Inline `inferior_pid'.
11013 (linux_look_up_symbols): Adjust to use per-process
11014 `thread_db_active'.
11015 (linux_request_interrupt): Adjust to use ptids.
11016 (linux_read_auxv): Inline `inferior_pid'.
11017 (initialize_low): Don't reference thread_db_active.
11018 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11019 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11020 (ps_getpid): Return the pid of the current inferior.
11021 * thread-db.c (proc_handle, thread_agent): Delete.
11022 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11023 per-process data.
11024 (find_one_thread): Change argument type to ptid_t. Adjust to
11025 per-process data.
11026 (maybe_attach_thread): Adjust to per-process data and ptids.
11027 (thread_db_find_new_threads): Ditto.
11028 (thread_db_init): Ditto.
11029 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11030 processes table. Adjust to use ptids.
11031 (spu_kill, spu_detach): Adjust interface. Remove process from
11032 processes table.
11033 (spu_join, spu_thread_alive): Adjust interface.
11034 (spu_wait): Adjust interface. Remove process from processes
11035 table. Adjust to use ptids.
11036 * win32-low.c (current_inferior_tid): Delete.
11037 (current_inferior_ptid): New.
11038 (debug_event_ptid): New.
11039 (thread_rec): Take a ptid. Adjust.
11040 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11041 (child_delete_thread): Ditto.
11042 (do_initial_child_stuff): Add `attached' argument. Add process to
11043 processes table.
11044 (child_fetch_inferior_registers, child_store_inferior_registers):
11045 Adjust.
11046 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11047 (win32_attach): Pass 1 to do_initial_child_stuff.
11048 (win32_kill): Adjust interface. Remove process from processes
11049 table.
11050 (win32_detach): Ditto.
11051 (win32_join): Adjust interface.
11052 (win32_thread_alive): Take a ptid.
11053 (win32_resume): Adjust to use ptids.
11054 (get_child_debug_event): Ditto.
11055 (win32_wait): Adjust interface. Remove exiting process from
11056 processes table.
11057
bd99dc85
PA
110582009-04-01 Pedro Alves <pedro@codesourcery.com>
11059
11060 Non-stop mode support.
11061
11062 * server.h (non_stop): Declare.
11063 (gdb_client_data, handler_func): Declare.
11064 (delete_file_handler, add_file_handler, start_event_loop):
11065 Declare.
11066 (handle_serial_event, handle_target_event, push_event)
11067 (putpkt_notif): Declare.
11068 * target.h (enum resume_kind): New.
11069 (struct thread_resume): Replace `step' field by `kind' field.
11070 (TARGET_WNOHANG): Define.
11071 (struct target_ops) <wait>: Add `options' argument.
11072 <supports_non_stop, async, start_non_stop>: New fields.
11073 (target_supports_non_stop, target_async): New.
11074 (start_non_stop): Declare.
11075 (mywait): Add `options' argument.
11076 * target.c (mywait): Add `options' argument. Print child exit
11077 notifications here.
11078 (start_non_stop): New.
11079 * server.c (non_stop, own_buf, mem_buf): New globals.
11080 (struct vstop_notif): New.
11081 (notif_queue): New global.
11082 (queue_stop_reply, push_event, discard_queued_stop_replies)
11083 (send_next_stop_reply): New.
11084 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11085 interface changes.
11086 (attach_inferior): In non-stop mode, don't wait for the target
11087 here.
11088 (handle_general_set): Handle QNonStop.
11089 (handle_query): When handling qC, return the current general
11090 thread, instead of the first thread of the list.
11091 (handle_query): If the backend supports non-stop mode, include
11092 QNonStop+ in the qSupported query response.
11093 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11094 and non-stop mode.
11095 (handle_v_attach, handle_v_run): Handle non-stop mode.
11096 (handle_v_stopped): New.
11097 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11098 (myresume): Adjust to use resume_kind. Handle non-stop.
11099 (queue_stop_reply_callback): New.
11100 (handle_status): Handle non-stop mode.
11101 (main): Clear non_stop flag on reconnection. Use the event-loop.
11102 Refactor serial protocol handling from here ...
11103 (process_serial_event): ... to this new function. When GDB
11104 selects any thread, select one here. In non-stop mode, wait until
11105 GDB acks all pending events before exiting.
11106 (handle_serial_event, handle_target_event): New.
11107 * remote-utils.c (remote_open): Install remote_desc in the event
11108 loop.
11109 (remote_close): Remove remote_desc from the event loop.
11110 (putpkt_binary): Rename to...
11111 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11112 (putpkt_binary): New as wrapper around putpkt_binary_1.
11113 (putpkt_notif): New.
11114 (prepare_resume_reply): In non-stop mode, don't change the
11115 general_thread.
11116 * event-loop.c: New.
11117 * Makefile.in (OBJ): Add event-loop.o.
11118 (event-loop.o): New rule.
11119
11120 * linux-low.h (pid_of): Moved here.
11121 (lwpid_of): New.
11122 (get_lwp_thread): Use lwpid_of.
11123 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11124 * linux-low.c (pid_of): Delete.
11125 (inferior_pid): Use lwpid_of.
11126 (linux_event_pipe): New.
11127 (target_is_async_p): New.
11128 (delete_lwp): New.
11129 (handle_extended_wait): Use lwpid_of.
11130 (add_lwp): Don't set lwpid field.
11131 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11132 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11133 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11134 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11135 first. Adjust to linux_wait_for_event interface changes. Use
11136 lwpid_of.
11137 (linux_detach): Don't delete the main lwp here.
11138 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11139 (status_pending_p): Don't consider explicitly suspended lwps.
11140 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11141 pointer. Add OPTIONS argument. Change return type to int. Use
11142 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11143 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11144 pointer. Add status pointer argument. Return a pid instead of a
11145 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11146 changes. In non-stop mode, don't switch to a random thread.
11147 (linux_wait): Rename to...
11148 (linux_wait_1): ... this. Add target_options argument, and handle
11149 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11150 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11151 clean exit and signal exit code. Don't stop all threads in
11152 non-stop mode. In all-stop mode, only stop all threads when
11153 reporting a stop to GDB. Handle explicit thread stop requests.
11154 (async_file_flush, async_file_mark): New.
11155 (linux_wait): New.
11156 (send_sigstop): Use lwpid_of.
11157 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11158 interface changes. In non-stop mode, don't switch to a random
11159 thread.
11160 (linux_resume_one_lwp): Use lwpid_of.
11161 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11162 (linux_resume_one_thread): ... this. Handle resume_stop. In
11163 non-stop mode, don't look for pending flag in all threads.
11164 (resume_status_pending_p): Don't consider explicitly suspended
11165 threads.
11166 (my_waitpid): Reimplement. Emulate __WALL.
11167 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11168 Use lwpid_of.
11169 (sigchld_handler, linux_supports_non_stop, linux_async)
11170 (linux_start_non_stop): New.
11171 (linux_target_ops): Register linux_supports_non_stop, linux_async
11172 and linux_start_non_stop.
11173 (initialize_low): Install SIGCHLD handler.
11174 * thread-db.c (thread_db_create_event, find_one_thread)
11175 (thread_db_get_tls_address): Use lwpid_of.
11176 * win32-low.c (win32_detach): Adjust to use resume_kind.
11177 (win32_wait): Add `options' argument.
11178 * spu-low.c (spu_resume): Adjust to use resume_kind.
11179 (spu_wait): Add `options' argument.
11180
5b1c542e
PA
111812009-04-01 Pedro Alves <pedro@codesourcery.com>
11182
11183 Decouple target code from remote protocol.
11184
11185 * target.h (enum target_waitkind): New.
11186 (struct target_waitstatus): New.
11187 (struct target_ops) <wait>: Return an unsigned long. Take a
11188 target_waitstatus pointer instead of a char pointer.
11189 (mywait): Likewise.
11190 * target.c (mywait): Change prototype to return an unsigned long.
11191 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11192 * server.h (thread_from_wait, old_thread_from_wait): Delete
11193 declarations.
11194 (prepare_resume_reply): Change prototype to take a
11195 target_waitstatus.
11196 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11197 (last_status, last_ptid): New.
11198 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11199 pid instead of a signal.
11200 (attach_inferior): Remove "status" and "signal" parameters.
11201 Adjust.
11202 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11203 not as an address.
11204 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11205 (handle_v_requests, myresume): Remove "status" and "signal"
11206 parameters. Adjust.
11207 (handle_status): New.
11208 (main): Delete local `status'. Adjust.
11209 * remote-utils.c: Include target.h.
11210 (prepare_resume_reply): Change prototype to take a
11211 target_waitstatus. Adjust.
11212
11213 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11214 interface.
11215 * spu-low.c (spu_wait): Adjust.
11216 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11217 Delete.
11218 (win32_wait): Adjust.
11219
2bd7c093
PA
112202009-04-01 Pedro Alves <pedro@codesourcery.com>
11221
11222 * target.h (struct thread_resume): Delete leave_stopped member.
11223 (struct target_ops): Add a `n' argument to the `resume' callback.
11224 * server.c (start_inferior): Adjust.
11225 (handle_v_cont, myresume): Adjust.
11226 * linux-low.c (check_removed_breakpoint): Adjust to resume
11227 interface change, and to removed leave_stopped field.
11228 (resume_ptr): Delete.
11229 (struct thread_resume_array): New.
11230 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11231 resume interface change.
11232 (linux_continue_one_thread, linux_queue_one_thread)
11233 (resume_status_pending_p): Check if the resume field is NULL
11234 instead of checking the leave_stopped member.
11235 (linux_resume): Adjust to the target resume interface change.
11236 * spu-low.c (spu_resume): Adjust to the target resume interface
11237 change.
11238 * win32-low.c (win32_detach, win32_resume): Ditto.
11239
c35fafde
PA
112402009-04-01 Pedro Alves <pedro@codesourcery.com>
11241
11242 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11243 flag.
11244 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11245 pending.
11246 (linux_continue_one_thread): Only preserve the stepping flag if
11247 there's a pending breakpoint.
11248
0a59d50b
PA
112492009-03-31 Pedro Alves <pedro@codesourcery.com>
11250
11251 * server.c (main): After the inferior having exited, call
11252 remote_close before exiting gdbserver.
11253
f04c6d38
TJB
112542009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11255
11256 Fix size of FPSCR in Power 7 processors.
11257 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11258 (PPC_FEATURE_HAS_DFP): New #define.
11259 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11260 size of the FPSCR.
11261
78e5cee6
PA
112622009-03-23 Pedro Alves <pedro@codesourcery.com>
11263
11264 * server.c (handle_query) Whitespace and formatting.
11265
1b3f6016
PA
112662009-03-22 Pedro Alves <pedro@codesourcery.com>
11267
11268 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11269 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11270 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11271 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11272 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11273 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11274 Makefile.in, configure.ac: Fix whitespace throughout.
11275 * configure: Regenerate.
11276
a07b2135
PA
112772009-03-22 Pedro Alves <pedro@codesourcery.com>
11278
11279 * inferiors.c (find_inferior): Make it safe for the callback
11280 function to delete the currently iterated inferior.
11281
67cc2626
PA
112822009-03-22 Pedro Alves <pedro@codesourcery.com>
11283
11284 * Makefile.in (linuw_low_h): Move higher.
11285 (thread-db.o): Depend on $(linux_low_h).
11286
54a0b537
PA
112872009-03-17 Pedro Alves <pedro@codesourcery.com>
11288
11289 Rename "process" to "lwp" throughout.
11290
11291 * linux-low.c (all_processes): Rename to...
11292 (all_lwps): ... this.
11293 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11294 (add_process): Rename to ...
11295 (add_lwp): ... this. Adjust.
11296 (linux_create_inferior): Adjust.
11297 (linux_attach_lwp): Adjust.
11298 (linux_attach): Adjust.
11299 (linux_kill_one_process): Rename to ...
11300 (linux_kill_one_lwp): ... this. Adjust.
11301 (linux_kill): Adjust.
11302 (linux_detach_one_process): Rename to ...
11303 (linux_detach_one_lwp): ... this. Adjust.
11304 (linux_detach): Adjust.
11305 (check_removed_breakpoint): Adjust.
11306 (status_pending_p): Adjust.
11307 (linux_wait_for_process): Rename to ...
11308 (linux_wait_for_lwp): ... this. Adjust.
11309 (linux_wait_for_event): Adjust.
11310 (send_sigstop): Adjust.
11311 (wait_for_sigstop): Adjust.
11312 (stop_all_processes): Rename to ...
11313 (stop_all_lwps): ... this.
11314 (linux_resume_one_process): Rename to ...
11315 (linux_resume_one_lwp): ... this. Adjust.
11316 (linux_set_resume_request, linux_continue_one_thread)
11317 (linux_queue_one_thread, resume_status_pending_p)
11318 (usr_store_inferior_registers, regsets_store_inferior_registers)
11319 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11320 Adjust.
11321 * linux-low.h (get_process): Rename to ...
11322 (get_lwp): ... this. Adjust.
11323 (get_thread_process): Rename to ...
11324 (get_thread_lwp): ... this. Adjust.
11325 (get_process_thread): Rename to ...
11326 (get_lwp_thread): ... this. Adjust.
11327 (struct process_info): Rename to ...
11328 (struct lwp_info): ... this.
11329 (all_processes): Rename to ...
11330 (all_lwps): ... this.
11331 * proc-service.c (ps_lgetregs): Adjust.
11332 * thread-db.c (thread_db_create_event, find_one_thread)
11333 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11334
0b16c5cf
PA
113352009-03-14 Pedro Alves <pedro@codesourcery.com>
11336
11337 * server.c (handle_query): Handle "qAttached".
11338
32de4b9d
NS
113392009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11340
11341 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11342 GPLv3, update license URL.
11343
2aecd87f
DE
113442009-03-01 Doug Evans <dje@google.com>
11345
93efd302 11346 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11347 (server_h): Add gdb_signals.h.
11348 (signals.o): Update.
11349 * server.h (target_signal_from_host,target_signal_to_host_p)
11350 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11351
86b1f9c5
PM
113522009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11353
11354 * remote-utils.c (getpkt): Also generate remote-debug
11355 information if noack_mode is set.
11356
4aa995e1
PA
113572009-02-06 Pedro Alves <pedro@codesourcery.com>
11358
11359 * server.c (handle_query): Report qXfer:siginfo:read and
11360 qXfer:siginfo:write as supported and handle them.
11361 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11362 * linux-low.c (linux_xfer_siginfo): New.
11363 (linux_target_ops): Set it.
11364
62709adf
PA
113652009-01-26 Pedro Alves <pedro@codesourcery.com>
11366
11367 * server.c (gdbserver_usage): Mention --remote-debug.
11368 (main): Accept '--remote-debug' switch.
11369
aef93bd7
DE
113702009-01-18 Doug Evans <dje@google.com>
11371
11372 * regcache.c (new_register_cache): No need to check result of xcalloc.
11373 * server.c (handle_search_memory): Back out calls to xmalloc,
11374 result is checked and error is returned to user upon failure.
11375 (handle_query): Ditto. Add more checks for result of malloc.
11376 (handle_v_cont): Check result of malloc, report error back to
11377 user upon failure.
11378 (handle_v_run): Ditto. Call freeargv.
11379 * server.h (freeargv): Declare.
11380 * utils.c (freeargv): New fn.
11381
54363045
DE
113822009-01-15 Doug Evans <dje@google.com>
11383
f626972c
DE
11384 * gdbreplay.c (perror_with_name): Make arg const char *.
11385 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11386 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11387 * utils.c (perror_with_name): Make arg const char *.
54363045 11388
18aae699
PA
113892009-01-14 Pedro Alves <pedro@codesourcery.com>
11390
11391 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11392 when handling a EXIT_PROCESS_DEBUG_EVENT.
11393
ff703abe
JB
113942009-01-06 Joel Brobecker <brobecker@adacore.com>
11395
11396 * gdbreplay.c (gdbreplay_version): Update copyright year.
11397 * server.c (gdbserver_version): Likewise.
11398
f21cc1a2 113992009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11400
11401 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11402 (handle_extended_wait): Improve comment.
0e21c1ec 11403
bca929d3
DE
114042008-12-13 Doug Evans <dje@google.com>
11405
11406 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11407 * server.h (ATTR_MALLOC): New macro.
11408 (xmalloc,xcalloc,xstrdup): Declare.
11409 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11410 * inferiors.c: Ditto.
11411 * linux-low.c: Ditto.
11412 * mem-break.c: Ditto.
11413 * regcache.c: Ditto.
11414 * remote-utils.c: Ditto.
11415 * server.c: Ditto.
11416 * target.c: Ditto.
11417 * win32-low.c: Ditto.
11418
97438e3f
DE
114192008-12-12 Doug Evans <dje@google.com>
11420
896c7fbb
DE
11421 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11422 in debugging printf.
11423
97438e3f
DE
11424 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11425
e3b886f8
DE
114262008-12-09 Doug Evans <dje@google.com>
11427
11428 * linux-low.h (struct process_info): Delete member tid, unused.
11429 * thread-db.c (find_one_thread): Update.
11430 (maybe_attach_thread): Update.
11431
07e059b5
VP
114322008-12-02 Pedro Alves <pedro@codesourcery.com>
11433
889bf7c5
PA
11434 * target.h (struct target_ops): Add qxfer_osdata member.
11435 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11436 and dirent.h.
11437 (linux_qxfer_osdata): New functions.
11438 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11439 callback.
11440 * server.c (handle_query): Handle "qXfer:osdata:read:".
11441 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11442 (buffer_xml_printf): New functions.
11443 * server.h (struct buffer): New.
11444 (buffer_grow_str, buffer_grow_str0): New macros.
11445 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11446 (buffer_xml_printf): Declare.
07e059b5 11447
4cab47ab
DE
114482008-11-24 Doug Evans <dje@google.com>
11449
11450 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11451
f142445f
DJ
114522008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11453
11454 * server.c (handle_v_run): Always use the supplied argument list.
11455
d0107bb6 114562008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11457
d0107bb6
BW
11458 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11459 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11460
2c4ad781
TJB
114612008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11462
11463 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11464 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11465 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11466 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11467 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11468 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11469 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11470 XML target descriptions.
11471 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11472 when inferior is running on an ISA 2.05 or later processor. Add
11473 special case to return offset for full 64-bit slot of FPSCR when
11474 in 32-bits.
11475
dfb64f85
DJ
114762008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11477
11478 * Makefile.in (SFILES, clean): Added sparc64 files.
11479 (reg-sparc64.o, reg-sparc64.c): New.
11480 * configure.srv (sparc*-*-linux*): New configuration.
11481 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11482 syscall arguments for SPARC.
11483 (regsets_store_inferior_registers): Likewise.
11484 * linux-sparc-low.c: New file.
11485
66b6e1dd
DE
114862008-10-21 Doug Evans <dje@google.com>
11487
11488 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11489 (READLINE_DIR,READLINE_DEP): Delete.
11490 (INTERNAL_CFLAGS): Update.
11491 (LINTFLAGS): Update.
11492
9b710a42
PA
114932008-10-10 Pedro Alves <pedro@codesourcery.com>
11494
11495 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11496 whole argv from the last run, not just argv[0].
11497
5822d809
PA
114982008-09-08 Pedro Alves <pedro@codesourcery.com>
11499
11500 * regcache.c (new_register_cache): Return NULL if the register
11501 cache size isn't known yet.
11502 (free_register_cache): Avoid dereferencing a NULL regcache.
11503
74aac56f
DJ
115042008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11505
11506 * configure.srv: Merge MIPS and MIPS64.
11507
400b20f5
MR
115082008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11509
11510 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11511
677c5bb1
LM
115122008-08-18 Luis Machado <luisgpm@br.ibm.com>
11513
11514 * Makefile.in: Add required vsx dependencies.
11515
11516 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11517 Declare init_registers_powerpc_vsx32l.
11518 Declare init_registers_powerpc_vsx64l.
11519 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11520 (ppc_arch_setup): Check for VSX in hwcap.
11521 (ppc_fill_vsxregset): New function.
11522 (ppc_store_vsxregset): New function.
11523 Add new VSX entry in regset_info target_regsets.
11524
11525 * configure.srv: Add new VSX dependencies.
11526
a6f3e723
SL
115272008-08-12 Pedro Alves <pedro@codesourcery.com>
11528
11529 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11530 (remote_open): Set or clear transport_is_reliable.
11531 (putpkt_binary): Don't expect acks in noack mode.
11532 (getpkt): Don't send ack/nac in noack mode.
11533 * server.c (handle_general_set): Handle QStartNoAckMode.
11534 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11535 qSupported.
11536 (main): Reset noack_mode on every connection.
11537 * server.h (noack_mode): Declare.
11538
a417dc56
RW
115392008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11540
11541 * Makefile.in (GDBREPLAY_OBS): New variable.
11542 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11543
3221518c
UW
115442008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11545 Daniel Jacobowitz <dan@codesourcery.com>
11546
11547 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11548 (usr_store_inferior_registers): Likewise.
11549 (regsets_store_inferior_registers): Likewise.
11550
ec56be1b
PA
115512008-07-31 Rolf Jansen <rj@surtec.com>
11552 Pedro Alves <pedro@codesourcery.com>
11553
11554 * configure.ac: Check for memmem declaration.
11555 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11556 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11557 (disable_packet_qfThreadInfo): Unconditionally compile.
11558 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11559 * configure, config.in: Regenerate.
11560
2fe5e3ff
DE
115612008-07-28 Doug Kwan <dougkwan@google.com>
11562
11563 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11564 (linux_write_memory): Remove declaration of errno.
11565
836acd6d
UW
115662008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11567
11568 * linux-low.c (handle_extended_wait): Do not use "status"
11569 variable uninitialized.
11570
aeba519e
PA
115712008-07-07 Pedro Alves <pedro@codesourcery.com>
11572
11573 * server.c (handle_v_attach): Inhibit reporting dll changes.
11574
db42f210
PA
115752008-06-27 Pedro Alves <pedro@codesourcery.com>
11576
11577 * remote-utils.c (prepare_resume_reply): If requested, don't
11578 output "thread:TID" in the T stop reply.
11579
11580 * server.c (disable_packet_vCont, disable_packet_Tthread)
11581 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11582 (handle_query): If requested, disable support for qC, qfThreadInfo
11583 and qsThreadInfo.
11584 (handle_v_requests): If requested, disable support for vCont.
11585 (gdbserver_show_disableable): New.
11586 (main): Handle --disable-packet and --disable-packet=LIST.
11587
11588 * server.h (disable_packet_vCont, disable_packet_Tthread)
11589 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11590
8e4c5421
CD
115912008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11592
11593 * server.c (gdbserver_usage): Mention --version.
11594
6e23a804
DJ
115952008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11596
11597 * Makefile.in (gdbreplay.o): New rule.
11598
90aa6a40
JM
115992008-06-06 Joseph Myers <joseph@codesourcery.com>
11600
11601 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11602 message, not gdbserver.
11603
c16158bc 116042008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11605 Nathan Sidwell <nathan@codesourcery.com>
11606 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11607
11608 * acinclude.m4: Include ../../config/acx.m4.
11609 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11610 * configure, config.in: Regenerate.
11611 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11612 * server.c (gdbserver_version): Print PKGVERSION.
11613 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11614 (main): Adjust gdbserver_usage calls.
11615 * gdbreplay.c (version, host_name): Add declarations.
11616 (gdbreplay_version, gdbreplay_usage): New.
11617 (main): Accept --version and --help options.
11618
aeb75bf5
DJ
116192008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11620
11621 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11622 (arm_breakpoint_at): Handle Thumb.
11623 (the_low_target): Add comment.
11624
76b233dd
UW
116252008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11626
11627 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11628
08388c79
DE
116292008-05-09 Doug Evans <dje@google.com>
11630
a3c83fae
DE
11631 * server.h (decode_search_memory_packet): Declare.
11632 * remote-utils.c (decode_search_memory_packet): New fn.
11633 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11634 (handle_search_memory): New fn.
11635 (handle_query): Process qSearch:memory packets.
11636
bb9c3d36
UW
116372008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11638
11639 * regcache.c (registers_length): Remove.
11640 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11641 full register packet.
11642 * regcache.h (registers_length): Remove prototype.
11643 * server.h (PBUFSIZ): Define to 16384.
11644
7284e1be
UW
116452008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11646
11647 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11648 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11649 powerpc-64l.o, and powerpc-altivec64l.o.
11650 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11651 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11652 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11653 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11654 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11655 to srv_xmlfiles.
11656
11657 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11658 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11659 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11660 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11661 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11662 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11663 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11664 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11665 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11666 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11667 (clean): Update.
11668
11669 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11670 (init_registers_powerpc_32l): ... this new prototype.
11671 (init_registers_powerpc_32): Remove, replace by ...
11672 (init_registers_powerpc_altivec32l): ... this new prototype.
11673 (init_registers_powerpc_e500): Remove, replace by ...
11674 (init_registers_powerpc_e500l): ... this new prototype.
11675 (init_registers_ppc64): Remove, replace by ...
11676 (init_registers_powerpc_64l): ... this new prototype.
11677 (init_registers_powerpc_64): Remove, replace by ...
11678 (init_registers_powerpc_altivec64l): ... this new prototype.
11679 (ppc_num_regs): Set to 73.
11680 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11681 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11682 (ppc_cannot_store_register): Handle orig_r3 and trap.
11683 (ppc_arch_setup): Update init_registers_... calls.
11684 (ppc_fill_gregset): Handle orig_r3 and trap.
11685
11686 * inferiors.c (clear_inferiors): Reset current_inferior.
11687
fdc59709
PB
116882008-04-23 Paolo Bonzini <bonzini@gnu.org>
11689
889bf7c5
PA
11690 * acinclude.m4: Add override.m4.
11691 * configure: Regenerate.
fdc59709 11692
c9b2f845
UW
116932008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11694
11695 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11696 initial call to init_register_ppc64.
11697
550512b8
UW
116982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11699
43aaf8b6
PA
11700 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11701 single powerpc*-*-linux* case.
550512b8
UW
11702 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11703
b6430ec3
UW
117042008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11705
11706 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11707 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11708 from reg_xmlfiles.
11709 * linux-ppc-low.c: Include <elf.h>.
11710 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11711 (ppc_hwcap): New global variable.
11712 (ppc_regmap): Remove __SPE__ #ifdef sections.
11713 (ppc_regmap_e500): New global variable.
11714 (ppc_cannot_store_register): Update __SPE__ special case.
11715 (ppc_get_hwcap): New function.
11716 (ppc_arch_setup): Use it to determine whether inferior supports
11717 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11718 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11719 Do not access registers if target does not support AltiVec.
11720 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11721 Do not access registers if target does not support SPE.
11722 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11723
52fa2412
UW
117242008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11725
11726 * linux-low.c (disabled_regsets, num_regsets): New.
11727 (use_regsets_p): Delete.
11728 (linux_wait_for_process): Clear disabled_regsets.
11729 (regsets_fetch_inferior_registers): Check and set it.
11730 (regsets_store_inferior_registers): Likewise.
11731 (linux_fetch_registers, linux_store_registers): Do not use
11732 use_regsets_p.
11733 (initialize_low): Allocate disabled_regsets.
11734
e28b3332
DJ
117352008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11736
11737 * Makefile.in (LIBOBJS): New.
11738 (OBS): Use LIBOBJS.
11739 (memmem.o): New rule.
11740 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11741 * configure: Regenerated.
11742
4536995d
UW
117432008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11744
11745 * server.c (handle_query): Never return "unsupported" for
11746 qXfer:features:read queries.
11747
221c031f
UW
117482008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11749
11750 * server.c (get_features_xml): Fix inverted condition.
11751 (handle_query): Always support qXfer:feature:read.
11752
ccd213ac
DJ
117532008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11754
11755 * server.c (wrapper_argv): New.
11756 (start_inferior): Handle wrapper_argv. If set, expect an extra
11757 trap.
11758 (gdbserver_usage): Document --wrapper.
11759 (main): Parse --wrapper.
11760
6fe305f7
UW
117612008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11762
11763 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11764 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11765 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11766 (ppc_set_pc): Likewise.
11767 (ppc_arch_setup): New function.
11768 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11769 of collect_register.
889bf7c5 11770 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11771
5b0a002e
UW
117722008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11773
11774 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11775 instead of linux-ppc64-low.o.
11776 * linux-ppc64-low.c: Remove file.
11777 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11778 (linux-ppc64-low.o): Remove rule.
11779
11780 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11781 (init_registers_powerpc_64): Likewise.
11782 (ppc_regmap): Conditionally define depending on __powerpc64__.
11783 (ppc_cannot_store_register): Do not special-case "fpscr" when
11784 compiled on __powerpc64__.
11785 (ppc_collect_ptrace_register): New function.
11786 (ppc_supply_ptrace_register): New function.
11787 (ppc_breakpoint): Change type to "unsigned int".
11788 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11789 (the_low_target): Conditionally provide initializers for the
889bf7c5 11790 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11791 collect_ptrace_register and supply_ptrace_register members.
11792
9b4b61c8
UW
117932008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11794
11795 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11796 * server.c (gdbserver_xmltarget): Define.
11797 (get_features_xml): Use it to replace "target.xml" and arch_string.
11798
11799 * configure.srv: Remove srv_xmltarget. Add XML files that were
11800 mentioned there to srv_xmlfiles instead. Remove conditional tests
11801 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11802 srv_xmlfiles and srv_regobj to include all possible choices.
11803 * configure.ac (srv_xmltarget): Remove.
11804 (srv_xmlfiles): Do not add "target.xml".
11805 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11806 checks for supplementary target information.
11807 * configure: Regenerate.
11808 * Makefile.in (XML_TARGET): Remove.
11809 (target.xml): Remove rule.
11810 (clean): Do not clean up target.xml.
11811 (.PRECIOUS): Do not mention target.xml.
11812
11813 * target.h (struct target_ops): Remove arch_string member.
11814 * linux-low.c (linux_arch_string): Remove.
11815 (linux_target_ops): Remove arch_string initializer.
11816 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11817 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11818 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11819 * spu-low.c (spu_arch_string): Remove.
11820 (spu_target_ops): Remove arch_string initializer.
11821 * win32-low.c (win32_arch_string): Remove.
11822 (win32_target_ops): Remove arch_string initializer.
11823 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11824 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11825 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11826
ee1a7ae4
UW
118272008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11828
11829 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11830 by collect_ptrace_register and supply_ptrace_register hooks.
11831 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11832 instead of checking for the_low_target.left_pad_xfer.
11833 (usr_store_inferior_registers): Use collect_ptrace_register callback
11834 instead of checking for the_low_target.left_pad_xfer.
11835
11836 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11837 (s390_supply_ptrace_register): Likewise.
11838 (s390_fill_gregset): Call s390_collect_ptrace_register.
11839 (the_low_target): Update.
11840
11841 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11842 (ppc_supply_ptrace_register): Likewise.
11843 (the_low_target): Update.
11844
11845 * linux-i386-low.c (the_low_target): Update.
11846 * linux-x86-64-low.c (the_low_target): Update.
11847
d61ddec4
UW
118482008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11849
11850 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11851 reg-s390.o and reg-s390x.o.
11852
11853 * linux-low.c (new_inferior): New global variable.
11854 (linux_create_inferior, linux_attach): Set it.
11855 (linux_wait_for_process): Call the_low_target.arch_setup after the
11856 target has stopped for the first time.
11857 (initialize_low): Do not call the_low_target.arch_setup.
11858
11859 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11860 (s390_set_pc): Likewise.
11861 (s390_arch_setup): New function.
11862 (the_low_target): Use s390_arch_setup as arch_setup routine.
11863
11864 * regcache.c (realloc_register_cache): New function.
11865 (set_register_cache): Call it for each existing regcache.
11866
d05b4ac3
UW
118672008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11868
11869 * server.h (init_registers): Remove prototype.
11870
11871 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11872 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11873 instead of init_registers ().
11874 * linux-arm-low.c (init_registers_arm): Add prototype.
11875 (init_registers_arm_with_iwmmxt): Likewise.
11876 (the_low_target): Add initializer for arch_setup field.
11877 * linux-cris-low.c (init_registers_cris): Add prototype.
11878 (the_low_target): Add initializer for arch_setup field.
11879 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11880 (the_low_target): Add initializer for arch_setup field.
11881 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11882 (the_low_target): Add initializer for arch_setup field.
11883 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11884 (the_low_target): Add initializer for arch_setup field.
11885 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11886 (the_low_target): Add initializer for arch_setup field.
11887 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11888 (the_low_target): Add initializer for arch_setup field.
11889 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11890 (init_registers_mips64_linux): Likewise.
11891 (the_low_target): Add initializer for arch_setup field.
11892 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11893 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11894 (the_low_target): Add initializer for arch_setup field.
11895 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11896 (init_registers_powerpc_64): Likewise.
11897 (the_low_target): Add initializer for arch_setup field.
11898 * linux-s390-low.c (init_registers_s390): Add prototype.
11899 (init_registers_s390x): Likewise.
11900 (the_low_target): Add initializer for arch_setup field.
11901 * linux-sh-low.c (init_registers_sh): Add prototype.
11902 (the_low_target): Add initializer for arch_setup field.
11903 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11904 (the_low_target): Add initializer for arch_setup field.
11905 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11906 (the_low_target): Add initializer for arch_setup field.
11907
11908 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11909 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11910 instead of init_registers ().
11911 * win32-arm-low.c (init_registers_arm): Add prototype.
11912 (the_low_target): Add initializer for arch_setup field.
11913 * win32-i386-low.c (init_registers_i386): Add prototype.
11914 (the_low_target): Add initializer for arch_setup field.
11915
11916 * spu-low.c (init_registers_spu): Add prototype.
11917 (initialize_low): Call initialie_registers_spu () instead of
11918 initialize_registers ().
11919
fd96d250
PA
119202008-02-19 Pedro Alves <pedro@codesourcery.com>
11921
11922 * server.c (handle_v_requests): When handling the vRun and vAttach
11923 packets, if already debugging a process, don't kill it. Return an
11924 error instead.
11925
d41b6bb4
DJ
119262008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11927
11928 * server.c (handle_query): Correct length check.
11929
5ac588cf
PA
119302008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11931
11932 * win32-low.c (do_initial_child_stuff): Add process handle
11933 parameter. Set current_process_handle and current_process_id from the
11934 parameters. Clear globals.
11935 (win32_create_inferior): Don't set current_process_handle and
11936 current_process_id here. Instead pass them on the call to
11937 do_initial_child_stuff.
11938 (win32_attach): Likewise.
11939 (win32_clear_inferiors): New.
11940 (win32_kill): Don't close the current process handle or the
11941 current thread handle here. Instead call win32_clear_inferiors.
11942 (win32_detach): Don't open a new handle to the process. Call
11943 win32_clear_inferiors.
11944 (win32_join): Don't rely on current_process_handle; open a new
11945 handle using the process id.
11946 (win32_wait): Call win32_clear_inferiors when the inferior process
11947 has exited.
11948
ecd7ecbc
DJ
119492008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11950
11951 * server.c (monitor_show_help): Add "exit".
11952
1525d545
MG
119532008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11954
ecd7ecbc 11955 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11956 (clean): Add reg-xtensa.c.
11957 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11958 * configure.srv (xtensa*-*-linux*) New target.
11959 * linux-xtensa-low.c: New.
11960 * xtensa-xtregs.c: New.
1525d545 11961
59a016f0
PA
119622008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11963
11964 * hostio.c: Don't include errno.h.
11965 (errno_to_fileio_errno): Move to hostio-errno.
11966 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11967 error number outputting to the target->hostio_last_error callback.
11968 (hostio_packet_error): Use FILEIO_EINVAL directly.
11969 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11970 calls to hostio_error.
11971 * hostio-errno.c: New.
11972 * server.h (hostio_last_error_from_errno): Declare.
11973 * target.h (target_ops): Add hostio_last_error member.
11974 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11975 as hostio_last_error handler.
889bf7c5 11976 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11977 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11978 (wince_hostio_last_error): New functions.
11979 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11980 as hostio_last_error handler.
11981 (win32_target_ops) [!_WIN32_WCE]: Register
11982 hostio_last_error_from_errno as hostio_last_error handler.
11983 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11984 (hostio-errno.o): New rule.
11985 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11986 * configure.srv (srv_hostio_err_objs): New variable. Default to
11987 hostio-errno.o.
11988 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11989 * configure: Regenerate.
11990
2d717e4f
DJ
119912008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11992
11993 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11994 (linux_kill, linux_detach): Clean up the process list.
11995 * remote-utils.c (remote_open): Improve port number parsing.
11996 (putpkt_binary, input_interrupt): Only send interrupts if the target
11997 is running.
11998 * server.c (extended_protocol): Make static.
11999 (attached): Define earlier.
12000 (exit_requested, response_needed, program_argv): New variables.
12001 (target_running): New.
12002 (start_inferior): Clear attached here.
12003 (attach_inferior): Set attached here.
12004 (require_running): Define.
12005 (handle_query): Use require_running and target_running. Implement
12006 "monitor exit".
12007 (handle_v_attach, handle_v_run): New.
12008 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12009 (gdbserver_usage): Update.
12010 (main): Redo argument parsing. Handle --debug and --multi. Handle
12011 --attach along with other options or after the port. Save
12012 program_argv. Support no initial program. Resynchronize
12013 communication with GDB after an error. Handle "monitor exit".
12014 Use require_running and target_running. Always allow the extended
12015 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12016 restart in extended mode.
12017 * README: Refer to the GDB manual. Update --attach usage.
12018
7407e2de
AS
120192007-12-20 Andreas Schwab <schwab@suse.de>
12020
12021 * linux-low.c (STACK_SIZE): Define.
12022 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12023 (linux_test_for_tracefork): Likewise.
12024
b65d95c5
DJ
120252007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12026
12027 * linux-low.c (linux_wait_for_event): Update messages. Do not
12028 reinsert auto-delete breakpoints.
12029 * mem-break.c (struct breakpoint): Change return type of handler to
12030 int.
12031 (set_breakpoint_at): Update handler type.
12032 (reinsert_breakpoint_handler): Return 1 instead of calling
12033 delete_breakpoint.
12034 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12035 setting a new one.
12036 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12037 * mem-break.h (set_breakpoint_at): Update handler type.
12038 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12039 * win32-low.c (auto_delete_breakpoint): New.
12040 (get_child_debug_event): Use it.
12041
4e799345
DJ
120422007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12043
12044 * configure.ac: Check for pread and pwrite.
12045 * hostio.c (handle_pread): Fall back to lseek and read.
12046 (handle_pwrite): Fall back to lseek and write.
12047 * config.in, configure: Regenerated.
12048
27524b67
DJ
120492007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12050
12051 * server.c (myresume): Add own_buf argument.
12052 (main): Update calls.
12053
a20d5e98
DJ
120542007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12055
12056 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12057 * remote-utils.c (remote_open): Do not call disable_async_io.
12058 (block_async_io): Delete.
12059 (unblock_async_io): Make static.
12060 (initialize_async_io): New.
12061 * server.c (handle_v_cont): Handle async I/O here.
12062 (myresume): Likewise. Move other common resume tasks here...
12063 (main): ... from here. Call initialize_async_io. Disable async
12064 I/O before the main loop.
12065 * server.h (initialize_async_io): Declare.
12066 (block_async_io, unblock_async_io): Delete prototypes.
12067 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12068
b79d787e
DJ
120692007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12070
12071 * remote-utils.c (readchar): Allow binary data in received messages.
12072
d97903b2
PA
120732007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12074
12075 * win32-low.c (attaching): New global.
12076 (win32_create_inferior): Clear the `attaching' global.
12077 (win32_attach): Set the `attaching' global.
12078 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12079 attaching. Only set a breakpoint at the entry point if not
12080 attaching.
12081
311de423
PA
120822007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12083
12084 * server.c (main): Don't report dll events on the initial
12085 connection on attaches.
12086
6c2d16d2
PA
120872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12088
12089 * server.c (main): Relax numerical bases supported for the pid of
12090 the --attach command line argument.
12091
5ca906e6
PA
120922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12093
12094 * win32-low.c (win32_attach): Call OpenProcess before
12095 DebugActiveProcess, not after. Add last error output to error
12096 call.
12097
9c6c8194
PA
120982007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12099
12100 * win32-low.c (win32_get_thread_context)
12101 (win32_set_thread_context): New functions.
12102 (thread_rec): Use win32_get_thread_context.
12103 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12104 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12105 field.
12106
4d5d1aaa
PA
121072007-12-03 Leo Zayas
12108 Pedro Alves <pedro_alves@portugalmail.pt>
12109
12110 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12111 global variables.
12112 (child_add_thread): Minor cleanup.
12113 (child_continue): Resume artificially suspended threads before
12114 calling ContinueDebugEvent.
12115 (suspend_one_thread): New.
12116 (fake_breakpoint_event): New.
12117 (get_child_debug_event): Change return type to int. Check here if
12118 gdb sent an interrupt request. If a soft interrupt was requested,
12119 fake a breakpoint event. Return 0 if there is no event to handle,
12120 and 1 otherwise.
12121 (win32_wait): Don't check here if gdb sent an interrupt request.
12122 Ensure there is a valid event to handle.
12123 (win32_request_interrupt): Add soft interruption method as last
12124 resort.
12125
c436e841
PA
121262007-12-03 Leo Zayas
12127 Pedro Alves <pedro_alves@portugalmail.pt>
12128
12129 * win32-low.h (win32_thread_info): Add descriptions to the
12130 structure members. Replace `suspend_count' counter by a
12131 `suspended' flag.
12132 * win32-low.c (thread_rec): Update condition of when to get the
12133 context from the inferior. Rely on ContextFlags being set if it
12134 has already been retrieved. Only suspend the inferior thread if
12135 we haven't already. Warn if that fails.
12136 (continue_one_thread): s/suspend_count/suspended/. Only call
12137 ResumeThread once. Warn if that fails.
12138
e7b5fa67
PA
121392007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12140
12141 * win32-low.c (win32_wait): Don't read from the inferior when it
12142 has already exited.
12143
a385171d
PA
121442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12145
12146 * Makefile.in (win32_low_h): New variable.
12147 (win32-low.o): Add dependency on $(win32_low_h).
12148 (win32-arm-low.o, win32-i386-low.o): New rules.
12149
f80c84b3
DJ
121502007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12151
12152 * hostio.c: Correct copyright year.
12153
a6b151f1
DJ
121542007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12155
12156 * Makefile.in (OBS): Add hostio.o.
12157 (hostio.o): New rule.
12158 * server.h (handle_vFile): Declare.
12159 * hostio.c: New file.
12160 * server.c (handle_v_requests): Take packet_len and new_packet_len
12161 for binary packets. Call handle_vFile.
12162 (main): Update call to handle_v_requests.
12163
f9387fc3
DJ
121642007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12165
12166 * linux-low.c: Include <sched.h>.
12167
51c2684e
DJ
121682007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12169
12170 * linux-low.c (linux_tracefork_grandchild): New.
12171 (linux_tracefork_child): Use clone.
12172 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12173
75f83163
JB
121742007-10-31 Joel Brobecker <brobecker@adacore.com>
12175
12176 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12177
da5898ce
DJ
121782007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12179
12180 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12181
24a09b5f
DJ
121822007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12183
12184 * inferiors.c (change_inferior_id): Delete.
12185 (add_pid_to_list, pull_pid_from_list): New.
12186 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12187 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12188 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12189 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12190 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12191 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12192 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12193 (using_threads): Always set to 1.
12194 (handle_extended_wait): New.
12195 (add_process): Do not set TID.
12196 (linux_create_inferior): Set must_set_ptrace_flags.
12197 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12198 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12199 (linux_thread_alive): Rename TID argument to LWPID.
12200 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12201 (linux_wait_for_event): Do not use TID or check using_threads. Update
12202 call to dead_thread_notify. Call handle_extended_wait.
12203 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12204 (send_sigstop): Delete sigstop_sent.
12205 (wait_for_sigstop): Avoid TID.
12206 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12207 (linux_test_for_tracefork): New.
12208 (linux_lookup_signals): Use thread_db_active and
12209 linux_supports_tracefork_flag.
12210 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12211 * linux-low.h (get_process_thread): Avoid TID.
12212 (struct process_ifo): Move thread_known and tid to the end. Remove
12213 sigstop_sent.
12214 (linux_attach_lwp, thread_db_init): Update prototypes.
12215 * server.h (change_inferior_id): Delete prototype.
12216 (add_pid_to_list, pull_pid_from_list): New prototypes.
12217 * thread-db.c (thread_db_use_events): New.
12218 (find_first_thread): Rename to...
12219 (find_one_thread): ...this. Update callers and messages. Do not
12220 call fatal. Check thread_db_use_events. Do not call
12221 change_inferior_id or new_thread_notify.
12222 (maybe_attach_thread): Update. Do not call new_thread_notify.
12223 (thread_db_init): Set thread_db_use_events. Check use_events.
12224 * utils.c (fatal, warning): Correct message prefix.
12225
30ed0a8f
DJ
122262007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12227
12228 * Makefile.in (clean): Remove new files.
12229 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12230 (powerpc-64.o, powerpc-64.c): New rules.
12231 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12232 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12233 with SPE.
12234 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12235 SPE targets.
12236 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12237 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12238 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12239 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12240 (target_regsets): Add AltiVec and SPE register sets.
12241 * configure.ac: Check for AltiVec and SPE.
12242 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12243 (ppc_fill_vrregset, ppc_store_vrregset): New.
12244 (target_regsets): Add AltiVec register set.
12245 * configure: Regenerated.
12246
fd462a61
DJ
122472007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12248
12249 * linux-low.c (O_LARGEFILE): Define.
12250 (linux_read_memory): Use /proc/PID/mem.
12251 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12252 * configure, config.in: Regenerated.
12253
69f223ed
DJ
122542007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12255
12256 * linux-low.c (linux_wait_for_event): Do not pass signals while
12257 single-stepping.
12258
aec18585
PA
122592007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12260
12261 * win32-low.c (create_process): New.
12262 (win32_create_inferior): Use create_process instead of
12263 CreateProcess. If create_process failed retry appending an ".exe"
12264 suffix. Store the GetLastError result immediatelly after
12265 create_process calls and use it on the call to error.
12266
34d86ddd
PA
122672007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12268
12269 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12270
5a0e3bd0
JB
122712007-08-23 Joel Brobecker <brobecker@adacore.com>
12272
12273 * configure.ac: Switch license to GPLv3.
12274
f88c79e6
MS
122752007-08-01 Michael Snyder <msnyder@access-company.com>
12276
12277 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12278
6b3d9b83
PA
122792007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12280
12281 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12282 typedef.
12283 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12284 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12285 CloseToolhelp32Snapshot.
12286 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12287 CloseToolhelp32Snapshot.
12288
c588c53c
MS
122892007-07-27 Michael Snyder <michael.snyder@access-company.com>
12290
12291 * server.c (main): Check for inferior exit before main loop.
12292
aa0403d9
PA
122932007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12294
12295 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12296 instead of on tmp_desc.
12297
255e7678
DJ
122982007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12299 Daniel Jacobowitz <dan@codesourcery.com>
12300
12301 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12302 (add_thread): Minor cleanups.
12303 (clear_inferiors): Move lower in the file. Clear the DLL
12304 list.
12305 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12306 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12307 (xml_escape_text): New.
12308 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12309 for qSupported.
12310 (handle_v_cont): Report errors.
12311 (gdbserver_version): Update.
12312 (main): Correct size of own_buf. Do not report initial DLL events.
12313 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12314 (unloaded_dll, xml_escape_text): New.
12315 * win32-low.c (enum target_waitkind): Update comments.
12316 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12317 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12318 (win32_EnumProcessModules, win32_GetModuleInformation)
12319 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12320 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12321 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12322 (win32_Module32First, win32_Module32Next, load_toolhelp)
12323 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12324 (get_child_debug_event): Handle DLL events.
12325 (win32_wait): Likewise.
12326
0d37add9
DJ
123272007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12328
12329 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12330 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12331
45e2715e
PA
123322007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12333
12334 * win32-low.c (handle_output_debug_string): Ignore event if not
12335 waiting.
12336
c5674cf1
PA
123372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12338
12339 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12340
2bbe3cc1
DJ
123412007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12342
12343 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12344
ae13219e
DJ
123452007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12346
12347 * inferiors.c (change_inferior_id): Add comment.
12348 * linux-low.c (check_removed_breakpoint): Add an early
12349 prototype. Improve debug output.
12350 (linux_attach): Doc update.
12351 (linux_detach_one_process, linux_detach): Clean up before releasing
12352 each process.
12353 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12354 * linux-low.h (struct process_info): Doc improvement.
12355 * mem-break.c (delete_all_breakpoints): New.
12356 * mem-break.h (delete_all_breakpoints): New prototype.
12357 * thread-db.c (find_first_thread): New.
12358 (thread_db_create_event): Call it instead of
12359 thread_db_find_new_threads. Clean up unused variables.
12360 (maybe_attach_thread): Remove first thread handling.
12361 (thread_db_find_new_threads): Use find_first_thread.
12362 (thread_db_get_tls_address): Likewise.
12363
4105de34
DJ
123642007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12365
12366 * thread-db.c (thread_db_find_new_threads): Add prototype.
12367 (thread_db_create_event): Check for the main thread before adding
12368 a new thread.
12369 (maybe_attach_thread): Only enable event reporting if TID == 0.
12370 (thread_db_get_tls_address): Check for new threads.
12371
2b876972
DJ
123722007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12373
12374 * linux-low.c (linux_create_inferior): Try execv before execvp.
12375 * spu-low.c (spu_create_inferior): Likewise.
12376
7a245884
DJ
123772007-06-13 Mike Frysinger <vapier@gentoo.org>
12378
12379 * linux-low.c (linux_create_inferior): Change execv to execvp.
12380 * spu-low.c (spu_create_inferior): Likewies.
12381
117ce543
DJ
123822007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12383
12384 * Makefile.in (clean): Clean new files instead of deleted ones.
12385 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12386 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12387 rules.
12388 * configure.srv: Specify XML files and new regformats for MIPS and
12389 MIPS64 GNU/Linux.
12390 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12391 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12392 an entry for the restart register.
12393 (mips_cannot_fetch_register, mips_cannot_store_register)
12394 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12395 register names to match the XML descriptions.
12396 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12397 restart register instead of $0.
12398
0e7f50da
UW
123992007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12400 Markus Deuling <deuling@de.ibm.com>
12401
12402 * remote-utils.c (decode_xfer_write): New function.
12403 * server.h (decode_xfer_write): Add prototype.
12404 * server.c (handle_query): Add PACKET_LEN argument. Support
12405 qXfer:spu:read and qXfer:spu:write packets.
12406 (main): Pass packet_len to handle_query.
12407 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12408 * target.h (target_ops): Add qxfer_spu.
12409
374c1d38
UW
124102007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12411
12412 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12413 accessing non-seekable spufs files.
12414
bb63802a
UW
124152007-05-16 Markus Deuling <deuling@de.ibm.com>
12416
889bf7c5 12417 * server.c (handle_query): Add reply for qC packet.
bb63802a 12418
7390519e
PA
124192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12420 Leo Zayas <lerele@champenstudios@com>
12421
12422 * server.h (check_remote_input_interrupt_request): New function.
12423 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12424 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12425 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12426 (check_remote_input_interrupt_request): New function.
12427 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12428 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12429 winapi_GenerateConsoleCtrlEvent): New typedefs.
12430 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12431 to 250 ms.
12432 (win32_wait): Check for remote interrupt request
12433 with check_remote_input_interrupt_request.
12434 (win32_request_interrupt): New function.
12435 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12436
34b34921
PA
124372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12438
12439 * win32-low.c (debug_registers_changed,
12440 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12441 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12442 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12443 (thread_rec): Get context using the low target.
12444 (child_add_thread): Call thread_added on the low target,
12445 which does the same thing.
12446 (regptr): Delete.
12447 (do_initial_child_stuff): Remove debug registers references.
12448 Set context using the low target. Resume threads after
12449 setting the contexts.
12450 (child_continue): Remove dead variable. Remove debug
12451 registers references.
12452 (child_fetch_inferior_registers): Go through the low target.
12453 (do_child_store_inferior_registers): Remove.
12454 (child_store_inferior_registers): Go through the low target.
12455 (win32_resume): Remove debug registers references.
12456 Set context using the low target.
12457 (handle_exception): Change return type to void. Don't record
12458 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12459 first chance exception.
889bf7c5 12460 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12461 goto loop. Always return after waiting for debug event.
12462 (win32_wait): Convert to switch statement. Handle spurious
12463 events.
12464
12465 * win32-i386-low.c (debug_registers_changed,
12466 debug_registers_used): New.
12467 (initial_stuff): Rename to ...
12468 (i386_initial_stuff): ... this. Clear debug registers
12469 state variables.
12470 (store_debug_registers): Delete.
12471 (i386_get_thread_context): New.
12472 (load_debug_registers): Delete.
12473 (i386_set_thread_context): New.
12474 (i386_thread_added): New.
12475 (single_step): Rename to ...
12476 (i386_single_step): ... this.
12477 (do_fetch_inferior_registers): Rename to ...
12478 (i386_fetch_inferior_register): ... this.
12479 (i386_store_inferior_register): New.
12480 (the_low_target): Adapt to new interface.
12481
12482 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12483 (arm_get_thread_context): New.
12484 (arm_set_thread_context): New.
12485 (regptr): New.
12486 (do_fetch_inferior_registers): Rename to ...
12487 (arm_fetch_inferior_register): ... this.
12488 (arm_store_inferior_register): New.
12489 (arm_wince_breakpoint): Reimplement as unsigned long.
12490 (arm_wince_breakpoint_len): Define.
12491 (the_low_target): Adapt to new interface.
12492
12493 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12494 load_debug_registers. Add get_thread_context, set_thread_context,
12495 thread_added and store_inferior_register. Rename
12496 fetch_inferior_registers to fetch_inferior_register.
12497 (regptr): Remove declaration.
12498
dd6953e1
PA
124992007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12500
12501 * linux-low.c (linux_detach): Change return type to int. Return 0.
12502 * spu-low.c (spu_detach): Likewise.
12503
444d6139
PA
125042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12505
12506 * target.h (target_ops): Change return type of detach to int.
12507 Add join.
12508 (join_inferior): New.
12509 * server.c (main): Don't skip detach support on mingw32.
12510 If the inferior doesn't support detaching return error.
12511 Call join_inferior instead of using waitpid.
12512 * linux-low.c (linux_join): New.
12513 (linux_target_op): Add linux_join.
12514 * spu-low.c (spu_join): New.
12515 (spu_target_ops): Add spu_join.
12516 * win32-low.c (win32_detach): Adapt to new interface.
12517 Reopen current_process_handle before detaching. Issue a child
12518 resume before detaching.
12519 (win32_join): New.
12520 (win32_target_op): Add win32_join.
12521
1d5315fe
PA
125222007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12523
12524 * win32-low.c (win32-attach): Fix return value.
12525 * target.h (target_ops): Describe ATTACH return values.
12526
bf914831
PA
125272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12528
12529 * win32-low.c (GETPROCADDRESS): Define.
12530 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12531 (winapi_DebugSetProcessKillOnExit): Likewise.
12532 (win32_create_inferior): Force usage of ansi CreateProcessA.
12533 (win32_attach): Use GETPROCADDRESS.
12534 (win32_detach): Likewise.
12535
f72f3e60
PA
125362007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12537
12538 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12539
ed50f18f
PA
125402007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12541
12542 * win32-low.c: Commit leftover changes from 2007-03-29.
12543
0c2ead7e
DJ
125442007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12545
12546 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12547 fields short instead of int. Add explicit padding.
12548 (i387_cache_to_fsave): Remove unnecessary casts.
12549 (i387_fsave_to_cache): Doc fix.
12550 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12551
73725ff3
DJ
125522007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12553
12554 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12555 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12556
d99f33d8
PA
125572007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12558
12559 * configure.srv (arm*-*-mingw32ce*): Move near the other
12560 arm targets.
12561
68070c10
PA
125622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12563
2482afc6 12564 * configure.ac: Add errno checking.
68070c10
PA
12565 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12566 sys/file.h and malloc.h.
12567 (AC_CHECK_DECLS): Add perror.
12568 (srv_mingwce): Handle.
2482afc6 12569 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12570 win32-i386-low.o to srv_tgtobj.
12571 (i[34567]86-*-mingw*): Likewise.
12572 (arm*-*-mingw32ce*): Add case.
12573 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12574 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12575 [__MINGW32CE__] (strerror): New function.
12576 [__MINGW32CE__] (errno): Define to GetLastError.
12577 [__MINGW32CE__] (COUNTOF): New macro.
12578 (remote_open): Remove extra close call.
12579 * mem-break.c (delete_breakpoint_at): New function.
12580 * mem-break.h (delete_breakpoint_at): Declare.
12581 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12582 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12583 [USE_WIN32API] (read, write): Add char* casts.
12584 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12585 * server.h: Include wincecompat.h on Windows CE.
12586 [HAVE_ERRNO_H]: Check.
12587 (perror): Declare if not declared.
12588 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12589 (perror_with_name): Remove errno declaration.
12590 * wincecompat.h: New.
12591 * wincecompat.c: New.
12592 * win32-low.h: New.
12593 * win32-arm-low.c: New.
12594 * win32-i386-low.c: New.
12595 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12596 (OUTMSG2): Make it safe.
12597 (_T): New macro.
12598 (COUNTOF): New macro.
12599 (NUM_REGS): Get it from the low target.
12600 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12601 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12602 (thread_rec): Let low target handle debug registers.
12603 (child_add_thread): Likewise.
12604 (child_init_thread_list): Likewise.
12605 (continue_one_thread): Likewise.
12606 (regptr): New.
12607 (do_child_fetch_inferior_registers): Move to ...
12608 * win32-i386-low.c: ... here, and rename to ...
12609 (do_fetch_inferior_registers): ... this.
889bf7c5 12610 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12611 Go through the low target.
12612 (do_child_store_inferior_registers): Use regptr.
12613 (strwinerror): New function.
12614 (win32_create_inferior): Handle Windows CE.
12615 Use strwinerror instead of strerror on Windows error
12616 codes. Add program to the error output.
12617 Don't close the main thread handle on Windows CE.
12618 (win32_attach): Use coredll.dll on Windows CE.
12619 (win32_kill): Close current process and current
12620 thread handles.
12621 (win32_detach): Use coredll.dll on Windows CE.
12622 (win32_resume): Let low target handle debug registers, and
12623 step request.
12624 (handle_exception): Add/Remove initial breakpoint. Avoid
12625 non-existant WSTOPSIG on Windows CE.
12626 (win32_read_inferior_memory): Cast to remove warning.
12627 (win32_arch_string): Go through the low target.
12628 (initialize_low): Call set_breakpoint_data with the low
12629 target's breakpoint.
12630 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12631 FOP_REGNUM, mappings): Move to ...
12632 * win32-i386-low.c: ... here.
12633 * win32-low.c (win32_thread_info): Move to ...
12634 * win32-low.h: ... here.
12635 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12636 win32-arm-low.c and wincecompat.c.
12637 (all:): Add $EXEEXT.
12638 (install-only:): Likewise.
12639 (gdbserver:): Likewise.
12640 (gdbreplay:): Likewise.
12641 * config.in: Regenerate.
12642 * configure: Regenerate.
12643
41093d81
PA
126442007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12645
12646 * win32-low.c: Rename typedef thread_info to
12647 win32_thread_info throughout.
12648
544afa54
PA
126492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12650
12651 * win32-i386-low.c: Rename to ...
12652 * win32-low.c: ... this.
12653 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12654 * Makefile.in: Likewise.
12655
bce7165d
PA
126562007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12657
12658 * remote-utils.c (monitor_output): Constify msg parameter.
12659 * server.h (monitor_output): Likewise.
12660 * win32-i386-low.c (handle_output_debug_string): New.
12661 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12662 handle_output_debug_string.
12663 (get_child_debug_event): Likewise.
12664
506c7aa0
DJ
126652007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12666
12667 * server.c (main): Correct strtoul check.
12668
42c81e2a
DJ
126692007-03-27 Jon Ringle <jon@ringle.org>
12670
12671 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12672
9453113a
DJ
126732007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12674
12675 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12676
64a69107
DJ
126772007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12678
12679 * terminal.h: Check HAVE_SGTTY_H.
12680
126812007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12682
12683 * remote-utils.c (remote_open): Print out the assigned port number.
12684
c74d0ad8
DJ
126852007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12686
12687 * remote-utils.c (monitor_output): New function.
12688 * server.c (debug_threads): Define here.
12689 (monitor_show_help): New function.
12690 (handle_query): Handle qRcmd.
12691 (main): Do not handle 'd' packet.
12692 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12693 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12694 of debug_threads.
12695
de7c3b4a
PA
126962007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12697
12698 * Makefile.in (EXEEXT): New.
12699 (clean): Use $(EXEEXT).
12700
ef57601b
PA
127012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12702
12703 * target.h (target_ops): Rename send_signal to request_interrupt,
12704 and remove enum target_signal parameter.
12705 * linux-low.c (linux_request_interrupt): Rename from
12706 linux_send_signal, and always send SIGINT.
12707 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12708 and always send SIGINT.
12709 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12710 of send_signal.
12711 (input_interrupt): Likewise.
12712
820f2bda
PA
127132007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12714
12715 * server.c (get_features_xml): Check if target implemented
12716 arch_string.
12717 * win32-i386-low.c (win32_arch_string): New.
12718 (win32_target_ops): Add win32_arch_string as arch_string member.
12719
ab39bf24
UW
127202007-02-22 Markus Deuling <deuling@de.ibm.com>
12721
12722 * spu-low.c (spu_arch_string): New.
12723 (spu_target_ops): Add spu_arch_string.
12724
61ff6e04
DJ
127252007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12726
12727 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12728 * configure.ac: Do not check for terminal.h.
12729 * configure, config.in: Regenerated.
12730
fb1e4ffc
DJ
127312007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12732
12733 * Makefile.in (OBS): Add $(XML_BUILTIN).
12734 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12735 (clean): Update.
12736 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12737 (arm-with-iwmmxt.c): New.
12738 * config.in, configure: Regenerate.
12739 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12740 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12741 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12742 (arm*-*-linux*): Add iWMMXt and regset support.
12743 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12744 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12745 (arm_store_wmmxregset, target_regsets): New.
12746 * server.c (get_features_xml): Take annex argument. Check builtin
12747 XML documents.
12748 (handle_query): Handle multiple annexes.
12749
0f48aa01
DJ
127502007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12751
12752 * remote-utils.c [USE_WIN32API] (read, write): Define.
12753 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12754 write.
12755
23181151
DJ
127562007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12757
12758 * linux-i386-low.c (the_low_target): Set arch_string.
12759 * linux-x86-64-low.c (the_low_target): Likewise.
12760 * linux-low.c (linux_arch_string): New.
12761 (linux_target_ops): Add it.
12762 * linux-low.h (struct linux_target_ops): Add arch_string.
12763 * server.c (write_qxfer_response): Use const void * for DATA.
12764 (get_features_xml): New.
12765 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12766 * target.h (struct target_ops): Add arch_string method.
12767
9d606399
DJ
127682007-01-03 Denis Pilat <denis.pilat@st.com>
12769 Daniel Jacobowitz <dan@codesourcery.com>
12770
12771 * linux-low.c (linux_kill): Handle being called with no threads.
12772 * win32-i386-low.c (win32_kill): Likewise.
12773 (get_child_debug_event): Clear current_process_handle.
12774
127752006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12776 Daniel Jacobowitz <dan@codesourcery.com>
12777
12778 * remote-utils.c (remote_open): Check the type of specified
12779 serial port devices before opening them.
12780 * server.c (main): Kill the inferior if an error occurs during
12781 the first remote_open.
12782
a5e13d24
DJ
127832006-12-05 Markus Deuling <deuling@de.ibm.com>
12784
12785 * README: Update supported targets.
12786
186947f7
DJ
127872006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12788
12789 * Makefile.in (clean): Remove reg-mips64.c.
12790 (reg-mips64.c, reg-mips64.o): New rules.
12791 * configure.srv: Handle mips64. Include regset support for mips.
12792 * linux-mips-low.c (union mips_register): New.
12793 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12794 (mips_breakpoint, mips_breakpoint_at): Use int.
12795 (mips_collect_register, mips_supply_register)
12796 (mips_collect_register_32bit, mips_supply_register_32bit)
12797 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12798 (mips_store_fpregset, target_regsets): New.
12799 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12800
a13e2c95
UW
128012006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12802
12803 * configure.srv: Add target "spu*-*-*".
12804 * Makefile.in (clean): Remove reg-spu.c.
12805 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12806 * spu-low.c: New file.
12807
cb7283db
DJ
128082006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12809
12810 * configure.ac: Correct td_thr_tls_get_addr test.
12811 * configure: Regenerated.
12812
89be2091
DJ
128132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12814
12815 * linux-low.c (linux_wait_for_event): Reformat. Use the
12816 pass_signals array.
12817 * remote-utils.c (decode_address_to_semicolon): New.
12818 * server.c (pass_signals, handle_general_set): New.
12819 (handle_query): Mention QPassSignals for qSupported.
12820 (main): Call handle_general_set.
12821 * server.h (pass_signals, decode_address_to_semicolon): New.
12822
000ef4f0
DJ
128232006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12824
12825 * server.c (handle_query): Correct error handling for read_auxv.
12826
b7149293
UW
128272005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12828
12829 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12830 and srv_linux_thread_db to yes.
12831 * linux-s390-low.c (s390_fill_gregset): New function.
12832 (target_regsets): Define data structure.
12833
dae5f5cf
DJ
128342006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12835
12836 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12837 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12838 * config.in, configure: Regenerated.
12839 * inferiors.c (gdb_id_to_thread): New function.
12840 (gdb_id_to_thread_id): Use it.
12841 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12842 * linux-low.h (struct process_info): Add th member.
12843 (thread_db_get_tls_address): New prototype.
12844 * remote-utils.c (decode_address): Make non-static.
12845 * server.c (handle_query): Handle qGetTLSAddr.
12846 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12847 * target.h (struct target_ops): Add get_tls_address.
12848 * thread-db.c (maybe_attach_thread): Save the thread handle.
12849 (thread_db_get_tls_address): New.
12850
32ca6d61
DJ
128512006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12852
12853 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12854 (linux_resume_one_process): Take a siginfo_t *. Update all
12855 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12856 (struct pending_signals): Add a siginfo_t.
12857 (linux_wait_for_process): Always set last_status.
12858 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12859 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12860 * linux-low.h (struct process_info): Add last_status.
12861
5ffff7c1
DJ
128622006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12863
12864 * remote-utils.c (try_rle): New function.
12865 (putpkt_binary): Use it.
12866
8695c747
DJ
128672006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12868
12869 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12870 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12871 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12872 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12873 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12874 point registers.
12875
290fadea
RS
128762006-08-08 Richard Sandiford <richard@codesourcery.com>
12877
12878 * server.c (terminal_fd): New variable.
12879 (old_foreground_pgrp): Likewise.
12880 (restore_old_foreground_pgrp): New function.
12881 (start_inferior): Record the terminal file descriptor in terminal_fd
12882 and its original foreground group in old_foreground_pgrp. Register
12883 restore_old_foreground_pgrp with atexit().
12884
9f2e1e63
DJ
128852006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12886
12887 * server.c (handle_query): Correct qPart to qXfer.
12888
b80864fb
DJ
128892006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12890
12891 * configure.ac: Check for more headers which are missing on
12892 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12893 * configure.srv: Add Cygwin and mingw32.
12894 * remote-utils.c: Don't include headers unconditionally which
12895 are missing on mingw32. Include <winsock.h> for mingw32.
12896 (remote_open): Adjust for mingw32 support. Flush
12897 standard error after writing to it.
12898 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12899 (unblock_async_io, enable_async_io, disable_async_io)
12900 (readchar, getpkt): Update for Winsock support.
12901 (prepare_resume_reply): Expect a protocol signal number.
12902 * server.c: Disable <sys/wait.h> on mingw32.
12903 (start_inferior): Adjust for mingw32 support. Flush
12904 standard error after writing to it.
12905 (attach_inferior): Likewise. Use protocol signal
12906 numbers.
12907 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12908 and names.
12909 * win32-i386-low.c: New file.
12910 * Makefile.in (XM_CLIBS): Set.
12911 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12912 (win32-i386-low.o): New dependency rule.
12913 * linux-low.c (linux_wait): Use target signal numbers.
12914 * target.h (struct target_ops): Doc fix.
12915 * server.h (target_signal_to_name): New prototype.
12916 * gdbreplay.c: Don't include headers unconditionally which
12917 are missing on mingw32. Include <winsock.h> for mingw32.
12918 (remote_close, remote_open): Adjust for Winsock support.
12919 * configure, config.in: Regenerated.
12920
0876f84a
DJ
129212006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12922
12923 * server.c (decode_xfer_read, write_qxfer_response): New.
12924 (handle_query): Take a packet length argument. Handle
12925 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12926 the qSupported response.
12927 (main): Update call to handle_query.
12928
01f9e8fa
DJ
129292006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12930
12931 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12932 (putpkt_binary): Renamed from putpkt and adjusted for binary
12933 data.
12934 (putpkt): New wrapper for putpkt_binary.
12935 (readchar): Don't mask off the high bit.
12936 (decode_X_packet): New function.
12937 * server.c (main): Call putpkt_binary if a handler sets the packet
12938 length. Save the length of the incoming packet. Handle 'X'.
12939 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12940
be2a5f71
DJ
129412006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12942
12943 * server.c (handle_query): Handle qSupported.
12944
ea025f5f
DJ
129452006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12946
12947 * remote-utils.c (all_symbols_looked_up): New variable.
12948 (look_up_one_symbol): Check it.
12949 * server.h (look_up_one_symbol): New declaration.
12950 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12951
9308fc88
DJ
129522006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12953
12954 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12955 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12956 (PTRACE_GET_THREAD_AREA): Define.
12957 (ps_get_thread_area): New function.
12958
52fb6437
NS
129592006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12960
12961 * configure.srv (m68k*-*-uclinux*): New target.
12962 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12963 (linux_resume_one_process): Remove extraneous cast.
12964 (linux_read_offsets): New.
12965 (linux_target_op): Add linux_read_offsets on mmuless systems.
12966 * server.c (handle_query): Add qOffsets logic.
12967 * target.h (struct target_ops): Add read_offsets.
12968
21b0f40c
DJ
129692006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12970
12971 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12972 (PTRACE_GET_THREAD_AREA): Define.
12973 (ps_get_thread_area): New function.
12974 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12975 (linux-x86-64-low.o): Update.
12976
0050a760
DJ
129772006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12978
12979 * configure.ac: Remove checks for prfpregset_t.
12980 * gdb_proc_service.h: New file.
12981 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12982 new "gdb_proc_service.h".
12983 * proc-service.c: Likewise.
12984 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12985 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12986 * Makefile.in (gdb_proc_service_h): Updated.
12987 * configure, config.in: Regenerated.
12988
b92a518e
DJ
129892006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12990
12991 * remote-utils.c (prepare_resume_reply): Move declaration
12992 of gdb_id_from_wait to the top of the block.
12993
545587ee
DJ
129942006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12995
12996 * linux-low.c (regsets_store_inferior_registers): Read the regset
12997 from the target before filling it.
12998
9db87ebd
DJ
129992006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13000
13001 * server.c (attach_inferior): Return SIGTRAP for a successful
13002 attach.
13003
dd24457d
DJ
130042006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13005
13006 * Makefile.in (OBS): Add version.o.
13007 (STAGESTUFF): Delete.
13008 (version.o): Add dependencies.
13009 (version.c): Replace rule.
13010 (clean): Remove version.c.
13011 * server.c (gdbserver_version): New.
13012 (gdbserver_usage): Use printf.
13013 (main): Handle --version and --help.
13014 * server.h (version, host_name): Add declarations.
13015
6f0f660e
EZ
130162005-12-23 Eli Zaretskii <eliz@gnu.org>
13017
889bf7c5
PA
13018 * linux-arm-low.c:
13019 * linux-arm-low.c:
13020 * inferiors.c:
13021 * i387-fp.h:
13022 * i387-fp.c:
13023 * gdbreplay.c:
13024 * regcache.c:
13025 * proc-service.c:
13026 * mem-break.h:
13027 * mem-break.c:
13028 * linux-x86-64-low.c:
13029 * linux-sh-low.c:
13030 * linux-s390-low.c:
13031 * linux-ppc64-low.c:
13032 * linux-ppc-low.c:
13033 * linux-mips-low.c:
13034 * linux-m68k-low.c:
13035 * linux-m32r-low.c:
13036 * linux-low.h:
13037 * linux-low.c:
13038 * linux-ia64-low.c:
13039 * linux-i386-low.c:
13040 * linux-crisv32-low.c:
13041 * thread-db.c:
13042 * terminal.h:
13043 * target.h:
13044 * target.c:
13045 * server.h:
13046 * server.c:
13047 * remote-utils.c:
13048 * regcache.h:
13049 * utils.c:
13050 * Makefile.in:
13051 * configure.ac:
6f0f660e
EZ
13052 * gdbserver.1: Add (C) after Copyright. Update the FSF
13053 address.
13054
9d1fb177
DJ
130552005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13056
13057 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13058 (arm_breakpoint_at): Recognize both breakpoints.
13059 (the_low_target): Use the correct breakpoint instruction.
13060
011a70c2
DJ
130612005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13062
13063 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13064 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13065 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13066 (the_low_target): Update.
13067
7fb85e41
AS
130682005-10-25 Andreas Schwab <schwab@suse.de>
13069
13070 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13071
13072 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13073 (ia64_num_regs): Reduce to 462.
13074
3db0444b
DJ
130752005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13076
13077 * acinclude.m4: Correct quoting.
13078 * aclocal.m4: Regenerated.
13079
13080 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13081 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13082 (thread_db_init): Call thread_db_err_str.
13083 * configure.ac: Check for TD_VERSION.
13084 * config.in, configure: Regenerated.
13085
bee0189a
DJ
130862005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13087
13088 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13089
e9d25b98
DJ
130902005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13091
13092 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13093 is not available. Define HAVE_PTRACE_GETREGS if it is.
13094 * config.in, configure: Regenerated.
13095 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13096 * linux-i386-low.c, linux-m68k-low.c: Update to use
13097 HAVE_PTRACE_GETREGS.
13098 * linux-low.c (regsets_fetch_inferior_registers)
13099 (regsets_store_inferior_registers): Only return 0 if we processed
13100 GENERAL_REGS.
13101 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13102 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13103
a06660f7
DJ
131042005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13105
13106 * inferiors.c (struct thread_info): Add gdb_id.
13107 (add_thread): Add gdb_id argument.
13108 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13109 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13110 calls to add_thread.
13111 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13112 * server.c (handle_query): Use thread_to_gdb_id.
13113 (handle_v_cont, main): Use gdb_id_to_thread_id.
13114 * server.h (add_thread): Update prototype.
13115 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13116 prototypes.
13117
5a1f5858
DJ
131182005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13119
13120 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13121 left-padded registers.
13122 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13123 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13124
e122f1f5
SE
131252005-07-01 Steve Ellcey <sje@cup.hp.com>
13126
13127 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13128 * configure: Regenerate.
13129 * config.in: Regenerate.
13130 * server.h (NEED_DECLARATION_STRERROR):
13131 Replace with !HAVE_DECL_STRERROR.
13132
d592fa2f
DJ
131332005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13134
13135 * linux-low.c (linux_wait, linux_send_signal): Don't test
13136 an unsigned long variable for > 0 if it could be MAX_ULONG.
13137 * server.c (myresume): Likewise.
13138 * target.c (set_desired_inferior): Likewise.
13139
ccbd4912
MK
131402005-06-13 Mark Kettenis <kettenis@gnu.org>
13141
13142 * configure.ac: Simplify and improve check for socklen_t.
13143 * configure, config.in: Regenerate.
13144
f450004a
DJ
131452005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13146
13147 * acconfig.h: Remove.
13148 * configure.ac: Add a test for socklen_t. Use three-argument
13149 AC_DEFINE throughout.
13150 * config.in: Regenerated using autoheader 2.59.
13151 * configure: Regenerated.
13152
13153 * gdbreplay.c (socklen_t): Provide a default.
13154 (remote_open): Use socklen_t.
13155 * remote-utils.c (socklen_t): Provide a default.
13156 (remote_open): Use socklen_t.
13157 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13158 unsigned char.
13159
13160 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13161 char for buffers.
13162 * linux-low.c (linux_read_memory, linux_write_memory)
13163 (linux_read_auxv): Likewise.
13164 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13165 (check_mem_write): Likewise.
13166 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13167 Likewise.
13168 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13169 (registers_from_string, register_data): Likewise.
13170 * server.c (handle_query, main): Likewise.
13171 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13172 (decode_M_packet): Likewise.
13173 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13174 * target.h (struct target_ops): Update read_memory, write_memory,
13175 and read_auxv.
13176 (read_inferior_memory, write_inferior_memory): Update.
13177 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13178 to unsigned char *.
13179 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13180 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13181 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13182 linux-s390-low.c, linux-sh-low.c: Update for changes in
13183 read_inferior_memory and the_low_target->breakpoint.
13184
eee84df1
DJ
131852005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13186
13187 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13188 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13189 * configure.srv: Add powerpc64-*-linux*.
13190 * linux-ppc64-low.c: New file.
13191
45b134e5
OF
131922005-05-23 Orjan Friberg <orjanf@axis.com>
13193
13194 * linux-cris-low.c: New file with support for CRIS.
13195 * linux-crisv32-low.c: Ditto for CRISv32.
13196 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13197 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13198 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13199 reg-crisv32.o, and reg-crisv32.c to make rules.
13200 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13201 recognized targets.
13202
48d93c75
UW
132032005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13204
13205 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13206 of sizeof (PTRACE_XFER_TYPE).
13207 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13208
e013ee27
OF
132092005-05-12 Orjan Friberg <orjanf@axis.com>
13210
889bf7c5 13211 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13212 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13213 pointers for hardware watchpoint support.
13214 * linux-low.h (struct linux_target_ops): Ditto.
13215 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13216 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13217 to linux_target_ops.
13218 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13219 reply packet.
13220 * server.c (main): Recognize 'Z' and 'z' packets.
13221
b0ded00b
UW
132222005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13223
13224 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13225 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13226 (the_low_target): Add new members.
13227
8643e2ad
DJ
132282005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13229
13230 * proc-service.c (ps_lgetregs): Search all_processes instead of
13231 all_threads.
13232
fc620387
DJ
132332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13234
13235 * server.c (start_inferior): Change return type to int.
13236 (attach_inferior): Change sigptr to int *.
13237 (handle_v_cont, handle_v_requests): Change signal to int *.
13238 (main): Change signal to int.
13239
132402005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13241
13242 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13243 * configure.srv: Add m32r*-*-linux*.
13244 * linux-m32r-low.c: New file.
13245
e0e76420
DJ
132462005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13247
13248 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13249
a1928bad
DJ
132502005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13251
13252 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13253 Take unsigned long arguments for PIDs.
13254 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13255 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13256 (wait_for_sigstop, linux_resume_one_process)
13257 (regsets_fetch_inferior_registers, linux_send_signal)
13258 (linux_read_auxv): Likewise. Update the types of variables holding
13259 PIDs. Update format string specifiers.
13260 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13261 * remote-utils.c (prepare_resume_reply): Likewise.
13262 * server.c (cont_thread, general_thread, step_thread)
13263 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13264 unsigned long.
13265 (handle_query): Update format specifiers.
13266 (handle_v_cont, main): Use strtoul for thread IDs.
13267 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13268 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13269 (general_thread, step_thread, thread_from_wait)
13270 (old_thread_from_wait): Update.
13271 * target.h (struct thread_resume): Use unsigned long for THREAD.
13272 (struct target_ops): Use unsigned long for arguments to attach and
13273 thread_alive.
13274
dcdb98d2
DJ
132752005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13276
13277 * acinclude.m4: Include bfd/bfd.m4 directly.
13278 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13279 <agriffis@toolchain.org>.
13280 * aclocal.m4, configure: Regenerated.
13281
bec39cab
AC
132822005-01-07 Andrew Cagney <cagney@gnu.org>
13283
13284 * configure.ac: Rename configure.in, require autoconf 2.59.
13285 * configure: Re-generate.
13286
434c4c77
DJ
132872004-12-08 Daniel Jacobowitz <dan@debian.org>
13288
13289 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13290 LIBS when finished.
13291 * aclocal.m4: Regenerated.
13292 * configure: Regenerated.
13293
db1d3e1b
AS
132942004-11-21 Andreas Schwab <schwab@suse.de>
13295
13296 * linux-m68k-low.c (m68k_num_gregs): Define.
13297 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13298 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13299 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13300 (m68k_breakpoint_at): New. Add to the_low_target.
13301
13302 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13303 srv_linux_thread_db to yes.
13304
43360365
JB
133052004-10-20 Joel Brobecker <brobecker@gnat.com>
13306
13307 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13308 (ARCH_SET_FS): Likewise.
13309 (ARCH_GET_FS): Likewise.
13310 (ARCH_GET_GS): Likewise.
13311
fd500816
DJ
133122004-10-16 Daniel Jacobowitz <dan@debian.org>
13313
13314 * linux-i386-low.c (ps_get_thread_area): New.
13315 * linux-x86-64-low.c (ps_get_thread_area): New.
13316 * linux-low.c: Include <sys/syscall.h>.
13317 (linux_kill_one_process): Don't kill the first thread here.
13318 (linux_kill): Kill the first thread here.
13319 (kill_lwp): New function.
13320 (send_sigstop, linux_send_signal): Use it.
13321 * proc-service.c: Clean up #ifdefs.
13322 (fpregset_info): Delete.
13323 (ps_lgetregs): Update and enable implementation.
13324 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13325 implementations.
13326 * remote-utils.c (struct sym_cache, symbol_cache): New.
13327 (input_interrupt): Print a clearer message.
13328 (async_io_enabled): New variable.
13329 (enable_async_io, disable_async_io): Use it. Update comments.
13330 (look_up_one_symbol): Use the symbol cache.
13331 * thread-db.c (thread_db_look_up_symbols): New function.
13332 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13333
f6de3c42
DJ
133342004-10-16 Daniel Jacobowitz <dan@debian.org>
13335
13336 * configure.in: Test for -rdynamic.
13337 * configure: Regenerated.
13338 * Makefile (INTERNAL_LDFLAGS): New.
13339 (gdbserver, gdbreplay): Use it.
13340
2c0fc042
AC
133412004-09-02 Andrew Cagney <cagney@gnu.org>
13342
13343 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13344
075b3282
DJ
133452004-03-23 Daniel Jacobowitz <drow@mvista.com>
13346
13347 * linux-low.c (linux_wait): Clear all_processes list also.
13348
fa6a77dc
DJ
133492004-03-12 Daniel Jacobowitz <drow@mvista.com>
13350
13351 * linux-low.c: Include <errno.h>. Remove extern declaration of
13352 errno.
13353
6d782a97
DJ
133542004-03-12 Daniel Jacobowitz <drow@mvista.com>
13355
13356 * gdbreplay.c, server.h, utils.c: Update copyright years.
13357
3a7fb99b
DJ
133582004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13359
13360 * server.c (main): Print child status or termination signal from
13361 variable 'signal', not 'sig'.
13362
c3e735a6
DJ
133632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13364
13365 * linux-low.c (linux_read_memory): Change return type to
13366 int. Check for and return error from ptrace().
13367 * target.c (read_inferior_memory): Change return type to int. Pass
13368 back return status from the_target->read_memory().
13369 * target.h (struct target_ops): Adapt *read_memory() prototype.
13370 Update comment.
13371 (read_inferior_memory): Adapt prototype.
13372 * server.c (main): Return an error packet if
13373 read_inferior_memory() returns an error.
13374
a59d1c82
DJ
133752004-03-04 Daniel Jacobowitz <drow@mvista.com>
13376
13377 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13378 Unify with other clean targets.
13379
dc3f8883
DJ
133802004-02-29 Daniel Jacobowitz <drow@mvista.com>
13381
13382 * server.c (handle_v_cont): Call set_desired_inferior.
13383
89a208da
DJ
133842004-02-29 Daniel Jacobowitz <drow@mvista.com>
13385
13386 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13387
62ea82f5
DJ
133882004-02-29 Daniel Jacobowitz <drow@mvista.com>
13389
13390 * linux-low.c (linux_wait): Unblock async I/O.
13391 (linux_resume): Block and enable async I/O.
13392 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13393 * server.h (block_async_io, unblock_async_io): Add prototypes.
13394
6910d122
DJ
133952004-02-29 Daniel Jacobowitz <drow@mvista.com>
13396
13397 * remote-utils.c (remote_open): Print a status notice after
13398 opening a TCP port.
13399 * server.c (attach_inferior): Print a status notice after
13400 attaching.
13401
134022004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13403
13404 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13405
c89dc5d4
DJ
134062004-02-26 Daniel Jacobowitz <drow@mvista.com>
13407
13408 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13409 error packet.
13410 * server.c, target.h: Update copyright years.
13411
4b8dad4a
RM
134122004-02-25 Roland McGrath <roland@redhat.com>
13413
13414 * target.h (struct target_ops): New member `read_auxv'.
13415 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13416 * linux-low.c (linux_read_auxv): New function.
13417 (linux_target_ops): Initialize `read_auxv' member to that.
13418
d7446758
JB
134192004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13420
13421 Committed by Jim Blandy <jimb@redhat.com>.
13422
13423 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13424 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13425 instead of GPR_SIZE to distiguish s390 and s390x targets.
13426
5544ad89
DJ
134272004-01-31 Daniel Jacobowitz <drow@mvista.com>
13428
13429 * linux-low.c: Update copyright year.
13430 (check_removed_breakpoint): Clear pending_is_breakpoint.
13431 (linux_set_resume_request, linux_queue_one_thread)
13432 (resume_status_pending_p): New functions.
13433 (linux_continue_one_thread): Use process->resume.
13434 (linux_resume): Only resume threads if there are no pending events.
13435 * linux-low.h (struct process_info): Add resume request
13436 pointer.
13437
2a68b70e
DJ
134382004-01-30 Daniel Jacobowitz <drow@mvista.com>
13439
13440 * regcache.c (new_register_cache): Clear the allocated register
13441 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13442
64386c31
DJ
134432003-10-13 Daniel Jacobowitz <drow@mvista.com>
13444
13445 * linux-low.c (linux_resume): Take a struct thread_resume *
13446 argument.
13447 (linux_wait): Update call.
13448 (resume_ptr): New static variable.
13449 (linux_continue_one_thread): Renamed from
13450 linux_continue_one_process. Use resume_ptr.
13451 (linux_resume): Use linux_continue_one_thread.
13452 * server.c (handle_v_cont, handle_v_requests): New functions.
13453 (myresume): New function.
13454 (main): Handle 'v' case.
13455 * target.h (struct thread_resume): New type.
13456 (struct target_ops): Change argument of "resume" to struct
13457 thread_resume *.
13458 (myresume): Delete macro.
13459
c938e9b0
L
134602003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13461
13462 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13463 (uninstall): Support DESTDIR.
13464
7f313d07
BC
13465Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13466
13467 * configure.srv: Add xscale*linux copy of arm*linux entry.
13468
3b2fc2ea
DJ
134692003-07-24 Daniel Jacobowitz <drow@mvista.com>
13470
13471 * linux-arm-low.c (arm_reinsert_addr): New function.
13472 (the_low_target): Add arm_reinsert_addr.
13473
1c0a559e
MK
134742003-07-08 Mark Kettenis <kettenis@gnu.org>
13475
13476 * mem-break.c: Remove whitespace at end of file.
13477
43d5792c
DJ
134782003-06-28 Daniel Jacobowitz <drow@mvista.com>
13479
13480 * configure.in: Check whether we need to prototype strerror.
13481 * server.h: Optionally prototype strerror.
13482 * gdbreplay.c (perror_with_name): Use strerror.
13483 * linux-low.c (linux_attach_lwp): Use strerror.
13484 * utils.c (perror_with_name): Use strerror.
13485 * config.in, configure: Regenerated.
13486
c8a86edf
DJ
134872003-06-28 Daniel Jacobowitz <drow@mvista.com>
13488
13489 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13490 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13491
73d37363
DJ
134922003-06-20 Daniel Jacobowitz <drow@mvista.com>
13493
13494 * Makefile.in (SFILES): Update.
13495 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13496 low-sun3.c: Remove files.
13497
6ad8ae5c
DJ
134982003-06-17 Daniel Jacobowitz <drow@mvista.com>
13499
13500 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13501 (linux_detach_one_process, linux_detach): New functions.
13502 (linux_target_ops): Add linux_detach.
13503 * server.c (main): Handle 'D' packet.
13504 * target.h (struct target_ops): Add "detach" member.
13505 (detach_inferior): Define.
13506
1581182a
MK
135072003-06-13 Mark Kettenis <kettenis@gnu.org>
13508
13509 From Kelley Cook <kelleycook@wideopenwest.com>:
13510 * configure.srv: Accept i[34567]86 variants.
13511
e5379b03
DJ
135122003-06-05 Daniel Jacobowitz <drow@mvista.com>
13513
13514 * linux-low.c (linux_wait_for_event): Correct comment typos.
13515 (linux_resume_one_process): Call check_removed_breakpoint.
13516 (linux_send_signal): New function.
13517 (linux_target_ops): Add linux_send_signal.
13518 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13519 of kill.
13520 * target.h (struct target_ops): Add send_signal.
13521
2ff29de4
JB
135222003-05-29 Jim Blandy <jimb@redhat.com>
13523
13524 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13525 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13526 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13527 away part of the register's value.
13528
254787d4
DJ
135292003-03-26 Daniel Jacobowitz <drow@mvista.com>
13530
13531 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13532 (linux_wait_for_event, linux_init_signals): Likewise.
13533
94e10508
DJ
135342003-03-17 Daniel Jacobowitz <drow@mvista.com>
13535
13536 * configure.in: Check for stdlib.h.
13537 * configure: Regenerated.
13538 * config.in: Regenerated.
13539
4c0711e0
DJ
135402003-01-04 Andreas Schwab <schwab@suse.de>
13541
13542 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13543
ef66e766
AC
135442003-01-02 Andrew Cagney <ac131313@redhat.com>
13545
13546 * Makefile.in: Remove obsolete code.
13547
a1358604
DJ
135482002-11-20 Daniel Jacobowitz <drow@mvista.com>
13549
13550 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13551 defined(PT_FPR0_HI).
13552
23ce3b1c
DJ
135532002-11-17 Stuart Hughes <seh@zee2.com>
13554
13555 * linux-arm-low.c (arm_num_regs): Increase.
13556 (arm_regmap): Include status register.
13557
135582002-11-17 Daniel Jacobowitz <drow@mvista.com>
13559
13560 * linux-low.c (register_addr): Remove incorrect -1 check.
13561
a9fa9f7d
DJ
135622002-08-29 Daniel Jacobowitz <drow@mvista.com>
13563
13564 * linux-low.c (linux_create_inferior): Call setpgid. Return
13565 the new PID.
13566 (unstopped_p, linux_signal_pid): Remove.
13567 (linux_target_ops): Remove linux_signal_pid.
13568 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13569 global instead of target method.
13570 * target.h (struct target_ops): Remove signal_pid. Update comment
13571 for create_inferior.
13572 * server.c (signal_pid): New variable.
13573 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13574 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13575 (attach_inferior): Set signal_pid.
13576
17574093
DJ
135772002-08-23 Daniel Jacobowitz <drow@mvista.com>
13578
13579 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13580
135812002-08-20 Jim Blandy <jimb@redhat.com>
13582
13583 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13584 default for this.
13585
135862002-08-01 Andrew Cagney <cagney@redhat.com>
13587
13588 * Makefile.in: Make chill references obsolete.
13589
135902002-07-24 Kevin Buettner <kevinb@redhat.com>
13591
13592 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13593 * configure: Regenerate.
13594 * config.in: Regenerate.
13595
135962002-07-09 David O'Brien <obrien@FreeBSD.org>
13597
13598 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13599 (perror_with_name, remote_close, remote_open, expect, play): Static.
13600
136012002-07-04 Michal Ludvig <mludvig@suse.cz>
13602
4b8dad4a 13603 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13604 byte offsets instead of an array of indexes.
13605 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13606
136072002-06-13 Daniel Jacobowitz <drow@mvista.com>
13608
13609 * regcache.c: Add comment.
13610
136112002-06-11 Daniel Jacobowitz <drow@mvista.com>
13612
13613 * thread-db.c: New file.
13614 * proc-service.c: New file.
13615 * acinclude.m4: New file.
13616 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13617 proc-service.o, and thread-db.o.
13618 (linux-low.o): Add USE_THREAD_DB.
13619 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13620 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13621 * aclocal.m4: Regenerated.
13622 * config.in: Regenerated.
13623 * configure: Regenerated.
13624 * configure.in: Check for proc_service.h, sys/procfs.h,
13625 thread_db.h, and linux/elf.h headrs.
13626 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13627 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13628 Check for -lthread_db and thread support.
13629 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13630 PowerPC, and SuperH.
13631 * i387-fp.c: Constify arguments.
13632 * i387-fp.h: Likewise.
13633 * inferiors.c: (struct thread_info): Renamed from
13634 `struct inferior_info'. Remove PID member. Use generic inferior
13635 list header. All uses updated.
13636 (inferiors, signal_pid): Removed.
13637 (all_threads): New variable.
13638 (get_thread): Define.
13639 (add_inferior_to_list): New function.
13640 (for_each_inferior): New function.
13641 (change_inferior_id): New function.
13642 (add_inferior): Removed.
13643 (remove_inferior): New function.
13644 (add_thread): New function.
13645 (free_one_thread): New function.
13646 (remove_thread): New function.
13647 (clear_inferiors): Use for_each_inferior and free_one_thread.
13648 (find_inferior): New function.
13649 (find_inferior_id): New function.
13650 (inferior_target_data): Update argument type.
13651 (set_inferior_target_data): Likewise.
13652 (inferior_regcache_data): Likewise.
13653 (set_inferior_regcache_data): Likewise.
13654 * linux-low.c (linux_bp_reinsert): Remove.
13655 (all_processes, stopping_threads, using_thrads)
13656 (struct pending_signals, debug_threads, pid_of): New.
13657 (inferior_pid): Replace with macro.
13658 (struct inferior_linux_data): Remove.
13659 (get_stop_pc, add_process): New functions.
13660 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13661 Use add_process and add_thread.
13662 (linux_attach_lwp): New function, based on old linux_attach. Use
13663 add_process and add_thread. Set stop_expected for new threads.
13664 (linux_attach): New function.
13665 (linux_kill_one_process): New function.
13666 (linux_kill): Kill all LWPs.
13667 (linux_thread_alive): Use find_inferior_id.
13668 (check_removed_breakpoints, status_pending_p): New functions.
13669 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13670 Update. Use WNOHANG. Wait for cloned processes also. Update process
13671 struct for the found process.
13672 (linux_wait_for_event): New function.
13673 (linux_wait): Use it. Support LWPs.
13674 (send_sigstop, wait_for_sigstop, stop_all_processes)
13675 (linux_resume_one_process, linux_continue_one_process): New functions.
13676 (linux_resume): Support LWPs.
13677 (REGISTER_RAW_SIZE): Remove.
13678 (fetch_register): Use register_size instead. Call supply_register.
13679 (usr_store_inferior_registers): Likewise. Call collect_register.
13680 Fix recursive case.
13681 (regsets_fetch_inferior_registers): Improve error message.
13682 (regsets_store_inferior_registers): Add debugging.
13683 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13684 (unstopped_p, linux_signal_pid): New functions.
13685 (linux_target_ops): Add linux_signal_pid.
13686 (linux_init_signals): New function.
13687 (initialize_low): Call it. Initialize using_threads.
13688 * regcache.c (inferior_regcache_data): Add valid
13689 flag.
13690 (get_regcache): Fetch registers lazily. Add fetch argument
13691 and update all callers.
13692 (regcache_invalidate_one, regcache_invalidate): New
13693 functions.
13694 (new_register_cache): Renamed from create_register_cache.
13695 Return the new regcache.
13696 (free_register_cache): Change argument to a void *.
13697 (registers_to_string, registers_from_string): Call get_regcache
13698 with fetch flag set.
13699 (register_data): Make static. Pass fetch flag to get_regcache.
13700 (supply_register): Call get_regcache with fetch flag clear.
13701 (collect_register): Call get_regcache with fetch flag set.
13702 (collect_register_as_string): New function.
13703 * regcache.h: Update.
13704 * remote-utils.c (putpkt): Flush after debug output and use
13705 stderr.
13706 Handle input interrupts while waiting for an ACK.
13707 (input_interrupt): Use signal_pid method.
13708 (getpkt): Flush after debug output and use stderr.
13709 (outreg): Use collect_register_as_string.
13710 (new_thread_notify, dead_thread_notify): New functions.
13711 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13712 and general_thread.
13713 (look_up_one_symbol): Flush after debug output.
13714 * server.c (step_thread, server_waiting): New variables.
13715 (start_inferior): Don't use signal_pid. Update call to mywait.
13716 (attach_inferior): Update call to mywait.
13717 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13718 (main): Don't fetch/store registers explicitly. Use
13719 set_desired_inferior. Support proposed ``Hs'' packet. Update
13720 calls to mywait.
13721 * server.h: Update.
13722 (struct inferior_list, struct_inferior_list_entry): New.
13723 * target.c (set_desired_inferior): New.
13724 (write_inferior_memory): Constify.
13725 (mywait): New function.
13726 * target.h: Update.
13727 (struct target_ops): New signal_pid method.
13728 (mywait): Removed macro, added prototype.
13729
13730 * linux-low.h (regset_func): Removed.
13731 (regset_fill_func, regset_store_func): New.
13732 (enum regset_type): New.
13733 (struct regset_info): Add type field. Use new operation types.
13734 (struct linux_target_ops): stop_pc renamed to get_pc.
13735 Add decr_pc_after_break and breakpoint_at.
13736 (get_process, get_thread_proess, get_process_thread)
13737 (strut process_info, all_processes, linux_attach_lwp)
13738 (thread_db_init): New.
13739
13740 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13741 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13742 (the_low_target): Add new members.
13743 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13744 (i386_store_fpxregset): Constify.
13745 (target_regsets): Add new kind identifier.
13746 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13747 (i386_set_pc): Add debugging.
13748 (i386_breakpoint_at): New function.
13749 (the_low_target): Add new members.
13750 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13751 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13752 (mips_breakpoint_at): New.
13753 (the_low_target): Add new members.
13754 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13755 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13756 (the_low_target): Add new members.
13757 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13758 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13759 (the_low_target): Add new members.
13760 * linux-x86-64-low.c (target_regsets): Add new kind
13761 identifier.
13762
137632002-05-15 Daniel Jacobowitz <drow@mvista.com>
13764
13765 From Martin Pool <mbp@samba.org>:
13766 * server.c (gdbserver_usage): New function.
13767 (main): Call it.
13768
137692002-05-14 Daniel Jacobowitz <drow@mvista.com>
13770
13771 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13772 stop_at -> stop_pc.
13773
137742002-05-04 Andrew Cagney <ac131313@redhat.com>
13775
13776 * Makefile.in: Remove obsolete code.
13777
137782002-04-24 Michal Ludvig <mludvig@suse.cz>
13779
13780 * linux-low.c (regsets_fetch_inferior_registers),
13781 (regsets_store_inferior_registers): Removed cast to int from
13782 ptrace() calls.
13783 * regcache.h: Added declaration of struct inferior_info.
13784
137852002-04-20 Daniel Jacobowitz <drow@mvista.com>
13786
13787 * inferiors.c (struct inferior_info): Add regcache_data.
13788 (add_inferior): Call create_register_cache.
13789 (clear_inferiors): Call free_register_cache.
13790 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13791 * regcache.c (struct inferior_regcache_data): New.
13792 (registers): Remove.
13793 (get_regcache): New function.
13794 (create_register_cache, free_register_cache): New functions.
13795 (set_register_cache): Don't initialize the register cache here.
13796 (registers_to_string, registers_from_string, register_data): Call
13797 get_regcache.
13798 * regcache.h: Add prototypes.
13799 * server.h: Likewise.
13800
138012002-04-20 Daniel Jacobowitz <drow@mvista.com>
13802
13803 * mem-break.c: New file.
13804 * mem-break.h: New file.
13805 * Makefile.in: Add mem-break.o rule; update server.h
13806 dependencies.
13807 * inferiors.c (struct inferior_info): Add target_data
13808 member.
13809 (clear_inferiors): Free target_data member if set.
13810 (inferior_target_data, set_inferior_target_data): New functions.
13811 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13812 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13813 * linux-low.c (linux_bp_reinsert): New variable.
13814 (struct inferior_linux_data): New.
13815 (linux_create_inferior): Use set_inferior_target_data.
13816 (linux_attach): Likewise. Call add_inferior.
13817 (linux_wait_for_one_inferior): New function.
13818 (linux_wait): Call it.
13819 (linux_write_memory): Add const.
13820 (initialize_low): Call set_breakpoint_data.
13821 * linux-low.h (struct linux_target_ops): Add breakpoint
13822 handling members.
13823 * server.c (attach_inferior): Remove extra add_inferior
13824 call.
13825 * server.h: Include mem-break.h. Update inferior.c
13826 prototypes.
13827 * target.c (read_inferior_memory)
13828 (write_inferior_memory): New functions.
13829 * target.h (read_inferior_memory)
13830 (write_inferior_memory): Change macros to prototypes.
13831 (struct target_ops): Update comments. Add const to write_memory
13832 definition.
13833
138342002-04-11 Daniel Jacobowitz <drow@mvista.com>
13835
13836 * linux-low.c (usr_store_inferior_registers): Support
13837 registers which are allowed to fail to store.
13838 * linux-low.h (linux_target_ops): Likewise.
13839 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13840 (ppc_cannot_store_register): FPSCR may not be storable.
13841
138422002-04-09 Daniel Jacobowitz <drow@mvista.com>
13843
13844 * server.h: Include <string.h> if HAVE_STRING_H.
13845 * ChangeLog: Correct paths in last ChangeLog entry.
13846
138472002-04-09 Daniel Jacobowitz <drow@mvista.com>
13848
13849 * linux-low.h: Remove obsolete prototypes.
13850 (struct linux_target_ops): New.
13851 (extern the_low_target): New.
13852 * linux-low.c (num_regs, regmap): Remove declarations.
13853 (register_addr): Use the_low_target explicitly.
13854 (fetch_register): Likewise.
13855 (usr_fetch_inferior_registers): Likewise.
13856 (usr_store_inferior_registers): Likewise.
13857 * linux-arm-low.c (num_regs): Remove.
13858 (arm_num_regs): Define.
13859 (arm_regmap): Renamed from regmap, made static.
13860 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13861 made static.
13862 (arm_cannot_store_register): Renamed from cannot_store_register,
13863 made static.
13864 (the_low_target): New.
13865 * linux-i386-low.c (num_regs): Remove.
13866 (i386_num_regs): Define.
13867 (i386_regmap): Renamed from regmap, made static.
13868 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13869 made static.
13870 (i386_cannot_store_register): Renamed from cannot_store_register,
13871 made static.
13872 (the_low_target): New.
13873 * linux-ia64-low.c (num_regs): Remove.
13874 (ia64_num_regs): Define.
13875 (ia64_regmap): Renamed from regmap, made static.
13876 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13877 made static.
13878 (ia64_cannot_store_register): Renamed from cannot_store_register,
13879 made static.
13880 (the_low_target): New.
13881 * linux-m68k-low.c (num_regs): Remove.
13882 (m68k_num_regs): Define.
13883 (m68k_regmap): Renamed from regmap, made static.
13884 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13885 made static.
13886 (m68k_cannot_store_register): Renamed from cannot_store_register,
13887 made static.
13888 (the_low_target): New.
13889 * linux-mips-low.c (num_regs): Remove.
13890 (mips_num_regs): Define.
13891 (mips_regmap): Renamed from regmap, made static.
13892 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13893 made static.
13894 (mips_cannot_store_register): Renamed from cannot_store_register,
13895 made static.
13896 (the_low_target): New.
13897 * linux-ppc-low.c (num_regs): Remove.
13898 (ppc_num_regs): Define.
13899 (ppc_regmap): Renamed from regmap, made static.
13900 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13901 made static.
13902 (ppc_cannot_store_register): Renamed from cannot_store_register,
13903 made static.
13904 (the_low_target): New.
13905 * linux-s390-low.c (num_regs): Remove.
13906 (s390_num_regs): Define.
13907 (s390_regmap): Renamed from regmap, made static.
13908 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13909 made static.
13910 (s390_cannot_store_register): Renamed from cannot_store_register,
13911 made static.
13912 (the_low_target): New.
13913 * linux-sh-low.c (num_regs): Remove.
13914 (sh_num_regs): Define.
13915 (sh_regmap): Renamed from regmap, made static.
13916 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13917 made static.
13918 (sh_cannot_store_register): Renamed from cannot_store_register,
13919 made static.
13920 (the_low_target): New.
13921 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13922 (the_low_target): New.
13923
139242002-04-09 Daniel Jacobowitz <drow@mvista.com>
13925
13926 * Makefile.in: Add stamp-h target.
13927 * configure.in: Create stamp-h.
13928 * configure: Regenerated.
13929
139302002-04-09 Daniel Jacobowitz <drow@mvista.com>
13931
13932 * inferiors.c: New file.
13933 * target.c: New file.
13934 * target.h: New file.
13935 * Makefile.in: Add target.o and inferiors.o. Update
13936 dependencies.
13937 * linux-low.c (inferior_pid): New static variable,
13938 moved from server.c.
13939 (linux_create_inferior): Renamed from create_inferior.
13940 Call add_inferior. Return 0 on success instead of a PID.
13941 (linux_attach): Renamed from myattach.
13942 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13943 (linux_thread_alive): Renamed from mythread_alive.
13944 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13945 child dies.
13946 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13947 (regsets_store_inferior_registers): Correct error message.
13948 Add missing ``return 0''.
13949 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13950 (linux_store_registers): Renamed from store_inferior_registers.
13951 (linux_read_memory): Renamed from read_inferior_memory.
13952 (linux_write_memory): Renamed from write_inferior_memory.
13953 (linux_target_ops): New structure.
13954 (initialize_low): Call set_target_ops ().
13955 * remote-utils.c (unhexify): New function.
13956 (hexify): New function.
13957 (input_interrupt): Send signals to ``signal_pid''.
13958 * server.c (inferior_pid): Remove.
13959 (start_inferior): Update create_inferior call.
13960 (attach_inferior): Call add_inferior.
13961 (handle_query): New function.
13962 (main): Call handle_query for `q' packets.
13963 * server.h: Include "target.h". Remove obsolete prototypes.
13964 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13965
139662002-04-09 Daniel Jacobowitz <drow@mvista.com>
13967
13968 * Makefile.in: Add WARN_CFLAGS. Update configury
13969 dependencies.
13970 * configure.in: Check for <string.h>
13971 * configure: Regenerate.
13972 * config.in: Regenerate.
13973 * gdbreplay.c: Include needed system headers.
13974 (remote_open): Remove strchr prototype.
13975 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13976 * regcache.c (supply_register): Change buf argument to const void *.
13977 (supply_register_by_name): Likewise.
13978 (collect_register): Change buf argument to void *.
13979 (collect_register_by_name): Likewise.
13980 * regcache.h: Add missing prototypes.
13981 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13982 * server.c (handle_query): New function.
13983 (attached): New static variable, moved out of main.
13984 (main): Quiet longjmp clobber warnings.
13985 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13986 * utils.c (error): Remove NORETURN.
13987 (fatal): Likewise.