]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Improve gdb_remote_download, remove gdb_download
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
4dca19f8
MK
12016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
2
3 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
4
d0a9981f
MK
52016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
6
7 * linux-aarch64-ipa.c: Add <elf.h> include.
8 * linux-ppc-ipa.c: Add <elf.h> include.
9 * linux-s390-ipa.c: Add <elf.h> include.
10
252db07e
MK
112016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
12
13 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
14 (get_raw_reg_ptr): Likewise.
15 (get_trace_state_variable_value_ptr): Likewise.
16 (set_trace_state_variable_value_ptr): Likewise.
17 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
18 char *.
19
14e2b6d9
MK
202016-03-31 Wei-cheng Wang <cole945@gmail.com>
21 Marcin Kościelnicki <koriakin@0x04.net>
22
23 PR/17221
24 * linux-ppc-low.c (emit_insns): New function.
25 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
26 (ppc_emit_prologue): New function.
27 (ppc_emit_epilogue): New function.
28 (ppc_emit_add): New function.
29 (ppc_emit_sub): New function.
30 (ppc_emit_mul): New function.
31 (ppc_emit_lsh): New function.
32 (ppc_emit_rsh_signed): New function.
33 (ppc_emit_rsh_unsigned): New function.
34 (ppc_emit_ext): New function.
35 (ppc_emit_zero_ext): New function.
36 (ppc_emit_log_not): New function.
37 (ppc_emit_bit_and): New function.
38 (ppc_emit_bit_or): New function.
39 (ppc_emit_bit_xor): New function.
40 (ppc_emit_bit_not): New function.
41 (ppc_emit_equal): New function.
42 (ppc_emit_less_signed): New function.
43 (ppc_emit_less_unsigned): New function.
44 (ppc_emit_ref): New function.
45 (ppc_emit_const): New function.
46 (ppc_emit_reg): New function.
47 (ppc_emit_pop): New function.
48 (ppc_emit_stack_flush): New function.
49 (ppc_emit_swap): New function.
50 (ppc_emit_stack_adjust): New function.
51 (ppc_emit_call): New function.
52 (ppc_emit_int_call_1): New function.
53 (ppc_emit_void_call_2): New function.
54 (ppc_emit_if_goto): New function.
55 (ppc_emit_goto): New function.
56 (ppc_emit_eq_goto): New function.
57 (ppc_emit_ne_goto): New function.
58 (ppc_emit_lt_goto): New function.
59 (ppc_emit_le_goto): New function.
60 (ppc_emit_gt_goto): New function.
61 (ppc_emit_ge_goto): New function.
62 (ppc_write_goto_address): New function.
63 (ppc_emit_ops_impl): New static variable.
64 (ppc64v1_emit_prologue): New function.
65 (ppc64v2_emit_prologue): New function.
66 (ppc64_emit_epilogue): New function.
67 (ppc64_emit_add): New function.
68 (ppc64_emit_sub): New function.
69 (ppc64_emit_mul): New function.
70 (ppc64_emit_lsh): New function.
71 (ppc64_emit_rsh_signed): New function.
72 (ppc64_emit_rsh_unsigned): New function.
73 (ppc64_emit_ext): New function.
74 (ppc64_emit_zero_ext): New function.
75 (ppc64_emit_log_not): New function.
76 (ppc64_emit_bit_and): New function.
77 (ppc64_emit_bit_or): New function.
78 (ppc64_emit_bit_xor): New function.
79 (ppc64_emit_bit_not): New function.
80 (ppc64_emit_equal): New function.
81 (ppc64_emit_less_signed): New function.
82 (ppc64_emit_less_unsigned): New function.
83 (ppc64_emit_ref): New function.
84 (ppc64_emit_const): New function.
85 (ppc64v1_emit_reg): New function.
86 (ppc64v2_emit_reg): New function.
87 (ppc64_emit_pop): New function.
88 (ppc64_emit_stack_flush): New function.
89 (ppc64_emit_swap): New function.
90 (ppc64v1_emit_call): New function.
91 (ppc64v2_emit_call): New function.
92 (ppc64v1_emit_int_call_1): New function.
93 (ppc64v2_emit_int_call_1): New function.
94 (ppc64v1_emit_void_call_2): New function.
95 (ppc64v2_emit_void_call_2): New function.
96 (ppc64_emit_if_goto): New function.
97 (ppc64_emit_eq_goto): New function.
98 (ppc64_emit_ne_goto): New function.
99 (ppc64_emit_lt_goto): New function.
100 (ppc64_emit_le_goto): New function.
101 (ppc64_emit_gt_goto): New function.
102 (ppc64_emit_ge_goto): New function.
103 (ppc64v1_emit_ops_impl): New static variable.
104 (ppc64v2_emit_ops_impl): New static variable.
105 (ppc_emit_ops): New function.
106 (linux_low_target): Wire in ppc_emit_ops.
107
a2174ba4
MK
1082016-03-31 Wei-cheng Wang <cole945@gmail.com>
109 Marcin Kościelnicki <koriakin@0x04.net>
110
111 PR/17221
112 * Makefile.in: Add powerpc-*-ipa.o
113 * configure.srv: Add ipa_obj for powerpc*-linux.
114 * linux-ppc-ipa.c: New file.
115 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
116 includes.
117 (PPC_FIELD): New macro.
118 (PPC_SEXT): New macro.
119 (PPC_OP6): New macro.
120 (PPC_BO): New macro.
121 (PPC_LI): New macro.
122 (PPC_BD): New macro.
123 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
124 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
125 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
126 (ppc_get_thread_area): New function.
127 (is_elfv2_inferior): New function.
128 (gen_ds_form): New function.
129 (GEN_STD): New macro.
130 (GEN_STDU): New macro.
131 (GEN_LD): New macro.
132 (GEN_LDU): New macro.
133 (gen_d_form): New function.
134 (GEN_ADDI): New macro.
135 (GEN_ADDIS): New macro.
136 (GEN_LI): New macro.
137 (GEN_LIS): New macro.
138 (GEN_ORI): New macro.
139 (GEN_ORIS): New macro.
140 (GEN_LWZ): New macro.
141 (GEN_STW): New macro.
142 (GEN_STWU): New macro.
143 (gen_xfx_form): New function.
144 (GEN_MFSPR): New macro.
145 (GEN_MTSPR): New macro.
146 (GEN_MFCR): New macro.
147 (GEN_MTCR): New macro.
148 (GEN_SYNC): New macro.
149 (GEN_LWSYNC): New macro.
150 (gen_x_form): New function.
151 (GEN_OR): New macro.
152 (GEN_MR): New macro.
153 (GEN_LWARX): New macro.
154 (GEN_STWCX): New macro.
155 (GEN_CMPW): New macro.
156 (gen_md_form): New function.
157 (GEN_RLDICL): New macro.
158 (GEN_RLDICR): New macro.
159 (gen_i_form): New function.
160 (GEN_B): New macro.
161 (GEN_BL): New macro.
162 (gen_b_form): New function.
163 (GEN_BNE): New macro.
164 (GEN_LOAD): New macro.
165 (GEN_STORE): New macro.
166 (gen_limm): New function.
167 (gen_atomic_xchg): New function.
168 (gen_call): New function.
169 (ppc_relocate_instruction): New function.
170 (ppc_install_fast_tracepoint_jump_pad): New function.
171 (ppc_get_min_fast_tracepoint_insn_len): New function.
172 (ppc_get_ipa_tdesc_idx): New function.
173 (the_low_target): Wire in the new functions.
174 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
175 tdescs.
176 * linux-ppc-tdesc.h: New file.
177
a13c4696
MK
1782016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
179
180 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
181 (alloc_jump_pad_buffer): New function.
182 * linux-amd64-ipa.c: Add <sys/mman.h> include.
183 (alloc_jump_pad_buffer): New function.
184 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
185 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
186 (alloc_jump_pad_buffer): New function.
187 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
188 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
189 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
190 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
191
1cda1512
MK
1922016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
193
194 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
195 * linux-amd64-ipa.c: Likewise.
196 * linux-i386-ipa.c: Likewise.
197 * linux-s390-ipa.c: Likewise.
198 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
199 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
200 set_trace_state_variable_value_ptr.
201 (struct ipa_sym_addresses): Likewise.
202 (symbol_list): Likewise.
203 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
204 accessing gdb_collect directly.
205 (gdb_collect_ptr_type): New typedef.
206 (get_raw_reg_ptr_type): New typedef.
207 (get_trace_state_variable_value_ptr_type): New typedef.
208 (set_trace_state_variable_value_ptr_type): New typedef.
209 (gdb_collect_ptr): New global.
210 (get_raw_reg_ptr): New global.
211 (get_trace_state_variable_value_ptr): New global.
212 (set_trace_state_variable_value_ptr): New global.
213 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
214 accessing get_raw_reg directly.
215 (get_get_tsv_func_addr): Likewise for
216 get_trace_state_variable_value_ptr.
217 (get_set_tsv_func_addr): Likewise for
218 set_trace_state_variable_value_ptr.
219 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
220
72fb5488
SM
2212016-03-30 Simon Marchi <simon.marchi@ericsson.com>
222
223 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
224
28170b88
MK
2252016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
226
227 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
228 packets.
229 (relocate_instruction): Remove own_buf.
230 * server.c (own_buf): Make global.
231 (handle_v_requests): Make global.
232 * server.h (own_buf): New declaration.
233 (handle_v_requests): New prototype.
234
f39e8743
MK
2352016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
236
237 PR 18377
238 * linux-s390-low.c (add_insns): New function.
239 (s390_emit_prologue): New function.
240 (s390_emit_epilogue): New function.
241 (s390_emit_add): New function.
242 (s390_emit_sub): New function.
243 (s390_emit_mul): New function.
244 (s390_emit_lsh): New function.
245 (s390_emit_rsh_signed): New function.
246 (s390_emit_rsh_unsigned): New function.
247 (s390_emit_ext): New function.
248 (s390_emit_log_not): New function.
249 (s390_emit_bit_and): New function.
250 (s390_emit_bit_or): New function.
251 (s390_emit_bit_xor): New function.
252 (s390_emit_bit_not): New function.
253 (s390_emit_equal): New function.
254 (s390_emit_less_signed): New function.
255 (s390_emit_less_unsigned): New function.
256 (s390_emit_ref): New function.
257 (s390_emit_if_goto): New function.
258 (s390_emit_goto): New function.
259 (s390_write_goto_address): New function.
260 (s390_emit_litpool): New function.
261 (s390_emit_const): New function.
262 (s390_emit_call): New function.
263 (s390_emit_reg): New function.
264 (s390_emit_pop): New function.
265 (s390_emit_stack_flush): New function.
266 (s390_emit_zero_ext): New function.
267 (s390_emit_swap): New function.
268 (s390_emit_stack_adjust): New function.
269 (s390_emit_set_r2): New function.
270 (s390_emit_int_call_1): New function.
271 (s390_emit_void_call_2): New function.
272 (s390_emit_eq_goto): New function.
273 (s390_emit_ne_goto): New function.
274 (s390_emit_lt_goto): New function.
275 (s390_emit_le_goto): New function.
276 (s390_emit_gt_goto): New function.
277 (s390_emit_ge_goto): New function.
278 (s390x_emit_prologue): New function.
279 (s390x_emit_epilogue): New function.
280 (s390x_emit_add): New function.
281 (s390x_emit_sub): New function.
282 (s390x_emit_mul): New function.
283 (s390x_emit_lsh): New function.
284 (s390x_emit_rsh_signed): New function.
285 (s390x_emit_rsh_unsigned): New function.
286 (s390x_emit_ext): New function.
287 (s390x_emit_log_not): New function.
288 (s390x_emit_bit_and): New function.
289 (s390x_emit_bit_or): New function.
290 (s390x_emit_bit_xor): New function.
291 (s390x_emit_bit_not): New function.
292 (s390x_emit_equal): New function.
293 (s390x_emit_less_signed): New function.
294 (s390x_emit_less_unsigned): New function.
295 (s390x_emit_ref): New function.
296 (s390x_emit_if_goto): New function.
297 (s390x_emit_const): New function.
298 (s390x_emit_call): New function.
299 (s390x_emit_reg): New function.
300 (s390x_emit_pop): New function.
301 (s390x_emit_stack_flush): New function.
302 (s390x_emit_zero_ext): New function.
303 (s390x_emit_swap): New function.
304 (s390x_emit_stack_adjust): New function.
305 (s390x_emit_int_call_1): New function.
306 (s390x_emit_void_call_2): New function.
307 (s390x_emit_eq_goto): New function.
308 (s390x_emit_ne_goto): New function.
309 (s390x_emit_lt_goto): New function.
310 (s390x_emit_le_goto): New function.
311 (s390x_emit_gt_goto): New function.
312 (s390x_emit_ge_goto): New function.
313 (s390_emit_ops): New function.
314 (struct linux_target_ops): Fill in emit_ops hook.
315
abd9baf9
MK
3162016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
317
318 PR 18377
319 * Makefile.in: Add s390 IPA files.
320 * configure.srv: Build IPA for s390.
321 * linux-s390-ipa.c: New file.
322 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
323 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
324 (tdesc_s390_linux32): Likewise.
325 (init_registers_s390_linux32v1): Likewise.
326 (tdesc_s390_linux32v1): Likewise.
327 (init_registers_s390_linux32v2): Likewise.
328 (tdesc_s390_linux32v2): Likewise.
329 (init_registers_s390_linux64): Likewise.
330 (tdesc_s390_linux64): Likewise.
331 (init_registers_s390_linux64v1): Likewise.
332 (tdesc_s390_linux64v1): Likewise.
333 (init_registers_s390_linux64v2): Likewise.
334 (tdesc_s390_linux64v2): Likewise.
335 (init_registers_s390_te_linux64): Likewise.
336 (tdesc_s390_te_linux64): Likewise.
337 (init_registers_s390_vx_linux64): Likewise.
338 (tdesc_s390_vx_linux64): Likewise.
339 (init_registers_s390_tevx_linux64): Likewise.
340 (tdesc_s390_tevx_linux64): Likewise.
341 (init_registers_s390x_linux64): Likewise.
342 (tdesc_s390x_linux64): Likewise.
343 (init_registers_s390x_linux64v1): Likewise.
344 (tdesc_s390x_linux64v1): Likewise.
345 (init_registers_s390x_linux64v2): Likewise.
346 (tdesc_s390x_linux64v2): Likewise.
347 (init_registers_s390x_te_linux64): Likewise.
348 (tdesc_s390x_te_linux64): Likewise.
349 (init_registers_s390x_vx_linux64): Likewise.
350 (tdesc_s390x_vx_linux64): Likewise.
351 (init_registers_s390x_tevx_linux64): Likewise.
352 (tdesc_s390x_tevx_linux64): Likewise.
353 (have_hwcap_s390_vx): New static variable.
354 (s390_arch_setup): Fill have_hwcap_s390_vx.
355 (s390_get_thread_area): New function.
356 (s390_ft_entry_gpr_esa): New const.
357 (s390_ft_entry_gpr_zarch): New const.
358 (s390_ft_entry_misc): New const.
359 (s390_ft_entry_fr): New const.
360 (s390_ft_entry_vr): New const.
361 (s390_ft_main_31): New const.
362 (s390_ft_main_64): New const.
363 (s390_ft_exit_fr): New const.
364 (s390_ft_exit_vr): New const.
365 (s390_ft_exit_misc): New const.
366 (s390_ft_exit_gpr_esa): New const.
367 (s390_ft_exit_gpr_zarch): New const.
368 (append_insns): New function.
369 (s390_relocate_instruction): New function.
370 (s390_install_fast_tracepoint_jump_pad): New function.
371 (s390_get_min_fast_tracepoint_insn_len): New function.
372 (s390_get_ipa_tdesc_idx): New function.
373 (struct linux_target_ops): Wire in the above functions.
374 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
375 * linux-s390-tdesc.h: New file.
376
a4105d04
MK
3772016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
378
379 * linux-s390-low.c (s390_supports_tracepoints): New function.
380 (struct linux_target_ops): Fill supports_tracepoints hook.
381
35ac8b3e
YQ
3822016-03-18 Yao Qi <yao.qi@linaro.org>
383
384 * linux-low.c (lwp_signal_can_be_delivered): New function.
385 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
386
94610ec4
YQ
3872016-03-18 Yao Qi <yao.qi@linaro.org>
388
389 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
390 0 if signal is enqueued. Remove 'signal' from one debugging
391 message. Move one debugging message to some lines below.
392 Remove code setting 'signal' to 0.
393
80aea927
YQ
3942016-03-18 Yao Qi <yao.qi@linaro.org>
395
396 * linux-low.c (linux_low_filter_event): Remove redundant
397 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
398
b04fd3be
MK
3992016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
400
401 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
402 (struct linux_target_ops): Wire in the above.
403
c40c8d4b
YQ
4042016-03-03 Yao Qi <yao.qi@linaro.org>
405
406 * linux-low.c: Update comments to start_step_over.
407
0f8288ae
YQ
4082016-03-03 Yao Qi <yao.qi@linaro.org>
409
410 PR server/19736
411 * linux-low.c (handle_extended_wait): Set child suspended
412 if event_lwp->bp_reinsert isn't zero.
413
fdbd04a8
YQ
4142016-03-02 Yao Qi <yao.qi@linaro.org>
415
416 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
417 enqueue_pending_signal.
418
6896a8fa
MK
4192016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
420
421 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
422 is actually loaded.
423
ab503087
MK
4242016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
425
426 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
427 (s390_regmap_3264) [!__s390x__]: New global.
428 (s390_collect_ptrace_register): Skip map entries containing -1.
429 (s390_supply_ptrace_register): Ditto.
430 (s390_fill_gprs_high): New function.
431 (s390_store_gprs_high): New function.
432 (s390_regsets): Add NT_S390_HIGH_GPRS.
433 (s390_get_hwcap): Enable on 31-bit.
434 (have_hwcap_s390_high_gprs): Enable on 31-bit.
435 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
436 Detect NT_S390_HIGH_GPRS.
437 (s390_usrregs_info_3264): Enable on 31-bit.
438 (s390_regs_info): Enable regs_info_3264 on 31-bit.
439 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
440
ae91f625
MK
4412016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
442
443 PR gdb/13808
444 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
445 * configure.srv: Ditto.
446 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
447 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
448 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
449 (init_registers_amd64_linux): Remove prototype.
450 (tdesc_amd64_linux): Remove declaration.
451 (get_ipa_tdesc): New function.
452 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
453 initialize remaining tdescs.
454 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
455 (init_registers_i386_linux): Remove prototype.
456 (tdesc_i386_linux): Remove declaration.
457 (get_ipa_tdesc): New function.
458 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
459 initialize remaining tdescs.
460 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
461 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
462 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
463 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
464 (x86_get_ipa_tdesc_idx): New function.
465 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
466 * linux-x86-tdesc.h: New file.
467 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
468 (target_get_ipa_tdesc_idx): New macro.
469 * tracepoint.c (ipa_tdesc_idx): New macro.
470 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
471 (symbol_list): Add ipa_tdesc_idx.
472 (cmd_qtstart): Write ipa_tdesc_idx in the target.
473 (ipa_tdesc): Remove.
474 (ipa_tdesc_idx): New variable.
475 (get_context_regcache): Use get_ipa_tdesc.
476 (gdb_collect): Ditto.
477 (gdb_probe): Ditto.
478 * tracepoint.h (get_ipa_tdesc): New prototype.
479 (ipa_tdesc): Remove.
480
e7ad2f14
PA
4812016-02-24 Pedro Alves <palves@redhat.com>
482
483 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
484 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
485 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
486 Factor out common code between the USE_SIGTRAP_SIGINFO and
487 !USE_SIGTRAP_SIGINFO blocks.
488 (linux_low_filter_event): Call save_stop_reason instead of
489 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
490 Update comments.
491 (linux_wait_1): Update comments.
492
657f9cde
WW
4932016-02-24 Wei-cheng Wang <cole945@gmail.com>
494
495 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
496 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
497 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
498 ppc_insert_point, ppc_remove_point.
499
b00b61e1
MK
5002016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
501
502 * linux-s390-low.c (s390_supports_z_point_type): New function.
503 (struct linux_target_ops): Wire s390_supports_z_point_type in.
504
553cb527
YQ
5052016-02-16 Yao Qi <yao.qi@linaro.org>
506
507 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
508 PC. Get pc from regcache_read_pc.
509
a5652c21
YQ
5102016-02-12 Yao Qi <yao.qi@linaro.org>
511
512 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
513 or linux_get_pc_32bit.
514 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
515
ed443b61
YQ
5162016-02-12 Yao Qi <yao.qi@linaro.org>
517
518 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
519 arm_linux_get_next_pcs_fixup.
520
020ecd38
MK
5212016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
522
523 * tracepoint.c (x_tracepoint_action_download): Change
524 write_inferior_data_ptr to write_inferior_data_pointer.
525 (cmd_qtstart): Likewise.
526 (write_inferior_data_ptr): Remove.
527 (download_agent_expr): Change write_inferior_data_ptr to
528 write_inferior_data_pointer.
529 (download_tracepoint_1): Likewise.
530 (download_tracepoint): Likewise.
531 (download_trace_state_variables): Likewise.
532
7cae9051
WW
5332016-02-11 Wei-cheng Wang <cole945@gmail.com>
534 Marcin Kościelnicki <koriakin@0x04.net>
535
536 * tracepoint.c (struct tracepoint_action_ops): Remove.
537 (struct tracepoint_action): Remove ops.
538 (m_tracepoint_action_download, r_tracepoint_action_download)
539 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
540 size and offset accordingly.
541 (m_tracepoint_action_ops, r_tracepoint_action_ops)
542 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
543 (tracepoint_action_send, tracepoint_action_download): New functions.
544 Helpers for trace action handlers.
545 (add_tracepoint_action): Remove setup actions ops.
546 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
547
9f6a71b4
YQ
5482016-02-10 Yao Qi <yao.qi@linaro.org>
549
550 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
551
1e94266c
SM
5522016-02-09 Simon Marchi <simon.marchi@ericsson.com>
553
554 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
555 to AC_OUTPUT.
556 * configure: Regenerate.
557
8adce034
SM
5582016-02-09 Simon Marchi <simon.marchi@ericsson.com>
559
560 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
561 void * to gdb_byte *.
562 * linux-low.c (siginfo_fixup): Likewise.
563 (linux_xfer_siginfo): Likewise.
564 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
565 Likewise.
566 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
567
93813b37
WT
5682016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
569
570 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
571 to srv_tgtobj.
572 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
573 to srv_tgtobj.
574 * linux-x86-low.c [__x86_64__]: Include
575 "nat/amd64-linux-siginfo.h".
576 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
577 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
578 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
579 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
580 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
581 (cpt_si_fd, si_timerid, si_overrun): Move from
582 nat/amd64-linux-siginfo.c.
583 * Makefile.in (amd64-linux-siginfo.o:): New rule.
584
8424cc97
SM
5852016-01-28 Simon Marchi <simon.marchi@ericsson.com>
586
587 * server.c (skip_to_semicolon): Remove.
588 (process_point_options): Use strchrnul instead of
589 skip_to_semicolon.
590
4d18591b
YQ
5912016-01-26 Yao Qi <yao.qi@linaro.org>
592
593 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
594 * linux-low.c (install_software_single_step_breakpoints): Don't
595 call regcache_read_pc.
596 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
597 argument pc.
598
d8020970
YQ
5992016-01-26 Yao Qi <yao.qi@linaro.org>
600
601 * linux-low.c (install_software_single_step_breakpoints): Call
602 regcache_read_pc instead of get_pc.
603
8b207339
YQ
6042016-01-26 Yao Qi <yao.qi@linaro.org>
605
606 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
607 (unblock_async_io): Rename to ...
608 (block_unblock_async_io): ... it. New function.
609 (enable_async_io): Don't install SIGIO handler. Unblock it
610 instead.
611 (disable_async_io): Don't ignore SIGIO. Block it instead.
612 (initialize_async_io): Install SIGIO handler. Don't call
613 unblock_async_io.
614
18879fef
YQ
6152016-01-26 Yao Qi <yao.qi@linaro.org>
616
617 * remote-utils.c (getpkt): If the buffer isn't empty, and the
618 first character is '\003', call *the_target->request_interrupt.
619
a0f8e08a
YQ
6202016-01-25 Yao Qi <yao.qi@linaro.org>
621
622 * remote-utils.c (new_thread_notify): Remove.
623 (dead_thread_notify): Likewise.
624 * remote-utils.h (new_thread_notify): Remove declaration.
625 (dead_thread_notify): Likewise.
626
cc5fd9ab
MK
6272016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
628
629 * gdb.trace/pending.exp: Fix expected message on continue.
630
99e8eb11
MK
6312016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
632
633 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
634 it works properly on big-endian machines where sizeof (CORE_ADDR)
635 != sizeof (void *).
636
a994041d
PA
6372016-01-21 Pedro Alves <palves@redhat.com>
638
639 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
640 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
641 * configure: Regenerate.
642
f7a6a40d
YQ
6432016-01-21 Yao Qi <yao.qi@linaro.org>
644
645 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
646 is_thumb and set it according to CPSR saved on the stack.
647 (get_next_pcs_syscall_next_pc): Pass is_thumb to
648 arm_sigreturn_next_pc.
649
6f69e520
YQ
6502016-01-18 Yao Qi <yao.qi@linaro.org>
651
652 * linux-low.c (linux_set_pc_64bit): New function.
653 (linux_get_pc_64bit): New function.
654 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
655 Declare.
656 * linux-sparc-low.c (debug_threads): Remove declaration.
657 (sparc_get_pc): Remove.
658 (the_low_target): Use linux_get_pc_64bit instead of
659 sparc_get_pc.
660 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
661 (the_low_target): Use linux_get_pc_64bit and
662 linux_set_pc_64bit.
663
276d4552
YQ
6642016-01-18 Yao Qi <yao.qi@linaro.org>
665
666 * linux-arm-low.c (debug_threads): Remove declaration.
667 (arm_get_pc, arm_set_pc): Remove.
668 (the_low_target): Use linux_get_pc_32bit and
669 linux_set_pc_32bit.
670 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
671 (the_low_target): Use linux_get_pc_32bit and
672 linux_set_pc_32bit.
673 * linux-cris-low.c (debug_threads): Remove declaration.
674 (cris_get_pc, cris_set_pc,): Remove.
675 (the_low_target): Use linux_get_pc_32bit and
676 linux_set_pc_32bit.
677 * linux-crisv32-low.c (debug_threads): Remove declaration.
678 (cris_get_pc, cris_set_pc): Remove.
679 (the_low_target): Use linux_get_pc_32bit and
680 linux_set_pc_32bit.
681 * linux-low.c: Include inttypes.h.
682 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
683 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
684 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
685 (the_low_target): Use linux_get_pc_32bit and
686 linux_set_pc_32bit.
687 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
688 (the_low_target): Use linux_get_pc_32bit and
689 linux_set_pc_32bit.
690 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
691 (the_low_target): Use linux_get_pc_32bit and
692 linux_set_pc_32bit.
693 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
694 (the_low_target): Use linux_get_pc_32bit and
695 linux_set_pc_32bit.
696 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
697 (the_low_target): Use linux_get_pc_32bit and
698 linux_set_pc_32bit.
699
eb0edac8
GB
7002016-01-18 Gary Benson <gbenson@redhat.com>
701
702 * configure.ac (AC_FUNC_FORK): New check.
703 * config.in: Regenerate.
704 * configure: Likewise.
705
1b451dda
YQ
7062016-01-14 Yao Qi <yao.qi@linaro.org>
707
708 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
709 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
710 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
711 arm_get_next_pcs_ctor.
712
82075af2
JS
7132016-01-12 Josh Stone <jistone@redhat.com>
714 Philippe Waroquiers <philippe.waroquiers@skynet.be>
715
716 * inferiors.h: Include "gdb_vecs.h".
717 (struct process_info): Add syscalls_to_catch.
718 * inferiors.c (remove_process): Free syscalls_to_catch.
719 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
720 syscall_return stops.
721 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
722 * server.c (handle_general_set): Handle QCatchSyscalls.
723 (handle_query): Report support for QCatchSyscalls.
724 * target.h (struct target_ops): Add supports_catch_syscall.
725 (target_supports_catch_syscall): New macro.
726 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
727 (struct lwp_info): Add syscall_state.
728 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
729 Maintain syscall_state and syscalls_to_catch across exec.
730 (get_syscall_trapinfo): New function, proxy to the_low_target.
731 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
732 (linux_low_filter_event): Toggle syscall_state entry/return for
733 syscall traps, and set it ignored for all others.
734 (gdb_catching_syscalls_p): New function.
735 (gdb_catch_this_syscall_p): New function.
736 (linux_wait_1): Handle SYSCALL_SIGTRAP.
737 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
738 (linux_supports_catch_syscall): New function.
739 (linux_target_ops): Install it.
740 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
741 (the_low_target): Install it.
742
8f13a3ce
MF
7432016-01-12 Mike Frysinger <vapier@gentoo.org>
744
745 * acinclude.m4: Include new ../warning.m4 file.
746 * configure: Regenerated.
747 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
748
5b3da067
MF
7492016-01-12 Mike Frysinger <vapier@gentoo.org>
750
751 * ax.c (is_goto_target): Mark static.
752 * linux-low.c (register_addr): Likewise.
753 (linux_fetch_registers, linux_store_registers): Likewise.
754 * mem-break.c (any_persistent_commands): Fix old prototype.
755 (add_commands_to_breakpoint): Mark static.
756 * regcache.c (find_register_by_name): Delete unused func.
757 * remote-utils.c (hex_or_minus_one): Mark static.
758 * server.c (monitor_show_help): Mark static.
759 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
760 handle_v_requests): Likewise.
761
bc504a31
PA
7622016-01-12 Pedro Alves <palves@redhat.com>
763
764 Remove use of the registered trademark symbol throughout.
765
5a0dd67a
YQ
7662016-01-08 Yao Qi <yao.qi@linaro.org>
767
768 * remote-utils.c (getpkt): If c is '\003', call target hook
769 request_interrupt.
770
b2ca446f
YQ
7712016-01-06 Yao Qi <yao.qi@linaro.org>
772
773 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
774 linux-aarch32-low.c.
775 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
776 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
777 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
778 (thumb2_breakpoint): Declare.
779 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
780 linux-aarch32-low.h.
781 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
782 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
783 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
784
edd88788
JB
7852016-01-01 Joel Brobecker <brobecker@adacore.com>
786
787 * gdbreplay.c (gdbreplay_version): Change copyright year in
788 version message.
789 * server.c (gdbserver_version): Likewise.
790
65da7f14
PP
7912015-12-28 Patrick Palka <patrick@parcs.ath.cx>
792
793 * server.c (crc32_table): Delete.
794 (crc32): Use libiberty's xcrc32 function.
795
4abd5ed2
JB
7962015-12-22 Joel Brobecker <brobecker@adacore.com>
797
798 * lynx-low.c (lynx_delete_thread_callback): New function.
799 (lynx_mourn): Properly delete our process and all of its
800 threads. Remove call to clear_inferiors.
801
0e50fe5c
JB
8022015-12-22 Joel Brobecker <brobecker@adacore.com>
803
804 * target.c (thread_search_callback): Add check that
805 the thread_stopped target callback is not NULL before
806 calling it.
807
35adc03f
YQ
8082015-12-21 Yao Qi <yao.qi@linaro.org>
809
810 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
811 arm breakpoint.
812
bd2b2909
AT
8132015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
814
815 * server.c (handle_query): Call target_supports_software_single_step.
816
7fe5e27e
AT
8172015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
818
819 * linux-low.c (single_step): New function.
820 (linux_resume_one_lwp_throw): Call single_step.
821 (start_step_over): Likewise.
822
d9311bfa
AT
8232015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
824
825 * Makefile.in (SFILES): Append arch/arm-linux.c,
826 arch/arm-get-next-pcs.c.
827 (arm-linux.o): New rule.
828 (arm-get-next-pcs.o): New rule.
829 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
830 arm-linux.o.
831 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
832 to linux-aarch32-low.c.
833 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
834 (arm_breakpoint_len, thumb_breakpoint): Likewise.
835 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
836 (thumb2_breakpoint_len): Likewise.
837 (arm_is_thumb_mode): Make non-static.
838 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
839 from linux-aarch32-low.c.
840 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
841 (arm_breakpoint_len, thumb_breakpoint): Likewise.
842 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
843 (thumb2_breakpoint_len): Likewise.
844 (arm_is_thumb_mode): New declaration.
845 * linux-arm-low.c: Include arch/arm-linux.h
846 aarch/arm-get-next-pcs.h, sys/syscall.h.
847 (get_next_pcs_ops): New struct.
848 (get_next_pcs_addr_bits_remove): New function.
849 (get_next_pcs_is_thumb): New function.
850 (get_next_pcs_read_memory_unsigned_integer): Likewise.
851 (arm_sigreturn_next_pc): Likewise.
852 (get_next_pcs_syscall_next_pc): Likewise.
853 (arm_gdbserver_get_next_pcs): Likewise.
854 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
855 Initialize.
856 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
857 * server.h: Include gdb_vecs.h.
858
68ce2059
AT
8592015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
860
861 * Makefile.in (SFILES): Append common/common-regcache.c.
862 (OBS): Append common-regcache.o.
863 (common-regcache.o): New rule.
864 * regcache.c (init_register_cache): Initialize cache to
865 REG_UNAVAILABLE.
866 (regcache_raw_read_unsigned): New function.
867 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
868 register_status enum.
869
fa5308bd
AT
8702015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
871
872 * linux-aarch64-low.c (the_low_targets): Rename
873 breakpoint_reinsert_addr to get_next_pcs.
874 * linux-arm-low.c (the_low_targets): Likewise.
875 * linux-bfin-low.c (the_low_targets): Likewise.
876 * linux-cris-low.c (the_low_targets): Likewise.
877 * linux-crisv32-low.c (the_low_targets): Likewise.
878 * linux-low.c (can_software_single_step): Likewise.
879 (install_software_single_step_breakpoints): New function.
880 (start_step_over): Use install_software_single_step_breakpoints.
881 * linux-low.h: New CORE_ADDR vector.
882 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
883 get_next_pcs.
884 * linux-mips-low.c (the_low_targets): Likewise.
885 * linux-nios2-low.c (the_low_targets): Likewise.
886 * linux-sparc-low.c (the_low_targets): Likewise.
887
4a6ed09b
PA
8882015-12-17 Pedro Alves <palves@redhat.com>
889
890 * linux-low.c (linux_kill_one_lwp): Remove references to
891 LinuxThreads.
892 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
893 to 'kill'.
894 (linux_init_signals): Delete.
895 (initialize_low): Adjust.
896 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
897
7544db95
PA
8982015-12-16 Pedro Alves <palves@redhat.com>
899
900 * configure.ac (compiler warning flags): When testing a
901 -Wno-foo option, check whether -Wfoo works instead.
902 * configure: Regenerate.
903
8020350c
DB
9042015-12-11 Don Breazeal <donb@codesourcery.com>
905
906 * server.c (process_serial_event): Don't exit from gdbserver
907 in remote mode if there are still active inferiors.
908
db91f502
YQ
9092015-12-11 Yao Qi <yao.qi@linaro.org>
910
911 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
912 arm_breakpoint_at if the process is 32-bit.
913
b37a6290
YQ
9142015-12-11 Yao Qi <yao.qi@linaro.org>
915
916 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
917 arm breakpoint.
918
17b1509a
YQ
9192015-12-07 Yao Qi <yao.qi@linaro.org>
920
921 * configure.srv: Append arm.o to srv_tgtobj for
922 aarch64*-*-linux* target.
923 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
924 from linux-arm-low.c.
925 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
926 (arm_breakpoint_len, thumb_breakpoint): Likewise.
927 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
928 (thumb2_breakpoint_len): Likewise.
929 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
930 (arm_breakpoint_kinds): Likewise.
931 (arm_breakpoint_kind_from_pc): Likewise.
932 (arm_sw_breakpoint_from_kind): Likewise.
933 (arm_breakpoint_kind_from_current_state): Likewise.
934 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
935 (arm_sw_breakpoint_from_kind): Declare.
936 (arm_breakpoint_kind_from_current_state): Declare.
937 (arm_breakpoint_at): Declare.
938 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
939 arm_sw_breakpoint_from_kind if process is 32-bit.
940 (aarch64_breakpoint_kind_from_pc): New function.
941 (aarch64_breakpoint_kind_from_current_state): New function.
942 (the_low_target): Initialize fields breakpoint_kind_from_pc
943 and breakpoint_kind_from_current_state.
944 * linux-arm-low.c (arm_breakpoint_kinds): Move to
945 linux-aarch32-low.c.
946 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
947 (arm_breakpoint, arm_breakpoint_len): Likewise.
948 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
949 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
950 (arm_is_thumb_mode): Likewise.
951 (arm_breakpoint_at): Likewise.
952 (arm_breakpoint_kind_from_pc): Likewise.
953 (arm_sw_breakpoint_from_kind): Likewise.
954 (arm_breakpoint_kind_from_current_state): Likewise.
955
956 Revert:
957 2015-08-04 Yao Qi <yao.qi@linaro.org>
958
959 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
960 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
961 * server.c (extended_protocol): Remove "static".
962 * server.h (extended_protocol): Declare it.
963
ece66d65
JS
9642015-12-04 Josh Stone <jistone@redhat.com>
965
966 * target.h (struct target_ops) <arch_setup>: Rename to ...
967 (struct target_ops) <post_create_inferior>: ... this.
968 (target_arch_setup): Rename to ...
969 (target_post_create_inferior): ... this, calling post_create_inferior.
970 * server.c (start_inferior): Update target_arch_setup calls to
971 target_post_create_inferior.
972 * linux-low.c (linux_low_ptrace_options): Forward declare.
973 (linux_arch_setup): Update its comment for general use.
974 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
975 (struct linux_target_ops): Use linux_post_create_inferior.
976 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
977 to post_create_inferior.
978 * nto-low.c (struct nto_target_ops): Likewise.
979 * spu-low.c (struct spu_target_ops): Likewise.
980 * win32-low.c (struct win32_target_ops): Likewise.
981
e58c48b4
AT
9822015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
983
984 * linux-arm-low.c: Remove duplicate arch/arm.h include.
985
fbec8956
AT
9862015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
987
988 * linux-arm-low.c (arm_reinsert_addr): Remove function.
989 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
990 * linux-cris-low.c (cris_reinsert_addr> Remove function.
991 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
992 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
993 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
994 * linux-mips-low.c (mips_reinsert_addr): Remove function.
995 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
996 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
997 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
998 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
999 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1000
9b4c5f87
AT
10012015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1002
1003 * linux-low.c (linux_look_up_symbols): Don't call
1004 linux_supports_traceclone.
1005 * linux-low.h (thread_db_init): Remove use_events argument.
1006 * thread-db.c (thread_db_use_event): Remove global variable.
1007 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1008 (struct thread_db) <td_create_bp>: Remove field.
1009 (thread_db_create_event): Remove function.
1010 (thread_db_enable_reporting): Likewise.
1011 (find_one_thread): Don't check for thread_db_use_events.
1012 (attach_thread): Likewise.
1013 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1014 (try_thread_db_load_1): Don't check for thread_db_use_events.
1015 (thread_db_init): Remove use_events argument and thread events
1016 handling.
1017 (remove_thread_event_breakpoints): Remove function.
1018 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1019
7d00775e
AT
10202015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1021
1022 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1023 New function.
1024 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1025 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1026 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1027 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1028 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1029 Initialize.
1030 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1031 New function.
1032 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1033 * linux-low.c (can_hardware_single_step): Use
1034 supports_hardware_single_step.
1035 (can_software_single_step): New function.
1036 (start_step_over): Call can_software_single_step.
1037 (linux_supports_hardware_single_step): New function.
1038 (struct target_ops) <supports_software_single_step>: Initialize.
1039 * linux-low.h (struct linux_target_ops)
1040 <supports_hardware_single_step>: Initialize.
1041 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1042 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1043 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1044 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1045 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1046 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1047 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1048 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1049 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1050 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1051 Initialize.
1052 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1053 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1054 Initialize.
1055 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1056 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1057 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1058 New function.
1059 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1060 * target.h (struct target_ops): <supports_software_single_step>:
1061 New field.
1062 (target_supports_software_single_step): New macro.
1063
2d97cd35
AT
10642015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1065
1066 * linux-low.c (linux_wait_1): Fix pc advance condition.
1067 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1068 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1069
769ef81f
AT
10702015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1071
1072 * linux-arm-low.c (arm_is_thumb_mode): New function.
1073 (arm_breakpoint_at): Use arm_is_thumb_mode.
1074 (arm_breakpoint_kind_from_current_state): New function.
1075 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1076 Initialize.
1077 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1078 (linux_breakpoint_kind_from_current_state): New function.
1079 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1080 * linux-low.h (struct linux_target_ops)
1081 <breakpoint_kind_from_current_state>: New field.
1082 * target.h (struct target_ops): Likewise.
1083 (target_breakpoint_kind_from_current_state): New macro.
1084
1bebeeca
PA
10852015-11-30 Pedro Alves <palves@redhat.com>
1086
1087 * linux-low.c (linux_resume): Wake up the event loop before
1088 returning.
1089
a67a9fae
PA
10902015-11-30 Pedro Alves <palves@redhat.com>
1091
1092 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1093 check.
1094 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1095 to -1.
1096 * target.c (struct thread_search): New structure.
1097 (thread_search_callback): New function.
1098 (prev_general_thread): New global.
1099 (prepare_to_access_memory, done_accessing_memory): New functions.
1100 * target.h (prepare_to_access_memory, done_accessing_memory):
1101 Replace macros with function declarations.
1102
f2faf941
PA
11032015-11-30 Pedro Alves <palves@redhat.com>
1104
1105 PR 14618
1106 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1107 report TARGET_WAITKIND_NO_RESUMED.
1108 * remote-utils.c (prepare_resume_reply): Handle
1109 TARGET_WAITKIND_NO_RESUMED.
1110 * server.c (report_no_resumed): New global.
1111 (handle_query) <qSupported>: Handle "no-resumed+". Report
1112 "no-resumed+" support.
1113 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1114 return error if the client doesn't support no-resumed events.
1115 (push_stop_notification): New function.
1116 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1117 events if the client supports them.
1118
a681f9c9
PA
11192015-11-30 Pedro Alves <palves@redhat.com>
1120
1121 * linux-low.c (thread_still_has_status_pending_p): Don't check
1122 vCont;t here.
1123 (lwp_resumed): New function.
1124 (status_pending_p_callback): Return early if the LWP is not
1125 supposed to be resumed.
1126
65706a29
PA
11272015-11-30 Pedro Alves <palves@redhat.com>
1128
1129 * linux-low.c (handle_extended_wait): Assert that the LWP's
1130 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1131 thread create events, leave the new child's status pending.
1132 (linux_low_filter_event): If GDB wants to hear about thread exit
1133 events, leave the LWP marked dead and don't delete it.
1134 (linux_wait_for_event_filtered): Don't check for thread exit.
1135 (filter_exit_event): New function.
1136 (linux_wait_1): Use it, when returning an exit event.
1137 (linux_resume_one_lwp_throw): Assert that the LWP's
1138 waitstatus is TARGET_WAITKIND_IGNORE.
1139 * remote-utils.c (prepare_resume_reply): Handle
1140 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1141 * server.c (report_thread_events): New global.
1142 (handle_general_set): Handle QThreadEvents.
1143 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1144 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1145 TARGET_WAITKIND_THREAD_EXITED.
1146 * server.h (report_thread_events): Declare.
1147
56cf4bed
PA
11482015-11-30 Pedro Alves <palves@redhat.com>
1149
1150 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1151 the thread's last_resume_kind was resume_stop.
1152
500c1d85
PA
11532015-11-30 Pedro Alves <palves@redhat.com>
1154
1155 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1156 before returning.
1157
de979965
PA
11582015-11-30 Pedro Alves <palves@redhat.com>
1159
1160 * server.c (handle_v_requests): Handle vCtrlC.
1161
34c65914
PA
11622015-11-30 Pedro Alves <palves@redhat.com>
1163
1164 * gdbthread.h (find_any_thread_of_pid): Declare.
1165 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1166 functions.
1167 * server.c (handle_query): If current_thread is NULL, look for
1168 another thread of the selected process.
1169
79efa585 11702015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1171 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1172
1173 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1174 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1175 name in reply.
1176 * target.h (struct target_ops) <thread_name>: New field.
1177 (target_thread_name): New macro.
1178
80d82c19
JB
11792015-11-23 Joel Brobecker <brobecker@adacore.com>
1180
1181 * regcache.h (regcache_invalidate_pid): Add declaration.
1182 * regcache.c (regcache_invalidate_pid): New function, extracted
1183 from regcache_invalidate.
1184 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1185 Add trivial documentation comment.
1186 * lynx-low.c: Use regcache_invalidate_pid instead of
1187 regcache_invalidate.
1188
64da5dd5
JB
11892015-11-23 Joel Brobecker <brobecker@adacore.com>
1190
1191 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1192 and Elf64_auxv_t if the target is Android.
1193
37ce4055
DE
11942015-11-22 Doug Evans <xdje42@gmail.com>
1195
1196 * target.h: #include <sys/types.h>.
1197
06e03fff
PA
11982015-11-19 Pedro Alves <palves@redhat.com>
1199
1200 * linux-low.c (linux_process_qsupported): Change prototype.
1201 Adjust.
1202 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1203 Change prototype.
1204 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1205 and adjust to loop over all features.
1206 * server.c (handle_query) <qSupported>: Adjust to call
1207 target_process_qsupported once, passing it a vector of unprocessed
1208 features.
1209 * target.h (struct target_ops) <process_qsupported>: Change
1210 prototype.
1211 (target_process_qsupported): Adjust.
1212
9a084706
PA
12132015-11-19 Pedro Alves <palves@redhat.com>
1214
1215 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1216 mode.
1217 * configure: Regenerate.
1218
dad44a1f
PA
12192015-11-19 Pedro Alves <palves@redhat.com>
1220
1221 * configure: Regenerate.
1222
231c0592
YQ
12232015-11-19 Yao Qi <yao.qi@linaro.org>
1224
1225 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1226 type to uint32_t.
1227
6c1c9a8b
YQ
12282015-11-19 Yao Qi <yao.qi@linaro.org>
1229
1230 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1231 (struct aarch64_operand): Move enum out.
1232
9caa3311
YQ
12332015-11-19 Yao Qi <yao.qi@linaro.org>
1234
1235 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1236 struct user_fpsimd_state *.
1237 (aarch64_store_fpregset): Likewise.
1238
6a69a054
YQ
12392015-11-19 Yao Qi <yao.qi@linaro.org>
1240
1241 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1242 struct user_pt_regs *.
1243 (aarch64_store_gregset): Likewise.
1244
1798301e
PA
12452015-11-18 Pedro Alves <palves@redhat.com>
1246
1247 * Makefile.in (all_object_files): Add $IPA_OBJS.
1248
ce7715e2
PA
12492015-11-17 Pedro Alves <palves@redhat.com>
1250
1251 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1252 GDB_SIGNAL_0 and gdb_signal_to_string.
1253
c0879059
PA
12542015-11-17 Pedro Alves <palves@redhat.com>
1255
1256 * win32-low.c (handle_output_debug_string): Remove parameter.
1257 (win32_kill): Remove our_status local and adjust call to
1258 handle_output_debug_string.
1259 (get_child_debug_event): Adjust call to
1260 handle_output_debug_string.
1261
1996e237
SM
12622015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1263
1264 * linux-mips-low.c (mips_fill_gregset): Add cast.
1265 (mips_store_gregset): Likewise.
1266 (mips_fill_fpregset): Likewise.
1267 (mips_store_fpregset): Likewise.
1268
cbec665b
SM
12692015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1270
1271 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1272 priv.
1273
eb3e3c67
SM
12742015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1275
1276 * linux-mips-low.c (mips_linux_new_thread): Change type of
1277 watch_type to enum target_hw_bp_type.
1278
171de4b8
SM
12792015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1280
1281 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1282 Change return type to arm_hwbp_type.
1283
04248ead
SM
12842015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1285
1286 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1287 (arm_store_gregset): Likewise.
1288 * linux-arm-low.c (arm_get_hwcap): Likewise.
1289 (arm_read_description): Likewise.
1290
04b3479c
SM
12912015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1292
1293 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1294
2bc84e8a
SM
12952015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1296
1297 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1298 (ppc_fill_vsxregset): Likewise.
1299 (ppc_store_vsxregset): Likewise.
1300 (ppc_fill_vrregset): Likewise.
1301 (ppc_store_vrregset): Likewise.
1302 (ppc_fill_evrregset): Likewise.
1303 (ppc_store_evrregset): Likewise.
1304
e6c5bb05
SM
13052015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1306
1307 * linux-ppc-low.c (ppc_usrregs_info): Remove
1308 forward-declaration.
1309 (ppc_arch_setup): Move lower in file.
1310
7ea45d72
SM
13112015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1312
1313 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1314 (ps_pdwrite): Likewise.
1315
69291610
HW
13162015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1317
1318 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1319 to after assert checks.
1320
b42945fd
SM
13212015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1322
1323 * proc-service.c (ps_pdread): Add/adjust casts.
1324 (ps_pdwrite): Add/adjust casts.
1325
d6f85c84
SM
13262015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1327
1328 * server.c (handle_search_memory_1): Cast return value of
1329 memmem.
1330
f98cd059
SM
13312015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1332
1333 * server.c (write_qxfer_response): Change type of data to
1334 gdb_byte *.
1335
d2412fa5
PA
13362015-10-29 Pedro Alves <palves@redhat.com>
1337
1338 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1339
c17414a2
PA
13402015-10-29 Pedro Alves <palves@redhat.com>
1341
1342 * tracepoint.c (clear_installed_tracepoints): Add casts.
1343
e053fbc4
PA
13442015-10-29 Pedro Alves <palves@redhat.com>
1345
1346 * server.c (handle_v_cont, process_serial_event): Add enum
1347 gdb_signal casts to signal parsing code.
1348
add67df8
PA
13492015-10-29 Pedro Alves <palves@redhat.com>
1350
1351 * linux-low.h (NULL_REGSET): Define.
1352 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1353 * linux-arm-low.c (arm_regsets): Likewise.
1354 * linux-crisv32-low.c (cris_regsets): Likewise.
1355 * linux-m68k-low.c (m68k_regsets): Likewise.
1356 * linux-mips-low.c (mips_regsets): Likewise.
1357 * linux-nios2-low.c (nios2_regsets): Likewise.
1358 * linux-ppc-low.c (ppc_regsets): Likewise.
1359 * linux-s390-low.c (s390_regsets): Likewise.
1360 * linux-sh-low.c (sh_regsets): Likewise.
1361 * linux-sparc-low.c (sparc_regsets): Likewise.
1362 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1363 * linux-tile-low.c (tile_regsets): Likewise.
1364 * linux-x86-low.c (x86_regsets): Likewise.
1365 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1366
50bc912a
PA
13672015-10-29 Pedro Alves <palves@redhat.com>
1368
1369 * linux-low.h (NULL_REGSET): Define.
1370 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1371 * linux-arm-low.c (arm_regsets): Likewise.
1372 * linux-crisv32-low.c (cris_regsets): Likewise.
1373 * linux-m68k-low.c (m68k_regsets): Likewise.
1374 * linux-mips-low.c (mips_regsets): Likewise.
1375 * linux-nios2-low.c (nios2_regsets): Likewise.
1376 * linux-ppc-low.c (ppc_regsets): Likewise.
1377 * linux-s390-low.c (s390_regsets): Likewise.
1378 * linux-sh-low.c (sh_regsets): Likewise.
1379 * linux-sparc-low.c (sparc_regsets): Likewise.
1380 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1381 * linux-tile-low.c (tile_regsets): Likewise.
1382 * linux-x86-low.c (x86_regsets): Likewise.
1383 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1384
682b2546
DE
13852015-10-26 Doug Evans <dje@google.com>
1386
1387 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1388
963843d4
DE
13892015-10-26 Doug Evans <dje@google.com>
1390
1391 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1392
d41401ac
DE
13932015-10-26 Doug Evans <dje@google.com>
1394
1395 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1396 for debug_printf.
1397 (attach_thread, find_new_threads_callback): Ditto.
1398
3db28855
AT
13992015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1400
1401 * mem-break.h (set_breakpoint_data): Remove.
1402
fb78e89c
AT
14032015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1404
1405 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1406 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1407 (initialize_low): Remove set_breakpoint_data call.
1408 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1409 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1410 (initialize_low): Remove set_breakpoint_data call.
1411 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1412 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1413 (initialize_low): Remove set_breakpoint_data call.
1414
2e6ee069
AT
14152015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1416
1417 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1418 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1419 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1420 * target.h (target_breakpoint_kind_from_pc): New macro.
1421
1652a986
AT
14222015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1423
1424 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1425 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1426 the default breakpoint kind.
1427
abeead09
AT
14282015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1429
1430 * linux-arm-low.c (arm_supports_z_point_type): Add software
1431 breakpoint support.
1432
b0b4b501
AT
14332015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1434
1435 * linux-arm-low.c: Refactor breakpoint definitions.
1436 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1437 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1438
8689682c
AT
14392015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1440
1441 * Makefile.in: Add arm.c/o.
1442 * configure.srv: Likewise.
1443 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1444 (arm_breakpoint_kind_from_pc): New function.
1445 (arm_sw_breakpoint_from_kind): Return proper kind.
1446 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1447
27165294
AT
14482015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1449
1450 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1451 removal.
1452 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1453 (struct raw_breakpoint) <size>: Remove.
1454 (struct raw_breakpoint) <kind>: Add.
1455 (bp_size): New function.
1456 (bp_opcode): Likewise.
1457 (find_raw_breakpoint_at): Adjust for kind.
1458 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1459 (remove_memory_breakpoint): Adjust for kind call bp_size.
1460 (set_raw_breakpoint_at): Adjust for kind.
1461 (set_breakpoint): Likewise.
1462 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1463 (delete_raw_breakpoint): Adjust for kind.
1464 (delete_breakpoint): Likewise.
1465 (find_gdb_breakpoint): Likewise.
1466 (set_gdb_breakpoint_1): Likewise.
1467 (set_gdb_breakpoint): Likewise.
1468 (delete_gdb_breakpoint_1): Likewise.
1469 (delete_gdb_breakpoint): Likewise.
1470 (uninsert_raw_breakpoint): Likewise.
1471 (reinsert_raw_breakpoint): Likewise.
1472 (set_breakpoint_data): Remove.
1473 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1474 (check_mem_read): Adjust for kind call bp_size.
1475 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1476 (clone_one_breakpoint): Adjust for kind.
1477 * mem-break.h (set_gdb_breakpoint): Likewise.
1478 (delete_gdb_breakpoint): Likewise.
1479 * server.c (process_serial_event): Likewise.
1480
dd373349
AT
14812015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1482
1483 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1484 (struct linux_target_ops) <breakpoint>: Remove.
1485 (struct linux_target_ops) <breakpoint_len>: Remove.
1486 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1487 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1488 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1489 (arm_sw_breakpoint_from_kind): New function.
1490 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1491 (struct linux_target_ops) <breakpoint>: Remove.
1492 (struct linux_target_ops) <breakpoint_len>: Remove.
1493 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1494 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1495 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1496 (struct linux_target_ops) <breakpoint>: Remove.
1497 (struct linux_target_ops) <breakpoint_len>: Remove.
1498 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1499 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1500 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1501 (struct linux_target_ops) <breakpoint>: Remove.
1502 (struct linux_target_ops) <breakpoint_len>: Remove.
1503 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1504 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1505 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1506 and sw_breakpoint_from_kind to increment the pc.
1507 (linux_breakpoint_kind_from_pc): New function.
1508 (linux_sw_breakpoint_from_kind): New function.
1509 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1510 (initialize_low): Call breakpoint_kind_from_pc and
1511 sw_breakpoint_from_kind to replace breakpoint_data/len.
1512 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1513 New field.
1514 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1515 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1516 (struct linux_target_ops) <breakpoint>: Remove.
1517 (struct linux_target_ops) <breakpoint_len>: Remove.
1518 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1519 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1520 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1521 (struct linux_target_ops) <breakpoint>: Remove.
1522 (struct linux_target_ops) <breakpoint_len>: Remove.
1523 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1524 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1525 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1526 (struct linux_target_ops) <breakpoint>: Remove.
1527 (struct linux_target_ops) <breakpoint_len>: Remove.
1528 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1529 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1530 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1531 (struct linux_target_ops) <breakpoint>: Remove.
1532 (struct linux_target_ops) <breakpoint_len>: Remove.
1533 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1534 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1535 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1536 (struct linux_target_ops) <breakpoint>: Remove.
1537 (struct linux_target_ops) <breakpoint_len>: Remove.
1538 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1539 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1540 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1541 (struct linux_target_ops) <breakpoint>: Remove.
1542 (struct linux_target_ops) <breakpoint_len>: Remove.
1543 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1544 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1545 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1546 (struct linux_target_ops) <breakpoint>: Remove.
1547 (struct linux_target_ops) <breakpoint_len>: Remove.
1548 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1549 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1550 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1551 (struct linux_target_ops) <breakpoint>: Remove.
1552 (struct linux_target_ops) <breakpoint_len>: Remove.
1553 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1554 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1555 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1556 (struct linux_target_ops) <breakpoint>: Remove.
1557 (struct linux_target_ops) <breakpoint_len>: Remove.
1558 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1559 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1560 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1561 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1562 (struct linux_target_ops) <breakpoint>: Remove.
1563 (struct linux_target_ops) <breakpoint_len>: Remove.
1564 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1565 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1566 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1567 (struct linux_target_ops) <breakpoint>: Remove.
1568 (struct linux_target_ops) <breakpoint_len>: Remove.
1569 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1570 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1571
4cd98a19
AT
15722015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1573
1574 * linux-cris-low.c (cris_get_pc): Remove void arg.
1575
774ee6d2
AR
15762015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1577
1578 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1579 variable name.
1580
833dcd29
AR
15812015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1582
1583 * inferiors.c (thread_pid_matches_callback): New function.
1584 (find_thread_process): New function.
1585 (remove_thread): Reset current_thread.
1586 (remove_process): Assert threads have been removed first.
1587
8d689ee5
YQ
15882015-10-15 Yao Qi <yao.qi@linaro.org>
1589
1590 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1591 if it is 3.
1592 (aarch64_remove_point): Likewise.
1593 * regcache.c (regcache_register_size): New function.
1594
1c2e1515
YQ
15952015-10-12 Yao Qi <yao.qi@linaro.org>
1596
1597 * linux-aarch64-low.c: Update all callers as emit_load_store
1598 is renamed to aarch64_emit_load_store.
1599
e1c587c3
YQ
16002015-10-12 Yao Qi <yao.qi@linaro.org>
1601
1602 * linux-aarch64-low.c: Update all callers of function renaming
1603 from emit_insn to aarch64_emit_insn.
1604
b6542f81
YQ
16052015-10-12 Yao Qi <yao.qi@linaro.org>
1606
1607 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1608 arch/aarch64-insn.h.
1609 (struct aarch64_memory_operand): Likewise.
1610 (ENCODE): Likewise.
1611 (emit_insn): Move to arch/aarch64-insn.c.
1612 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1613 (emit_load_store): Move to arch/aarch64-insn.c.
1614 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1615 (can_encode_int32): Remove.
1616
246994ce
YQ
16172015-10-12 Yao Qi <yao.qi@linaro.org>
1618
1619 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1620 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1621 (aarch64_relocate_instruction): Likewise.
1622 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1623 (struct aarch64_insn_visitor): Likewise.
1624
0badd99f
YQ
16252015-10-12 Yao Qi <yao.qi@linaro.org>
1626
1627 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1628 (struct aarch64_insn_visitor): New.
1629 (struct aarch64_insn_relocation_data): New.
1630 (aarch64_ftrace_insn_reloc_b): New function.
1631 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1632 (aarch64_ftrace_insn_reloc_cb): Likewise.
1633 (aarch64_ftrace_insn_reloc_tb): Likewise.
1634 (aarch64_ftrace_insn_reloc_adr): Likewise.
1635 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1636 (aarch64_ftrace_insn_reloc_others): Likewise.
1637 (visitor): New.
1638 (aarch64_relocate_instruction): Use visitor.
1639
dfaffe9d
YQ
16402015-10-12 Yao Qi <yao.qi@linaro.org>
1641
1642 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1643 int. Add argument buf.
1644 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1645 aarch64_relocate_instruction.
1646
70b439f0
YQ
16472015-10-12 Yao Qi <yao.qi@linaro.org>
1648
1649 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1650 argument insn. Remove local variable insn. Don't call
1651 target_read_uint32.
1652 (aarch64_install_fast_tracepoint_jump_pad): Call
1653 target_read_uint32.
1654
7781c06f
YQ
16552015-09-30 Yao Qi <yao.qi@linaro.org>
1656
1657 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1658 (emit_load_store_pair): Likewise.
1659
9a3c8263
SM
16602015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1661
1662 * dll.c (match_dll): Add cast(s).
1663 (unloaded_dll): Likewise.
1664 * linux-low.c (second_thread_of_pid_p): Likewise.
1665 (delete_lwp_callback): Likewise.
1666 (count_events_callback): Likewise.
1667 (select_event_lwp_callback): Likewise.
1668 (linux_set_resume_request): Likewise.
1669 * server.c (accumulate_file_name_length): Likewise.
1670 (emit_dll_description): Likewise.
1671 (handle_qxfer_threads_worker): Likewise.
1672 (visit_actioned_threads): Likewise.
1673 * thread-db.c (any_thread_of): Likewise.
1674 * tracepoint.c (same_process_p): Likewise.
1675 (match_blocktype): Likewise.
1676 (build_traceframe_info_xml): Likewise.
1677
224c3ddb
SM
16782015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1679
1680 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1681 assignment.
1682 (gdb_unparse_agent_expr): Likewise.
1683 * hostio.c (require_data): Likewise.
1684 (handle_pread): Likewise.
1685 * linux-low.c (disable_regset): Likewise.
1686 (fetch_register): Likewise.
1687 (store_register): Likewise.
1688 (get_dynamic): Likewise.
1689 (linux_qxfer_libraries_svr4): Likewise.
1690 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1691 (set_fast_tracepoint_jump): Likewise.
1692 (uninsert_fast_tracepoint_jumps_at): Likewise.
1693 (reinsert_fast_tracepoint_jumps_at): Likewise.
1694 (validate_inserted_breakpoint): Likewise.
1695 (clone_agent_expr): Likewise.
1696 * regcache.c (init_register_cache): Likewise.
1697 * remote-utils.c (putpkt_binary_1): Likewise.
1698 (decode_M_packet): Likewise.
1699 (decode_X_packet): Likewise.
1700 (look_up_one_symbol): Likewise.
1701 (relocate_instruction): Likewise.
1702 (monitor_output): Likewise.
1703 * server.c (handle_search_memory): Likewise.
1704 (handle_qxfer_exec_file): Likewise.
1705 (handle_qxfer_libraries): Likewise.
1706 (handle_qxfer): Likewise.
1707 (handle_query): Likewise.
1708 (handle_v_cont): Likewise.
1709 (handle_v_run): Likewise.
1710 (captured_main): Likewise.
1711 * target.c (write_inferior_memory): Likewise.
1712 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1713 * tracepoint.c (init_trace_buffer): Likewise.
1714 (add_tracepoint_action): Likewise.
1715 (add_traceframe): Likewise.
1716 (add_traceframe_block): Likewise.
1717 (cmd_qtdpsrc): Likewise.
1718 (cmd_qtdv): Likewise.
1719 (cmd_qtstatus): Likewise.
1720 (response_source): Likewise.
1721 (response_tsv): Likewise.
1722 (cmd_qtnotes): Likewise.
1723 (gdb_collect): Likewise.
1724 (initialize_tracepoint): Likewise.
1725
afbe19f8
PL
17262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1727
1728 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1729 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1730 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1731 <NOP>: New.
1732 (enum aarch64_condition_codes): New enum.
1733 (w0): New static global.
1734 (fp): Likewise.
1735 (lr): Likewise.
1736 (struct aarch64_memory_operand) <type>: New
1737 MEMORY_OPERAND_POSTINDEX type.
1738 (postindex_memory_operand): New helper function.
1739 (emit_ret): New function.
1740 (emit_load_store_pair): New function, factored out of emit_stp
1741 with support for MEMORY_OPERAND_POSTINDEX.
1742 (emit_stp): Rewrite using emit_load_store_pair.
1743 (emit_ldp): New function.
1744 (emit_load_store): Likewise.
1745 (emit_ldr): Mention post-index instruction in comment.
1746 (emit_ldrh): New function.
1747 (emit_ldrb): New function.
1748 (emit_ldrsw): Mention post-index instruction in comment.
1749 (emit_str): Likewise.
1750 (emit_subs): New function.
1751 (emit_cmp): Likewise.
1752 (emit_and): Likewise.
1753 (emit_orr): Likewise.
1754 (emit_orn): Likewise.
1755 (emit_eor): Likewise.
1756 (emit_mvn): Likewise.
1757 (emit_lslv): Likewise.
1758 (emit_lsrv): Likewise.
1759 (emit_asrv): Likewise.
1760 (emit_mul): Likewise.
1761 (emit_sbfm): Likewise.
1762 (emit_sbfx): Likewise.
1763 (emit_ubfm): Likewise.
1764 (emit_ubfx): Likewise.
1765 (emit_csinc): Likewise.
1766 (emit_cset): Likewise.
1767 (emit_nop): Likewise.
1768 (emit_ops_insns): New helper function.
1769 (emit_pop): Likewise.
1770 (emit_push): Likewise.
1771 (aarch64_emit_prologue): New function.
1772 (aarch64_emit_epilogue): Likewise.
1773 (aarch64_emit_add): Likewise.
1774 (aarch64_emit_sub): Likewise.
1775 (aarch64_emit_mul): Likewise.
1776 (aarch64_emit_lsh): Likewise.
1777 (aarch64_emit_rsh_signed): Likewise.
1778 (aarch64_emit_rsh_unsigned): Likewise.
1779 (aarch64_emit_ext): Likewise.
1780 (aarch64_emit_log_not): Likewise.
1781 (aarch64_emit_bit_and): Likewise.
1782 (aarch64_emit_bit_or): Likewise.
1783 (aarch64_emit_bit_xor): Likewise.
1784 (aarch64_emit_bit_not): Likewise.
1785 (aarch64_emit_equal): Likewise.
1786 (aarch64_emit_less_signed): Likewise.
1787 (aarch64_emit_less_unsigned): Likewise.
1788 (aarch64_emit_ref): Likewise.
1789 (aarch64_emit_if_goto): Likewise.
1790 (aarch64_emit_goto): Likewise.
1791 (aarch64_write_goto_address): Likewise.
1792 (aarch64_emit_const): Likewise.
1793 (aarch64_emit_call): Likewise.
1794 (aarch64_emit_reg): Likewise.
1795 (aarch64_emit_pop): Likewise.
1796 (aarch64_emit_stack_flush): Likewise.
1797 (aarch64_emit_zero_ext): Likewise.
1798 (aarch64_emit_swap): Likewise.
1799 (aarch64_emit_stack_adjust): Likewise.
1800 (aarch64_emit_int_call_1): Likewise.
1801 (aarch64_emit_void_call_2): Likewise.
1802 (aarch64_emit_eq_goto): Likewise.
1803 (aarch64_emit_ne_goto): Likewise.
1804 (aarch64_emit_lt_goto): Likewise.
1805 (aarch64_emit_le_goto): Likewise.
1806 (aarch64_emit_gt_goto): Likewise.
1807 (aarch64_emit_ge_got): Likewise.
1808 (aarch64_emit_ops_impl): New static global variable.
1809 (aarch64_emit_ops): New target function, return
1810 &aarch64_emit_ops_impl.
1811 (struct linux_target_ops): Install it.
1812
bb903df0
PL
18132015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1814
1815 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1816 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1817 aarch64-ipa.o.
1818 * linux-aarch64-ipa.c: New file.
1819 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1820 and endian.h.
1821 (aarch64_get_thread_area): New target method.
1822 (extract_signed_bitfield): New helper function.
1823 (aarch64_decode_ldr_literal): New function.
1824 (enum aarch64_opcodes): New enum.
1825 (struct aarch64_register): New struct.
1826 (struct aarch64_operand): New struct.
1827 (x0): New static global.
1828 (x1): Likewise.
1829 (x2): Likewise.
1830 (x3): Likewise.
1831 (x4): Likewise.
1832 (w2): Likewise.
1833 (ip0): Likewise.
1834 (sp): Likewise.
1835 (xzr): Likewise.
1836 (aarch64_register): New helper function.
1837 (register_operand): Likewise.
1838 (immediate_operand): Likewise.
1839 (struct aarch64_memory_operand): New struct.
1840 (offset_memory_operand): New helper function.
1841 (preindex_memory_operand): Likewise.
1842 (enum aarch64_system_control_registers): New enum.
1843 (ENCODE): New macro.
1844 (emit_insn): New helper function.
1845 (emit_b): New function.
1846 (emit_bcond): Likewise.
1847 (emit_cb): Likewise.
1848 (emit_tb): Likewise.
1849 (emit_blr): Likewise.
1850 (emit_stp): Likewise.
1851 (emit_ldp_q_offset): Likewise.
1852 (emit_stp_q_offset): Likewise.
1853 (emit_load_store): Likewise.
1854 (emit_ldr): Likewise.
1855 (emit_ldrsw): Likewise.
1856 (emit_str): Likewise.
1857 (emit_ldaxr): Likewise.
1858 (emit_stxr): Likewise.
1859 (emit_stlr): Likewise.
1860 (emit_data_processing_reg): Likewise.
1861 (emit_data_processing): Likewise.
1862 (emit_add): Likewise.
1863 (emit_sub): Likewise.
1864 (emit_mov): Likewise.
1865 (emit_movk): Likewise.
1866 (emit_mov_addr): Likewise.
1867 (emit_mrs): Likewise.
1868 (emit_msr): Likewise.
1869 (emit_sevl): Likewise.
1870 (emit_wfe): Likewise.
1871 (append_insns): Likewise.
1872 (can_encode_int32_in): New helper function.
1873 (aarch64_relocate_instruction): New function.
1874 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1875 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1876 (struct linux_target_ops): Install aarch64_get_thread_area,
1877 aarch64_install_fast_tracepoint_jump_pad and
1878 aarch64_get_min_fast_tracepoint_insn_len.
1879
787749ea
PL
18802015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1881
1882 * Makefile.in (aarch64-insn.o): New rule.
1883 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1884
9812b2e6
YQ
18852015-09-21 Yao Qi <yao.qi@linaro.org>
1886
1887 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1888
18fe412b
YQ
18892015-09-21 Yao Qi <yao.qi@linaro.org>
1890
1891 * tracepoint.c (max_jump_pad_size): Remove.
1892
a0cc84cd
YQ
18932015-09-18 Yao Qi <yao.qi@linaro.org>
1894
1895 * linux-aarch64-low.c: Don't include sys/uio.h.
1896 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1897
d78908cf
WW
18982015-09-16 Wei-cheng Wang <cole945@gmail.com>
1899
1900 * tracepoint.c (eval_result_type): Change prototype.
1901 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1902
d57e0d50
PA
19032015-09-15 Pedro Alves <palves@redhat.com>
1904
1905 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1906 Check whether to report exec events instead of checking whether
1907 multiprocess is enabled.
1908
5a676acc
PA
19092015-09-15 Pedro Alves <palves@redhat.com>
1910
1911 PR remote/18965
1912 * remote-utils.c (prepare_resume_reply): Merge
1913 TARGET_WAITKIND_VFORK_DONE switch case with the
1914 TARGET_WAITKIND_FORKED case.
1915
7c5d0fad
YQ
19162015-09-15 Yao Qi <yao.qi@linaro.org>
1917
1918 * server.c (handle_query): Check string comparison using
1919 "else if" instead of "if".
1920
750ce8d1
YQ
19212015-09-15 Yao Qi <yao.qi@linaro.org>
1922
1923 * server.c (vCont_supported): New global variable.
1924 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1925 matches. Append ";vContSupported+" to own_buf.
1926 (handle_v_requests): Append ";s;S" to own_buf if target supports
1927 hardware single step or vCont_supported is false.
1928 (capture_main): Set vCont_supported to zero.
1929
70b90b91
YQ
19302015-09-15 Yao Qi <yao.qi@linaro.org>
1931
1932 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1933 it to ...
1934 (linux_supports_hardware_single_step): ... New function.
1935 (linux_target_ops): Update.
1936 * lynx-low.c (lynx_target_ops): Set field
1937 supports_hardware_single_step to target_can_do_hardware_single_step.
1938 * nto-low.c (nto_target_ops): Likewise.
1939 * spu-low.c (spu_target_ops): Likewise.
1940 * win32-low.c (win32_target_ops): Likewise.
1941 * target.c (target_can_do_hardware_single_step): New function.
1942 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1943 Remove. <supports_hardware_single_step>: New field.
1944 (target_supports_conditional_breakpoints): Remove.
1945 (target_supports_hardware_single_step): New macro.
1946 (target_can_do_hardware_single_step): Declare.
1947 * server.c (handle_query): Use target_supports_hardware_single_step
1948 instead of target_supports_conditional_breakpoints.
1949
ade90bde
YQ
19502015-09-15 Yao Qi <yao.qi@linaro.org>
1951
1952 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1953 function.
1954 (struct linux_target_ops the_low_target): Install
1955 aarch64_linux_siginfo_fixup.
1956
94585166
DB
19572015-09-11 Don Breazeal <donb@codesourcery.com>
1958 Luis Machado <lgustavo@codesourcery.com>
1959
1960 * linux-low.c (linux_mourn): Static declaration.
1961 (linux_arch_setup): Move in front of
1962 handle_extended_wait.
1963 (linux_arch_setup_thread): New function.
1964 (handle_extended_wait): Handle exec events. Call
1965 linux_arch_setup_thread. Make event_lwp argument a
1966 pointer-to-a-pointer.
1967 (check_zombie_leaders): Do not check stopped threads.
1968 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1969 (linux_low_filter_event): Add lwp and thread for exec'ing
1970 non-leader thread if leader thread has been deleted.
1971 Refactor code into linux_arch_setup_thread and call it.
1972 Pass child lwp pointer by reference to handle_extended_wait.
1973 (linux_wait_for_event_filtered): Update comment.
1974 (linux_wait_1): Prevent clobbering exec event status.
1975 (linux_supports_exec_events): New function.
1976 (linux_target_ops) <supports_exec_events>: Initialize new member.
1977 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1978 new member.
1979 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1980 * server.c (report_exec_events): New global variable.
1981 (handle_query): Handle qSupported query for exec-events feature.
1982 (captured_main): Initialize report_exec_events.
1983 * server.h (report_exec_events): Declare new global variable.
1984 * target.h (struct target_ops) <supports_exec_events>: New
1985 member.
1986 (target_supports_exec_events): New macro.
1987 * win32-low.c (win32_target_ops) <supports_exec_events>:
1988 Initialize new member.
1989
0568462b
MM
19902015-09-09 Markus Metzger <markus.t.metzger@intel.com>
1991
1992 * linux-low.c (linux_low_enable_btrace): Remove.
1993 (linux_target_ops): Replace linux_low_enable_btrace with
1994 linux_enable_btrace.
1995
39edd165
YQ
19962015-09-03 Yao Qi <yao.qi@linaro.org>
1997
1998 * linux-aarch64-low.c (aarch64_insert_point): Call
1999 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2000 returns true.
2001
1db33b5a
UW
20022015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2003
2004 * linux-low.c (check_stopped_by_breakpoint): Use
2005 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2006
ab290430
PA
20072015-08-27 Pedro Alves <palves@redhat.com>
2008
2009 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2010
8d749320
SM
20112015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2012
6711b7f8
SM
2013 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2014 the XNEW-family equivalent.
8d749320
SM
2015 (compile_bytecodes): Likewise.
2016 * dll.c (loaded_dll): Likewise.
2017 * event-loop.c (append_callback_event): Likewise.
2018 (create_file_handler): Likewise.
2019 (create_file_event): Likewise.
2020 * hostio.c (handle_open): Likewise.
2021 * inferiors.c (add_thread): Likewise.
2022 (add_process): Likewise.
2023 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2024 * linux-arm-low.c (arm_new_process): Likewise.
2025 (arm_new_thread): Likewise.
2026 * linux-low.c (add_to_pid_list): Likewise.
2027 (linux_add_process): Likewise.
2028 (handle_extended_wait): Likewise.
2029 (add_lwp): Likewise.
2030 (enqueue_one_deferred_signal): Likewise.
2031 (enqueue_pending_signal): Likewise.
2032 (linux_resume_one_lwp_throw): Likewise.
2033 (linux_resume_one_thread): Likewise.
2034 (linux_read_memory): Likewise.
2035 (linux_write_memory): Likewise.
2036 * linux-mips-low.c (mips_linux_new_process): Likewise.
2037 (mips_linux_new_thread): Likewise.
2038 (mips_add_watchpoint): Likewise.
2039 * linux-x86-low.c (initialize_low_arch): Likewise.
2040 * lynx-low.c (lynx_add_process): Likewise.
2041 * mem-break.c (set_raw_breakpoint_at): Likewise.
2042 (set_breakpoint): Likewise.
2043 (add_condition_to_breakpoint): Likewise.
2044 (add_commands_to_breakpoint): Likewise.
2045 (clone_agent_expr): Likewise.
2046 (clone_one_breakpoint): Likewise.
2047 * regcache.c (new_register_cache): Likewise.
2048 * remote-utils.c (look_up_one_symbol): Likewise.
2049 * server.c (queue_stop_reply): Likewise.
2050 (start_inferior): Likewise.
2051 (queue_stop_reply_callback): Likewise.
2052 (handle_target_event): Likewise.
2053 * spu-low.c (fetch_ppc_memory): Likewise.
2054 (store_ppc_memory): Likewise.
2055 * target.c (set_target_ops): Likewise.
2056 * thread-db.c (thread_db_load_search): Likewise.
2057 (try_thread_db_load_1): Likewise.
2058 * tracepoint.c (add_tracepoint): Likewise.
2059 (add_tracepoint_action): Likewise.
2060 (create_trace_state_variable): Likewise.
2061 (cmd_qtdpsrc): Likewise.
2062 (cmd_qtro): Likewise.
2063 (add_while_stepping_state): Likewise.
2064 * win32-low.c (child_add_thread): Likewise.
2065 (get_image_name): Likewise.
2066
ed8b7b42
YQ
20672015-08-25 Yao Qi <yao.qi@linaro.org>
2068
2069 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2070
db3cb7cb
YQ
20712015-08-25 Yao Qi <yao.qi@linaro.org>
2072
2073 * Makefile.in (aarch64-linux.o): New rule.
2074 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2075 srv_tgtobj.
2076 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2077 (aarch64_init_debug_reg_state): Make it extern.
2078 (aarch64_linux_prepare_to_resume): Remove.
2079
f6011a1c
YQ
20802015-08-25 Yao Qi <yao.qi@linaro.org>
2081
2082 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2083 lwp_arch_private_info and ptid_of_lwp.
2084
88e2cf7e
YQ
20852015-08-25 Yao Qi <yao.qi@linaro.org>
2086
2087 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2088 Find proc_info by find_process_pid. All callers updated.
2089
5e35436e
YQ
20902015-08-25 Yao Qi <yao.qi@linaro.org>
2091
2092 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2093 Remove.
2094 (debug_reg_change_callback): Remove.
2095 (aarch64_notify_debug_reg_change): Remove.
2096
4a8a7965
YQ
20972015-08-25 Yao Qi <yao.qi@linaro.org>
2098
2099 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2100 Call current_lwp_ptid.
2101
32a271ee
YQ
21022015-08-25 Yao Qi <yao.qi@linaro.org>
2103
2104 * linux-aarch64-low.c (debug_reg_change_callback): Use
2105 debug_printf.
2106
0d51c8d7
YQ
21072015-08-25 Yao Qi <yao.qi@linaro.org>
2108
2109 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2110
31a43dd5
YQ
21112015-08-25 Yao Qi <yao.qi@linaro.org>
2112
2113 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2114
8ee52567
YQ
21152015-08-25 Yao Qi <yao.qi@linaro.org>
2116
2117 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2118 the code.
2119
ff3f0f45
YQ
21202015-08-25 Yao Qi <yao.qi@linaro.org>
2121
2122 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2123 Remove.
2124 (debug_reg_change_callback): Remove argument entry and add argument
2125 lwp. Remove local variable thread. Don't print thread id in the
2126 debugging output. Don't check whether pid of thread equals to pid.
2127 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2128 iterate_over_lwps instead find_inferior.
2129
3d40fbb5
PA
21302015-08-24 Pedro Alves <palves@redhat.com>
2131
2132 * inferiors.c (get_first_process): New function.
2133 * inferiors.h (get_first_process): New declaration.
2134 * remote-utils.c (read_ptid): Default to the first process in the
2135 list, instead of to the current thread's process.
2136
438e1e42
PA
21372015-08-24 Pedro Alves <palves@redhat.com>
2138
2139 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2140 * event-loop.c: Likewise.
2141 * remote-utils.c: Likewise.
2142 * tracepoint.c: Likewise.
2143
a8c6d4fc
PA
21442015-08-24 Pedro Alves <palves@redhat.com>
2145
2146 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2147 ptid_get_lwp.
2148
99b0bb12
PA
21492015-08-21 Pedro Alves <palves@redhat.com>
2150
2151 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2152 instead of literal 1.
2153
f8904751
PA
21542015-08-21 Pedro Alves <palves@redhat.com>
2155
2156 * tdesc.c (default_description): Explicitly zero-initialize.
2157
465a859e
PA
21582015-08-21 Pedro Alves <palves@redhat.com>
2159
2160 PR gdb/18749
2161 * inferiors.c (remove_thread): Discard any pending stop reply for
2162 this thread.
2163 * server.c (remove_all_on_match_pid): Rename to ...
2164 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2165 instead of a pid.
2166 (discard_queued_stop_replies): Change parameter to a ptid. Now
2167 extern.
2168 (handle_v_kill, kill_inferior_callback, captured_main)
2169 (process_serial_event): Adjust.
2170 * server.h (discard_queued_stop_replies): Declare.
2171
f0db101d
PA
21722015-08-21 Pedro Alves <palves@redhat.com>
2173
2174 * linux-low.c (wait_for_sigstop): Always switch to no thread
2175 selected if the previously current thread dies.
2176 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2177 process instead of the current thread's.
2178 * remote-utils.c (input_interrupt): Don't check if there's no
2179 current thread.
2180 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2181 current thread to the general thread fails, error out.
2182 (handle_qxfer_auxv, handle_qxfer_libraries)
2183 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2184 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2185 (handle_query): Check if there's a thread selected instead of
2186 checking whether there's any thread in the thread list.
2187 (handle_qxfer_threads, handle_qxfer_btrace)
2188 (handle_qxfer_btrace_conf): Don't error out early if there's no
2189 thread in the thread list.
2190 (handle_v_cont, myresume): Don't set the current thread to the
2191 continue thread.
2192 (process_serial_event) <Hg handling>: Also set thread_id if the
2193 previous general thread is still alive.
2194 (process_serial_event) <g/G handling>: If setting the current
2195 thread to the general thread fails, error out.
2196 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2197 thread's lwp instead of the current thread's.
2198 * target.c (set_desired_thread): If the desired thread was not
2199 found, leave the current thread pointing to NULL. Return an int
2200 (boolean) indicating success.
2201 * target.h (set_desired_thread): Change return type to int.
2202
40045d91
MF
22032015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2204
2205 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2206 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2207 #includes.
2208 (ps_get_thread_area): New function.
2209
45face3b
GB
22102015-08-19 Gary Benson <gbenson@redhat.com>
2211
2212 * hostio.c (handle_pread): Do not attempt to read more data
2213 than hostio_reply_with_data can fit in a packet.
2214
16d5f642
JB
22152015-08-18 Joel Brobecker <brobecker@adacore.com>
2216
2217 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2218
a738da3a
MF
22192015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2220
2221 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2222
33ebda9d
PA
22232015-08-06 Pedro Alves <palves@redhat.com>
2224
2225 * tracepoint.c (expr_eval_result): Now an int.
2226
a44892be
PA
22272015-08-06 Pedro Alves <palves@redhat.com>
2228
2229 * gdbthread.h (struct regcache): Forward declare.
2230 (struct thread_info) <regcache_data>: Now a struct regcache
2231 pointer.
2232 * inferiors.c (inferior_regcache_data)
2233 (set_inferior_regcache_data): Now work with struct regcache
2234 pointers.
2235 * inferiors.h (struct regcache): Forward declare.
2236 (inferior_regcache_data, set_inferior_regcache_data): Now work
2237 with struct regcache pointers.
2238 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2239 (free_register_cache_thread): Remove struct regcache pointer
2240 casts.
2241
608a1e46
PA
22422015-08-06 Pedro Alves <palves@redhat.com>
2243
2244 * server.c (captured_main): On error, print the exception message
2245 to stderr, and if run_once is set, throw a quit.
2246
f0ce0d3a
PA
22472015-08-06 Pedro Alves <palves@redhat.com>
2248
2249 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2250 the current thread.
2251
bf47e248
PA
22522015-08-06 Pedro Alves <palves@redhat.com>
2253
2254 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2255 reading beyond the passed in buffer length.
2256
b6b9ffcc
PL
22572015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2258
2259 * tracepoint.c (symbol_list) <required>: Remove.
2260
863d01bd
PA
22612015-08-06 Pedro Alves <palves@redhat.com>
2262
2263 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2264 count if stopping and suspending threads.
2265 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2266 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2267 (linux_detach): Complete an ongoing step-over.
2268 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2269 throughout.
2270 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2271 (linux_wait_1): If passing a signal to the inferior after
2272 finishing a step-over, unsuspend and re-resume all lwps. If we
2273 see a single-step event but the thread should be continuing, don't
2274 pass the trap to gdb.
2275 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2276 internal_error instead of gdb_assert.
2277 (enqueue_pending_signal): New function.
2278 (check_ptrace_stopped_lwp_gone): Add debug output.
2279 (start_step_over): Use internal_error instead of gdb_assert.
2280 (complete_ongoing_step_over): New function.
2281 (linux_resume_one_thread): Don't resume a suspended thread.
2282 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2283 it stepping.
2284
00db26fa
PA
22852015-08-06 Pedro Alves <palves@redhat.com>
2286
2287 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2288 (linux_thread_alive): Use lwp_is_marked_dead.
2289 (extended_event_reported): Delete.
2290 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2291 instead of extended_event_reported.
2292 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2293 as well.
2294 (lwp_is_marked_dead): New function.
2295 (lwp_running): Use lwp_is_marked_dead.
2296 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2297 comment.
2298
ad071a30
PA
22992015-08-06 Pedro Alves <palves@redhat.com>
2300
2301 * linux-low.c (linux_wait_1): Move fork event output out of the
2302 !report_to_gdb check. Pass event_child->waitstatus to
2303 target_waitstatus_to_string instead of ourstatus.
2304
524b57e6
YQ
23052015-08-04 Yao Qi <yao.qi@linaro.org>
2306
2307 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2308 if current_thread is 32 bit.
2309
6085d6f6
YQ
23102015-08-04 Yao Qi <yao.qi@linaro.org>
2311
2312 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2313 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2314 * server.c (extended_protocol): Remove "static".
2315 * server.h (extended_protocol): Declare it.
2316
8a7e4587
YQ
23172015-08-04 Yao Qi <yao.qi@linaro.org>
2318
2319 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2320 both aarch64 and aarch32.
2321 (aarch64_set_pc): Likewise.
2322
3b53ae99
YQ
23232015-08-04 Yao Qi <yao.qi@linaro.org>
2324
2325 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2326 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2327 arm-with-neon.xml to srv_xmlfiles.
2328 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2329 (is_64bit_tdesc): New function.
2330 (aarch64_linux_read_description): New function.
2331 (aarch64_arch_setup): Call aarch64_linux_read_description.
2332 (regs_info): Rename to regs_info_aarch64.
2333 (aarch64_regs_info): Return right regs_info.
2334 (initialize_low_arch): Call initialize_low_arch_aarch32.
2335
bd9e6534
YQ
23362015-08-04 Yao Qi <yao.qi@linaro.org>
2337
2338 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2339 * linux-aarch32-low.c: New file.
2340 * linux-aarch32-low.h: New file.
2341 * linux-arm-low.c (arm_fill_gregset): Move it to
2342 linux-aarch32-low.c.
2343 (arm_store_gregset): Likewise.
2344 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2345 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2346 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2347 (regs_info): Rename to regs_info_arm.
2348 (arm_regs_info): Return regs_info_aarch32 if
2349 have_ptrace_getregset is 1 and target description is
2350 arm_with_neon or arm_with_vfpv3.
2351 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2352 Call initialize_low_arch_aarch32 instead.
2353
ded48a5e
YQ
23542015-08-04 Yao Qi <yao.qi@linaro.org>
2355
2356 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2357 * linux-low.c: ... here.
2358 * linux-low.h (have_ptrace_getregset): Declare it.
2359
96e9210f
PA
23602015-08-04 Pedro Alves <palves@redhat.com>
2361
2362 * thread-db.c (struct thread_db): Use new typedefs.
2363 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2364 CHK calls.
2365 (disable_thread_event_reporting): Cast result of dlsym to
2366 destination function pointer type.
2367 (thread_db_mourn): Use td_ta_delete_ftype.
2368
af60a1ef
SL
23692015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2370
2371 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2372 arch variant.
2373 (CDX_BREAKPOINT): Define for R2.
2374 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2375 (the_low_target): Add comments.
2376
e8b41681
YQ
23772015-07-30 Yao Qi <yao.qi@linaro.org>
2378
2379 * linux-arm-low.c (arm_hwcap): Remove it.
2380 (arm_read_description): New local variable arm_hwcap. Don't
2381 set arm_hwcap to zero.
2382
89abb039
YQ
23832015-07-30 Yao Qi <yao.qi@linaro.org>
2384
2385 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2386 Use regcache->tdesc instead.
2387 (arm_store_wmmxregset): Likewise.
2388 (arm_fill_vfpregset): Likewise.
2389 (arm_store_vfpregset): Likewise.
2390
deca266c
YQ
23912015-07-30 Yao Qi <yao.qi@linaro.org>
2392
2393 * linux-arm-low.c: Include arch/arm.h.
2394 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2395 (arm_store_gregset): Likewise.
2396
aa58a496
SM
23972015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2398
2399 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2400 ptrace's 4th parameter.
2401
50904b25
YQ
24022015-07-27 Yao Qi <yao.qi@linaro.org>
2403
2404 * configure.srv (case aarch64*-*-linux*): Don't set
2405 srv_linux_usrregs.
2406
5826e159
PA
24072015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2408
2409 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2410 sys/ptrace.h.
2411 * linux-arm-low.c: Likewise.
2412 * linux-cris-low.c: Likewise.
2413 * linux-crisv32-low.c: Likewise.
2414 * linux-low.c: Likewise.
2415 * linux-m68k-low.c: Likewise.
2416 * linux-mips-low.c: Likewise.
2417 * linux-nios2-low.c: Likewise.
2418 * linux-s390-low.c: Likewise.
2419 * linux-sparc-low.c: Likewise.
2420 * linux-tic6x-low.c: Likewise.
2421 * linux-tile-low.c: Likewise.
2422 * linux-x86-low.c: Likewise.
2423
54019719
PA
24242015-07-24 Pedro Alves <palves@redhat.com>
2425
2426 * config.in: Regenerate.
2427 * configure: Regenerate.
2428
eb7aa561
PA
24292015-07-24 Pedro Alves <palves@redhat.com>
2430
2431 * acinclude.m4: Include ../ptrace.m4.
2432 * configure.ac: Call GDB_AC_PTRACE.
2433 * config.in, configure: Regenerate.
2434
55d7b841
YQ
24352015-07-24 Yao Qi <yao.qi@linaro.org>
2436
2437 * linux-low.c (linux_create_inferior): Remove setting to
2438 proc->priv->new_inferior.
2439 (linux_attach): Likewise.
2440 (linux_low_filter_event): Likewise.
2441 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2442
c06cbd92
YQ
24432015-07-24 Yao Qi <yao.qi@linaro.org>
2444
2445 * linux-low.c (linux_arch_setup): New function.
2446 (linux_low_filter_event): If proc->tdesc is NULL and
2447 proc->attached is true, call the_low_target.arch_setup.
2448 Otherwise, keep status pending, and return.
2449 (linux_resume_one_lwp_throw): Don't call get_pc if
2450 thread->while_stepping isn't NULL. Don't call
2451 get_thread_regcache if proc->tdesc is NULL.
2452 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2453 (linux_target_ops): Install arch_setup.
2454 * server.c (start_inferior): Call the_target->arch_setup.
2455 * target.h (struct target_ops) <arch_setup>: New field.
2456 (target_arch_setup): New marco.
2457 * lynx-low.c (lynx_target_ops): Update.
2458 * nto-low.c (nto_target_ops): Update.
2459 * spu-low.c (spu_target_ops): Update.
2460 * win32-low.c (win32_target_ops): Update.
2461
5ae3ebba
YQ
24622015-07-24 Yao Qi <yao.qi@linaro.org>
2463
2464 * linux-low.c (linux_add_process): Don't set
2465 proc->priv->new_inferior.
2466 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2467 (linux_attach): Likewise.
2468
eb97750b
YQ
24692015-07-24 Yao Qi <yao.qi@linaro.org>
2470
2471 * server.c (start_inferior): Code refactor.
2472
51aee833
YQ
24732015-07-24 Yao Qi <yao.qi@linaro.org>
2474
2475 * server.c (process_serial_event): Set general_thread.
2476
af1b22f3
YQ
24772015-07-21 Yao Qi <yao.qi@linaro.org>
2478
2479 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2480 aarch64_linux_get_debug_reg_capacity.
2481
554717a3
YQ
24822015-07-17 Yao Qi <yao.qi@linaro.org>
2483
2484 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2485 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2486 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2487 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2488 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2489 (AARCH64_HWP_ALIGNMENT): Likewise.
2490 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2491 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2492 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2493 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2494 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2495 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2496 (struct aarch64_debug_reg_state): Likewise.
2497 (struct arch_lwp_info): Likewise.
2498 (aarch64_align_watchpoint): Likewise.
2499 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2500 (aarch64_watchpoint_length): Likewise.
2501 (aarch64_point_encode_ctrl_reg): Likewise
2502 (aarch64_point_is_aligned): Likewise.
2503 (aarch64_align_watchpoint): Likewise.
2504 (aarch64_linux_set_debug_regs):
2505 (aarch64_dr_state_insert_one_point): Likewise.
2506 (aarch64_dr_state_remove_one_point): Likewise.
2507 (aarch64_handle_breakpoint): Likewise.
2508 (aarch64_handle_aligned_watchpoint): Likewise.
2509 (aarch64_handle_unaligned_watchpoint): Likewise.
2510 (aarch64_handle_watchpoint): Likewise.
2511
c67ca4de
YQ
25122015-07-17 Yao Qi <yao.qi@linaro.org>
2513
2514 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2515 and don't aarch64_get_debug_reg_state. All callers update.
2516 (aarch64_handle_aligned_watchpoint): Likewise.
2517 (aarch64_handle_unaligned_watchpoint): Likewise.
2518 (aarch64_handle_watchpoint): Likewise.
2519 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2520 (aarch64_remove_point): Likewise.
2521
25abf979
YQ
25222015-07-17 Yao Qi <yao.qi@linaro.org>
2523
2524 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2525 debug_printf.
2526 (aarch64_handle_unaligned_watchpoint): Likewise.
2527
db1ff28b
JK
25282015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2529
2530 Revert the previous 3 commits:
2531 Move gdb_regex* to common/
2532 Move linux_find_memory_regions_full & co.
2533 gdbserver build-id attribute generator
2534
700ca40f
JK
25352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2536 Jan Kratochvil <jan.kratochvil@redhat.com>
2537
2538 gdbserver build-id attribute generator.
2539 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2540 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2541 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2542 (find_phdr): New.
2543 (get_dynamic): Use find_pdhr to traverse program headers.
2544 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2545 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2546 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2547 (get_hex_build_id): New.
2548 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2549 to reply XML document.
2550
9904185c
JK
25512015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2552 Jan Kratochvil <jan.kratochvil@redhat.com>
2553
2554 * target.c: Include target/target-utils.h and fcntl.h.
2555 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2556 (target_fileio_read_stralloc): New functions.
2557
6e5b4429
JK
25582015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2559
2560 * Makefile.in (OBS): Add gdb_regex.o.
2561 (gdb_regex.o): New.
2562 * config.in: Rebuilt.
2563 * configure: Rebuilt.
2564
ddc98fbf
JK
25652015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2566 Jan Kratochvil <jan.kratochvil@redhat.com>
2567
2568 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2569 * Makefile.in (OBS): Add target-utils.o.
2570 (linux-maps.o, target-utils.o): New.
2571 * configure.srv (srv_linux_obj): Add linux-maps.o.
2572
e57bb7a0
PL
25732015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2574
2575 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2576 function, return 1.
2577 (the_low_target): Install it.
2578
586b02a9
PA
25792015-07-14 Pedro Alves <palves@redhat.com>
2580
2581 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2582 Instead, ignore ECHILD, and throw an error for other errnos.
2583
58c1b36c
PA
25842015-07-10 Pedro Alves <palves@redhat.com>
2585
2586 * event-loop.c (struct callback_event) <data>: Change type to
2587 gdb_client_data instance instead of gdb_client_data pointer.
2588 (append_callback_event): Adjust.
2589
421530db
PL
25902015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2591
2592 * linux-aarch64-low.c: Add comments for each linux_target_ops
2593 method. Remove comments already covered in target_ops and
2594 linux_target_ops definitions.
2595 (the_low_target): Add comments for each unimplemented method.
2596
c2d65f38
YQ
25972015-07-09 Yao Qi <yao.qi@linaro.org>
2598
2599 * linux-aarch64-low.c (aarch64_regmap): Remove.
2600 (aarch64_usrregs_info): Remove.
2601 (regs_info): Set field usrregs to NULL.
2602
b20a6524
MM
26032015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2604
2605 * linux-low.c: Include "rsp-low.h"
2606 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2607 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2608 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2609 (handle_btrace_enable_pt): New.
2610 (handle_btrace_general_set): Support "pt".
2611 (handle_btrace_conf_general_set): Support "pt:size".
2612
96c97461
PL
26132015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2614
2615 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2616 Z_PACKET_SW_BP.
2617
37d66942
PL
26182015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2619
2620 * linux-aarch64-low.c: Remove comment about endianness.
2621 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2622 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2623 memcmp.
2624
dc06243f
GB
26252015-06-24 Gary Benson <gbenson@redhat.com>
2626
2627 * linux-i386-ipa.c (stdint.h): Do not include.
2628 * lynx-i386-low.c (stdint.h): Likewise.
2629 * lynx-ppc-low.c (stdint.h): Likewise.
2630 * mem-break.c (stdint.h): Likewise.
2631 * thread-db.c (stdint.h): Likewise.
2632 * tracepoint.c (stdint.h): Likewise.
2633 * win32-low.c (stdint.h): Likewise.
2634
124e13d9
SM
26352015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2636
2637 * server.c (write_qxfer_response): Update call to
2638 remote_escape_output.
2639
909c2cda
JK
26402015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2641 Jan Kratochvil <jan.kratochvil@redhat.com>
2642
2643 Merge multiple hex conversions.
2644 * gdbreplay.c (tohex): Rename to 'fromhex'.
2645 (logchar): Use fromhex.
2646
24c05f46
JK
26472015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2648
2649 * server.c (handle_qxfer_libraries): Set `version' attribute for
2650 <library-list>.
2651
14d2069a
GB
26522015-06-10 Gary Benson <gbenson@redhat.com>
2653
2654 * target.h (struct target_ops) <multifs_open>: New field.
2655 <multifs_unlink>: Likewise.
2656 <multifs_readlink>: Likewise.
2657 * linux-low.c (nat/linux-namespaces.h): New include.
2658 (linux_target_ops): Initialize the_target->multifs_open,
2659 the_target->multifs_unlink and the_target->multifs_readlink.
2660 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2661 * hostio.c (hostio_fs_pid): New static variable.
2662 (hostio_handle_new_gdb_connection): New function.
2663 (handle_setfs): Likewise.
2664 (handle_open): Use the_target->multifs_open as appropriate.
2665 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2666 (handle_readlink): Use the_target->multifs_readlink as
2667 appropriate.
2668 (handle_vFile): Handle vFile:setfs packets.
2669 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2670 after target_handle_new_gdb_connection.
2671
4b8b5e72
GB
26722015-06-10 Gary Benson <gbenson@redhat.com>
2673
2674 * configure.ac (AC_CHECK_FUNCS): Add setns.
2675 * config.in: Regenerate.
2676 * configure: Likewise.
2677 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2678 (linux-namespaces.o): New rule.
2679 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2680
3ac2e371
GB
26812015-06-09 Gary Benson <gbenson@redhat.com>
2682
2683 * hostio.c (handle_open): Process mode argument with
2684 fileio_to_host_mode.
2685
ca9b78ce
YQ
26862015-06-01 Yao Qi <yao.qi@linaro.org>
2687
2688 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2689 * linux-x86-low.c: Likewise.
2690
bfacd19d
DB
26912015-05-28 Don Breazeal <donb@codesourcery.com>
2692
2693 * linux-low.c (handle_extended_wait): Initialize
2694 thread_info.last_resume_kind for new fork children.
2695
452003ef
PA
26962015-05-15 Pedro Alves <palves@redhat.com>
2697
2698 * target.h (target_handle_new_gdb_connection): Rewrite using if
2699 wrapped in do/while.
2700
1041a03c
JB
27012015-05-14 Joel Brobecker <brobecker@adacore.com>
2702
2703 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2704 * configure, config.in: Regenerate.
2705 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2706 Declare typedef.
2707
c269dbdb
DB
27082015-05-12 Don Breazeal <donb@codesourcery.com>
2709
2710 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2711 PTRACE_EVENT_VFORK_DONE.
2712 (linux_low_ptrace_options, extended_event_reported): Add vfork
2713 events.
2714 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2715 and "vforkdone" for RSP 'T' Stop Reply Packet.
2716 * server.h (report_vfork_events): Declare
2717 global variable.
2718
3a8a0396
DB
27192015-05-12 Don Breazeal <donb@codesourcery.com>
2720
2721 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2722 (the_low_target) <new_fork>: Initialize new member.
2723 * linux-arm-low.c (arm_new_fork): New function.
2724 (the_low_target) <new_fork>: Initialize new member.
2725 * linux-low.c (handle_extended_wait): Call new target function
2726 new_fork.
2727 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2728 * linux-mips-low.c (mips_add_watchpoint): New function
2729 extracted from mips_insert_point.
2730 (the_low_target) <new_fork>: Initialize new member.
2731 (mips_linux_new_fork): New function.
2732 (mips_insert_point): Call mips_add_watchpoint.
2733 * linux-x86-low.c (x86_linux_new_fork): New function.
2734 (the_low_target) <new_fork>: Initialize new member.
2735
de0d863e
DB
27362015-05-12 Don Breazeal <donb@codesourcery.com>
2737
2738 * linux-low.c (handle_extended_wait): Implement return value,
2739 rename argument 'event_child' to 'event_lwp', handle
2740 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2741 (linux_low_ptrace_options): New function.
2742 (linux_low_filter_event): Call linux_low_ptrace_options,
2743 use different argument fo linux_enable_event_reporting,
2744 use return value from handle_extended_wait.
2745 (extended_event_reported): New function.
2746 (linux_wait_1): Call extended_event_reported and set
2747 status to report fork events.
2748 (linux_write_memory): Add pid to debug message.
2749 (reset_lwp_ptrace_options_callback): New function.
2750 (linux_handle_new_gdb_connection): New function.
2751 (linux_target_ops): Initialize new structure member.
2752 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2753 * lynx-low.c: Initialize new structure member.
2754 * remote-utils.c (prepare_resume_reply): Implement stop reason
2755 "fork" for "T" stop message.
2756 * server.c (handle_query): Call handle_new_gdb_connection.
2757 * server.h (report_fork_events): Declare global flag.
2758 * target.h (struct target_ops) <handle_new_gdb_connection>:
2759 New member.
2760 (target_handle_new_gdb_connection): New macro.
2761 * win32-low.c: Initialize new structure member.
2762
ddcbc397
DB
27632015-05-12 Don Breazeal <donb@codesourcery.com>
2764
2765 * mem-break.c (APPEND_TO_LIST): Define macro.
2766 (clone_agent_expr): New function.
2767 (clone_one_breakpoint): New function.
2768 (clone_all_breakpoints): New function.
2769 * mem-break.h: Declare new functions.
2770
89245bc0
DB
27712015-05-12 Don Breazeal <donb@codesourcery.com>
2772
2773 * linux-low.c (linux_supports_fork_events): New function.
2774 (linux_supports_vfork_events): New function.
2775 (linux_target_ops): Initialize new structure members.
2776 (initialize_low): Call linux_check_ptrace_features.
2777 * lynx-low.c (lynx_target_ops): Initialize new structure
2778 members.
2779 * server.c (report_fork_events, report_vfork_events):
2780 New global flags.
2781 (handle_query): Add new features to qSupported packet and
2782 response.
2783 (captured_main): Initialize new global variables.
2784 * target.h (struct target_ops) <supports_fork_events>:
2785 New member.
2786 <supports_vfork_events>: New member.
2787 (target_supports_fork_events): New macro.
2788 (target_supports_vfork_events): New macro.
2789 * win32-low.c (win32_target_ops): Initialize new structure
2790 members.
2791
835205d0
GB
27922015-05-12 Gary Benson <gbenson@redhat.com>
2793
2794 * server.c (handle_qxfer_exec_file): Use current process
2795 if annex is empty.
2796
21e94bd9
SL
27972015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2798
2799 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2800 Remove HAVE_PTRACE_GETREGS conditionals.
2801 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2802 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2803
45614f15
YQ
28042015-05-08 Yao Qi <yao.qi@linaro.org>
2805
2806 * linux-low.c (linux_supports_conditional_breakpoints): New
2807 function.
2808 (linux_target_ops): Install new target method.
2809 * lynx-low.c (lynx_target_ops): Install NULL hook for
2810 supports_conditional_breakpoints.
2811 * nto-low.c (nto_target_ops): Likewise.
2812 * spu-low.c (spu_target_ops): Likewise.
2813 * win32-low.c (win32_target_ops): Likewise.
2814 * server.c (handle_query): Check
2815 target_supports_conditional_breakpoints.
2816 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2817 New field.
2818 (target_supports_conditional_breakpoints): New macro.
2819
80ad801e
PA
28202015-05-06 Pedro Alves <palves@redhat.com>
2821
2822 PR server/18081
2823 * server.c (start_inferior): If the process exits, mourn it.
2824
819843c7
GB
28252015-04-21 Gary Benson <gbenson@redhat.com>
2826
2827 * hostio.c (fileio_open_flags_to_host): Factored out to
2828 fileio_to_host_openflags in common/fileio.c. Single use
2829 updated.
2830
a2d5a9d7
MF
28312015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2832
2833 * linux-xtensa-low.c (xtensa_fill_gregset)
2834 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2835 XCHAL_HAVE_LOOP.
2836
deb44829
MF
28372015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2838
2839 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2840 (regs_info): Replace usrregs pointer with NULL.
2841
e57f1de3
GB
28422015-04-17 Gary Benson <gbenson@redhat.com>
2843
2844 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2845 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2846 * server.c (handle_qxfer_exec_file): New function.
2847 (qxfer_packets): Add exec-file entry.
2848 (handle_query): Report qXfer:exec-file:read as supported packet.
2849
62828379
RN
28502015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2851
2852 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2853
b88bb450
GB
28542015-04-09 Gary Benson <gbenson@redhat.com>
2855
2856 * hostio-errno.c (errno_to_fileio_error): Remove function.
2857 Update caller to use remote_fileio_to_fio_error.
2858
c8f4bfdd
YQ
28592015-04-09 Yao Qi <yao.qi@linaro.org>
2860
2861 * linux-low.c (linux_insert_point): Call
2862 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2863 (linux_remove_point): Call remove_memory_breakpoint if type is
2864 raw_bkpt_type_sw.
2865 * linux-x86-low.c (x86_insert_point): Don't call
2866 insert_memory_breakpoint.
2867 (x86_remove_point): Don't call remove_memory_breakpoint.
2868
41f98f02
PA
28692015-04-01 Pedro Alves <palves@redhat.com>
2870 Cleber Rosa <crosa@redhat.com>
2871
2872 * server.c (gdbserver_usage): Reorganize and extend the usage
2873 message.
2874
2bf6fb9d
PA
28752015-03-24 Pedro Alves <palves@redhat.com>
2876
2877 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2878 output. Also dump TRAP_TRACE.
2879 (linux_low_filter_event): In debug output, distinguish a
2880 resume_stop SIGSTOP from a delayed SIGSTOP.
2881
369f6daa
GB
28822015-03-24 Gary Benson <gbenson@redhat.com>
2883
2884 * linux-x86-low.c (x86_linux_new_thread): Moved to
2885 nat/x86-linux.c.
2886 (x86_linux_prepare_to_resume): Likewise.
2887
8e5d4070
GB
28882015-03-24 Gary Benson <gbenson@redhat.com>
2889
2890 * Makefile.in (x86-linux-dregs.o): New rule.
2891 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2892 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2893 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2894 (x86_linux_dr_get): Likewise.
2895 (x86_linux_dr_set): Likewise.
2896 (update_debug_registers_callback): Likewise.
2897 (x86_linux_dr_set_addr): Likewise.
2898 (x86_linux_dr_get_addr): Likewise.
2899 (x86_linux_dr_set_control): Likewise.
2900 (x86_linux_dr_get_control): Likewise.
2901 (x86_linux_dr_get_status): Likewise.
2902 (x86_linux_update_debug_registers): Likewise.
2903
2b95d440
GB
29042015-03-24 Gary Benson <gbenson@redhat.com>
2905
2906 * linux-x86-low.c (x86_linux_update_debug_registers):
2907 New function, factored out from...
2908 (x86_linux_prepare_to_resume): ...this.
2909
14b0bc68
GB
29102015-03-24 Gary Benson <gbenson@redhat.com>
2911
2912 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2913 (x86_linux_dr_set): Likewise.
2914 (update_debug_registers_callback): Likewise.
2915 (x86_linux_dr_set_addr): Likewise.
2916 (x86_linux_dr_get_addr): Likewise.
2917 (x86_linux_dr_set_control): Likewise.
2918 (x86_linux_dr_get_control): Likewise.
2919 (x86_linux_dr_get_status): Likewise.
2920 (x86_linux_prepare_to_resume): Likewise.
2921
5dfe6ca8
GB
29222015-03-24 Gary Benson <gbenson@redhat.com>
2923
2924 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2925 Use perror_with_name. Pass string through gettext.
2926 (x86_linux_dr_set): Likewise.
2927
d33472ad
GB
29282015-03-24 Gary Benson <gbenson@redhat.com>
2929
2930 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2931 (x86_linux_dr_set_addr): ...this.
2932 (x86_dr_low_get_addr): Rename to...
2933 (x86_linux_dr_get_addr): ...this.
2934 (x86_dr_low_set_control): Rename to...
2935 (x86_linux_dr_set_control): ...this.
2936 (x86_dr_low_get_control): Rename to...
2937 (x86_linux_dr_get_control): ...this.
2938 (x86_dr_low_get_status): Rename to...
2939 (x86_linux_dr_get_status): ...this.
2940 (x86_dr_low): Update with new function names.
2941
4b134ca1
GB
29422015-03-24 Gary Benson <gbenson@redhat.com>
2943
2944 * Makefile.in (x86-linux.o): New rule.
2945 * configure.srv: Add x86-linux.o to relevant targets.
2946 * linux-low.c (lwp_set_arch_private_info): New function.
2947 (lwp_arch_private_info): Likewise.
2948 * linux-x86-low.c: Include nat/x86-linux.h.
2949 (arch_lwp_info): Removed structure.
2950 (update_debug_registers_callback):
2951 Use lwp_set_debug_registers_changed.
2952 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2953 and lwp_set_debug_registers_changed.
2954 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2955
34c703da
GB
29562015-03-24 Gary Benson <gbenson@redhat.com>
2957
2958 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2959 * linux-arm-low.c (arm_new_thread): Likewise.
2960 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2961 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2962 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2963 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2964
cff068da
GB
29652015-03-24 Gary Benson <gbenson@redhat.com>
2966
2967 * linux-low.c (ptid_of_lwp): New function.
2968 (lwp_is_stopped): Likewise.
2969 (lwp_stop_reason): Likewise.
2970 * linux-x86-low.c (update_debug_registers_callback):
2971 Use lwp_is_stopped.
2972 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2973 lwp_stop_reason.
2974
b2f7c7e8
GB
29752015-03-24 Gary Benson <gbenson@redhat.com>
2976
2977 * linux-low.h (linux_stop_lwp): Remove declaration.
2978
6d4ee8c6
GB
29792015-03-24 Gary Benson <gbenson@redhat.com>
2980
2981 * linux-low.h: Include nat/linux-nat.h.
2982 * linux-low.c (iterate_over_lwps_args): New structure.
2983 (iterate_over_lwps_filter): New function.
2984 (iterate_over_lwps): Likewise.
2985 * linux-x86-low.c (update_debug_registers_callback):
2986 Update signature to what iterate_over_lwps expects.
2987 Remove PID check that iterate_over_lwps now performs.
2988 (x86_dr_low_set_addr): Use iterate_over_lwps.
2989 (x86_dr_low_set_control): Likewise.
2990
70a0bb6b
GB
29912015-03-24 Gary Benson <gbenson@redhat.com>
2992
2993 * linux-x86-low.c (x86_debug_reg_state): New function.
2994 (x86_linux_prepare_to_resume): Use the above.
2995
7b669087
GB
29962015-03-24 Gary Benson <gbenson@redhat.com>
2997
2998 * linux-low.c (current_lwp_ptid): New function.
2999 * linux-x86-low.c: Include nat/linux-nat.h.
3000 (x86_dr_low_get_addr): Use current_lwp_ptid.
3001 (x86_dr_low_get_control): Likewise.
3002 (x86_dr_low_get_status): Likewise.
3003
eef49a3d
PA
30042015-03-20 Pedro Alves <palves@redhat.com>
3005
3006 * tracepoint.c (cmd_qtstatus): Make "str" const.
3007
b2333d22
PA
30082015-03-20 Pedro Alves <palves@redhat.com>
3009
3010 * server.c (handle_general_set): Make "req_str" const.
3011
23f238d3
PA
30122015-03-19 Pedro Alves <palves@redhat.com>
3013
3014 * linux-low.c (linux_resume_one_lwp): Rename to ...
3015 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3016 instead call perror_with_name.
3017 (check_ptrace_stopped_lwp_gone): New function.
3018 (linux_resume_one_lwp): Reimplement as wrapper around
3019 linux_resume_one_lwp_throw that swallows errors if the LWP is
3020 gone.
3021
91baf43f
PA
30222015-03-19 Pedro Alves <palves@redhat.com>
3023
3024 * linux-low.c (count_events_callback, select_event_lwp_callback):
3025 No longer check whether the thread has resume_stop as last resume
3026 kind.
3027
8bf3b159
PA
30282015-03-19 Pedro Alves <palves@redhat.com>
3029
3030 * linux-low.c (count_events_callback, select_event_lwp_callback):
3031 Use the lwp's status_pending_p field, not the thread's.
3032
b90fc188
PA
30332015-03-19 Pedro Alves <palves@redhat.com>
3034
3035 * linux-low.c (select_event_lwp_callback): Update comments to
3036 no longer mention SIGTRAP.
3037
464b0089
GB
30382015-03-18 Gary Benson <gbenson@redhat.com>
3039
3040 * server.c (handle_query): Do not report vFile:fstat as supported.
3041
aa9e327f
GB
30422015-03-11 Gary Benson <gbenson@redhat.com>
3043
3044 * hostio.c (sys/types.h): New include.
3045 (sys/stat.h): Likewise.
3046 (common-remote-fileio.h): Likewise.
3047 (handle_fstat): New function.
3048 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3049
791c0056
GB
30502015-03-11 Gary Benson <gbenson@redhat.com>
3051
3052 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3053 struct stat.st_blocks and struct stat.st_blksize.
3054 * configure: Regenerate.
3055 * config.in: Likewise.
3056 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3057 (OBS): Add common-remote-fileio.o.
3058 (common-remote-fileio.o): New rule.
3059
9a9df970
PA
30602015-03-09 Pedro Alves <palves@redhat.com>
3061
3062 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3063 'struct sockaddr' pointer in 'accept' call.
3064
9eb1356e
PA
30652015-03-09 Pedro Alves <palves@redhat.com>
3066
3067 Revert:
3068 2015-03-07 Pedro Alves <palves@redhat.com>
3069 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3070 or <winsock2.h> here. Instead include "gdb_socket.h".
3071 (remote_open): Use union gdb_sockaddr_u.
3072 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3073 or <winsock2.h> here. Instead include "gdb_socket.h".
3074 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3075 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3076 or <sys/un.h>.
3077 (init_named_socket, gdb_agent_helper_thread): Use union
3078 gdb_sockaddr_u.
3079
aac331e4
PA
30802015-03-07 Pedro Alves <palves@redhat.com>
3081
3082 * configure.ac (build_warnings): Move
3083 -Wdeclaration-after-statement to the C-specific set.
3084 * configure: Regenerate.
3085
366c75fc
PA
30862015-03-07 Pedro Alves <palves@redhat.com>
3087
3088 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3089 or <winsock2.h> here. Instead include "gdb_socket.h".
3090 (remote_open): Use union gdb_sockaddr_u.
3091 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3092 or <winsock2.h> here. Instead include "gdb_socket.h".
3093 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3094 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3095 or <sys/un.h>.
3096 (init_named_socket, gdb_agent_helper_thread): Use union
3097 gdb_sockaddr_u.
3098
492d29ea
PA
30992015-03-07 Pedro Alves <palves@redhat.com>
3100
3101 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3102 instead.
3103
60a191ed
YQ
31042015-03-06 Yao Qi <yao.qi@linaro.org>
3105
3106 * linux-aarch64-low.c (aarch64_insert_point): Use
3107 show_debug_regs as a boolean.
3108 (aarch64_remove_point): Likewise.
3109
f5771b1d
PA
31102015-03-05 Pedro Alves <palves@redhat.com>
3111
3112 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3113 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3114 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3115 * nto-low.c (nto_target_ops): Likewise.
3116 * spu-low.c (spu_target_ops): Likewise.
3117 * win32-low.c (win32_target_ops): Likewise.
3118
3e572f71
PA
31192015-03-04 Pedro Alves <palves@redhat.com>
3120
72f4393d 3121 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3122 Decide whether a breakpoint triggered based on the SIGTRAP's
3123 siginfo.si_code.
72f4393d
L
3124 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3125 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3126 (linux_low_filter_event): Check for breakpoints before checking
3127 watchpoints.
3128 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3129 siginfo.si_code.
72f4393d
L
3130 (linux_stopped_by_sw_breakpoint)
3131 (linux_supports_stopped_by_sw_breakpoint)
3132 (linux_stopped_by_hw_breakpoint)
3133 (linux_supports_stopped_by_hw_breakpoint): New functions.
3134 (linux_target_ops): Install new target methods.
3e572f71 3135
1ec68e26
PA
31362015-03-04 Pedro Alves <palves@redhat.com>
3137
3138 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3139 * server.c (swbreak_feature, hwbreak_feature): New globals.
3140 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3141 (captured_main): Clear swbreak_feature and hwbreak_feature.
3142 * server.h (swbreak_feature, hwbreak_feature): Declare.
3143 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3144 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3145 supports_stopped_by_hw_breakpoint>: New fields.
3146 (target_supports_stopped_by_sw_breakpoint)
3147 (target_stopped_by_sw_breakpoint)
3148 (target_supports_stopped_by_hw_breakpoint)
3149 (target_stopped_by_hw_breakpoint): Declare.
3150
15c66dd6
PA
31512015-03-04 Pedro Alves <palves@redhat.com>
3152
3153 enum lwp_stop_reason -> enum target_stop_reason
3154 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3155 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3156 (linux_wait_1, stuck_in_jump_pad_callback)
3157 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3158 (linux_stopped_by_watchpoint):
3159 * linux-low.h (enum lwp_stop_reason): Delete.
3160 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3161 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3162
98fc70d6
YQ
31632015-03-04 Yao Qi <yao.qi@linaro.org>
3164
3165 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3166
dd2ac174
GB
31672015-03-03 Gary Benson <gbenson@redhat.com>
3168
3169 * hostio.c (handle_vFile): Fix prefix lengths.
3170
d68e53f4
MM
31712015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3172
3173 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3174 ptr_bits.
3175
bf2d68ab
AA
31762015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3177
3178 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3179 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3180 (clean): Add "rm -f" for above C files.
3181 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3182 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3183 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3184 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3185 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3186 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3187 (init_registers_s390x_vx_linux64)
3188 (init_registers_s390x_tevx_linux64)
3189 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3190 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3191 declarations.
3192 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3193 (s390_store_vxrs_high): New functions.
3194 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3195 NT_S390_VXRS_HIGH.
3196 (s390_arch_setup): Add logic for selecting one of the new target
3197 descriptions. Activate the new vector regsets if applicable.
3198 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3199 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3200 and init_registers_s390x_tevx_linux64.
3201
c966a859
PA
32022015-03-01 Pedro Alves <palves@redhat.com>
3203
3204 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3205 parameter.
3206
4180215b
PA
32072015-02-27 Pedro Alves <palves@redhat.com>
3208
3209 * linux-x86-low.c (u_debugreg_offset): New function.
3210 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3211
749bab01
PA
32122015-02-27 Pedro Alves <palves@redhat.com>
3213
3214 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3215 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3216 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3217 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3218 (ps_lsetfpregs, ps_getpid)
3219 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3220 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3221 (ps_lsetxregs, ps_plog): Declare.
3222
3c14e5a3
PA
32232015-02-27 Pedro Alves <palves@redhat.com>
3224
3225 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3226 IP_AGENT_EXPORT_FUNC.
3227 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3228 IP_AGENT_EXPORT_FUNC.
3229 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3230 (IP_AGENT_EXPORT): Delete.
3231 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3232 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3233 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3234 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3235 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3236 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3237 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3238 (traceframe_read_count, traceframe_write_count)
3239 (traceframes_created, trace_state_variables, get_raw_reg)
3240 (get_trace_state_variable_value, set_trace_state_variable_value)
3241 (ust_loaded, helper_thread_id, cmd_buf): Use
3242 IPA_SYM_EXPORTED_NAME.
3243 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3244 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3245 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3246 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3247 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3248 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3249 EXTERN_C_PUSH/EXTERN_C_POP.
3250 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3251 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3252 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3253 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3254 (traceframe_write_count, traceframe_read_count)
3255 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3256 (about_to_request_buffer_space, get_trace_state_variable_value)
3257 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3258 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3259 EXTERN_C_PUSH/EXTERN_C_POP.
3260 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3261 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3262 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3263 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3264 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3265 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3266 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3267 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3268 Define.
3269 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3270 (IP_AGENT_EXPORT_VAR_DECL): Define.
3271 (tracing): Declare.
3272 (gdb_agent_get_raw_reg): Declare.
3273
fe978cb0
PA
32742015-02-27 Tom Tromey <tromey@redhat.com>
3275 Pedro Alves <palves@redhat.com>
3276
3277 Rename symbols whose names are reserved C++ keywords throughout.
3278
3bc3d82a
PA
32792015-02-27 Pedro Alves <palves@redhat.com>
3280
3281 * Makefile.in (COMPILER): New, get it from autoconf.
3282 (CXX): Get from autoconf instead.
3283 (COMPILE.pre): Use COMPILER.
3284 (CC-LD): Rename to ...
3285 (CC_LD): ... this. Use COMPILER.
3286 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3287 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3288 * acinclude.m4: Include build-with-cxx.m4.
3289 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3290 Disable -Werror by default if building in C++ mode.
3291 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3292 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3293 the C++ compiler. Save/restore CXXFLAGS too.
3294 * configure: Regenerate.
3295
07697489
PA
32962015-02-27 Pedro Alves <palves@redhat.com>
3297
3298 * acinclude.m4: Include libiberty.m4.
3299 * configure.ac: Call libiberty_INIT.
3300 * config.in, configure: Regenerate.
3301
9beb7c4e
PA
33022015-02-26 Pedro Alves <palves@redhat.com>
3303
3304 * linux-low.c (linux_wait_1): When incrementing the PC past a
3305 program breakpoint always use the_low_target.breakpoint_len as
3306 increment, rather than the maximum between that and
3307 the_low_target.decr_pc_after_break.
3308
8090aef2
PA
33092015-02-23 Pedro Alves <palves@redhat.com>
3310
3311 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3312 thread was doing a step-over; always adjust the PC if
3313 we stepped over a permanent breakpoint.
3314 (linux_wait_1): If we stepped over breakpoint that was on top of a
3315 permanent breakpoint, manually advance the PC past it.
3316
bc9540e8
PA
33172015-02-23 Pedro Alves <palves@redhat.com>
3318
3319 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3320 modes.
3321 (x86_fill_gregset, x86_store_gregset): Use it when handling
3322 $orig_eax.
3323
2db9a427
PA
33242015-02-20 Pedro Alves <palves@redhat.com>
3325
3326 * thread-db.c: Include "nat/linux-procfs.h".
3327 (thread_db_init): Skip listing new threads if the kernel supports
3328 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3329
afa8d396
PA
33302015-02-20 Pedro Alves <palves@redhat.com>
3331
3332 * linux-low.c (status_pending_p_callback): Use ptid_match.
3333
c9587f88
AT
33342015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3335
3336 PR breakpoints/16812
3337 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3338 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3339 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3340
b05ec7a5
AT
33412015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3342
3343 PR breakpoints/15956
3344 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3345
d33501a5
MM
33462015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3347
3348 * linux-low.c (linux_low_btrace_conf): Print size.
3349 * server.c (handle_btrace_conf_general_set): New.
3350 (hanle_general_set): Call handle_btrace_conf_general_set.
3351 (handle_query): Report Qbtrace-conf:bts:size as supported.
3352
f4abbc16
MM
33532015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3354
3355 * linux-low.c (linux_low_enable_btrace): Update parameters.
3356 (linux_low_btrace_conf): New.
3357 (linux_target_ops)<to_btrace_conf>: Initialize.
3358 * server.c (current_btrace_conf): New.
3359 (handle_btrace_enable): Rename to ...
3360 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3361 to target_enable_btrace. Update comment. Update users.
3362 (handle_qxfer_btrace_conf): New.
3363 (qxfer_packets): Add btrace-conf entry.
3364 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3365 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3366 (target_ops)<read_btrace_conf>: New.
3367 (target_enable_btrace): Update parameters.
3368 (target_read_btrace_conf): New.
3369
043c3577
MM
33702015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3371
3372 * server.c (handle_btrace_general_set): Remove call to
3373 target_supports_btrace.
3374 (supported_btrace_packets): New.
3375 (handle_query): Call supported_btrace_packets.
3376 * target.h: include btrace-common.h.
3377 (btrace_target_info): Removed.
3378 (supports_btrace, target_supports_btrace): Update parameters.
3379
734b0e4b
MM
33802015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3381
3382 * Makefile.in (SFILES): Add common/btrace-common.c.
3383 (OBS): Add common/btrace-common.o.
3384 (btrace-common.o): Add build rules.
3385 * linux-low: Include btrace-common.h.
3386 (linux_low_read_btrace): Use struct btrace_data. Call
3387 btrace_data_init and btrace_data_fini.
3388
d6c146e9
PA
33892015-02-06 Pedro Alves <palves@redhat.com>
3390
3391 * thread-db.c (find_new_threads_callback): Add debug output.
3392
20ba1ce6
PA
33932015-02-04 Pedro Alves <palves@redhat.com>
3394
3395 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3396 (resume_stopped_resumed_lwps): New function.
3397 (linux_wait_for_event_filtered): Use it.
3398
8cc73a39
SDJ
33992015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3400
3401 * Makefile.in (SFILES): Add linux-personality.c.
3402 (linux-personality.o): New rule.
3403 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3404 list of objects to be built.
3405 * linux-low.c: Include nat/linux-personality.h.
3406 (linux_create_inferior): Remove code to disable address space
3407 randomization (moved to ../nat/linux-personality.c). Create
3408 cleanup to disable address space randomization.
3409
fb23d554
SDJ
34102015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3411
3412 * Makefile.in (posix-strerror.o): New rule.
3413 (mingw-strerror.o): Likewise.
3414 * configure: Regenerated.
3415 * configure.ac: Source file ../common/common.host. Initialize new
3416 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3417
cdf43629
YQ
34182015-01-14 Yao Qi <yao@codesourcery.com>
3419
3420 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3421 (ppc-linux.o): New rule.
3422 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3423 * configure.ac: AC_CHECK_FUNCS(getauxval).
3424 * config.in: Re-generated.
3425 * configure: Re-generated.
3426 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3427 ppc64_64bit_inferior_p
3428
514c5338
YQ
34292015-01-14 Yao Qi <yao@codesourcery.com>
3430
3431 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3432 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3433 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3434 (PT_ORIG_R3, PT_TRAP): Likewise.
3435 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3436 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3437 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3438
3368c1e5
JB
34392015-01-10 Joel Brobecker <brobecker@adacore.com>
3440
3441 * i387-fp.c (i387_cache_to_xsave): In look over
3442 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3443 zmmh_low_space field by use of zmmh_high_space.
3444
582511be
PA
34452015-01-09 Pedro Alves <palves@redhat.com>
3446
3447 * linux-low.c (step_over_bkpt): Move higher up in the file.
3448 (handle_extended_wait): Don't store the stop_pc here.
3449 (get_stop_pc): Adjust comments and rename to ...
3450 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3451 stopped for a software breakpoint or hardware breakpoint.
3452 (thread_still_has_status_pending_p): New function.
3453 (status_pending_p_callback): Use
3454 thread_still_has_status_pending_p. If the event is no longer
3455 interesting, resume the LWP.
3456 (handle_tracepoints): Add assert.
3457 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3458 (wstatus_maybe_breakpoint): New function.
3459 (cancel_breakpoint): Delete function.
3460 (check_stopped_by_watchpoint): New function, factored out from
3461 linux_low_filter_event.
3462 (lp_status_maybe_breakpoint): Delete function.
3463 (linux_low_filter_event): Remove filter_ptid argument.
3464 Leave thread group exits pending here. Store the LWP's stop PC.
3465 Always leave events pending.
3466 (linux_wait_for_event_filtered): Pull all events out of the
3467 kernel, and leave them all pending.
3468 (count_events_callback, select_event_lwp_callback): Consider all
3469 events.
3470 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3471 (select_event_lwp): Only give preference to the stepping LWP in
3472 all-stop mode. Adjust comments.
3473 (ignore_event): New function.
3474 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3475 references to cancel_breakpoints. Adjust to renames. Also give
3476 equal priority to all LWPs that have had events in non-stop mode.
3477 If reporting a software breakpoint event, unadjust the LWP's PC.
3478 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3479 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3480 Adjust.
3481 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3482 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3483 (linux_stopped_by_watchpoint): Adjust.
3484 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3485 * linux-low.h (enum lwp_stop_reason): New.
3486 (struct lwp_info) <stop_pc>: Adjust comment.
3487 <stopped_by_watchpoint>: Delete field.
3488 <stop_reason>: New field.
3489 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3490 * mem-break.c (software_breakpoint_inserted_here)
3491 (hardware_breakpoint_inserted_here): New function.
3492 * mem-break.h (software_breakpoint_inserted_here)
3493 (hardware_breakpoint_inserted_here): Declare.
3494 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3495 (cancel_breakpoints): Delete.
3496 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3497 (upload_fast_traceframes): Remove references to
3498 cancel_breakpoints.
3499
a33e3959
PA
35002015-01-09 Pedro Alves <palves@redhat.com>
3501
3502 * thread-db.c (find_new_threads_callback): Ignore thread if the
3503 kernel thread ID is -1.
3504
8784d563
PA
35052015-01-09 Pedro Alves <palves@redhat.com>
3506
3507 * linux-low.c (linux_attach_fail_reason_string): Move to
3508 nat/linux-ptrace.c, and rename.
3509 (linux_attach_lwp): Update comment.
3510 (attach_proc_task_lwp_callback): New function.
3511 (linux_attach): Adjust to rename and use
3512 linux_proc_attach_tgid_threads.
3513 (linux_attach_fail_reason_string): Delete declaration.
3514
76f2b779
JB
35152015-01-01 Joel Brobecker <brobecker@adacore.com>
3516
3517 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3518 * server.c (gdbserver_version): Likewise.
3519
fafcc06a
SDJ
35202014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3521
3522 * remote-utils.c: Include ctype.h.
3523 (input_interrupt): Explicitly handle the case when the char
3524 received is the NUL byte. Improve the printing of non-ASCII
3525 characters.
3526
beed38b8
JB
35272014-12-16 Joel Brobecker <brobecker@adacore.com>
3528
3529 * linux-low.c (linux_low_filter_event): Update call to
3530 linux_enable_event_reporting following the addition of
3531 a new parameter to that function.
3532
bf330350
CU
35332014-12-16 Catalin Udma <catalin.udma@freescale.com>
3534
3535 PR server/17457
3536 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3537 (AARCH64_FPCR_REGNO): Likewise.
3538 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3539 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3540 (aarch64_store_fpregset): Likewise.
3541
5227d625
JB
35422014-12-15 Joel Brobecker <brobecker@adacore.com>
3543
3544 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3545 Remove FIXME comment about assumption about N.
3546
f93b65a0
JB
35472014-12-13 Joel Brobecker <brobecker@adacore.com>
3548
3549 * configure.ac: If large-file support is disabled in GDBserver,
3550 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3551 * configure: Regenerate.
3552
e5a9158d
AA
35532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3554
3555 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3556 warning upon ENODATA from ptrace.
3557 * linux-s390-low.c (s390_store_tdb): New.
3558 (s390_regsets): Add regset for NT_S390_TDB.
3559
feea5f36
AA
35602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3561
3562 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3563 without a fill_function.
3564 * linux-s390-low.c (s390_fill_last_break): Remove.
3565 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3566 (s390_arch_setup): Use regset's size instead of fill_function for
3567 loop end condition.
3568
098dbe61
AA
35692014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3570
3571 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3572 the regset's store function when ptrace returned an error.
3573 * regcache.c (get_thread_regcache): Invalidate register cache
3574 before fetching inferior's registers.
3575
28eef672
AA
35762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3577
3578 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3579 while-loop as for-loop.
3580 (regsets_store_inferior_registers): Likewise.
3581
bdca27a2
YQ
35822014-11-28 Yao Qi <yao@codesourcery.com>
3583
3584 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3585 * config.in, configure: Re-generate.
3586 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3587 is defined.
3588
9c232dda
YQ
35892014-11-21 Yao Qi <yao@codesourcery.com>
3590
3591 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3592 (AC_CHECK_HEADERS): Remove malloc.h.
3593 * configure: Re-generated.
3594 * config.in: Re-generated.
3595 * server.h: Don't include alloca.h and malloc.h.
3596 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3597 Don't include malloc.h.
3598
43968415
JB
35992014-11-17 Joel Brobecker <brobecker@adacore.com>
3600
3601 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3602 corresponding ERRNO check in same block.
3603
40e91bc7
PA
36042014-11-12 Pedro Alves <palves@redhat.com>
3605
3606 * server.c (cont_thread): Update comment.
3607 (start_inferior, attach_inferior): No longer clear cont_thread.
3608 (handle_v_cont): No longer set cont_thread.
3609 (captured_main): Clear cont_thread each time a GDB connects.
3610
c2c118cf
PA
36112014-11-12 Pedro Alves <palves@redhat.com>
3612
3613 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3614 thread, and don't resume all threads if the Hc thread has exited.
3615
78708b7c
PA
36162014-11-12 Pedro Alves <palves@redhat.com>
3617
3618 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3619 the process group instead of to a specific LWP.
3620
a2abc7de
PA
36212014-10-15 Pedro Alves <palves@redhat.com>
3622
3623 PR server/17487
3624 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3625 parameter.
3626 (arm_set_thread_context): Delete.
3627 (the_low_target): Adjust.
3628 * win32-i386-low.c (debug_registers_changed)
3629 (debug_registers_used): Delete.
3630 (update_debug_registers_callback): New function.
3631 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3632 needing to update their debug registers.
3633 (win32_get_current_dr): New function.
3634 (x86_dr_low_get_addr, x86_dr_low_get_control)
3635 (x86_dr_low_get_status): Fetch the debug register from the thread
3636 record's context.
3637 (i386_initial_stuff): Adjust.
3638 (i386_get_thread_context): Remove current_event parameter. Don't
3639 clear debug_registers_changed nor copy DR values to
3640 debug_reg_state.
3641 (i386_set_thread_context): Delete.
3642 (i386_prepare_to_resume): New function.
3643 (i386_thread_added): Mark the thread as needing to update irs
3644 debug registers.
3645 (the_low_target): Remove i386_set_thread_context and install
3646 i386_prepare_to_resume.
3647 * win32-low.c (win32_get_thread_context): Adjust.
3648 (win32_set_thread_context): Use SetThreadContext
3649 directly.
3650 (win32_prepare_to_resume): New function.
3651 (win32_require_context): New function, factored out from ...
3652 (thread_rec): ... this.
3653 (continue_one_thread): Call win32_prepare_to_resume on each thread
3654 we're about to continue.
3655 (win32_resume): Call win32_prepare_to_resume on the event thread.
3656 * win32-low.h (struct win32_thread_info)
3657 <debug_registers_changed>: New field.
3658 (struct win32_target_ops): Change prototype of set_thread_context,
3659 delete set_thread_context and add prepare_to_resume.
3660 (win32_require_context): New declaration.
3661
a442d071
GB
36622014-10-08 Gary Benson <gbenson@redhat.com>
3663
3664 * server.h: Do not include common-exceptions.h.
3665
6f1947e8
GB
36662014-10-08 Gary Benson <gbenson@redhat.com>
3667
3668 * server.h: Do not include cleanups.h.
3669
63b434a4
JH
36702014-09-30 James Hogan <james.hogan@imgtec.com>
3671
3672 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3673 mips64-dsp-linux.c.
3674
c4d9ceb6
YQ
36752014-09-23 Yao Qi <yao@codesourcery.com>
3676
3677 * linux-low.c (lp_status_maybe_breakpoint): New function.
3678 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3679 (count_events_callback): Likewise.
3680 (select_event_lwp_callback): Likewise.
3681 (cancel_breakpoints_callback): Likewise.
3682
89a5711c
DB
36832014-09-19 Don Breazeal <donb@codesourcery.com>
3684
3685 * linux-low.c (handle_extended_wait): Call
3686 linux_ptrace_get_extended_event.
3687 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3688 linux_is_extended_waitstatus.
3689
bffc0964
JB
36902014-09-16 Joel Brobecker <brobecker@adacore.com>
3691
3692 * Makefile.in (CPPFLAGS): Define.
3693 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3694 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3695
0bfdf32f
GB
36962014-09-16 Gary Benson <gbenson@redhat.com>
3697
3698 * inferiors.h (current_inferior): Renamed as...
3699 (current_thread): New variable. All uses updated.
3700 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3701 (maybe_move_out_of_jump_pad): Likewise.
3702 (cancel_breakpoint): Likewise.
3703 (linux_low_filter_event): Likewise.
3704 (wait_for_sigstop): Likewise.
3705 (linux_resume_one_lwp): Likewise.
3706 (need_step_over_p): Likewise.
3707 (start_step_over): Likewise.
3708 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3709 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3710 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3711 and save_inferior as saved_thread.
3712 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3713 saved_thread.
3714 (regcache_invalidate_thread): Likewise.
3715 * remote-utils.c (prepare_resume_reply): Likewise.
3716 * thread-db.c (thread_db_get_tls_address): Likewise.
3717 (disable_thread_event_reporting): Likewise.
3718 (remove_thread_event_breakpoints): Likewise.
3719 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3720 as saved_thread.
3721 * target.h (set_desired_inferior): Renamed as...
3722 (set_desired_thread): New declaration. All uses updated.
3723 * server.c (myresume): Updated comment to reference thread instead
3724 of inferior.
3725 (handle_serial_event): Likewise.
3726 (handle_target_event): Likewise.
3727
361c8ade
GB
37282014-09-12 Tom Tromey <tromey@redhat.com>
3729 Gary Benson <gbenson@redhat.com>
3730
3731 * regcache.h: Include common-regcache.h.
3732 (regcache_read_pc): Don't declare.
3733 * regcache.c (get_thread_regcache_for_ptid): New function.
3734
bd9269f7
GB
37352014-09-11 Tom Tromey <tromey@redhat.com>
3736 Gary Benson <gbenson@redhat.com>
3737
3738 * symbol.c: New file.
3739 * Makefile.in (SFILES): Add symbol.c.
3740 (OBS): Add symbol.o.
3741
f8c1d06b
GB
37422014-09-11 Gary Benson <gbenson@redhat.com>
3743
3744 * target.c (target_stop_ptid, target_continue_ptid): New
3745 functions.
3746
721ec300
GB
37472014-09-11 Tom Tromey <tromey@redhat.com>
3748 Gary Benson <gbenson@redhat.com>
3749
3750 * target.h: Include target/target.h.
3751 * target.c (target_read_memory, target_read_uint32)
3752 (target_write_memory): New functions.
3753
c5e92cca
GB
37542014-09-11 Gary Benson <gbenson@redhat.com>
3755
3756 * server.h (debug_hw_points): Don't declare.
3757 * server.c (debug_hw_points): Don't define. Replace all uses
3758 with show_debug_regs.
3759 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3760 all uses with show_debug_regs.
3761
2e4bb98a
EBM
37622014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3763
3764 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3765 endianness into account.
3766 (ppc_supply_ptrace_register): Likewise.
3767
ac740bc7
JH
37682014-09-03 James Hogan <james.hogan@imgtec.com>
3769
3770 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3771 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3772
97ea6506
GB
37732014-09-03 Gary Benson <gbenson@redhat.com>
3774
3775 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3776 ALL_DEBUG_ADDRESS_REGISTERS.
3777
df7e5265
GB
37782014-09-02 Gary Benson <gbenson@redhat.com>
3779
3780 * i386-low.h: Renamed as...
3781 * x86-low.h: New file. All type, function and variable name
3782 prefixes changed from "i386_" to "x86_". All references updated.
3783 * i386-low.c: Renamed as...
3784 * x86-low.c: New file. All type, function and variable name
3785 prefixes changed from "i386_" to "x86_". All references updated.
3786
ed859da7
GB
37872014-09-02 Gary Benson <gbenson@redhat.com>
3788
3789 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3790 (x86_linux_new_thread): Likewise.
3791
860789c7
GB
37922014-08-29 Gary Benson <gbenson@redhat.com>
3793
3794 * server.h (setjmp.h): Do not include.
3795 (toplevel): Do not declare.
3796 (common-exceptions.h): Include.
3797 (cleanups.h): Likewise.
3798 * server.c (toplevel): Do not define.
3799 (exit_code): New static global.
3800 (detach_or_kill_for_exit_cleanup): New function.
3801 (main): New function. Original main renamed to...
3802 (captured_main): New function.
3803 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3804
ff55e1b5
GB
38052014-08-29 Gary Benson <gbenson@redhat.com>
3806
3807 * Makefile.in (SFILES): Add common/common-exceptions.c.
3808 (OBS): Add common-exceptions.o.
3809 (common-exceptions.o): New rule.
3810 * utils.c (prepare_to_throw_exception): New function.
3811
e9bcb658
GB
38122014-08-29 Gary Benson <gbenson@redhat.com>
3813
3814 * config.in: Regenerate.
3815 * configure: Likewise.
3816
e3180625
GB
38172014-08-29 Gary Benson <gbenson@redhat.com>
3818
3819 * Makefile.in (SFILES): Add common/cleanups.c.
3820 (OBS): cleanups.o.
3821 (cleanups.o): New rule.
3822
e3d6ba5d
GB
38232014-08-29 Gary Benson <gbenson@redhat.com>
3824
3825 * utils.c (internal_vwarning): New function.
3826
7096e886
GB
38272014-08-28 Gary Benson <gbenson@redhat.com>
3828
3829 * utils.h (fatal): Remove declaration.
3830 * utils.c (fatal): Remove function.
3831
14ce3192
GB
38322014-08-28 Gary Benson <gbenson@redhat.com>
3833
3834 * tracepoint.c (gdb_agent_init): Replace fatal with
3835 perror_with_name.
3836 (initialize_tracepoint): Likewise.
3837
50278d59
GB
38382014-08-28 Gary Benson <gbenson@redhat.com>
3839
3840 * remote-utils.c (remote_prepare): Replace fatal with error.
3841
aa96c426
GB
38422014-08-28 Gary Benson <gbenson@redhat.com>
3843
3844 * linux-low.c (linux_async): Replace fatal with warning.
3845 Tidy up and return.
3846 (linux_start_non_stop): Return -1 if linux_async failed.
3847
f7160e97
GB
38482014-08-28 Gary Benson <gbenson@redhat.com>
3849
3850 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3851 gdb_assert.
3852 (i386_dr_low_get_addr): Remove vague comment.
3853 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3854 gdb_assert.
3855
38e08fca
GB
38562014-08-28 Gary Benson <gbenson@redhat.com>
3857
3858 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3859 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3860 internal_error.
3861 (linux_resume_one_lwp): Likewise.
3862 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3863 gdb_assert.
3864 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3865 with internal_error.
3866 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3867 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3868 (find_register_by_name): Replace fatal with internal_error.
3869 (find_regno): Likewise.
3870 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3871 * thread-db.c (thread_db_create_event): Likewise.
3872 (thread_db_load_search): Likewise.
3873 (try_thread_db_load_1): Likewise.
3874 * tracepoint.c (get_jump_space_head): Replace fatal with
3875 internal_error.
3876 (claim_trampoline_space): Likewise.
3877 (have_fast_tracepoint_trampoline_buffer): Likewise.
3878 (cmd_qtstart): Likewise.
3879 (stop_tracing): Likewise.
3880 (fast_tracepoint_collecting): Likewise.
3881 (target_malloc): Likewise.
3882 (download_tracepoint): Likewise.
3883 (download_trace_state_variables): Replace check with gdb_assert.
3884 (upload_fast_traceframes): Replace fatal with internal_error.
3885
34abf635
GB
38862014-08-19 Tom Tromey <tromey@redhat.com>
3887 Gary Benson <gbenson@redhat.com>
3888
3889 * Makefile.in (SFILES): Add common/common-debug.c.
3890 (OBS): Add common-debug.o.
3891 (common-debug.o): New rule.
3892 * debug.h (debug_printf): Don't declare.
3893 * debug.c (debug_printf): Renamed and rewritten as...
3894 (debug_vprintf): New function.
3895
f6e94d78
GB
38962014-08-19 Gary Benson <gbenson@redhat.com>
3897
3898 * utils.h: Do not include print-utils.h.
3899
9239eeab
GB
39002014-08-19 Tom Tromey <tromey@redhat.com>
3901 Gary Benson <gbenson@redhat.com>
3902
3903 * server.h: Add static assertion.
3904 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3905
ef87c8bb
GB
39062014-08-19 Tom Tromey <tromey@redhat.com>
3907 Gary Benson <gbenson@redhat.com>
3908
3909 * Makefile.in (SFILES): Add common/errors.c.
3910 (OBS): Add errors.o.
3911 (IPA_OBS): Add errors-ipa.o.
3912 (errors.o): New rule.
3913 (errors-ipa.o): Likewise.
3914 * utils.h (perror_with_name, error, warning): Don't declare.
3915 * utils.c (warning): Renamed and rewritten as...
3916 (vwarning): New function.
3917 (error): Renamed and rewritten as...
3918 (verror): New function.
3919 (internal_error): Renamed and rewritten as...
3920 (internal_verror): New function.
3921
bb974a24
GB
39222014-08-07 Gary Benson <gbenson@redhat.com>
3923
3924 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3925 * configure: Regenerate.
3926 * config.in: Likewise.
3927 * server.h: Do not include errno.h.
3928 * event-loop.c: Likewise.
3929 * hostio-errno.c: Likewise.
3930 * linux-low.c: Likewise.
3931 * remote-utils.c: Likewise.
3932 * spu-low.c: Likewise.
3933 * utils.c: Likewise.
3934 * gdbreplay.c: Unconditionally include errno.h.
3935
6d3d12eb
GB
39362014-08-07 Gary Benson <gbenson@redhat.com>
3937
3938 * server.h: Do not include string.h.
3939 * event-loop.c: Likewise.
3940 * linux-low.c: Likewise.
3941 * regcache.c: Likewise.
3942 * remote-utils.c: Likewise.
3943 * spu-low.c: Likewise.
3944 * utils.c: Likewise.
3945
dccbb609
GB
39462014-08-07 Gary Benson <gbenson@redhat.com>
3947
3948 * server.h: Do not include gdb_assert.h.
3949
e76df0d0
GB
39502014-08-07 Gary Benson <gbenson@redhat.com>
3951
3952 * server.h: Do not include common-utils.h.
3953
4cb9c816
GB
39542014-08-07 Gary Benson <gbenson@redhat.com>
3955
3956 * server.h: Do not include ptid.h.
3957 * notif.h: Likewise.
3958
3995eeee
GB
39592014-08-07 Gary Benson <gbenson@redhat.com>
3960
3961 * server.h: Do not include gdb_locale.h.
3962
cb9f1a9b
GB
39632014-08-07 Gary Benson <gbenson@redhat.com>
3964
3965 * server.h: Do not include gdb/signals.h.
3966 * win32-low.c: Likewise.
3967
a5fceff8
GB
39682014-08-07 Gary Benson <gbenson@redhat.com>
3969
3970 * server.h: Do not include pathmax.h.
3971
b9391142
GB
39722014-08-07 Gary Benson <gbenson@redhat.com>
3973
3974 * server.h: Do not include libiberty.h.
3975 * linux-bfin-low.c: Likewise.
3976
0e443c87
GB
39772014-08-07 Gary Benson <gbenson@redhat.com>
3978
3979 * server.h: Do not include ansidecl.h.
3980
8ebb3f56
GB
39812014-08-07 Gary Benson <gbenson@redhat.com>
3982
3983 * linux-x86-low.c: Do not include stddef.h.
3984 * lynx-ppc-low.c: Likewise.
3985 * tracepoint.c: Likewise.
3986
8980bdf6
GB
39872014-08-07 Gary Benson <gbenson@redhat.com>
3988
3989 * server.h: Do not include stdarg.h.
3990 * nto-low.c: Likewise.
3991
d7096f71
GB
39922014-08-07 Gary Benson <gbenson@redhat.com>
3993
3994 * server.h: Do not include stdlib.h.
3995 * inferiors.c: Likewise.
3996 * linux-low.c: Likewise.
3997 * regcache.c: Likewise.
3998 * spu-low.c: Likewise.
3999 * tracepoint.c: Likewise.
4000 * utils.c: Likewise.
4001
d02f550d
GB
40022014-08-07 Gary Benson <gbenson@redhat.com>
4003
4004 * server.h: Do not include stdio.h.
4005 * linux-low.c: Likewise.
4006 * remote-utils.c: Likewise.
4007 * spu-low.c: Likewise.
4008 * utils.c: Likewise.
4009 * wincecompat.c: Likewise.
4010
87f6c4e3
GB
40112014-08-06 Gary Benson <gbenson@redhat.com>
4012
4013 * regcache.c (init_register_cache): Move conditionals inside if.
4014
7089dca4
GB
40152014-08-06 Gary Benson <gbenson@redhat.com>
4016
4017 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4018
462f517e
GB
40192014-07-31 Gary Benson <gbenson@redhat.com>
4020
4021 * ax.h: Do not include server.h.
4022 * gdbthread.h: Likewise.
4023 * lynx-low.h: Likewise.
4024 * notif.h: Likewise.
4025
976411d6
GB
40262014-07-30 Gary Benson <gbenson@redhat.com>
4027
4028 * server.h: Include common-defs.h.
4029 Do not include config.h or build-gnulib-gdbserver/config.h.
4030
d41f6d8e
GB
40312014-07-30 Gary Benson <gbenson@redhat.com>
4032
4033 * hostio-errno.c: Move server.h to top of includes list.
4034 * inferiors.c: Likewise.
4035 * linux-x86-low.c: Likewise.
4036 * notif.c: Include server.h.
4037
314c6a35
TT
40382014-07-24 Tom Tromey <tromey@redhat.com>
4039 Gary Benson <gbenson@redhat.com>
4040
4041 * server.h (CORE_ADDR): Now unsigned.
4042
69ff6be5
PA
40432014-07-16 Pedro Alves <palves@redhat.com>
4044
4045 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4046
ce9e3fe7
PA
40472014-07-15 Pedro Alves <palves@redhat.com>
4048
4049 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4050 copy.
4051
e76126e8
PA
40522014-07-11 Pedro Alves <palves@redhat.com>
4053
4054 * linux-low.c (kill_wait_lwp): New function, based on
4055 kill_one_lwp_callback, but use my_waitpid directly.
4056 (kill_one_lwp_callback, linux_kill): Use it.
4057
8e9db26e
PA
40582014-06-23 Pedro Alves <palves@redhat.com>
4059
4060 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4061 before setting DR0..DR3.
4062
698b3e08
GB
40632014-06-20 Gary Benson <gbenson@redhat.com>
4064
4065 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4066 * configure: Regenerated.
4067 * config.in: Likewise.
4068
125f8a3d
GB
40692014-06-20 Gary Benson <gbenson@redhat.com>
4070
4071 * Makefile.in (SFILES): Update locations for files moved
4072 from common to nat.
4073 (object file files): Reordered.
4074
42995dbd
GB
40752014-06-20 Gary Benson <gbenson@redhat.com>
4076
4077 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4078 (i386_dr_low_set_addr): Likewise.
4079 (i386_dr_low_get_addr): Likewise.
4080 (i386_dr_low_can_set_control): Likewise.
4081 (i386_dr_low_set_control): Likewise.
4082 (i386_dr_low_get_control): Likewise.
4083 (i386_dr_low_get_status): Likewise.
4084 (i386_get_debug_register_length): Likewise.
4085 * linux-x86-low.c (i386_dr_low_set_addr):
4086 Changed signature. Made static.
4087 (i386_dr_low_get_addr): Likewise.
4088 (i386_dr_low_set_control): Likewise.
4089 (i386_dr_low_get_control): Likewise.
4090 (i386_dr_low_get_status): Likewise.
4091 (i386_dr_low): New global variable.
4092 * win32-i386-low.c (i386_dr_low_set_addr):
4093 Changed signature. Made static.
4094 (i386_dr_low_get_addr): Likewise.
4095 (i386_dr_low_set_control): Likewise.
4096 (i386_dr_low_get_control): Likewise.
4097 (i386_dr_low_get_status): Likewise.
4098 (i386_dr_low): New global variable.
4099
e1d2394b
MS
41002014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4101
4102 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4103 * Makefile.in (AR, AR_FLAGS): Define.
4104 * configure: Regenerate.
4105
3a8ee006
GB
41062014-06-19 Gary Benson <gbenson@redhat.com>
4107
4108 * Makefile.in (i386-dregs.o): New rule.
4109 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4110 * i386-low.c (target.h): Remove include.
4111 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4112 (DR_CONTROL_SHIFT): Likewise.
4113 (DR_CONTROL_SIZE): Likewise.
4114 (DR_RW_EXECUTE): Likewise.
4115 (DR_RW_WRITE): Likewise.
4116 (DR_RW_READ): Likewise.
4117 (DR_RW_IORW): Likewise.
4118 (DR_LEN_1): Likewise.
4119 (DR_LEN_2): Likewise.
4120 (DR_LEN_4): Likewise.
4121 (DR_LEN_8): Likewise.
4122 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4123 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4124 (DR_ENABLE_SIZE): Likewise.
4125 (DR_LOCAL_SLOWDOWN): Likewise.
4126 (DR_GLOBAL_SLOWDOWN): Likewise.
4127 (DR_CONTROL_RESERVED): Likewise.
4128 (I386_DR_CONTROL_MASK): Likewise.
4129 (I386_DR_VACANT): Likewise.
4130 (I386_DR_LOCAL_ENABLE): Likewise.
4131 (I386_DR_GLOBAL_ENABLE): Likewise.
4132 (I386_DR_DISABLE): Likewise.
4133 (I386_DR_SET_RW_LEN): Likewise.
4134 (I386_DR_GET_RW_LEN): Likewise.
4135 (I386_DR_WATCH_HIT): Likewise.
4136 (i386_wp_op_t): Likewise.
4137 (i386_show_dr): Likewise.
4138 (i386_length_and_rw_bits): Likewise.
4139 (i386_insert_aligned_watchpoint): Likewise.
4140 (i386_remove_aligned_watchpoint): Likewise.
4141 (i386_handle_nonaligned_watchpoint): Likewise.
4142 i386_update_inferior_debug_regs(): Likewise.
4143 (i386_dr_insert_watchpoint): Likewise.
4144 (i386_dr_remove_watchpoint): Likewise.
4145 (i386_dr_region_ok_for_watchpoint): Likewise.
4146 (i386_dr_stopped_data_address): Likewise.
4147 (i386_dr_stopped_by_watchpoint): Likewise.
4148
8f26655c
GB
41492014-06-19 Gary Benson <gbenson@redhat.com>
4150
4151 * i386-low.c (i386_dr_show): Renamed to
4152 i386_show_dr and made static. All uses updated.
4153 (i386_dr_length_and_rw_bits): Renamed to
4154 i386_length_and_rw_bits and made static.
4155 All uses updated.
4156 (i386_dr_insert_aligned_watchpoint): Renamed to
4157 i386_insert_aligned_watchpoint and made static.
4158 All uses updated.
4159 (i386_dr_remove_aligned_watchpoint): Renamed to
4160 i386_remove_aligned_watchpoint and made static.
4161 All uses updated.
4162 (i386_dr_update_inferior_debug_regs): Renamed to
4163 i386_update_inferior_debug_regs and made static.
4164 All uses updated.
4165
b9228891
GB
41662014-06-18 Gary Benson <gbenson@redhat.com>
4167
5171def3
GB
4168 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4169 (i386_dr_low_can_set_control): Likewise.
4170 (i386_get_debug_register_length): Likewise.
4171 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4172 (i386_dr_low_can_set_control): Likewise.
4173 (i386_get_debug_register_length): Likewise.
4174
41752014-06-17 Gary Benson <gbenson@redhat.com>
4176
b9228891
GB
4177 * i386-low.h (i386-dregs.h): New include.
4178 (DR_FIRSTADDR): Now in i386-dregs.h.
4179 (DR_LASTADDR): Likewise.
4180 (DR_NADDR): Likewise.
4181 (DR_STATUS): Likewise.
4182 (DR_CONTROL): Likewise.
4183 (i386_debug_reg_state): Likewise.
4184 (i386_dr_insert_watchpoint): Likewise.
4185 (i386_dr_remove_watchpoint): Likewise.
4186 (i386_dr_region_ok_for_watchpoint): Likewise.
4187 (i386_dr_stopped_data_address): Likewise.
4188 (i386_dr_stopped_by_watchpoint): Likewise.
4189 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4190
4be83cc2
GB
41912014-06-18 Gary Benson <gbenson@redhat.com>
4192
4193 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4194 i386_dr_insert_watchpoint.
4195 (i386_low_remove_watchpoint): Renamed to
4196 i386_dr_remove_watchpoint.
4197 (i386_low_region_ok_for_watchpoint): Renamed to
4198 i386_dr_region_ok_for_watchpoint.
4199 (i386_low_stopped_data_address): Renamed to
4200 i386_dr_stopped_data_address.
4201 (i386_low_stopped_by_watchpoint): Renamed to
4202 i386_dr_stopped_by_watchpoint.
4203 * i386-low.c (i386_show_dr): Renamed to
4204 i386_dr_show and made nonstatic. All uses updated.
4205 (i386_length_and_rw_bits): Renamed to
4206 i386_dr_length_and_rw_bits and made nonstatic.
4207 All uses updated.
4208 (i386_insert_aligned_watchpoint): Renamed to
4209 i386_dr_insert_aligned_watchpoint and made nonstatic.
4210 All uses updated.
4211 (i386_remove_aligned_watchpoint): Renamed to
4212 i386_dr_remove_aligned_watchpoint and made nonstatic.
4213 All uses updated.
4214 (i386_update_inferior_debug_regs): Renamed to
4215 i386_dr_update_inferior_debug_regs and made nonstatic.
4216 All uses updated.
4217 (i386_low_insert_watchpoint): Renamed to
4218 i386_dr_insert_watchpoint. All uses updated.
4219 (i386_low_remove_watchpoint): Renamed to
4220 i386_dr_remove_watchpoint. All uses updated.
4221 (i386_low_region_ok_for_watchpoint): Renamed to
4222 i386_dr_region_ok_for_watchpoint. All uses updated.
4223 (i386_low_stopped_data_address): Renamed to
4224 i386_dr_stopped_data_address. All uses updated.
4225 (i386_low_stopped_by_watchpoint): Renamed to
4226 i386_dr_stopped_by_watchpoint. All uses updated.
4227
131aa0d4
GB
42282014-06-18 Gary Benson <gbenson@redhat.com>
4229
4230 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4231 (i386_dr_low_can_set_control): Likewise.
4232 (i386_insert_aligned_watchpoint): New check.
4233
d9305f7f
GB
42342014-06-18 Gary Benson <gbenson@redhat.com>
4235
4236 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4237 Renamed to state.
4238
e927c9fc
GB
42392014-06-18 Gary Benson <gbenson@redhat.com>
4240
4241 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4242 instead of fatal and error.
4243 (i386_handle_nonaligned_watchpoint): Likewise.
4244
1b6d4134
GB
42452014-06-18 Gary Benson <gbenson@redhat.com>
4246
4247 * i386-low.c (i386_get_debug_register_length): New macro.
4248 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4249 (i386_show_dr): Use debug_printf instead of fprintf. Use
4250 phex to format values.
4251
6e62758f
GB
42522014-06-18 Gary Benson <gbenson@redhat.com>
4253
4254 * i386-low.h: Comment changes.
4255 * i386-low.c: Likewise.
4256
fc6e2f03
GB
42572014-06-18 Gary Benson <gbenson@redhat.com>
4258
4259 * i386-low.c: Whitespace changes.
4260
f9d1eeed
TT
42612014-06-12 Tom Tromey <tromey@redhat.com>
4262
4263 * utils.c (freeargv): Remove.
4264
0b04e523
TT
42652014-06-12 Tom Tromey <tromey@redhat.com>
4266
4267 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4268 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4269 (parse_debug_format_options): Likewise.
4270 (gdbserver_usage): Likewise.
4271 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4272 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4273 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4274 against libiberty.
4275 ($(LIBGNU)): Depend on libiberty.
4276 (all-lib): Recurse into all subdirs.
4277 (install-only): Invoke "install" target in subdirs.
4278 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4279 targets.
4280 * configure: Rebuild.
4281 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4282 for vasprintf, vsnprintf, or gettimeofday.
4283 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4284 srv_tgtobj.
4285
270c9937
JB
42862014-06-05 Joel Brobecker <brobecker@adacore.com>
4287
4288 * development.sh: Delete.
4289 * Makefile.in (config.status): Adjust dependency on development.sh.
4290 * configure.ac: Adjust development.sh source call.
4291 * configure: Regenerate.
4292
0a261ed8
PA
42932014-06-02 Pedro Alves <palves@redhat.com>
4294
4295 * ax.c (gdb_free_agent_expr): New function.
4296 * ax.h (gdb_free_agent_expr): New declaration.
4297 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4298 list.
4299 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4300 static.
4301 (clear_breakpoint_conditions_and_commands): New function.
4302 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4303 (clear_breakpoint_conditions_and_commands): New declaration.
4304
e9dae05e
RR
43052014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4306
4307 * linux-aarch64-low.c (asm/ptrace.h): Include.
4308
5876f503
JK
43092014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4310
4311 Fix TLS access for -static -pthread.
4312 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4313 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4314 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4315
802e8e6d
PA
43162014-05-20 Pedro Alves <palves@redhat.com>
4317
4318 * linux-aarch64-low.c (aarch64_insert_point)
4319 (aarch64_remove_point): No longer check whether the type is
4320 supported here. Adjust to new interface.
4321 (the_low_target): Install aarch64_supports_z_point_type as
4322 supports_z_point_type method.
4323 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4324 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4325 instead of a Z packet char. Adjust.
4326 (arm_supports_z_point_type): New function.
4327 (arm_insert_point, arm_remove_point): Adjust to new interface.
4328 (the_low_target): Install arm_supports_z_point_type.
4329 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4330 (cris_insert_point, cris_remove_point): Adjust to new interface.
4331 Don't check whether the type is supported here.
4332 (the_low_target): Install cris_supports_z_point_type.
4333 * linux-low.c (linux_supports_z_point_type): New function.
4334 (linux_insert_point, linux_remove_point): Adjust to new interface.
4335 * linux-low.h (struct linux_target_ops) <insert_point,
4336 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4337 raw_breakpoint pointer parameter.
4338 <supports_z_point_type>: New method.
4339 * linux-mips-low.c (mips_supports_z_point_type): New function.
4340 (mips_insert_point, mips_remove_point): Adjust to new interface.
4341 Use mips_supports_z_point_type.
4342 (the_low_target): Install mips_supports_z_point_type.
4343 * linux-ppc-low.c (the_low_target): Install NULL as
4344 supports_z_point_type method.
4345 * linux-s390-low.c (the_low_target): Install NULL as
4346 supports_z_point_type method.
4347 * linux-sparc-low.c (the_low_target): Install NULL as
4348 supports_z_point_type method.
4349 * linux-x86-low.c (x86_supports_z_point_type): New function.
4350 (x86_insert_point): Adjust to new insert_point interface. Use
4351 insert_memory_breakpoint. Adjust to new
4352 i386_low_insert_watchpoint interface.
4353 (x86_remove_point): Adjust to remove_point interface. Use
4354 remove_memory_breakpoint. Adjust to new
4355 i386_low_remove_watchpoint interface.
4356 (the_low_target): Install x86_supports_z_point_type.
4357 * lynx-low.c (lynx_target_ops): Install NULL as
4358 supports_z_point_type callback.
4359 * nto-low.c (nto_supports_z_point_type): New.
4360 (nto_insert_point, nto_remove_point): Adjust to new interface.
4361 (nto_target_ops): Install nto_supports_z_point_type.
4362 * mem-break.c: Adjust intro comment.
4363 (struct raw_breakpoint) <raw_type, size>: New fields.
4364 <inserted>: Update comment.
4365 <shlib_disabled>: Delete field.
4366 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4367 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4368 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4369 (raw_bkpt_type_to_target_hw_bp_type): New function.
4370 (find_enabled_raw_code_breakpoint_at): New function.
4371 (find_raw_breakpoint_at): New type and size parameters. Use them.
4372 (insert_memory_breakpoint): New function, based off
4373 set_raw_breakpoint_at.
4374 (remove_memory_breakpoint): New function.
4375 (set_raw_breakpoint_at): Reimplement.
4376 (set_breakpoint): New, based on set_breakpoint_at.
4377 (set_breakpoint_at): Reimplement.
4378 (delete_raw_breakpoint): Go through the_target->remove_point
4379 instead of assuming memory breakpoints.
4380 (find_gdb_breakpoint_at): Delete.
4381 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4382 (find_gdb_breakpoint): New function.
4383 (set_gdb_breakpoint_at): Delete.
4384 (z_type_supported): New function.
4385 (set_gdb_breakpoint_1): New function, loosely based off
4386 set_gdb_breakpoint_at.
4387 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4388 (delete_gdb_breakpoint_at): Delete.
4389 (delete_gdb_breakpoint_1): New function, loosely based off
4390 delete_gdb_breakpoint_at.
4391 (delete_gdb_breakpoint): New function.
4392 (clear_gdb_breakpoint_conditions): Rename to ...
4393 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4394 breakpoint.
4395 (add_condition_to_breakpoint): Make static.
4396 (add_breakpoint_condition): Take a struct breakpoint pointer
4397 instead of an address. Adjust.
4398 (gdb_condition_true_at_breakpoint): Rename to ...
4399 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4400 z_type parameter.
4401 (gdb_condition_true_at_breakpoint): Reimplement.
4402 (add_breakpoint_commands): Take a struct breakpoint pointer
4403 instead of an address. Adjust.
4404 (gdb_no_commands_at_breakpoint): Rename to ...
4405 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4406 parameter. Return true if no breakpoint was found. Change debug
4407 output.
4408 (gdb_no_commands_at_breakpoint): Reimplement.
4409 (run_breakpoint_commands): Rename to ...
4410 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4411 and change return type to boolean.
4412 (run_breakpoint_commands): New function.
4413 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4414 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4415 breakpoint. Go through the_target->remove_point instead of
4416 assuming memory breakpoint.
4417 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4418 software and hardware breakpoints.
4419 (reinsert_raw_breakpoint): Go through the_target->insert_point
4420 instead of assuming memory breakpoint.
4421 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4422 software and hardware breakpoints.
4423 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4424 Check both software and hardware breakpoints.
4425 (validate_inserted_breakpoint): Assert the breakpoint is a
4426 software breakpoint. Set the inserted flag to -1 instead of
4427 setting shlib_disabled.
4428 (delete_disabled_breakpoints): Adjust.
4429 (validate_breakpoints): Only validate software breakpoints.
4430 Adjust to inserted flag change.
4431 (check_mem_read, check_mem_write): Skip breakpoint types other
4432 than software breakpoints. Adjust to inserted flag change.
4433 * mem-break.h (enum raw_bkpt_type): New enum.
4434 (raw_breakpoint, struct process_info): Forward declare.
4435 (Z_packet_to_target_hw_bp_type): Delete declaration.
4436 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4437 (set_gdb_breakpoint, delete_gdb_breakpoint)
4438 (clear_breakpoint_conditions): New declarations.
4439 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4440 (breakpoint_inserted_here): Update comment.
4441 (add_breakpoint_condition, add_breakpoint_commands): Replace
4442 address parameter with a breakpoint pointer parameter.
4443 (gdb_breakpoint_here): Update comment.
4444 (delete_gdb_breakpoint_at): Delete.
4445 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4446 * server.c (process_point_options): Take a struct breakpoint
4447 pointer instead of an address. Adjust.
4448 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4449 delete_gdb_breakpoint.
4450 * spu-low.c (spu_target_ops): Install NULL as
4451 supports_z_point_type method.
4452 * target.h: Include mem-break.h.
4453 (struct target_ops) <prepare_to_access_memory>: Update comment.
4454 <supports_z_point_type>: New field.
4455 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4456 instead of a char. Also take a raw breakpoint pointer.
4457 * win32-arm-low.c (the_low_target): Install NULL as
4458 supports_z_point_type.
4459 * win32-i386-low.c (i386_supports_z_point_type): New function.
4460 (i386_insert_point, i386_remove_point): Adjust to new interface.
4461 (the_low_target): Install i386_supports_z_point_type.
4462 * win32-low.c (win32_supports_z_point_type): New function.
4463 (win32_insert_point, win32_remove_point): Adjust to new interface.
4464 (win32_target_ops): Install win32_supports_z_point_type.
4465 * win32-low.h (struct win32_target_ops):
4466 <supports_z_point_type>: New method.
4467 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4468 instead of a char. Also take a raw breakpoint pointer.
4469
932539e3
PA
44702014-05-20 Pedro Alves <palves@redhat.com>
4471
4472 * mem-break.h: Include break-common.h.
4473 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4474 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4475 (Z_packet_to_target_hw_bp_type): New declaration.
4476 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4477 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4478 (Z_PACKET_ACCESS_WP): Delete macros.
4479 (Z_packet_to_hw_type): Delete function.
4480 * i386-low.h: Don't include break-common.h here.
4481 (Z_packet_to_hw_type): Delete declaration.
4482 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4483 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4484 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4485 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4486 * linux-aarch64-low.c: Don't include break-common.h here.
4487 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4488 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4489 (Z_packet_to_target_hw_bp_type): Delete function.
4490 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4491 function.
4492 (mips_insert_point, mips_remove_point): Use
4493 Z_packet_to_target_hw_bp_type.
4494
4ff0d3d8
PA
44952014-05-20 Pedro Alves <palves@redhat.com>
4496
4497 * linux-aarch64-low.c: Include break-common.h.
4498 (enum target_point_type): Delete.
4499 (Z_packet_to_point_type): Rename to ...
4500 (Z_packet_to_target_hw_bp_type): ... this, and return a
4501 target_hw_bp_type instead.
4502 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4503 instead of an enum target_point_type.
4504 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4505 breakpoint type.
4506 (aarch64_dr_state_insert_one_point)
4507 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4508 (aarch64_handle_aligned_watchpoint)
4509 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4510 Take an enum target_hw_bp_type instead of an enum
4511 target_point_type.
4512 (aarch64_supports_z_point_type): New function.
4513 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4514 use Z_packet_to_target_hw_bp_type.
4515
786dc519
JB
45162014-05-20 Joel Brobecker <brobecker@adacore.com>
4517
4518 * configure.ac: Only use -Werror by default when DEVELOPMENT
4519 is true.
4520 * configure: Regenerate.
4521
9e0aa64f
JK
45222014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4523
4524 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4525 * linux-x86-low.c (X86_64_USER_REGS): New.
4526 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4527
2b577b92
YQ
45282014-04-28 Yao Qi <yao@codesourcery.com>
4529
4530 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4531 name.
4532
94611da2
PA
45332014-04-25 Pedro Alves <palves@redhat.com>
4534
4535 PR server/16255
4536 * linux-low.c (linux_attach_fail_reason_string): New function.
4537 (linux_attach_lwp): Delete.
4538 (linux_attach_lwp_1): Rename to ...
4539 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4540 argument. Remove "initial" parameter. Return int instead of
4541 void. Don't error or warn here.
4542 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4543 failure to attach to the tgid. Call warning when failing to
4544 attach to an lwp.
4545 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4546 argument. Remove "initial" parameter. Return int instead of
4547 void. Don't error or warn here.
4548 (linux_attach_fail_reason_string): New declaration.
4549 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4550 interface change. Use linux_attach_fail_reason_string.
4551
01f9f808
MS
45522014-04-24 Michael Sturm <michael.sturm@mintel.com>
4553 Walfred Tedeschi <walfred.tedeschi@intel.com>
4554
4555 * Makefile.in: Added rules to handle new files
4556 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4557 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4558 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4559 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4560 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4561 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4562 x32-avx512-linux.o.
4563 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4564 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4565 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4566 i386/x32-avx512.xml.
4567 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4568 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4569 i386/x32-avx512-linux.xml.
4570 * i387-fp.c (num_avx512_k_registers): New constant for number
4571 of K registers.
4572 (num_avx512_zmmh_low_registers): New constant for number of
4573 lower ZMM registers (0-15).
4574 (num_avx512_zmmh_high_registers): New constant for number of
4575 higher ZMM registers (16-31).
4576 (num_avx512_ymmh_registers): New contant for number of higher
4577 YMM registers (ymm16-31 added by avx521 on x86_64).
4578 (num_avx512_xmm_registers): New constant for number of higher
4579 XMM registers (xmm16-31 added by AVX512 on x86_64).
4580 (struct i387_xsave): Add space for AVX512 registers.
4581 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4582 Add code to handle AVX512 registers.
4583 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4584 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4585 prototypei from generated file.
4586 (tdesc_amd64_avx512_linux): Likewise.
4587 (init_registers_x32_avx512_linux): Likewise.
4588 (tdesc_x32_avx512_linux): Likewise.
4589 (init_registers_i386_avx512_linux): Likewise.
4590 (tdesc_i386_avx512_linux): Likewise.
4591 (x86_64_regmap): Add AVX512 registers.
4592 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4593 mask.
4594 (initialize_low_arch): Add code to initialize AVX512 registers.
4595
51aa91f9
PA
45962014-04-23 Pedro Alves <palves@redhat.com>
4597
4598 * mem-break.c (find_gdb_breakpoint_at): Make static.
4599 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4600
a4165e94
PA
46012014-04-23 Pedro Alves <palves@redhat.com>
4602
4603 * i386-low.c: Don't include break-common.h here.
4604 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4605 prototype to take target_hw_bp_type as argument instead of a Z
4606 packet char.
4607 * i386-low.h: Include break-common.h here.
4608 (Z_packet_to_hw_type): Declare.
4609 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4610 prototypes.
4611 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4612 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4613 (x86_remove_point): Convert the packet number to a
4614 target_hw_bp_type before calling i386_low_remove_watchpoint.
4615 * win32-i386-low.c (i386_insert_point): Convert the packet number
4616 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4617 (i386_remove_point): Convert the packet number to a
4618 target_hw_bp_type before calling i386_low_remove_watchpoint.
4619
b8acf843
PA
46202014-04-23 Pedro Alves <palves@redhat.com>
4621
4622 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4623
d708bcd1
PA
46242014-04-10 Pedro Alves <palves@redhat.com>
4625
4626 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4627 Check if the condition or command is NULL before checking if the
4628 breakpoint is known. On success, return true.
4629 * mem-break.h (add_breakpoint_condition): Document return.
4630 (add_breakpoint_commands): Add describing comment.
4631 * server.c (skip_to_semicolon): New function.
4632 (process_point_options): Use it.
4633
2eec7d5b
PA
46342014-04-09 Pedro Alves <palves@redhat.com>
4635
4636 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4637 to lwpid_of.
4638
fa96cb38
PA
46392014-02-27 Pedro Alves <palves@redhat.com>
4640
4641 PR 12702
4642 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4643 macros.
4644 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4645 output.
4646 (last_thread_of_process_p): Take a PID argument instead of a
4647 thread pointer.
4648 (linux_wait_for_lwp): Delete.
4649 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4650 functions.
4651 (linux_low_filter_event): New function, party factored out from
4652 linux_wait_for_event.
4653 (linux_wait_for_event): Rename to ...
4654 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4655 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4656 sigsuspend. Check for zombie leaders.
4657 (linux_wait_for_event): Reimplement as wrapper around
4658 linux_wait_for_event_filtered.
4659 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4660 a normal or signal exit is seen, it's the whole process exiting.
4661 (wait_for_sigstop): No longer a for_each_inferior callback.
4662 Rewrite on top of linux_wait_for_event_filtered.
4663 (stop_all_lwps): Call wait_for_sigstop directly.
4664 * server.c (resume, handle_target_event): Handle
4665 TARGET_WAITKIND_NO_RESUMED.
4666
d763de10
JB
46672014-02-26 Joel Brobecker <brobecker@adacore.com>
4668
4669 * win32-low.c (psapi_get_dll_name,
4670 * win32_CreateToolhelp32Snapshot): Delete.
4671 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4672 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4673 Delete.
4674 (handle_load_dll): Add function description.
4675 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4676
850a0f76
JB
46772014-02-26 Joel Brobecker <brobecker@adacore.com>
4678
4679 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4680 Add comment.
4681 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4682 base address when calling win32_add_one_solib.
4683 (handle_load_dll): Delete local variable load_addr.
4684 Remove 0x1000 offset applied to DLL base address when calling
4685 win32_add_one_solib.
4686 (handle_unload_dll): Add comment.
4687
f25b3fc3
JB
46882014-02-26 Joel Brobecker <brobecker@adacore.com>
4689
4690 * win32-low.c (win32_add_all_dlls): Renames
4691 win32_ensure_ntdll_loaded. Rewrite function documentation.
4692 Adjust implementation to always load all DLLs.
4693 Add 0x1000 offset to DLL base address when calling
4694 win32_add_one_solib.
4695 (child_initialization_done): New static global.
4696 (do_initial_child_stuff): Set child_initialization_done to
4697 zero during child initialization, and 1 after. Replace call
4698 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4699 Add comment.
4700 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4701 (handle_unload_dll): Add function documentation.
4702 (get_child_debug_event): Ignore load and unload DLL events
4703 during child initialization.
4704
d86d4aaf
DE
47052014-02-20 Doug Evans <dje@google.com>
4706
3bc32da3 4707 Remove global all_lwps.
d86d4aaf
DE
4708 * inferiors.h (ptid_of): Move here from linux-low.h.
4709 (pid_of, lwpid_of): Ditto.
4710 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4711 parameter is a struct thread_info * now.
4712 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4713 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4714 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4715 directly.
4716 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4717 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4718 * linux-arm-low.c (update_registers_callback): Update, "entry"
4719 parameter is a struct thread_info * now.
4720 Fetch lwpid from current_inferior directly.
4721 (arm_insert_point): Pass &all_threads to find_inferior instead of
4722 &all_lwps.
4723 (arm_remove_point): Ditto.
4724 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4725 (arm_prepare_to_resume): Fetch pid from thread.
4726 (arm_read_description): Fetch lwpid from current_inferior directly.
4727 * linux-low.c (all_lwps): Delete.
4728 (delete_lwp): Delete call to remove_inferior.
4729 (handle_extended_wait): Fetch lwpid from thread.
4730 (add_lwp): Don't set lwp->entry.id. Remove call to
4731 add_inferior_to_list.
4732 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4733 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4734 (kill_one_lwp_callback): Ditto.
4735 (linux_kill): Don't dereference NULL pointer.
4736 Fetch ptid,lwpid from thread.
4737 (get_detach_signal): Fetch ptid from thread.
4738 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4739 Simplify call to regcache_invalidate_thread.
4740 (delete_lwp_callback): Update, "entry" parameter is a
4741 struct thread_info * now. Fetch pid from thread.
4742 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4743 (status_pending_p_callback): Update, "entry" parameter is a
4744 struct thread_info * now. Fetch ptid from thread.
4745 (find_lwp_pid): Update, "entry" parameter is a
4746 struct thread_info * now.
4747 (linux_wait_for_lwp): Fetch pid from thread.
4748 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4749 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4750 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4751 (dequeue_one_deferred_signal): Ditto.
4752 (cancel_breakpoint): Fetch ptid from current_inferior.
4753 (linux_wait_for_event): Pass &all_threads to find_inferior,
4754 not &all_lwps. Fetch ptid, lwpid from thread.
4755 (count_events_callback): Update, "entry" parameter is a
4756 struct thread_info * now.
4757 (select_singlestep_lwp_callback): Ditto.
4758 (select_event_lwp_callback): Ditto.
4759 (cancel_breakpoints_callback): Ditto.
4760 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4761 not &all_lwps.
4762 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4763 (unsuspend_one_lwp): Update, "entry" parameter is a
4764 struct thread_info * now.
4765 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4766 not &all_lwps.
4767 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4768 Fetch lwpid from thread, not lwp.
4769 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4770 Pass &all_threads to find_inferior, not &all_lwps.
4771 (send_sigstop): Fetch lwpid from thread, not lwp.
4772 (send_sigstop_callback): Update, "entry" parameter is a
4773 struct thread_info * now.
4774 (suspend_and_send_sigstop_callback): Ditto.
4775 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4776 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4777 struct thread_info * now.
4778 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4779 from thread, lwp.
4780 (lwp_running): Update, "entry" parameter is a
4781 struct thread_info * now.
4782 (stop_all_lwps): Fetch ptid from thread.
4783 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4784 (linux_resume_one_lwp): Fetch lwpid from thread.
4785 (linux_set_resume_request): Update, "entry" parameter is a
4786 struct thread_info * now. Fetch pid, lwpid from thread.
4787 (resume_status_pending_p): Update, "entry" parameter is a
4788 struct thread_info * now.
4789 (need_step_over_p): Ditto. Fetch lwpid from thread.
4790 (start_step_over): Fetch lwpid from thread.
4791 (linux_resume_one_thread): Update, "entry" parameter is a
4792 struct thread_info * now. Fetch lwpid from thread.
4793 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4794 (proceed_one_lwp): Update, "entry" parameter is a
4795 struct thread_info * now. Fetch lwpid from thread.
4796 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4797 struct thread_info * now.
4798 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4799 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4800 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4801 directly.
4802 (regsets_store_inferior_registers): Ditto.
4803 (fetch_register, store_register): Ditto.
4804 (linux_read_memory, linux_write_memory): Ditto.
4805 (linux_request_interrupt): Ditto.
4806 (linux_read_auxv): Ditto.
4807 (linux_xfer_siginfo): Ditto.
4808 (linux_qxfer_spu): Ditto.
4809 (linux_qxfer_libraries_svr4): Ditto.
4810 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4811 moved to inferiors.h.
4812 (get_lwp): Delete.
4813 (get_thread_lwp): Update.
4814 (struct lwp_info): Delete member "entry". Simplify comment for
4815 member "thread".
4816 (all_lwps): Delete.
4817 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4818 current_inferior directly.
4819 (update_watch_registers_callback): Update, "entry" parameter is a
4820 struct thread_info * now. Fetch pid from thread.
4821 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4822 (mips_insert_point): Fetch lwpid from current_inferior.
4823 Pass &all_threads to find_inferior, not &all_lwps.
4824 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4825 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4826 directly.
4827 (mips_stopped_data_address): Ditto.
4828 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4829 directly.
4830 * linux-tile-low.c (tile_arch_setup): Ditto.
4831 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4832 (update_debug_registers_callback): Update, "entry" parameter is a
4833 struct thread_info * now. Fetch pid from thread.
4834 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4835 Pass &all_threads to find_inferior, not &all_lwps.
4836 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4837 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4838 Pass &all_threads to find_inferior, not &all_lwps.
4839 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4840 (i386_dr_low_get_status): Ditto.
4841 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4842 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4843 (x86_linux_read_description): Ditto.
4844 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4845
3b8361aa
DE
48462014-02-20 Doug Evans <dje@google.com>
4847
4848 * inferiors.c (get_first_inferior): Fix buglet.
4849
f7667f0d
DE
48502014-02-19 Doug Evans <dje@google.com>
4851
4852 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4853 * inferiors.c (add_thread): Change result type to struct thread_info *.
4854 All callers updated.
4855 (add_lwp): Call add_thread here instead of in callers.
4856 All callers updated.
4857 * linux-low.h (get_lwp_thread): Rewrite.
4858 (struct lwp_info): New member "thread".
4859
b3312d80
DE
48602014-02-19 Doug Evans <dje@google.com>
4861
4862 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4863 All callers updated.
4864
ecc6f45c
DE
48652014-02-19 Doug Evans <dje@google.com>
4866
4867 * inferiors.c (add_thread): Fix whitespace.
4868
649ebbca
DE
48692014-02-19 Doug Evans <dje@google.com>
4870
4871 * dll.c (clear_dlls): Replace accessing list implemention details
4872 with API function.
4873 * gdbthread.h (get_first_thread): Declare.
4874 * inferiors.c (for_each_inferior_with_data): New function.
4875 (get_first_thread): New function.
4876 (find_thread_ptid): Simplify.
4877 (get_first_inferior): New function.
4878 (clear_list): Delete.
4879 (one_inferior_p): New function.
4880 (clear_inferior_list): New function.
4881 (clear_inferiors): Update.
4882 * inferiors.h (for_each_inferior_with_data): Declare.
4883 (clear_inferior_list): Declare.
4884 (one_inferior_p): Declare.
4885 (get_first_inferior): Declare.
4886 * linux-low.c (linux_wait_for_event): Replace accessing list
4887 implemention details with API function.
4888 * server.c (target_running): Ditto.
4889 (accumulate_file_name_length): New function.
4890 (emit_dll_description): New function.
4891 (handle_qxfer_libraries): Replace accessing list implemention
4892 details with API function.
4893 (handle_qxfer_threads_worker): New function.
4894 (handle_qxfer_threads_proper): Replace accessing list implemention
4895 details with API function.
4896 (handle_query): Ditto.
4897 (visit_actioned_threads_callback_ftype): New typedef.
4898 (visit_actioned_threads_data): New struct.
4899 (visit_actioned_threads): Rewrite to be find_inferior callback.
4900 (resume): Call find_inferior.
4901 (handle_status): Replace accessing list implemention
4902 details with API function.
4903 (process_serial_event): Replace accessing list implemention details
4904 with API function.
4905 * target.c (set_desired_inferior): Replace accessing list implemention
4906 details with API function.
4907 * tracepoint.c (same_process_p): New function.
4908 (gdb_agent_about_to_close): Replace accessing list implemention
4909 details with API function.
4910 * win32-low.c (child_delete_thread): Replace accessing list
4911 implemention details with API function.
4912 (match_dll_by_basename): New function.
4913 (dll_is_loaded_by_basename): New function.
4914 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4915 details call to dll_is_loaded_by_basename.
4916
80894984
DE
49172014-02-19 Doug Evans <dje@google.com>
4918
4919 * dll.h (struct dll_info): Add comment.
4920 * gdbthread.h (struct thread_info): Add comment.
4921 (current_ptid): Simplify.
4922 * inferiors.c (add_process): Update.
4923 (remove_process): Update.
4924 * inferiors.h (struct process_info): Rename member "head" to "entry".
4925 * linux-low.c (delete_lwp): Update.
4926 (add_lwp): Update.
4927 (last_thread_of_process_p): Update.
4928 (kill_one_lwp_callback, linux_kill): Update.
4929 (status_pending_p_callback): Update.
4930 (wait_for_sigstop): Update. Simplify read of ptid.
4931 (start_step_over): Update.
4932 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4933 (get_lwp_thread): Update.
4934 (struct lwp_info): Rename member "head" to "entry".
4935 * regcache.h (inferior_list_entry): Delete.
4936 * server.c (kill_inferior_callback): Update.
4937 (detach_or_kill_inferior_callback): Update.
4938 (print_started_pid): Update.
4939 (print_attached_pid): Update.
4940 (process_serial_event): Simplify read of ptid.
4941 * thread-db.c (thread_db_create_event): Update.
4942 (thread_db_get_tls_address): Update.
4943 * win32-low.c (current_inferior_ptid): Simplify.
4944
46917d26
TT
49452014-02-19 Tom Tromey <tromey@redhat.com>
4946
4947 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4948 argument.
4949 (target_supports_btrace): Update.
4950
0759a81e
YQ
49512014-02-14 Yao Qi <yao@codesourcery.com>
4952
4953 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4954 (rsp-low-ipa.o): New target.
4955
a7191e8b
TT
49562014-02-12 Tom Tromey <tromey@redhat.com>
4957
4958 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4959 convert_ascii_to_int.
4960 * regcache.c (registers_to_string): Likewise.
4961 * remote-utils.c (decode_M_packet): Likewise.
4962 * server.c (process_serial_event): Likewise.
4963
ff0e980e
TT
49642014-02-12 Tom Tromey <tromey@redhat.com>
4965
4966 * server.c (handle_query, handle_v_run): Use hex2bin, not
4967 unhexify.
4968 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4969
e9371aff
TT
49702014-02-12 Tom Tromey <tromey@redhat.com>
4971
4972 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4973 convert_int_to_ascii.
4974 * regcache.c (registers_to_string, collect_register_as_string):
4975 Likewise.
4976 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4977 Likewise.
4978 * server.c (process_serial_event): Likewise.
4979 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4980 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4981
971dc0b8
TT
49822014-02-12 Tom Tromey <tromey@redhat.com>
4983
4984 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4985 bin2hex, not hexify.
4986 * tracepoint.c (cmd_qtstatus): Likewise.
4987
0a822afb
TT
49882014-02-12 Tom Tromey <tromey@redhat.com>
4989
4990 * remote-utils.c (monitor_output): Pass explicit length to
4991 hexify.
4992
9c3d6531
TT
49932014-02-12 Tom Tromey <tromey@redhat.com>
4994
4995 * tracepoint.c: Include rsp-low.h.
4996 * server.c: Include rsp-low.h.
4997 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
4998 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
4999 declare.
5000 * remote-utils.c: Include rsp-low.h.
5001 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5002 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5003 (convert_int_to_ascii, convert_ascii_to_int): Move to
5004 common/rsp-low.c.
5005 * regcache.c: Include rsp-low.h.
5006 * ax.c: Include rsp-low.h.
5007 * Makefile.in (SFILES): Add common/rsp-low.c.
5008 (OBS): Add rsp-low.o.
5009 (rsp-low.o): New target.
5010
01fd3ea5
TT
50112014-02-12 Tom Tromey <tromey@redhat.com>
5012
5013 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5014 Include print-utils.h.
5015 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5016 (plongest, thirty_two, phex_nz): Remove.
5017 * Makefile.in (SFILES): Add common/print-utils.c.
5018 (OBS): Add print-utils.o.
5019 (print-utils-ipa.o): New target.
5020 (print-utils.o): New target.
5021 (IPA_OBJS): Add print-utils-ipa.o.
5022
e99dc820
TT
50232014-02-06 Tom Tromey <tromey@redhat.com>
5024
5025 * Makefile.in (SFILES): Fix indentation.
5026
ee1e2d4f
DE
50272014-02-05 Doug Evans <dje@google.com>
5028
5029 * linux-low.c (linux_wait_for_event): Improve comment.
5030 (linux_wait_1): Keep current_inferior in sync with event_child.
5031
f5a02773
DE
50322014-01-22 Doug Evans <dje@google.com>
5033
5034 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5035
87ce2a04
DE
50362014-01-22 Doug Evans <dje@google.com>
5037
5038 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5039 * configure: Regenerate.
5040 * config.in: Regenerate.
5041 * Makefile.in (SFILES): Add debug.c.
5042 (OBS): Add debug.o.
5043 * debug.c: New file.
5044 * debug.h: New file.
5045 * linux-aarch64-low.c (*): Update all debugging printfs to use
5046 debug_printf instead of fprintf.
5047 * linux-arm-low.c (*): Ditto.
5048 * linux-cris-low.c (*): Ditto.
5049 * linux-crisv32-low.c (*): Ditto.
5050 * linux-m32r-low.c (*): Ditto.
5051 * linux-sparc-low.c (*): Ditto.
5052 * linux-x86.c (*): Ditto.
5053 * linux-low.c (*): Ditto.
5054 (linux_wait_1): Add calls to debug_enter, debug_exit.
5055 (linux_wait): Remove redundant debugging printf.
5056 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5057 (linux_resume, unstop_all_lwps): Ditto.
5058 * mem-break.c (*): Update all debugging printfs to use
5059 debug_printf instead of fprintf.
5060 * remote-utils.c (*): Ditto.
5061 * thread-db.c (*): Ditto.
5062 * server.c #include <ctype.h>, "gdb_vecs.h".
5063 (debug_threads): Moved to debug.c.
5064 (*): Update all debugging printfs to use debug_printf instead of
5065 fprintf.
5066 (start_inferior): Replace call to fflush with call to debug_flush.
5067 (monitor_show_help): Mention set debug-format.
5068 (parse_debug_format_options): New function.
5069 (handle_monitor_command): Handle "monitor set debug-format".
5070 (gdbserver_usage): Mention --debug-format.
5071 (main): Parse --debug-format.
5072 * server.h (debug_threads): Declaration moved to debug.h.
5073 #include "debug.h".
5074 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5075 trace_debug_1 that uses debug_printf.
5076 (tracepoint_look_up_symbols): Update all debugging printfs to use
5077 debug_printf instead of fprintf.
5078
e671835b
BS
50792014-01-20 Baruch Siach <baruch@tkos.co.il>
5080
5081 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5082 sys/ptrace.h.
5083
b5737fa9
PA
50842014-01-17 Pedro Alves <palves@redhat.com>
5085
ea38d2a9 5086 PR build/16445
c7faa97a
PA
5087 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5088 defined after including gdb_proc_service.h.
b5737fa9 5089
40ed484e
DE
50902014-01-16 Doug Evans <dje@google.com>
5091
5092 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5093 (match_dll): Use it.
5094
969c39fb
MM
50952014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5096
5097 * target.h (target_ops) <read_btrace>: Change parameters and
5098 return type to allow error reporting.
5099 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5100 trace reading errors on.
5101 * linux-low.c (linux_low_read_btrace): Pass trace reading
5102 errors on.
5103 (linux_low_disable_btrace): New.
5104
ab7f45ba
DE
51052014-01-15 Doug Evans <dje@google.com>
5106
5107 * inferiors.c (thread_id_to_gdb_id): Delete.
5108 * inferiors.h (thread_id_to_gdb_id): Delete.
5109
66af0f44
EZ
51102014-01-13 Eli Zaretskii <eliz@gnu.org>
5111
5112 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5113 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5114 versions.
5115
9939e131
PA
51162014-01-08 Pedro Alves <palves@redhat.com>
5117
5118 * server.c (handle_status): Don't discard previous queued stop
5119 replies or thread's pending status here.
5120 (main) <disconnection>: Do it here instead.
5121
b7ea362b
PA
51222014-01-08 Pedro Alves <palves@redhat.com>
5123
5124 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5125 * server.c (visit_actioned_threads, handle_pending_status): New
5126 function.
5127 (handle_v_cont): Factor out parts to ...
5128 (resume): ... this new function. If in all-stop, and a thread
5129 being resumed has a pending status, report it without actually
5130 resuming.
5131 (myresume): Adjust to use the new 'resume' function.
5132 (clear_pending_status_callback, set_pending_status_callback)
5133 (find_status_pending_thread_callback): New functions.
5134 (handle_status): Handle the case of multiple threads having
5135 interesting statuses to report. Report threads' real last signal
5136 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5137 with an interesting thread to report the status for, instead of
5138 always reporting the status of the first thread.
5139
28498c42
JB
51402014-01-01 Joel Brobecker <brobecker@adacore.com>
5141
5142 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5143 * gdbreplay.c (gdbreplay_version): Likewise.
5144
f45c82da
YZ
51452013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5146
5147 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5148 iov.iov_len with the real length in use.
5149
379a5e2d
JB
51502013-12-13 Joel Brobecker <brobecker@adacore.com>
5151
5152 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5153 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5154 for all targets that use win32-low.c.
5155 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5156 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5157
4210d83e
PA
51582013-12-13 Pedro Alves <palves@redhat.com>
5159
5160 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5161 if equal to TARGET_WAITKIND_LOADED.
5162 * win32-low.c (cached_status): New static global.
5163 (win32_wait): Add declaration.
5164 (do_initial_child_stuff): Flush all initial pending debug events
5165 up to the initial breakpoint.
5166 (win32_wait): If CACHED_STATUS was set, return that instead
5167 of doing a real wait. Remove the code resuming the execution
5168 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5169 during the initial phase. Also remove the code changing
5170 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5171 TARGET_WAITKIND_STOPPED.
5172
e7f0d979
YQ
51732013-12-11 Yao Qi <yao@codesourcery.com>
5174
5175 * notif.c (handle_notif_ack): Return 0 if no notification
5176 matches.
5177
ebcf782c
DE
51782013-11-20 Doug Evans <dje@google.com>
5179
5180 * linux-low.c (linux_set_resume_request): Fix comment.
5181
20ad9378
DE
51822013-11-20 Doug Evans <dje@google.com>
5183
5184 * linux-low.c (resume_status_pending_p): Tweak comment.
5185
a196ebeb
WT
51862013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5187
5188 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5189 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5190 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5191 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5192 (srv_amd64_regobj): Add amd64-mpx.o.
5193 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5194 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5195 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5196 * i387-fp.c (num_pl_bnd_register) Added constant.
5197 (num_pl_bnd_cfg_registers) Added constant.
5198 (struct i387_xsave) Added reserved area and MPX fields.
5199 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5200 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5201 function.
5202 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5203 (init_registers_amd64_mpx_linux): Declare new function.
5204 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5205 (x86_64_regmap): Add MPX registers.
5206 (x86_linux_read_description): Add MPX case.
5207 (initialize_low_arch): Initialize MPX targets.
5208
0080a2f6
TT
52092013-11-18 Tom Tromey <tromey@redhat.com>
5210
5211 * configure: Rebuild.
5212 * configure.ac: Don't check for stdlib.h.
5213 * gdbreplay.c: Unconditionally include stdlib.h.
5214
2978b111
TT
52152013-11-18 Tom Tromey <tromey@redhat.com>
5216
5217 * config.in: Rebuild.
5218 * configure: Rebuild.
5219 * configure.ac: Don't use AC_HEADER_DIRENT.
5220
a3d08894
TT
52212013-11-18 Tom Tromey <tromey@redhat.com>
5222
5223 * server.h: Don't check HAVE_STRING_H.
5224 * gdbreplay.c: Don't check HAVE_STRING_H.
5225 * configure: Rebuild.
5226
0a5dd17d
TT
52272013-11-18 Tom Tromey <tromey@redhat.com>
5228
5229 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5230 LIBGNU.
5231
1bd2f0ba
TT
52322013-11-08 Tom Tromey <tromey@redhat.com>
5233
5234 * configure, config.in: Rebuild.
5235 * configure.ac: Remove unused configury.
5236
3266f10b
TT
52372013-11-08 Tom Tromey <tromey@redhat.com>
5238
5239 * acinclude.m4: Include common.m4, codeset.m4.
5240 * configure, config.in: Rebuild.
5241 * configure.ac: Use GDB_AC_COMMON.
5242
6682d959
AA
52432013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5244
5245 * linux-s390-low.c (HWCAP_S390_TE): New define.
5246 (s390_arch_setup): Consider the TE field in the HWCAP for
5247 determining 'have_regset_tdb'.
5248
fd0a4d76
SDJ
52492013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5250
5251 PR gdb/16014
5252 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5253 call to sizeof.
5254
1a3d890b
PA
52552013-10-02 Pedro Alves <palves@redhat.com>
5256
5257 * server.c (process_serial_event): Don't output "GDBserver
5258 exiting" if GDB is connected through stdio.
5259 * target.c (mywait): Likewise, be silent if GDB is connected
5260 through stdio.
5261
97ad4581
JB
52622013-10-01 Joel Brobecker <brobecker@adacore.com>
5263
5264 * lynx-low.c (lynx_add_threads_after_attach): New function.
5265 (lynx_attach): Remove call to add_thread. Add call to
5266 lynx_add_threads_after_attach instead.
5267
5b4e221c
MF
52682013-09-28 Mike Frysinger <vapier@gentoo.org>
5269
5270 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5271 * config.in, configure: Regenerated.
5272
ee47b2f8
YQ
52732013-09-18 Yao Qi <yao@codesourcery.com>
5274
5275 PR server/15959
5276 * server.c (start_inferior): Clear 'resume_info'.
5277
d6707650 52782013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5279
d6707650
JW
5280 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5281 for each register.
5282
9243dd0e 52832013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5284
9243dd0e
JW
5285 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5286 linux-tile-low.o to srv_tgtobj.
5287
c623a6ef
WN
52882013-09-16 Will Newton <will.newton@linaro.org>
5289
5290 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5291 out regs.
5292
fb71d39e
PA
52932013-09-06 Pedro Alves <palves@redhat.com>
5294
5295 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5296 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5297 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5298 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5299 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5300 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5301
8e7e9910
PA
53022013-09-06 Pedro Alves <palves@redhat.com>
5303
5304 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5305 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5306
7c3a12ca
PA
53072013-09-06 Pedro Alves <palves@redhat.com>
5308
5309 * linux-amd64-ipa.c: Include tracepoint.h.
5310 * linux-i386-ipa.c: Include tracepoint.h.
5311
8eb3d7b6
RW
53122013-09-06 Ricard Wanderlof <ricardw@axis.com>
5313
5314 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5315 (ps_get_thread_area): New function.
5316
eddddb9d
RW
53172013-09-06 Ricard Wanderlof <ricardw@axis.com>
5318
5319 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5320 (initialize_low_arch): Call init_registers_crisv32 rather than
5321 init_register_crisv32.
5322
533b0600
PA
53232013-09-05 Pedro Alves <palves@redhat.com>
5324
5325 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5326 to ...
5327 * hostio.h: ... this new file.
5328 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5329 win32-low.c: Include hostio.h.
5330
0ce3d3b5
PA
53312013-09-05 Pedro Alves <palves@redhat.com>
5332
5333 * server.h (gdb_client_data, handler_func, callback_handler_func)
5334 (delete_file_handler, add_file_handler, append_callback_event)
5335 (delete_callback_event, start_event_loop, initialize_event_loop):
5336 Move to event-loop.h and include it.
5337 * event-loop.h: New file.
5338
799cdc37
PA
53392013-09-05 Pedro Alves <palves@redhat.com>
5340
5341 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5342 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5343 (loaded_dll, unloaded_dll): Move to ...
5344 * dll.h: ... this new file.
5345 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5346
6a6bbd9d
PA
53472013-09-05 Pedro Alves <palves@redhat.com>
5348
5349 * server.h (current_process, get_thread_process, all_processes)
5350 (add_inferior_to_list, for_each_inferior, current_inferior)
5351 (remove_inferior, add_process, remove_process, find_process_pid)
5352 (have_started_inferiors_p, have_attached_inferiors_p)
5353 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5354 (clear_inferiors, find_inferior, find_inferior_id)
5355 (inferior_target_data, set_inferior_target_data)
5356 (inferior_regcache_data, set_inferior_regcache_data): Move to
5357 inferiors.h, and include it.
5358 * inferiors.h: New file.
5359
f699aaba
PA
53602013-09-05 Pedro Alves <palves@redhat.com>
5361
5362 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5363 Move ...
72f4393d 5364 * ax.h: ... here.
f699aaba 5365
c144c7a0
PA
53662013-09-05 Pedro Alves <palves@redhat.com>
5367
5368 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5369 tracepoint.h.
5370 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5371 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5372 (handle_tracepoint_general_set, handle_tracepoint_query)
5373 (tracepoint_finished_step, tracepoint_was_hit)
5374 (release_while_stepping_state_list, current_traceframe)
5375 (in_readonly_region, traceframe_read_mem)
5376 (fetch_traceframe_registers, traceframe_read_sdata)
5377 (traceframe_read_info, struct fast_tpoint_collect_status)
5378 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5379 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5380 (supply_fast_tracepoint_registers)
5381 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5382 (ipa_tdesc, claim_trampoline_space)
5383 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5384 (agent_mem_read, agent_get_trace_state_variable_value)
5385 (agent_set_trace_state_variable_value, agent_tsv_read)
5386 (agent_mem_read_string, get_raw_reg_func_addr)
5387 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5388 * tracepoint.h: ... this new file.
5389
ff42e6ab
PA
53902013-09-05 Pedro Alves <palves@redhat.com>
5391
5392 * server.h (perror_with_name, error, fatal, warning, paddress)
5393 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5394 include it.
5395 * utils.h: New file.
5396
541af0f4
PA
53972013-09-05 Pedro Alves <palves@redhat.com>
5398
5399 * server.h (remote_debug, noack_mode, transport_is_reliable)
5400 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5401 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5402 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5403 (write_enn, initialize_async_io, enable_async_io)
5404 (disable_async_io, check_remote_input_interrupt_request)
5405 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5406 (dead_thread_notify, prepare_resume_reply)
5407 (decode_address_to_semicolon, decode_address, decode_m_packet)
5408 (decode_M_packet, decode_X_packet, decode_xfer_write)
5409 (decode_search_memory_packet, unhexify, hexify)
5410 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5411 (look_up_one_symbol, relocate_instruction)
5412 (monitor_output): Move to remote-utils.h, and include it.
5413 * remote-utils.h: New file.
5414
eebdf26b
PA
54152013-09-05 Pedro Alves <palves@redhat.com>
5416
5417 * server.h (_): Delete.
5418
3aafd2ff
PA
54192013-09-02 Pedro Alves <palves@redhat.com>
5420
5421 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5422 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5423 allocated.
5424 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5425
cee83bcb
PM
54262013-09-02 Pierre Muller <muller@sourceware.org>
5427
5428 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5429 or WriteProcessMemory complete successfully and handle
5430 ERROR_PARTIAL_COPY error.
5431
9a13b2fa
PA
54322013-09-02 Pedro Alves <palves@redhat.com>
5433
5434 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5435 error instead of EIO.
5436
602e3198
JK
54372013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5438
5439 PR server/15604
5440 * linux-low.c: Include filestuff.h.
5441 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5442 * lynx-low.c: Include filestuff.h.
5443 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5444 * server.c: Include filestuff.h.
5445 (main): Call notice_open_fds.
5446 * spu-low.c: Include filestuff.h.
5447 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5448
96d7229d
LM
54492013-08-22 Luis Machado <lgustavo@codesourcery.com>
5450
5451 * Makefile.in: Explain why ../target and ../nat are not
5452 listed as include file search paths.
5453 (linux-waitpid.o): New object file rule.
5454 * configure.srv (srv_native_linux_obj): New variable.
5455 Replace all occurrences of linux native object files with
5456 $srv_native_linux_obj.
5457 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5458 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5459 (linux_enable_event_reporting): Remove declaration.
5460 (my_waitpid): Moved to common/linux-waitpid.c.
5461 (linux_wait_for_event): Pass ptid when calling
5462 linux_enable_event_reporting.
5463 (linux_supports_tracefork_flag): Remove.
5464 (linux_enable_event_reporting): Likewise.
5465 (linux_tracefork_grandchild): Remove.
5466 (STACK_SIZE): Moved to common/linux-ptrace.c.
5467 (linux_tracefork_child): Remove.
5468 (linux_test_for_tracefork): Remove.
5469 (linux_look_up_symbols): Call linux_supports_traceclone.
5470 (initialize_low): Remove call to linux_test_for_tracefork.
5471 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5472 common/linux-ptrace.h.
5473 (PTRACE_TYPE_ARG4): Likewise.
5474 Include linux-ptrace.h.
5475
32940073
PA
54762013-08-21 Pedro Alves <palves@redhat.com>
5477
5478 * config.in: Renegerate.
5479
33b60d58 54802013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5481
33b60d58
LM
5482 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5483 (SFILES): Remove $(srcdir)/common/target-common.c and
5484 add $(srcdir)/target/waitstatus.c.
5485 (OBS): Remove target-common.o and add waitstatus.o.
5486 (server_h): Remove $(srcdir)/../common/target-common.h and
5487 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5488 and $(srcdir)/../target/waitstatus.h.
5489 (target-common.o): Remove.
5490 (waitstatus.o): New target object file.
5491 * target.h: Do not include target-common.h and
5492 include target/resume.h, target/wait.h and
5493 target/waitstatus.h.
5494
b8e1b30e
LM
54952013-08-13 Luis Machado <lgustavo@codesourcery.com>
5496
5497 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5498 to PTRACE_TYPE_ARG3.
5499 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5500 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5501 PTRACE_TYPE_ARG4.
5502 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5503 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5504
7a60ad40
YQ
55052013-07-27 Jie Zhang <jie@codesourcery.com>
5506 Daniel Jacobowitz <dan@codesourcery.com>
5507 Yao Qi <yao@codesourcery.com>
5508
5509 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5510 (mips-linux-watch.o): New rule.
5511 (mips_linux_watch_h): New variable.
5512 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5513 srv_tgtobj.
5514 * linux-mips-low.c: Include mips-linux-watch.h.
5515 (struct arch_process_info, struct arch_lwp_info): New.
5516 (update_watch_registers_callback): New function.
5517 (mips_linux_new_process, mips_linux_new_thread) New functions.
5518 (mips_linux_prepare_to_resume, mips_insert_point): New
5519 functions.
5520 (mips_remove_point, mips_stopped_by_watchpoint): New
5521 functions.
5522 (rsp_bp_type_to_target_hw_bp_type): New function.
5523 (mips_stopped_data_address): New function.
5524 (the_low_target): Add watchpoint support functions.
5525
de6f69ad
YQ
55262013-07-27 Yao Qi <yao@codesourcery.com>
5527
5528 * i386-low.c: Include break-common.h.
5529 (enum target_hw_bp_type): Remove.
5530
3360c0bf
LM
55312013-07-24 Luis Machado <lgustavo@codesourcery.com>
5532
5533 * Makefile.in (SFILES): /common/target-common.c.
5534 (OBS): Add target-common.o.
5535 (server_h): Add $(srcdir)/../common/target-common.h.
5536 (target-common.o): New target.
5537 * server.c (queue_stop_reply_callback): Free
5538 status string after use.
5539 * target.c (target_waitstatus_to_string): Remove.
5540 * target.h: Include target-common.h.
5541 (resume_kind): Likewise.
5542 (target_waitkind): Likewise.
5543 (target_waitstatus): Likewise.
5544 (TARGET_WNOHANG): Likewise.
5545
bd885420
YQ
55462013-07-04 Yao Qi <yao@codesourcery.com>
5547
5548 * Makefile.in (host_alias): Use @host_noncanonical@.
5549 (target_alias): Use @target_noncanonical@.
5550 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5551 ACX_NONCANONICAL_HOST.
5552 * configure: Regenerated.
5553
5554 Revert:
5555 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5556
5557 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5558 * configure: Rebuild.
5559 * Makefile.in (version_host, version_target): Get from configure.
5560 (version.c): Use $(version_host) and $(version_target).
5561
17ef446e
PA
55622013-07-03 Pedro Alves <palves@redhat.com>
5563
5564 * Makefile.in (config.status): Depend on development.sh.
5565 * acinclude.m4: Include libmcheck.m4.
5566 * configure: Regenerate.
5567
7a9a7487
MG
55682013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5569
5570 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5571 attribute inside the parentheses.
5572 (winapi_DebugSetProcessKillOnExit): Ditto.
5573 (winapi_DebugBreakProcess): Ditto.
5574 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5575
49b64de6
MG
55762013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5577
5578 * notif.h (notif_event): Add a dummy member to avoid compiler
5579 errors.
5580
d5749ee7
PA
55812013-07-01 Pedro Alves <palves@redhat.com>
5582
5583 * hostio.c (HOSTIO_PATH_MAX): Define.
5584 (require_filename, handle_open, handle_unlink, handle_readlink):
5585 Use it.
5586
d8d2a3ee
PA
55872013-07-01 Pedro Alves <palves@redhat.com>
5588
5589 * server.h: Include "pathmax.h".
5590 * linux-low.c: Don't include sys/param.h.
5591 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5592 MAXPATHLEN.
5593 * win32-low.c: Don't include sys/param.h.
5594 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5595
bc7dea8d
PA
55962013-07-01 Pedro Alves <palves@redhat.com>
5597
5598 * event-loop.c: Don't check HAVE_UNISTD_H before including
5599 <unistd.h>.
5600 * gdbreplay.c: Likewise.
5601 * remote-utils.c: Likewise.
5602 * server.c: Likewise.
5603 * configure.ac: Don't check for unistd.h.
5604 * configure: Regenerate.
5605
d6c2da54
TT
56062013-06-28 Tom Tromey <tromey@redhat.com>
5607
5608 * Makefile.in (version.c): Use version.in, not
5609 common/version.in.
5610
257b6bec
MG
56112013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5612
5613 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5614 * configure: Rebuild.
5615 * Makefile.in (version_host, version_target): Get from configure.
5616 (version.c): Use $(version_host) and $(version_target).
5617
86ebe149
DK
56182013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5619
5620 Fix trace-status to output user name without trailing colon.
5621 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5622
f30aa5af
DK
56232013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5624
5625 Fix trace-status to output proper start-time and stop-time.
5626 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5627 output start time and stop time in hex as gdb expects.
5628
28a93511
YQ
56292013-06-26 Pedro Alves <pedro@codesourcery.com>
5630
5631 * tracepoint.c (build_traceframe_info_xml): Output trace state
5632 variables present in the trace buffer.
5633
01208463
TT
56342013-06-24 Tom Tromey <tromey@redhat.com>
5635
5636 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5637 create-version.sh.
5638 (version.o): Remove.
5639 * gdbreplay.c: Include version.h.
5640 (version, host_name): Don't declare.
5641 * server.h: Include version.h.
5642 (version, host_name): Don't declare.
5643
760256f9
PA
56442013-06-12 Pedro Alves <palves@redhat.com>
5645
5646 * linux-x86-low.c (linux_is_elf64): Delete global.
5647 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5648 with local linux_pid_exe_is_elf_64_file use.
5649
030031ee
PA
56502013-06-11 Pedro Alves <palves@redhat.com>
5651
5652 * linux-low.c (regset_disabled, disable_regset): New functions.
5653 (regsets_fetch_inferior_registers)
5654 (regsets_store_inferior_registers): Use them.
5655 (initialize_regsets_info); Don't allocate the disabled_regsets
5656 array here.
5657 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5658 comment.
5659
5da6eb0a
PA
56602013-06-11 Pedro Alves <palves@redhat.com>
5661
5662 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5663 xmalloc.
5664
7e5aaa09
PA
56652013-06-11 Pedro Alves <palves@redhat.com>
5666
5667 * linux-x86-low.c (initialize_low_arch): Call
5668 init_registers_x32_avx_linux.
5669
d878444c
JK
56702013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5671
5672 Fix compatibility with Android Bionic.
5673 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5674 it is not empty.
5675
3aee8918
PA
56762013-06-07 Pedro Alves <palves@redhat.com>
5677
5f2b57b5 5678 PR server/14823
3aee8918
PA
5679 * Makefile.in (OBS): Add tdesc.o.
5680 (IPA_OBJS): Add tdesc-ipa.o.
5681 (tdesc-ipa.o): New rule.
5682 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5683 interface.
5684 * linux-low.c (new_inferior): Delete.
5685 (disabled_regsets, num_regsets): Delete.
5686 (linux_add_process): Adjust to set the new per-process
5687 new_inferior flag.
5688 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5689 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5690 was a stop. When calling arch_setup, switch the current inferior
5691 to the thread that got an event.
5692 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5693 (regsets_fetch_inferior_registers)
5694 (regsets_store_inferior_registers): New regsets_info parameter.
5695 Adjust to use it.
5696 (linux_register_in_regsets): New regs_info parameter. Adjust to
5697 use it.
5698 (register_addr, fetch_register, store_register): New usrregs_info
5699 parameter. Adjust to use it.
5700 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5701 parameter regs_info. Adjust to use it.
5702 (linux_fetch_registers): Get the current inferior's regs_info, and
5703 adjust to use it.
5704 (linux_store_registers): Ditto.
5705 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5706 (initialize_low): Don't initialize the target_regsets here. Call
5707 initialize_low_arch.
5708 * linux-low.h (target_regsets): Delete declaration.
5709 (struct regsets_info): New.
5710 (struct usrregs_info): New.
5711 (struct regs_info): New.
5712 (struct process_info_private) <new_inferior>: New field.
5713 (struct linux_target_ops): Delete the num_regs, regmap, and
5714 regset_bitmap fields. New field regs_info.
5715 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5716 * i387-fp.c (num_xmm_registers): Delete.
5717 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5718 calls to new interface.
5719 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5720 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5721 Infer the number of xmm registers from the regcache's target
5722 description.
5723 * i387-fp.h (num_xmm_registers): Delete.
5724 * inferiors.c (add_thread): Don't install the thread's regcache
5725 here.
5726 * proc-service.c (gregset_info): Fetch the current inferior's
5727 regs_info. Adjust to use it.
5728 * regcache.c: Include tdesc.h.
5729 (register_bytes, reg_defs, num_registers)
5730 (gdbserver_expedite_regs): Delete.
5731 (get_thread_regcache): If the thread doesn't have a regcache yet,
5732 create one, instead of aborting gdbserver.
5733 (regcache_invalidate_one): Rename to ...
5734 (regcache_invalidate_thread): ... this.
5735 (regcache_invalidate_one): New.
5736 (regcache_invalidate): Only invalidate registers of the current
5737 process.
5738 (init_register_cache): Add target_desc parameter, and use it.
5739 (new_register_cache): Ditto. Assert the target description has a
5740 non zero registers_size.
5741 (regcache_cpy): Add assertions. Adjust.
5742 (realloc_register_cache, set_register_cache): Delete.
5743 (registers_to_string, registers_from_string): Adjust.
5744 (find_register_by_name, find_regno, find_register_by_number)
5745 (register_cache_size): Add target_desc parameter, and use it.
5746 (free_register_cache_thread, free_register_cache_thread_one)
5747 (regcache_release, register_cache_size): New.
5748 (register_size): Add target_desc parameter, and use it.
5749 (register_data, supply_register, supply_register_zeroed)
5750 (supply_regblock, supply_register_by_name, collect_register)
5751 (collect_register_as_string, collect_register_by_name): Adjust.
5752 * regcache.h (struct target_desc): Forward declare.
5753 (struct regcache) <tdesc>: New field.
5754 (init_register_cache, new_register_cache): Add target_desc
5755 parameter.
5756 (regcache_invalidate_thread): Declare.
5757 (regcache_invalidate_one): Delete declaration.
5758 (regcache_release): Declare.
5759 (find_register_by_number, register_cache_size, register_size)
5760 (find_regno): Add target_desc parameter.
5761 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5762 declarations.
5763 * remote-utils.c: Include tdesc.h.
5764 (outreg, prepare_resume_reply): Adjust.
5765 * server.c: Include tdesc.h.
5766 (gdbserver_xmltarget): Delete declaration.
5767 (get_features_xml, process_serial_event): Adjust.
5768 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5769 declare.
5770 (struct process_info) <tdesc>: New field.
5771 (ipa_tdesc): Declare.
5772 * tdesc.c: New file.
5773 * tdesc.h: New file.
5774 * tracepoint.c: Include tdesc.h.
5775 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5776 (get_context_regcache): Adjust to pass ipa_tdesc down.
5777 (do_action_at_tracepoint): Adjust to get the register cache size
5778 from the context regcache's description.
5779 (traceframe_walk_blocks): Adjust to get the register cache size
5780 from the current trace frame's description.
5781 (traceframe_get_pc): Adjust to get current trace frame's
5782 description and pass it down.
5783 (gdb_collect): Adjust to get the register cache size from the
5784 IPA's description.
5785 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5786 (gdbserver_xmltarget): Delete.
5787 (initialize_low_tracepoint): Set the ipa's target description.
5788 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5789 (initialize_low_tracepoint): Set the ipa's target description.
5790 * linux-x86-low.c: Include tdesc.h.
5791 [__x86_64__] (is_64bit_tdesc): New.
5792 (ps_get_thread_area, x86_get_thread_area): Use it.
5793 (i386_cannot_store_register): Rename to ...
5794 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5795 (i386_cannot_fetch_register): Rename to ...
5796 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5797 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5798 to new interface.
5799 (target_regsets): Rename to ...
5800 (x86_regsets): ... this.
5801 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5802 interface.
5803 (x86_siginfo_fixup): Use is_64bit_tdesc.
5804 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5805 (tdesc_x32_avx_linux, tdesc_x32_linux)
5806 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5807 Declare.
5808 (x86_linux_update_xmltarget): Delete.
5809 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5810 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5811 (AMD64_LINUX_USER64_CS): New.
5812 (x86_linux_read_description): New, based on
5813 x86_linux_update_xmltarget.
5814 (same_process_callback): New.
5815 (x86_arch_setup_process_callback): New.
5816 (x86_linux_update_xmltarget): New.
5817 (x86_regsets_info): New.
5818 (amd64_linux_regs_info): New.
5819 (i386_linux_usrregs_info): New.
5820 (i386_linux_regs_info): New.
5821 (x86_linux_regs_info): New.
5822 (x86_arch_setup): Reimplement.
5823 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5824 (x86_emit_ops): Ditto.
5825 (the_low_target): Adjust. Install x86_linux_regs_info,
5826 x86_cannot_fetch_register, and x86_cannot_store_register.
5827 (initialize_low_arch): New.
5828 * linux-ia64-low.c (tdesc_ia64): Declare.
5829 (ia64_fetch_register): Adjust.
5830 (ia64_usrregs_info, regs_info): New globals.
5831 (ia64_regs_info): New function.
5832 (the_low_target): Adjust.
5833 (initialize_low_arch): New function.
5834 * linux-sparc-low.c (tdesc_sparc64): Declare.
5835 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5836 Adjust.
5837 (sparc_arch_setup): New function.
5838 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5839 (the_low_target): Adjust.
5840 (initialize_low_arch): New function.
5841 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5842 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5843 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5844 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5845 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5846 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5847 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5848 (tdesc_powerpc_isa205_vsx64l): Declare.
5849 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5850 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5851 (ppc_set_pc, ppc_get_hwcap): Adjust.
5852 (ppc_usrregs_info): Forward declare.
5853 (!__powerpc64__) ppc_regmap_adjusted: New global.
5854 (ppc_arch_setup): Adjust to the current process'es target
5855 description.
5856 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5857 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5858 (ppc_store_evrregset): Adjust.
5859 (target_regsets): Rename to ...
5860 (ppc_regsets): ... this, and make static.
5861 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5862 (ppc_regs_info): New function.
5863 (the_low_target): Adjust.
5864 (initialize_low_arch): New function.
5865 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5866 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5867 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5868 (tdesc_s390x_linux64v2): Declare.
5869 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5870 (s390_fill_gregset, s390_store_last_break): Adjust.
5871 (target_regsets): Rename to ...
5872 (s390_regsets): ... this, and make static.
5873 (s390_get_pc, s390_set_pc): Adjust.
5874 (s390_get_hwcap): New target_desc parameter, and use it.
5875 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5876 (s390_arch_setup): Adjust to set the current process'es target
5877 description. Don't adjust the regmap.
5878 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5879 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5880 (regs_info_3264): New globals.
5881 (s390_regs_info): New function.
5882 (the_low_target): Adjust.
5883 (initialize_low_arch): New function.
5884 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5885 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5886 [__mips64] (init_registers_mips_linux)
5887 (init_registers_mips_dsp_linux): Delete defines.
5888 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5889 (have_dsp): New global.
5890 (mips_read_description): New, based on mips_arch_setup.
5891 (mips_arch_setup): Reimplement.
5892 (get_usrregs_info): New function.
5893 (mips_cannot_fetch_register, mips_cannot_store_register)
5894 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5895 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5896 (target_regsets): Rename to ...
5897 (mips_regsets): ... this, and make static.
5898 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5899 (dsp_regs_info, regs_info): New globals.
5900 (mips_regs_info): New function.
5901 (the_low_target): Adjust.
5902 (initialize_low_arch): New function.
5903 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5904 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5905 Declare.
5906 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5907 (arm_read_description): New, with bits factored from
5908 arm_arch_setup.
5909 (arm_arch_setup): Reimplement.
5910 (target_regsets): Rename to ...
5911 (arm_regsets): ... this, and make static.
5912 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5913 (arm_regs_info): New function.
5914 (the_low_target): Adjust.
5915 (initialize_low_arch): New function.
5916 * linux-m68k-low.c (tdesc_m68k): Declare.
5917 (target_regsets): Rename to ...
5918 (m68k_regsets): ... this, and make static.
5919 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5920 (m68k_regs_info): New function.
5921 (m68k_arch_setup): New function.
5922 (the_low_target): Adjust.
5923 (initialize_low_arch): New function.
5924 * linux-sh-low.c (tdesc_sharch): Declare.
5925 (target_regsets): Rename to ...
5926 (sh_regsets): ... this, and make static.
5927 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5928 (sh_regs_info, sh_arch_setup): New functions.
5929 (the_low_target): Adjust.
5930 (initialize_low_arch): New function.
5931 * linux-bfin-low.c (tdesc_bfin): Declare.
5932 (bfin_arch_setup): New function.
5933 (bfin_usrregs_info, regs_info): New globals.
5934 (bfin_regs_info): New function.
5935 (the_low_target): Adjust.
5936 (initialize_low_arch): New function.
5937 * linux-cris-low.c (tdesc_cris): Declare.
5938 (cris_arch_setup): New function.
5939 (cris_usrregs_info, regs_info): New globals.
5940 (cris_regs_info): New function.
5941 (the_low_target): Adjust.
5942 (initialize_low_arch): New function.
5943 * linux-cris-low.c (tdesc_crisv32): Declare.
5944 (cris_arch_setup): New function.
5945 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5946 (cris_regs_info): New function.
5947 (the_low_target): Adjust.
5948 (initialize_low_arch): New function.
5949 * linux-m32r-low.c (tdesc_m32r): Declare.
5950 (m32r_arch_setup): New function.
5951 (m32r_usrregs_info, regs_info): New globals.
5952 (m32r_regs_info): Adjust.
5953 (initialize_low_arch): New function.
5954 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5955 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5956 (tic6x_usrregs_info): Forward declare.
5957 (tic6x_read_description): New function, based on ...
5958 (tic6x_arch_setup): ... this. Reimplement.
5959 (target_regsets): Rename to ...
5960 (tic6x_regsets): ... this, and make static.
5961 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5962 (tic6x_regs_info): New function.
5963 (the_low_target): Adjust.
5964 (initialize_low_arch): New function.
5965 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5966 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5967 (target_regsets): Rename to ...
5968 (xtensa_regsets): ... this, and make static.
5969 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5970 globals.
5971 (xtensa_arch_setup, xtensa_regs_info): New functions.
5972 (the_low_target): Adjust.
5973 (initialize_low_arch): New function.
5974 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5975 (nios2_arch_setup): Set the current process'es tdesc.
5976 (target_regsets): Rename to ...
5977 (nios2_regsets): ... this.
5978 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5979 (nios2_regs_info): New function.
5980 (the_low_target): Adjust.
5981 (initialize_low_arch): New function.
a261b8f5
PA
5982 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5983 (aarch64_arch_setup): Set the current process'es tdesc.
5984 (target_regsets): Rename to ...
5985 (aarch64_regsets): ... this.
5986 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
5987 (aarch64_regs_info): New function.
5988 (the_low_target): Adjust.
5989 (initialize_low_arch): New function.
3aee8918
PA
5990 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
5991 globals.
5992 (target_regsets): Rename to ...
5993 (tile_regsets): ... this.
5994 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
5995 (tile_regs_info): New function.
5996 (tile_arch_setup): Set the current process'es tdesc.
5997 (the_low_target): Adjust.
5998 (initialize_low_arch): New function.
5999 * spu-low.c (tdesc_spu): Declare.
6000 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6001 * win32-arm-low.c (tdesc_arm): Declare.
6002 (arm_arch_setup): New function.
6003 (the_low_target): Install arm_arch_setup instead of
6004 init_registers_arm.
6005 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6006 (init_windows_x86): Rename to ...
6007 (i386_arch_setup): ... this. Set `win32_tdesc'.
6008 (the_low_target): Adjust.
6009 * win32-low.c (win32_tdesc): New global.
6010 (child_add_thread): Don't create the thread cache here.
6011 (do_initial_child_stuff): Set the new process'es tdesc.
6012 * win32-low.h (struct target_desc): Forward declare.
6013 (win32_tdesc): Declare.
6014 * lynx-i386-low.c (tdesc_i386): Declare global.
6015 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6016 * lynx-low.c (lynx_tdesc): New global.
6017 (lynx_add_process): Set the new process'es tdesc.
6018 * lynx-low.h (struct target_desc): Forward declare.
6019 (lynx_tdesc): Declare global.
6020 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6021 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6022 * nto-low.c (nto_tdesc): New global.
6023 (do_attach): Set the new process'es tdesc.
6024 * nto-low.h (struct target_desc): Forward declare.
6025 (nto_tdesc): Declare.
6026 * nto-x86-low.c (tdesc_i386): Declare.
6027 (nto_x86_arch_setup): Set `nto_tdesc'.
6028
b1fbec62
GB
60292013-06-04 Gary Benson <gbenson@redhat.com>
6030
6031 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6032 to qSupported response when appropriate.
6033 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6034 with nonzero-length annex.
6035 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6036 arguments supplied in annex.
6037
d1ec4ce7
DE
60382013-05-31 Doug Evans <dje@google.com>
6039
ac44adcb 6040 PR server/15594
d1ec4ce7
DE
6041 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6042 64 bits in 64-cross-32 environment.
6043
9b25f2d3
PA
60442013-05-28 Pedro Alves <palves@redhat.com>
6045
6046 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6047 (aarch64-without-fpu.c): Delete rule.
6048 * configure.srv (aarch64*-*-linux*): Remove references to
6049 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6050 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6051 declaration.
6052
6740dc9c
PA
60532013-05-24 Pedro Alves <palves@redhat.com>
6054
6055 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6056 instead of strchr/decode_address. Error if the range isn't split
6057 with a ','. Don't assume there's be a ':' in the action.
6058
c2d6af84
PA
60592013-05-23 Yao Qi <yao@codesourcery.com>
6060 Pedro Alves <palves@redhat.com>
6061
6062 * linux-low.c (lwp_in_step_range): New function.
6063 (linux_wait_1): If the thread was range stepping and stopped
6064 outside the stepping range, report the stop to GDB. Otherwise,
6065 continue stepping. Add range stepping debug output.
6066 (linux_set_resume_request): Copy the step range from the resume
6067 request to the lwp.
6068 (linux_supports_range_stepping): New.
6069 (linux_target_ops) <supports_range_stepping>: Set to
6070 linux_supports_range_stepping.
6071 * linux-low.h (struct linux_target_ops)
6072 <supports_range_stepping>: New field.
6073 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6074 * linux-x86-low.c (x86_supports_range_stepping): New.
6075 (the_low_target) <supports_range_stepping>: Set to
6076 x86_supports_range_stepping.
6077 * server.c (handle_v_cont): Handle 'r' action.
6078 (handle_v_requests): Append ";r" if the target supports range
6079 stepping.
6080 * target.h (struct thread_resume) <step_range_start,
6081 step_range_end>: New fields.
6082 (struct target_ops) <supports_range_stepping>:
6083 New field.
6084 (target_supports_range_stepping): New macro.
6085
58794e1a
JB
60862013-05-17 Joel Brobecker <brobecker@adacore.com>
6087
6088 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6089 confusion in comment.
6090
d631c5a7
JB
60912013-05-17 Joel Brobecker <brobecker@adacore.com>
6092
6093 * lynx-low.c (struct process_info_private): New type.
6094 (lynx_add_process): New function.
6095 (lynx_create_inferior, lynx_attach): Replace calls to
6096 add_process by calls to lynx_add_process.
6097 (lynx_resume): If PTID is null, then try using
6098 current_process()->private->last_wait_event_ptid.
6099 Add comments.
6100 (lynx_clear_inferiors): Delete. The contents of that function
6101 has been inlined in lynx_mourn;
6102 (lynx_wait_1): Save the ptid in the process's private data.
6103 (lynx_mourn): Free the process' private data. Replace call
6104 to lynx_clear_inferiors by call to clear_inferiors.
6105
96f7a20f
YQ
61062013-05-17 Yao Qi <yao@codesourcery.com>
6107
6108 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6109 the right place.
6110
db0dfaa0
LM
61112013-05-16 Luis Machado <lgustavo@codesourcery.com>
6112
6113 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6114 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6115 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6116 PT_TEXT_END_ADDR guards. Update comments.
6117 (linux_target_op) <read_offsets>: Conditionally define to
6118 linux_read_offsets if the target is UCLIBC and if it defines
6119 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6120
68f5f838
SL
61212013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6122 Andrew Jenner <andrew@codesourcery.com>
6123
6124 * Makefile.in (SFILES): Add linux-nios2-low.c.
6125 (clean): Add action to delete nios2-linux.c.
6126 (nios2-linux.c): New rule.
6127 * configure.srv: Add nios2*-*-linux*.
6128 * linux-nios2-low.c: New.
6129
1ebff1fd
HAQ
61302013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6131
6132 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6133
f6150862
HZ
61342013-04-25 Hui Zhu <hui@codesourcery.com>
6135
6136 PR gdb/15186
f6150862
HZ
6137 * ax.c (ax_printf): Add fflush.
6138
614c279d
TT
61392013-04-22 Tom Tromey <tromey@redhat.com>
6140
6141 * Makefile.in (SFILES): Add filestuff.c.
6142 (OBS): Add filestuff.o.
6143 (filestuff.o): New target.
6144 * config.in, configure: Rebuild.
6145 * configure.ac: Check for fdwalk, pipe2.
6146
7d4e5717
PA
61472013-04-17 Pedro Alves <palves@redhat.com>
6148
6149 * configure.ac (USE_THREAD_DB): Delete variable.
6150 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6151 Don't AC_SUBST USE_THREAD_DB.
6152 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6153 * config.in, configure: Regenerate.
6154
d5c93e41
PA
61552013-04-16 Pedro Alves <palves@redhat.com>
6156
6157 * linux-low.h (struct lwp_info) <thread_known>: Move under
6158 the USE_THREAD_DB #ifdef.
6159
04f5fe89
PA
61602013-04-16 Pedro Alves <palves@redhat.com>
6161
6162 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6163 (linux-low.o): Delete rule.
6164 * linux-low.h: Always include "gdb_thread_db.h" instead of
6165 conditionally including thread_db.h.
6166 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6167 HAVE_THREAD_DB_H.
6168
480b27bf
JK
61692013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6170
6171 * Makefile.in (install-only): Fix make install regression.
6172
43662968
JK
61732013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6174
6175 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6176 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6177 installation.
6178 * gdbserver.1: Remove.
6179
3e74e146
PA
61802013-03-22 Pedro Alves <palves@redhat.com>
6181
6182 * linux-low.c (handle_extended_wait): Don't call
6183 linux_enable_event_reporting.
6184
a8347a2a
TT
61852013-03-15 Tony Theodore <tonyt@logyst.com>
6186
6187 PR build/9098:
6188 * Makefile.in (SHELL): Use @SHELL@.
6189
eeb56fa7
SDJ
61902013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6191
6192 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6193 compiler warning.
6194
4fa7e2ff
JB
61952013-03-13 Joel Brobecker <brobecker@adacore.com>
6196
6197 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6198 Remove extraneous NULL element.
6199
8ddb1965
YQ
62002013-03-13 Yao Qi <yao@codesourcery.com>
6201
6202 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6203 'V' block in trace frame.
6204
9accd112
MM
62052013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6206
6207 * target.h (struct target_ops): Add btrace ops.
6208 (target_supports_btrace): New macro.
6209 (target_enable_btrace): New macro.
6210 (target_disable_btrace): New macro.
6211 (target_read_btrace): New macro.
6212 * gdbthread.h (struct thread_info): Add btrace field.
6213 * server.c: Include btrace-common.h.
6214 (handle_btrace_general_set): New function.
6215 (handle_btrace_enable): New function.
6216 (handle_btrace_disable): New function.
6217 (handle_general_set): Call handle_btrace_general_set.
6218 (handle_qxfer_btrace): New function.
6219 (struct qxfer qxfer_packets[]): Add btrace entry.
6220 * inferiors.c (remove_thread): Disable btrace.
6221 * linux-low: Include linux-btrace.h.
6222 (linux_low_enable_btrace): New function.
6223 (linux_low_read_btrace): New function.
6224 (linux_target_ops): Add btrace ops.
6225 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6226 Add srv_linux_btrace=yes.
6227 (x86_64-*-linux*): Add linux-btrace.o.
6228 Add srv_linux_btrace=yes.
6229 * configure.ac: Define HAVE_LINUX_BTRACE.
6230 * config.in: Regenerated.
6231 * configure: Regenerated.
6232
5cc22e4c
MM
62332013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6234
6235 * server.c (handle_qxfer): Preserve error message if -3 is
6236 returned.
6237 (qxfer): Document the -3 return value.
6238
7c97f91e
MM
62392013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6240
6241 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6242 (linux_btrace_h): New variable.
6243 (linux-btrace.o): New rule.
6244
be9a119c 62452013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6246 Hafiz Abid Qadeer <abidh@codesourcery.com>
6247
6248 * tracepoint.c (trace_buffer_size): New global.
6249 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6250 (init_trace_buffer): Change to one-argument function. Allocate
6251 trace buffer memory.
6252 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6253 handle QTBuffer:size packet.
6254 (cmd_bigqtbuffer_size): New function.
6255 (initialize_tracepoint): Call init_trace_buffer with
6256 DEFAULT_TRACE_BUFFER_SIZE.
6257 * server.c (handle_query): Add QTBuffer:size in the
6258 supported packets.
6259
e64f7499
YQ
62602013-03-07 Yao Qi <yao@codesourcery.com>
6261
6262 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6263 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6264 of -1.
6265 (cmd_qtsp): Adjust condition. Do post increment.
6266 Set cur_action and cur_step_action back to 0.
6267
f0ae6fc3
PA
62682013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6269
6270 PR server/15236
6271 * linux-low.c (linux_write_memory): Return early success if LEN is
6272 zero.
6273
b5b0b0af
CV
62742013-03-05 Corinna Vinschen <vinschen@redhat.de>
6275
334ad4a8 6276 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6277
589bc927
TT
62782013-02-28 Tom Tromey <tromey@redhat.com>
6279
6280 * configure.ac: Invoke AC_SYS_LARGEFILE.
6281 * configure, config.in: Rebuild.
6282
dfe07582
CV
62832013-02-28 Corinna Vinschen <vinschen@redhat.com>
6284
6285 * win32-low.c: Throughout, fix format strings and casts of
6286 printf-like functions to avoid type related warnings on all
6287 platforms.
6288 (get_child_debug_event): Print dwDebugEventCode as hex since
6289 that's how it's usually documented.
6290
736cd585
YQ
62912013-02-28 Yao Qi <yao@codesourcery.com>
6292
6293 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6294 pulongest.
6295
e1f58301
JW
62962013-02-27 Jiong Wang <jiwang@tilera.com>
6297
6298 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6299 (reg-tilegx32.c): New rule.
6300 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6301 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6302 different register info initializer according to elf class.
6303 (init_registers_tilgx32): New function. The tilegx32 register info
6304 initializer.
6305 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6306 (tile_store_gregset): Likewise.
6307
d171ca78
YQ
63082013-02-27 Yao Qi <yao@codesourcery.com>
6309
6310 * server.c (process_point_options): Print debug message when
6311 debug_threads is true.
6312
282bbdf3
YQ
63132013-02-26 Yao Qi <yao@codesourcery.com>
6314
6315 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6316
aca22551
PA
63172013-02-19 Pedro Alves <palves@redhat.com>
6318 Kai Tietz <ktietz@redhat.com>
6319
6320 PR gdb/15161
6321
6322 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6323 instead of strtoul to extract address from packet.
6324 (process_serial_event) <'z'>: Likewise.
6325
4f3cee1c
YQ
63262013-02-18 Yao Qi <yao@codesourcery.com>
6327
6328 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6329
8e1d55a3
PA
63302013-02-14 Pedro Alves <palves@redhat.com>
6331
6332 Plug memory leak.
6333
6334 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6335 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6336
458820da
PA
63372013-02-14 Pedro Alves <palves@redhat.com>
6338
6339 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6340
baea0dae
PA
63412013-02-14 Pedro Alves <palves@redhat.com>
6342
6343 * tracepoint.c (save_string): Delete.
6344 (add_tracepoint_action): Use savestring instead of save_string.
6345
0b1afbb3
PA
63462013-02-12 Pedro Alves <palves@redhat.com>
6347
6348 * linux-xtensa-low.c: Ditto.
6349 * xtensa-xtregs.c: Ditto.
6350
8a4ac37e
PA
63512013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6352
6353 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6354 thread_db.
6355
148de6bb
MS
63562013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6357
6358 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6359 aarch64_num_wp_regs and aarch64_num_bp_regs to
6360 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6361
55fac6e0
MS
63622013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6363
6364 * linux-aarch64-low.c (ps_get_thread_area): Replace
6365 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6366
176eb98c
MS
63672013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6368 Marcus Shawcroft <marcus.shawcroft@arm.com>
6369 Nigel Stephens <nigel.stephens@arm.com>
6370 Yufeng Zhang <yufeng.zhang@arm.com>
6371
6372 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6373 (aarch64.c, aarch64-without-fpu.c): New targets.
6374 * configure.srv (aarch64*-*-linux*): New.
6375 * linux-aarch64-low.c: New file.
6376
56f7af9c
MS
63772013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6378
43aaf8b6 6379 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6380 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6381 (dequeue_one_deferred_signal, linux_resume_one_thread)
6382 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6383 (linux_tracefork_grandchild, linux_test_for_tracefork)
6384 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6385 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6386 where the argument is 0.
6387
60f662b0
YQ
63882013-01-25 Yao Qi <yao@codesourcery.com>
6389
6390 * event-loop.c: Include "queue.h".
6391 (gdb_event_p): New typedef.
6392 (struct gdb_event) <next_event>: Remove.
6393 (event_queue): Change to QUEUE(gdb_event_p).
6394 (async_queue_event): Remove.
6395 (gdb_event_xfree): New.
6396 (initialize_event_loop): New.
6397 (process_event): Use API from QUEUE.
6398 (wait_for_event): Likewise.
6399 * server.c (main): Call initialize_event_loop.
6400 * server.h (initialize_event_loop): Declare.
6401
5ae4861a
YQ
64022013-01-18 Yao Qi <yao@codesourcery.com>
6403
6404 * ax.h (struct eval_agent_expr_context): New.
6405 (gdb_eval_agent_expr): Update declaration.
6406 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6407 TFRAME. Add new argument CTX.
6408 * server.h (struct eval_agent_expr_context): Declare.
6409 (agent_mem_read, agent_tsv_read): Update declaration.
6410 (agent_mem_read_string): Likewise.
6411 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6412 (add_traceframe_block): Add new argument TPOINT.
6413 Increase TPOINT->traceframe_usage.
6414 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6415 eval_tracepoint_agent_expr.
6416 (condition_true_at_tracepoint): Likewise.
6417 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6418 (agent_mem_read_string, agent_tsv_read): Likewise.
6419
85e00e85
YQ
64202013-01-16 Yao Qi <yao@codesourcery.com>
6421
6422 * linux-low.c (linux_resume_one_lwp): Don't check
6423 'lwp->bp_reinsert != 0'.
6424
4039cf45
JB
64252013-01-07 Joel Brobecker <brobecker@adacore.com>
6426 Pedro Alves <palves@redhat.com>
6427
6428 * lynx-low.c (ptrace_request_to_str): Define a temporary
6429 macro and use it to simplify this function's implementation.
6430
9044dee2
JB
64312013-01-07 Joel Brobecker <brobecker@adacore.com>
6432
6433 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6434 sets errno.
6435
e6352c8f
JB
64362013-01-07 Joel Brobecker <brobecker@adacore.com>
6437
6438 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6439
50681a27
JB
64402013-01-07 Joel Brobecker <brobecker@adacore.com>
6441
6442 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6443
3f6e77ef
JB
64442013-01-07 Joel Brobecker <brobecker@adacore.com>
6445
6446 * lynx-low.c (lynx_resume): Use the resume_info parameter
6447 to determine the ptid for the lynx_ptrace call, unless
6448 it is equal to minus_one_ptid, in which case we use the
6449 ptid of the current_inferior.
6450 (lynx_wait_1): After having received a thread create/exit
6451 event, resume the inferior's execution using the signaling
6452 thread's ptid, rather than the old ptid.
6453
7fda33ae
JB
64542013-01-07 Joel Brobecker <brobecker@adacore.com>
6455
6456 * lynx-low.c (lynx_resume): Delete variable ret.
6457
b9786c74
JB
64582013-01-01 Joel Brobecker <brobecker@adacore.com>
6459
6460 * gdbreplay.c (gdbreplay_version): Update copyright year.
6461 * server.c (gdbserver_version): Likewise.
6462
8b93d60f
JB
64632012-12-17 Joel Brobecker <brobecker@adacore.com>
6464
6465 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6466 new thread.
6467
037335a7
JB
64682012-12-17 Joel Brobecker <brobecker@adacore.com>
6469
6470 * lynx-low.c (ptrace_request_to_str): Add handling for
6471 PTRACE_GETTRACESIG.
6472
52d4cbd8
JB
64732012-12-17 Joel Brobecker <brobecker@adacore.com>
6474
6475 * lynx-low.c (lynx_attach): Delete variable new_process.
6476
ab8f6ca9
JB
64772012-12-17 Joel Brobecker <brobecker@adacore.com>
6478
6479 * lynx-low.c (lynx_create_inferior): Delete variable
6480 new_process.
6481
78cbc024
JB
64822012-12-17 Joel Brobecker <brobecker@adacore.com>
6483
6484 * lynx-low.c (ptrace_request_to_str): Do not handle
6485 PTRACE_GETTHREADLIST if this macro does not exist.
6486
14a00470
YQ
64872012-12-15 Yao Qi <yao@codesourcery.com>
6488
6489 * Makefile.in (OBS): Add notif.o.
6490 * notif.c, notif.h: New.
6491 * server.c: Include "notif.h".
6492 (struct vstop_notif) <next>: Remove.
6493 <base>: New field.
6494 (queue_stop_reply): Update.
6495 (push_event, send_next_stop_reply): Remove.
6496 (discard_queued_stop_replies): Update.
6497 (notif_stop): New variable.
6498 (handle_v_stopped): Remove.
6499 (handle_v_requests): Don't call handle_v_stopped. Call
6500 handle_ack_notif instead.
6501 (queue_stop_reply_callback): Call notif_event_enque instead
6502 of queue_stop_reply.
6503 (handle_status): Don't call send_next_stop_reply, call
6504 notif_write_event instead.
6505 (kill_inferior_callback): Likewise.
6506 (detach_or_kill_inferior_callback): Likewise.
6507 (main): Call initialize_notif.
6508 (process_serial_event): Call QUEUE_is_empty.
6509 (handle_target_event): Call notif_push instead of push event.
6510 * server.h (push_event): Remove declaration.
6511
61c125b9
TT
65122012-12-10 Tom Tromey <tromey@redhat.com>
6513
6514 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6515 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6516 macros.
6517 (.c.o): Rewrite.
6518 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6519 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6520 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6521 (amd64-linux-ipa.o, ax.o): Rewrite.
6522 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6523 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6524 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6525 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6526 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6527 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6528 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6529 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6530 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6531 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6532 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6533 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6534 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6535 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6536 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6537 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6538 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6539 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6540 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6541 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6542 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6543 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6544 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6545 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6546 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6547 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6548 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6549 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6550 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6551 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6552 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6553 (reg-tilegx.o): Remove.
6554 (all_object_files): New macro.
6555 Include .deps files.
6556 * aclocal.m4, configure: Rebuild.
6557 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6558 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6559 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6560
e90e9ad9
TT
65612012-12-05 Tom Tromey <tromey@redhat.com>
6562
6563 PR gdb/14917:
6564 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6565
02d403bf 65662012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6567
6568 * configure.ac: Check for linux/perf_event.h.
6569 * config.in: Regenerated.
6570 * configure: Regenerated.
6571
0270a750
PA
65722012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6573
6574 * hostio.c (handle_readlink): Decrease buffer size
6575 parameter passed to readlink by one byte.
6576
8c29b58e
YQ
65772012-11-26 Yao Qi <yao@codesourcery.com>
6578
6579 * configure.ac (build_warnings): Append '-Wempty-body'.
6580 * configure: Regenerated.
6581 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6582 body.
6583
8bdce1ff
PM
65842012-11-15 Pierre Muller <muller@sourceware.org>
6585
6586 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6587 * config.in: Regenerate.
6588 * configure: Regenerate.
6589 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6590 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6591 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6592 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6593 header.
6594 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6595 instead of <sys/wait.h> header.
6596 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6597
02d403bf 65982012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6599
6600 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6601 (various make rules): Remove -DGDBSERVER
6602
fbd5db48
YQ
66032012-11-09 Yao Qi <yao@codesourcery.com>
6604
6605 * spu-low.c (current_ptid): Move it to ..
6606 * gdbthread.h: ... here. New.
6607 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6608 * server.c (myresume, process_serial_event): Likewise.
6609 * thread-db.c (thread_db_find_new_threads): Likewise.
6610 * tracepoint.c (run_inferior_command): Likewise.
6611
b3dc46ff
AB
66122012-10-01 Andrew Burgess <aburgess@broadcom.com>
6613
6614 * server.c (handle_search_memory_1): Include access length in
6615 warning message.
6616
07c04788
HPN
66172012-09-05 Michael Brandt <michael.brandt@axis.com>
6618
6619 * linux-crisv32-low.c: Fix compile errors.
6620
918d227b
YQ
66212012-09-04 Yao Qi <yao@codesourcery.com>
6622
6623 * tracepoint.c (cmd_qtsv): Adjust debug message.
6624 Don't check CUR_TPOINT.
6625
18c1b81a
YQ
66262012-08-28 Yao Qi <yao@codesourcery.com>
6627
6628 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6629 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6630 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6631 Remove declarations of xmalloc, xreallloc, xstrdup and
6632 freeargv.
6633 * Makefile.in (libiberty_h): New.
6634 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6635 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6636
dc82f37b
YQ
66372012-08-23 Yao Qi <yao@codesourcery.com>
6638
6639 * server.h: Remove declaration of 'xsnprintf'.
6640
406b1477
KS
66412012-08-22 Keith Seitz <keiths@redhat.com>
6642
6643 * server.h: Include build-gnulib-gbserver/config.h.
6644 * gdbreplay.c: Likewise.
6645
e6712ff1
DE
66462012-08-08 Doug Evans <dje@google.com>
6647
6648 * Makefile.in (SFILES): Add gdb_vecs.c.
6649 (OBS): Add gdb_vecs.o.
6650 (gdb_vecs_h, host_defs_h): New variables.
6651 (thread-db.o): Add $(gdb_vecs_h) dependency.
6652 (gdb_vecs.o): New rule.
6653 * thread-db.c: #include "gdb_vecs.h".
6654 (thread_db_load_search): Use a vector to iterate over path elements.
6655 Handle text appearing after "$pdir".
6656
6657 * configure.ac: Add check for strstr.
6658 * config.in: Regenerate.
6659 * configure: Regenerate.
6660
7c3270ae
UW
66612012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6662
6663 * hostio.c (handle_pread): If pread fails, fall back to attempting
6664 lseek/read.
6665 (handle_pwrite): Likewise for pwrite.
6666
b62e2b27
UW
66672012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6668
6669 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6670 between unsupported TYPE and unimplementable ADDR/LEN combination.
6671 (arm_insert_point): Act on new return value.
6672
78a99e91
PA
66732012-07-31 Pedro Alves <palves@redhat.com>
6674
6675 * server.c (process_point_options): Only skip tokens if we find
6676 one that is unrecognized. Don't treat 'X' specially while
6677 skipping unrecognized tokens.
6678
fcf303ab
UW
66792012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6680
6681 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6682 to 4-byte-align HW breakpoint addresses for Thumb.
6683
7255706c
YQ
66842012-07-27 Yao Qi <yao@codesourcery.com>
6685
6686 PR remote/14161.
6687
6688 * server.h: Declare gdb_agent_about_to_close.
6689 * target.c (kill_inferior): Include "agent.h".
6690 New. Send command 'kill'.
6691 * target.h (kill_inferior): Removed macro.
6692 * tracepoint.c (gdb_agent_about_to_close): New.
6693 (gdb_agent_helper_thread): Handle command 'close'.
6694 Wait endlessly until the inferior stops.
6695 Install gdb_agent_remove_socket to atexit hook.
6696 (agent_socket_name): New static variable.
6697 (gdb_agent_socket_init): Replace local variable 'name' with
6698 'agent_socket_name'.
6699 (gdb_agent_remove_socket): New.
6700
5a3f286f
YQ
67012012-07-27 Yao Qi <yao@codesourcery.com>
6702
6703 * server.c (process_point_options): Stop at 'X' when parsing.
6704
961bd387
ME
67052012-07-19 Michael Eager <eager@eagercon.com>
6706
a261b8f5 6707 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6708 to hw_execute.
6709 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6710 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6711 hardware breakpoint.
6712
aa7c7447
JK
67132012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6714
6715 * gdbserver/linux-low.c (initialize_low): Call
6716 linux_ptrace_init_warnings.
6717
7f216e7c
DE
67182012-07-02 Doug Evans <dje@google.com>
6719
6720 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6721 pointer to int.
6722
d3ce09f5
SS
67232012-07-02 Stan Shebs <stan@codesourcery.com>
6724
6725 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6726 (ax.o): Add it to build rule.
6727 (ax-ipa.o): Ditto.
6728 (OBS): Add format.o.
6729 (IPA_OBS): Add format.o.
6730 * server.c (handle_query): Claim support for breakpoint commands.
6731 (process_point_options): Add command case.
6732 (process_serial_event): Leave running if there are printfs in
6733 effect.
6734 * mem-break.h (any_persistent_commands): Declare.
6735 (add_breakpoint_commands): Declare.
6736 (gdb_no_commands_at_breakpoint): Declare.
6737 (run_breakpoint_commands): Declare.
6738 * mem-break.c (struct point_command_list): New struct.
6739 (struct breakpoint): New field command_list.
6740 (any_persistent_commands): New function.
6741 (add_commands_to_breakpoint): New function.
6742 (add_breakpoint_commands): New function.
6743 (gdb_no_commands_at_breakpoint): New function.
6744 (run_breakpoint_commands): New function.
6745 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6746 locally.
6747 * ax.c: Include format.h.
6748 (ax_printf): New function.
6749 (gdb_eval_agent_expr): Add printf opcode.
6750
2f8f6aed
YQ
67512012-06-13 Yao Qi <yao@codesourcery.com>
6752
6753 * server.c (start_inferior): Remove duplicated writes to fields
6754 'last_resume_kind' and 'last_status' of 'current_inferior'.
6755
0c9070b3
YQ
67562012-06-12 Yao Qi <yao@codesourcery.com>
6757 Pedro Alves <palves@redhat.com>
6758
6759 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6760 comment.
6761 * server.c (handle_v_cont): Extend comment.
6762
c52daf70
YQ
67632012-06-11 Yao Qi <yao@codesourcery.com>
6764
6765 * linux-low.c (linux_attach): Add 'static'.
6766
d38bbb0a
YQ
67672012-06-06 Yao Qi <yao@codesourcery.com>
6768
6769 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6770
89dc0afd
JK
67712012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6772
6773 Fix gcc -flto compilation warning.
6774 * server.c (main): Make variable multi_mode and attach volatile.
6775
75f62ce7
TJB
67762012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6777
6778 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6779 if the platform doesn't know about it.
6780
65f479b6
PA
67812012-05-30 Jeff Kenton <jkenton@tilera.com>
6782
6783 * Makefile.in (SFILES): Add linux-tile-low.c.
6784 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6785 * configure.srv: Handle tilegx-*-linux*.
6786 * linux-tile-low.c: New file.
6787
0c5bf5a9
JK
67882012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6789
6790 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6791
a493e3e2
PA
67922012-05-24 Pedro Alves <palves@redhat.com>
6793
6794 PR gdb/7205
6795
43aaf8b6 6796 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6797
2ea28649
PA
67982012-05-24 Pedro Alves <palves@redhat.com>
6799
6800 PR gdb/7205
6801
6802 Replace target_signal with gdb_signal throughout.
6803
8d409d16
MR
68042012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6805
6806 * linux-low.c (linux_store_registers): Avoid the copying sequence
6807 when no data has been retrieved by ptrace.
6808
23512c01
MGD
68092012-05-22 Will Deacon <will.deacon@arm.com>
6810
6811 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6812 Include asm/ptrace.h.
6813 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6814 already defined.
6815
4934b29e
MR
68162012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6817
6818 * linux-low.c (linux_store_registers): Don't re-retrieve data
6819 with ptrace that has already been obtained from /proc. Always
6820 copy any data retrieved with ptrace to the buffer supplied.
6821
bde24c0a
PA
68222012-05-11 Yao Qi <yao@codesourcery.com>
6823 Pedro Alves <palves@redhat.com>
6824
6825 * linux-low.c (enum stopping_threads_kind): New.
6826 (stopping_threads): Change type to `enum stopping_threads_kind'.
6827 (handle_extended_wait): If stopping and suspending threads, leave
6828 the new_lwp suspended too.
6829 (linux_wait_for_event): Adjust.
6830 (stop_all_lwps): Set `stopping_threads' to
6831 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6832 whether we're suspending threads or just stopping them. Assert no
6833 recursion happens.
6834
623b6bdf
YQ
68352012-04-29 Yao Qi <yao@codesourcery.com>
6836
6837 * server.h: Move some code to ...
6838 * gdbthread.h: ... here. New.
6839 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6840 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6841 (nto-low.o, win32-low.o): Likewise.
6842 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6843 * regcache.c, remote-utils.c, server.c: Likewise.
6844 * target.c, tracepoint.c, win32-low.c: Likewise.
6845
f15f9948
TJB
68462012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6847
6848 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6849 (PTRACE_ARG4_TYPE): Likewise.
6850 (PTRACE_XFER_TYPE): Likewise.
6851 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6852 ptrace to PTRACE_ARG3_TYPE.
6853 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6854 (PTRACE_ARG4_TYPE): Likewise.
6855 (PTRACE_XFER_TYPE): Likewise.
6856 (linux_detach_one_lwp): Cast fourth argument of
6857 ptrace to long then PTRACE_ARG4_TYPE.
6858 (regsets_fetch_inferior_registers): Cast third argument of
6859 ptrace to long then PTRACE_ARG3_TYPE.
6860 (regsets_store_inferior_registers): Likewise.
6861
38ea300a
PA
68622012-04-20 Pedro Alves <palves@redhat.com>
6863
6864 * configure: Regenerate.
6865
c971b7fa
PA
68662012-04-19 Pedro Alves <palves@redhat.com>
6867
43aaf8b6 6868 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6869 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6870 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6871 (all, install-only, uninstall, clean-info, all-lib, clean): No
6872 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6873 (maintainer-clean realclean distclean): Use subdir_do.
6874 (subdir_do): New.
6875 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6876 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6877 * acinclude.m4: Include acx_configure_dir.m4.
6878 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6879 calls. Call AC_PROG_RANLIB. Configure gnulib using
6880 ACX_CONFIGURE_DIR.
6881 (GNULIB): New.
6882 (GNULIB_STDINT_H): Adjust.
6883 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6884 * gdbreplay.c: Include build-gnulib/config.h.
6885 * server.h: Likewise.
6886 * aclocal.m4: Regenerate.
6887 * config.in: Regenerate.
6888 * configure: Regenerate.
c971b7fa 6889
809277f8
PA
68902012-04-19 Pedro Alves <palves@redhat.com>
6891
6892 * Makefile.in (LIBGNU, INCGNU): Adjust.
6893 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6894 (all, install-only, uninstall, clean-info, all-lib, clean)
6895 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6896 * configure.ac: Adjust AC_OUTPUT output.
6897 * aclocal.m4: Regenerate.
6898 * configure: Regenerate.
6899
fd9bb8b8
PA
69002012-04-19 Pedro Alves <palves@redhat.com>
6901
6902 * Makefile.in (generated_files): New.
6903 (server_h): Remove the explicit dependency on config.h, and depend
6904 on $generated_files.
6905
1c298c66
PA
69062012-04-19 Pedro Alves <palves@redhat.com>
6907
6908 * Makefile.in (INCGNU): Add -Ignulib.
6909
57c4b50b
PA
69102012-04-19 Pedro Alves <palves@redhat.com>
6911
6912 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6913 (INCGNU): ... this, and spell out -I here.
6914 (GNULIB_LIB): Rename to ...
6915 (LIBGNU): ... this.
6916 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6917
1030e047
PA
69182012-04-19 Pedro Alves <palves@redhat.com>
6919
6920 * config.in: Regenerate.
6921
447d4319
PA
69222012-04-19 Pedro Alves <palves@redhat.com>
6923
6924 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6925 * server.h (memmem): Remove declaration.
6926 * config.in: Regenerate.
6927 * configure: Regenerate.
6928
aad9eab9
YQ
69292012-04-19 Yao Qi <yao@codesourcery.com>
6930
6931 * Makefile.in (SFILES): Add common/vec.c.
6932 (OBS): Add vec.o.
6933 (vec.o): New rule.
6934
3e10640f
YQ
69352012-04-19 Yao Qi <yao@codesourcery.com>
6936
6937 * remote-utils.c (prepare_resume_reply): Replace with macro
6938 target_core_of_thread.
6939 * server.c (handle_qxfer_threads_proper): Likewise.
6940 * target.h (traget_core_of_thread): New macro.
6941
71622373
PA
69422012-04-18 Pedro Alves <palves@redhat.com>
6943
6944 * aclocal.m4: Regenerate.
6945 * configure: Regenerate.
6946
80d26939
YQ
69472012-04-16 Yao Qi <yao@codesourcery.com>
6948
6949 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6950 duplicated on address.
6951
42476b70
YQ
69522012-04-16 Yao Qi <yao@codesourcery.com>
6953
6954 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6955 (struct tracepoint_action_ops) <send>: New field.
6956 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6957 (agent_expr_send, x_tracepoint_action_send): New.
6958 (l_tracepoint_action_send): New.
6959 (cmd_qtdp): Download and install tracepoint
6960 according to `use_agent'.
6961 (run_inferior_command): Add one more parameter `len'.
6962 Update callers.
6963 (tracepoint_send_agent): New.
6964 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6965
7bc83639
YQ
69662012-04-16 Yao Qi <yao@codesourcery.com>
6967
6968 * tracepoint.c (download_tracepoints): Moved to ...
6969 (cmd_qtstart): ... here.
6970
5f18041e
YQ
69712012-04-14 Yao Qi <yao@codesourcery.com>
6972
6973 * tracepoint.c: Include inttypes.h.
6974 (struct collect_memory_action): Use sized types.
6975 (struct tracepoint): Likewise.
6976 (cmd_qtdp, stop_tracing): Update print specifiers.
6977 (cmd_qtp, response_tracepoint): Likewise.
6978 (collect_data_at_tracepoint): Likewise.
6979 (collect_data_at_step): Likewise.
6980
55a8c076
YQ
69812012-04-14 Yao Qi <yao@codesourcery.com>
6982
6983 Import gnulib module inttypes.
6984 * aclocal.m4, config.in, configure: Regenerated.
6985
dc750257
YQ
69862012-04-14 Yao Qi <yao@codesourcery.com>
6987
6988 * Makefile.in (maintainer-clean, realclean, distclean): Remove
6989 Makefile and config.status at last.
6990
0ab5faf9
YQ
69912012-04-13 Yao Qi <yao@codesourcery.com>
6992
6993 * tracepoint.c: Include stdint.h unconditionally.
6994
18f5fd81
TJB
69952012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6996
6997 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
6998 on BFD_HAVE_SYS_PROCFS_TYPE.
6999 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7000 * configure: Regenerate.
7001 * config.in: Likewise.
7002
4d47af5c
L
70032012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7004
7005 * Makefile.in (clean): Also remove x32.c x32-linux.c
7006 x32-avx.c x32-avx-linux.c.
7007 (x32.o): New target.
7008 (x32.c): Likewise.
7009 (x32-linux.o): Likewise.
7010 (x32-linux.c): Likewise.
7011 (x32-avx.o): Likewise.
7012 (x32-avx.c): Likewise.
7013 (x32-avx-linux.o): Likewise.
7014 (x32-avx-linux.c): Likewise.
7015
7016 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7017 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7018 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7019 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7020 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7021 i386/x32-avx-linux.xml.
7022
7023 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7024 (init_registers_x32_avx_linux): Likwise.
7025 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7026 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7027
ecedbe58
PA
70282012-04-13 Pedro Alves <palves@redhat.com>
7029
7030 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7031 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7032 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7033 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7034 the sub-make.
7035
c92b5177
L
70362012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7037
7038 * linux-x86-low.c (compat_x32_clock_t): New.
7039 (compat_x32_siginfo_t): Likewise.
7040 (compat_x32_siginfo_from_siginfo): Likewise.
7041 (siginfo_from_compat_x32_siginfo): Likewise.
7042 (linux_is_elf64): Likewise.
7043 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7044 and siginfo_from_compat_x32_siginfo for x32.
7045 (x86_arch_setup): Set linux_is_elf64.
7046
214d508e
L
70472012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7048
7049 PR gdb/13969
7050 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7051 e_machine field.
7052 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7053 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7054 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7055 compatible with process.
7056
c9a1864a
YQ
70572012-04-12 Yao Qi <yao@codesourcery.com>
7058
7059 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7060 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7061 (install-only, install-info, clean): Handle sub dir gnulib.
7062 (all-lib, am--refresh): New targets.
7063 (memmem.o): Remove target.
7064 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7065 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7066 (AC_REPLACE_FUNCS): Remove memmem.
7067 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7068 (AC_OUTPUT): Generate Makefile in gnulib/.
7069 * aclocal.m4, config.in, configure: Regenerated.
7070
367ba2c2
MR
70712012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7072
7073 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7074
9d236627
PA
70752012-04-05 Pedro Alves <palves@redhat.com>
7076
7077 -Werror=strict-aliasing
7078
7079 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7080 pointer.
7081
111217b3
PA
70822012-04-04 Pedro Alves <palves@redhat.com>
7083
7084 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7085 (sparc_store_gregset_from_stack, sparc_store_gregset)
7086 (sparc_breakpoint_at): Fix formatting.
7087
8365dcf5
TJB
70882012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7089
7090 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7091 are available.
7092 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7093 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7094 * config.in: Regenerate.
7095 * configure: Likewise.
7096
689cc2ae
PA
70972012-03-29 Pedro Alves <palves@redhat.com>
7098
7099 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7100 Correct ptrace arguments.
7101
c14dfd32
PA
71022012-03-28 Pedro Alves <palves@redhat.com>
7103
7104 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7105 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7106 (IA64_FR1_REGNUM): New defines.
7107 (ia64_fetch_register): New.
7108 (the_low_target): Install it.
7109 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7110 field.
7111 * linux-low.c (linux_fetch_registers): Try the
7112 the_low_target.fetch_register hook first.
7113
7114 * linux-arm-low.c (the_low_target): Adjust.
7115 * linux-bfin-low.c (the_low_target): Adjust.
7116 * linux-cris-low.c (the_low_target): Adjust.
7117 * linux-crisv32-low.c (the_low_target): Adjust.
7118 * linux-m32r-low.c (the_low_target): Adjust.
7119 * linux-m68k-low.c (the_low_target): Adjust.
7120 * linux-mips-low.c (the_low_target): Adjust.
7121 * linux-ppc-low.c (the_low_target): Adjust.
7122 * linux-s390-low.c (the_low_target): Adjust.
7123 * linux-sh-low.c (the_low_target): Adjust.
7124 * linux-sparc-low.c (the_low_target): Adjust.
7125 * linux-tic6x-low.c (the_low_target): Adjust.
7126 * linux-x86-low.c (the_low_target): Adjust.
7127 * linux-xtensa-low.c (the_low_target): Adjust.
7128
63c88e13
PA
71292012-03-26 Pedro Alves <palves@redhat.com>
7130
7131 * server.c (handle_qxfer_libraries): Don't bail early if
7132 the_target->qxfer_libraries_svr4 is not NULL.
7133
fb723180
PA
71342012-03-26 Pedro Alves <palves@redhat.com>
7135
7136 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7137
0afae3cf
PA
71382012-03-23 Pedro Alves <palves@redhat.com>
7139
7140 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7141 "library-list-svr4" element's start tag when the the DSO list is
7142 empty.
7143
485f1ee4
PA
71442012-03-23 Pedro Alves <palves@redhat.com>
7145
7146 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7147 a variable whose type size is the same as the inferior's pointer
7148 size.
7149
a5362b9a
TS
71502012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7151
7152 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7153 struct siginfo.
7154 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7155 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7156 * linux-low.h: Include <signal.h>.
7157 (struct siginfo): Remove forward declaration.
7158 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7159 struct siginfo.
7160
d226c142
MF
71612012-03-21 Mike Frysinger <vapier@gentoo.org>
7162
7163 * .gitignore: Ignore more files.
7164
122f36ef
PA
71652012-03-19 Pedro Alves <palves@redhat.com>
7166 Jan Kratochvil <jan.kratochvil@redhat.com>
7167
7168 * server.c (cont_thread, general_thread): Add describing comments.
7169 (start_inferior): Clear `cont_thread'.
7170 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7171 of a process.
7172
fc3e5175
YQ
71732012-03-15 Yao Qi <yao@codesourcery.com>
7174
7175 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7176 handling to ...
7177 (cmd_qtdp): ... here.
7178
8d0d92cd
YQ
71792012-03-15 Yao Qi <yao@codesourcery.com>
7180
7181 * tracepoint.c (struct tracepoint_action_ops): New.
7182 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7183 (m_tracepoint_action_download): New.
7184 (r_tracepoint_action_download): New.
7185 (x_tracepoint_action_download): New.
7186 (l_tracepoint_action_download): New.
7187 (add_tracepoint_action): Install `action->ops' according type.
7188 (download_tracepoint_1): Move code `download' function pointer
7189 of various tracepoint_action_ops.
7190
87b0bb13
JK
71912012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7192
7193 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7194 linux_ptrace_attach_warnings.
7195
5f572dec
JK
71962012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7197
7198 * Makefile.in (linux-ptrace.o): New.
7199 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7200 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7201 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7202 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7203 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7204 of these targets.
7205 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7206
f4647387
YQ
72072012-03-08 Yao Qi <yao@codesourcery.com>
7208 Pedro Alves <palves@redhat.com>
7209
7210 Fix PR server/13392.
7211 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7212 offset of JMP insn.
7213 * tracepoint.c (remove_tracepoint): New.
7214 (cmd_qtdp): Call remove_tracepoint when failed to install.
7215
9b224c5e
PA
72162012-03-07 Pedro Alves <palves@redhat.com>
7217
7218 * linux-low.c (get_detach_signal): New.
7219 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7220 Pass on pending signals to PTRACE_DETACH. Check the result of the
7221 ptrace call.
7222 * server.c (program_signals, program_signals_p): New.
7223 (handle_general_set): Handle QProgramSignals.
7224 * server.h (program_signals, program_signals_p): Declare.
7225
e237a7e2
JK
72262012-03-05 Pedro Alves <palves@redhat.com>
7227 Jan Kratochvil <jan.kratochvil@redhat.com>
7228
7229 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7230 New comment why.
7231
5808517f
YQ
72322012-03-03 Yao Qi <yao@codesourcery.com>
7233
7234 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7235 agent_look_up_symbols.
7236
58b4daa5
YQ
72372012-03-03 Yao Qi <yao@codesourcery.com>
7238
7239 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7240 (linux-x86-low.o): Likewise.
7241 * server.h: Remove in_process_agent_loaded.
7242 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7243 common/agent.c.
7244 Update callers.
7245
8ffcbaaf
YQ
72462012-03-03 Yao Qi <yao@codesourcery.com>
7247
7248 * tracepoint.c (gdb_agent_capability): New global.
7249 (in_process_agent_loaded_ust): Renamed to
7250 `in_process_agent_supports_ust'.
7251 Update callers.
7252 (in_process_agent_supports_ust): Call agent_capability_check.
7253 (clear_installed_tracepoints): Assert that agent supports
7254 agent.
7255
d1feda86
YQ
72562012-03-03 Yao Qi <yao@codesourcery.com>
7257
7258 * linux-low.c (linux_supports_agent): New.
7259 (linux_target_ops): Initialize field `supports_agent' with
7260 linux_supports_agent.
7261 * target.h (struct target_ops) <supports_agent>: New.
7262 (target_supports_agent): New macro.
7263 * server.c (handle_general_set): Handle packet 'QAgent'.
7264 (handle_query): Send `QAgent+'.
7265 * Makefile.in (server.o): Depends on agent.h.
7266
2fa291ac
YQ
72672012-03-03 Yao Qi <yao@codesourcery.com>
7268
7269 * Makefile.in (OBS): Add agent.o.
7270 Add new rule for agent.o.
7271 Track dependence of tracepoint.c on agent.h.
7272 * tracepoint.c (run_inferior_command_1):
7273 (run_inferior_command): Call agent_run_command.
7274 (gdb_ust_connect_sync_socket): Deleted. Move it to
7275 common/agent.c.
7276 (resume_thread, stop_thread): Likewise.
7277 (gdb_ust_socket_init): Renamed to ...
7278 (gdb_agent_socket_init): ... New.
7279 (gdb_ust_thread): Renamed to ...
7280 (gdb_agent_helper_thread): ... New.
7281 (gdb_ust_init): Move some code to ...
7282 (gdb_agent_init): ... here. New.
7283 [HAVE_UST]: Call gdb_ust_init.
7284 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7285 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7286 * config.in, configure: Regenerated.
7287
05044653
PA
72882012-03-02 Pedro Alves <palves@redhat.com>
7289
7290 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7291 * linux-low.c (struct simple_pid_list): New.
7292 (stopped_pids): New a struct simple_pid_list pointer.
7293 (add_to_pid_list, pull_pid_from_list): New.
7294 (handle_extended_wait): Don't assume the first signal new children
7295 report is SIGSTOP. Adjust call to pull_pid_from_list.
7296 (linux_wait_for_lwp): Adjust.
7297
8d00225b
YQ
72982012-03-02 Yao Qi <yao@codesourcery.com>
7299
7300 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7301 debug log.
7302
19560ba5
YQ
73032012-03-02 Yao Qi <yao@codesourcery.com>
7304
7305 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7306 `stop_pc' and `tpoint'. Update caller.
7307
1faeff08
MR
73082012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7309
7310 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7311 * linux-low.c (use_linux_regsets): New macro.
7312 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7313 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7314 (linux_register_in_regsets): New function.
7315 (usr_fetch_inferior_registers): Skip registers covered by
7316 regsets.
7317 (usr_store_inferior_registers): Likewise.
7318 (usr_fetch_inferior_registers): New macro.
7319 (usr_store_inferior_registers): Likewise.
7320 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7321 (linux_store_registers): Likewise.
7322 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7323 prototype.
7324 (init_registers_mips64_dsp_linux): Likewise.
7325 (init_registers_mips_linux): New macro.
7326 (init_registers_mips_dsp_linux): Likewise.
7327 (mips_dsp_num_regs): Likewise.
7328 (DSP_BASE, DSP_CONTROL): New fallback macros.
7329 (mips_base_regs): New macro.
7330 (mips_regmap): Use it. Fix the size.
7331 (mips_dsp_regmap): New variable.
7332 (mips_dsp_regset_bitmap): Likewise.
7333 (mips_arch_setup): New function.
7334 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7335 than mips_regmap.
7336 (mips_cannot_store_register): Likewise.
7337 (the_low_target): Update .arch_setup, .num_regs and .regmap
7338 initializers. Add .regset_bitmap initializer.
7339 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7340 initializer.
7341 * linux-bfin-low.c (the_low_target): Likewise.
7342 * linux-cris-low.c (the_low_target): Likewise.
7343 * linux-crisv32-low.c (the_low_target): Likewise.
7344 * linux-ia64-low.c (the_low_target): Likewise.
7345 * linux-m32r-low.c (the_low_target): Likewise.
7346 * linux-m68k-low.c (the_low_target): Likewise.
7347 * linux-ppc-low.c (the_low_target): Likewise.
7348 * linux-s390-low.c (the_low_target): Likewise.
7349 * linux-sh-low.c (the_low_target): Likewise.
7350 * linux-sparc-low.c (the_low_target): Likewise.
7351 * linux-tic6x-low.c (the_low_target): Likewise.
7352 * linux-x86-low.c (the_low_target): Likewise.
7353 * linux-xtensa-low.c (the_low_target): Likewise.
7354 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7355 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7356 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7357 srv_xmlfiles.
7358 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7359 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7360
c03e6ccc
YQ
73612012-02-29 Yao Qi <yao@codesourcery.com>
7362 Pedro Alves <palves@redhat.com>
7363
7364 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7365 `step_over_finished' is true.
7366
644cebc9
PA
73672012-02-27 Pedro Alves <palves@redhat.com>
7368
7369 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7370 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7371
c14d7ab2
PA
73722012-02-27 Pedro Alves <palves@redhat.com>
7373
7374 PR server/9684
7375 * linux-low.c (pid_is_stopped): New.
7376 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7377
412c89dd
LM
73782012-02-25 Luis Machado <lgustavo@codesourcery.com>
7379
7380 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7381 of conditions.
7382
b745defe
MR
73832012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7384
7385 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7386
9f3a5c85
LM
73872012-02-24 Luis Machado <lgustavo@codesourcery>
7388
7389 * server.c (handle_query): Advertise support for target-side
7390 breakpoint condition evaluation.
7391 (process_point_options): New function.
7392 (process_serial_event): When inserting a breakpoint, check for
7393 a target-side condition that should be evaluated.
7394
7395 * mem-break.c: Include regcache.h and ax.h.
7396 (point_cond_list_t): New data structure.
7397 (breakpoint) <cond_list>: New field.
7398 (find_gdb_breakpoint_at): Make non-static.
7399 (delete_gdb_breakpoint_at): Clear any target-side
7400 conditions.
7401 (clear_gdb_breakpoint_conditions): New function.
7402 (add_condition_to_breakpoint): Likewise.
7403 (add_breakpoint_condition): Likewise.
7404 (gdb_condition_true_at_breakpoint): Likewise.
7405 (gdb_breakpoint_here): Return result directly instead
7406 of going through a local variable.
7407
7408 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7409 (clear_gdb_breakpoint_conditions): Likewise.
7410 (add_breakpoint_condition): Likewise.
7411 (gdb_condition_true_at_breakpoint): Likewise.
7412
7413 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7414 (need_step_over_p): Take target-side breakpoint condition into
7415 consideration.
7416
5e1dc496
LM
74172012-02-24 Luis Machado <lgustavo@codesourcery>
7418
7419 * server.h: Include tracepoint.h.
7420 (agent_mem_read, agent_get_trace_state_variable_value,
7421 agent_set_trace_state_variable_value,
7422 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7423 get_set_tsv_func_addr): New prototypes.
7424
7425 * ax.h: New include file.
7426 * ax.c: New source file.
7427
7428 * tracepoint.c: Include ax.h.
7429 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7430 agent_expr, eval_result_type): Move to ax.h.
7431 (parse_agent_expr): Rename to ...
7432 (gdb_parse_agent_expr): ... this, make it non-static and move
7433 to ax.h.
7434 (unparse_agent_expr) Rename to ...
7435 (gdb_unparse_agent_expr): ... this, make it non-static and move
7436 to ax.h.
7437 (eval_agent_expr): Rename to ...
7438 (eval_tracepoint_agent_expr): ... this.
7439 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7440 forward declarations.
7441 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7442 (agent_get_trace_state_variable_value): New function.
7443 (agent_set_trace_state_variable_value): New function.
7444 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7445 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7446 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7447 (condition_true_at_tracepoint): Likewise.
7448 (parse_agent_expr): Rename to ...
7449 (gdb_parse_agent_expr): ... this and move to ax.c.
7450 (unparse_agent_expr): Rename to ...
7451 (gdb_unparse_agent_expr): ... this and move to ax.c.
7452 (gdb_agent_op_name): Move to ax.c.
7453 (eval_agent_expr): Rename to ...
7454 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7455 and move to ax.c.
7456 (eval_tracepoint_agent_expr): New function.
7457 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7458 non-static.
5e1dc496
LM
7459 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7460 ax.c.
7461 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7462 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7463 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7464 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7465 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7466 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7467 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7468 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7469 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7470 (compile_bytecodes): Remove forward declaration.
7471 (is_goto_target): Move to ax.c.
7472 (compile_bytecodes): Move to ax.c and call
7473 agent_get_trace_state_variable_value (...) and
7474 agent_set_trace_state_variable_value (...).
7475
7476 * Makefile.in: Update ax.c and IPA dependencies.
7477
277e4e52
PA
74782012-02-24 Pedro Alves <palves@redhat.com>
7479
7480 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7481 (cmd_bigqtbuffer_circular): ... this. Only handle
7482 'QTBuffer:circular:'.
7483 (handle_tracepoint_general_set): Adjust.
7484
bf4c19f7
YQ
74852012-02-16 Yao Qi <yao@codesourcery.com>
7486
7487 * inferiors.c: Move code to ...
7488 * dll.c: .... here. New.
7489 * server.h: Declare clear_dlls.
7490 * Makefile.in (SFILES): Add dll.c.
7491 (OBS): Add dll.o
7492 (dll.o): New rule.
7493
d73f2619
YQ
74942012-02-11 Yao Qi <yao@codesourcery.com>
7495
7496 * server.c: (handle_monitor_command): Add a new parameter
7497 `own_buf'.
7498 (handle_query): Update caller.
7499
f8255c2a
JB
75002012-02-09 Joel Brobecker <brobecker@adacore.com>
7501
7502 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7503 * configure, config.in: Regenerate.
7504 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7505 is not defined.
7506
da84f473
PA
75072012-02-02 Pedro Alves <palves@redhat.com>
7508
7509 Try SIGKILL first, then PTRACE_KILL.
7510 * linux-low.c (linux_kill_one_lwp): New.
7511 (linux_kill_one_lwp): Rename to ...
7512 (kill_one_lwp_callback): ... this. Use the new
7513 linux_kill_one_lwp.
7514
e886a173
PA
75152012-02-02 Pedro Alves <palves@redhat.com>
7516
7517 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7518 inferior.
7519
be07f1a2
PA
75202012-01-27 Pedro Alves <palves@redhat.com>
7521
7522 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7523 (elf_64_file_p): Make static.
7524 (linux_pid_exe_is_elf_64_file): New.
7525 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7526 Delete declarations.
7527 (linux_pid_exe_is_elf_64_file): Declare.
7528 * linux-x86-low.c (x86_arch_setup): Use
7529 linux_pid_exe_is_elf_64_file.
7530
d8301ad1
JK
75312012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7532
7533 * linux-low.c (linux_wait_for_event_1): Rename to ...
7534 (linux_wait_for_event): ... here and merge it with former
7535 linux_wait_for_event - new variable wait_ptid, use it.
7536 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7537
01b17894
PA
75382012-01-23 Pedro Alves <palves@redhat.com>
7539
7540 * server.c (main): Avoid yet another case of infinite loop while
7541 detaching/killing after a longjmp.
7542
e825046f
JK
75432012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7544
7545 Code cleanup.
7546 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7547
b9e7b9c3
UW
75482012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7549
7550 * hostio.c (handle_readlink): New function.
7551 (handle_vFile): Call it to handle "vFile:readlink" packets.
7552
901f9912
UW
75532012-01-20 Pedro Alves <palves@redhat.com>
7554 Ulrich Weigand <ulrich.weigand@linaro.org>
7555
7556 * server.c (handle_v_requests): Only support vAttach and vRun to
7557 start multiple processes when in extended protocol mode.
7558
fc1ab1a0
PA
75592012-01-17 Pedro Alves <palves@redhat.com>
7560
7561 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7562 memalign plus mprotect to allocate the scratch buffer.
7563
7d5d4e98
PA
75642012-01-13 Pedro Alves <palves@redhat.com>
7565
7566 * server.c (attach_inferior): Clear `cont_thread'.
7567
f128d5e9
PA
75682012-01-13 Pedro Alves <palves@redhat.com>
7569
7570 * server.c (main): Avoid infinite loop while detaching/killing
7571 after a longjmp.
7572
06db92f0
DE
75732012-01-09 Doug Evans <dje@google.com>
7574
7575 * server.c (start_inferior): Set last_ptid in --wrapper case.
7576
32d92999
YQ
75772012-01-06 Yao Qi <yao@codesourcery.com>
7578
7579 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7580 defined.
7581 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7582
5e0a92a9
YQ
75832012-01-04 Yao Qi <yao@codesourcery.com>
7584
7585 * tracepoint.c (cmd_qtdp): Print debug message
7586 for static tracepoint.
7587
ae639e8c
YQ
75882012-01-04 Yao Qi <yao@codesourcery.com>
7589
7590 * tracepoint.c (trace_vdebug): Differentiate debug message
7591 between gdbserver and IPA.
7592
f72429c5
YQ
75932012-01-03 Yao Qi <yao@codesourcery.com>
7594
7595 * tracepoint.c (tracepoint_was_hit): Don't collect for
7596 static tracepoint.
7597
12c3e59c
JB
75982012-01-02 Joel Brobecker <brobecker@adacore.com>
7599
7600 * terminal.h: Reformat copyright header.
7601
67827812
JB
76022012-01-02 Joel Brobecker <brobecker@adacore.com>
7603
7604 * server.c (gdbserver_version): Update copyright year.
7605 * gdbreplay.c (gdbreplay_version): Likewise.
7606
3e52c33d
JK
76072011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7608
7609 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7610
7611 Revert:
7612 2011-12-18 Hui Zhu <teawater@gmail.com>
7613 * linux-low.c (linux_create_inferior): Save return value to ret.
7614
66f1260e
HZ
76152011-12-18 Hui Zhu <teawater@gmail.com>
7616
7617 * linux-low.c (linux_create_inferior): Save return value to ret.
7618
e77616d7
DE
76192011-12-16 Doug Evans <dje@google.com>
7620
e7b06c57
DE
7621 * linux-low.c (linux_create_inferior): If stdio connection,
7622 redirect stdin from /dev/null, stdout to stderr.
7623 * remote-utils.c (remote_is_stdio): New static global.
7624 (remote_connection_is_stdio): New function.
7625 (remote_prepare): Handle stdio connection.
7626 (remote_open): Ditto.
7627 (remote_close): Don't close stdin for stdio connections.
7628 (read_prim,write_prim): New functions. Replace all calls to
7629 read/write to these.
7630 * server.c (main): Watch for "-" argument. Move call to
7631 remote_prepare before start_inferior.
7632 * server.h (STDIO_CONNECTION_NAME): New macro.
7633 (remote_connection_is_stdio): Declare.
7634
e77616d7
DE
7635 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7636 in debugging output.
7637
82067193
YQ
76382011-12-15 Yao Qi <yao@codesourcery.com>
7639
7640 * tracepoint.c: Include sys/syscall.h.
7641 (gdb_ust_thread): Remove preprocessor conditional.
7642
82bfbe7e
PA
76432011-12-14 Pedro Alves <pedro@codesourcery.com>
7644
7645 * linux-low.c (linux_detach_one_lwp): Call
7646 the_low_target.prepare_to_resume before detaching.
7647
712c6575
YQ
76482011-12-14 Yao Qi <yao@codesourcery.com>
7649
7650 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7651 of write.
7652
d54d1edf
YQ
76532011-12-14 Yao Qi <yao@codesourcery.com>
7654
7655 * i386-low.c (i386_low_stopped_data_address): Initialize local
7656 variable `control'.
7657
6210a125
PA
76582011-12-13 Pedro Alves <pedro@codesourcery.com>
7659
7660 PR remote/13492
7661
7662 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7663 DR_CONTROL unless necessary. Extend comments.
7664 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7665 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7666
2ece8244
YQ
76672011-12-13 Yao Qi <yao@codesourcery.com>
7668
7669 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7670 macros.
7671 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7672
784867a5
JK
76732011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7674
7675 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7676 Print new debug message for such case.
7677
6bf36717
JK
76782011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7679
7680 Fix overlapping memcpy.
7681 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7682 the read_inferior_memory transfer.
7683 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7684 write_inferior_memory transfer.
7685 (set_fast_tracepoint_jump): New variable buf. Use it for the
7686 read_inferior_memory and write_inferior_memory transfers.
7687 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7688 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7689 Use it for the write_inferior_memory transfer.
7690 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7691 buffers.
7692
50275556
MR
76932011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7694
7695 * linux-low.c (fetch_register, store_register): Make code
7696 consistent, fix formatting.
7697
7325beb4
MR
76982011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7699
7700 * linux-low.c (usr_store_inferior_registers): Factor out code
7701 to handle individual registers into...
7702 (store_register): ... this new function.
7703
c642a434
UW
77042011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7705
7706 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7707 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7708 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7709 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7710 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7711 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7712 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7713 (srv_xmlfiles): Add new XML files.
7714
7715 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7716 and <sys/uio.h>.
7717 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7718 (init_registers_s390_linux32v1): Add prototype.
7719 (init_registers_s390_linux32v2): Likewise.
7720 (init_registers_s390_linux64v1): Likewise.
7721 (init_registers_s390_linux64v2): Likewise.
7722 (init_registers_s390x_linux64v1): Likewise.
7723 (init_registers_s390x_linux64v2): Likewise.
7724 (s390_num_regs): Increment to 52.
7725 (s390_regmap): Add orig_r2 register.
7726 (s390_num_regs_3264): Increment to 68.
7727 (s390_regmap_3264): Add orig_r2 register.
7728 (s390_collect_ptrace_register): Handle orig_r2 register.
7729 (s390_supply_ptrace_register): Likewise.
7730 (s390_fill_last_break): New function.
7731 (s390_store_last_break): Likewise.
7732 (s390_fill_system_call): New function.
7733 (s390_store_system_call): Likewise.
7734 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7735 register sets.
7736 (s390_check_regset): New function.
7737 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7738 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7739 Update target_regsets for available register sets.
7740
2268b414
JK
77412011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7742 Jan Kratochvil <jan.kratochvil@redhat.com>
7743
7744 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7745 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7746 New.
7747 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7748 * linux-low.h (struct process_info_private): New member r_debug.
7749 * server.c (handle_qxfer_libraries): Call
7750 the_target->qxfer_libraries_svr4.
7751 (handle_qxfer_libraries_svr4): New function.
7752 (qxfer_packets): New entry "libraries-svr4".
7753 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7754 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7755 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7756 PACKET_qXfer_libraries_svr4.
7757
d6db1fab
UW
77582011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7759
7760 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7761 PSW address/mask between 8-byte and 16-byte formats.
7762 (s390_supply_ptrace_register): Likewise.
7763 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7764 basic addressing mode bit.
7765
242f5f1c
SS
77662011-11-24 Stan Shebs <stan@codesourcery.com>
7767
7768 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7769
f196051f
SS
77702011-11-17 Stan Shebs <stan@codesourcery.com>
7771
7772 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7773 (tracing_start_time): New global.
7774 (tracing_stop_time): New global.
7775 (tracing_user_name): New global.
7776 (tracing_notes): New global.
7777 (tracing_stop_note): New global.
7778 (cmd_qtstart): Set traceframe_usage, start_time.
7779 (stop_tracing): Set stop_time.
7780 (cmd_qtstatus): Report additional status.
7781 (cmd_qtp): New function.
7782 (handle_tracepoint_query): Call it.
7783 (cmd_qtnotes): New function.
7784 (handle_tracepoint_general_set): Call it.
7785 (get_timestamp): Rename from tsv_get_timestamp.
7786
405f8e94
SS
77872011-11-14 Stan Shebs <stan@codesourcery.com>
7788 Kwok Cheung Yeung <kcy@codesourcery.com>
7789
7790 * linux-x86-low.c (small_jump_insn): New.
7791 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7792 trampoline and error message, build a trampoline and issue a small
7793 jump instruction to it.
7794 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7795 trampoline and error message.
7796 (x86_get_min_fast_tracepoint_insn_len): New.
7797 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7798 * linux-low.h (struct linux_target_ops): Add arguments to
7799 install_fast_tracepoint_jump_pad operation, add new operation.
7800 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7801 arguments.
7802 (linux_get_min_fast_tracepoint_insn_len): New function.
7803 (linux_target_op): Add new operation.
7804 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7805 (gdb_trampoline_buffer_end): Ditto.
7806 (gdb_trampoline_buffer_error): Ditto.
7807 (struct ipa_sym_addresses): Add fields for new IPA variables.
7808 (symbol_list): Add entries for new IPA variables.
7809 (struct tracepoint): Add fields to hold the address range of the
7810 trampoline used by the tracepoint.
7811 (trampoline_buffer_head): New static variable.
7812 (trampoline_buffer_tail): Ditto.
7813 (claim_trampoline_space): New function.
7814 (have_fast_tracepoint_trampoline_buffer): New function.
7815 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7816 structure.
7817 (install_fast_tracepoint): Ditto, also add error buffer argument.
7818 (cmd_qtminftpilen): New function.
7819 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7820 (fast_tracepoint_from_trampoline_address): New function.
7821 (fast_tracepoint_collecting): Handle trampoline as part of jump
7822 pad space.
7823 (set_trampoline_buffer_space): New function.
7824 (initialize_tracepoint): Initialize new IPA variables.
7825 * target.h (struct target_ops): Add arguments to
7826 install_fast_tracepoint_jump_pad operation, add new
7827 get_min_fast_tracepoint_insn_len operation.
7828 (target_get_min_fast_tracepoint_insn_len): New.
7829 (install_fast_tracepoint_jump_pad): Add arguments.
7830 * server.h (IPA_BUFSIZ): Define.
7831 * linux-i386-ipa.c: Include extra header files.
7832 (initialize_fast_tracepoint_trampoline_buffer): New function.
7833 (initialize_low_tracepoint): Call it.
7834 * server.h (set_trampoline_buffer_space): Declare.
7835 (claim_trampoline_space): Ditto.
7836 (have_fast_tracepoint_trampoline_buffer): Ditto.
7837
1e4d1764
YQ
78382011-11-14 Yao Qi <yao@codesourcery.com>
7839
7840 * server.c (handle_query): Handle InstallInTrace for qSupported.
7841 * tracepoint.c (add_tracepoint): Sort list.
7842 (install_tracepoint, download_tracepoint): New.
7843 (cmd_qtdp): Call them to install and download tracepoints.
7844 (sort_tracepoints): Removed.
7845 (cmd_qtstart): Update.
7846
5c73ff4e
YQ
78472011-11-14 Yao Qi <yao@codesourcery.com>
7848
7849 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7850 * mem-break.h: Declare.
7851 * tracepoint.c (cmd_qtstart): Move some code to ...
7852 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7853 New.
7854 (download_tracepoints): Move some code to ...
7855 (download_tracepoint_1): ... here. New.
7856
86a30030
YQ
78572011-11-08 Yao Qi <yao@codesourcery.com>
7858
7859 * remote-utils.c (relocate_instruction): A comment fix.
7860
8d26e50c
JB
78612011-11-07 Joel Brobecker <brobecker@adacore.com>
7862
7863 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7864 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7865 dr_status_mirror and dr_control_mirror from debug_reg_state.
7866 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7867 (i386_initial_stuff): Remove use of deleted globals.
7868 (i386_get_thread_context, i386_set_thread_context,
7869 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7870 from debug_reg_state.
7871
a59306a3
YQ
78722011-11-05 Yao Qi <yao@codesourcery.com>
7873
7874 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7875 address as TPOINT's.
7876
3065dfb6
SS
78772011-11-02 Stan Shebs <stan@codesourcery.com>
7878
7879 * tracepoint.c (agent_mem_read_string): New function.
7880 (eval_agent_expr): Call it for tracenz.
7881 * server.c (handle_query): Report support for tracenz.
7882
fd0d8c7c
YQ
78832011-11-02 Yao Qi <yao@codesourcery.com>
7884
7885 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7886
609086b1
YQ
78872011-11-02 Yao Qi <yao@codesourcery.com>
7888
7889 * target.h: Fix a typo in comment.
7890
b9fd1791
PA
78912011-10-31 Pedro Alves <pedro@codesourcery.com>
7892
7893 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7894 clobber the breakpoints' shadows with fast tracepoint jumps.
7895 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7896 * target.c (write_inferior_memory): Also pass MYADDR down to
7897 check_mem_write.
7898
03583c20
UW
78992011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7900
7901 * configure.ac: Check support for personality routine.
7902 * configure: Regenerate.
7903 * config.in: Likewise.
7904 * linux-low.c: Include <sys/personality.h>.
7905 Define ADDR_NO_RANDOMIZE if necessary.
7906 (linux_create_inferior): Disable address space randomization when
7907 forking inferior, if requested.
7908 (linux_supports_disable_randomization): New function.
7909 (linux_target_ops): Install it.
7910 * server.h (disable_randomization): Declare.
7911 * server.c (disable_randomization): New global variable.
7912 (handle_general_set): Handle QDisableRandomization.
7913 (handle_query): Likewise for qSupported.
7914 (main): Support --disable-randomization and --no-disable-randomization
7915 command line arguments.
7916 * target.h (struct target_ops): Add supports_disable_randomization.
7917 (target_supports_disable_randomization): New macro.
7918
723b724b
MF
79192011-09-29 Mike Frysinger <vapier@gentoo.org>
7920
7921 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7922 ifdef check.
7923 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7924 [!PT_GETDSBT] (target_loadmap): New definition.
7925 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7926 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7927 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7928 and PT_GETDSBT to LINUX_LOADMAP.
7929 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7930 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7931
55329a5c 79322011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7933
7934 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7935 (arm_linux_hwbp_cap): New static variable.
7936 (arm_linux_get_hwbp_cap): Replace by ...
7937 (arm_linux_init_hwbp_cap): ... this new function.
7938 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7939 (arm_linux_get_hw_watchpoint_count): Likewise.
7940 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7941 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7942 (arm_prepare_to_resume): Use perror_with_name instead of error.
7943
55329a5c 79442011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7945
7946 * linux-arm-low.c: Include <signal.h>.
7947 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7948 (struct arm_linux_hwbp_cap): New data type.
7949 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7950 (struct arm_linux_hw_breakpoint): New data type.
7951 (MAX_BPTS, MAX_WPTS): Define.
7952 (struct arch_process_info, struct arch_lwp_info): New data types.
7953 (arm_linux_get_hwbp_cap): New function.
7954 (arm_linux_get_hw_breakpoint_count): Likewise.
7955 (arm_linux_get_hw_watchpoint_count): Likewise.
7956 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7957 (arm_hwbp_control_initialize): Likewise.
7958 (arm_hwbp_control_is_enabled): Likewise.
7959 (arm_hwbp_control_is_initialized): Likewise.
7960 (arm_hwbp_control_disable): Likewise.
7961 (arm_linux_hw_breakpoint_equal): Likewise.
7962 (arm_linux_hw_point_initialize): Likewise.
7963 (struct update_registers_data): New data structure.
7964 (update_registers_callback: New function.
7965 (arm_insert_point): Likewise.
7966 (arm_remove_point): Likewise.
7967 (arm_stopped_by_watchpoint): Likewise.
7968 (arm_stopped_data_address): Likewise.
7969 (arm_new_process): Likewise.
7970 (arm_new_thread): Likewise.
7971 (arm_prepare_to_resume): Likewise.
7972 (the_low_target): Register arm_insert_point, arm_remove_point,
7973 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7974 arm_new_thread, and arm_prepare_to_resume.
7975
6b9801d4
SS
79762011-09-15 Stan Shebs <stan@codesourcery.com>
7977
7978 * server.h (struct emit_ops): Add compare-goto fields.
7979 * tracepoint.c (gdb_agent_op_sizes): New table.
7980 (emit_eq_goto): New function.
7981 (emit_ne_goto): New function.
7982 (emit_lt_goto): New function.
7983 (emit_le_goto): New function.
7984 (emit_gt_goto): New function.
7985 (emit_ge_goto): New function.
7986 (is_goto_target): New function.
7987 (compile_bytecodes): Recognize special cases of compare-goto
7988 combinations and call specialized emitters for them.
7989 * linux-x86-low.c (amd64_emit_eq_goto): New function.
7990 (amd64_emit_ne_goto): New function.
7991 (amd64_emit_lt_goto): New function.
7992 (amd64_emit_le_goto): New function.
7993 (amd64_emit_gt_goto): New function.
7994 (amd64_emit_ge_goto): New function.
7995 (amd64_emit_ops): Add the new functions.
7996 (i386_emit_eq_goto): New function.
7997 (i386_emit_ne_goto): New function.
7998 (i386_emit_lt_goto): New function.
7999 (i386_emit_le_goto): New function.
8000 (i386_emit_gt_goto): New function.
8001 (i386_emit_ge_goto): New function.
8002 (i386_emit_ops): Add the new functions.
8003
bf15cbda
SS
80042011-09-08 Stan Shebs <stan@codesourcery.com>
8005
8006 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8007 (i386_emit_epilogue): Restore %ebx.
8008
943ca1dd
JZ
80092011-08-31 Jie Zhang <jzhang918@gmail.com>
8010
8011 * server.c (step_thread): Remove definition.
8012 (process_serial_event): Don't handle Hs.
8013 * server.h (step_thread): Remove declaration.
8014 * target.c (set_desired_inferior): Remove use of step_thread.
8015
e3deef73
LM
80162011-08-24 Luis Machado <lgustavo@codesourcery.com>
8017
8018 * linux-low.c: Include linux-procfs.h.
8019 (linux_attach_lwp_1): Update comments.
8020 (linux_attach): Scan for existing threads when attaching to a
8021 process that is the tgid.
8022 * Makefile.in: Update dependencies.
8023
13da1c97
LM
80242011-08-24 Luis Machado <lgustavo@codesourcery.com>
8025
8026 * configure.srv: Add linux-procfs.o dependencies.
8027
881127c9
YQ
80282011-08-14 Yao Qi <yao@codesourcery.com>
8029
8030 * target.h (struct target_ops): Fix indent.
8031 * win32-low.c (win32_target_ops): Fix comment.
8032
58dbd541
YQ
80332011-08-14 Andrew Jenner <andrew@codesourcery.com>
8034 Yao Qi <yao@codesourcery.com>
8035
8036 * Makefile.in (clean): Remove tic6x-*.c files.
8037 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8038 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8039 (tic6x-c64xp-linux.c): Likewise.
8040 * configure.srv: Add support for tic6x-*-uclinux.
8041 * linux-tic6x-low.c: New.
8042 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8043
78d85199
YQ
80442011-08-14 Andrew Stubbs <ams@codesourcery.com>
8045 Yao Qi <yao@codesourcery.com>
8046
8047 * target.h (struct target_ops): Add read_loadmap.
8048 * linux-low.c (struct target_loadseg): New type.
8049 (struct target_loadmap): New type.
8050 (linux_read_loadmap): New function.
8051 (linux_target_ops): Add linux_read_loadmap.
8052 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8053 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8054 to NULL.
78d85199 8055
a959a88d
EZ
80562011-08-05 Eli Zaretskii <eliz@gnu.org>
8057
8058 * win32-low.c: Include <stdint.h>.
8059
1ced966e
PA
80602011-07-22 Pedro Alves <pedro@codesourcery.com>
8061
8062 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8063 to the inferior here.
8064 (i386_remove_aligned_watchpoint): Ditto.
8065 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8066 fit part of the watchpoint in the debug registers.
8067 (i386_update_inferior_debug_regs): New.
8068 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8069 registers, and only update the inferior on success.
8070 (i386_low_remove_watchpoint): Ditto.
8071
d26e3629
KY
80722011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8073
8074 * linux-low.c (compare_ints, unique, list_threads, show_process,
8075 linux_core_of_thread): Delete.
8076 (linux_target_ops): Change linux_core_of_thread to
8077 linux_common_core_of_thread.
8078 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8079 * utils.c (malloc_failure): Change type of argument.
8080 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8081 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8082 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8083 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8084 (IPA_OBJS): Add common-utils-ipa.o.
8085 (ptid_h, linux_osdata_h): New macros.
8086 (server_h): Add common/common-utils.h, common/xml-utils.h,
8087 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8088 common/ptid.h.
8089 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8090 ptid.o, buffer.o): New rules.
8091 (linux-low.o): Add common/linux-osdata.h as a dependency.
8092 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8093 * configure.ac: Add AC_HEADER_DIRENT check.
8094 * config.in: Regenerate.
8095 * configure: Regenerate.
8096 * remote-utils.c (xml_escape_text): Delete.
8097 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8098 buffer_xml_printf): Move to common/buffer.c.
8099 * server.c (main): Remove call to initialize_inferiors.
8100 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8101 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8102 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8103 internal_error, gdb_assert, gdb_assert_fail): Delete.
8104 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8105 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8106 common/buffer.h.
8107 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8108 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8109 initialize_inferiors): Delete.
8110
2275a1a7
PA
81112011-07-20 Pedro Alves <pedro@codesourcery.com>
8112
8113 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8114 symbol error.
8115
0a5b1e09
PA
81162011-05-31 Pedro Alves <pedro@codesourcery.com>
8117
8118 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8119 assertion.
8120 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8121
6938fd34
YQ
81222011-05-26 Yao Qi <yao@codesourcery.com>
8123
8124 * Makefile.in (thread-db.o): Track dependence to
8125 common/gdb_thread_db.h.
8126 * thread-db.c: include gdb_thread_db.h from right place.
8127
b481f9e0
TT
81282011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8129
8130 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8131 __FILE__ and __LINE__ to internal_error.
8132
98a5dd13
DE
81332011-05-13 Doug Evans <dje@google.com>
8134
8135 * thread-db.c (try_thread_db_load_from_sdir): New function.
8136 (try_thread_db_load_from_dir): New function.
8137 (thread_db_load_search): Handle $sdir, ignore $pdir.
8138 Remove trying of system directories if search of
8139 libthread-db-search-path fails, that is now done via $sdir.
8140
d248b706
KY
81412011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8142
8143 * server.c (handle_query): Add EnableDisableTracepoints to the list
8144 of supported features.
43aaf8b6 8145 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8146 tracepoints.
43aaf8b6
PA
8147 (cmd_qtenable_disable): New.
8148 (cmd_qtstart): Install tracepoints even if disabled.
8149 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8150 receiving a QTEnable or QTDisable packet.
8151 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8152 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8153 tracepoints.
8154 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8155
84e578fb
DE
81562011-05-10 Doug Evans <dje@google.com>
8157
8158 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8159
71f55dd8
DE
81602011-05-04 Doug Evans <dje@google.com>
8161
8162 * linux-low.c (linux_join): Skip process lookup.
8163 * spu-low.c (spu_join): Ditto.
8164 * server.c (join_inferiors_callback): Delete.
8165 (process_serial_event): For 'D' packet (detach) call join_inferior
8166 directly.
8167
4d393d60
JM
81682011-05-04 Joseph Myers <joseph@codesourcery.com>
8169
8170 * README: Don't mention xscale*-*-linux*.
8171 * configure.srv (xscale*-*-linux*): Don't handle target.
8172
b00ad6ff
NF
81732011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8174
8175 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8176 casting pointers.
8177 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8178 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8179 (i386_emit_void_call_2): Likewise.
8180
af96c192
YQ
81812011-04-26 Yao Qi <yao@codesourcery.com>
8182
43aaf8b6
PA
8183 * linux-low.c: Move common macros to linux-ptrace.h.
8184 Include linux-ptrace.h.
af96c192
YQ
8185 * Makefile.in (linux_ptrace_h): New.
8186 (linux-low.o): Depends on linux-ptrace.h.
8187
03f2bd59
JK
81882011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8189
8190 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8191 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8192 (remote_prepare): New function with most of the TCP code from ...
8193 (remote_open): ... here. Detect PORT here unconditionally. Move also
8194 setting transport_is_reliable.
8195 * server.c (run_once): New variable.
8196 (gdbserver_usage): Document it.
8197 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8198 the first run if RUN_ONCE.
8199 * server.h (run_once, remote_prepare): New declarations.
8200
7a9dd1b2
TT
82012011-04-19 Tom Tromey <tromey@redhat.com>
8202
8203 * win32-low.c (handle_load_dll): Remove duplicate "the".
8204
81239425
PM
82052011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8206
8207 Remove support for old Cygwin 1.5 versions.
8208 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8209 function to avoid warning.
8210 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8211 warning.
8212
9e0627f1
PM
82132011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8214
8215 * gdbserver/server.h (Macro _): Define it if not available.
8216
588eebee
MS
82172011-03-14 Michael Snyder <msnyder@vmware.com>
8218
348af9f7 8219 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8220
43f70d4c
JB
82212011-03-10 Joel Brobecker <brobecker@adacore.com>
8222
8223 * Makefile.in (maintainer-clean realclean distclean): Remove
8224 "make ... subdir_do" command.
8225
348af9f7
MS
82262011-03-10 Michael Snyder <msnyder@vmware.com>
8227
8228 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8229
8230 * server.c (handle_v_run): Free alloced buffer on early return.
8231
e637a4f5
YQ
82322011-03-09 Yao Qi <yao@codesourcery.com>
8233
8234 Revert:
8235 2011-03-04 Yao Qi <yao@codesourcery.com>
8236
8237 * Makefile.in: Remove GNU make feature --directory.
8238
8239 2011-03-05 Yao Qi <yao@codesourcery.com>
8240
8241 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8242 (subdir_do): New make target. Copied from gdb/Makefile.
8243 (maintainer-clean, realclean, distclean, clean): Call corresponding
8244 make targets in common/Makefile.
8245
8246 2011-02-11 Yao Qi <yao@codesourcery.com>
8247
8248 * configure.ac: Call AC_PROG_RANLIB.
8249 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8250 * configure: Regenerate.
8251
e6edda56
JK
82522011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8253
8254 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8255
e5141119
JB
82562011-03-06 Yao Qi <yao@codesourcery.com>
8257
8258 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8259
64794aa4
JB
82602011-03-05 Yao Qi <yao@codesourcery.com>
8261
8262 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8263 (subdir_do): New make target. Copied from gdb/Makefile.
8264 (maintainer-clean, realclean, distclean, clean): Call corresponding
8265 make targets in common/Makefile.
8266
7a762829
YQ
82672011-03-04 Yao Qi <yao@codesourcery.com>
8268
8269 * Makefile.in: Remove GNU make feature --directory.
8270
348af9f7
MS
82712011-03-04 Michael Snyder <msnyder@vmware.com>
8272
8273 * server.c (queue_stop_reply): Call xmalloc not malloc.
8274
82752011-03-02 Michael Snyder <msnyder@vmware.com>
8276
8277 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8278
9f72fee2
MS
82792011-02-28 Michael Snyder <msnyder@vmware.com>
8280
588eebee
MS
8281 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8282 (cmd_qtframe): Ditto.
8283 (cmd_qtbuffer): Ditto.
8284 (cmd_bigqtbuffer): Ditto.
8285
9f72fee2
MS
8286 * utils.c (decimal2str): Initialize 'width' to nine, then
8287 don't mess with it.
8288
8040bd49
UW
82892011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8290
8291 * hostio.c (require_data): Free *data, not data.
8292
7e52cbd0
JK
82932011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8294
8295 * hostio.c (require_data): Use free, not xfree.
8296
9130f83e
MS
82972011-02-27 Michael Snyder <msnyder@vmware.com>
8298
4b812f4e
MS
8299 * server.c (handle_query): Discard unused value.
8300
9130f83e
MS
8301 * hostio.c (require_data): Free malloc memory before returning
8302 error.
8303
69d37113
MS
83042011-02-26 Michael Snyder <msnyder@vmware.com>
8305
8306 * linux-low.c (list_threads): Call closedir for dirent.
8307
35f5825a
MS
83082011-02-27 Michael Snyder <msnyder@vmware.com>
8309
2a589cef
MS
8310 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8311 a case statement falls through.
8312
0adea5f7
MS
8313 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8314
35f5825a
MS
8315 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8316 in comparison.
8317
238f1c74
MS
83182011-02-26 Michael Snyder <msnyder@vmware.com>
8319
8320 * utils.c (decimal2str): Eliminate dead code and dead param.
8321 (pulongest): Drop dead param from call to decimal2str.
8322 (plongest): Ditto.
8323
633ff500
JB
83242011-02-24 Joel Brobecker <brobecker@adacore.com>
8325
8326 Revert the following patch (not approved yet):
8327 2011-02-21 Hui Zhu <teawater@gmail.com>
8328 * tracepoint.c (tp_printf): New function.
8329 (eval_agent_expr): Handle gdb_agent_op_printf.
8330
f9c6ff72
HZ
83312011-02-21 Hui Zhu <teawater@gmail.com>
8332
8333 * tracepoint.c (tp_printf): New function.
8334 (eval_agent_expr): Handle gdb_agent_op_printf.
8335
94d5e490
TT
83362011-02-18 Tom Tromey <tromey@redhat.com>
8337
8338 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8339 (tracepoint.o): Likewise.
8340 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8341 (gdb_agent_op_names): Likewise.
8342
c7f96d2b
TT
83432011-02-18 Tom Tromey <tromey@redhat.com>
8344
8345 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8346 gdb_agent_op_rot>: New constants.
8347 (gdb_agent_op_names): Add pick and roll.
8348 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8349 cases.
8350
0feedb2c
JK
83512011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8352
8353 * aclocal.m4: Regenerated with aclocal-1.11.1.
8354
b3b9301e
PA
83552011-02-14 Pedro Alves <pedro@codesourcery.com>
8356
8357 * server.c (handle_qxfer_traceframe_info): New.
8358 (qxfer_packets): Register "traceframe-info".
8359 (handle_query): Report support for qXfer:traceframe-info:read+.
8360 * tracepoint.c (match_blocktype): New.
8361 (traceframe_find_block_type): Rename to ...
8362 (traceframe_walk_blocks): ... this. Add callback filter argument,
8363 and use it.
8364 (traceframe_find_block_type): New, reimplemented on top of
8365 traceframe_walk_blocks.
8366 (build_traceframe_info_xml): New.
8367 (traceframe_read_info): New.
8368 * server.h (traceframe_read_info): Declare.
8369
4f3e6fb7
YQ
83702011-02-11 Yao Qi <yao@codesourcery.com>
8371
8372 * configure.ac: Call AC_PROG_RANLIB.
8373 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8374 * configure: Regenerate.
8375
764880b7
PA
83762011-02-07 Pedro Alves <pedro@codesourcery.com>
8377
8378 * server.c (gdb_read_memory): Change return semantics to allow
8379 partial transfers.
8380 (handle_search_memory_1): Adjust.
8381 (process_serial_event) <'m' packet>: Handle partial transfers.
8382 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8383
1c79eb8a
PA
83842011-01-28 Pedro Alves <pedro@codesourcery.com>
8385
8386 * regcache.c (init_register_cache): Initialize
8387 regcache->register_status.
8388 (free_register_cache): Release regcache->register_status.
8389 (regcache_cpy): Copy register_status.
8390 (registers_to_string): Print 'x's for unavailable registers.
8391 (supply_register): Mark the register's status valid or
8392 unavailable, depending on whether a buffer was passed in or not.
8393 (supply_register_zeroed): New.
8394 (supply_regblock): Mark the registers' status valid or
8395 unavailable, depending on whether a buffer was passed in or not.
8396 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8397 (struct regcache): New `register_status' field.
8398 (supply_register_zeroed): Declare.
8399 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8400 supply_register_zeroed, rather than passing a NULL buffer to
8401 supply_register.
8402 * tracepoint.c (fetch_traceframe_registers): Update comment.
8403
85724a0e
PA
84042011-01-28 Pedro Alves <pedro@codesourcery.com>
8405
8406 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8407 buffer explicit.
8408
d08aafef
PA
84092011-01-25 Pedro Alves <pedro@codesourcery.com>
8410
8411 * server.h (decode_xfer_write): Change prototype.
8412 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8413 and don't extract the annex here.
8414 * server.c (decode_xfer_read): Remove `annex' parameter,
8415 and don't extract the annex here.
8416 (decode_xfer): New.
8417 (struct qxfer): New.
8418 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8419 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8420 (handle_qxfer_statictrace): New functions, abstracted out from
8421 handle_query, and made to use the struct qxfer interface.
8422 (handle_threads_qxfer_proper): Rename to ...
8423 (handle_qxfer_threads_proper): ... this.
8424 (handle_threads_qxfer): Rename to ...
8425 (handle_qxfer_threads): ... this. Adjust.
8426 (qxfer_packets): New array.
8427 (handle_qxfer): New function.
8428 (handle_query): Use handle_qxfer.
8429
493e2a69
MS
84302011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8431
8432 * gdbreplay.c: Shorten lines of >= 80 columns.
8433 * linux-low.c: Ditto.
8434 * linux-ppc-low.c: Ditto.
8435 * linux-s390-low.c: Ditto.
8436 * linux-sparc-low.c: Ditto.
8437 * linux-x86-low.c: Ditto.
8438 * linux-xtensa-low.c: Ditto.
8439 * mem-break.c: Ditto.
8440 * nto-low.c: Ditto.
8441 * regcache.h: Ditto.
8442 * remote-utils.c: Ditto.
8443 * server.c: Ditto.
8444 * server.h: Ditto.
8445 * thread-db.c: Ditto.
8446 * tracepoint.c: Ditto.
8447 * utils.c: Ditto.
8448 * win32-low.h: Ditto.
8449
44944448
JB
84502011-01-05 Joel Brobecker <brobecker@adacore.com>
8451
8452 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8453 update.
8454
71ce852c
JB
84552011-01-01 Joel Brobecker <brobecker@adacore.com>
8456
8457 * server.c (gdbserver_version): Update copyright year in version
8458 output.
8459 * gdbreplay.c (gdbreplay_version): Ditto.
8460
eb826dc6
MF
84612010-12-29 Jie Zhang <jie.zhang@analog.com>
8462
8463 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8464 * linux-bfin-low.c: New file.
8465 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8466 PT_DATA_ADDR for BFIN targets.
8467 * Makefile.in (SFILES): Add linux-bfin-low.c.
8468 (clean): Remove reg-bfin.c.
8469 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8470 * README: Mention supported Blackfin targets.
8471
39ab222a
MF
84722010-12-23 Mike Frysinger <vapier@gentoo.org>
8473
8474 * .gitignore: New file.
8475
a1f2ce7d
MF
84762010-11-16 Mike Frysinger <vapier@gentoo.org>
8477
8478 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8479
f474844c
JZ
84802010-10-22 Jie Zhang <jie@codesourcery.com>
8481
8482 * Makefile.in: Add FLAGS_TO_PASS variable.
8483 (install): Remove dependency of install-only and recursively
8484 invoke make for install-only.
8485
f1048712
DE
84862010-10-04 Doug Evans <dje@google.com>
8487
8488 * Makefile.in (uninstall): Use $(DESTDIR).
8489
b53a1623
PA
84902010-09-24 Pedro Alves <pedro@codesourcery.com>
8491
e6ee044d
PA
8492 PR gdb/11842
8493
b53a1623
PA
8494 * linux-x86-low.c (compat_siginfo_from_siginfo)
8495 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8496 si_code is < 0. Check for si_code == SI_TIMER before checking for
8497 si_code < 0.
8498
fa1bd1e4
JB
84992010-09-13 Joel Brobecker <brobecker@adacore.com>
8500
8501 * lynx-i386-low.c: New file.
8502 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8503
47fac8f8
JB
85042010-09-13 Joel Brobecker <brobecker@adacore.com>
8505
8506 * lynx-low.c (ptrace_request_to_str): Remove handling for
8507 request values that have been removed in LynxOS 5.x.
8508
1adfc54d
JB
85092010-09-13 Joel Brobecker <brobecker@adacore.com>
8510
8511 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8512 <ptrace.h>
8513
c2a66c29
NS
85142010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8515
8516 * configure.ac: Add --enable-inprocess-agent option.
8517 * configure: Rebuilt.
8518
32fcada3
YQ
85192010-09-06 Yao Qi <yao@codesourcery.com>
8520
8521 * linux-low.c (linux_kill): Remove unused variable.
8522 (linux_stabilize_threads): Likewise.
8523 * server.c (start_inferior): Likewise.
8524 (queue_stop_reply_callback): Likewise.
8525 * tracepoint.c (do_action_at_tracepoint): Likewise.
8526
0cccb683
YQ
85272010-09-06 Yao Qi <yao@codesourcery.com>
8528
8529 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8530 on return.
8531
423ec54c
JK
85322010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8533
8534 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8535
12ac6819
PA
85362010-09-06 Pedro Alves <pedro@codesourcery.com>
8537
8538 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8539 "$(IPA_DEPFILES)".
8540
8ed54b31
JB
85412010-09-01 Joel Brobecker <brobecker@adacore.com>
8542
8543 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8544 gdbserver/lynx-ppc-low.c: New files.
8545 * Makefile.in (lynx_low_h): New variable.
8546 (lynx-low.o, lynx-ppc-low.o): New rules.
8547 * configure.ac: On LynxOS, link with -lnetinet.
8548 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8549 * configure: regenerate.
8550
bb0116a4
JB
85512010-09-01 Joel Brobecker <brobecker@adacore.com>
8552
8553 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8554 * configure.ac: Add check for vasprintf and vsnprintf.
8555 * configure, config.in: Regenerate.
8556 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8557
a778ab81 85582010-09-01 Joel Brobecker <brobecker@adacore.com>
8559
8560 * gdbreplay.c: Move include of alloca.h up, next to include of
8561 malloc.h.
8562 * server.h: Add include of malloc.h.
8563 * mem-break.c: Remove include of malloc.h.
8564 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8565
8b034a19 85662010-09-01 Joel Brobecker <brobecker@adacore.com>
8567
8568 * Makefile.in (memmem.o): Build with -Wno-error.
8569
85702010-09-01 Joel Brobecker <brobecker@adacore.com>
8571
8572 * utils.c (xsnprintf): Make non-static.
8573 * server.h: Add xsnprintf declaration.
8574 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8575 replace calls to snprintf by calls to xsnprintf throughout.
8576
85772010-09-01 Joel Brobecker <brobecker@adacore.com>
8578
8579 * configure.ac: Add configure check for alloca.
8580 * configure, config.in: Regenerate.
8581 * server.h: Include alloca.h if it exists.
8582 * gdbreplay.c: Include alloca.h if it exists.
8583
1a981360
PA
85842010-08-28 Pedro Alves <pedro@codesourcery.com>
8585
8586 * linux-low.c (__SIGRTMIN): Define if not already defined.
8587 (linux_create_inferior): Check for __ANDROID__ rather than
8588 __SIGRTMIN.
8589 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8590 are already deferred.
8591 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8592 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8593 stopped and already has a pending signal to report.
8594 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8595 a pending signal to report or is moving out of a jump pad.
8596 (linux_init_signals): Check for __ANDROID__ rather than
8597 __SIGRTMIN.
8598
b4d51a55
PA
85992010-08-28 Pedro Alves <pedro@codesourcery.com>
8600
8601 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8602 debug_threads check. Avoid a linear search when not doing debug
8603 output.
8604
ec48365d
PA
86052010-08-27 Pedro Alves <pedro@codesourcery.com>
8606
8607 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8608 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8609 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8610 (process_event): Change local fd's type to gdb_fildes_t.
8611 (create_file_handler): Adjust prototype.
8612 (delete_file_handler): Adjust prototype.
8613 (handle_file_event): Adjust prototype. Use pfildes.
8614 (create_file_event): Adjsut prototype.
8615 * remote-utils.c (remote_desc, listen_desc): Change type to
8616 gdb_fildes_t.
8617 * server.h: New gdb_fildes_t typedef.
8618 [USE_WIN32API]: Include winsock2.h.
8619 (delete_file_handler, add_file_handler): Adjust prototypes.
8620 (pfildes): Declare.
8621 * utils.c (pfildes): New.
8622
854d88f0
PA
86232010-08-27 Pedro Alves <pedro@codesourcery.com>
8624
8625 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8626 * configure: Regenerate.
8627
0146f85b
PA
86282010-08-27 Pedro Alves <pedro@codesourcery.com>
8629
8630 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8631 (linux_done_accessing_memory): ... this.
8632 (linux_target_ops): Adjust.
8633 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8634 * nto-low.c (nto_target_ops): Adjust comment.
8635 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8636 * spu-low.c (spu_target_ops): Adjust comment.
8637 * target.h (target_ops): Rename unprepare_to_access_memory field
8638 to done_accessing_memory.
8639 (unprepare_to_access_memory): Rename to ...
8640 (done_accessing_memory): ... this.
8641
90d74c30
PA
86422010-08-26 Pedro Alves <pedro@codesourcery.com>
8643
8644 * linux-low.c (linux_prepare_to_access_memory): New.
8645 (linux_unprepare_to_access_memory): New.
8646 (linux_target_ops): Install them.
8647 * server.c (read_memory): Rename to ...
8648 (gdb_read_memory): ... this. Use
8649 prepare_to_access_memory/prepare_to_access_memory.
8650 (write_memory): Rename to ...
8651 (gdb_write_memory): ... this. Use
8652 prepare_to_access_memory/prepare_to_access_memory.
8653 (handle_search_memory_1): Adjust.
8654 (process_serial_event): Adjust.
8655 * target.h (struct target_ops): New fields
8656 prepare_to_access_memory and unprepare_to_access_memory.
8657 (prepare_to_access_memory, unprepare_to_access_memory): New.
8658 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8659 prepare_to_access_memory/prepare_to_access_memory.
8660 * nto-low.c (nto_target_ops): Adjust.
8661 * spu-low.c (spu_target_ops): Adjust.
8662 * win32-low.c (win32_target_ops): Adjust.
8663
fd467969
PA
86642010-08-26 Pedro Alves <pedro@codesourcery.com>
8665
8666 * Makefile.in (WARN_CFLAGS): Get it from configure.
8667 (WERROR_CFLAGS): New.
8668 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8669 * configure.ac: Introduce --enable-werror, which adds -Werror to
8670 the compiler command line. Enabled by default. Disable with
8671 --disable-werror. Add -Wdeclaration-after-statement
8672 Wpointer-arith and -Wformat-nonliteral to warning flags.
8673 * configure: Regenerate.
8674
331e2f5f
PA
86752010-08-26 Pedro Alves <pedro@codesourcery.com>
8676
8677 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8678
e581f2b4
PA
86792010-08-26 Pedro Alves <pedro@codesourcery.com>
8680
8681 * gdbreplay.c (remote_error): New.
8682 (gdbchar): New.
8683 (expect): Use gdbchar. Check for error reading from GDB.
8684 Clarify sync error output.
8685 (play): Check for errors writing to GDB.
8686 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8687 * remote-utils.c (getpkt): Check for errors writing to the remote
8688 descriptor.
8689
3c11dd79
PA
86902010-08-25 Pedro Alves <pedro@codesourcery.com>
8691
8692 * linux-low.c (linux_wait_1): Move non-debugging code out of
8693 `debug_threads' control.
8694
d20a8ad9
PA
86952010-08-25 Pedro Alves <pedro@codesourcery.com>
8696
8697 * linux-low.c (linux_wait_1): Don't set last_status here.
8698 * server.c (push_event, queue_stop_reply_callback): Assert we're
8699 not pushing a TARGET_WAITKIND_IGNORE event.
8700 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8701 (myresume, handle_target_event): Set the thread's last_resume_kind
8702 and last_status from the target returned status.
8703
964e4306
PA
87042010-08-25 Pedro Alves <pedro@codesourcery.com>
8705
8706 PR threads/10729
8707
8708 * linux-x86-low.c (update_debug_registers_callback): New.
8709 (i386_dr_low_set_addr): Use it.
8710 (i386_dr_low_get_addr): New.
8711 (i386_dr_low_set_control): Use update_debug_registers_callback.
8712 (i386_dr_low_get_control): New.
8713 (i386_dr_low_get_status): Adjust.
8714 * linux-low.c (linux_stop_lwp): New.
8715 * linux-low.h (linux_stop_lwp): Declare.
8716
8717 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8718 argument instead of a i386_debug_reg_state.
8719 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8720 a i386_debug_reg_state.
8721 (i386_insert_aligned_watchpoint): Adjust.
8722 (i386_remove_aligned_watchpoint): Adjust.
8723 (i386_low_stopped_data_address): Read the debug registers from the
8724 inferior instead of from the mirrors.
8725 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8726 (i386_dr_low_get_addr): Declare.
8727 (i386_dr_low_get_control): Declare.
8728 (i386_dr_low_get_status): Change prototype.
8729
8730 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8731 (i386_dr_low_get_addr): New.
8732 (i386_dr_low_get_control): New.
8733 (i386_dr_low_get_status): Adjust prototype. Return
8734 dr_status_mirror.
8735 (i386_initial_stuff): Clear dr_status_mirror and
8736 dr_control_mirror.
8737 (i386_get_thread_context): Adjust.
8738 (i386_set_thread_context): Adjust.
8739 (i386_thread_added): Adjust.
8740
5f21a75b
PA
87412010-08-24 Pedro Alves <pedro@codesourcery.com>
8742
8743 * linux-low.h (linux_thread_area): Delete declaration.
8744
3e4c1235
TS
87452010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8746
8747 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8748 after its termination.
8749
1971b033
PA
87502010-08-09 Pedro Alves <pedro@codesourcery.com>
8751
8752 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8753 (gdb_wants_all_stopped): Delete.
8754 (linux_wait_1): Don't call them.
8755 * server.c (handle_v_cont): Tag all threads as want-stopped.
8756 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8757 stopped as "client-wants-stopped".
8758
310444ac
PA
87592010-07-31 Pedro Alves <pedro@codesourcery.com>
8760
8761 * Makefile.in (signals_h): New.
8762 (server_h): Depend on it.
8763 (server.o): Don't depend on $(signals_def).
8764 (signals.o): Depend on $(signals_def).
8765
a19cae16
JK
87662010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8767
8768 * Makefile.in (signals_def): New.
8769 (server_h): Append include/gdb/signals.h and signals_def.
8770 (server.o): Append signals_def.
8771
30d50328
JK
87722010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8773
8774 * server.c (handle_target_event): Use target_signal_to_host for
8775 resume_info.sig initialization.
8776 * target.h (struct thread_resume) <sig>: New comment.
8777
5c3216e2
OS
87782010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8779
c6f46ca0
OS
8780 * server.c (handle_query): strcpy() the returned string from paddress()
8781 instead of sprintf().
5c3216e2
OS
8782 * utils.c (paddress): Return phex_nz().
8783
6bd31874
JB
87842010-07-07 Joel Brobecker <brobecker@adacore.com>
8785
8786 * server.c (handle_v_cont): Call mourn_inferior if process
8787 just exited.
8788 (myresume): Likewise.
8789
0fb4aa4b
PA
87902010-07-01 Pedro Alves <pedro@codesourcery.com>
8791
8792 Static tracepoints, and integration with UST.
8793
8794 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8795 * mem-break.c (uninsert_all_breakpoints)
8796 (reinsert_all_breakpoints): New.
8797 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8798 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8799 (gdb_agent_ust_loaded, helper_thread_id)
8800 (gdb_agent_helper_thread_id): New macros.
8801 (struct ipa_sym_addresses): Add addr_ust_loaded,
8802 addr_helper_thread_id, addr_cmd_buf.
8803 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8804 (in_process_agent_loaded_ust): New.
8805 (write_e_ust_not_loaded): New.
8806 (maybe_write_ipa_ust_not_loaded): New.
8807 (struct collect_static_trace_data_action): New.
8808 (enum tracepoint_type) <static_tracepoint>: New.
8809 (struct tracepoint) <handle>: Mention static tracepoints.
8810 (struct static_tracepoint_ctx): New.
8811 (CMD_BUF_SIZE): New.
8812 (add_tracepoint_action): Handle static tracepoint actions.
8813 (unprobe_marker_at): New.
8814 (clear_installed_tracepoints): Handle static tracepoints.
8815 (cmd_qtdp): Handle static tracepoints.
8816 (probe_marker_at): New.
8817 (cmd_qtstart): Handle static tracepoints.
8818 (response_tracepoint): Handle static tracepoints.
8819 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8820 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8821 (get_context_regcache): Handle static tracepoints.
8822 (do_action_at_tracepoint): Handle static tracepoint actions.
8823 (traceframe_find_block_type): Handle static trace data blocks.
8824 (traceframe_read_sdata): New.
8825 (download_tracepoints): Download static tracepoint actions.
8826 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8827 (GDB_PROBE_NAME): New.
8828 (ust_ops): New.
8829 (GET_UST_SYM): New.
8830 (USTF): New.
8831 (dlsym_ust): New.
8832 (ust_marker_to_static_tracepoint): New.
8833 (gdb_probe): New.
8834 (collect_ust_data_at_tracepoint): New.
8835 (gdb_ust_probe): New.
8836 (UNIX_PATH_MAX, SOCK_DIR): New.
8837 (gdb_ust_connect_sync_socket): New.
8838 (resume_thread, stop_thread): New.
8839 (run_inferior_command): New.
8840 (init_named_socket): New.
8841 (gdb_ust_socket_init): New.
8842 (cstr_to_hexstr): New.
8843 (next_st): New.
8844 (first_marker, next_marker): New.
8845 (response_ust_marker): New.
8846 (cmd_qtfstm, cmd_qtsstm): New.
8847 (unprobe_marker_at, probe_marker_at): New.
8848 (cmd_qtstmat, gdb_ust_thread): New.
8849 (gdb_ust_init): New.
8850 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8851 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8852 (ST_REGENTRY): New.
8853 (x86_64_st_collect_regmap): New.
8854 (X86_64_NUM_ST_COLLECT_GREGS): New.
8855 (AMD64_RIP_REGNUM): New.
8856 (supply_static_tracepoint_registers): New.
8857 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8858 (ST_REGENTRY): New.
8859 (i386_st_collect_regmap): New.
8860 (i386_NUM_ST_COLLECT_GREGS): New.
8861 (supply_static_tracepoint_registers): New.
8862 * server.c (handle_query): Handle qXfer:statictrace:read.
8863 <qSupported>: Report support for StaticTracepoints, and
8864 qXfer:statictrace:read features.
8865 * server.h (traceframe_read_sdata)
8866 (supply_static_tracepoint_registers): Declare.
8867 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8868 (unpack_varlen_hex): Include in IPA build.
8869 * Makefile.in (ustlibs, ustinc): New.
8870 (IPA_OBJS): Add remote-utils-ipa.o.
8871 ($(IPA_LIB)): Link -ldl and -lpthread.
8872 (UST_CFLAGS): New.
8873 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8874 * config.in, configure: Regenerate.
8875
9e4344e5
PA
88762010-06-20 Ian Lance Taylor <iant@google.com>
8877 Pedro Alves <pedro@codesourcery.com>
8878
8879 * linux-x86-low.c (always_true): Delete.
8880 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8881 trying to fool the compiler with always_true.
8882
c6beb2cb
PA
88832010-06-20 Pedro Alves <pedro@codesourcery.com>
8884
8885 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8886 conditions in gdbserver.
8887
d2ed6730
UW
88882010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8889
8890 * spu-low.c (spu_read_memory): Wrap around local store limit.
8891 (spu_write_memory): Likewise.
8892
4e29fb54
PA
88932010-06-15 Pedro Alves <pedro@codesourcery.com>
8894
8895 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8896 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8897 LONGEST uses.
8898 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8899 uses.
8900 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8901 uses with LONGEST uses.
8902
6a271cae
PA
89032010-06-14 Stan Shebs <stan@codesourcery.com>
8904 Pedro Alves <pedro@codesourcery.com>
8905
8906 Bytecode compiler.
8907
8908 * linux-x86-low.c: Include limits.h.
8909 (add_insns): New.
8910 (always_true): New.
8911 (EMIT_ASM): New.
8912 (EMIT_ASM32): New.
8913 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8914 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8915 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8916 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8917 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8918 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8919 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8920 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8921 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8922 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8923 (amd64_emit_void_call_2): New.
8924 (amd64_emit_ops): New.
8925 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8926 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8927 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8928 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8929 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8930 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8931 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8932 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8933 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8934 (i386_emit_stack_adjust, i386_emit_int_call_1)
8935 (i386_emit_void_call_2): New.
8936 (i386_emit_ops): New.
8937 (x86_emit_ops): New.
8938 (the_low_target): Install x86_emit_ops.
8939 * server.h (struct emit_ops): New.
8940 (get_raw_reg_func_addr): Declare.
8941 (current_insn_ptr, emit_error): Declare.
8942 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8943 (set_trace_state_variable_value): New defines.
8944 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8945 addr_get_trace_state_variable_value and
8946 addr_set_trace_state_variable_value.
8947 (symbol_list): New fields for get_raw_reg,
8948 get_trace_state_variable_value and set_trace_state_variable_value.
8949 (condfn): New typedef.
8950 (struct tracepoint): New field `compiled_cond'.
8951 (do_action_at_tracepoint): Clear compiled_cond.
8952 (get_trace_state_variable_value, set_trace_state_variable_value):
8953 Export in the IPA.
8954 (condition_true_at_tracepoint): If there's a compiled condition,
8955 run that.
8956 (current_insn_ptr, emit_error): New globals.
8957 (struct bytecode_address): New.
8958 (get_raw_reg_func_addr): New.
8959 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8960 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8961 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8962 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8963 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8964 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8965 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8966 (compile_tracepoint_condition, compile_bytecodes): New.
8967 * target.h (emit_ops): Forward declare.
8968 (struct target_ops): New field emit_ops.
8969 (target_emit_ops): New.
8970 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8971 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8972 * linux-low.c (linux_emit_ops): New.
8973 (linux_target_ops): Install it.
8974 * linux-low.h (struct linux_target_ops): New field emit_ops.
8975
92b72907
UW
89762010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8977
8978 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8979 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8980
fa593d66
PA
89812010-06-01 Pedro Alves <pedro@codesourcery.com>
8982 Stan Shebs <stan@codesourcery.com>
8983
8984 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8985 (all): Depend on $(extra_libraries).
8986 (install-only): Install the IPA.
8987 (IPA_OBJS, IPA_LIB): New.
8988 (clean): Remove the IPA lib.
8989 (IPAGENT_CFLAGS): New.
8990 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
8991 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
8992 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
8993 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
8994 * configure.ac: Check for atomic builtins support in the compiler.
8995 (IPA_DEPFILES, extra_libraries): Define.
8996 * configure.srv (ipa_obj): Add description.
8997 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
8998 (i[34567]86-*-linux*): Set ipa_obj.
8999 (x86_64-*-linux*): Set ipa_obj.
9000 * linux-low.c (stabilizing_threads): New.
9001 (supports_fast_tracepoints): New.
9002 (linux_detach): Stabilize threads before detaching.
9003 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9004 the lwp is either not stabilizing, or is moving out of a jump pad.
9005 (linux_fast_tracepoint_collecting): New.
9006 (maybe_move_out_of_jump_pad): New.
9007 (enqueue_one_deferred_signal): New.
9008 (dequeue_one_deferred_signal): New.
9009 (linux_wait_for_event_1): If moving out of a jump pad, defer
9010 pending signals to later.
9011 (linux_stabilize_threads): New.
9012 (linux_wait_1): Check if threads need moving out of jump pads, and
9013 do it if so.
9014 (stuck_in_jump_pad_callback): New.
9015 (move_out_of_jump_pad_callback): New.
9016 (lwp_running): New.
9017 (linux_resume_one_lwp): Handle moving out of jump pads.
9018 (linux_set_resume_request): Dequeue deferred signals.
9019 (need_step_over_p): Also step over fast tracepoint jumps.
9020 (start_step_over): Also uninsert fast tracepoint jumps.
9021 (finish_step_over): Also reinsert fast tracepoint jumps.
9022 (linux_install_fast_tracepoint_jump): New.
9023 (linux_target_ops): Install linux_stabilize_threads and
9024 linux_install_fast_tracepoint_jump_pad.
9025 * linux-low.h (linux_target_ops) <get_thread_area,
9026 install_fast_tracepoint_jump_pad>: New fields.
9027 (struct lwp_info) <collecting_fast_tracepoint,
9028 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9029 (linux_get_thread_area): Declare.
9030 * linux-x86-low.c (jump_insn): New.
9031 (x86_get_thread_area): New.
9032 (append_insns): New.
9033 (push_opcode): New.
9034 (amd64_install_fast_tracepoint_jump_pad): New.
9035 (i386_install_fast_tracepoint_jump_pad): New.
9036 (x86_install_fast_tracepoint_jump_pad): New.
9037 (the_low_target): Install x86_get_thread_area and
9038 x86_install_fast_tracepoint_jump_pad.
9039 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9040 (struct fast_tracepoint_jump): New.
9041 (fast_tracepoint_jump_insn): New.
9042 (fast_tracepoint_jump_shadow): New.
9043 (find_fast_tracepoint_jump_at): New.
9044 (fast_tracepoint_jump_here): New.
9045 (delete_fast_tracepoint_jump): New.
9046 (set_fast_tracepoint_jump): New.
9047 (uninsert_fast_tracepoint_jumps_at): New.
9048 (reinsert_fast_tracepoint_jumps_at): New.
9049 (set_breakpoint_at): Use write_inferior_memory.
9050 (uninsert_raw_breakpoint): Use write_inferior_memory.
9051 (check_mem_read): Mask out fast tracepoint jumps.
9052 (check_mem_write): Mask out fast tracepoint jumps.
9053 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9054 (set_fast_tracepoint_jump): Declare.
9055 (delete_fast_tracepoint_jump)
9056 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9057 (reinsert_fast_tracepoint_jumps_at): Declare.
9058 * regcache.c: Don't compile many functions when building the
9059 in-process agent library.
9060 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9061 the register buffer in the heap.
9062 (free_register_cache): If the register buffer isn't owned by the
9063 regcache, don't free it.
9064 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9065 pre-existing register caches.
9066 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9067 type.
9068 (convert_ascii_to_int): : Constify `from' parameter type.
9069 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9070 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9071 the needed buffer in-place.
9072 (relocate_instruction): New.
9073 * server.c (handle_query) <qSymbols>: If the target supports
9074 tracepoints, give it a chance of looking up symbols. Report
9075 support for fast tracepoints.
9076 (handle_status): Stabilize threads.
9077 (process_serial_event): Adjust.
9078 * server.h (struct fast_tracepoint_jump): Forward declare.
9079 (struct process_info) <fast_tracepoint_jumps>: New field.
9080 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9081 (decode_X_packet, decode_M_packet): Adjust.
9082 (relocate_instruction): Declare.
9083 (in_process_agent_loaded): Declare.
9084 (tracepoint_look_up_symbols): Declare.
9085 (struct fast_tpoint_collect_status): Declare.
9086 (fast_tracepoint_collecting): Declare.
9087 (force_unlock_trace_buffer): Declare.
9088 (handle_tracepoint_bkpts): Declare.
9089 (initialize_low_tracepoint)
9090 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9091 * target.h (struct target_ops) <stabilize_threads,
9092 install_fast_tracepoint_jump_pad>: New fields.
9093 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9094 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9095 [HAVE_STDINT_H]: Include stdint.h.
9096 (trace_debug_1): Rename to ...
9097 (trace_vdebug): ... this.
9098 (trace_debug): Rename to ...
9099 (trace_debug_1): ... this. Add `level' parameter.
9100 (trace_debug): New.
9101 (ATTR_USED, ATTR_NOINLINE): New.
9102 (IP_AGENT_EXPORT): New.
9103 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9104 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9105 (about_to_request_buffer_space, trace_buffer_is_full)
9106 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9107 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9108 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9109 (traceframe_write_count, traceframes_created)
9110 (trace_state_variables)
9111 New renaming defines.
9112 (struct ipa_sym_addresses): New.
9113 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9114 (symbol_list): New.
9115 (ipa_sym_addrs): New.
9116 (all_tracepoint_symbols_looked_up): New.
9117 (in_process_agent_loaded): New.
9118 (write_e_ipa_not_loaded): New.
9119 (maybe_write_ipa_not_loaded): New.
9120 (tracepoint_look_up_symbols): New.
9121 (debug_threads) [IN_PROCESS_AGENT]: New.
9122 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9123 (UNKNOWN_SIDE_EFFECTS): New.
9124 (stop_tracing): New.
9125 (flush_trace_buffer): New.
9126 (stop_tracing_bkpt): New.
9127 (flush_trace_buffer_bkpt): New.
9128 (read_inferior_integer): New.
9129 (read_inferior_uinteger): New.
9130 (read_inferior_data_pointer): New.
9131 (write_inferior_data_pointer): New.
9132 (write_inferior_integer): New.
9133 (write_inferior_uinteger): New.
9134 (struct collect_static_trace_data_action): Delete.
9135 (enum tracepoint_type): New.
9136 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9137 <actions_str, step_actions, step_actions_str>: Only include in
9138 GDBserver.
fa593d66
PA
9139 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9140 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9141 (tracepoints): Use IP_AGENT_EXPORT.
9142 (last_tracepoint): Don't include in the IPA.
9143 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9144 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9145 (alloced_trace_state_variables): New.
9146 (trace_state_variables): Use IP_AGENT_EXPORT.
9147 (traceframe_t): Delete unused variable.
9148 (circular_trace_buffer): Don't include in the IPA.
9149 (trace_buffer_start): Delete.
9150 (struct trace_buffer_control): New.
9151 (trace_buffer_free): Delete.
9152 (struct ipa_trace_buffer_control): New.
9153 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9154 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9155 New.
9156 (trace_buffer_ctrl): New.
9157 (TRACE_BUFFER_CTRL_CURR): New.
9158 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9159 Reimplement as macros.
9160 (trace_buffer_wrap): Delete.
9161 (traceframe_write_count, traceframe_read_count)
9162 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9163 (struct tracepoint_hit_ctx) <type>: New field.
9164 (struct fast_tracepoint_ctx): New.
9165 (memory_barrier): New.
9166 (cmpxchg): New.
9167 (record_tracepoint_error): Update atomically in the IPA.
9168 (clear_inferior_trace_buffer): New.
9169 (about_to_request_buffer_space): New.
9170 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9171 updating the same buffer.
9172 (add_tracepoint): Default the tracepoint's type to trap
9173 tracepoint, and orig_size to -1.
9174 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9175 internal variables.
9176 (create_trace_state_variable): New parameter `gdb'. Handle it.
9177 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9178 (cmd_qtdp): Handle fast tracepoints.
9179 (cmd_qtdv): Adjust.
9180 (max_jump_pad_size): New.
9181 (gdb_jump_pad_head): New.
9182 (get_jump_space_head): New.
9183 (claim_jump_space): New.
9184 (sort_tracepoints): New.
9185 (MAX_JUMP_SIZE): New.
9186 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9187 IPA.
9188 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9189 support. Upload fast traceframes, and delete internal IPA
9190 breakpoints.
9191 (stop_tracing_handler): New.
9192 (flush_trace_buffer_handler): New.
9193 (cmd_qtstop): Upload fast tracepoints.
9194 (response_tracepoint): Handle fast tracepoints.
9195 (tracepoint_finished_step): Upload fast traceframes. Set the
9196 tracepoint hit context's tracepoint type.
9197 (handle_tracepoint_bkpts): New.
9198 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9199 type. Add comment about fast tracepoints.
9200 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9201 non-existing action_str field.
9202 (get_context_regcache): Handle fast tracepoints.
9203 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9204 to the regcache.
9205 (fast_tracepoint_from_jump_pad_address): New.
9206 (fast_tracepoint_from_ipa_tpoint_address): New.
9207 (collecting_t): New.
9208 (force_unlock_trace_buffer): New.
9209 (fast_tracepoint_collecting): New.
9210 (collecting): New.
9211 (gdb_collect): New.
9212 (write_inferior_data_ptr): New.
9213 (target_tp_heap): New.
9214 (target_malloc): New.
9215 (download_agent_expr): New.
9216 (UALIGN): New.
9217 (download_tracepoints): New.
9218 (download_trace_state_variables): New.
9219 (upload_fast_traceframes): New.
9220 (IPA_FIRST_TRACEFRAME): New.
9221 (IPA_NEXT_TRACEFRAME_1): New.
9222 (IPA_NEXT_TRACEFRAME): New.
9223 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9224 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9225 (gdb_jump_pad_buffer_end): New.
9226 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9227 (initialize_tracepoint): Adjust.
9228 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9229 buffer. Initialize the low module.
9230 * utils.c (PREFIX, TOOLNAME): New.
9231 (malloc_failure): Use PREFIX.
9232 (error): In the IPA, an error causes an exit.
9233 (fatal, warning): Use PREFIX.
9234 (internal_error): Use TOOLNAME.
9235 (NUMCELLS): Increase to 10.
9236 * configure, config.in: Regenerate.
9237
d149dd1d
PA
92382010-06-01 Pedro Alves <pedro@codesourcery.com>
9239
9240 * server.c (handle_query) <qSupported>: Do two passes over the
9241 qSupported string to avoid nesting strtok.
9242
f6528abd
JK
92432010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9244
9245 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9246 (CDEPS): New.
9247 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9248 -Wl,--dynamic-list.
9249 * configure: Regenerate.
9250 * proc-service.list: New.
9251
ca2a87a0
JK
92522010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9253
9254 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9255 New comment.
9256
363a6e9f
OS
92572010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9258
9259 * gdbreplay.c (remote_open): Check error return from socket() call by
9260 its equality to -1 not by it being negative.
9261 * remote-utils.c (remote_open): Likewise.
9262
d23b6cb1
PA
92632010-05-23 Pedro Alves <pedro@codesourcery.com>
9264
9265 * config.h: Regenerate.
9266
28d3cf85
MK
92672010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9268
9269 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9270 doesn't provide PTRACE_GET_THREAD_AREA.
9271
fea36a59
MK
92722010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9273
9274 * linux-m68k-low.c: Include <asm/ptrace.h>
9275 (ps_get_thread_area): Implement.
9276
24b066ba
DE
92772010-05-03 Doug Evans <dje@google.com>
9278
9279 * event-loop.c (struct callback_event): New struct.
9280 (callback_list): New global.
9281 (append_callback_event, delete_callback_event): New functions.
9282 (process_callback): New function.
9283 (start_event_loop): Call it.
9284 * remote-utils.c (NOT_SCHEDULED): Define.
9285 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9286 moved out of readchar.
9287 (readchar): Rewrite. Call reschedule before returning.
9288 (reset_readchar): New function.
9289 (remote_close): Call it.
9290 (process_remaining, reschedule): New functions.
9291 * server.h (callback_handler_func): New typedef.
9292 (append_callback_event, delete_callback_event): Declare.
9293
9836d6ea
PA
92942010-05-03 Pedro Alves <pedro@codesourcery.com>
9295
9296 * proc-service.c (ps_pglobal_lookup): Use
9297 thread_db_look_up_one_symbol.
9298 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9299 parameter. Use it instead of all_symbols_looked_up.
9300 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9301 field.
9302 (all_symbols_looked_up): Don't declare.
9303 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9304 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9305 field.
9306 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9307 Set all_symbols_looked_up here.
9308 (thread_db_look_up_one_symbol): New.
9309 (thread_db_get_tls_address): Adjust.
9310 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9311 thread_db object on the heap, and tentatively set it in the
9312 process structure.
9313 (thread_db_init): Don't set all_symbols_looked_up here.
9314 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9315
7984d532
PA
93162010-05-03 Pedro Alves <pedro@codesourcery.com>
9317
9318 * linux-low.c (linux_kill, linux_detach): Adjust.
9319 (status_pending_p_callback): Remove redundant statement. Check
9320 for !TARGET_WAITIKIND_IGNORE, instead of
9321 TARGET_WAITKIND_STOPPED.
9322 (handle_tracepoints): Make sure LWP is locked. Adjust.
9323 (linux_wait_for_event_1): Adjust.
9324 (linux_cancel_breakpoints): New.
9325 (unsuspend_one_lwp): New.
9326 (unsuspend_all_lwps): New.
9327 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9328 (send_sigstop_callback): Change return type to int, add new
9329 `except' parameter and handle it.
9330 (suspend_and_send_sigstop_callback): New.
9331 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9332 pass them down. If SUSPEND, also increment the lwp's suspend
9333 count.
9334 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9335 (need_step_over_p): Don't consider suspended LWPs.
9336 (start_step_over): Adjust.
9337 (proceed_one_lwp): Change return type to int, add new `except'
9338 parameter and handle it.
9339 (unsuspend_and_proceed_one_lwp): New.
9340 (proceed_all_lwps): Use find_inferior instead of
9341 for_each_inferior.
9342 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9343 also decrement the suspend count of LWPs. Pass `except' down,
9344 instead of hacking its suspend count.
9345 (linux_pause_all): Add `freeze' parameter. Adjust.
9346 (linux_unpause_all): New.
9347 (linux_target_ops): Install linux_unpause_all.
9348 * server.c (handle_status): Adjust.
9349 * target.h (struct target_ops): New fields `unpause_all' and
9350 `cancel_breakpoints'. Add new parameter to `pause_all'.
9351 (pause_all): Add new `freeze' parameter.
9352 (unpause_all): New.
9353 (cancel_breakpoints): New.
9354 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9355 cancel breakpoints.
9356 (cmd_qtstart): Pause threads.
9357 (stop_tracing): Pause threads, and cancel breakpoints.
9358 * win32-low.c (win32_target_ops): Adjust.
9359
e471f25b
PA
93602010-05-03 Pedro Alves <pedro@codesourcery.com>
9361
9362 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9363 the inferior right away from here...
9364 (linux_wait_1): ... to here, and adjust to check the thread's
9365 last_resume_kind instead of the lwp's step or stop_expected flags.
9366
1915ef4f
PA
93672010-05-02 Pedro Alves <pedro@codesourcery.com>
9368
9369 * README: Use consistent `GDB' and `GDBserver' spellings.
9370
f9e39928
PA
93712010-05-02 Pedro Alves <pedro@codesourcery.com>
9372
9373 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9374 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9375 (linux_detach_one_lwp): Assume the lwp is stopped.
9376 (any_thread_of): Delete.
9377 (linux_detach): Stop all lwps here. Don't blindly delete all
9378 breakpoints.
9379 (delete_lwp_callback): New.
9380 (linux_mourn): Delete all lwps of the process that is gone.
9381 (linux_wait_1): Don't delete the last lwp of the process here.
9382 * mem-break.h (mark_breakpoints_out): Declare.
9383 * mem-break.c (mark_breakpoints_out): New.
9384 (free_all_breakpoints): Use it.
9385 * server.c (handle_target_event): If the process is gone, mark
9386 breakpoints out.
9387 * thread-db.c (struct thread_db) <create_bp>: New field.
9388 (thread_db_enable_reporting): Fix prototype. Store a thread event
9389 breakpoint reference in the thread_db struct.
9390 (thread_db_load_search): Clear the thread_db object.
9391 (try_thread_db_load_1): Ditto.
9392 (switch_to_process): New.
9393 (disable_thread_event_reporting): Use it.
9394 (remove_thread_event_breakpoints): New.
9395 (thread_db_detach, thread_db_mourn): Use it.
9396
1e7fc18c
PA
93972010-05-01 Pedro Alves <pedro@codesourcery.com>
9398
9399 * linux-low.c (linux_enable_event_reporting): New.
9400 (linux_wait_for_event_1, handle_extended_wait): Use it.
9401
02fc4de7
PA
94022010-04-30 Pedro Alves <pedro@codesourcery.com>
9403
9404 * linux-low.c (linux_kill_one_lwp, linux_kill)
9405 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9406 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9407 SIGSTOP even if the LWP is stopped.
9408 (send_sigstop_callback): New.
9409 (stop_all_lwps): Use send_sigstop_callback instead.
9410 (linux_resume_one_thread): Adjust.
9411 (proceed_one_lwp): Still proceed an LWP that the client has
9412 requested to stop, if we haven't reported it as stopped yet. Make
9413 sure that LWPs the client want stopped, have a pending SIGSTOP.
9414
bc3b5632
DE
94152010-04-26 Doug Evans <dje@google.com>
9416
ae1ada35
DE
9417 * server.c (handle_general_set): Make static.
9418
bc3b5632
DE
9419 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9420 Print received char after testing for error/eof instead of before.
9421 (input_interrupt): Tweak comment.
9422
65730243
DE
94232010-04-23 Doug Evans <dje@google.com>
9424
9425 * server.c (start_inferior): Print inferior argv if --debug.
9426
a8ae7dc0
AR
94272010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9428
9429 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9430 * nto-x86-low.c: Include server.h
9431
1c07cc19
PM
94322010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9433
9434 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9435 be consistent with other sources of this directory.
9436 (init_registers_amd64): Correct name of source file of this function
9437 in the comment.
9438
e0a61e09
PM
94392010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9440
9441 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9442 64-bit executables.
9443
54709339
PM
94442010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9445
9446 * win32-i386-low.c: Add 64-bit support.
9447 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9448 (init_registers_amd64): Declare.
9449 (mappings): Add 64-bit version of array.
9450 (init_windows_x86): New function.
9451 (the_low_target): Change init_arch field to init_windows_x86.
9452
e8f0053d
PM
94532010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9454
9455 * win32-low.c: Adapt to support also 64-bit architecture.
9456 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9457 (get_image_name): Use SIZE_T type for local variable `done'.
9458 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9459 (toolhelp_get_dll_name): Idem.
9460 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9461 Use uintptr_t typecast to avoid warning.
9462 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9463 (handle_exception): Use phex_nz to avoid warning.
9464 (win32_wait): Remove unused local variable `process'.
9465
c481e77e
PM
94662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9467
9468 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9469 `amd64-avx.o'.
9470
12ea4b69
PM
94712010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9472
9473 * configure.ac: Use `ws2_32' library for srv_mingw.
9474 * configure: Regenerate.
9475 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9476 * remote-utils.c: Likewise.
9477
f6d1620c
L
94782010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9479
9480 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9481 if __x86_64__ is defined.
9482
8e642873
PM
94832010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9484
9485 * configure: Regenerate.
9486
711e434b
PM
94872010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9488
9489 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9490 * target.h (target_ops): New get_tib_address field.
9491 * win32-low.h (win32_thread_info): Add thread_local_base field.
9492 * win32-low.c (child_add_thread): Add tlb argument.
9493 Set thread_local_base field to TLB.
9494 (get_child_debug_event): Adapt to child_add_thread change.
9495 (win32_get_tib_address): New function.
9496 (win32_target_ops): Set get_tib_address field to
9497 win32_get_tib_address.
9498 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9499
505106cd
PA
95002010-04-12 Pedro Alves <pedro@codesourcery.com>
9501
505106cd
PA
9502 * linux-low.c (linux_mourn): Also remove the process.
9503 * server.c (handle_target_event): Don't remove the process here.
9504 * nto-low.c (nto_mourn): New.
9505 (nto_target_ops): Install it.
9506 * spu-low.c (spu_mourn): New.
9507 (spu_target_ops): Install it.
9508 * win32-low.c (win32_mourn): New.
9509 (win32_target_ops): Install it.
9510
e8470a06
PA
95112010-04-12 Pedro Alves <pedro@codesourcery.com>
9512
9513 * server.h (buffer_xml_printf): Remove redundant `;'.
9514
45ba0d02
PA
95152010-04-12 Pedro Alves <pedro@codesourcery.com>
9516
9517 * regcache.c (set_register_cache): Invalidate regcaches before
9518 changing the register cache layout.
9519 (regcache_invalidate_one): Allow a NULL regcache.
9520 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9521 regcaches before changing the register cache layout or the target
9522 regsets.
9523
59e04013
L
95242010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9525
9526 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9527 variable warning on Linux/x86-64.
9528
8336d594
PA
95292010-04-11 Pedro Alves <pedro@codesourcery.com>
9530
9531 GDBserver disconnected tracing support.
9532
9533 * linux-low.c (linux_remove_process): Delete.
9534 (add_lwp): Don't set last_resume_kind here.
9535 (linux_kill): Use `mourn'.
9536 (linux_detach): Use `thread_db_detach', and `mourn'.
9537 (linux_mourn): New.
9538 (linux_attach_lwp_1): Adjust comment.
9539 (linux_attach): last_resume_kind moved the thread_info; adjust.
9540 (status_pending_p_callback): Adjust.
9541 (linux_wait_for_event_1): Adjust.
9542 (count_events_callback, select_singlestep_lwp_callback)
9543 (select_event_lwp_callback, cancel_breakpoints_callback)
9544 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9545 (proceed_one_lwp): Adjust.
9546 (linux_async): Add debug output.
9547 (linux_thread_stopped): New.
9548 (linux_pause_all): New.
9549 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9550 linux_pause_all.
9551 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9552 (thread_db_free): Delete declaration.
9553 (thread_db_detach, thread_db_mourn): Declare.
9554 * thread-db.c (thread_db_init): Use thread_db_mourn.
9555 (thread_db_free): Delete, split in two.
9556 (disable_thread_event_reporting): New.
9557 (thread_db_detach): New.
9558 (thread_db_mourn): New.
9559
9560 * server.h (struct thread_info) <last_resume_kind>: New field.
9561 <attached>: Add comment.
9562 <gdb_detached>: New field.
9563 (handler_func): Change return type to int.
9564 (handle_serial_event, handle_target_event): Ditto.
9565 (gdb_connected): Declare.
9566 (tracing): Delete.
9567 (disconnected_tracing): Declare.
9568 (stop_tracing): Declare.
9569
9570 * server.c (handle_query) <qSupported>: Report support for
9571 disconnected tracing.
9572 (queue_stop_reply_callback): Account for running threads.
9573 (gdb_wants_thread_stopped): New.
9574 (gdb_wants_all_threads_stopped): New.
9575 (gdb_reattached_process): New.
9576 (handle_status): Clear the `gdb_detached' flag of all processes.
9577 In all-stop, stop all threads.
9578 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9579 (process_serial_event): If the remote connection breaks, or if an
9580 exit was forced with "monitor exit", force an event loop exit.
9581 Handle disconnected tracing on detach.
9582 (handle_serial_event): Adjust.
9583 (handle_target_event): If GDB isn't connected, forward events back
9584 to the inferior, unless the last process exited, in which case,
9585 exit gdbserver. Adjust interface.
9586
9587 * remote-utils.c (remote_open): Don't block in accept. Instead
9588 register an event loop source on the listen socket file
9589 descriptor. Refactor bits into ...
9590 (listen_desc): ... this new global.
9591 (gdb_connected): ... this new function.
9592 (enable_async_notification): ... this new function.
9593 (handle_accept_event): ... this new function.
9594 (remote_close): Clear remote_desc.
9595
9596 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9597
9598 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9599 New fields.
9600 (mourn_inferior): Define.
9601 (target_process_qsupported): Avoid the dangling else problem.
9602 (thread_stopped): Define.
9603 (pause_all): Define.
9604 (target_waitstatus_to_string): Declare.
9605 * target.c (target_waitstatus_to_string): New.
9606
9607 * tracepoint.c (tracing): Make extern.
9608 (disconnected_tracing): New.
9609 (stop_tracing): Make extern. Handle tracing stops due to GDB
9610 disconnecting.
9611 (cmd_qtdisconnected): New.
9612 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9613 (handle_tracepoint_general_set): Handle QTDisconnected.
9614
9615 * event-loop.c (event_handler_func): Change return type to int.
9616 (process_event): Bail out if the event handler wants the event
9617 loop to stop.
9618 (handle_file_event): Ditto.
9619 (start_event_loop): Bail out if the event handler wants the event
9620 loop to stop.
9621
9622 * nto-low.c (nto_target_ops): Adjust.
9623 * spu-low.c (spu_wait): Don't remove the process here.
9624 (spu_target_ops): Adjust.
9625 * win32-low.c (win32_wait): Don't remove the process here.
9626 (win32_target_ops): Adjust.
9627
5d267c4c
PA
96282010-04-11 Pedro Alves <pedro@codesourcery.com>
9629
9630 * regcache.c (realloc_register_cache): Invalidate inferior's
9631 regcache before recreating it.
9632
623ccd72
PA
96332010-04-09 Pedro Alves <pedro@codesourcery.com>
9634
9635 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9636
219f2f23
PA
96372010-04-09 Stan Shebs <stan@codesourcery.com>
9638 Pedro Alves <pedro@codesourcery.com>
9639
9640 * server.h (LONGEST): New.
9641 (struct thread_info) <while_stepping>: New field.
9642 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9643 Declare.
9644 (initialize_tracepoint, handle_tracepoint_general_set)
9645 (handle_tracepoint_query, tracepoint_finished_step)
9646 (tracepoint_was_hit, release_while_stepping_state_list):
9647 (current_traceframe): Declare.
9648 * server.c (handle_general_set): Handle tracepoint packets.
9649 (read_memory): New.
9650 (write_memory): New.
9651 (handle_search_memory_1): Use read_memory.
9652 (handle_query): Report support for conditional tracepoints, trace
9653 state variables, and tracepoint sources. Handle tracepoint
9654 queries.
9655 (main): Initialize the tracepoints module.
9656 (process_serial_event): Handle traceframe reads/writes.
9657
9658 * linux-low.c (handle_tracepoints): New.
9659 (linux_wait_1): Call it.
9660 (linux_resume_one_lwp): Handle while-stepping.
9661 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9662 (linux_target_ops): Install them.
9663 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9664 New field.
9665 * linux-x86-low.c (x86_supports_tracepoints): New.
9666 (the_low_target). Install it.
9667
9668 * mem-break.h (delete_breakpoint): Declare.
9669 * mem-break.c (delete_breakpoint): Make external.
9670
9671 * target.h (struct target_ops): Add `supports_tracepoints',
9672 `read_pc', and `write_pc' fields.
9673 (target_supports_tracepoints): Define.
9674 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9675 (phex_nz): New.
9676
9677 * regcache.h (struct regcache) <registers_owned>: New field.
9678 (init_register_cache, regcache_cpy): Declare.
9679 (regcache_read_pc, regcache_write_pc): Declare.
9680 (register_cache_size): Declare.
9681 (supply_regblock): Declare.
9682 * regcache.c (init_register_cache): New.
9683 (new_register_cache): Use it.
9684 (regcache_cpy): New.
9685 (register_cache_size): New.
9686 (supply_regblock): New.
9687 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9688
219f2f23
PA
9689 * tracepoint.c: New.
9690
9691 * Makefile.in (OBS): Add tracepoint.o.
9692 (tracepoint.o): New rule.
9693
3a13a53b
L
96942010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9695
9696 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9697 (i386-mmx.o): New.
9698 (i386-mmx.c): Likewise.
9699 (i386-mmx-linux.o): Likewise.
9700 (i386-mmx-linux.c): Likewise.
9701
9702 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9703 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9704 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9705 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9706
9707 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9708 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9709 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9710
1570b33e
L
97112010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9712
9713 * Makefile.in (clean): Updated.
9714 (i386-avx.o): New.
9715 (i386-avx.c): Likewise.
9716 (i386-avx-linux.o): Likewise.
9717 (i386-avx-linux.c): Likewise.
9718 (amd64-avx.o): Likewise.
9719 (amd64-avx.c): Likewise.
9720 (amd64-avx-linux.o): Likewise.
9721 (amd64-avx-linux.c): Likewise.
9722
9723 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9724 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9725 (srv_amd64_regobj): Add amd64-avx.o.
9726 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9727 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9728 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9729 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9730 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9731 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9732 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9733
9734 * i387-fp.c: Include "i386-xstate.h".
9735 (i387_xsave): New.
9736 (i387_cache_to_xsave): Likewise.
9737 (i387_xsave_to_cache): Likewise.
9738 (x86_xcr0): Likewise.
9739
9740 * i387-fp.h (i387_cache_to_xsave): Likewise.
9741 (i387_xsave_to_cache): Likewise.
9742 (x86_xcr0): Likewise.
9743
9744 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9745 * linux-crisv32-low.c (target_regsets): Likewise.
9746 * linux-m68k-low.c (target_regsets): Likewise.
9747 * linux-mips-low.c (target_regsets): Likewise.
9748 * linux-ppc-low.c (target_regsets): Likewise.
9749 * linux-s390-low.c (target_regsets): Likewise.
9750 * linux-sh-low.c (target_regsets): Likewise.
9751 * linux-sparc-low.c (target_regsets): Likewise.
9752 * linux-xtensa-low.c (target_regsets): Likewise.
9753
9754 * linux-low.c: Include <sys/uio.h>.
9755 (regsets_fetch_inferior_registers): Support nt_type.
9756 (regsets_store_inferior_registers): Likewise.
9757 (linux_process_qsupported): New.
9758 (linux_target_ops): Add linux_process_qsupported.
9759
9760 * linux-low.h (regset_info): Add nt_type.
9761 (linux_target_ops): Add process_qsupported.
9762
9763 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9764 and <sys/uio.h>.
9765 (init_registers_i386_avx_linux): New.
9766 (init_registers_amd64_avx_linux): Likewise.
9767 (xmltarget_i386_linux_no_xml): Likewise.
9768 (xmltarget_amd64_linux_no_xml): Likewise.
9769 (PTRACE_GETREGSET): Likewise.
9770 (PTRACE_SETREGSET): Likewise.
9771 (x86_fill_xstateregset): Likewise.
9772 (x86_store_xstateregset): Likewise.
9773 (use_xml): Likewise.
9774 (x86_linux_update_xmltarget): Likewise.
9775 (x86_linux_process_qsupported): Likewise.
9776 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9777 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9778 init_registers_i386_linux here. Call
9779 x86_linux_update_xmltarget.
9780 (the_low_target): Add x86_linux_process_qsupported.
9781
9782 * server.c (handle_query): Call target_process_qsupported.
9783
9784 * target.h (target_ops): Add process_qsupported.
9785 (target_process_qsupported): New.
9786
fc7238bb
PA
97872010-04-03 Pedro Alves <pedro@codesourcery.com>
9788
9789 * inferiors.c (add_thread): Set last_status kind to
9790 TARGET_WAITKIND_IGNORE.
9791 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9792 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9793 (linux_wait_1): Move `thread' local definition to block that uses
9794 it. Don't NULL initialize `event_child'.
9795 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9796 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9797 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9798
bdabb078
PA
97992010-04-01 Pedro Alves <pedro@codesourcery.com>
9800
9801 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9802 an extended waitstatus, or by a watchpoint.
9803 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9804 thread was stepping or has been stopped by a watchpoint.
9805
d3bbe7a0
PA
98062010-04-01 Pedro Alves <pedro@codesourcery.com>
9807
9808 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9809 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9810 of another, then delete the previous, and validate all
9811 breakpoints.
9812 (validate_inserted_breakpoint): New.
9813 (delete_disabled_breakpoints): New.
9814 (validate_breakpoints): New.
9815 (check_mem_read): Validate breakpoints before trusting their
9816 shadow. Delete disabled breakpoints.
9817 (check_mem_write): Validate breakpoints before trusting they
9818 should be inserted. Delete disabled breakpoints.
9819 * mem-break.h (validate_breakpoints):
9820 * server.c (handle_query): Validate breakpoints when we see a
9821 qSymbol query.
9822
8b07ae33
PA
98232010-04-01 Pedro Alves <pedro@codesourcery.com>
9824
9825 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9826 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9827 if we could tell there's a GDB breakpoint at stop_pc.
9828 (need_step_over_p): Don't do a step over if we find a GDB
9829 breakpoint at the resume PC.
9830
9831 * mem-break.c (struct raw_breakpoint): New.
9832 (enum bkpt_type): New type `gdb_breakpoint'.
9833 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9834 fields. New field `raw'.
9835 (find_raw_breakpoint_at): New.
9836 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9837 breakpoint instead.
9838 (set_breakpoint_at): Adjust.
9839 (delete_raw_breakpoint): New.
9840 (release_breakpoint): New.
9841 (delete_breakpoint): Rename to...
9842 (delete_breakpoint_1): ... this. Add proc parameter. Use
9843 release_breakpoint. Return ENOENT.
9844 (delete_breakpoint): Reimplement.
9845 (find_breakpoint_at): Delete.
9846 (find_gdb_breakpoint_at): New.
9847 (delete_breakpoint_at): Delete.
9848 (set_gdb_breakpoint_at): New.
9849 (delete_gdb_breakpoint_at): New.
9850 (gdb_breakpoint_here): New.
9851 (set_reinsert_breakpoint): Use release_breakpoint.
9852 (uninsert_breakpoint): Rename to ...
9853 (uninsert_raw_breakpoint): ... this.
9854 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9855 (reinsert_raw_breakpoint): Change parameter type to
9856 raw_breakpoint.
9857 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9858 instead.
9859 (check_breakpoints): Adjust. Use release_breakpoint.
9860 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9861 (breakpoint_inserted_here): Ditto.
9862 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9863 Don't trust the breakpoint's shadow if it is not inserted.
9864 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9865 (delete_all_breakpoints): Adjust.
9866 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9867 use delete_breakpoint_1.
9868
9869 * mem-break.h (breakpoints_supported): Delete declaration.
9870 (set_gdb_breakpoint_at): Declare.
9871 (gdb_breakpoint_here): Declare.
9872 (delete_breakpoint_at): Delete.
9873 (delete_gdb_breakpoint_at): Declare.
9874
9875 * server.h (struct raw_breakpoint): Forward declare.
9876 (struct process_info): New field `raw_breakpoints'.
9877
9878 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9879 breakpoints.
9880
6bf5e0ba
PA
98812010-03-24 Pedro Alves <pedro@codesourcery.com>
9882
9883 * linux-low.c (status_pending_p_callback): Fix comment.
9884 (linux_wait_for_event_1): Move most of the internal breakpoint
9885 handling from here...
9886 (linux_wait_1): ... to here.
9887 (count_events_callback): New.
9888 (select_singlestep_lwp_callback): New.
9889 (select_event_lwp_callback): New.
9890 (cancel_breakpoints_callback): New.
9891 (select_event_lwp): New.
9892 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9893 priority to all LWPs that have had events that should be reported
9894 to the client. Cancel breakpoints when about to reporting the
9895 event to the client, not while stopping lwps. No longer cancel
9896 finished single-steps here.
9897 (cancel_finished_single_step): Delete.
9898 (cancel_finished_single_steps): Delete.
9899
414a389f
PA
99002010-03-24 Pedro Alves <pedro@codesourcery.com>
9901
9902 * mem-break.c (enum bkpt_type): New.
9903 (struct breakpoint): New field `type'.
9904 (set_breakpoint_at): Change return type to struct breakpoint
9905 pointer. Set type to `other_breakpoint' by default.
9906 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9907 in the breakpoint list.
9908 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9909 (reinsert_breakpoint): Rename to ...
9910 (reinsert_raw_breakpoint): ... this.
9911 (reinsert_breakpoints_at): Adjust.
9912 * mem-break.h (struct breakpoint): Declare.
9913 (set_breakpoint_at): Change return type to struct breakpoint
9914 pointer.
9915
2280c721
PA
99162010-03-24 Pedro Alves <pedro@codesourcery.com>
9917
9918 * server.c (handle_query): Assign, not compare.
9919
d50171e4
PA
99202010-03-24 Pedro Alves <pedro@codesourcery.com>
9921
9922 Teach linux gdbserver to step-over-breakpoints.
9923
9924 * linux-low.c (can_hardware_single_step): New.
9925 (supports_breakpoints): New.
9926 (handle_extended_wait): If stopping threads, read the stop pc of
9927 the new cloned LWP.
9928 (get_pc): New.
9929 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9930 low target doesn't support retrieving the PC.
9931 (add_lwp): Set last_resume_kind to resume_continue.
9932 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9933 (linux_attach): Don't clear stop_expected. Set the lwp's
9934 last_resume_kind to resume_stop.
9935 (linux_detach_one_lwp): Don't check for removed breakpoints.
9936 (check_removed_breakpoint): Delete.
9937 (status_pending_p): Rename to ...
9938 (status_pending_p_callback): ... this. Don't check for removed
9939 breakpoints. Don't consider threads that are stopped from GDB's
9940 perspective.
9941 (linux_wait_for_lwp): Always read the stop_pc here.
9942 (cancel_breakpoint): New.
9943 (step_over_bkpt): New global.
9944 (linux_wait_for_event_1): Implement stepping over breakpoints.
9945 (gdb_wants_lwp_stopped): New.
9946 (gdb_wants_all_stopped): New.
9947 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9948 single-step traps here. Store the thread's last reported target
9949 wait status.
9950 (send_sigstop): Don't clear stop_expected. Always set it,
9951 instead.
9952 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9953 (cancel_finished_single_step): New.
9954 (cancel_finished_single_steps): New.
9955 (wait_for_sigstop): Don't cancel finished single-step traps here.
9956 (linux_resume_one_lwp): Don't check for removed breakpoints.
9957 Don't set `step' on non-hardware step archs.
9958 (linux_set_resume_request): Ignore resume_stop requests if already
9959 stopping or stopped. Set the lwp's last_resume_kind.
9960 (resume_status_pending_p): Don't check for removed breakpoints.
9961 (need_step_over_p): New.
9962 (start_step_over): New.
9963 (finish_step_over): New.
9964 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9965 requests. Clear the thread's last reported target waitstatus.
9966 Don't use the `suspended' flag. Don't consider pending breakpoints.
9967 (linux_resume): Start a step-over if necessary.
9968 (proceed_one_lwp): New.
9969 (proceed_all_lwps): New.
9970 (unstop_all_lwps): New.
9971 * linux-low.h (struct lwp_info): Rewrite comment for the
9972 `suspended' flag. Add the `stop_pc' field. Delete the
9973 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9974 Add `'last_resume_kind' and `need_step_over' fields.
9975 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9976 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9977 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9978 (set_raw_breakpoint_at): New.
9979 (set_breakpoint_at): Rewrite to use it.
9980 (reinsert_breakpoint_handler): Delete.
9981 (set_reinsert_breakpoint): New.
9982 (reinsert_breakpoint_by_bp): Delete.
9983 (delete_reinsert_breakpoints): New.
9984 (uninsert_breakpoint): Rewrite.
9985 (uninsert_breakpoints_at): New.
9986 (reinsert_breakpoint): Rewrite.
9987 (reinsert_breakpoints_at): New.
9988 (check_breakpoints): Rewrite.
9989 (breakpoint_here): New.
9990 (breakpoint_inserted_here): New.
9991 (check_mem_read): Adjust.
9992 * mem-break.h (breakpoints_supported, breakpoint_here)
9993 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
9994 (reinsert_breakpoint_by_bp): Delete declaration.
9995 (delete_reinsert_breakpoints): Declare.
9996 (reinsert_breakpoint): Delete declaration.
9997 (reinsert_breakpoints_at): Declare.
9998 (uninsert_breakpoint): Delete declaration.
9999 (uninsert_breakpoints_at): Declare.
10000 (check_breakpoints): Adjust prototype.
10001 * server.h: Adjust include order.
10002 (struct thread_info): Declare here. Add a `last_status' field.
10003
30ba68cb
MS
100042010-03-23 Michael Snyder <msnyder@vmware.com>
10005
10006 * server.c (crc32): New function.
10007 (handle_query): Add handling for 'qCRC:' request.
10008
b9a881c2
PA
100092010-03-23 Pedro Alves <pedro@codesourcery.com>
10010
10011 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10012 lwp had been stopped by a watchpoint.
10013
e92d13d5
PA
100142010-03-16 Pedro Alves <pedro@codesourcery.com>
10015
10016 * server.h (internal_error): Declare.
10017 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10018 * utils.c (internal_error): New function.
10019
64daa791
AS
100202010-03-15 Andreas Schwab <schwab@redhat.com>
10021
10022 * configure.srv: Fix typo setting srv_regobj.
10023
f52cd8cd
PA
100242010-03-15 Pedro Alves <pedro@codesourcery.com>
10025
10026 * linux-low.c (fetch_register): Avoid passing a non string literal
10027 format to `error'.
10028 (usr_store_inferior_registers): Ditto.
10029
93ae6fdc
PA
100302010-03-14 Pedro Alves <pedro@codesourcery.com>
10031
10032 * linux-low.c (linux_write_memory): Bail out early if peeking
10033 memory failed.
10034
c3adc08c
PA
100352010-03-14 Pedro Alves <pedro@codesourcery.com>
10036
10037 * linux-low.h (struct lwp_info): New fields
10038 `stopped_by_watchpoint' and `stopped_data_address'.
10039 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10040 here, and cache them in the lwp object.
10041 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10042 directly.
10043 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10044 field.
10045 (linux_stopped_by_watchpoint): Rewrite.
10046 (linux_stopped_data_address): Rewrite.
10047
bce522a2
PA
100482010-03-06 Simo Melenius <simo.melenius@iki.fi>
10049
10050 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10051 switching the current inferior, not before.
10052
90884b2b
L
100532010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10054
10055 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10056 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10057 i386-linux.c and amd64-linux.c.
10058 (reg-i386.o): Removed.
10059 (reg-i386.c): Likewise.
10060 (reg-i386-linux.o): Likewise.
10061 (reg-i386-linux.c): Likewise.
10062 (reg-x86-64.o): Likewise.
10063 (reg-x86-64.c): Likewise.
10064 (reg-x86-64-linux.o): Likewise.
10065 (reg-x86-64-linux.c): Likewise.
10066 (i386.o): New.
10067 (i386.c): Likewise.
10068 (i386-linux.o): Likewise.
10069 (i386-linux.c): Likewise.
10070 (amd64.o): Likewise.
10071 (amd64.c): Likewise.
10072 (amd64-linux.o): Likewise.
10073 (amd64-linux.c): Likewise.
10074
10075 * configure.srv (srv_i386_regobj): New.
10076 (srv_i386_linux_regobj): Likewise.
10077 (srv_amd64_regobj): Likewise.
10078 (srv_amd64_linux_regobj): Likewise.
10079 (srv_i386_32bit_xmlfiles): Likewise.
10080 (srv_i386_64bit_xmlfiles): Likewise.
10081 (srv_i386_xmlfiles): Likewise.
10082 (srv_amd64_xmlfiles): Likewise.
10083 (srv_i386_linux_xmlfiles): Likewise.
10084 (srv_amd64_linux_xmlfiles): Likewise.
10085 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10086 srv_xmlfiles to $srv_i386_xmlfiles.
10087 (i[34567]86-*-mingw32ce*): Likewise.
10088 (i[34567]86-*-mingw*): Likewise.
10089 (i[34567]86-*-nto*): Likewise.
10090 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10091 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10092 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10093 (x86_64-*-linux*): Likewise.
10094
10095 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10096 (init_registers_amd64_linux): New.
10097 (x86_arch_setup): Replace init_registers_x86_64_linux with
10098 init_registers_amd64_linux.
10099
193f13e6
MK
101002010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10101
10102 * configure.ac: Check for libdl. If it is not available link against
10103 static libthread_db.
10104 * configure: Regenerate.
10105
85d721b8
PA
101062010-02-22 Pedro Alves <pedro@codesourcery.com>
10107
10108 PR9605
10109
10110 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10111 handing a read watchpoint.
10112 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10113
6076632b
DE
101142010-02-12 Doug Evans <dje@google.com>
10115
10116 * linux-low.c (linux_supports_tracefork_flag): Document.
10117 (linux_look_up_symbols): Add comment.
10118
3327ccf7
L
101192010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10120
10121 * regcache.c (supply_register): Clear regcache if buf is NULL.
10122
0718675c 101232010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10124 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10125
10126 * inferiors.c (find_inferior): Add function documentation.
10127 (unloaded_dll): Handle the case where the unloaded dll has not
10128 been previously registered in the dll list.
10129
177321bd
DJ
101302010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10131
10132 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10133 (thumb2_breakpoint): New.
10134 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10135
2b009048
DJ
101362010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10137
10138 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10139 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10140 breakpoints.
10141
3be029c7
PA
101422010-01-21 Pedro Alves <pedro@codesourcery.com>
10143
10144 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10145
18f5de3b
JK
101462010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10147
10148 * linux-s390-low.c (s390_collect_ptrace_register)
10149 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10150
3743bb4f
DE
101512010-01-21 Doug Evans <dje@google.com>
10152
14ce3065
DE
10153 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10154 (PTRACE_ARG4_TYPE): New macro.
10155 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10156 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10157 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10158 (usr_store_inferior_registers): Ditto.
10159 (linux_read_memory, linux_write_memory): Ditto.
10160 (linux_test_for_tracefork): Ditto.
10161
3743bb4f
DE
10162 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10163 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10164
8b315be5
PA
101652010-01-21 Pedro Alves <pedro@codesourcery.com>
10166
10167 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10168 target.
10169
85492558
PA
101702010-01-21 Pedro Alves <pedro@codesourcery.com>
10171
10172 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10173 prototype to take a regcache. Adjust.
10174
442ea881
PA
101752010-01-20 Pedro Alves <pedro@codesourcery.com>
10176
10177 * regcache.h (struct thread_info): Forward declare.
10178 (struct regcache): New.
10179 (new_register_cache): Adjust prototype.
10180 (get_thread_regcache): Declare.
10181 (free_register_cache): Adjust prototype.
10182 (registers_to_string, registers_from_string): Ditto.
10183 (supply_register, supply_register_by_name, collect_register)
10184 (collect_register_as_string, collect_register_by_name): Ditto.
10185 * regcache.c (struct inferior_regcache_data): Delete.
10186 (get_regcache): Rename to ...
10187 (get_thread_regcache): ... this. Adjust. Switch inferior before
10188 fetching registers.
10189 (regcache_invalidate_one): Adjust.
10190 (regcache_invalidate): Fix prototype.
10191 (new_register_cache): Return the new register cache.
10192 (free_register_cache): Change prototype.
10193 (realloc_register_cache): Adjust.
10194 (registers_to_string): Change prototype to take a regcache. Adjust.
10195 (registers_from_string): Ditto.
10196 (register_data): Ditto.
10197 (supply_register): Ditto.
10198 (supply_register_by_name): Ditto.
10199 (collect_register): Ditto.
10200 (collect_register_as_string): Ditto.
10201 (collect_register_by_name): Ditto.
10202 * server.c (process_serial_event): Adjust.
10203 * linux-low.h (regset_fill_func, regset_store_func): Change
10204 prototype.
10205 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10206 Change prototype.
10207 * linux-low.c (get_stop_pc): Adjust.
10208 (check_removed_breakpoint): Adjust.
10209 (linux_wait_for_event): Adjust.
10210 (linux_resume_one_lwp): Adjust.
10211 (fetch_register): Add regcache parameter. Adjust.
10212 (usr_store_inferior_registers): Ditto.
10213 (regsets_fetch_inferior_registers): Ditto.
10214 (regsets_store_inferior_registers): Ditto.
10215 (linux_fetch_registers, linux_store_registers): Ditto.
10216 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10217 regcache. Adjust.
43aaf8b6
PA
10218 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10219 Ditto.
442ea881
PA
10220 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10221 prototype to take a regcache.
10222 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10223 * remote-utils.c (convert_ascii_to_int, outreg)
10224 (prepare_resume_reply): Change prototype to take a regcache.
10225 Adjust.
10226 * target.h (struct target_ops) <fetch_registers, store_registers>:
10227 Change prototype to take a regcache.
10228 (fetch_inferior_registers, store_inferior_registers): Change
10229 prototype to take a regcache. Adjust.
10230 * proc-service.c (ps_lgetregs): Adjust.
10231 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10232 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10233 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10234 take a regcache. Adjust.
10235 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10236 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10237 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10238 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10239 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10240 (cris_cannot_fetch_register):
10241 (cris_breakpoint_at): Change prototype to take a regcache.
10242 Adjust.
10243 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10244 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10245 to take a regcache. Adjust.
10246 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10247 Adjust.
10248 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10249 take a regcache. Adjust.
10250 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10251 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10252 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10253 * linux-mips-low.c (mips_get_pc):
10254 (mips_set_pc): Change prototype to take a regcache. Adjust.
10255 (mips_reinsert_addr): Adjust.
10256 (mips_collect_register): Change prototype to take a regcache.
10257 Adjust.
10258 (mips_supply_register):
10259 (mips_collect_register_32bit, mips_supply_register_32bit)
10260 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10261 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10262 * linux-ppc-low.c (ppc_supply_ptrace_register)
10263 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10264 (parse_spufs_run): Adjust.
10265 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10266 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10267 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10268 take a regcache. Adjust.
10269 * linux-s390-low.c (s390_collect_ptrace_register)
10270 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10271 (s390_set_pc): Change prototype to take a regcache. Adjust.
10272 (s390_arch_setup): Adjust.
10273 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10274 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10275 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10276 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10277 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10278 regcache. Adjust.
10279 (sparc_breakpoint_at): Adjust.
10280 * linux-xtensa-low.c (xtensa_fill_gregset):
10281 (xtensa_store_gregset):
10282 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10283 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10284 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10285 prototype to take a regcache. Adjust.
10286 * win32-arm-low.c (arm_fetch_inferior_register)
10287 (arm_store_inferior_register): Change prototype to take a
10288 regcache. Adjust.
10289 * win32-i386-low.c (i386_fetch_inferior_register)
10290 (i386_store_inferior_register): Change prototype to take a
10291 regcache. Adjust.
10292 * win32-low.c (child_fetch_inferior_registers)
10293 (child_store_inferior_registers): Change prototype to take a
10294 regcache. Adjust.
10295 (win32_wait): Adjust.
10296 (win32_fetch_inferior_registers): Change prototype to take a
10297 regcache. Adjust.
10298 (win32_store_inferior_registers): Adjust.
10299 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10300 store_inferior_register>: Change prototype to take a regcache.
10301
60c3d7b0
DE
103022010-01-20 Doug Evans <dje@google.com>
10303
10304 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10305 #ifdef.
10306 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10307 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10308
dc146f7c
VP
103092010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10310
10311 * linux-low.c (linux_core_of_thread): New.
10312 (compare_ints, show_process, list_threads): New.
10313 (linux_qxfer_osdata): Report threads and cores.
10314 (linux_target_op): Register linux_core_of_thread.
10315 * remote-utils.c (prepare_resume_reply): Report the core.
10316 (buffer_xml_printf): Support %d specifier.
10317 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10318 New.
10319 (handle_query): Handle qXfer:threads. Announce availability
10320 thereof.
10321 * target.h (struct target_ops): New field core_of_thread.
10322
7803799a
UW
103232010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10324
10325 * Makefile.in (clean): Remove new generated files.
10326 (reg-s390.o, reg-s390.c): Remove rules.
10327 (reg-s390x.o, reg-s390x.c): Likewise.
10328 (s390-linux32.o, s390-linux32.c): Add rules.
10329 (s390-linux64.o, s390-linux64.c): Likewise.
10330 (s390x-linux64.o, s390x-linux64.c): Likewise.
10331 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10332 * linux-s390-low.c: Include <elf.h>.
10333 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10334 (init_registers_s390): Remove prototype.
10335 (init_registers_s390x): Likewise.
10336 (init_registers_s390_linux32): Add prototype.
10337 (init_registers_s390_linux64): Likewise.
10338 (init_registers_s390x_linux64): Likewise.
10339 (s390_num_regs_3264): New define.
10340 (s390_regmap_3264): New global variable.
10341 (s390_cannot_fetch_register): Remove obsolete check.
10342 (s390_cannot_store_register): Likewise.
10343 (s390_collect_ptrace_register): Handle upper/lower register halves.
10344 (s390_supply_ptrace_register): Likewise.
10345 (s390_fill_gregset): Update to register number changes.
10346 (s390_get_hwcap): New routine.
10347 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10348 Install appropriate regmap and register set.
10349
6e7ffa39
JB
103502010-01-01 Joel Brobecker <brobecker@adacore.com>
10351
10352 * server.c (gdbserver_version): Update copyright year to 2010.
10353 * gdbreplay.c (gdbreplay_version): Likewise.
10354
957f3f49
DE
103552009-12-28 Doug Evans <dje@google.com>
10356
10357 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10358 elf/external.h. Include <elf.h> instead but only if necessary.
10359
ca5c370d
PA
103602009-12-28 Pedro Alves <pedro@codesourcery.com>
10361
10362 * linux-low.c (linux_remove_process): Remove `detaching'
10363 parameter. Don't release/detach from thread_db here.
10364 (linux_kill): Release/detach from thread_db here, ...
10365 (linux_detach): ... and here, before actually detaching.
10366 (linux_wait_1): ... and here, when a process exits.
10367 * thread-db.c (any_thread_of): New.
10368 (thread_db_free): Switch the current inferior to a thread of the
10369 passed in process.
10370
4ee62156
DE
103712009-12-21 Doug Evans <dje@google.com>
10372
d90e6a88
DE
10373 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10374
c5f62d5f
DE
10375 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10376 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10377 warning ifndef __NR_tkill. Move setting of errno there too.
10378 Delete unnecessary resetting of errno after syscall.
10379 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10380
10e86dd7
DE
10381 * configure.ac: Check for dladdr.
10382 * config.in: Regenerate.
10383 * configure: Regenerate.
10384 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10385 (try_thread_db_load): Update.
10386
4ee62156
DE
10387 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10388
00f515da
DE
103892009-12-18 Doug Evans <dje@google.com>
10390
e9464885
DE
10391 * event-loop.c: Include unistd.h if it exists.
10392
07d4f67e
DE
10393 * linux-low.c (my_waitpid): Move definition away from being in
10394 between linux_tracefork_child/linux_test_for_tracefork.
10395
00f515da
DE
10396 * gdb_proc_service.h (psaddr_t): Fix type.
10397 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10398 signature to match glibc.
10399
1de1badb
DE
104002009-12-16 Doug Evans <dje@google.com>
10401
10402 * linux-low.c (linux_read_memory): Fix argument to read.
10403
aeeb81d1
PA
104042009-11-26 Pedro Alves <pedro@codesourcery.com>
10405
10406 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10407 events, don't leave current_inferior pointing at null.
10408
10357975
PA
104092009-11-26 Pedro Alves <pedro@codesourcery.com>
10410
10411 * win32-low.c (LOG): Delete.
10412 (OUTMSG): Output to stderr.
10413 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10414 on compile time LOG macro.
10415 (win32_wait): Fix debug output.
10416
cf6e3471
PA
104172009-11-26 Pedro Alves <pedro@codesourcery.com>
10418
10419 * win32-low.c (win32_add_one_solib): If the dll name is
10420 "ntdll.dll", prepend the system directory to the dll path.
10421
0c85e18e
MK
104222009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10423
10424 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10425
9ac544ce 104262009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10427 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10428
10429 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10430 * configure.ac: Check for __mcoldfire__ and set
10431 gdb_cv_m68k_is_coldfire.
10432 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10433 reg-cf.o and reg-m68k.o.
10434 * configure: Regenerated.
10435
fd7dd3e6
PA
104362009-11-16 Pedro Alves <pedro@codesourcery.com>
10437
10438 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10439 Pass it to thread_db_free.
10440 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10441 proper `detaching' argument to linux_remove_process.
10442 * linux-low.h (thread_db_free): Add `detaching' parameter.
10443 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10444 to thread_db_free.
10445 (thread_db_free): Add `detaching' parameter. Only
10446 call td_ta_clear_event if detaching from process.
10447
75aa492e
MK
104482009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10449
10450 * thread-db.c (thread_db_free): Fix typo.
10451
21e1bee4
PP
104522009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10453
10454 PR gdb/10838
10455 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10456
8838b45e
NS
104572009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10458
10459 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10460 with an i686 compiler.
10461 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10462 needed.
10463 * configure: Rebuilt.
10464
8a35fb51
SL
104652009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10466
10467 PR gdb/10783
10468
10469 * server.c (handle_search_memory_1): Correct read_addr initialization
10470 in loop for searching subsequent chunks.
10471
96f15937
PP
104722009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10473
10474 * configure.ac: New --with-libthread-db option.
10475 * thread-db.c: Allow direct dependence on libthread_db.
10476 (thread_db_free): Adjust.
10477 * config.in: Regenerate.
10478 * configure: Likewise.
889bf7c5 10479
5f7d1694
PP
104802009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10481
10482 PR gdb/10757
10483 * thread-db.c (attach_thread): New function.
10484 (maybe_attach_thread): Return success/failure.
10485 (find_new_threads_callback): Adjust.
889bf7c5
PA
10486 (thread_db_find_new_threads): Loop until no new threads.
10487
88e3b899
PA
104882009-10-13 Pedro Alves <pedro@codesourcery.com>
10489
10490 * proc-service.c (ps_lgetregs): Formatting.
10491
cdbfd419
PP
104922009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10493
10494 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10495 * configure.ac: Adjust.
10496 * linux-low.h (struct process_info_private): Move members to struct
10497 thread_db.
10498 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10499 * linux-low.c (linux_remove_process): Adjust.
10500 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10501 * server.c (handle_query): Move code ...
10502 (handle_monitor_command): ... here. New function.
10503 * target.h (struct target_ops): New member.
10504 * thread-db.c (struct thread_db): New.
10505 (libthread_db_search_path): New variable.
10506 (thread_db_create_event, thread_db_enable_reporting)
10507 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10508 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10509 (try_thread_db_load_1, dladdr_to_soname): New functions.
10510 (try_thread_db_load, thread_db_load_search): New functions.
10511 (thread_db_init): Search for libthread_db.
10512 (thread_db_free): New function.
10513 (thread_db_handle_monitor_command): Likewise.
10514 * config.in: Regenerate.
10515 * configure: Regenerate.
889bf7c5 10516
4168d2d6
UW
105172009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10518
10519 * spu-low.c (spu_kill): Wait for inferior to terminate.
10520 Call clear_inferiors.
10521 (spu_detach): Call clear_inferiors.
10522
81ecdfbb
RW
105232009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10524
10525 * aclocal.m4: Regenerate.
10526 * config.in: Likewise.
10527 * configure: Likewise.
10528
0b9ff2c0
UW
105292009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10530
10531 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10532 (parse_spufs_run): New function.
10533 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10534 (ppc_breakpoint_at): Handle SPU breakpoints.
10535
efcbbd14
UW
105362009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10537
10538 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10539 (SPUFS_MAGIC): Define.
10540 (spu_enumerate_spu_ids): New function.
10541 (linux_qxfer_spu): New function.
10542 (linux_target_ops): Install linux_qxfer_spu.
10543
f4d9bade
UW
105442009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10545
10546 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10547 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10548 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10549 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10550 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10551 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10552 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10553 (init_registers_powerpc_cell32l): Add prototype.
10554 (init_registers_powerpc_cell64l): Likewise.
10555 (ppc_arch_setup): Detect Cell/B.E. architecture.
10556
96e946ca
RW
105572009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10558
10559 * Makefile.in (datarootdir): New variable.
10560
58d6951d
DJ
105612009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10562
10563 * linux-low.c (linux_write_memory): Update debugging output.
10564 * Makefile.in (clean): Add new descriptions.
10565 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10566 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10567 * configure.srv: Add new files for arm*-*-linux*.
10568 * linux-arm-low.c: Add new declarations.
10569 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10570 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10571 (HWCAP_VFPv3D16): New.
10572 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10573 instead of __IWMMXT__.
10574 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10575 (arm_arch_setup): New.
10576 (target_regsets): Remove #ifdef. Add VFP regset.
10577 (the_low_target): Use arm_arch_setup.
10578
12b42a12
DJ
105792009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10580
10581 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10582 the main thread again.
10583
ac8c974e
AR
105842009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10585
10586 Adding Neutrino gdbserver.
10587 * configure: Regenerated.
10588 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10589 * configure.srv (i[34567]86-*-nto*): New target.
10590 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10591 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10592 (nto_comctrl) [__QNX__]: New function.
10593 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10594
4424e0c3 105952009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10596
10597 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10598 srv_tgtobj.
10599
912cf4ba
PA
106002009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10601 Pedro Alves <pedro@codesourcery.com>
10602
10603 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10604 don't support CONTEXT_EXTENDED_REGISTERS.
10605 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10606 (the_low_target): Install them.
10607 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10608 failing with ERROR_PIPE_NOT_CONNECTED.
10609
aa5ca48f
DE
106102009-06-30 Doug Evans <dje@google.com>
10611 Pierre Muller <muller@ics.u-strasbg.fr>
10612
10613 Add h/w watchpoint support to x86-linux, win32-i386.
10614 * Makefile.in (SFILES): Add i386-low.c
10615 (i386_low_h): Define.
10616 (i386-low.o): Add dependencies.
10617 (linux-x86-low.o): Add i386-low.h dependency.
10618 (win32-i386-low.o): Ditto.
10619 * i386-low.c: New file.
10620 * i386-low.h: New file.
10621 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10622 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10623 * linux-low.c (linux_add_process): Initialize arch_private.
10624 (linux_remove_process): Free arch_private.
10625 (add_lwp): Initialize arch_private.
10626 (delete_lwp): Free arch_private.
10627 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10628 provided.
10629 * linux-low.h (process_info_private): New member arch_private.
10630 (lwp_info): New member arch_private.
10631 (linux_target_ops): New members new_process, new_thread,
10632 prepare_to_resume.
10633 (ptid_of): New macro.
10634 * linux-x86-low.c: Include stddef.h, i386-low.h.
10635 (arch_process_info): New struct.
10636 (arch_lwp_info): New struct.
10637 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10638 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10639 (i386_dr_low_get_status): New function.
10640 (x86_insert_point, x86_remove_point): New functions.
10641 (x86_stopped_by_watchpoint): New function.
10642 (x86_stopped_data_address): New function.
10643 (x86_linux_new_process, x86_linux_new_thread): New functions.
10644 (x86_linux_prepare_to_resume): New function.
10645 (the_low_target): Add entries for insert_point, remove_point,
10646 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10647 prepare_to_resume.
10648 * server.c (debug_hw_points): New global.
10649 (monitor_show_help): Document set debug-hw-points.
10650 (handle_query): Process "set debug-hw-points".
10651 * server.h (debug_hw_points): Declare.
10652 (paddress): Declare.
10653 * utils.c (NUMCELLS, CELLSIZE): New macros.
10654 (get_sell, xsnprintf, paddress): New functions.
10655 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10656 remove_point, stopped_by_watchpoint, stopped_data_address.
10657 * win32-i386-low.c: Include i386-low.h.
10658 (debug_reg_state): Replaces dr.
10659 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10660 (i386_dr_low_get_status): New function.
10661 (i386_insert_point, i386_remove_point): New functions.
10662 (i386_stopped_by_watchpoint): New function.
10663 (i386_stopped_data_address): New function.
10664 (i386_initial_stuff): Update.
10665 (get_thread_context,set_thread_context,i386_thread_added): Update.
10666 (the_low_target): Add entries for insert_point,
10667 remove_point, stopped_by_watchpoint, stopped_data_address.
10668 * win32-low.c (win32_insert_watchpoint): New function.
10669 (win32_remove_watchpoint): New function.
10670 (win32_stopped_by_watchpoint): New function.
10671 (win32_stopped_data_address): New function.
10672 (win32_target_ops): Add entries for insert_watchpoint,
10673 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10674 * win32-low.h (win32_target_ops): New members insert_point,
10675 remove_point, stopped_by_watchpoint, stopped_data_address.
10676
d993e290
PA
106772009-06-25 Pedro Alves <pedro@codesourcery.com>
10678
10679 * server.c (process_serial_event): Re-return unsupported, not
10680 error, if the type isn't recognized. Re-allow supporting only
10681 insert or remove packets. Also call require_running for
10682 breakpoints. Add missing break statement to default case. Tidy.
10683 * target.h (struct target_ops): Rename insert_watchpoint to
10684 insert_point, and remove_watchpoint to remove_point.
10685
10686 * linux-low.h (struct linux_target_ops): Likewise.
10687 * linux-low.c (linux_insert_watchpoint): Rename to ...
10688 (linux_insert_point): ... this. Adjust.
10689 (linux_remove_watchpoint): Rename to ...
10690 (linux_remove_point): ... this. Adjust.
10691 (linux_target_ops): Adjust.
10692 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10693 (cris_insert_point): ... this.
10694 (cris_remove_watchpoint): Rename to ...
10695 (cris_remove_point): ... this.
10696 (the_low_target): Adjust.
10697
0f54c268
PM
106982009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10699
10700 * server.c (handle_v_kill): Pass signal_pid to
10701 kill_inferior if multi_process is zero.
10702
c6314022
AR
107032009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10704
10705 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10706 * target.h (target_ops): Comment for *_watchpoint to make it clear
10707 the functions can get types '0' and '1'.
10708
4463ce24
AR
107092009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10710
10711 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10712 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10713 * regcache.c (get_regcache): Likewise.
10714 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10715 * win32-low.c (child_fetch_inferior_registers): Remove check for
10716 regno 0.
10717
cf8fd78b
PA
107182009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10719 Pedro Alves <pedro@codesourcery.com>
10720
10721 * target.h (struct target_ops) <supports_multi_process>: New
10722 callback.
10723 (target_supports_multi_process): New.
10724 * server.c (handle_query): Even if GDB reports support, only
10725 enable multi-process if the target also supports it. Report
10726 multi-process support only if the target backend supports it.
10727 * linux-low.c (linux_supports_multi_process): New function.
10728 (linux_target_ops): Install it as target_supports_multi_process
10729 callback.
10730
47c0c975
DE
107312009-05-24 Doug Evans <dje@google.com>
10732
e09875d4
DE
10733 Global renaming of find_thread_pid to find_thread_ptid.
10734 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10735 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10736 All callers updated.
10737
e27d73f6
DE
10738 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10739 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10740 directly.
10741
47c0c975
DE
10742 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10743 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10744 (linux_resume_one_lwp): Ditto.
10745
2acc282a
DE
107462009-05-23 Doug Evans <dje@google.com>
10747
10748 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10749 from struct inferior_list_entry * to struct lwp_info *.
10750 All callers updated.
10751
9f1036c1
DE
107522009-05-13 Doug Evans <dje@google.com>
10753
10754 * linux-x86-low.c: Don't include assert.h.
10755 (x86_siginfo_fixup): Use fatal, not assert.
10756 (x86_arch_setup): Fix comment.
10757
d0722149
DE
107582009-05-12 Doug Evans <dje@google.com>
10759
10760 Biarch support for i386/amd64 gdbserver.
10761 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10762 Add linux-x86-low.c.
10763 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10764 (linux-x86-low.o): Add.
10765 * linux-x86-64-low.c: Delete.
10766 * linux-i386-low.c: Delete.
10767 * linux-x86-low.c: New file.
10768 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10769 linux-x86-low.o.
10770 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10771 linux-x86-low.o.
10772 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10773 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10774 (linux_child_pid_to_exec_file): New function.
10775 (elf_64_header_p, elf_64_file_p): New functions.
10776 (siginfo_fixup): New function.
10777 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10778 give target a chance to convert layout.
10779 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10780 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10781
fdeb2a12
DE
107822009-05-07 Doug Evans <dje@google.com>
10783
10784 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10785 (regsets_store_inferior_registers): Ditto.
10786
a6dbe5df
PA
107872009-05-06 Pedro Alves <pedro@codesourcery.com>
10788
10789 PR server/10048
10790
10791 * linux-low.c (must_set_ptrace_flags): Delete.
10792 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10793 of the global.
10794 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10795 `lwp->must_set_ptrace_flags' instead.
ba42693b 10796 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10797 (linux_wait_1): ... not here.
10798
5091eb23
DE
107992009-04-30 Doug Evans <dje@google.com>
10800
9f767825
DE
10801 * inferiors.c (started_inferior_callback): New function.
10802 (attached_inferior_callback): New function.
10803 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10804 * server.c (print_started_pid, print_attached_pid): New functions.
10805 (detach_or_kill_for_exit): New function.
10806 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10807 * server.h (have_started_inferiors_p): Declare.
10808 (have_attached_inferiors_p): Declare.
10809
5091eb23
DE
10810 * inferiors.c (remove_process): Fix memory leak, free process.
10811 * linux-low.c (linux_remove_process): New function.
10812 (linux_kill): Call it instead of remove_process.
10813 (linux_detach, linux_wait_1): Ditto.
10814
155c8968
PA
108152009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10816
10817 * configure.srv: Add x86 Windows CE target.
10818
7fe519cb
UW
108192009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10820
10821 * inferiors.c (get_thread_process): Make global.
10822 * server.h (get_thread_process): Add prototype.
10823 * thread-db.c (find_one_thread): Use get_thread_process
10824 instead of current_process.
10825 (thread_db_get_tls_address): Do not crash if called when
10826 thread layer is not yet initialized.
10827
5472f405
UW
108282009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10829
10830 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10831 * spu-low.c (current_tid): Rename to ...
10832 (current_ptid): ... this.
10833 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10834 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10835 ptid_get_lwp (current_ptid) instead of current_tid.
10836 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10837 instead of current_tid. Use find_process_pid to verify pid
10838 argument is valid. Pass proper argument to remove_process.
10839 (spu_thread_alive): Compare current_ptid instead of current_tid.
10840 (spu_resume): Likewise.
10841
55ac2b99
PA
108422009-04-02 Pedro Alves <pedro@codesourcery.com>
10843
10844 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10845 variable.
10846
95954743
PA
108472009-04-01 Pedro Alves <pedro@codesourcery.com>
10848
10849 Implement the multiprocess extensions, and add linux multiprocess
10850 support.
10851
10852 * server.h (ULONGEST): Declare.
10853 (struct ptid, ptid_t): New.
10854 (minus_one_ptid, null_ptid): Declare.
10855 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10856 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10857 (struct inferior_list_entry): Change `id' type from unsigned from
10858 to ptid_t.
10859 (struct sym_cache, struct breakpoint, struct
10860 process_info_private): Forward declare.
10861 (struct process_info): Declare.
10862 (current_process): Declare.
10863 (all_processes): Declare.
10864 (initialize_inferiors): Declare.
10865 (add_thread): Adjust to use ptid_t.
10866 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10867 (add_process, remove_process, find_thread_pid): Declare.
10868 (find_inferior_id): Adjust to use ptid_t.
10869 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10870 (multi_process): Declare.
10871 (push_event): Adjust to use ptid_t.
10872 (read_ptid, write_ptid): Declare.
10873 (prepare_resume_reply): Adjust to use ptid_t.
10874 (clear_symbol_cache): Declare.
10875 * inferiors.c (all_processes): New.
10876 (null_ptid, minus_one_ptid): New.
10877 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10878 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10879 (add_thread): Change unsigned long to ptid. Remove gdb_id
10880 parameter. Adjust.
10881 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10882 (gdb_id_to_thread): Rename to ...
10883 (find_thread_pid): ... this. Change unsigned long to ptid.
10884 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10885 (loaded_dll, pull_pid_from_list): Adjust.
10886 (add_process, remove_process, find_process_pid)
10887 (get_thread_process, current_process, initialize_inferiors): New.
10888 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10889 (struct target_waitstatus) <related_pid>: Ditto.
10890 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10891 return type to int.
10892 (struct target_ops) <join>: Add `pid' argument.
10893 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10894 (struct target_ops) <wait>: Add `ptid' field. Change return type
10895 to ptid.
10896 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10897 (mywait): Add `ptid' argument. Change return type to ptid_t.
10898 (target_pid_to_str): Declare.
10899 * target.c (set_desired_inferior): Adjust to use ptids.
10900 (mywait): Add new `ptid' argument. Adjust.
10901 (target_pid_to_str): New.
10902 * mem-break.h (free_all_breakpoints): Declare.
10903 * mem-break.c (breakpoints): Delelete.
10904 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10905 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10906 to use per-process breakpoint list.
10907 (free_all_breakpoints): New.
10908 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10909 (symbol_cache, all_symbols_looked_up): Delete.
10910 (hexchars): New.
10911 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10912 read_ptid): New.
10913 (prepare_resume_reply): Change ptid argument's type from unsigned
10914 long to ptid_t. Adjust. Implement W;process and X;process.
10915 (free_sym_cache, clear_symbol_cache): New.
10916 (look_up_one_symbol): Adjust to per-process symbol cache. *
10917 * server.c (cont_thread, general_thread, step_thread): Change type
10918 to ptid_t.
10919 (attached): Delete.
10920 (multi_process): New.
10921 (last_ptid): Change type to ptid_t.
10922 (struct vstop_notif) <ptid>: Change type to ptid_t.
10923 (queue_stop_reply, push_event): Change `ptid' argument's type to
10924 ptid_t.
10925 (discard_queued_stop_replies): Add `pid' argument.
10926 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10927 changes. Don't reference the `attached' global.
10928 (attach_inferior): Adjust to mywait interface changes.
10929 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10930 features. Handle and report "multiprocess+". Handle
10931 "qAttached:PID".
10932 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10933 changes.
10934 (handle_v_kill): New.
10935 (handle_v_stopped): Adjust to use target_pid_to_str.
10936 (handle_v_requests): Allow multiple attaches and runs when
10937 multiprocess extensions are in effect. Handle "vKill".
10938 (myresume): Adjust to use ptids.
10939 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10940 (handle_status): Adjust to discard_queued_stop_replies interface
10941 change.
10942 (first_thread_of, kill_inferior_callback)
10943 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10944 (main): Call initialize_inferiors. Adjust to use ptids, killing
10945 and detaching from all inferiors. Handle multiprocess packet
10946 variants.
10947 * linux-low.h: Include gdb_proc_service.h.
10948 (struct process_info_private): New.
10949 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10950 <lwpid_of>: Use ptid_get_lwp.
10951 (get_lwp_thread): Adjust.
10952 (struct lwp_info): Add `dead' member.
10953 (find_lwp_pid): Declare.
10954 * linux-low.c (thread_db_active): Delete.
10955 (new_inferior): Adjust comment.
10956 (inferior_pid): Delete.
10957 (linux_add_process): New.
10958 (handle_extended_wait): Adjust.
10959 (add_lwp): Change unsigned long to ptid.
10960 (linux_create_inferior): Add process to processes table. Adjust
10961 to use ptids. Don't set new_inferior here.
10962 (linux_attach_lwp): Rename to ...
10963 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10964 it. Adjust to use ptids.
10965 (linux_attach_lwp): New.
10966 (linux_attach): Add process to processes table. Don't set
10967 new_inferior here.
10968 (struct counter): New.
10969 (second_thread_of_pid_p, last_thread_of_process_p): New.
10970 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10971 multiple processes.
10972 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10973 processes. Remove process from process table.
10974 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10975 to multiple processes.
10976 (any_thread_of): New.
10977 (linux_detach): Add `pid' argument, and handle it. Remove process
10978 from processes table.
10979 (linux_join): Add `pid' argument. Handle it.
10980 (linux_thread_alive): Change unsighed long argument to ptid_t.
10981 Consider dead lwps as not being alive.
10982 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10983 threads we're not interested in.
10984 (same_lwp, find_lwp_pid): New.
10985 (linux_wait_for_lwp): Change `pid' argument's type from int to
10986 ptid_t. Adjust.
10987 (linux_wait_for_event): Rename to ...
10988 (linux_wait_for_event_1): ... this. Change `pid' argument's type
10989 from int to ptid_t. Adjust.
10990 (linux_wait_for_event): New.
10991 (linux_wait_1): Add `ptid' argument. Change return type to
10992 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
10993 that exit from the process table.
10994 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
10995 Adjust.
10996 (mark_lwp_dead): New.
10997 (wait_for_sigstop): Adjust to use ptids. If a process exits while
10998 stopping all threads, mark its main lwp as dead.
10999 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11000 ptids.
11001 (fetch_register, usr_store_inferior_registers)
11002 (regsets_fetch_inferior_registers)
11003 (regsets_store_inferior_registers, linux_read_memory)
11004 (linux_write_memory): Inline `inferior_pid'.
11005 (linux_look_up_symbols): Adjust to use per-process
11006 `thread_db_active'.
11007 (linux_request_interrupt): Adjust to use ptids.
11008 (linux_read_auxv): Inline `inferior_pid'.
11009 (initialize_low): Don't reference thread_db_active.
11010 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11011 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11012 (ps_getpid): Return the pid of the current inferior.
11013 * thread-db.c (proc_handle, thread_agent): Delete.
11014 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11015 per-process data.
11016 (find_one_thread): Change argument type to ptid_t. Adjust to
11017 per-process data.
11018 (maybe_attach_thread): Adjust to per-process data and ptids.
11019 (thread_db_find_new_threads): Ditto.
11020 (thread_db_init): Ditto.
11021 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11022 processes table. Adjust to use ptids.
11023 (spu_kill, spu_detach): Adjust interface. Remove process from
11024 processes table.
11025 (spu_join, spu_thread_alive): Adjust interface.
11026 (spu_wait): Adjust interface. Remove process from processes
11027 table. Adjust to use ptids.
11028 * win32-low.c (current_inferior_tid): Delete.
11029 (current_inferior_ptid): New.
11030 (debug_event_ptid): New.
11031 (thread_rec): Take a ptid. Adjust.
11032 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11033 (child_delete_thread): Ditto.
11034 (do_initial_child_stuff): Add `attached' argument. Add process to
11035 processes table.
11036 (child_fetch_inferior_registers, child_store_inferior_registers):
11037 Adjust.
11038 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11039 (win32_attach): Pass 1 to do_initial_child_stuff.
11040 (win32_kill): Adjust interface. Remove process from processes
11041 table.
11042 (win32_detach): Ditto.
11043 (win32_join): Adjust interface.
11044 (win32_thread_alive): Take a ptid.
11045 (win32_resume): Adjust to use ptids.
11046 (get_child_debug_event): Ditto.
11047 (win32_wait): Adjust interface. Remove exiting process from
11048 processes table.
11049
bd99dc85
PA
110502009-04-01 Pedro Alves <pedro@codesourcery.com>
11051
11052 Non-stop mode support.
11053
11054 * server.h (non_stop): Declare.
11055 (gdb_client_data, handler_func): Declare.
11056 (delete_file_handler, add_file_handler, start_event_loop):
11057 Declare.
11058 (handle_serial_event, handle_target_event, push_event)
11059 (putpkt_notif): Declare.
11060 * target.h (enum resume_kind): New.
11061 (struct thread_resume): Replace `step' field by `kind' field.
11062 (TARGET_WNOHANG): Define.
11063 (struct target_ops) <wait>: Add `options' argument.
11064 <supports_non_stop, async, start_non_stop>: New fields.
11065 (target_supports_non_stop, target_async): New.
11066 (start_non_stop): Declare.
11067 (mywait): Add `options' argument.
11068 * target.c (mywait): Add `options' argument. Print child exit
11069 notifications here.
11070 (start_non_stop): New.
11071 * server.c (non_stop, own_buf, mem_buf): New globals.
11072 (struct vstop_notif): New.
11073 (notif_queue): New global.
11074 (queue_stop_reply, push_event, discard_queued_stop_replies)
11075 (send_next_stop_reply): New.
11076 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11077 interface changes.
11078 (attach_inferior): In non-stop mode, don't wait for the target
11079 here.
11080 (handle_general_set): Handle QNonStop.
11081 (handle_query): When handling qC, return the current general
11082 thread, instead of the first thread of the list.
11083 (handle_query): If the backend supports non-stop mode, include
11084 QNonStop+ in the qSupported query response.
11085 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11086 and non-stop mode.
11087 (handle_v_attach, handle_v_run): Handle non-stop mode.
11088 (handle_v_stopped): New.
11089 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11090 (myresume): Adjust to use resume_kind. Handle non-stop.
11091 (queue_stop_reply_callback): New.
11092 (handle_status): Handle non-stop mode.
11093 (main): Clear non_stop flag on reconnection. Use the event-loop.
11094 Refactor serial protocol handling from here ...
11095 (process_serial_event): ... to this new function. When GDB
11096 selects any thread, select one here. In non-stop mode, wait until
11097 GDB acks all pending events before exiting.
11098 (handle_serial_event, handle_target_event): New.
11099 * remote-utils.c (remote_open): Install remote_desc in the event
11100 loop.
11101 (remote_close): Remove remote_desc from the event loop.
11102 (putpkt_binary): Rename to...
11103 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11104 (putpkt_binary): New as wrapper around putpkt_binary_1.
11105 (putpkt_notif): New.
11106 (prepare_resume_reply): In non-stop mode, don't change the
11107 general_thread.
11108 * event-loop.c: New.
11109 * Makefile.in (OBJ): Add event-loop.o.
11110 (event-loop.o): New rule.
11111
11112 * linux-low.h (pid_of): Moved here.
11113 (lwpid_of): New.
11114 (get_lwp_thread): Use lwpid_of.
11115 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11116 * linux-low.c (pid_of): Delete.
11117 (inferior_pid): Use lwpid_of.
11118 (linux_event_pipe): New.
11119 (target_is_async_p): New.
11120 (delete_lwp): New.
11121 (handle_extended_wait): Use lwpid_of.
11122 (add_lwp): Don't set lwpid field.
11123 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11124 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11125 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11126 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11127 first. Adjust to linux_wait_for_event interface changes. Use
11128 lwpid_of.
11129 (linux_detach): Don't delete the main lwp here.
11130 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11131 (status_pending_p): Don't consider explicitly suspended lwps.
11132 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11133 pointer. Add OPTIONS argument. Change return type to int. Use
11134 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11135 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11136 pointer. Add status pointer argument. Return a pid instead of a
11137 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11138 changes. In non-stop mode, don't switch to a random thread.
11139 (linux_wait): Rename to...
11140 (linux_wait_1): ... this. Add target_options argument, and handle
11141 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11142 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11143 clean exit and signal exit code. Don't stop all threads in
11144 non-stop mode. In all-stop mode, only stop all threads when
11145 reporting a stop to GDB. Handle explicit thread stop requests.
11146 (async_file_flush, async_file_mark): New.
11147 (linux_wait): New.
11148 (send_sigstop): Use lwpid_of.
11149 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11150 interface changes. In non-stop mode, don't switch to a random
11151 thread.
11152 (linux_resume_one_lwp): Use lwpid_of.
11153 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11154 (linux_resume_one_thread): ... this. Handle resume_stop. In
11155 non-stop mode, don't look for pending flag in all threads.
11156 (resume_status_pending_p): Don't consider explicitly suspended
11157 threads.
11158 (my_waitpid): Reimplement. Emulate __WALL.
11159 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11160 Use lwpid_of.
11161 (sigchld_handler, linux_supports_non_stop, linux_async)
11162 (linux_start_non_stop): New.
11163 (linux_target_ops): Register linux_supports_non_stop, linux_async
11164 and linux_start_non_stop.
11165 (initialize_low): Install SIGCHLD handler.
11166 * thread-db.c (thread_db_create_event, find_one_thread)
11167 (thread_db_get_tls_address): Use lwpid_of.
11168 * win32-low.c (win32_detach): Adjust to use resume_kind.
11169 (win32_wait): Add `options' argument.
11170 * spu-low.c (spu_resume): Adjust to use resume_kind.
11171 (spu_wait): Add `options' argument.
11172
5b1c542e
PA
111732009-04-01 Pedro Alves <pedro@codesourcery.com>
11174
11175 Decouple target code from remote protocol.
11176
11177 * target.h (enum target_waitkind): New.
11178 (struct target_waitstatus): New.
11179 (struct target_ops) <wait>: Return an unsigned long. Take a
11180 target_waitstatus pointer instead of a char pointer.
11181 (mywait): Likewise.
11182 * target.c (mywait): Change prototype to return an unsigned long.
11183 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11184 * server.h (thread_from_wait, old_thread_from_wait): Delete
11185 declarations.
11186 (prepare_resume_reply): Change prototype to take a
11187 target_waitstatus.
11188 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11189 (last_status, last_ptid): New.
11190 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11191 pid instead of a signal.
11192 (attach_inferior): Remove "status" and "signal" parameters.
11193 Adjust.
11194 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11195 not as an address.
11196 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11197 (handle_v_requests, myresume): Remove "status" and "signal"
11198 parameters. Adjust.
11199 (handle_status): New.
11200 (main): Delete local `status'. Adjust.
11201 * remote-utils.c: Include target.h.
11202 (prepare_resume_reply): Change prototype to take a
11203 target_waitstatus. Adjust.
11204
11205 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11206 interface.
11207 * spu-low.c (spu_wait): Adjust.
11208 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11209 Delete.
11210 (win32_wait): Adjust.
11211
2bd7c093
PA
112122009-04-01 Pedro Alves <pedro@codesourcery.com>
11213
11214 * target.h (struct thread_resume): Delete leave_stopped member.
11215 (struct target_ops): Add a `n' argument to the `resume' callback.
11216 * server.c (start_inferior): Adjust.
11217 (handle_v_cont, myresume): Adjust.
11218 * linux-low.c (check_removed_breakpoint): Adjust to resume
11219 interface change, and to removed leave_stopped field.
11220 (resume_ptr): Delete.
11221 (struct thread_resume_array): New.
11222 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11223 resume interface change.
11224 (linux_continue_one_thread, linux_queue_one_thread)
11225 (resume_status_pending_p): Check if the resume field is NULL
11226 instead of checking the leave_stopped member.
11227 (linux_resume): Adjust to the target resume interface change.
11228 * spu-low.c (spu_resume): Adjust to the target resume interface
11229 change.
11230 * win32-low.c (win32_detach, win32_resume): Ditto.
11231
c35fafde
PA
112322009-04-01 Pedro Alves <pedro@codesourcery.com>
11233
11234 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11235 flag.
11236 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11237 pending.
11238 (linux_continue_one_thread): Only preserve the stepping flag if
11239 there's a pending breakpoint.
11240
0a59d50b
PA
112412009-03-31 Pedro Alves <pedro@codesourcery.com>
11242
11243 * server.c (main): After the inferior having exited, call
11244 remote_close before exiting gdbserver.
11245
f04c6d38
TJB
112462009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11247
11248 Fix size of FPSCR in Power 7 processors.
11249 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11250 (PPC_FEATURE_HAS_DFP): New #define.
11251 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11252 size of the FPSCR.
11253
78e5cee6
PA
112542009-03-23 Pedro Alves <pedro@codesourcery.com>
11255
11256 * server.c (handle_query) Whitespace and formatting.
11257
1b3f6016
PA
112582009-03-22 Pedro Alves <pedro@codesourcery.com>
11259
11260 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11261 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11262 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11263 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11264 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11265 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11266 Makefile.in, configure.ac: Fix whitespace throughout.
11267 * configure: Regenerate.
11268
a07b2135
PA
112692009-03-22 Pedro Alves <pedro@codesourcery.com>
11270
11271 * inferiors.c (find_inferior): Make it safe for the callback
11272 function to delete the currently iterated inferior.
11273
67cc2626
PA
112742009-03-22 Pedro Alves <pedro@codesourcery.com>
11275
11276 * Makefile.in (linuw_low_h): Move higher.
11277 (thread-db.o): Depend on $(linux_low_h).
11278
54a0b537
PA
112792009-03-17 Pedro Alves <pedro@codesourcery.com>
11280
11281 Rename "process" to "lwp" throughout.
11282
11283 * linux-low.c (all_processes): Rename to...
11284 (all_lwps): ... this.
11285 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11286 (add_process): Rename to ...
11287 (add_lwp): ... this. Adjust.
11288 (linux_create_inferior): Adjust.
11289 (linux_attach_lwp): Adjust.
11290 (linux_attach): Adjust.
11291 (linux_kill_one_process): Rename to ...
11292 (linux_kill_one_lwp): ... this. Adjust.
11293 (linux_kill): Adjust.
11294 (linux_detach_one_process): Rename to ...
11295 (linux_detach_one_lwp): ... this. Adjust.
11296 (linux_detach): Adjust.
11297 (check_removed_breakpoint): Adjust.
11298 (status_pending_p): Adjust.
11299 (linux_wait_for_process): Rename to ...
11300 (linux_wait_for_lwp): ... this. Adjust.
11301 (linux_wait_for_event): Adjust.
11302 (send_sigstop): Adjust.
11303 (wait_for_sigstop): Adjust.
11304 (stop_all_processes): Rename to ...
11305 (stop_all_lwps): ... this.
11306 (linux_resume_one_process): Rename to ...
11307 (linux_resume_one_lwp): ... this. Adjust.
11308 (linux_set_resume_request, linux_continue_one_thread)
11309 (linux_queue_one_thread, resume_status_pending_p)
11310 (usr_store_inferior_registers, regsets_store_inferior_registers)
11311 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11312 Adjust.
11313 * linux-low.h (get_process): Rename to ...
11314 (get_lwp): ... this. Adjust.
11315 (get_thread_process): Rename to ...
11316 (get_thread_lwp): ... this. Adjust.
11317 (get_process_thread): Rename to ...
11318 (get_lwp_thread): ... this. Adjust.
11319 (struct process_info): Rename to ...
11320 (struct lwp_info): ... this.
11321 (all_processes): Rename to ...
11322 (all_lwps): ... this.
11323 * proc-service.c (ps_lgetregs): Adjust.
11324 * thread-db.c (thread_db_create_event, find_one_thread)
11325 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11326
0b16c5cf
PA
113272009-03-14 Pedro Alves <pedro@codesourcery.com>
11328
11329 * server.c (handle_query): Handle "qAttached".
11330
32de4b9d
NS
113312009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11332
11333 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11334 GPLv3, update license URL.
11335
2aecd87f
DE
113362009-03-01 Doug Evans <dje@google.com>
11337
93efd302 11338 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11339 (server_h): Add gdb_signals.h.
11340 (signals.o): Update.
11341 * server.h (target_signal_from_host,target_signal_to_host_p)
11342 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11343
86b1f9c5
PM
113442009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11345
11346 * remote-utils.c (getpkt): Also generate remote-debug
11347 information if noack_mode is set.
11348
4aa995e1
PA
113492009-02-06 Pedro Alves <pedro@codesourcery.com>
11350
11351 * server.c (handle_query): Report qXfer:siginfo:read and
11352 qXfer:siginfo:write as supported and handle them.
11353 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11354 * linux-low.c (linux_xfer_siginfo): New.
11355 (linux_target_ops): Set it.
11356
62709adf
PA
113572009-01-26 Pedro Alves <pedro@codesourcery.com>
11358
11359 * server.c (gdbserver_usage): Mention --remote-debug.
11360 (main): Accept '--remote-debug' switch.
11361
aef93bd7
DE
113622009-01-18 Doug Evans <dje@google.com>
11363
11364 * regcache.c (new_register_cache): No need to check result of xcalloc.
11365 * server.c (handle_search_memory): Back out calls to xmalloc,
11366 result is checked and error is returned to user upon failure.
11367 (handle_query): Ditto. Add more checks for result of malloc.
11368 (handle_v_cont): Check result of malloc, report error back to
11369 user upon failure.
11370 (handle_v_run): Ditto. Call freeargv.
11371 * server.h (freeargv): Declare.
11372 * utils.c (freeargv): New fn.
11373
54363045
DE
113742009-01-15 Doug Evans <dje@google.com>
11375
f626972c
DE
11376 * gdbreplay.c (perror_with_name): Make arg const char *.
11377 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11378 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11379 * utils.c (perror_with_name): Make arg const char *.
54363045 11380
18aae699
PA
113812009-01-14 Pedro Alves <pedro@codesourcery.com>
11382
11383 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11384 when handling a EXIT_PROCESS_DEBUG_EVENT.
11385
ff703abe
JB
113862009-01-06 Joel Brobecker <brobecker@adacore.com>
11387
11388 * gdbreplay.c (gdbreplay_version): Update copyright year.
11389 * server.c (gdbserver_version): Likewise.
11390
f21cc1a2 113912009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11392
11393 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11394 (handle_extended_wait): Improve comment.
0e21c1ec 11395
bca929d3
DE
113962008-12-13 Doug Evans <dje@google.com>
11397
11398 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11399 * server.h (ATTR_MALLOC): New macro.
11400 (xmalloc,xcalloc,xstrdup): Declare.
11401 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11402 * inferiors.c: Ditto.
11403 * linux-low.c: Ditto.
11404 * mem-break.c: Ditto.
11405 * regcache.c: Ditto.
11406 * remote-utils.c: Ditto.
11407 * server.c: Ditto.
11408 * target.c: Ditto.
11409 * win32-low.c: Ditto.
11410
97438e3f
DE
114112008-12-12 Doug Evans <dje@google.com>
11412
896c7fbb
DE
11413 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11414 in debugging printf.
11415
97438e3f
DE
11416 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11417
e3b886f8
DE
114182008-12-09 Doug Evans <dje@google.com>
11419
11420 * linux-low.h (struct process_info): Delete member tid, unused.
11421 * thread-db.c (find_one_thread): Update.
11422 (maybe_attach_thread): Update.
11423
07e059b5
VP
114242008-12-02 Pedro Alves <pedro@codesourcery.com>
11425
889bf7c5
PA
11426 * target.h (struct target_ops): Add qxfer_osdata member.
11427 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11428 and dirent.h.
11429 (linux_qxfer_osdata): New functions.
11430 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11431 callback.
11432 * server.c (handle_query): Handle "qXfer:osdata:read:".
11433 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11434 (buffer_xml_printf): New functions.
11435 * server.h (struct buffer): New.
11436 (buffer_grow_str, buffer_grow_str0): New macros.
11437 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11438 (buffer_xml_printf): Declare.
07e059b5 11439
4cab47ab
DE
114402008-11-24 Doug Evans <dje@google.com>
11441
11442 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11443
f142445f
DJ
114442008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11445
11446 * server.c (handle_v_run): Always use the supplied argument list.
11447
d0107bb6 114482008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11449
d0107bb6
BW
11450 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11451 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11452
2c4ad781
TJB
114532008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11454
11455 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11456 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11457 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11458 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11459 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11460 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11461 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11462 XML target descriptions.
11463 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11464 when inferior is running on an ISA 2.05 or later processor. Add
11465 special case to return offset for full 64-bit slot of FPSCR when
11466 in 32-bits.
11467
dfb64f85
DJ
114682008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11469
11470 * Makefile.in (SFILES, clean): Added sparc64 files.
11471 (reg-sparc64.o, reg-sparc64.c): New.
11472 * configure.srv (sparc*-*-linux*): New configuration.
11473 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11474 syscall arguments for SPARC.
11475 (regsets_store_inferior_registers): Likewise.
11476 * linux-sparc-low.c: New file.
11477
66b6e1dd
DE
114782008-10-21 Doug Evans <dje@google.com>
11479
11480 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11481 (READLINE_DIR,READLINE_DEP): Delete.
11482 (INTERNAL_CFLAGS): Update.
11483 (LINTFLAGS): Update.
11484
9b710a42
PA
114852008-10-10 Pedro Alves <pedro@codesourcery.com>
11486
11487 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11488 whole argv from the last run, not just argv[0].
11489
5822d809
PA
114902008-09-08 Pedro Alves <pedro@codesourcery.com>
11491
11492 * regcache.c (new_register_cache): Return NULL if the register
11493 cache size isn't known yet.
11494 (free_register_cache): Avoid dereferencing a NULL regcache.
11495
74aac56f
DJ
114962008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11497
11498 * configure.srv: Merge MIPS and MIPS64.
11499
400b20f5
MR
115002008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11501
11502 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11503
677c5bb1
LM
115042008-08-18 Luis Machado <luisgpm@br.ibm.com>
11505
11506 * Makefile.in: Add required vsx dependencies.
11507
11508 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11509 Declare init_registers_powerpc_vsx32l.
11510 Declare init_registers_powerpc_vsx64l.
11511 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11512 (ppc_arch_setup): Check for VSX in hwcap.
11513 (ppc_fill_vsxregset): New function.
11514 (ppc_store_vsxregset): New function.
11515 Add new VSX entry in regset_info target_regsets.
11516
11517 * configure.srv: Add new VSX dependencies.
11518
a6f3e723
SL
115192008-08-12 Pedro Alves <pedro@codesourcery.com>
11520
11521 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11522 (remote_open): Set or clear transport_is_reliable.
11523 (putpkt_binary): Don't expect acks in noack mode.
11524 (getpkt): Don't send ack/nac in noack mode.
11525 * server.c (handle_general_set): Handle QStartNoAckMode.
11526 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11527 qSupported.
11528 (main): Reset noack_mode on every connection.
11529 * server.h (noack_mode): Declare.
11530
a417dc56
RW
115312008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11532
11533 * Makefile.in (GDBREPLAY_OBS): New variable.
11534 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11535
3221518c
UW
115362008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11537 Daniel Jacobowitz <dan@codesourcery.com>
11538
11539 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11540 (usr_store_inferior_registers): Likewise.
11541 (regsets_store_inferior_registers): Likewise.
11542
ec56be1b
PA
115432008-07-31 Rolf Jansen <rj@surtec.com>
11544 Pedro Alves <pedro@codesourcery.com>
11545
11546 * configure.ac: Check for memmem declaration.
11547 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11548 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11549 (disable_packet_qfThreadInfo): Unconditionally compile.
11550 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11551 * configure, config.in: Regenerate.
11552
2fe5e3ff
DE
115532008-07-28 Doug Kwan <dougkwan@google.com>
11554
11555 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11556 (linux_write_memory): Remove declaration of errno.
11557
836acd6d
UW
115582008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11559
11560 * linux-low.c (handle_extended_wait): Do not use "status"
11561 variable uninitialized.
11562
aeba519e
PA
115632008-07-07 Pedro Alves <pedro@codesourcery.com>
11564
11565 * server.c (handle_v_attach): Inhibit reporting dll changes.
11566
db42f210
PA
115672008-06-27 Pedro Alves <pedro@codesourcery.com>
11568
11569 * remote-utils.c (prepare_resume_reply): If requested, don't
11570 output "thread:TID" in the T stop reply.
11571
11572 * server.c (disable_packet_vCont, disable_packet_Tthread)
11573 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11574 (handle_query): If requested, disable support for qC, qfThreadInfo
11575 and qsThreadInfo.
11576 (handle_v_requests): If requested, disable support for vCont.
11577 (gdbserver_show_disableable): New.
11578 (main): Handle --disable-packet and --disable-packet=LIST.
11579
11580 * server.h (disable_packet_vCont, disable_packet_Tthread)
11581 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11582
8e4c5421
CD
115832008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11584
11585 * server.c (gdbserver_usage): Mention --version.
11586
6e23a804
DJ
115872008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11588
11589 * Makefile.in (gdbreplay.o): New rule.
11590
90aa6a40
JM
115912008-06-06 Joseph Myers <joseph@codesourcery.com>
11592
11593 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11594 message, not gdbserver.
11595
c16158bc 115962008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11597 Nathan Sidwell <nathan@codesourcery.com>
11598 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11599
11600 * acinclude.m4: Include ../../config/acx.m4.
11601 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11602 * configure, config.in: Regenerate.
11603 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11604 * server.c (gdbserver_version): Print PKGVERSION.
11605 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11606 (main): Adjust gdbserver_usage calls.
11607 * gdbreplay.c (version, host_name): Add declarations.
11608 (gdbreplay_version, gdbreplay_usage): New.
11609 (main): Accept --version and --help options.
11610
aeb75bf5
DJ
116112008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11612
11613 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11614 (arm_breakpoint_at): Handle Thumb.
11615 (the_low_target): Add comment.
11616
76b233dd
UW
116172008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11618
11619 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11620
08388c79
DE
116212008-05-09 Doug Evans <dje@google.com>
11622
a3c83fae
DE
11623 * server.h (decode_search_memory_packet): Declare.
11624 * remote-utils.c (decode_search_memory_packet): New fn.
11625 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11626 (handle_search_memory): New fn.
11627 (handle_query): Process qSearch:memory packets.
11628
bb9c3d36
UW
116292008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11630
11631 * regcache.c (registers_length): Remove.
11632 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11633 full register packet.
11634 * regcache.h (registers_length): Remove prototype.
11635 * server.h (PBUFSIZ): Define to 16384.
11636
7284e1be
UW
116372008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11638
11639 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11640 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11641 powerpc-64l.o, and powerpc-altivec64l.o.
11642 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11643 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11644 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11645 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11646 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11647 to srv_xmlfiles.
11648
11649 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11650 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11651 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11652 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11653 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11654 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11655 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11656 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11657 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11658 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11659 (clean): Update.
11660
11661 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11662 (init_registers_powerpc_32l): ... this new prototype.
11663 (init_registers_powerpc_32): Remove, replace by ...
11664 (init_registers_powerpc_altivec32l): ... this new prototype.
11665 (init_registers_powerpc_e500): Remove, replace by ...
11666 (init_registers_powerpc_e500l): ... this new prototype.
11667 (init_registers_ppc64): Remove, replace by ...
11668 (init_registers_powerpc_64l): ... this new prototype.
11669 (init_registers_powerpc_64): Remove, replace by ...
11670 (init_registers_powerpc_altivec64l): ... this new prototype.
11671 (ppc_num_regs): Set to 73.
11672 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11673 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11674 (ppc_cannot_store_register): Handle orig_r3 and trap.
11675 (ppc_arch_setup): Update init_registers_... calls.
11676 (ppc_fill_gregset): Handle orig_r3 and trap.
11677
11678 * inferiors.c (clear_inferiors): Reset current_inferior.
11679
fdc59709
PB
116802008-04-23 Paolo Bonzini <bonzini@gnu.org>
11681
889bf7c5
PA
11682 * acinclude.m4: Add override.m4.
11683 * configure: Regenerate.
fdc59709 11684
c9b2f845
UW
116852008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11686
11687 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11688 initial call to init_register_ppc64.
11689
550512b8
UW
116902008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11691
43aaf8b6
PA
11692 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11693 single powerpc*-*-linux* case.
550512b8
UW
11694 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11695
b6430ec3
UW
116962008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11697
11698 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11699 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11700 from reg_xmlfiles.
11701 * linux-ppc-low.c: Include <elf.h>.
11702 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11703 (ppc_hwcap): New global variable.
11704 (ppc_regmap): Remove __SPE__ #ifdef sections.
11705 (ppc_regmap_e500): New global variable.
11706 (ppc_cannot_store_register): Update __SPE__ special case.
11707 (ppc_get_hwcap): New function.
11708 (ppc_arch_setup): Use it to determine whether inferior supports
11709 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11710 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11711 Do not access registers if target does not support AltiVec.
11712 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11713 Do not access registers if target does not support SPE.
11714 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11715
52fa2412
UW
117162008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11717
11718 * linux-low.c (disabled_regsets, num_regsets): New.
11719 (use_regsets_p): Delete.
11720 (linux_wait_for_process): Clear disabled_regsets.
11721 (regsets_fetch_inferior_registers): Check and set it.
11722 (regsets_store_inferior_registers): Likewise.
11723 (linux_fetch_registers, linux_store_registers): Do not use
11724 use_regsets_p.
11725 (initialize_low): Allocate disabled_regsets.
11726
e28b3332
DJ
117272008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11728
11729 * Makefile.in (LIBOBJS): New.
11730 (OBS): Use LIBOBJS.
11731 (memmem.o): New rule.
11732 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11733 * configure: Regenerated.
11734
4536995d
UW
117352008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11736
11737 * server.c (handle_query): Never return "unsupported" for
11738 qXfer:features:read queries.
11739
221c031f
UW
117402008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11741
11742 * server.c (get_features_xml): Fix inverted condition.
11743 (handle_query): Always support qXfer:feature:read.
11744
ccd213ac
DJ
117452008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11746
11747 * server.c (wrapper_argv): New.
11748 (start_inferior): Handle wrapper_argv. If set, expect an extra
11749 trap.
11750 (gdbserver_usage): Document --wrapper.
11751 (main): Parse --wrapper.
11752
6fe305f7
UW
117532008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11754
11755 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11756 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11757 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11758 (ppc_set_pc): Likewise.
11759 (ppc_arch_setup): New function.
11760 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11761 of collect_register.
889bf7c5 11762 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11763
5b0a002e
UW
117642008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11765
11766 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11767 instead of linux-ppc64-low.o.
11768 * linux-ppc64-low.c: Remove file.
11769 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11770 (linux-ppc64-low.o): Remove rule.
11771
11772 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11773 (init_registers_powerpc_64): Likewise.
11774 (ppc_regmap): Conditionally define depending on __powerpc64__.
11775 (ppc_cannot_store_register): Do not special-case "fpscr" when
11776 compiled on __powerpc64__.
11777 (ppc_collect_ptrace_register): New function.
11778 (ppc_supply_ptrace_register): New function.
11779 (ppc_breakpoint): Change type to "unsigned int".
11780 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11781 (the_low_target): Conditionally provide initializers for the
889bf7c5 11782 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11783 collect_ptrace_register and supply_ptrace_register members.
11784
9b4b61c8
UW
117852008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11786
11787 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11788 * server.c (gdbserver_xmltarget): Define.
11789 (get_features_xml): Use it to replace "target.xml" and arch_string.
11790
11791 * configure.srv: Remove srv_xmltarget. Add XML files that were
11792 mentioned there to srv_xmlfiles instead. Remove conditional tests
11793 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11794 srv_xmlfiles and srv_regobj to include all possible choices.
11795 * configure.ac (srv_xmltarget): Remove.
11796 (srv_xmlfiles): Do not add "target.xml".
11797 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11798 checks for supplementary target information.
11799 * configure: Regenerate.
11800 * Makefile.in (XML_TARGET): Remove.
11801 (target.xml): Remove rule.
11802 (clean): Do not clean up target.xml.
11803 (.PRECIOUS): Do not mention target.xml.
11804
11805 * target.h (struct target_ops): Remove arch_string member.
11806 * linux-low.c (linux_arch_string): Remove.
11807 (linux_target_ops): Remove arch_string initializer.
11808 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11809 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11810 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11811 * spu-low.c (spu_arch_string): Remove.
11812 (spu_target_ops): Remove arch_string initializer.
11813 * win32-low.c (win32_arch_string): Remove.
11814 (win32_target_ops): Remove arch_string initializer.
11815 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11816 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11817 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11818
ee1a7ae4
UW
118192008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11820
11821 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11822 by collect_ptrace_register and supply_ptrace_register hooks.
11823 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11824 instead of checking for the_low_target.left_pad_xfer.
11825 (usr_store_inferior_registers): Use collect_ptrace_register callback
11826 instead of checking for the_low_target.left_pad_xfer.
11827
11828 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11829 (s390_supply_ptrace_register): Likewise.
11830 (s390_fill_gregset): Call s390_collect_ptrace_register.
11831 (the_low_target): Update.
11832
11833 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11834 (ppc_supply_ptrace_register): Likewise.
11835 (the_low_target): Update.
11836
11837 * linux-i386-low.c (the_low_target): Update.
11838 * linux-x86-64-low.c (the_low_target): Update.
11839
d61ddec4
UW
118402008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11841
11842 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11843 reg-s390.o and reg-s390x.o.
11844
11845 * linux-low.c (new_inferior): New global variable.
11846 (linux_create_inferior, linux_attach): Set it.
11847 (linux_wait_for_process): Call the_low_target.arch_setup after the
11848 target has stopped for the first time.
11849 (initialize_low): Do not call the_low_target.arch_setup.
11850
11851 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11852 (s390_set_pc): Likewise.
11853 (s390_arch_setup): New function.
11854 (the_low_target): Use s390_arch_setup as arch_setup routine.
11855
11856 * regcache.c (realloc_register_cache): New function.
11857 (set_register_cache): Call it for each existing regcache.
11858
d05b4ac3
UW
118592008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11860
11861 * server.h (init_registers): Remove prototype.
11862
11863 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11864 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11865 instead of init_registers ().
11866 * linux-arm-low.c (init_registers_arm): Add prototype.
11867 (init_registers_arm_with_iwmmxt): Likewise.
11868 (the_low_target): Add initializer for arch_setup field.
11869 * linux-cris-low.c (init_registers_cris): Add prototype.
11870 (the_low_target): Add initializer for arch_setup field.
11871 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11872 (the_low_target): Add initializer for arch_setup field.
11873 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11874 (the_low_target): Add initializer for arch_setup field.
11875 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11876 (the_low_target): Add initializer for arch_setup field.
11877 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11878 (the_low_target): Add initializer for arch_setup field.
11879 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11880 (the_low_target): Add initializer for arch_setup field.
11881 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11882 (init_registers_mips64_linux): Likewise.
11883 (the_low_target): Add initializer for arch_setup field.
11884 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11885 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11886 (the_low_target): Add initializer for arch_setup field.
11887 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11888 (init_registers_powerpc_64): Likewise.
11889 (the_low_target): Add initializer for arch_setup field.
11890 * linux-s390-low.c (init_registers_s390): Add prototype.
11891 (init_registers_s390x): Likewise.
11892 (the_low_target): Add initializer for arch_setup field.
11893 * linux-sh-low.c (init_registers_sh): Add prototype.
11894 (the_low_target): Add initializer for arch_setup field.
11895 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11896 (the_low_target): Add initializer for arch_setup field.
11897 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11898 (the_low_target): Add initializer for arch_setup field.
11899
11900 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11901 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11902 instead of init_registers ().
11903 * win32-arm-low.c (init_registers_arm): Add prototype.
11904 (the_low_target): Add initializer for arch_setup field.
11905 * win32-i386-low.c (init_registers_i386): Add prototype.
11906 (the_low_target): Add initializer for arch_setup field.
11907
11908 * spu-low.c (init_registers_spu): Add prototype.
11909 (initialize_low): Call initialie_registers_spu () instead of
11910 initialize_registers ().
11911
fd96d250
PA
119122008-02-19 Pedro Alves <pedro@codesourcery.com>
11913
11914 * server.c (handle_v_requests): When handling the vRun and vAttach
11915 packets, if already debugging a process, don't kill it. Return an
11916 error instead.
11917
d41b6bb4
DJ
119182008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11919
11920 * server.c (handle_query): Correct length check.
11921
5ac588cf
PA
119222008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11923
11924 * win32-low.c (do_initial_child_stuff): Add process handle
11925 parameter. Set current_process_handle and current_process_id from the
11926 parameters. Clear globals.
11927 (win32_create_inferior): Don't set current_process_handle and
11928 current_process_id here. Instead pass them on the call to
11929 do_initial_child_stuff.
11930 (win32_attach): Likewise.
11931 (win32_clear_inferiors): New.
11932 (win32_kill): Don't close the current process handle or the
11933 current thread handle here. Instead call win32_clear_inferiors.
11934 (win32_detach): Don't open a new handle to the process. Call
11935 win32_clear_inferiors.
11936 (win32_join): Don't rely on current_process_handle; open a new
11937 handle using the process id.
11938 (win32_wait): Call win32_clear_inferiors when the inferior process
11939 has exited.
11940
ecd7ecbc
DJ
119412008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11942
11943 * server.c (monitor_show_help): Add "exit".
11944
1525d545
MG
119452008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11946
ecd7ecbc 11947 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11948 (clean): Add reg-xtensa.c.
11949 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11950 * configure.srv (xtensa*-*-linux*) New target.
11951 * linux-xtensa-low.c: New.
11952 * xtensa-xtregs.c: New.
1525d545 11953
59a016f0
PA
119542008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11955
11956 * hostio.c: Don't include errno.h.
11957 (errno_to_fileio_errno): Move to hostio-errno.
11958 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11959 error number outputting to the target->hostio_last_error callback.
11960 (hostio_packet_error): Use FILEIO_EINVAL directly.
11961 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11962 calls to hostio_error.
11963 * hostio-errno.c: New.
11964 * server.h (hostio_last_error_from_errno): Declare.
11965 * target.h (target_ops): Add hostio_last_error member.
11966 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11967 as hostio_last_error handler.
889bf7c5 11968 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11969 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11970 (wince_hostio_last_error): New functions.
11971 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11972 as hostio_last_error handler.
11973 (win32_target_ops) [!_WIN32_WCE]: Register
11974 hostio_last_error_from_errno as hostio_last_error handler.
11975 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11976 (hostio-errno.o): New rule.
11977 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11978 * configure.srv (srv_hostio_err_objs): New variable. Default to
11979 hostio-errno.o.
11980 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11981 * configure: Regenerate.
11982
2d717e4f
DJ
119832008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11984
11985 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11986 (linux_kill, linux_detach): Clean up the process list.
11987 * remote-utils.c (remote_open): Improve port number parsing.
11988 (putpkt_binary, input_interrupt): Only send interrupts if the target
11989 is running.
11990 * server.c (extended_protocol): Make static.
11991 (attached): Define earlier.
11992 (exit_requested, response_needed, program_argv): New variables.
11993 (target_running): New.
11994 (start_inferior): Clear attached here.
11995 (attach_inferior): Set attached here.
11996 (require_running): Define.
11997 (handle_query): Use require_running and target_running. Implement
11998 "monitor exit".
11999 (handle_v_attach, handle_v_run): New.
12000 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12001 (gdbserver_usage): Update.
12002 (main): Redo argument parsing. Handle --debug and --multi. Handle
12003 --attach along with other options or after the port. Save
12004 program_argv. Support no initial program. Resynchronize
12005 communication with GDB after an error. Handle "monitor exit".
12006 Use require_running and target_running. Always allow the extended
12007 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12008 restart in extended mode.
12009 * README: Refer to the GDB manual. Update --attach usage.
12010
7407e2de
AS
120112007-12-20 Andreas Schwab <schwab@suse.de>
12012
12013 * linux-low.c (STACK_SIZE): Define.
12014 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12015 (linux_test_for_tracefork): Likewise.
12016
b65d95c5
DJ
120172007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12018
12019 * linux-low.c (linux_wait_for_event): Update messages. Do not
12020 reinsert auto-delete breakpoints.
12021 * mem-break.c (struct breakpoint): Change return type of handler to
12022 int.
12023 (set_breakpoint_at): Update handler type.
12024 (reinsert_breakpoint_handler): Return 1 instead of calling
12025 delete_breakpoint.
12026 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12027 setting a new one.
12028 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12029 * mem-break.h (set_breakpoint_at): Update handler type.
12030 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12031 * win32-low.c (auto_delete_breakpoint): New.
12032 (get_child_debug_event): Use it.
12033
4e799345
DJ
120342007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12035
12036 * configure.ac: Check for pread and pwrite.
12037 * hostio.c (handle_pread): Fall back to lseek and read.
12038 (handle_pwrite): Fall back to lseek and write.
12039 * config.in, configure: Regenerated.
12040
27524b67
DJ
120412007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12042
12043 * server.c (myresume): Add own_buf argument.
12044 (main): Update calls.
12045
a20d5e98
DJ
120462007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12047
12048 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12049 * remote-utils.c (remote_open): Do not call disable_async_io.
12050 (block_async_io): Delete.
12051 (unblock_async_io): Make static.
12052 (initialize_async_io): New.
12053 * server.c (handle_v_cont): Handle async I/O here.
12054 (myresume): Likewise. Move other common resume tasks here...
12055 (main): ... from here. Call initialize_async_io. Disable async
12056 I/O before the main loop.
12057 * server.h (initialize_async_io): Declare.
12058 (block_async_io, unblock_async_io): Delete prototypes.
12059 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12060
b79d787e
DJ
120612007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12062
12063 * remote-utils.c (readchar): Allow binary data in received messages.
12064
d97903b2
PA
120652007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12066
12067 * win32-low.c (attaching): New global.
12068 (win32_create_inferior): Clear the `attaching' global.
12069 (win32_attach): Set the `attaching' global.
12070 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12071 attaching. Only set a breakpoint at the entry point if not
12072 attaching.
12073
311de423
PA
120742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12075
12076 * server.c (main): Don't report dll events on the initial
12077 connection on attaches.
12078
6c2d16d2
PA
120792007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12080
12081 * server.c (main): Relax numerical bases supported for the pid of
12082 the --attach command line argument.
12083
5ca906e6
PA
120842007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12085
12086 * win32-low.c (win32_attach): Call OpenProcess before
12087 DebugActiveProcess, not after. Add last error output to error
12088 call.
12089
9c6c8194
PA
120902007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12091
12092 * win32-low.c (win32_get_thread_context)
12093 (win32_set_thread_context): New functions.
12094 (thread_rec): Use win32_get_thread_context.
12095 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12096 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12097 field.
12098
4d5d1aaa
PA
120992007-12-03 Leo Zayas
12100 Pedro Alves <pedro_alves@portugalmail.pt>
12101
12102 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12103 global variables.
12104 (child_add_thread): Minor cleanup.
12105 (child_continue): Resume artificially suspended threads before
12106 calling ContinueDebugEvent.
12107 (suspend_one_thread): New.
12108 (fake_breakpoint_event): New.
12109 (get_child_debug_event): Change return type to int. Check here if
12110 gdb sent an interrupt request. If a soft interrupt was requested,
12111 fake a breakpoint event. Return 0 if there is no event to handle,
12112 and 1 otherwise.
12113 (win32_wait): Don't check here if gdb sent an interrupt request.
12114 Ensure there is a valid event to handle.
12115 (win32_request_interrupt): Add soft interruption method as last
12116 resort.
12117
c436e841
PA
121182007-12-03 Leo Zayas
12119 Pedro Alves <pedro_alves@portugalmail.pt>
12120
12121 * win32-low.h (win32_thread_info): Add descriptions to the
12122 structure members. Replace `suspend_count' counter by a
12123 `suspended' flag.
12124 * win32-low.c (thread_rec): Update condition of when to get the
12125 context from the inferior. Rely on ContextFlags being set if it
12126 has already been retrieved. Only suspend the inferior thread if
12127 we haven't already. Warn if that fails.
12128 (continue_one_thread): s/suspend_count/suspended/. Only call
12129 ResumeThread once. Warn if that fails.
12130
e7b5fa67
PA
121312007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12132
12133 * win32-low.c (win32_wait): Don't read from the inferior when it
12134 has already exited.
12135
a385171d
PA
121362007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12137
12138 * Makefile.in (win32_low_h): New variable.
12139 (win32-low.o): Add dependency on $(win32_low_h).
12140 (win32-arm-low.o, win32-i386-low.o): New rules.
12141
f80c84b3
DJ
121422007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12143
12144 * hostio.c: Correct copyright year.
12145
a6b151f1
DJ
121462007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12147
12148 * Makefile.in (OBS): Add hostio.o.
12149 (hostio.o): New rule.
12150 * server.h (handle_vFile): Declare.
12151 * hostio.c: New file.
12152 * server.c (handle_v_requests): Take packet_len and new_packet_len
12153 for binary packets. Call handle_vFile.
12154 (main): Update call to handle_v_requests.
12155
f9387fc3
DJ
121562007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12157
12158 * linux-low.c: Include <sched.h>.
12159
51c2684e
DJ
121602007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12161
12162 * linux-low.c (linux_tracefork_grandchild): New.
12163 (linux_tracefork_child): Use clone.
12164 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12165
75f83163
JB
121662007-10-31 Joel Brobecker <brobecker@adacore.com>
12167
12168 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12169
da5898ce
DJ
121702007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12171
12172 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12173
24a09b5f
DJ
121742007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12175
12176 * inferiors.c (change_inferior_id): Delete.
12177 (add_pid_to_list, pull_pid_from_list): New.
12178 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12179 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12180 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12181 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12182 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12183 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12184 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12185 (using_threads): Always set to 1.
12186 (handle_extended_wait): New.
12187 (add_process): Do not set TID.
12188 (linux_create_inferior): Set must_set_ptrace_flags.
12189 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12190 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12191 (linux_thread_alive): Rename TID argument to LWPID.
12192 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12193 (linux_wait_for_event): Do not use TID or check using_threads. Update
12194 call to dead_thread_notify. Call handle_extended_wait.
12195 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12196 (send_sigstop): Delete sigstop_sent.
12197 (wait_for_sigstop): Avoid TID.
12198 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12199 (linux_test_for_tracefork): New.
12200 (linux_lookup_signals): Use thread_db_active and
12201 linux_supports_tracefork_flag.
12202 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12203 * linux-low.h (get_process_thread): Avoid TID.
12204 (struct process_ifo): Move thread_known and tid to the end. Remove
12205 sigstop_sent.
12206 (linux_attach_lwp, thread_db_init): Update prototypes.
12207 * server.h (change_inferior_id): Delete prototype.
12208 (add_pid_to_list, pull_pid_from_list): New prototypes.
12209 * thread-db.c (thread_db_use_events): New.
12210 (find_first_thread): Rename to...
12211 (find_one_thread): ...this. Update callers and messages. Do not
12212 call fatal. Check thread_db_use_events. Do not call
12213 change_inferior_id or new_thread_notify.
12214 (maybe_attach_thread): Update. Do not call new_thread_notify.
12215 (thread_db_init): Set thread_db_use_events. Check use_events.
12216 * utils.c (fatal, warning): Correct message prefix.
12217
30ed0a8f
DJ
122182007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12219
12220 * Makefile.in (clean): Remove new files.
12221 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12222 (powerpc-64.o, powerpc-64.c): New rules.
12223 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12224 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12225 with SPE.
12226 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12227 SPE targets.
12228 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12229 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12230 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12231 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12232 (target_regsets): Add AltiVec and SPE register sets.
12233 * configure.ac: Check for AltiVec and SPE.
12234 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12235 (ppc_fill_vrregset, ppc_store_vrregset): New.
12236 (target_regsets): Add AltiVec register set.
12237 * configure: Regenerated.
12238
fd462a61
DJ
122392007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12240
12241 * linux-low.c (O_LARGEFILE): Define.
12242 (linux_read_memory): Use /proc/PID/mem.
12243 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12244 * configure, config.in: Regenerated.
12245
69f223ed
DJ
122462007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12247
12248 * linux-low.c (linux_wait_for_event): Do not pass signals while
12249 single-stepping.
12250
aec18585
PA
122512007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12252
12253 * win32-low.c (create_process): New.
12254 (win32_create_inferior): Use create_process instead of
12255 CreateProcess. If create_process failed retry appending an ".exe"
12256 suffix. Store the GetLastError result immediatelly after
12257 create_process calls and use it on the call to error.
12258
34d86ddd
PA
122592007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12260
12261 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12262
5a0e3bd0
JB
122632007-08-23 Joel Brobecker <brobecker@adacore.com>
12264
12265 * configure.ac: Switch license to GPLv3.
12266
f88c79e6
MS
122672007-08-01 Michael Snyder <msnyder@access-company.com>
12268
12269 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12270
6b3d9b83
PA
122712007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12272
12273 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12274 typedef.
12275 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12276 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12277 CloseToolhelp32Snapshot.
12278 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12279 CloseToolhelp32Snapshot.
12280
c588c53c
MS
122812007-07-27 Michael Snyder <michael.snyder@access-company.com>
12282
12283 * server.c (main): Check for inferior exit before main loop.
12284
aa0403d9
PA
122852007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12286
12287 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12288 instead of on tmp_desc.
12289
255e7678
DJ
122902007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12291 Daniel Jacobowitz <dan@codesourcery.com>
12292
12293 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12294 (add_thread): Minor cleanups.
12295 (clear_inferiors): Move lower in the file. Clear the DLL
12296 list.
12297 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12298 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12299 (xml_escape_text): New.
12300 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12301 for qSupported.
12302 (handle_v_cont): Report errors.
12303 (gdbserver_version): Update.
12304 (main): Correct size of own_buf. Do not report initial DLL events.
12305 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12306 (unloaded_dll, xml_escape_text): New.
12307 * win32-low.c (enum target_waitkind): Update comments.
12308 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12309 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12310 (win32_EnumProcessModules, win32_GetModuleInformation)
12311 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12312 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12313 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12314 (win32_Module32First, win32_Module32Next, load_toolhelp)
12315 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12316 (get_child_debug_event): Handle DLL events.
12317 (win32_wait): Likewise.
12318
0d37add9
DJ
123192007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12320
12321 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12322 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12323
45e2715e
PA
123242007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12325
12326 * win32-low.c (handle_output_debug_string): Ignore event if not
12327 waiting.
12328
c5674cf1
PA
123292007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12330
12331 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12332
2bbe3cc1
DJ
123332007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12334
12335 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12336
ae13219e
DJ
123372007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12338
12339 * inferiors.c (change_inferior_id): Add comment.
12340 * linux-low.c (check_removed_breakpoint): Add an early
12341 prototype. Improve debug output.
12342 (linux_attach): Doc update.
12343 (linux_detach_one_process, linux_detach): Clean up before releasing
12344 each process.
12345 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12346 * linux-low.h (struct process_info): Doc improvement.
12347 * mem-break.c (delete_all_breakpoints): New.
12348 * mem-break.h (delete_all_breakpoints): New prototype.
12349 * thread-db.c (find_first_thread): New.
12350 (thread_db_create_event): Call it instead of
12351 thread_db_find_new_threads. Clean up unused variables.
12352 (maybe_attach_thread): Remove first thread handling.
12353 (thread_db_find_new_threads): Use find_first_thread.
12354 (thread_db_get_tls_address): Likewise.
12355
4105de34
DJ
123562007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12357
12358 * thread-db.c (thread_db_find_new_threads): Add prototype.
12359 (thread_db_create_event): Check for the main thread before adding
12360 a new thread.
12361 (maybe_attach_thread): Only enable event reporting if TID == 0.
12362 (thread_db_get_tls_address): Check for new threads.
12363
2b876972
DJ
123642007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12365
12366 * linux-low.c (linux_create_inferior): Try execv before execvp.
12367 * spu-low.c (spu_create_inferior): Likewise.
12368
7a245884
DJ
123692007-06-13 Mike Frysinger <vapier@gentoo.org>
12370
12371 * linux-low.c (linux_create_inferior): Change execv to execvp.
12372 * spu-low.c (spu_create_inferior): Likewies.
12373
117ce543
DJ
123742007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12375
12376 * Makefile.in (clean): Clean new files instead of deleted ones.
12377 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12378 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12379 rules.
12380 * configure.srv: Specify XML files and new regformats for MIPS and
12381 MIPS64 GNU/Linux.
12382 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12383 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12384 an entry for the restart register.
12385 (mips_cannot_fetch_register, mips_cannot_store_register)
12386 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12387 register names to match the XML descriptions.
12388 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12389 restart register instead of $0.
12390
0e7f50da
UW
123912007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12392 Markus Deuling <deuling@de.ibm.com>
12393
12394 * remote-utils.c (decode_xfer_write): New function.
12395 * server.h (decode_xfer_write): Add prototype.
12396 * server.c (handle_query): Add PACKET_LEN argument. Support
12397 qXfer:spu:read and qXfer:spu:write packets.
12398 (main): Pass packet_len to handle_query.
12399 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12400 * target.h (target_ops): Add qxfer_spu.
12401
374c1d38
UW
124022007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12403
12404 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12405 accessing non-seekable spufs files.
12406
bb63802a
UW
124072007-05-16 Markus Deuling <deuling@de.ibm.com>
12408
889bf7c5 12409 * server.c (handle_query): Add reply for qC packet.
bb63802a 12410
7390519e
PA
124112007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12412 Leo Zayas <lerele@champenstudios@com>
12413
12414 * server.h (check_remote_input_interrupt_request): New function.
12415 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12416 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12417 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12418 (check_remote_input_interrupt_request): New function.
12419 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12420 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12421 winapi_GenerateConsoleCtrlEvent): New typedefs.
12422 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12423 to 250 ms.
12424 (win32_wait): Check for remote interrupt request
12425 with check_remote_input_interrupt_request.
12426 (win32_request_interrupt): New function.
12427 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12428
34b34921
PA
124292007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12430
12431 * win32-low.c (debug_registers_changed,
12432 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12433 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12434 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12435 (thread_rec): Get context using the low target.
12436 (child_add_thread): Call thread_added on the low target,
12437 which does the same thing.
12438 (regptr): Delete.
12439 (do_initial_child_stuff): Remove debug registers references.
12440 Set context using the low target. Resume threads after
12441 setting the contexts.
12442 (child_continue): Remove dead variable. Remove debug
12443 registers references.
12444 (child_fetch_inferior_registers): Go through the low target.
12445 (do_child_store_inferior_registers): Remove.
12446 (child_store_inferior_registers): Go through the low target.
12447 (win32_resume): Remove debug registers references.
12448 Set context using the low target.
12449 (handle_exception): Change return type to void. Don't record
12450 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12451 first chance exception.
889bf7c5 12452 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12453 goto loop. Always return after waiting for debug event.
12454 (win32_wait): Convert to switch statement. Handle spurious
12455 events.
12456
12457 * win32-i386-low.c (debug_registers_changed,
12458 debug_registers_used): New.
12459 (initial_stuff): Rename to ...
12460 (i386_initial_stuff): ... this. Clear debug registers
12461 state variables.
12462 (store_debug_registers): Delete.
12463 (i386_get_thread_context): New.
12464 (load_debug_registers): Delete.
12465 (i386_set_thread_context): New.
12466 (i386_thread_added): New.
12467 (single_step): Rename to ...
12468 (i386_single_step): ... this.
12469 (do_fetch_inferior_registers): Rename to ...
12470 (i386_fetch_inferior_register): ... this.
12471 (i386_store_inferior_register): New.
12472 (the_low_target): Adapt to new interface.
12473
12474 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12475 (arm_get_thread_context): New.
12476 (arm_set_thread_context): New.
12477 (regptr): New.
12478 (do_fetch_inferior_registers): Rename to ...
12479 (arm_fetch_inferior_register): ... this.
12480 (arm_store_inferior_register): New.
12481 (arm_wince_breakpoint): Reimplement as unsigned long.
12482 (arm_wince_breakpoint_len): Define.
12483 (the_low_target): Adapt to new interface.
12484
12485 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12486 load_debug_registers. Add get_thread_context, set_thread_context,
12487 thread_added and store_inferior_register. Rename
12488 fetch_inferior_registers to fetch_inferior_register.
12489 (regptr): Remove declaration.
12490
dd6953e1
PA
124912007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12492
12493 * linux-low.c (linux_detach): Change return type to int. Return 0.
12494 * spu-low.c (spu_detach): Likewise.
12495
444d6139
PA
124962007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12497
12498 * target.h (target_ops): Change return type of detach to int.
12499 Add join.
12500 (join_inferior): New.
12501 * server.c (main): Don't skip detach support on mingw32.
12502 If the inferior doesn't support detaching return error.
12503 Call join_inferior instead of using waitpid.
12504 * linux-low.c (linux_join): New.
12505 (linux_target_op): Add linux_join.
12506 * spu-low.c (spu_join): New.
12507 (spu_target_ops): Add spu_join.
12508 * win32-low.c (win32_detach): Adapt to new interface.
12509 Reopen current_process_handle before detaching. Issue a child
12510 resume before detaching.
12511 (win32_join): New.
12512 (win32_target_op): Add win32_join.
12513
1d5315fe
PA
125142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12515
12516 * win32-low.c (win32-attach): Fix return value.
12517 * target.h (target_ops): Describe ATTACH return values.
12518
bf914831
PA
125192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12520
12521 * win32-low.c (GETPROCADDRESS): Define.
12522 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12523 (winapi_DebugSetProcessKillOnExit): Likewise.
12524 (win32_create_inferior): Force usage of ansi CreateProcessA.
12525 (win32_attach): Use GETPROCADDRESS.
12526 (win32_detach): Likewise.
12527
f72f3e60
PA
125282007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12529
12530 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12531
ed50f18f
PA
125322007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12533
12534 * win32-low.c: Commit leftover changes from 2007-03-29.
12535
0c2ead7e
DJ
125362007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12537
12538 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12539 fields short instead of int. Add explicit padding.
12540 (i387_cache_to_fsave): Remove unnecessary casts.
12541 (i387_fsave_to_cache): Doc fix.
12542 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12543
73725ff3
DJ
125442007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12545
12546 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12547 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12548
d99f33d8
PA
125492007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12550
12551 * configure.srv (arm*-*-mingw32ce*): Move near the other
12552 arm targets.
12553
68070c10
PA
125542007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12555
2482afc6 12556 * configure.ac: Add errno checking.
68070c10
PA
12557 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12558 sys/file.h and malloc.h.
12559 (AC_CHECK_DECLS): Add perror.
12560 (srv_mingwce): Handle.
2482afc6 12561 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12562 win32-i386-low.o to srv_tgtobj.
12563 (i[34567]86-*-mingw*): Likewise.
12564 (arm*-*-mingw32ce*): Add case.
12565 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12566 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12567 [__MINGW32CE__] (strerror): New function.
12568 [__MINGW32CE__] (errno): Define to GetLastError.
12569 [__MINGW32CE__] (COUNTOF): New macro.
12570 (remote_open): Remove extra close call.
12571 * mem-break.c (delete_breakpoint_at): New function.
12572 * mem-break.h (delete_breakpoint_at): Declare.
12573 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12574 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12575 [USE_WIN32API] (read, write): Add char* casts.
12576 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12577 * server.h: Include wincecompat.h on Windows CE.
12578 [HAVE_ERRNO_H]: Check.
12579 (perror): Declare if not declared.
12580 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12581 (perror_with_name): Remove errno declaration.
12582 * wincecompat.h: New.
12583 * wincecompat.c: New.
12584 * win32-low.h: New.
12585 * win32-arm-low.c: New.
12586 * win32-i386-low.c: New.
12587 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12588 (OUTMSG2): Make it safe.
12589 (_T): New macro.
12590 (COUNTOF): New macro.
12591 (NUM_REGS): Get it from the low target.
12592 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12593 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12594 (thread_rec): Let low target handle debug registers.
12595 (child_add_thread): Likewise.
12596 (child_init_thread_list): Likewise.
12597 (continue_one_thread): Likewise.
12598 (regptr): New.
12599 (do_child_fetch_inferior_registers): Move to ...
12600 * win32-i386-low.c: ... here, and rename to ...
12601 (do_fetch_inferior_registers): ... this.
889bf7c5 12602 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12603 Go through the low target.
12604 (do_child_store_inferior_registers): Use regptr.
12605 (strwinerror): New function.
12606 (win32_create_inferior): Handle Windows CE.
12607 Use strwinerror instead of strerror on Windows error
12608 codes. Add program to the error output.
12609 Don't close the main thread handle on Windows CE.
12610 (win32_attach): Use coredll.dll on Windows CE.
12611 (win32_kill): Close current process and current
12612 thread handles.
12613 (win32_detach): Use coredll.dll on Windows CE.
12614 (win32_resume): Let low target handle debug registers, and
12615 step request.
12616 (handle_exception): Add/Remove initial breakpoint. Avoid
12617 non-existant WSTOPSIG on Windows CE.
12618 (win32_read_inferior_memory): Cast to remove warning.
12619 (win32_arch_string): Go through the low target.
12620 (initialize_low): Call set_breakpoint_data with the low
12621 target's breakpoint.
12622 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12623 FOP_REGNUM, mappings): Move to ...
12624 * win32-i386-low.c: ... here.
12625 * win32-low.c (win32_thread_info): Move to ...
12626 * win32-low.h: ... here.
12627 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12628 win32-arm-low.c and wincecompat.c.
12629 (all:): Add $EXEEXT.
12630 (install-only:): Likewise.
12631 (gdbserver:): Likewise.
12632 (gdbreplay:): Likewise.
12633 * config.in: Regenerate.
12634 * configure: Regenerate.
12635
41093d81
PA
126362007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12637
12638 * win32-low.c: Rename typedef thread_info to
12639 win32_thread_info throughout.
12640
544afa54
PA
126412007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12642
12643 * win32-i386-low.c: Rename to ...
12644 * win32-low.c: ... this.
12645 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12646 * Makefile.in: Likewise.
12647
bce7165d
PA
126482007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12649
12650 * remote-utils.c (monitor_output): Constify msg parameter.
12651 * server.h (monitor_output): Likewise.
12652 * win32-i386-low.c (handle_output_debug_string): New.
12653 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12654 handle_output_debug_string.
12655 (get_child_debug_event): Likewise.
12656
506c7aa0
DJ
126572007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12658
12659 * server.c (main): Correct strtoul check.
12660
42c81e2a
DJ
126612007-03-27 Jon Ringle <jon@ringle.org>
12662
12663 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12664
9453113a
DJ
126652007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12666
12667 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12668
64a69107
DJ
126692007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12670
12671 * terminal.h: Check HAVE_SGTTY_H.
12672
126732007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12674
12675 * remote-utils.c (remote_open): Print out the assigned port number.
12676
c74d0ad8
DJ
126772007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12678
12679 * remote-utils.c (monitor_output): New function.
12680 * server.c (debug_threads): Define here.
12681 (monitor_show_help): New function.
12682 (handle_query): Handle qRcmd.
12683 (main): Do not handle 'd' packet.
12684 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12685 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12686 of debug_threads.
12687
de7c3b4a
PA
126882007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12689
12690 * Makefile.in (EXEEXT): New.
12691 (clean): Use $(EXEEXT).
12692
ef57601b
PA
126932007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12694
12695 * target.h (target_ops): Rename send_signal to request_interrupt,
12696 and remove enum target_signal parameter.
12697 * linux-low.c (linux_request_interrupt): Rename from
12698 linux_send_signal, and always send SIGINT.
12699 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12700 and always send SIGINT.
12701 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12702 of send_signal.
12703 (input_interrupt): Likewise.
12704
820f2bda
PA
127052007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12706
12707 * server.c (get_features_xml): Check if target implemented
12708 arch_string.
12709 * win32-i386-low.c (win32_arch_string): New.
12710 (win32_target_ops): Add win32_arch_string as arch_string member.
12711
ab39bf24
UW
127122007-02-22 Markus Deuling <deuling@de.ibm.com>
12713
12714 * spu-low.c (spu_arch_string): New.
12715 (spu_target_ops): Add spu_arch_string.
12716
61ff6e04
DJ
127172007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12718
12719 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12720 * configure.ac: Do not check for terminal.h.
12721 * configure, config.in: Regenerated.
12722
fb1e4ffc
DJ
127232007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12724
12725 * Makefile.in (OBS): Add $(XML_BUILTIN).
12726 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12727 (clean): Update.
12728 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12729 (arm-with-iwmmxt.c): New.
12730 * config.in, configure: Regenerate.
12731 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12732 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12733 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12734 (arm*-*-linux*): Add iWMMXt and regset support.
12735 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12736 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12737 (arm_store_wmmxregset, target_regsets): New.
12738 * server.c (get_features_xml): Take annex argument. Check builtin
12739 XML documents.
12740 (handle_query): Handle multiple annexes.
12741
0f48aa01
DJ
127422007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12743
12744 * remote-utils.c [USE_WIN32API] (read, write): Define.
12745 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12746 write.
12747
23181151
DJ
127482007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12749
12750 * linux-i386-low.c (the_low_target): Set arch_string.
12751 * linux-x86-64-low.c (the_low_target): Likewise.
12752 * linux-low.c (linux_arch_string): New.
12753 (linux_target_ops): Add it.
12754 * linux-low.h (struct linux_target_ops): Add arch_string.
12755 * server.c (write_qxfer_response): Use const void * for DATA.
12756 (get_features_xml): New.
12757 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12758 * target.h (struct target_ops): Add arch_string method.
12759
9d606399
DJ
127602007-01-03 Denis Pilat <denis.pilat@st.com>
12761 Daniel Jacobowitz <dan@codesourcery.com>
12762
12763 * linux-low.c (linux_kill): Handle being called with no threads.
12764 * win32-i386-low.c (win32_kill): Likewise.
12765 (get_child_debug_event): Clear current_process_handle.
12766
127672006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12768 Daniel Jacobowitz <dan@codesourcery.com>
12769
12770 * remote-utils.c (remote_open): Check the type of specified
12771 serial port devices before opening them.
12772 * server.c (main): Kill the inferior if an error occurs during
12773 the first remote_open.
12774
a5e13d24
DJ
127752006-12-05 Markus Deuling <deuling@de.ibm.com>
12776
12777 * README: Update supported targets.
12778
186947f7
DJ
127792006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12780
12781 * Makefile.in (clean): Remove reg-mips64.c.
12782 (reg-mips64.c, reg-mips64.o): New rules.
12783 * configure.srv: Handle mips64. Include regset support for mips.
12784 * linux-mips-low.c (union mips_register): New.
12785 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12786 (mips_breakpoint, mips_breakpoint_at): Use int.
12787 (mips_collect_register, mips_supply_register)
12788 (mips_collect_register_32bit, mips_supply_register_32bit)
12789 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12790 (mips_store_fpregset, target_regsets): New.
12791 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12792
a13e2c95
UW
127932006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12794
12795 * configure.srv: Add target "spu*-*-*".
12796 * Makefile.in (clean): Remove reg-spu.c.
12797 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12798 * spu-low.c: New file.
12799
cb7283db
DJ
128002006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12801
12802 * configure.ac: Correct td_thr_tls_get_addr test.
12803 * configure: Regenerated.
12804
89be2091
DJ
128052006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12806
12807 * linux-low.c (linux_wait_for_event): Reformat. Use the
12808 pass_signals array.
12809 * remote-utils.c (decode_address_to_semicolon): New.
12810 * server.c (pass_signals, handle_general_set): New.
12811 (handle_query): Mention QPassSignals for qSupported.
12812 (main): Call handle_general_set.
12813 * server.h (pass_signals, decode_address_to_semicolon): New.
12814
000ef4f0
DJ
128152006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12816
12817 * server.c (handle_query): Correct error handling for read_auxv.
12818
b7149293
UW
128192005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12820
12821 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12822 and srv_linux_thread_db to yes.
12823 * linux-s390-low.c (s390_fill_gregset): New function.
12824 (target_regsets): Define data structure.
12825
dae5f5cf
DJ
128262006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12827
12828 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12829 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12830 * config.in, configure: Regenerated.
12831 * inferiors.c (gdb_id_to_thread): New function.
12832 (gdb_id_to_thread_id): Use it.
12833 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12834 * linux-low.h (struct process_info): Add th member.
12835 (thread_db_get_tls_address): New prototype.
12836 * remote-utils.c (decode_address): Make non-static.
12837 * server.c (handle_query): Handle qGetTLSAddr.
12838 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12839 * target.h (struct target_ops): Add get_tls_address.
12840 * thread-db.c (maybe_attach_thread): Save the thread handle.
12841 (thread_db_get_tls_address): New.
12842
32ca6d61
DJ
128432006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12844
12845 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12846 (linux_resume_one_process): Take a siginfo_t *. Update all
12847 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12848 (struct pending_signals): Add a siginfo_t.
12849 (linux_wait_for_process): Always set last_status.
12850 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12851 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12852 * linux-low.h (struct process_info): Add last_status.
12853
5ffff7c1
DJ
128542006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12855
12856 * remote-utils.c (try_rle): New function.
12857 (putpkt_binary): Use it.
12858
8695c747
DJ
128592006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12860
12861 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12862 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12863 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12864 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12865 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12866 point registers.
12867
290fadea
RS
128682006-08-08 Richard Sandiford <richard@codesourcery.com>
12869
12870 * server.c (terminal_fd): New variable.
12871 (old_foreground_pgrp): Likewise.
12872 (restore_old_foreground_pgrp): New function.
12873 (start_inferior): Record the terminal file descriptor in terminal_fd
12874 and its original foreground group in old_foreground_pgrp. Register
12875 restore_old_foreground_pgrp with atexit().
12876
9f2e1e63
DJ
128772006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12878
12879 * server.c (handle_query): Correct qPart to qXfer.
12880
b80864fb
DJ
128812006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12882
12883 * configure.ac: Check for more headers which are missing on
12884 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12885 * configure.srv: Add Cygwin and mingw32.
12886 * remote-utils.c: Don't include headers unconditionally which
12887 are missing on mingw32. Include <winsock.h> for mingw32.
12888 (remote_open): Adjust for mingw32 support. Flush
12889 standard error after writing to it.
12890 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12891 (unblock_async_io, enable_async_io, disable_async_io)
12892 (readchar, getpkt): Update for Winsock support.
12893 (prepare_resume_reply): Expect a protocol signal number.
12894 * server.c: Disable <sys/wait.h> on mingw32.
12895 (start_inferior): Adjust for mingw32 support. Flush
12896 standard error after writing to it.
12897 (attach_inferior): Likewise. Use protocol signal
12898 numbers.
12899 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12900 and names.
12901 * win32-i386-low.c: New file.
12902 * Makefile.in (XM_CLIBS): Set.
12903 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12904 (win32-i386-low.o): New dependency rule.
12905 * linux-low.c (linux_wait): Use target signal numbers.
12906 * target.h (struct target_ops): Doc fix.
12907 * server.h (target_signal_to_name): New prototype.
12908 * gdbreplay.c: Don't include headers unconditionally which
12909 are missing on mingw32. Include <winsock.h> for mingw32.
12910 (remote_close, remote_open): Adjust for Winsock support.
12911 * configure, config.in: Regenerated.
12912
0876f84a
DJ
129132006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12914
12915 * server.c (decode_xfer_read, write_qxfer_response): New.
12916 (handle_query): Take a packet length argument. Handle
12917 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12918 the qSupported response.
12919 (main): Update call to handle_query.
12920
01f9e8fa
DJ
129212006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12922
12923 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12924 (putpkt_binary): Renamed from putpkt and adjusted for binary
12925 data.
12926 (putpkt): New wrapper for putpkt_binary.
12927 (readchar): Don't mask off the high bit.
12928 (decode_X_packet): New function.
12929 * server.c (main): Call putpkt_binary if a handler sets the packet
12930 length. Save the length of the incoming packet. Handle 'X'.
12931 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12932
be2a5f71
DJ
129332006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12934
12935 * server.c (handle_query): Handle qSupported.
12936
ea025f5f
DJ
129372006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12938
12939 * remote-utils.c (all_symbols_looked_up): New variable.
12940 (look_up_one_symbol): Check it.
12941 * server.h (look_up_one_symbol): New declaration.
12942 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12943
9308fc88
DJ
129442006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12945
12946 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12947 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12948 (PTRACE_GET_THREAD_AREA): Define.
12949 (ps_get_thread_area): New function.
12950
52fb6437
NS
129512006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12952
12953 * configure.srv (m68k*-*-uclinux*): New target.
12954 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12955 (linux_resume_one_process): Remove extraneous cast.
12956 (linux_read_offsets): New.
12957 (linux_target_op): Add linux_read_offsets on mmuless systems.
12958 * server.c (handle_query): Add qOffsets logic.
12959 * target.h (struct target_ops): Add read_offsets.
12960
21b0f40c
DJ
129612006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12962
12963 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12964 (PTRACE_GET_THREAD_AREA): Define.
12965 (ps_get_thread_area): New function.
12966 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12967 (linux-x86-64-low.o): Update.
12968
0050a760
DJ
129692006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12970
12971 * configure.ac: Remove checks for prfpregset_t.
12972 * gdb_proc_service.h: New file.
12973 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12974 new "gdb_proc_service.h".
12975 * proc-service.c: Likewise.
12976 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12977 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12978 * Makefile.in (gdb_proc_service_h): Updated.
12979 * configure, config.in: Regenerated.
12980
b92a518e
DJ
129812006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12982
12983 * remote-utils.c (prepare_resume_reply): Move declaration
12984 of gdb_id_from_wait to the top of the block.
12985
545587ee
DJ
129862006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
12987
12988 * linux-low.c (regsets_store_inferior_registers): Read the regset
12989 from the target before filling it.
12990
9db87ebd
DJ
129912006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12992
12993 * server.c (attach_inferior): Return SIGTRAP for a successful
12994 attach.
12995
dd24457d
DJ
129962006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
12997
12998 * Makefile.in (OBS): Add version.o.
12999 (STAGESTUFF): Delete.
13000 (version.o): Add dependencies.
13001 (version.c): Replace rule.
13002 (clean): Remove version.c.
13003 * server.c (gdbserver_version): New.
13004 (gdbserver_usage): Use printf.
13005 (main): Handle --version and --help.
13006 * server.h (version, host_name): Add declarations.
13007
6f0f660e
EZ
130082005-12-23 Eli Zaretskii <eliz@gnu.org>
13009
889bf7c5
PA
13010 * linux-arm-low.c:
13011 * linux-arm-low.c:
13012 * inferiors.c:
13013 * i387-fp.h:
13014 * i387-fp.c:
13015 * gdbreplay.c:
13016 * regcache.c:
13017 * proc-service.c:
13018 * mem-break.h:
13019 * mem-break.c:
13020 * linux-x86-64-low.c:
13021 * linux-sh-low.c:
13022 * linux-s390-low.c:
13023 * linux-ppc64-low.c:
13024 * linux-ppc-low.c:
13025 * linux-mips-low.c:
13026 * linux-m68k-low.c:
13027 * linux-m32r-low.c:
13028 * linux-low.h:
13029 * linux-low.c:
13030 * linux-ia64-low.c:
13031 * linux-i386-low.c:
13032 * linux-crisv32-low.c:
13033 * thread-db.c:
13034 * terminal.h:
13035 * target.h:
13036 * target.c:
13037 * server.h:
13038 * server.c:
13039 * remote-utils.c:
13040 * regcache.h:
13041 * utils.c:
13042 * Makefile.in:
13043 * configure.ac:
6f0f660e
EZ
13044 * gdbserver.1: Add (C) after Copyright. Update the FSF
13045 address.
13046
9d1fb177
DJ
130472005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13048
13049 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13050 (arm_breakpoint_at): Recognize both breakpoints.
13051 (the_low_target): Use the correct breakpoint instruction.
13052
011a70c2
DJ
130532005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13054
13055 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13056 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13057 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13058 (the_low_target): Update.
13059
7fb85e41
AS
130602005-10-25 Andreas Schwab <schwab@suse.de>
13061
13062 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13063
13064 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13065 (ia64_num_regs): Reduce to 462.
13066
3db0444b
DJ
130672005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13068
13069 * acinclude.m4: Correct quoting.
13070 * aclocal.m4: Regenerated.
13071
13072 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13073 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13074 (thread_db_init): Call thread_db_err_str.
13075 * configure.ac: Check for TD_VERSION.
13076 * config.in, configure: Regenerated.
13077
bee0189a
DJ
130782005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13079
13080 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13081
e9d25b98
DJ
130822005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13083
13084 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13085 is not available. Define HAVE_PTRACE_GETREGS if it is.
13086 * config.in, configure: Regenerated.
13087 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13088 * linux-i386-low.c, linux-m68k-low.c: Update to use
13089 HAVE_PTRACE_GETREGS.
13090 * linux-low.c (regsets_fetch_inferior_registers)
13091 (regsets_store_inferior_registers): Only return 0 if we processed
13092 GENERAL_REGS.
13093 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13094 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13095
a06660f7
DJ
130962005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13097
13098 * inferiors.c (struct thread_info): Add gdb_id.
13099 (add_thread): Add gdb_id argument.
13100 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13101 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13102 calls to add_thread.
13103 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13104 * server.c (handle_query): Use thread_to_gdb_id.
13105 (handle_v_cont, main): Use gdb_id_to_thread_id.
13106 * server.h (add_thread): Update prototype.
13107 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13108 prototypes.
13109
5a1f5858
DJ
131102005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13111
13112 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13113 left-padded registers.
13114 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13115 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13116
e122f1f5
SE
131172005-07-01 Steve Ellcey <sje@cup.hp.com>
13118
13119 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13120 * configure: Regenerate.
13121 * config.in: Regenerate.
13122 * server.h (NEED_DECLARATION_STRERROR):
13123 Replace with !HAVE_DECL_STRERROR.
13124
d592fa2f
DJ
131252005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13126
13127 * linux-low.c (linux_wait, linux_send_signal): Don't test
13128 an unsigned long variable for > 0 if it could be MAX_ULONG.
13129 * server.c (myresume): Likewise.
13130 * target.c (set_desired_inferior): Likewise.
13131
ccbd4912
MK
131322005-06-13 Mark Kettenis <kettenis@gnu.org>
13133
13134 * configure.ac: Simplify and improve check for socklen_t.
13135 * configure, config.in: Regenerate.
13136
f450004a
DJ
131372005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13138
13139 * acconfig.h: Remove.
13140 * configure.ac: Add a test for socklen_t. Use three-argument
13141 AC_DEFINE throughout.
13142 * config.in: Regenerated using autoheader 2.59.
13143 * configure: Regenerated.
13144
13145 * gdbreplay.c (socklen_t): Provide a default.
13146 (remote_open): Use socklen_t.
13147 * remote-utils.c (socklen_t): Provide a default.
13148 (remote_open): Use socklen_t.
13149 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13150 unsigned char.
13151
13152 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13153 char for buffers.
13154 * linux-low.c (linux_read_memory, linux_write_memory)
13155 (linux_read_auxv): Likewise.
13156 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13157 (check_mem_write): Likewise.
13158 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13159 Likewise.
13160 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13161 (registers_from_string, register_data): Likewise.
13162 * server.c (handle_query, main): Likewise.
13163 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13164 (decode_M_packet): Likewise.
13165 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13166 * target.h (struct target_ops): Update read_memory, write_memory,
13167 and read_auxv.
13168 (read_inferior_memory, write_inferior_memory): Update.
13169 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13170 to unsigned char *.
13171 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13172 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13173 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13174 linux-s390-low.c, linux-sh-low.c: Update for changes in
13175 read_inferior_memory and the_low_target->breakpoint.
13176
eee84df1
DJ
131772005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13178
13179 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13180 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13181 * configure.srv: Add powerpc64-*-linux*.
13182 * linux-ppc64-low.c: New file.
13183
45b134e5
OF
131842005-05-23 Orjan Friberg <orjanf@axis.com>
13185
13186 * linux-cris-low.c: New file with support for CRIS.
13187 * linux-crisv32-low.c: Ditto for CRISv32.
13188 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13189 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13190 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13191 reg-crisv32.o, and reg-crisv32.c to make rules.
13192 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13193 recognized targets.
13194
48d93c75
UW
131952005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13196
13197 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13198 of sizeof (PTRACE_XFER_TYPE).
13199 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13200
e013ee27
OF
132012005-05-12 Orjan Friberg <orjanf@axis.com>
13202
889bf7c5 13203 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13204 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13205 pointers for hardware watchpoint support.
13206 * linux-low.h (struct linux_target_ops): Ditto.
13207 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13208 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13209 to linux_target_ops.
13210 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13211 reply packet.
13212 * server.c (main): Recognize 'Z' and 'z' packets.
13213
b0ded00b
UW
132142005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13215
13216 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13217 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13218 (the_low_target): Add new members.
13219
8643e2ad
DJ
132202005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13221
13222 * proc-service.c (ps_lgetregs): Search all_processes instead of
13223 all_threads.
13224
fc620387
DJ
132252005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13226
13227 * server.c (start_inferior): Change return type to int.
13228 (attach_inferior): Change sigptr to int *.
13229 (handle_v_cont, handle_v_requests): Change signal to int *.
13230 (main): Change signal to int.
13231
132322005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13233
13234 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13235 * configure.srv: Add m32r*-*-linux*.
13236 * linux-m32r-low.c: New file.
13237
e0e76420
DJ
132382005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13239
13240 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13241
a1928bad
DJ
132422005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13243
13244 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13245 Take unsigned long arguments for PIDs.
13246 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13247 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13248 (wait_for_sigstop, linux_resume_one_process)
13249 (regsets_fetch_inferior_registers, linux_send_signal)
13250 (linux_read_auxv): Likewise. Update the types of variables holding
13251 PIDs. Update format string specifiers.
13252 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13253 * remote-utils.c (prepare_resume_reply): Likewise.
13254 * server.c (cont_thread, general_thread, step_thread)
13255 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13256 unsigned long.
13257 (handle_query): Update format specifiers.
13258 (handle_v_cont, main): Use strtoul for thread IDs.
13259 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13260 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13261 (general_thread, step_thread, thread_from_wait)
13262 (old_thread_from_wait): Update.
13263 * target.h (struct thread_resume): Use unsigned long for THREAD.
13264 (struct target_ops): Use unsigned long for arguments to attach and
13265 thread_alive.
13266
dcdb98d2
DJ
132672005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13268
13269 * acinclude.m4: Include bfd/bfd.m4 directly.
13270 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13271 <agriffis@toolchain.org>.
13272 * aclocal.m4, configure: Regenerated.
13273
bec39cab
AC
132742005-01-07 Andrew Cagney <cagney@gnu.org>
13275
13276 * configure.ac: Rename configure.in, require autoconf 2.59.
13277 * configure: Re-generate.
13278
434c4c77
DJ
132792004-12-08 Daniel Jacobowitz <dan@debian.org>
13280
13281 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13282 LIBS when finished.
13283 * aclocal.m4: Regenerated.
13284 * configure: Regenerated.
13285
db1d3e1b
AS
132862004-11-21 Andreas Schwab <schwab@suse.de>
13287
13288 * linux-m68k-low.c (m68k_num_gregs): Define.
13289 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13290 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13291 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13292 (m68k_breakpoint_at): New. Add to the_low_target.
13293
13294 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13295 srv_linux_thread_db to yes.
13296
43360365
JB
132972004-10-20 Joel Brobecker <brobecker@gnat.com>
13298
13299 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13300 (ARCH_SET_FS): Likewise.
13301 (ARCH_GET_FS): Likewise.
13302 (ARCH_GET_GS): Likewise.
13303
fd500816
DJ
133042004-10-16 Daniel Jacobowitz <dan@debian.org>
13305
13306 * linux-i386-low.c (ps_get_thread_area): New.
13307 * linux-x86-64-low.c (ps_get_thread_area): New.
13308 * linux-low.c: Include <sys/syscall.h>.
13309 (linux_kill_one_process): Don't kill the first thread here.
13310 (linux_kill): Kill the first thread here.
13311 (kill_lwp): New function.
13312 (send_sigstop, linux_send_signal): Use it.
13313 * proc-service.c: Clean up #ifdefs.
13314 (fpregset_info): Delete.
13315 (ps_lgetregs): Update and enable implementation.
13316 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13317 implementations.
13318 * remote-utils.c (struct sym_cache, symbol_cache): New.
13319 (input_interrupt): Print a clearer message.
13320 (async_io_enabled): New variable.
13321 (enable_async_io, disable_async_io): Use it. Update comments.
13322 (look_up_one_symbol): Use the symbol cache.
13323 * thread-db.c (thread_db_look_up_symbols): New function.
13324 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13325
f6de3c42
DJ
133262004-10-16 Daniel Jacobowitz <dan@debian.org>
13327
13328 * configure.in: Test for -rdynamic.
13329 * configure: Regenerated.
13330 * Makefile (INTERNAL_LDFLAGS): New.
13331 (gdbserver, gdbreplay): Use it.
13332
2c0fc042
AC
133332004-09-02 Andrew Cagney <cagney@gnu.org>
13334
13335 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13336
075b3282
DJ
133372004-03-23 Daniel Jacobowitz <drow@mvista.com>
13338
13339 * linux-low.c (linux_wait): Clear all_processes list also.
13340
fa6a77dc
DJ
133412004-03-12 Daniel Jacobowitz <drow@mvista.com>
13342
13343 * linux-low.c: Include <errno.h>. Remove extern declaration of
13344 errno.
13345
6d782a97
DJ
133462004-03-12 Daniel Jacobowitz <drow@mvista.com>
13347
13348 * gdbreplay.c, server.h, utils.c: Update copyright years.
13349
3a7fb99b
DJ
133502004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13351
13352 * server.c (main): Print child status or termination signal from
13353 variable 'signal', not 'sig'.
13354
c3e735a6
DJ
133552004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13356
13357 * linux-low.c (linux_read_memory): Change return type to
13358 int. Check for and return error from ptrace().
13359 * target.c (read_inferior_memory): Change return type to int. Pass
13360 back return status from the_target->read_memory().
13361 * target.h (struct target_ops): Adapt *read_memory() prototype.
13362 Update comment.
13363 (read_inferior_memory): Adapt prototype.
13364 * server.c (main): Return an error packet if
13365 read_inferior_memory() returns an error.
13366
a59d1c82
DJ
133672004-03-04 Daniel Jacobowitz <drow@mvista.com>
13368
13369 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13370 Unify with other clean targets.
13371
dc3f8883
DJ
133722004-02-29 Daniel Jacobowitz <drow@mvista.com>
13373
13374 * server.c (handle_v_cont): Call set_desired_inferior.
13375
89a208da
DJ
133762004-02-29 Daniel Jacobowitz <drow@mvista.com>
13377
13378 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13379
62ea82f5
DJ
133802004-02-29 Daniel Jacobowitz <drow@mvista.com>
13381
13382 * linux-low.c (linux_wait): Unblock async I/O.
13383 (linux_resume): Block and enable async I/O.
13384 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13385 * server.h (block_async_io, unblock_async_io): Add prototypes.
13386
6910d122
DJ
133872004-02-29 Daniel Jacobowitz <drow@mvista.com>
13388
13389 * remote-utils.c (remote_open): Print a status notice after
13390 opening a TCP port.
13391 * server.c (attach_inferior): Print a status notice after
13392 attaching.
13393
133942004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13395
13396 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13397
c89dc5d4
DJ
133982004-02-26 Daniel Jacobowitz <drow@mvista.com>
13399
13400 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13401 error packet.
13402 * server.c, target.h: Update copyright years.
13403
4b8dad4a
RM
134042004-02-25 Roland McGrath <roland@redhat.com>
13405
13406 * target.h (struct target_ops): New member `read_auxv'.
13407 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13408 * linux-low.c (linux_read_auxv): New function.
13409 (linux_target_ops): Initialize `read_auxv' member to that.
13410
d7446758
JB
134112004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13412
13413 Committed by Jim Blandy <jimb@redhat.com>.
13414
13415 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13416 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13417 instead of GPR_SIZE to distiguish s390 and s390x targets.
13418
5544ad89
DJ
134192004-01-31 Daniel Jacobowitz <drow@mvista.com>
13420
13421 * linux-low.c: Update copyright year.
13422 (check_removed_breakpoint): Clear pending_is_breakpoint.
13423 (linux_set_resume_request, linux_queue_one_thread)
13424 (resume_status_pending_p): New functions.
13425 (linux_continue_one_thread): Use process->resume.
13426 (linux_resume): Only resume threads if there are no pending events.
13427 * linux-low.h (struct process_info): Add resume request
13428 pointer.
13429
2a68b70e
DJ
134302004-01-30 Daniel Jacobowitz <drow@mvista.com>
13431
13432 * regcache.c (new_register_cache): Clear the allocated register
13433 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13434
64386c31
DJ
134352003-10-13 Daniel Jacobowitz <drow@mvista.com>
13436
13437 * linux-low.c (linux_resume): Take a struct thread_resume *
13438 argument.
13439 (linux_wait): Update call.
13440 (resume_ptr): New static variable.
13441 (linux_continue_one_thread): Renamed from
13442 linux_continue_one_process. Use resume_ptr.
13443 (linux_resume): Use linux_continue_one_thread.
13444 * server.c (handle_v_cont, handle_v_requests): New functions.
13445 (myresume): New function.
13446 (main): Handle 'v' case.
13447 * target.h (struct thread_resume): New type.
13448 (struct target_ops): Change argument of "resume" to struct
13449 thread_resume *.
13450 (myresume): Delete macro.
13451
c938e9b0
L
134522003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13453
13454 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13455 (uninstall): Support DESTDIR.
13456
7f313d07
BC
13457Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13458
13459 * configure.srv: Add xscale*linux copy of arm*linux entry.
13460
3b2fc2ea
DJ
134612003-07-24 Daniel Jacobowitz <drow@mvista.com>
13462
13463 * linux-arm-low.c (arm_reinsert_addr): New function.
13464 (the_low_target): Add arm_reinsert_addr.
13465
1c0a559e
MK
134662003-07-08 Mark Kettenis <kettenis@gnu.org>
13467
13468 * mem-break.c: Remove whitespace at end of file.
13469
43d5792c
DJ
134702003-06-28 Daniel Jacobowitz <drow@mvista.com>
13471
13472 * configure.in: Check whether we need to prototype strerror.
13473 * server.h: Optionally prototype strerror.
13474 * gdbreplay.c (perror_with_name): Use strerror.
13475 * linux-low.c (linux_attach_lwp): Use strerror.
13476 * utils.c (perror_with_name): Use strerror.
13477 * config.in, configure: Regenerated.
13478
c8a86edf
DJ
134792003-06-28 Daniel Jacobowitz <drow@mvista.com>
13480
13481 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13482 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13483
73d37363
DJ
134842003-06-20 Daniel Jacobowitz <drow@mvista.com>
13485
13486 * Makefile.in (SFILES): Update.
13487 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13488 low-sun3.c: Remove files.
13489
6ad8ae5c
DJ
134902003-06-17 Daniel Jacobowitz <drow@mvista.com>
13491
13492 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13493 (linux_detach_one_process, linux_detach): New functions.
13494 (linux_target_ops): Add linux_detach.
13495 * server.c (main): Handle 'D' packet.
13496 * target.h (struct target_ops): Add "detach" member.
13497 (detach_inferior): Define.
13498
1581182a
MK
134992003-06-13 Mark Kettenis <kettenis@gnu.org>
13500
13501 From Kelley Cook <kelleycook@wideopenwest.com>:
13502 * configure.srv: Accept i[34567]86 variants.
13503
e5379b03
DJ
135042003-06-05 Daniel Jacobowitz <drow@mvista.com>
13505
13506 * linux-low.c (linux_wait_for_event): Correct comment typos.
13507 (linux_resume_one_process): Call check_removed_breakpoint.
13508 (linux_send_signal): New function.
13509 (linux_target_ops): Add linux_send_signal.
13510 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13511 of kill.
13512 * target.h (struct target_ops): Add send_signal.
13513
2ff29de4
JB
135142003-05-29 Jim Blandy <jimb@redhat.com>
13515
13516 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13517 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13518 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13519 away part of the register's value.
13520
254787d4
DJ
135212003-03-26 Daniel Jacobowitz <drow@mvista.com>
13522
13523 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13524 (linux_wait_for_event, linux_init_signals): Likewise.
13525
94e10508
DJ
135262003-03-17 Daniel Jacobowitz <drow@mvista.com>
13527
13528 * configure.in: Check for stdlib.h.
13529 * configure: Regenerated.
13530 * config.in: Regenerated.
13531
4c0711e0
DJ
135322003-01-04 Andreas Schwab <schwab@suse.de>
13533
13534 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13535
ef66e766
AC
135362003-01-02 Andrew Cagney <ac131313@redhat.com>
13537
13538 * Makefile.in: Remove obsolete code.
13539
a1358604
DJ
135402002-11-20 Daniel Jacobowitz <drow@mvista.com>
13541
13542 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13543 defined(PT_FPR0_HI).
13544
23ce3b1c
DJ
135452002-11-17 Stuart Hughes <seh@zee2.com>
13546
13547 * linux-arm-low.c (arm_num_regs): Increase.
13548 (arm_regmap): Include status register.
13549
135502002-11-17 Daniel Jacobowitz <drow@mvista.com>
13551
13552 * linux-low.c (register_addr): Remove incorrect -1 check.
13553
a9fa9f7d
DJ
135542002-08-29 Daniel Jacobowitz <drow@mvista.com>
13555
13556 * linux-low.c (linux_create_inferior): Call setpgid. Return
13557 the new PID.
13558 (unstopped_p, linux_signal_pid): Remove.
13559 (linux_target_ops): Remove linux_signal_pid.
13560 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13561 global instead of target method.
13562 * target.h (struct target_ops): Remove signal_pid. Update comment
13563 for create_inferior.
13564 * server.c (signal_pid): New variable.
13565 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13566 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13567 (attach_inferior): Set signal_pid.
13568
17574093
DJ
135692002-08-23 Daniel Jacobowitz <drow@mvista.com>
13570
13571 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13572
135732002-08-20 Jim Blandy <jimb@redhat.com>
13574
13575 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13576 default for this.
13577
135782002-08-01 Andrew Cagney <cagney@redhat.com>
13579
13580 * Makefile.in: Make chill references obsolete.
13581
135822002-07-24 Kevin Buettner <kevinb@redhat.com>
13583
13584 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13585 * configure: Regenerate.
13586 * config.in: Regenerate.
13587
135882002-07-09 David O'Brien <obrien@FreeBSD.org>
13589
13590 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13591 (perror_with_name, remote_close, remote_open, expect, play): Static.
13592
135932002-07-04 Michal Ludvig <mludvig@suse.cz>
13594
4b8dad4a 13595 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13596 byte offsets instead of an array of indexes.
13597 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13598
135992002-06-13 Daniel Jacobowitz <drow@mvista.com>
13600
13601 * regcache.c: Add comment.
13602
136032002-06-11 Daniel Jacobowitz <drow@mvista.com>
13604
13605 * thread-db.c: New file.
13606 * proc-service.c: New file.
13607 * acinclude.m4: New file.
13608 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13609 proc-service.o, and thread-db.o.
13610 (linux-low.o): Add USE_THREAD_DB.
13611 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13612 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13613 * aclocal.m4: Regenerated.
13614 * config.in: Regenerated.
13615 * configure: Regenerated.
13616 * configure.in: Check for proc_service.h, sys/procfs.h,
13617 thread_db.h, and linux/elf.h headrs.
13618 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13619 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13620 Check for -lthread_db and thread support.
13621 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13622 PowerPC, and SuperH.
13623 * i387-fp.c: Constify arguments.
13624 * i387-fp.h: Likewise.
13625 * inferiors.c: (struct thread_info): Renamed from
13626 `struct inferior_info'. Remove PID member. Use generic inferior
13627 list header. All uses updated.
13628 (inferiors, signal_pid): Removed.
13629 (all_threads): New variable.
13630 (get_thread): Define.
13631 (add_inferior_to_list): New function.
13632 (for_each_inferior): New function.
13633 (change_inferior_id): New function.
13634 (add_inferior): Removed.
13635 (remove_inferior): New function.
13636 (add_thread): New function.
13637 (free_one_thread): New function.
13638 (remove_thread): New function.
13639 (clear_inferiors): Use for_each_inferior and free_one_thread.
13640 (find_inferior): New function.
13641 (find_inferior_id): New function.
13642 (inferior_target_data): Update argument type.
13643 (set_inferior_target_data): Likewise.
13644 (inferior_regcache_data): Likewise.
13645 (set_inferior_regcache_data): Likewise.
13646 * linux-low.c (linux_bp_reinsert): Remove.
13647 (all_processes, stopping_threads, using_thrads)
13648 (struct pending_signals, debug_threads, pid_of): New.
13649 (inferior_pid): Replace with macro.
13650 (struct inferior_linux_data): Remove.
13651 (get_stop_pc, add_process): New functions.
13652 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13653 Use add_process and add_thread.
13654 (linux_attach_lwp): New function, based on old linux_attach. Use
13655 add_process and add_thread. Set stop_expected for new threads.
13656 (linux_attach): New function.
13657 (linux_kill_one_process): New function.
13658 (linux_kill): Kill all LWPs.
13659 (linux_thread_alive): Use find_inferior_id.
13660 (check_removed_breakpoints, status_pending_p): New functions.
13661 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13662 Update. Use WNOHANG. Wait for cloned processes also. Update process
13663 struct for the found process.
13664 (linux_wait_for_event): New function.
13665 (linux_wait): Use it. Support LWPs.
13666 (send_sigstop, wait_for_sigstop, stop_all_processes)
13667 (linux_resume_one_process, linux_continue_one_process): New functions.
13668 (linux_resume): Support LWPs.
13669 (REGISTER_RAW_SIZE): Remove.
13670 (fetch_register): Use register_size instead. Call supply_register.
13671 (usr_store_inferior_registers): Likewise. Call collect_register.
13672 Fix recursive case.
13673 (regsets_fetch_inferior_registers): Improve error message.
13674 (regsets_store_inferior_registers): Add debugging.
13675 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13676 (unstopped_p, linux_signal_pid): New functions.
13677 (linux_target_ops): Add linux_signal_pid.
13678 (linux_init_signals): New function.
13679 (initialize_low): Call it. Initialize using_threads.
13680 * regcache.c (inferior_regcache_data): Add valid
13681 flag.
13682 (get_regcache): Fetch registers lazily. Add fetch argument
13683 and update all callers.
13684 (regcache_invalidate_one, regcache_invalidate): New
13685 functions.
13686 (new_register_cache): Renamed from create_register_cache.
13687 Return the new regcache.
13688 (free_register_cache): Change argument to a void *.
13689 (registers_to_string, registers_from_string): Call get_regcache
13690 with fetch flag set.
13691 (register_data): Make static. Pass fetch flag to get_regcache.
13692 (supply_register): Call get_regcache with fetch flag clear.
13693 (collect_register): Call get_regcache with fetch flag set.
13694 (collect_register_as_string): New function.
13695 * regcache.h: Update.
13696 * remote-utils.c (putpkt): Flush after debug output and use
13697 stderr.
13698 Handle input interrupts while waiting for an ACK.
13699 (input_interrupt): Use signal_pid method.
13700 (getpkt): Flush after debug output and use stderr.
13701 (outreg): Use collect_register_as_string.
13702 (new_thread_notify, dead_thread_notify): New functions.
13703 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13704 and general_thread.
13705 (look_up_one_symbol): Flush after debug output.
13706 * server.c (step_thread, server_waiting): New variables.
13707 (start_inferior): Don't use signal_pid. Update call to mywait.
13708 (attach_inferior): Update call to mywait.
13709 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13710 (main): Don't fetch/store registers explicitly. Use
13711 set_desired_inferior. Support proposed ``Hs'' packet. Update
13712 calls to mywait.
13713 * server.h: Update.
13714 (struct inferior_list, struct_inferior_list_entry): New.
13715 * target.c (set_desired_inferior): New.
13716 (write_inferior_memory): Constify.
13717 (mywait): New function.
13718 * target.h: Update.
13719 (struct target_ops): New signal_pid method.
13720 (mywait): Removed macro, added prototype.
13721
13722 * linux-low.h (regset_func): Removed.
13723 (regset_fill_func, regset_store_func): New.
13724 (enum regset_type): New.
13725 (struct regset_info): Add type field. Use new operation types.
13726 (struct linux_target_ops): stop_pc renamed to get_pc.
13727 Add decr_pc_after_break and breakpoint_at.
13728 (get_process, get_thread_proess, get_process_thread)
13729 (strut process_info, all_processes, linux_attach_lwp)
13730 (thread_db_init): New.
13731
13732 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13733 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13734 (the_low_target): Add new members.
13735 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13736 (i386_store_fpxregset): Constify.
13737 (target_regsets): Add new kind identifier.
13738 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13739 (i386_set_pc): Add debugging.
13740 (i386_breakpoint_at): New function.
13741 (the_low_target): Add new members.
13742 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13743 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13744 (mips_breakpoint_at): New.
13745 (the_low_target): Add new members.
13746 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13747 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13748 (the_low_target): Add new members.
13749 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13750 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13751 (the_low_target): Add new members.
13752 * linux-x86-64-low.c (target_regsets): Add new kind
13753 identifier.
13754
137552002-05-15 Daniel Jacobowitz <drow@mvista.com>
13756
13757 From Martin Pool <mbp@samba.org>:
13758 * server.c (gdbserver_usage): New function.
13759 (main): Call it.
13760
137612002-05-14 Daniel Jacobowitz <drow@mvista.com>
13762
13763 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13764 stop_at -> stop_pc.
13765
137662002-05-04 Andrew Cagney <ac131313@redhat.com>
13767
13768 * Makefile.in: Remove obsolete code.
13769
137702002-04-24 Michal Ludvig <mludvig@suse.cz>
13771
13772 * linux-low.c (regsets_fetch_inferior_registers),
13773 (regsets_store_inferior_registers): Removed cast to int from
13774 ptrace() calls.
13775 * regcache.h: Added declaration of struct inferior_info.
13776
137772002-04-20 Daniel Jacobowitz <drow@mvista.com>
13778
13779 * inferiors.c (struct inferior_info): Add regcache_data.
13780 (add_inferior): Call create_register_cache.
13781 (clear_inferiors): Call free_register_cache.
13782 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13783 * regcache.c (struct inferior_regcache_data): New.
13784 (registers): Remove.
13785 (get_regcache): New function.
13786 (create_register_cache, free_register_cache): New functions.
13787 (set_register_cache): Don't initialize the register cache here.
13788 (registers_to_string, registers_from_string, register_data): Call
13789 get_regcache.
13790 * regcache.h: Add prototypes.
13791 * server.h: Likewise.
13792
137932002-04-20 Daniel Jacobowitz <drow@mvista.com>
13794
13795 * mem-break.c: New file.
13796 * mem-break.h: New file.
13797 * Makefile.in: Add mem-break.o rule; update server.h
13798 dependencies.
13799 * inferiors.c (struct inferior_info): Add target_data
13800 member.
13801 (clear_inferiors): Free target_data member if set.
13802 (inferior_target_data, set_inferior_target_data): New functions.
13803 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13804 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13805 * linux-low.c (linux_bp_reinsert): New variable.
13806 (struct inferior_linux_data): New.
13807 (linux_create_inferior): Use set_inferior_target_data.
13808 (linux_attach): Likewise. Call add_inferior.
13809 (linux_wait_for_one_inferior): New function.
13810 (linux_wait): Call it.
13811 (linux_write_memory): Add const.
13812 (initialize_low): Call set_breakpoint_data.
13813 * linux-low.h (struct linux_target_ops): Add breakpoint
13814 handling members.
13815 * server.c (attach_inferior): Remove extra add_inferior
13816 call.
13817 * server.h: Include mem-break.h. Update inferior.c
13818 prototypes.
13819 * target.c (read_inferior_memory)
13820 (write_inferior_memory): New functions.
13821 * target.h (read_inferior_memory)
13822 (write_inferior_memory): Change macros to prototypes.
13823 (struct target_ops): Update comments. Add const to write_memory
13824 definition.
13825
138262002-04-11 Daniel Jacobowitz <drow@mvista.com>
13827
13828 * linux-low.c (usr_store_inferior_registers): Support
13829 registers which are allowed to fail to store.
13830 * linux-low.h (linux_target_ops): Likewise.
13831 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13832 (ppc_cannot_store_register): FPSCR may not be storable.
13833
138342002-04-09 Daniel Jacobowitz <drow@mvista.com>
13835
13836 * server.h: Include <string.h> if HAVE_STRING_H.
13837 * ChangeLog: Correct paths in last ChangeLog entry.
13838
138392002-04-09 Daniel Jacobowitz <drow@mvista.com>
13840
13841 * linux-low.h: Remove obsolete prototypes.
13842 (struct linux_target_ops): New.
13843 (extern the_low_target): New.
13844 * linux-low.c (num_regs, regmap): Remove declarations.
13845 (register_addr): Use the_low_target explicitly.
13846 (fetch_register): Likewise.
13847 (usr_fetch_inferior_registers): Likewise.
13848 (usr_store_inferior_registers): Likewise.
13849 * linux-arm-low.c (num_regs): Remove.
13850 (arm_num_regs): Define.
13851 (arm_regmap): Renamed from regmap, made static.
13852 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13853 made static.
13854 (arm_cannot_store_register): Renamed from cannot_store_register,
13855 made static.
13856 (the_low_target): New.
13857 * linux-i386-low.c (num_regs): Remove.
13858 (i386_num_regs): Define.
13859 (i386_regmap): Renamed from regmap, made static.
13860 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13861 made static.
13862 (i386_cannot_store_register): Renamed from cannot_store_register,
13863 made static.
13864 (the_low_target): New.
13865 * linux-ia64-low.c (num_regs): Remove.
13866 (ia64_num_regs): Define.
13867 (ia64_regmap): Renamed from regmap, made static.
13868 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13869 made static.
13870 (ia64_cannot_store_register): Renamed from cannot_store_register,
13871 made static.
13872 (the_low_target): New.
13873 * linux-m68k-low.c (num_regs): Remove.
13874 (m68k_num_regs): Define.
13875 (m68k_regmap): Renamed from regmap, made static.
13876 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13877 made static.
13878 (m68k_cannot_store_register): Renamed from cannot_store_register,
13879 made static.
13880 (the_low_target): New.
13881 * linux-mips-low.c (num_regs): Remove.
13882 (mips_num_regs): Define.
13883 (mips_regmap): Renamed from regmap, made static.
13884 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13885 made static.
13886 (mips_cannot_store_register): Renamed from cannot_store_register,
13887 made static.
13888 (the_low_target): New.
13889 * linux-ppc-low.c (num_regs): Remove.
13890 (ppc_num_regs): Define.
13891 (ppc_regmap): Renamed from regmap, made static.
13892 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13893 made static.
13894 (ppc_cannot_store_register): Renamed from cannot_store_register,
13895 made static.
13896 (the_low_target): New.
13897 * linux-s390-low.c (num_regs): Remove.
13898 (s390_num_regs): Define.
13899 (s390_regmap): Renamed from regmap, made static.
13900 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13901 made static.
13902 (s390_cannot_store_register): Renamed from cannot_store_register,
13903 made static.
13904 (the_low_target): New.
13905 * linux-sh-low.c (num_regs): Remove.
13906 (sh_num_regs): Define.
13907 (sh_regmap): Renamed from regmap, made static.
13908 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13909 made static.
13910 (sh_cannot_store_register): Renamed from cannot_store_register,
13911 made static.
13912 (the_low_target): New.
13913 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13914 (the_low_target): New.
13915
139162002-04-09 Daniel Jacobowitz <drow@mvista.com>
13917
13918 * Makefile.in: Add stamp-h target.
13919 * configure.in: Create stamp-h.
13920 * configure: Regenerated.
13921
139222002-04-09 Daniel Jacobowitz <drow@mvista.com>
13923
13924 * inferiors.c: New file.
13925 * target.c: New file.
13926 * target.h: New file.
13927 * Makefile.in: Add target.o and inferiors.o. Update
13928 dependencies.
13929 * linux-low.c (inferior_pid): New static variable,
13930 moved from server.c.
13931 (linux_create_inferior): Renamed from create_inferior.
13932 Call add_inferior. Return 0 on success instead of a PID.
13933 (linux_attach): Renamed from myattach.
13934 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13935 (linux_thread_alive): Renamed from mythread_alive.
13936 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13937 child dies.
13938 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13939 (regsets_store_inferior_registers): Correct error message.
13940 Add missing ``return 0''.
13941 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13942 (linux_store_registers): Renamed from store_inferior_registers.
13943 (linux_read_memory): Renamed from read_inferior_memory.
13944 (linux_write_memory): Renamed from write_inferior_memory.
13945 (linux_target_ops): New structure.
13946 (initialize_low): Call set_target_ops ().
13947 * remote-utils.c (unhexify): New function.
13948 (hexify): New function.
13949 (input_interrupt): Send signals to ``signal_pid''.
13950 * server.c (inferior_pid): Remove.
13951 (start_inferior): Update create_inferior call.
13952 (attach_inferior): Call add_inferior.
13953 (handle_query): New function.
13954 (main): Call handle_query for `q' packets.
13955 * server.h: Include "target.h". Remove obsolete prototypes.
13956 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13957
139582002-04-09 Daniel Jacobowitz <drow@mvista.com>
13959
13960 * Makefile.in: Add WARN_CFLAGS. Update configury
13961 dependencies.
13962 * configure.in: Check for <string.h>
13963 * configure: Regenerate.
13964 * config.in: Regenerate.
13965 * gdbreplay.c: Include needed system headers.
13966 (remote_open): Remove strchr prototype.
13967 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13968 * regcache.c (supply_register): Change buf argument to const void *.
13969 (supply_register_by_name): Likewise.
13970 (collect_register): Change buf argument to void *.
13971 (collect_register_by_name): Likewise.
13972 * regcache.h: Add missing prototypes.
13973 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13974 * server.c (handle_query): New function.
13975 (attached): New static variable, moved out of main.
13976 (main): Quiet longjmp clobber warnings.
13977 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13978 * utils.c (error): Remove NORETURN.
13979 (fatal): Likewise.