]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Fix gdb crash when trying to print the address of a synthetic C++ reference
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
45e3745e
AT
12016-04-13 Antoine Tremblay <antoine.tremblay@ericsson.com>
2
3 * linux-aarch64-low.c (aarch64_emit_add): Switch x1 and x0.
4 (aarch64_emit_sub): Likewise.
5
2afc13ff
PA
62016-04-12 Pedro Alves <palves@redhat.com>
7
8 * utils.c (prepare_to_throw_exception): Delete.
9
6e774b13
SM
102016-04-05 Simon Marchi <simon.marchi@ericsson.com>
11
12 * Makefile.in ($(IPA_LIB)): Set SONAME of the IPA lib.
13
4dca19f8
MK
142016-04-05 Marcin Kościelnicki <koriakin@0x04.net>
15
16 * tracepoint.c (getauxval): Move to #ifdef IN_PROCESS_AGENT.
17
d0a9981f
MK
182016-04-03 Marcin Kościelnicki <koriakin@0x04.net>
19
20 * linux-aarch64-ipa.c: Add <elf.h> include.
21 * linux-ppc-ipa.c: Add <elf.h> include.
22 * linux-s390-ipa.c: Add <elf.h> include.
23
252db07e
MK
242016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
25
26 * tracepoint.c (gdb_collect_ptr): Remove const qualifier.
27 (get_raw_reg_ptr): Likewise.
28 (get_trace_state_variable_value_ptr): Likewise.
29 (set_trace_state_variable_value_ptr): Likewise.
30 (initialize_tracepoint): Cast alloc_jump_pad_buffer result to
31 char *.
32
14e2b6d9
MK
332016-03-31 Wei-cheng Wang <cole945@gmail.com>
34 Marcin Kościelnicki <koriakin@0x04.net>
35
36 PR/17221
37 * linux-ppc-low.c (emit_insns): New function.
38 (__EMIT_ASM, _EMIT_ASM, EMIT_ASM): New macros.
39 (ppc_emit_prologue): New function.
40 (ppc_emit_epilogue): New function.
41 (ppc_emit_add): New function.
42 (ppc_emit_sub): New function.
43 (ppc_emit_mul): New function.
44 (ppc_emit_lsh): New function.
45 (ppc_emit_rsh_signed): New function.
46 (ppc_emit_rsh_unsigned): New function.
47 (ppc_emit_ext): New function.
48 (ppc_emit_zero_ext): New function.
49 (ppc_emit_log_not): New function.
50 (ppc_emit_bit_and): New function.
51 (ppc_emit_bit_or): New function.
52 (ppc_emit_bit_xor): New function.
53 (ppc_emit_bit_not): New function.
54 (ppc_emit_equal): New function.
55 (ppc_emit_less_signed): New function.
56 (ppc_emit_less_unsigned): New function.
57 (ppc_emit_ref): New function.
58 (ppc_emit_const): New function.
59 (ppc_emit_reg): New function.
60 (ppc_emit_pop): New function.
61 (ppc_emit_stack_flush): New function.
62 (ppc_emit_swap): New function.
63 (ppc_emit_stack_adjust): New function.
64 (ppc_emit_call): New function.
65 (ppc_emit_int_call_1): New function.
66 (ppc_emit_void_call_2): New function.
67 (ppc_emit_if_goto): New function.
68 (ppc_emit_goto): New function.
69 (ppc_emit_eq_goto): New function.
70 (ppc_emit_ne_goto): New function.
71 (ppc_emit_lt_goto): New function.
72 (ppc_emit_le_goto): New function.
73 (ppc_emit_gt_goto): New function.
74 (ppc_emit_ge_goto): New function.
75 (ppc_write_goto_address): New function.
76 (ppc_emit_ops_impl): New static variable.
77 (ppc64v1_emit_prologue): New function.
78 (ppc64v2_emit_prologue): New function.
79 (ppc64_emit_epilogue): New function.
80 (ppc64_emit_add): New function.
81 (ppc64_emit_sub): New function.
82 (ppc64_emit_mul): New function.
83 (ppc64_emit_lsh): New function.
84 (ppc64_emit_rsh_signed): New function.
85 (ppc64_emit_rsh_unsigned): New function.
86 (ppc64_emit_ext): New function.
87 (ppc64_emit_zero_ext): New function.
88 (ppc64_emit_log_not): New function.
89 (ppc64_emit_bit_and): New function.
90 (ppc64_emit_bit_or): New function.
91 (ppc64_emit_bit_xor): New function.
92 (ppc64_emit_bit_not): New function.
93 (ppc64_emit_equal): New function.
94 (ppc64_emit_less_signed): New function.
95 (ppc64_emit_less_unsigned): New function.
96 (ppc64_emit_ref): New function.
97 (ppc64_emit_const): New function.
98 (ppc64v1_emit_reg): New function.
99 (ppc64v2_emit_reg): New function.
100 (ppc64_emit_pop): New function.
101 (ppc64_emit_stack_flush): New function.
102 (ppc64_emit_swap): New function.
103 (ppc64v1_emit_call): New function.
104 (ppc64v2_emit_call): New function.
105 (ppc64v1_emit_int_call_1): New function.
106 (ppc64v2_emit_int_call_1): New function.
107 (ppc64v1_emit_void_call_2): New function.
108 (ppc64v2_emit_void_call_2): New function.
109 (ppc64_emit_if_goto): New function.
110 (ppc64_emit_eq_goto): New function.
111 (ppc64_emit_ne_goto): New function.
112 (ppc64_emit_lt_goto): New function.
113 (ppc64_emit_le_goto): New function.
114 (ppc64_emit_gt_goto): New function.
115 (ppc64_emit_ge_goto): New function.
116 (ppc64v1_emit_ops_impl): New static variable.
117 (ppc64v2_emit_ops_impl): New static variable.
118 (ppc_emit_ops): New function.
119 (linux_low_target): Wire in ppc_emit_ops.
120
a2174ba4
MK
1212016-03-31 Wei-cheng Wang <cole945@gmail.com>
122 Marcin Kościelnicki <koriakin@0x04.net>
123
124 PR/17221
125 * Makefile.in: Add powerpc-*-ipa.o
126 * configure.srv: Add ipa_obj for powerpc*-linux.
127 * linux-ppc-ipa.c: New file.
128 * linux-ppc-low.c: Added linux-ppc-tdesc.h, ax.h, tracepoint.h
129 includes.
130 (PPC_FIELD): New macro.
131 (PPC_SEXT): New macro.
132 (PPC_OP6): New macro.
133 (PPC_BO): New macro.
134 (PPC_LI): New macro.
135 (PPC_BD): New macro.
136 (init_registers_*): Move prototype to linux-ppc-tdesc.h.
137 (tdesc_*): Move declaration to linux-ppc-tdesc.h.
138 (ppc_get_hwcap): Rename to ppc_get_auxv and add type parameter.
139 (ppc_get_thread_area): New function.
140 (is_elfv2_inferior): New function.
141 (gen_ds_form): New function.
142 (GEN_STD): New macro.
143 (GEN_STDU): New macro.
144 (GEN_LD): New macro.
145 (GEN_LDU): New macro.
146 (gen_d_form): New function.
147 (GEN_ADDI): New macro.
148 (GEN_ADDIS): New macro.
149 (GEN_LI): New macro.
150 (GEN_LIS): New macro.
151 (GEN_ORI): New macro.
152 (GEN_ORIS): New macro.
153 (GEN_LWZ): New macro.
154 (GEN_STW): New macro.
155 (GEN_STWU): New macro.
156 (gen_xfx_form): New function.
157 (GEN_MFSPR): New macro.
158 (GEN_MTSPR): New macro.
159 (GEN_MFCR): New macro.
160 (GEN_MTCR): New macro.
161 (GEN_SYNC): New macro.
162 (GEN_LWSYNC): New macro.
163 (gen_x_form): New function.
164 (GEN_OR): New macro.
165 (GEN_MR): New macro.
166 (GEN_LWARX): New macro.
167 (GEN_STWCX): New macro.
168 (GEN_CMPW): New macro.
169 (gen_md_form): New function.
170 (GEN_RLDICL): New macro.
171 (GEN_RLDICR): New macro.
172 (gen_i_form): New function.
173 (GEN_B): New macro.
174 (GEN_BL): New macro.
175 (gen_b_form): New function.
176 (GEN_BNE): New macro.
177 (GEN_LOAD): New macro.
178 (GEN_STORE): New macro.
179 (gen_limm): New function.
180 (gen_atomic_xchg): New function.
181 (gen_call): New function.
182 (ppc_relocate_instruction): New function.
183 (ppc_install_fast_tracepoint_jump_pad): New function.
184 (ppc_get_min_fast_tracepoint_insn_len): New function.
185 (ppc_get_ipa_tdesc_idx): New function.
186 (the_low_target): Wire in the new functions.
187 (initialize_low_arch) [!__powerpc64__]: Don'it initialize 64-bit
188 tdescs.
189 * linux-ppc-tdesc.h: New file.
190
a13c4696
MK
1912016-03-31 Marcin Kościelnicki <koriakin@0x04.net>
192
193 * linux-aarch64-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
194 (alloc_jump_pad_buffer): New function.
195 * linux-amd64-ipa.c: Add <sys/mman.h> include.
196 (alloc_jump_pad_buffer): New function.
197 * linux-i386-ipa.c (alloc_jump_pad_buffer): New function.
198 * linux-s390-ipa.c: Add <sys/mman.h> and <sys/auxv.h> includes.
199 (alloc_jump_pad_buffer): New function.
200 * tracepoint.c (getauxval) [!HAVE_GETAUXVAL]: New function.
201 (initialize_tracepoint): Delegate to alloc_jump_pad_buffer.
202 * tracepoint.h (alloc_jump_pad_buffer): New prototype.
203 (getauxval) [!HAVE_GETAUXVAL]: New prototype.
204
1cda1512
MK
2052016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
206
207 * linux-aarch64-ipa.c: Rename gdb_agent_get_raw_reg to get_raw_reg.
208 * linux-amd64-ipa.c: Likewise.
209 * linux-i386-ipa.c: Likewise.
210 * linux-s390-ipa.c: Likewise.
211 * tracepoint.c: IPA-export gdb_collect_ptr instead of gdb_collect,
212 ditto for get_raw_reg_ptr, get_trace_state_variable_value_ptr,
213 set_trace_state_variable_value_ptr.
214 (struct ipa_sym_addresses): Likewise.
215 (symbol_list): Likewise.
216 (install_fast_tracepoint): Dereference gdb_collect_ptr instead of
217 accessing gdb_collect directly.
218 (gdb_collect_ptr_type): New typedef.
219 (get_raw_reg_ptr_type): New typedef.
220 (get_trace_state_variable_value_ptr_type): New typedef.
221 (set_trace_state_variable_value_ptr_type): New typedef.
222 (gdb_collect_ptr): New global.
223 (get_raw_reg_ptr): New global.
224 (get_trace_state_variable_value_ptr): New global.
225 (set_trace_state_variable_value_ptr): New global.
226 (get_raw_reg_func_addr): Dereference get_raw_reg_ptr instead of
227 accessing get_raw_reg directly.
228 (get_get_tsv_func_addr): Likewise for
229 get_trace_state_variable_value_ptr.
230 (get_set_tsv_func_addr): Likewise for
231 set_trace_state_variable_value_ptr.
232 * tracepoint.h: Rename gdb_agent_get_raw_reg to get_raw_reg.
233
72fb5488
SM
2342016-03-30 Simon Marchi <simon.marchi@ericsson.com>
235
236 * tracepoint.c (cmd_qtenable_disable): Remove whitespace.
237
28170b88
MK
2382016-03-30 Marcin Kościelnicki <koriakin@0x04.net>
239
240 * remote-utils.c (look_up_one_symbol): Remove own_buf, handle 'v'
241 packets.
242 (relocate_instruction): Remove own_buf.
243 * server.c (own_buf): Make global.
244 (handle_v_requests): Make global.
245 * server.h (own_buf): New declaration.
246 (handle_v_requests): New prototype.
247
f39e8743
MK
2482016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
249
250 PR 18377
251 * linux-s390-low.c (add_insns): New function.
252 (s390_emit_prologue): New function.
253 (s390_emit_epilogue): New function.
254 (s390_emit_add): New function.
255 (s390_emit_sub): New function.
256 (s390_emit_mul): New function.
257 (s390_emit_lsh): New function.
258 (s390_emit_rsh_signed): New function.
259 (s390_emit_rsh_unsigned): New function.
260 (s390_emit_ext): New function.
261 (s390_emit_log_not): New function.
262 (s390_emit_bit_and): New function.
263 (s390_emit_bit_or): New function.
264 (s390_emit_bit_xor): New function.
265 (s390_emit_bit_not): New function.
266 (s390_emit_equal): New function.
267 (s390_emit_less_signed): New function.
268 (s390_emit_less_unsigned): New function.
269 (s390_emit_ref): New function.
270 (s390_emit_if_goto): New function.
271 (s390_emit_goto): New function.
272 (s390_write_goto_address): New function.
273 (s390_emit_litpool): New function.
274 (s390_emit_const): New function.
275 (s390_emit_call): New function.
276 (s390_emit_reg): New function.
277 (s390_emit_pop): New function.
278 (s390_emit_stack_flush): New function.
279 (s390_emit_zero_ext): New function.
280 (s390_emit_swap): New function.
281 (s390_emit_stack_adjust): New function.
282 (s390_emit_set_r2): New function.
283 (s390_emit_int_call_1): New function.
284 (s390_emit_void_call_2): New function.
285 (s390_emit_eq_goto): New function.
286 (s390_emit_ne_goto): New function.
287 (s390_emit_lt_goto): New function.
288 (s390_emit_le_goto): New function.
289 (s390_emit_gt_goto): New function.
290 (s390_emit_ge_goto): New function.
291 (s390x_emit_prologue): New function.
292 (s390x_emit_epilogue): New function.
293 (s390x_emit_add): New function.
294 (s390x_emit_sub): New function.
295 (s390x_emit_mul): New function.
296 (s390x_emit_lsh): New function.
297 (s390x_emit_rsh_signed): New function.
298 (s390x_emit_rsh_unsigned): New function.
299 (s390x_emit_ext): New function.
300 (s390x_emit_log_not): New function.
301 (s390x_emit_bit_and): New function.
302 (s390x_emit_bit_or): New function.
303 (s390x_emit_bit_xor): New function.
304 (s390x_emit_bit_not): New function.
305 (s390x_emit_equal): New function.
306 (s390x_emit_less_signed): New function.
307 (s390x_emit_less_unsigned): New function.
308 (s390x_emit_ref): New function.
309 (s390x_emit_if_goto): New function.
310 (s390x_emit_const): New function.
311 (s390x_emit_call): New function.
312 (s390x_emit_reg): New function.
313 (s390x_emit_pop): New function.
314 (s390x_emit_stack_flush): New function.
315 (s390x_emit_zero_ext): New function.
316 (s390x_emit_swap): New function.
317 (s390x_emit_stack_adjust): New function.
318 (s390x_emit_int_call_1): New function.
319 (s390x_emit_void_call_2): New function.
320 (s390x_emit_eq_goto): New function.
321 (s390x_emit_ne_goto): New function.
322 (s390x_emit_lt_goto): New function.
323 (s390x_emit_le_goto): New function.
324 (s390x_emit_gt_goto): New function.
325 (s390x_emit_ge_goto): New function.
326 (s390_emit_ops): New function.
327 (struct linux_target_ops): Fill in emit_ops hook.
328
abd9baf9
MK
3292016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
330
331 PR 18377
332 * Makefile.in: Add s390 IPA files.
333 * configure.srv: Build IPA for s390.
334 * linux-s390-ipa.c: New file.
335 * linux-s390-low.c: New includes - inttypes.h and linux-s390-tdesc.h.
336 (init_registers_s390_linux32): Move declaration to linux-s390-tdesc.h.
337 (tdesc_s390_linux32): Likewise.
338 (init_registers_s390_linux32v1): Likewise.
339 (tdesc_s390_linux32v1): Likewise.
340 (init_registers_s390_linux32v2): Likewise.
341 (tdesc_s390_linux32v2): Likewise.
342 (init_registers_s390_linux64): Likewise.
343 (tdesc_s390_linux64): Likewise.
344 (init_registers_s390_linux64v1): Likewise.
345 (tdesc_s390_linux64v1): Likewise.
346 (init_registers_s390_linux64v2): Likewise.
347 (tdesc_s390_linux64v2): Likewise.
348 (init_registers_s390_te_linux64): Likewise.
349 (tdesc_s390_te_linux64): Likewise.
350 (init_registers_s390_vx_linux64): Likewise.
351 (tdesc_s390_vx_linux64): Likewise.
352 (init_registers_s390_tevx_linux64): Likewise.
353 (tdesc_s390_tevx_linux64): Likewise.
354 (init_registers_s390x_linux64): Likewise.
355 (tdesc_s390x_linux64): Likewise.
356 (init_registers_s390x_linux64v1): Likewise.
357 (tdesc_s390x_linux64v1): Likewise.
358 (init_registers_s390x_linux64v2): Likewise.
359 (tdesc_s390x_linux64v2): Likewise.
360 (init_registers_s390x_te_linux64): Likewise.
361 (tdesc_s390x_te_linux64): Likewise.
362 (init_registers_s390x_vx_linux64): Likewise.
363 (tdesc_s390x_vx_linux64): Likewise.
364 (init_registers_s390x_tevx_linux64): Likewise.
365 (tdesc_s390x_tevx_linux64): Likewise.
366 (have_hwcap_s390_vx): New static variable.
367 (s390_arch_setup): Fill have_hwcap_s390_vx.
368 (s390_get_thread_area): New function.
369 (s390_ft_entry_gpr_esa): New const.
370 (s390_ft_entry_gpr_zarch): New const.
371 (s390_ft_entry_misc): New const.
372 (s390_ft_entry_fr): New const.
373 (s390_ft_entry_vr): New const.
374 (s390_ft_main_31): New const.
375 (s390_ft_main_64): New const.
376 (s390_ft_exit_fr): New const.
377 (s390_ft_exit_vr): New const.
378 (s390_ft_exit_misc): New const.
379 (s390_ft_exit_gpr_esa): New const.
380 (s390_ft_exit_gpr_zarch): New const.
381 (append_insns): New function.
382 (s390_relocate_instruction): New function.
383 (s390_install_fast_tracepoint_jump_pad): New function.
384 (s390_get_min_fast_tracepoint_insn_len): New function.
385 (s390_get_ipa_tdesc_idx): New function.
386 (struct linux_target_ops): Wire in the above functions.
387 (initialize_low_arch) [!__s390x__]: Don't initialize s390x tdescs.
388 * linux-s390-tdesc.h: New file.
389
a4105d04
MK
3902016-03-29 Marcin Kościelnicki <koriakin@0x04.net>
391
392 * linux-s390-low.c (s390_supports_tracepoints): New function.
393 (struct linux_target_ops): Fill supports_tracepoints hook.
394
35ac8b3e
YQ
3952016-03-18 Yao Qi <yao.qi@linaro.org>
396
397 * linux-low.c (lwp_signal_can_be_delivered): New function.
398 (linux_resume_one_lwp_throw): Use lwp_signal_can_be_delivered.
399
94610ec4
YQ
4002016-03-18 Yao Qi <yao.qi@linaro.org>
401
402 * linux-low.c (linux_resume_one_lwp_throw): Set 'signal' to
403 0 if signal is enqueued. Remove 'signal' from one debugging
404 message. Move one debugging message to some lines below.
405 Remove code setting 'signal' to 0.
406
80aea927
YQ
4072016-03-18 Yao Qi <yao.qi@linaro.org>
408
409 * linux-low.c (linux_low_filter_event): Remove redundant
410 WIFSTOPPED check together with linux_wstatus_maybe_breakpoint.
411
b04fd3be
MK
4122016-03-09 Marcin Kościelnicki <koriakin@0x04.net>
413
414 * linux-ppc-low.c (ppc_supports_tracepoints): New function.
415 (struct linux_target_ops): Wire in the above.
416
c40c8d4b
YQ
4172016-03-03 Yao Qi <yao.qi@linaro.org>
418
419 * linux-low.c: Update comments to start_step_over.
420
0f8288ae
YQ
4212016-03-03 Yao Qi <yao.qi@linaro.org>
422
423 PR server/19736
424 * linux-low.c (handle_extended_wait): Set child suspended
425 if event_lwp->bp_reinsert isn't zero.
426
fdbd04a8
YQ
4272016-03-02 Yao Qi <yao.qi@linaro.org>
428
429 * linux-low.c (linux_resume_one_lwp_throw): Replace code with
430 enqueue_pending_signal.
431
6896a8fa
MK
4322016-03-02 Marcin Kościelnicki <koriakin@0x04.net>
433
434 * tracepoint.c (cmd_qtstart): Only set ipa_tdesc_idx if agent
435 is actually loaded.
436
ab503087
MK
4372016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
438
439 * linux-s390-low.c (s390_num_regs_3264): Define on 31-bit too.
440 (s390_regmap_3264) [!__s390x__]: New global.
441 (s390_collect_ptrace_register): Skip map entries containing -1.
442 (s390_supply_ptrace_register): Ditto.
443 (s390_fill_gprs_high): New function.
444 (s390_store_gprs_high): New function.
445 (s390_regsets): Add NT_S390_HIGH_GPRS.
446 (s390_get_hwcap): Enable on 31-bit.
447 (have_hwcap_s390_high_gprs): Enable on 31-bit.
448 (s390_arch_setup): Enable detection of high GPRs, TDB, VX on 31-bit.
449 Detect NT_S390_HIGH_GPRS.
450 (s390_usrregs_info_3264): Enable on 31-bit.
451 (s390_regs_info): Enable regs_info_3264 on 31-bit.
452 (initialize_low_arch): Initialize s390_regsets_info_3264 on 31-bit.
453
ae91f625
MK
4542016-02-25 Marcin Kościelnicki <koriakin@0x04.net>
455
456 PR gdb/13808
457 * Makefile.in: Add i386-*-linux-ipa.o and amd64-*-linux-ipa.o.
458 * configure.srv: Ditto.
459 * linux-aarch64-ipa.c (get_ipa_tdesc): New function.
460 (initialize_low_tracepoint): Remove ipa_tdesc assignment.
461 * linux-amd64-ipa.c: Add "linux-x86-tdesc.h" include.
462 (init_registers_amd64_linux): Remove prototype.
463 (tdesc_amd64_linux): Remove declaration.
464 (get_ipa_tdesc): New function.
465 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
466 initialize remaining tdescs.
467 * linux-i386-ipa.c: Add "linux-x86-tdesc.h" include.
468 (init_registers_i386_linux): Remove prototype.
469 (tdesc_i386_linux): Remove declaration.
470 (get_ipa_tdesc): New function.
471 (initialize_low_tracepoint): Remove ipa_tdesc assignment,
472 initialize remaining tdescs.
473 * linux-low.c (linux_get_ipa_tdesc_idx): New function.
474 (linux_target_ops): wire in linux_get_ipa_tdesc_idx.
475 * linux-low.h (struct linux_target_ops): Add get_ipa_tdesc_idx.
476 * linux-x86-low.c: Move tdesc declarations to linux-x86-tdesc.h.
477 (x86_get_ipa_tdesc_idx): New function.
478 (the_low_target): Wire in x86_get_ipa_tdesc_idx.
479 * linux-x86-tdesc.h: New file.
480 * target.h (struct target_ops): Add get_ipa_tdesc_idx.
481 (target_get_ipa_tdesc_idx): New macro.
482 * tracepoint.c (ipa_tdesc_idx): New macro.
483 (struct ipa_sym_addresses): Add addr_ipa_tdesc_idx.
484 (symbol_list): Add ipa_tdesc_idx.
485 (cmd_qtstart): Write ipa_tdesc_idx in the target.
486 (ipa_tdesc): Remove.
487 (ipa_tdesc_idx): New variable.
488 (get_context_regcache): Use get_ipa_tdesc.
489 (gdb_collect): Ditto.
490 (gdb_probe): Ditto.
491 * tracepoint.h (get_ipa_tdesc): New prototype.
492 (ipa_tdesc): Remove.
493
e7ad2f14
PA
4942016-02-24 Pedro Alves <palves@redhat.com>
495
496 * linux-low.c (check_stopped_by_breakpoint): Rename to ...
497 (save_stop_reason): ... this. Use GDB_ARCH_IS_TRAP_HWBKPT and
498 handle ambiguous GDB_ARCH_IS_TRAP_BRKPT / GDB_ARCH_IS_TRAP_HWBKPT.
499 Factor out common code between the USE_SIGTRAP_SIGINFO and
500 !USE_SIGTRAP_SIGINFO blocks.
501 (linux_low_filter_event): Call save_stop_reason instead of
502 check_stopped_by_breakpoint and check_stopped_by_watchpoint.
503 Update comments.
504 (linux_wait_1): Update comments.
505
657f9cde
WW
5062016-02-24 Wei-cheng Wang <cole945@gmail.com>
507
508 * linux-ppc-low.c (ppc_supports_z_point_type): New function:
509 (ppc_insert_point, ppc_remove_point): Insert/remove z-packet breakpoints.
510 (ppc64_emit_ops_vector): Add target ops - ppc_supports_z_point_type,
511 ppc_insert_point, ppc_remove_point.
512
b00b61e1
MK
5132016-02-17 Marcin Kościelnicki <koriakin@0x04.net>
514
515 * linux-s390-low.c (s390_supports_z_point_type): New function.
516 (struct linux_target_ops): Wire s390_supports_z_point_type in.
517
553cb527
YQ
5182016-02-16 Yao Qi <yao.qi@linaro.org>
519
520 * linux-arm-low.c (get_next_pcs_syscall_next_pc): Remove argument
521 PC. Get pc from regcache_read_pc.
522
a5652c21
YQ
5232016-02-12 Yao Qi <yao.qi@linaro.org>
524
525 * linux-aarch64-low.c (aarch64_get_pc): Call linux_get_pc_64bit
526 or linux_get_pc_32bit.
527 (aarch64_set_pc): Call linux_set_pc_64bit or linux_set_pc_32bit.
528
ed443b61
YQ
5292016-02-12 Yao Qi <yao.qi@linaro.org>
530
531 * linux-arm-low.c (get_next_pcs_ops): Initialize it with
532 arm_linux_get_next_pcs_fixup.
533
020ecd38
MK
5342016-02-12 Marcin Kościelnicki <koriakin@0x04.net>
535
536 * tracepoint.c (x_tracepoint_action_download): Change
537 write_inferior_data_ptr to write_inferior_data_pointer.
538 (cmd_qtstart): Likewise.
539 (write_inferior_data_ptr): Remove.
540 (download_agent_expr): Change write_inferior_data_ptr to
541 write_inferior_data_pointer.
542 (download_tracepoint_1): Likewise.
543 (download_tracepoint): Likewise.
544 (download_trace_state_variables): Likewise.
545
7cae9051
WW
5462016-02-11 Wei-cheng Wang <cole945@gmail.com>
547 Marcin Kościelnicki <koriakin@0x04.net>
548
549 * tracepoint.c (struct tracepoint_action_ops): Remove.
550 (struct tracepoint_action): Remove ops.
551 (m_tracepoint_action_download, r_tracepoint_action_download)
552 (x_tracepoint_action_download, l_tracepoint_action_download): Adjust
553 size and offset accordingly.
554 (m_tracepoint_action_ops, r_tracepoint_action_ops)
555 (x_tracepoint_action_ops, l_tracepoint_action_ops): Remove.
556 (tracepoint_action_send, tracepoint_action_download): New functions.
557 Helpers for trace action handlers.
558 (add_tracepoint_action): Remove setup actions ops.
559 (download_tracepoint_1, tracepoint_send_agent): Call helper functions.
560
9f6a71b4
YQ
5612016-02-10 Yao Qi <yao.qi@linaro.org>
562
563 * regcache.c (regcache_raw_read_unsigned): Clear *VAL.
564
1e94266c
SM
5652016-02-09 Simon Marchi <simon.marchi@ericsson.com>
566
567 * configure.ac: Use AC_CONFIG_FILES instead of passing arguments
568 to AC_OUTPUT.
569 * configure: Regenerate.
570
8adce034
SM
5712016-02-09 Simon Marchi <simon.marchi@ericsson.com>
572
573 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): Change
574 void * to gdb_byte *.
575 * linux-low.c (siginfo_fixup): Likewise.
576 (linux_xfer_siginfo): Likewise.
577 * linux-low.h (struct linux_target_ops) <siginfo_fixup>:
578 Likewise.
579 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
580
93813b37
WT
5812016-02-02 Walfred Tedeschi <walfred.tedeschi@intel.com>
582
583 * configure.srv (x86_64-*-linux*): Add amd64-linux-siginfo.o
584 to srv_tgtobj.
585 (i[34567]86-*-linux*): Add amd64-linux-siginfo.o
586 to srv_tgtobj.
587 * linux-x86-low.c [__x86_64__]: Include
588 "nat/amd64-linux-siginfo.h".
589 (compat_siginfo_from_siginfo, siginfo_from_compat_siginfo)
590 (compat_x32_siginfo_from_siginfo, siginfo_from_compat_x32_siginfo)
591 (compat_timeval, compat_sigval, compat_x32_clock, cpt_si_pid)
592 (cpt_si_uid, cpt_si_timerid, cpt_si_overrun, cpt_si_status)
593 (cpt_si_utime, cpt_si_stime, cpt_si_ptr, cpt_si_addr, cpt_si_band)
594 (cpt_si_fd, si_timerid, si_overrun): Move from
595 nat/amd64-linux-siginfo.c.
596 * Makefile.in (amd64-linux-siginfo.o:): New rule.
597
8424cc97
SM
5982016-01-28 Simon Marchi <simon.marchi@ericsson.com>
599
600 * server.c (skip_to_semicolon): Remove.
601 (process_point_options): Use strchrnul instead of
602 skip_to_semicolon.
603
4d18591b
YQ
6042016-01-26 Yao Qi <yao.qi@linaro.org>
605
606 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Remove argument pc.
607 * linux-low.c (install_software_single_step_breakpoints): Don't
608 call regcache_read_pc.
609 * linux-low.h (struct linux_target_ops) <get_next_pcs>: Remove
610 argument pc.
611
d8020970
YQ
6122016-01-26 Yao Qi <yao.qi@linaro.org>
613
614 * linux-low.c (install_software_single_step_breakpoints): Call
615 regcache_read_pc instead of get_pc.
616
8b207339
YQ
6172016-01-26 Yao Qi <yao.qi@linaro.org>
618
619 * remote-utils.c (remote_close) [!USE_WIN32API]: Ignore SIGIO.
620 (unblock_async_io): Rename to ...
621 (block_unblock_async_io): ... it. New function.
622 (enable_async_io): Don't install SIGIO handler. Unblock it
623 instead.
624 (disable_async_io): Don't ignore SIGIO. Block it instead.
625 (initialize_async_io): Install SIGIO handler. Don't call
626 unblock_async_io.
627
18879fef
YQ
6282016-01-26 Yao Qi <yao.qi@linaro.org>
629
630 * remote-utils.c (getpkt): If the buffer isn't empty, and the
631 first character is '\003', call *the_target->request_interrupt.
632
a0f8e08a
YQ
6332016-01-25 Yao Qi <yao.qi@linaro.org>
634
635 * remote-utils.c (new_thread_notify): Remove.
636 (dead_thread_notify): Likewise.
637 * remote-utils.h (new_thread_notify): Remove declaration.
638 (dead_thread_notify): Likewise.
639
cc5fd9ab
MK
6402016-01-23 Marcin Kościelnicki <koriakin@0x04.net>
641
642 * gdb.trace/pending.exp: Fix expected message on continue.
643
99e8eb11
MK
6442016-01-22 Marcin Kościelnicki <koriakin@0x04.net>
645
646 * tracepoint.c (write_inferior_data_ptr): Cast to uintptr_t, so that
647 it works properly on big-endian machines where sizeof (CORE_ADDR)
648 != sizeof (void *).
649
a994041d
PA
6502016-01-21 Pedro Alves <palves@redhat.com>
651
652 * Makefile.in (COMPILER_CFLAGS, CXXFLAGS): New.
653 (INTERNAL_CFLAGS_BASE): Use COMPILER_CFLAGS instead of CFLAGS.
654 * configure: Regenerate.
655
f7a6a40d
YQ
6562016-01-21 Yao Qi <yao.qi@linaro.org>
657
658 * linux-arm-low.c (arm_sigreturn_next_pc): Add parameter
659 is_thumb and set it according to CPSR saved on the stack.
660 (get_next_pcs_syscall_next_pc): Pass is_thumb to
661 arm_sigreturn_next_pc.
662
6f69e520
YQ
6632016-01-18 Yao Qi <yao.qi@linaro.org>
664
665 * linux-low.c (linux_set_pc_64bit): New function.
666 (linux_get_pc_64bit): New function.
667 * linux-low.h (linux_set_pc_64bit, linux_get_pc_64bit):
668 Declare.
669 * linux-sparc-low.c (debug_threads): Remove declaration.
670 (sparc_get_pc): Remove.
671 (the_low_target): Use linux_get_pc_64bit instead of
672 sparc_get_pc.
673 * linux-tile-low.c (tile_get_pc, tile_set_pc): Remove.
674 (the_low_target): Use linux_get_pc_64bit and
675 linux_set_pc_64bit.
676
276d4552
YQ
6772016-01-18 Yao Qi <yao.qi@linaro.org>
678
679 * linux-arm-low.c (debug_threads): Remove declaration.
680 (arm_get_pc, arm_set_pc): Remove.
681 (the_low_target): Use linux_get_pc_32bit and
682 linux_set_pc_32bit.
683 * linux-bfin-low.c (bfin_get_pc, bfin_set_pc): Remove.
684 (the_low_target): Use linux_get_pc_32bit and
685 linux_set_pc_32bit.
686 * linux-cris-low.c (debug_threads): Remove declaration.
687 (cris_get_pc, cris_set_pc,): Remove.
688 (the_low_target): Use linux_get_pc_32bit and
689 linux_set_pc_32bit.
690 * linux-crisv32-low.c (debug_threads): Remove declaration.
691 (cris_get_pc, cris_set_pc): Remove.
692 (the_low_target): Use linux_get_pc_32bit and
693 linux_set_pc_32bit.
694 * linux-low.c: Include inttypes.h.
695 (linux_get_pc_32bit, linux_set_pc_32bit): New functions.
696 * linux-low.h (linux_get_pc_32bit, linux_set_pc_32bit): Declare.
697 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Remove.
698 (the_low_target): Use linux_get_pc_32bit and
699 linux_set_pc_32bit.
700 * linux-m68k-low.c (m68k_get_pc, m68k_set_pc): Remove.
701 (the_low_target): Use linux_get_pc_32bit and
702 linux_set_pc_32bit.
703 * linux-nios2-low.c (nios2_get_pc, nios2_set_pc): Remove.
704 (the_low_target): Use linux_get_pc_32bit and
705 linux_set_pc_32bit.
706 * linux-sh-low.c (sh_get_pc, sh_set_pc): Remove.
707 (the_low_target): Use linux_get_pc_32bit and
708 linux_set_pc_32bit.
709 * linux-xtensa-low.c (xtensa_get_pc, xtensa_set_pc): Remove.
710 (the_low_target): Use linux_get_pc_32bit and
711 linux_set_pc_32bit.
712
eb0edac8
GB
7132016-01-18 Gary Benson <gbenson@redhat.com>
714
715 * configure.ac (AC_FUNC_FORK): New check.
716 * config.in: Regenerate.
717 * configure: Likewise.
718
1b451dda
YQ
7192016-01-14 Yao Qi <yao.qi@linaro.org>
720
721 * linux-aarch32-low.c (thumb2_breakpoint): Make it static.
722 * linux-aarch32-low.h (thumb2_breakpoint): Remove declaration.
723 * linux-arm-low.c (arm_gdbserver_get_next_pcs): Pass 1 to
724 arm_get_next_pcs_ctor.
725
82075af2
JS
7262016-01-12 Josh Stone <jistone@redhat.com>
727 Philippe Waroquiers <philippe.waroquiers@skynet.be>
728
729 * inferiors.h: Include "gdb_vecs.h".
730 (struct process_info): Add syscalls_to_catch.
731 * inferiors.c (remove_process): Free syscalls_to_catch.
732 * remote-utils.c (prepare_resume_reply): Report syscall_entry and
733 syscall_return stops.
734 * server.h (UNKNOWN_SYSCALL, ANY_SYSCALL): Define.
735 * server.c (handle_general_set): Handle QCatchSyscalls.
736 (handle_query): Report support for QCatchSyscalls.
737 * target.h (struct target_ops): Add supports_catch_syscall.
738 (target_supports_catch_syscall): New macro.
739 * linux-low.h (struct linux_target_ops): Add get_syscall_trapinfo.
740 (struct lwp_info): Add syscall_state.
741 * linux-low.c (handle_extended_wait): Mark syscall_state as an entry.
742 Maintain syscall_state and syscalls_to_catch across exec.
743 (get_syscall_trapinfo): New function, proxy to the_low_target.
744 (linux_low_ptrace_options): Enable PTRACE_O_TRACESYSGOOD.
745 (linux_low_filter_event): Toggle syscall_state entry/return for
746 syscall traps, and set it ignored for all others.
747 (gdb_catching_syscalls_p): New function.
748 (gdb_catch_this_syscall_p): New function.
749 (linux_wait_1): Handle SYSCALL_SIGTRAP.
750 (linux_resume_one_lwp_throw): Add PTRACE_SYSCALL possibility.
751 (linux_supports_catch_syscall): New function.
752 (linux_target_ops): Install it.
753 * linux-x86-low.c (x86_get_syscall_trapinfo): New function.
754 (the_low_target): Install it.
755
8f13a3ce
MF
7562016-01-12 Mike Frysinger <vapier@gentoo.org>
757
758 * acinclude.m4: Include new ../warning.m4 file.
759 * configure: Regenerated.
760 * configure.ac: Replace all warning logic with AM_GDB_WARNINGS.
761
5b3da067
MF
7622016-01-12 Mike Frysinger <vapier@gentoo.org>
763
764 * ax.c (is_goto_target): Mark static.
765 * linux-low.c (register_addr): Likewise.
766 (linux_fetch_registers, linux_store_registers): Likewise.
767 * mem-break.c (any_persistent_commands): Fix old prototype.
768 (add_commands_to_breakpoint): Mark static.
769 * regcache.c (find_register_by_name): Delete unused func.
770 * remote-utils.c (hex_or_minus_one): Mark static.
771 * server.c (monitor_show_help): Mark static.
772 (handle_query, handle_v_cont, handle_v_attach, handle_v_kill,
773 handle_v_requests): Likewise.
774
bc504a31
PA
7752016-01-12 Pedro Alves <palves@redhat.com>
776
777 Remove use of the registered trademark symbol throughout.
778
5a0dd67a
YQ
7792016-01-08 Yao Qi <yao.qi@linaro.org>
780
781 * remote-utils.c (getpkt): If c is '\003', call target hook
782 request_interrupt.
783
b2ca446f
YQ
7842016-01-06 Yao Qi <yao.qi@linaro.org>
785
786 * linux-aarch32-low.h (arm_abi_breakpoint): Move to
787 linux-aarch32-low.c.
788 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
789 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
790 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
791 (thumb2_breakpoint): Declare.
792 * linux-aarch32-low.c (arm_abi_breakpoint): Moved from
793 linux-aarch32-low.h.
794 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
795 (arm_breakpoint_len, thumb_breakpoint_len): Likewise.
796 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
797
edd88788
JB
7982016-01-01 Joel Brobecker <brobecker@adacore.com>
799
800 * gdbreplay.c (gdbreplay_version): Change copyright year in
801 version message.
802 * server.c (gdbserver_version): Likewise.
803
65da7f14
PP
8042015-12-28 Patrick Palka <patrick@parcs.ath.cx>
805
806 * server.c (crc32_table): Delete.
807 (crc32): Use libiberty's xcrc32 function.
808
4abd5ed2
JB
8092015-12-22 Joel Brobecker <brobecker@adacore.com>
810
811 * lynx-low.c (lynx_delete_thread_callback): New function.
812 (lynx_mourn): Properly delete our process and all of its
813 threads. Remove call to clear_inferiors.
814
0e50fe5c
JB
8152015-12-22 Joel Brobecker <brobecker@adacore.com>
816
817 * target.c (thread_search_callback): Add check that
818 the thread_stopped target callback is not NULL before
819 calling it.
820
35adc03f
YQ
8212015-12-21 Yao Qi <yao.qi@linaro.org>
822
823 * linux-aarch32-low.h [__aarch64__]: Use arm_abi_breakpoint
824 arm breakpoint.
825
bd2b2909
AT
8262015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
827
828 * server.c (handle_query): Call target_supports_software_single_step.
829
7fe5e27e
AT
8302015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
831
832 * linux-low.c (single_step): New function.
833 (linux_resume_one_lwp_throw): Call single_step.
834 (start_step_over): Likewise.
835
d9311bfa
AT
8362015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
837
838 * Makefile.in (SFILES): Append arch/arm-linux.c,
839 arch/arm-get-next-pcs.c.
840 (arm-linux.o): New rule.
841 (arm-get-next-pcs.o): New rule.
842 * configure.srv (arm*-*-linux*): Add arm-get-next-pcs.o,
843 arm-linux.o.
844 * linux-aarch32-low.c (arm_abi_breakpoint): Remove macro. Moved
845 to linux-aarch32-low.c.
846 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
847 (arm_breakpoint_len, thumb_breakpoint): Likewise.
848 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
849 (thumb2_breakpoint_len): Likewise.
850 (arm_is_thumb_mode): Make non-static.
851 * linux-aarch32-low.h (arm_abi_breakpoint): New macro. Moved
852 from linux-aarch32-low.c.
853 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
854 (arm_breakpoint_len, thumb_breakpoint): Likewise.
855 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
856 (thumb2_breakpoint_len): Likewise.
857 (arm_is_thumb_mode): New declaration.
858 * linux-arm-low.c: Include arch/arm-linux.h
859 aarch/arm-get-next-pcs.h, sys/syscall.h.
860 (get_next_pcs_ops): New struct.
861 (get_next_pcs_addr_bits_remove): New function.
862 (get_next_pcs_is_thumb): New function.
863 (get_next_pcs_read_memory_unsigned_integer): Likewise.
864 (arm_sigreturn_next_pc): Likewise.
865 (get_next_pcs_syscall_next_pc): Likewise.
866 (arm_gdbserver_get_next_pcs): Likewise.
867 (struct linux_target_ops) <arm_gdbserver_get_next_pcs>:
868 Initialize.
869 * linux-low.h: Move CORE_ADDR vector definition to gdb_vecs.h.
870 * server.h: Include gdb_vecs.h.
871
68ce2059
AT
8722015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
873
874 * Makefile.in (SFILES): Append common/common-regcache.c.
875 (OBS): Append common-regcache.o.
876 (common-regcache.o): New rule.
877 * regcache.c (init_register_cache): Initialize cache to
878 REG_UNAVAILABLE.
879 (regcache_raw_read_unsigned): New function.
880 * regcache.h (REG_UNAVAILABLE, REG_VALID): Replaced by shared
881 register_status enum.
882
fa5308bd
AT
8832015-12-18 Antoine Tremblay <antoine.tremblay@ericsson.com>
884
885 * linux-aarch64-low.c (the_low_targets): Rename
886 breakpoint_reinsert_addr to get_next_pcs.
887 * linux-arm-low.c (the_low_targets): Likewise.
888 * linux-bfin-low.c (the_low_targets): Likewise.
889 * linux-cris-low.c (the_low_targets): Likewise.
890 * linux-crisv32-low.c (the_low_targets): Likewise.
891 * linux-low.c (can_software_single_step): Likewise.
892 (install_software_single_step_breakpoints): New function.
893 (start_step_over): Use install_software_single_step_breakpoints.
894 * linux-low.h: New CORE_ADDR vector.
895 (struct linux_target_ops) Rename breakpoint_reinsert_addr to
896 get_next_pcs.
897 * linux-mips-low.c (the_low_targets): Likewise.
898 * linux-nios2-low.c (the_low_targets): Likewise.
899 * linux-sparc-low.c (the_low_targets): Likewise.
900
4a6ed09b
PA
9012015-12-17 Pedro Alves <palves@redhat.com>
902
903 * linux-low.c (linux_kill_one_lwp): Remove references to
904 LinuxThreads.
905 (kill_lwp): Remove HAVE_TKILL_SYSCALL check. No longer fall back
906 to 'kill'.
907 (linux_init_signals): Delete.
908 (initialize_low): Adjust.
909 * thread-db.c (thread_db_init): Remove LinuxThreads reference.
910
7544db95
PA
9112015-12-16 Pedro Alves <palves@redhat.com>
912
913 * configure.ac (compiler warning flags): When testing a
914 -Wno-foo option, check whether -Wfoo works instead.
915 * configure: Regenerate.
916
8020350c
DB
9172015-12-11 Don Breazeal <donb@codesourcery.com>
918
919 * server.c (process_serial_event): Don't exit from gdbserver
920 in remote mode if there are still active inferiors.
921
db91f502
YQ
9222015-12-11 Yao Qi <yao.qi@linaro.org>
923
924 * linux-aarch64-low.c (aarch64_breakpoint_at): Call
925 arm_breakpoint_at if the process is 32-bit.
926
b37a6290
YQ
9272015-12-11 Yao Qi <yao.qi@linaro.org>
928
929 * linux-aarch32-low.c [__aarch64__]: Use arm_abi_breakpoint
930 arm breakpoint.
931
17b1509a
YQ
9322015-12-07 Yao Qi <yao.qi@linaro.org>
933
934 * configure.srv: Append arm.o to srv_tgtobj for
935 aarch64*-*-linux* target.
936 * linux-aarch32-low.c (arm_abi_breakpoint): New macro. Moved
937 from linux-arm-low.c.
938 (arm_eabi_breakpoint, arm_breakpoint): Likewise.
939 (arm_breakpoint_len, thumb_breakpoint): Likewise.
940 (thumb_breakpoint_len, thumb2_breakpoint): Likewise.
941 (thumb2_breakpoint_len): Likewise.
942 (arm_is_thumb_mode, arm_breakpoint_at): Likewise.
943 (arm_breakpoint_kinds): Likewise.
944 (arm_breakpoint_kind_from_pc): Likewise.
945 (arm_sw_breakpoint_from_kind): Likewise.
946 (arm_breakpoint_kind_from_current_state): Likewise.
947 * linux-aarch32-low.h (arm_breakpoint_kind_from_pc): Declare.
948 (arm_sw_breakpoint_from_kind): Declare.
949 (arm_breakpoint_kind_from_current_state): Declare.
950 (arm_breakpoint_at): Declare.
951 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): Call
952 arm_sw_breakpoint_from_kind if process is 32-bit.
953 (aarch64_breakpoint_kind_from_pc): New function.
954 (aarch64_breakpoint_kind_from_current_state): New function.
955 (the_low_target): Initialize fields breakpoint_kind_from_pc
956 and breakpoint_kind_from_current_state.
957 * linux-arm-low.c (arm_breakpoint_kinds): Move to
958 linux-aarch32-low.c.
959 (arm_abi_breakpoint, arm_eabi_breakpoint): Likewise.
960 (arm_breakpoint, arm_breakpoint_len): Likewise.
961 (thumb_breakpoint, thumb_breakpoint_len): Likewise.
962 (thumb2_breakpoint, thumb2_breakpoint_len): Likewise.
963 (arm_is_thumb_mode): Likewise.
964 (arm_breakpoint_at): Likewise.
965 (arm_breakpoint_kind_from_pc): Likewise.
966 (arm_sw_breakpoint_from_kind): Likewise.
967 (arm_breakpoint_kind_from_current_state): Likewise.
968
969 Revert:
970 2015-08-04 Yao Qi <yao.qi@linaro.org>
971
972 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
973 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
974 * server.c (extended_protocol): Remove "static".
975 * server.h (extended_protocol): Declare it.
976
ece66d65
JS
9772015-12-04 Josh Stone <jistone@redhat.com>
978
979 * target.h (struct target_ops) <arch_setup>: Rename to ...
980 (struct target_ops) <post_create_inferior>: ... this.
981 (target_arch_setup): Rename to ...
982 (target_post_create_inferior): ... this, calling post_create_inferior.
983 * server.c (start_inferior): Update target_arch_setup calls to
984 target_post_create_inferior.
985 * linux-low.c (linux_low_ptrace_options): Forward declare.
986 (linux_arch_setup): Update its comment for general use.
987 (linux_post_create_inferior): New, run arch_setup and setup ptrace.
988 (struct linux_target_ops): Use linux_post_create_inferior.
989 * lynx-low.c (struct lynx_target_ops): Update arch_setup stub comment
990 to post_create_inferior.
991 * nto-low.c (struct nto_target_ops): Likewise.
992 * spu-low.c (struct spu_target_ops): Likewise.
993 * win32-low.c (struct win32_target_ops): Likewise.
994
e58c48b4
AT
9952015-12-03 Antoine Tremblay <antoine.tremblay@ericsson.com>
996
997 * linux-arm-low.c: Remove duplicate arch/arm.h include.
998
fbec8956
AT
9992015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1000
1001 * linux-arm-low.c (arm_reinsert_addr): Remove function.
1002 (struct linux_target_ops <breakpoint_reinsert_addr>: Set to NULL.
1003 * linux-cris-low.c (cris_reinsert_addr> Remove function.
1004 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1005 * linux-crisv32-low.c (cris_reinsert_addr): Remove function.
1006 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1007 * linux-mips-low.c (mips_reinsert_addr): Remove function.
1008 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1009 * linux-nios2-low.c (nios2_reinsert_addr): Remove function.
1010 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1011 * linux-sparc-low.c (sparc_reinsert_addr): Remove function.
1012 (struct linux_target_ops) <breakpoint_reinsert_addr>: Set to NULL.
1013
9b4c5f87
AT
10142015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1015
1016 * linux-low.c (linux_look_up_symbols): Don't call
1017 linux_supports_traceclone.
1018 * linux-low.h (thread_db_init): Remove use_events argument.
1019 * thread-db.c (thread_db_use_event): Remove global variable.
1020 (struct thread_db) <td_thr_event_enable_p>: Remove field.
1021 (struct thread_db) <td_create_bp>: Remove field.
1022 (thread_db_create_event): Remove function.
1023 (thread_db_enable_reporting): Likewise.
1024 (find_one_thread): Don't check for thread_db_use_events.
1025 (attach_thread): Likewise.
1026 (thread_db_load_search): Remove td_thr_event_enable_p initialization.
1027 (try_thread_db_load_1): Don't check for thread_db_use_events.
1028 (thread_db_init): Remove use_events argument and thread events
1029 handling.
1030 (remove_thread_event_breakpoints): Remove function.
1031 (thread_db_detach): Remove call to remove_thred_event_breakpoints.
1032
7d00775e
AT
10332015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1034
1035 * linux-aarch64-low.c (aarch64_supports_hardware_single_step):
1036 New function.
1037 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1038 * linux-arm-low.c (arm_supports_hardware_single_step): New function.
1039 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1040 * linux-bfin-low.c (bfin_supports_hardware_single_step): New function.
1041 (struct linux_target_ops) <bfin_supports_hardware_single_step>:
1042 Initialize.
1043 * linux-crisv32-low.c (cris_supports_hardware_single_step):
1044 New function.
1045 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1046 * linux-low.c (can_hardware_single_step): Use
1047 supports_hardware_single_step.
1048 (can_software_single_step): New function.
1049 (start_step_over): Call can_software_single_step.
1050 (linux_supports_hardware_single_step): New function.
1051 (struct target_ops) <supports_software_single_step>: Initialize.
1052 * linux-low.h (struct linux_target_ops)
1053 <supports_hardware_single_step>: Initialize.
1054 * linux-m32r-low.c (m32r_supports_hardware_single_step): New function.
1055 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1056 * linux-ppc-low.c (ppc_supports_hardware_single_step): New function.
1057 (struct linux_target_ops) <supports_hardware_single_step> Initialize.
1058 * linux-s390-low.c (s390_supports_hardware_single_step): New function.
1059 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1060 * linux-sh-low.c (sh_supports_hardware_single_step): New function.
1061 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1062 * linux-tic6x-low.c (tic6x_supports_hardware_single_step): New function.
1063 (struct linux_target_ops) <tic6x_supports_hardware_single_step>:
1064 Initialize.
1065 * linux-tile-low.c (tile_supports_hardware_single_step): New function.
1066 (struct linux_target_ops) <tile_supports_hardware_single_step>:
1067 Initialize.
1068 * linux-x86-low.c (x86_supports_hardware_single_step) New function.
1069 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1070 * linux-xtensa-low.c (xtensa_supports_hardware_single_step):
1071 New function.
1072 (struct linux_target_ops) <supports_hardware_single_step>: Initialize.
1073 * target.h (struct target_ops): <supports_software_single_step>:
1074 New field.
1075 (target_supports_software_single_step): New macro.
1076
2d97cd35
AT
10772015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1078
1079 * linux-low.c (linux_wait_1): Fix pc advance condition.
1080 * mem-break.c (reinsert_breakpoint_inserted_here): New function.
1081 * mem-break.h (reinsert_breakpoint_inserted_here): New declaration.
1082
769ef81f
AT
10832015-11-30 Antoine Tremblay <antoine.tremblay@ericsson.com>
1084
1085 * linux-arm-low.c (arm_is_thumb_mode): New function.
1086 (arm_breakpoint_at): Use arm_is_thumb_mode.
1087 (arm_breakpoint_kind_from_current_state): New function.
1088 (struct linux_target_ops) <breakpoint_kind_from_current_state>:
1089 Initialize.
1090 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_current_state.
1091 (linux_breakpoint_kind_from_current_state): New function.
1092 (struct target_ops <breakpoint_kind_from_current_state>: Initialize.
1093 * linux-low.h (struct linux_target_ops)
1094 <breakpoint_kind_from_current_state>: New field.
1095 * target.h (struct target_ops): Likewise.
1096 (target_breakpoint_kind_from_current_state): New macro.
1097
1bebeeca
PA
10982015-11-30 Pedro Alves <palves@redhat.com>
1099
1100 * linux-low.c (linux_resume): Wake up the event loop before
1101 returning.
1102
a67a9fae
PA
11032015-11-30 Pedro Alves <palves@redhat.com>
1104
1105 * mem-break.c (check_gdb_bp_preconditions): Remove current_thread
1106 check.
1107 (set_gdb_breakpoint): If prepare_to_access_memory fails, set *ERR
1108 to -1.
1109 * target.c (struct thread_search): New structure.
1110 (thread_search_callback): New function.
1111 (prev_general_thread): New global.
1112 (prepare_to_access_memory, done_accessing_memory): New functions.
1113 * target.h (prepare_to_access_memory, done_accessing_memory):
1114 Replace macros with function declarations.
1115
f2faf941
PA
11162015-11-30 Pedro Alves <palves@redhat.com>
1117
1118 PR 14618
1119 * linux-low.c (linux_wait_1): If the last resumed thread is gone,
1120 report TARGET_WAITKIND_NO_RESUMED.
1121 * remote-utils.c (prepare_resume_reply): Handle
1122 TARGET_WAITKIND_NO_RESUMED.
1123 * server.c (report_no_resumed): New global.
1124 (handle_query) <qSupported>: Handle "no-resumed+". Report
1125 "no-resumed+" support.
1126 (resume): When the target reports TARGET_WAITKIND_NO_RESUMED, only
1127 return error if the client doesn't support no-resumed events.
1128 (push_stop_notification): New function.
1129 (handle_target_event): Use it. Report TARGET_WAITKIND_NO_RESUMED
1130 events if the client supports them.
1131
a681f9c9
PA
11322015-11-30 Pedro Alves <palves@redhat.com>
1133
1134 * linux-low.c (thread_still_has_status_pending_p): Don't check
1135 vCont;t here.
1136 (lwp_resumed): New function.
1137 (status_pending_p_callback): Return early if the LWP is not
1138 supposed to be resumed.
1139
65706a29
PA
11402015-11-30 Pedro Alves <palves@redhat.com>
1141
1142 * linux-low.c (handle_extended_wait): Assert that the LWP's
1143 waitstatus is TARGET_WAITKIND_IGNORE. If GDB wants to hear about
1144 thread create events, leave the new child's status pending.
1145 (linux_low_filter_event): If GDB wants to hear about thread exit
1146 events, leave the LWP marked dead and don't delete it.
1147 (linux_wait_for_event_filtered): Don't check for thread exit.
1148 (filter_exit_event): New function.
1149 (linux_wait_1): Use it, when returning an exit event.
1150 (linux_resume_one_lwp_throw): Assert that the LWP's
1151 waitstatus is TARGET_WAITKIND_IGNORE.
1152 * remote-utils.c (prepare_resume_reply): Handle
1153 TARGET_WAITKIND_THREAD_CREATED and TARGET_WAITKIND_THREAD_EXITED.
1154 * server.c (report_thread_events): New global.
1155 (handle_general_set): Handle QThreadEvents.
1156 (handle_query) <qSupported>: Handle and report QThreadEvents+;
1157 (handle_target_event): Handle TARGET_WAITKIND_THREAD_CREATED and
1158 TARGET_WAITKIND_THREAD_EXITED.
1159 * server.h (report_thread_events): Declare.
1160
56cf4bed
PA
11612015-11-30 Pedro Alves <palves@redhat.com>
1162
1163 * linux-low.c (resume_stopped_resumed_lwps): Don't check whether
1164 the thread's last_resume_kind was resume_stop.
1165
500c1d85
PA
11662015-11-30 Pedro Alves <palves@redhat.com>
1167
1168 * linux-low.c (linux_attach): In non-stop mode, wait for one stop
1169 before returning.
1170
de979965
PA
11712015-11-30 Pedro Alves <palves@redhat.com>
1172
1173 * server.c (handle_v_requests): Handle vCtrlC.
1174
34c65914
PA
11752015-11-30 Pedro Alves <palves@redhat.com>
1176
1177 * gdbthread.h (find_any_thread_of_pid): Declare.
1178 * inferiors.c (thread_of_pid, find_any_thread_of_pid): New
1179 functions.
1180 * server.c (handle_query): If current_thread is NULL, look for
1181 another thread of the selected process.
1182
79efa585 11832015-11-26 Daniel Colascione <dancol@dancol.org>
01a49af8 1184 Simon Marchi <simon.marchi@ericsson.com>
79efa585
SM
1185
1186 * linux-low.c (linux_target_ops): Use linux_proc_tid_get_name.
1187 * server.c (handle_qxfer_threads_worker): Refactor to include thread
1188 name in reply.
1189 * target.h (struct target_ops) <thread_name>: New field.
1190 (target_thread_name): New macro.
1191
80d82c19
JB
11922015-11-23 Joel Brobecker <brobecker@adacore.com>
1193
1194 * regcache.h (regcache_invalidate_pid): Add declaration.
1195 * regcache.c (regcache_invalidate_pid): New function, extracted
1196 from regcache_invalidate.
1197 (regcache_invalidate): Reimplement using regcache_invalidate_pid.
1198 Add trivial documentation comment.
1199 * lynx-low.c: Use regcache_invalidate_pid instead of
1200 regcache_invalidate.
1201
64da5dd5
JB
12022015-11-23 Joel Brobecker <brobecker@adacore.com>
1203
1204 * configure.ac: Do not call AC_CHECK_TYPES for Elf32_auxv_t
1205 and Elf64_auxv_t if the target is Android.
1206
37ce4055
DE
12072015-11-22 Doug Evans <xdje42@gmail.com>
1208
1209 * target.h: #include <sys/types.h>.
1210
06e03fff
PA
12112015-11-19 Pedro Alves <palves@redhat.com>
1212
1213 * linux-low.c (linux_process_qsupported): Change prototype.
1214 Adjust.
1215 * linux-low.h (struct linux_target_ops) <process_qsupported>:
1216 Change prototype.
1217 * linux-x86-low.c (x86_linux_process_qsupported): Change prototype
1218 and adjust to loop over all features.
1219 * server.c (handle_query) <qSupported>: Adjust to call
1220 target_process_qsupported once, passing it a vector of unprocessed
1221 features.
1222 * target.h (struct target_ops) <process_qsupported>: Change
1223 prototype.
1224 (target_process_qsupported): Adjust.
1225
9a084706
PA
12262015-11-19 Pedro Alves <palves@redhat.com>
1227
1228 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
1229 mode.
1230 * configure: Regenerate.
1231
dad44a1f
PA
12322015-11-19 Pedro Alves <palves@redhat.com>
1233
1234 * configure: Regenerate.
1235
231c0592
YQ
12362015-11-19 Yao Qi <yao.qi@linaro.org>
1237
1238 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
1239 type to uint32_t.
1240
6c1c9a8b
YQ
12412015-11-19 Yao Qi <yao.qi@linaro.org>
1242
1243 * linux-aarch64-low.c (enum aarch64_operand_type): New.
1244 (struct aarch64_operand): Move enum out.
1245
9caa3311
YQ
12462015-11-19 Yao Qi <yao.qi@linaro.org>
1247
1248 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
1249 struct user_fpsimd_state *.
1250 (aarch64_store_fpregset): Likewise.
1251
6a69a054
YQ
12522015-11-19 Yao Qi <yao.qi@linaro.org>
1253
1254 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
1255 struct user_pt_regs *.
1256 (aarch64_store_gregset): Likewise.
1257
1798301e
PA
12582015-11-18 Pedro Alves <palves@redhat.com>
1259
1260 * Makefile.in (all_object_files): Add $IPA_OBJS.
1261
ce7715e2
PA
12622015-11-17 Pedro Alves <palves@redhat.com>
1263
1264 * win32-low.c (win32_resume): Use gdb_signal_from_host,
1265 GDB_SIGNAL_0 and gdb_signal_to_string.
1266
c0879059
PA
12672015-11-17 Pedro Alves <palves@redhat.com>
1268
1269 * win32-low.c (handle_output_debug_string): Remove parameter.
1270 (win32_kill): Remove our_status local and adjust call to
1271 handle_output_debug_string.
1272 (get_child_debug_event): Adjust call to
1273 handle_output_debug_string.
1274
1996e237
SM
12752015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1276
1277 * linux-mips-low.c (mips_fill_gregset): Add cast.
1278 (mips_store_gregset): Likewise.
1279 (mips_fill_fpregset): Likewise.
1280 (mips_store_fpregset): Likewise.
1281
cbec665b
SM
12822015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1283
1284 * linux-mips-low.c (mips_add_watchpoint): Rename private to
1285 priv.
1286
eb3e3c67
SM
12872015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1288
1289 * linux-mips-low.c (mips_linux_new_thread): Change type of
1290 watch_type to enum target_hw_bp_type.
1291
171de4b8
SM
12922015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1293
1294 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
1295 Change return type to arm_hwbp_type.
1296
04248ead
SM
12972015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1298
1299 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
1300 (arm_store_gregset): Likewise.
1301 * linux-arm-low.c (arm_get_hwcap): Likewise.
1302 (arm_read_description): Likewise.
1303
04b3479c
SM
13042015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1305
1306 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
1307
2bc84e8a
SM
13082015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1309
1310 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
1311 (ppc_fill_vsxregset): Likewise.
1312 (ppc_store_vsxregset): Likewise.
1313 (ppc_fill_vrregset): Likewise.
1314 (ppc_store_vrregset): Likewise.
1315 (ppc_fill_evrregset): Likewise.
1316 (ppc_store_evrregset): Likewise.
1317
e6c5bb05
SM
13182015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
1319
1320 * linux-ppc-low.c (ppc_usrregs_info): Remove
1321 forward-declaration.
1322 (ppc_arch_setup): Move lower in file.
1323
7ea45d72
SM
13242015-10-30 Simon Marchi <simon.marchi@ericsson.com>
1325
1326 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
1327 (ps_pdwrite): Likewise.
1328
69291610
HW
13292015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
1330
1331 * linux-arm-low.c (arm_new_thread): Move pointer dereference
1332 to after assert checks.
1333
b42945fd
SM
13342015-10-29 Simon Marchi <simon.marchi@ericsson.com>
1335
1336 * proc-service.c (ps_pdread): Add/adjust casts.
1337 (ps_pdwrite): Add/adjust casts.
1338
d6f85c84
SM
13392015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1340
1341 * server.c (handle_search_memory_1): Cast return value of
1342 memmem.
1343
f98cd059
SM
13442015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
1345
1346 * server.c (write_qxfer_response): Change type of data to
1347 gdb_byte *.
1348
d2412fa5
PA
13492015-10-29 Pedro Alves <palves@redhat.com>
1350
1351 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
1352
c17414a2
PA
13532015-10-29 Pedro Alves <palves@redhat.com>
1354
1355 * tracepoint.c (clear_installed_tracepoints): Add casts.
1356
e053fbc4
PA
13572015-10-29 Pedro Alves <palves@redhat.com>
1358
1359 * server.c (handle_v_cont, process_serial_event): Add enum
1360 gdb_signal casts to signal parsing code.
1361
add67df8
PA
13622015-10-29 Pedro Alves <palves@redhat.com>
1363
1364 * linux-low.h (NULL_REGSET): Define.
1365 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1366 * linux-arm-low.c (arm_regsets): Likewise.
1367 * linux-crisv32-low.c (cris_regsets): Likewise.
1368 * linux-m68k-low.c (m68k_regsets): Likewise.
1369 * linux-mips-low.c (mips_regsets): Likewise.
1370 * linux-nios2-low.c (nios2_regsets): Likewise.
1371 * linux-ppc-low.c (ppc_regsets): Likewise.
1372 * linux-s390-low.c (s390_regsets): Likewise.
1373 * linux-sh-low.c (sh_regsets): Likewise.
1374 * linux-sparc-low.c (sparc_regsets): Likewise.
1375 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1376 * linux-tile-low.c (tile_regsets): Likewise.
1377 * linux-x86-low.c (x86_regsets): Likewise.
1378 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1379
50bc912a
PA
13802015-10-29 Pedro Alves <palves@redhat.com>
1381
1382 * linux-low.h (NULL_REGSET): Define.
1383 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
1384 * linux-arm-low.c (arm_regsets): Likewise.
1385 * linux-crisv32-low.c (cris_regsets): Likewise.
1386 * linux-m68k-low.c (m68k_regsets): Likewise.
1387 * linux-mips-low.c (mips_regsets): Likewise.
1388 * linux-nios2-low.c (nios2_regsets): Likewise.
1389 * linux-ppc-low.c (ppc_regsets): Likewise.
1390 * linux-s390-low.c (s390_regsets): Likewise.
1391 * linux-sh-low.c (sh_regsets): Likewise.
1392 * linux-sparc-low.c (sparc_regsets): Likewise.
1393 * linux-tic6x-low.c (tic6x_regsets): Likewise.
1394 * linux-tile-low.c (tile_regsets): Likewise.
1395 * linux-x86-low.c (x86_regsets): Likewise.
1396 * linux-xtensa-low.c (xtensa_regsets): Likewise.
1397
682b2546
DE
13982015-10-26 Doug Evans <dje@google.com>
1399
1400 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
1401
963843d4
DE
14022015-10-26 Doug Evans <dje@google.com>
1403
1404 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
1405
d41401ac
DE
14062015-10-26 Doug Evans <dje@google.com>
1407
1408 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
1409 for debug_printf.
1410 (attach_thread, find_new_threads_callback): Ditto.
1411
3db28855
AT
14122015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1413
1414 * mem-break.h (set_breakpoint_data): Remove.
1415
fb78e89c
AT
14162015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1417
1418 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
1419 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1420 (initialize_low): Remove set_breakpoint_data call.
1421 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
1422 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
1423 (initialize_low): Remove set_breakpoint_data call.
1424 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
1425 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
1426 (initialize_low): Remove set_breakpoint_data call.
1427
2e6ee069
AT
14282015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
1429
1430 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
1431 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
1432 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
1433 * target.h (target_breakpoint_kind_from_pc): New macro.
1434
1652a986
AT
14352015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
1436
1437 * linux-low.c (default_breakpoint_kind_from_pc): New function.
1438 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
1439 the default breakpoint kind.
1440
abeead09
AT
14412015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1442
1443 * linux-arm-low.c (arm_supports_z_point_type): Add software
1444 breakpoint support.
1445
b0b4b501
AT
14462015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1447
1448 * linux-arm-low.c: Refactor breakpoint definitions.
1449 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
1450 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
1451
8689682c
AT
14522015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1453
1454 * Makefile.in: Add arm.c/o.
1455 * configure.srv: Likewise.
1456 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
1457 (arm_breakpoint_kind_from_pc): New function.
1458 (arm_sw_breakpoint_from_kind): Return proper kind.
1459 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
1460
27165294
AT
14612015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1462
1463 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
1464 removal.
1465 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
1466 (struct raw_breakpoint) <size>: Remove.
1467 (struct raw_breakpoint) <kind>: Add.
1468 (bp_size): New function.
1469 (bp_opcode): Likewise.
1470 (find_raw_breakpoint_at): Adjust for kind.
1471 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
1472 (remove_memory_breakpoint): Adjust for kind call bp_size.
1473 (set_raw_breakpoint_at): Adjust for kind.
1474 (set_breakpoint): Likewise.
1475 (set_breakpoint_at): Call breakpoint_kind_from_pc.
1476 (delete_raw_breakpoint): Adjust for kind.
1477 (delete_breakpoint): Likewise.
1478 (find_gdb_breakpoint): Likewise.
1479 (set_gdb_breakpoint_1): Likewise.
1480 (set_gdb_breakpoint): Likewise.
1481 (delete_gdb_breakpoint_1): Likewise.
1482 (delete_gdb_breakpoint): Likewise.
1483 (uninsert_raw_breakpoint): Likewise.
1484 (reinsert_raw_breakpoint): Likewise.
1485 (set_breakpoint_data): Remove.
1486 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
1487 (check_mem_read): Adjust for kind call bp_size.
1488 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
1489 (clone_one_breakpoint): Adjust for kind.
1490 * mem-break.h (set_gdb_breakpoint): Likewise.
1491 (delete_gdb_breakpoint): Likewise.
1492 * server.c (process_serial_event): Likewise.
1493
dd373349
AT
14942015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1495
1496 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
1497 (struct linux_target_ops) <breakpoint>: Remove.
1498 (struct linux_target_ops) <breakpoint_len>: Remove.
1499 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1500 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1501 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
1502 (arm_sw_breakpoint_from_kind): New function.
1503 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
1504 (struct linux_target_ops) <breakpoint>: Remove.
1505 (struct linux_target_ops) <breakpoint_len>: Remove.
1506 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1507 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1508 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
1509 (struct linux_target_ops) <breakpoint>: Remove.
1510 (struct linux_target_ops) <breakpoint_len>: Remove.
1511 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1512 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1513 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
1514 (struct linux_target_ops) <breakpoint>: Remove.
1515 (struct linux_target_ops) <breakpoint_len>: Remove.
1516 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1517 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1518 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
1519 and sw_breakpoint_from_kind to increment the pc.
1520 (linux_breakpoint_kind_from_pc): New function.
1521 (linux_sw_breakpoint_from_kind): New function.
1522 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
1523 (initialize_low): Call breakpoint_kind_from_pc and
1524 sw_breakpoint_from_kind to replace breakpoint_data/len.
1525 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
1526 New field.
1527 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
1528 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
1529 (struct linux_target_ops) <breakpoint>: Remove.
1530 (struct linux_target_ops) <breakpoint_len>: Remove.
1531 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1532 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1533 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
1534 (struct linux_target_ops) <breakpoint>: Remove.
1535 (struct linux_target_ops) <breakpoint_len>: Remove.
1536 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1537 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1538 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
1539 (struct linux_target_ops) <breakpoint>: Remove.
1540 (struct linux_target_ops) <breakpoint_len>: Remove.
1541 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1542 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1543 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
1544 (struct linux_target_ops) <breakpoint>: Remove.
1545 (struct linux_target_ops) <breakpoint_len>: Remove.
1546 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1547 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1548 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
1549 (struct linux_target_ops) <breakpoint>: Remove.
1550 (struct linux_target_ops) <breakpoint_len>: Remove.
1551 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1552 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1553 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
1554 (struct linux_target_ops) <breakpoint>: Remove.
1555 (struct linux_target_ops) <breakpoint_len>: Remove.
1556 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1557 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1558 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
1559 (struct linux_target_ops) <breakpoint>: Remove.
1560 (struct linux_target_ops) <breakpoint_len>: Remove.
1561 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1562 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1563 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
1564 (struct linux_target_ops) <breakpoint>: Remove.
1565 (struct linux_target_ops) <breakpoint_len>: Remove.
1566 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1567 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1568 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
1569 (struct linux_target_ops) <breakpoint>: Remove.
1570 (struct linux_target_ops) <breakpoint_len>: Remove.
1571 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1572 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1573 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
1574 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
1575 (struct linux_target_ops) <breakpoint>: Remove.
1576 (struct linux_target_ops) <breakpoint_len>: Remove.
1577 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1578 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1579 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
1580 (struct linux_target_ops) <breakpoint>: Remove.
1581 (struct linux_target_ops) <breakpoint_len>: Remove.
1582 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
1583 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
1584
4cd98a19
AT
15852015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
1586
1587 * linux-cris-low.c (cris_get_pc): Remove void arg.
1588
774ee6d2
AR
15892015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1590
1591 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
1592 variable name.
1593
833dcd29
AR
15942015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
1595
1596 * inferiors.c (thread_pid_matches_callback): New function.
1597 (find_thread_process): New function.
1598 (remove_thread): Reset current_thread.
1599 (remove_process): Assert threads have been removed first.
1600
8d689ee5
YQ
16012015-10-15 Yao Qi <yao.qi@linaro.org>
1602
1603 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
1604 if it is 3.
1605 (aarch64_remove_point): Likewise.
1606 * regcache.c (regcache_register_size): New function.
1607
1c2e1515
YQ
16082015-10-12 Yao Qi <yao.qi@linaro.org>
1609
1610 * linux-aarch64-low.c: Update all callers as emit_load_store
1611 is renamed to aarch64_emit_load_store.
1612
e1c587c3
YQ
16132015-10-12 Yao Qi <yao.qi@linaro.org>
1614
1615 * linux-aarch64-low.c: Update all callers of function renaming
1616 from emit_insn to aarch64_emit_insn.
1617
b6542f81
YQ
16182015-10-12 Yao Qi <yao.qi@linaro.org>
1619
1620 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
1621 arch/aarch64-insn.h.
1622 (struct aarch64_memory_operand): Likewise.
1623 (ENCODE): Likewise.
1624 (emit_insn): Move to arch/aarch64-insn.c.
1625 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
1626 (emit_load_store): Move to arch/aarch64-insn.c.
1627 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
1628 (can_encode_int32): Remove.
1629
246994ce
YQ
16302015-10-12 Yao Qi <yao.qi@linaro.org>
1631
1632 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
1633 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
1634 (aarch64_relocate_instruction): Likewise.
1635 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
1636 (struct aarch64_insn_visitor): Likewise.
1637
0badd99f
YQ
16382015-10-12 Yao Qi <yao.qi@linaro.org>
1639
1640 * linux-aarch64-low.c (struct aarch64_insn_data): New.
1641 (struct aarch64_insn_visitor): New.
1642 (struct aarch64_insn_relocation_data): New.
1643 (aarch64_ftrace_insn_reloc_b): New function.
1644 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
1645 (aarch64_ftrace_insn_reloc_cb): Likewise.
1646 (aarch64_ftrace_insn_reloc_tb): Likewise.
1647 (aarch64_ftrace_insn_reloc_adr): Likewise.
1648 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
1649 (aarch64_ftrace_insn_reloc_others): Likewise.
1650 (visitor): New.
1651 (aarch64_relocate_instruction): Use visitor.
1652
dfaffe9d
YQ
16532015-10-12 Yao Qi <yao.qi@linaro.org>
1654
1655 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
1656 int. Add argument buf.
1657 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
1658 aarch64_relocate_instruction.
1659
70b439f0
YQ
16602015-10-12 Yao Qi <yao.qi@linaro.org>
1661
1662 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
1663 argument insn. Remove local variable insn. Don't call
1664 target_read_uint32.
1665 (aarch64_install_fast_tracepoint_jump_pad): Call
1666 target_read_uint32.
1667
7781c06f
YQ
16682015-09-30 Yao Qi <yao.qi@linaro.org>
1669
1670 * linux-aarch64-low.c (emit_movk): Shorten a long line.
1671 (emit_load_store_pair): Likewise.
1672
9a3c8263
SM
16732015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1674
1675 * dll.c (match_dll): Add cast(s).
1676 (unloaded_dll): Likewise.
1677 * linux-low.c (second_thread_of_pid_p): Likewise.
1678 (delete_lwp_callback): Likewise.
1679 (count_events_callback): Likewise.
1680 (select_event_lwp_callback): Likewise.
1681 (linux_set_resume_request): Likewise.
1682 * server.c (accumulate_file_name_length): Likewise.
1683 (emit_dll_description): Likewise.
1684 (handle_qxfer_threads_worker): Likewise.
1685 (visit_actioned_threads): Likewise.
1686 * thread-db.c (any_thread_of): Likewise.
1687 * tracepoint.c (same_process_p): Likewise.
1688 (match_blocktype): Likewise.
1689 (build_traceframe_info_xml): Likewise.
1690
224c3ddb
SM
16912015-09-25 Simon Marchi <simon.marchi@ericsson.com>
1692
1693 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
1694 assignment.
1695 (gdb_unparse_agent_expr): Likewise.
1696 * hostio.c (require_data): Likewise.
1697 (handle_pread): Likewise.
1698 * linux-low.c (disable_regset): Likewise.
1699 (fetch_register): Likewise.
1700 (store_register): Likewise.
1701 (get_dynamic): Likewise.
1702 (linux_qxfer_libraries_svr4): Likewise.
1703 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
1704 (set_fast_tracepoint_jump): Likewise.
1705 (uninsert_fast_tracepoint_jumps_at): Likewise.
1706 (reinsert_fast_tracepoint_jumps_at): Likewise.
1707 (validate_inserted_breakpoint): Likewise.
1708 (clone_agent_expr): Likewise.
1709 * regcache.c (init_register_cache): Likewise.
1710 * remote-utils.c (putpkt_binary_1): Likewise.
1711 (decode_M_packet): Likewise.
1712 (decode_X_packet): Likewise.
1713 (look_up_one_symbol): Likewise.
1714 (relocate_instruction): Likewise.
1715 (monitor_output): Likewise.
1716 * server.c (handle_search_memory): Likewise.
1717 (handle_qxfer_exec_file): Likewise.
1718 (handle_qxfer_libraries): Likewise.
1719 (handle_qxfer): Likewise.
1720 (handle_query): Likewise.
1721 (handle_v_cont): Likewise.
1722 (handle_v_run): Likewise.
1723 (captured_main): Likewise.
1724 * target.c (write_inferior_memory): Likewise.
1725 * thread-db.c (try_thread_db_load_from_dir): Likewise.
1726 * tracepoint.c (init_trace_buffer): Likewise.
1727 (add_tracepoint_action): Likewise.
1728 (add_traceframe): Likewise.
1729 (add_traceframe_block): Likewise.
1730 (cmd_qtdpsrc): Likewise.
1731 (cmd_qtdv): Likewise.
1732 (cmd_qtstatus): Likewise.
1733 (response_source): Likewise.
1734 (response_tsv): Likewise.
1735 (cmd_qtnotes): Likewise.
1736 (gdb_collect): Likewise.
1737 (initialize_tracepoint): Likewise.
1738
afbe19f8
PL
17392015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1740
1741 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
1742 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
1743 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
1744 <NOP>: New.
1745 (enum aarch64_condition_codes): New enum.
1746 (w0): New static global.
1747 (fp): Likewise.
1748 (lr): Likewise.
1749 (struct aarch64_memory_operand) <type>: New
1750 MEMORY_OPERAND_POSTINDEX type.
1751 (postindex_memory_operand): New helper function.
1752 (emit_ret): New function.
1753 (emit_load_store_pair): New function, factored out of emit_stp
1754 with support for MEMORY_OPERAND_POSTINDEX.
1755 (emit_stp): Rewrite using emit_load_store_pair.
1756 (emit_ldp): New function.
1757 (emit_load_store): Likewise.
1758 (emit_ldr): Mention post-index instruction in comment.
1759 (emit_ldrh): New function.
1760 (emit_ldrb): New function.
1761 (emit_ldrsw): Mention post-index instruction in comment.
1762 (emit_str): Likewise.
1763 (emit_subs): New function.
1764 (emit_cmp): Likewise.
1765 (emit_and): Likewise.
1766 (emit_orr): Likewise.
1767 (emit_orn): Likewise.
1768 (emit_eor): Likewise.
1769 (emit_mvn): Likewise.
1770 (emit_lslv): Likewise.
1771 (emit_lsrv): Likewise.
1772 (emit_asrv): Likewise.
1773 (emit_mul): Likewise.
1774 (emit_sbfm): Likewise.
1775 (emit_sbfx): Likewise.
1776 (emit_ubfm): Likewise.
1777 (emit_ubfx): Likewise.
1778 (emit_csinc): Likewise.
1779 (emit_cset): Likewise.
1780 (emit_nop): Likewise.
1781 (emit_ops_insns): New helper function.
1782 (emit_pop): Likewise.
1783 (emit_push): Likewise.
1784 (aarch64_emit_prologue): New function.
1785 (aarch64_emit_epilogue): Likewise.
1786 (aarch64_emit_add): Likewise.
1787 (aarch64_emit_sub): Likewise.
1788 (aarch64_emit_mul): Likewise.
1789 (aarch64_emit_lsh): Likewise.
1790 (aarch64_emit_rsh_signed): Likewise.
1791 (aarch64_emit_rsh_unsigned): Likewise.
1792 (aarch64_emit_ext): Likewise.
1793 (aarch64_emit_log_not): Likewise.
1794 (aarch64_emit_bit_and): Likewise.
1795 (aarch64_emit_bit_or): Likewise.
1796 (aarch64_emit_bit_xor): Likewise.
1797 (aarch64_emit_bit_not): Likewise.
1798 (aarch64_emit_equal): Likewise.
1799 (aarch64_emit_less_signed): Likewise.
1800 (aarch64_emit_less_unsigned): Likewise.
1801 (aarch64_emit_ref): Likewise.
1802 (aarch64_emit_if_goto): Likewise.
1803 (aarch64_emit_goto): Likewise.
1804 (aarch64_write_goto_address): Likewise.
1805 (aarch64_emit_const): Likewise.
1806 (aarch64_emit_call): Likewise.
1807 (aarch64_emit_reg): Likewise.
1808 (aarch64_emit_pop): Likewise.
1809 (aarch64_emit_stack_flush): Likewise.
1810 (aarch64_emit_zero_ext): Likewise.
1811 (aarch64_emit_swap): Likewise.
1812 (aarch64_emit_stack_adjust): Likewise.
1813 (aarch64_emit_int_call_1): Likewise.
1814 (aarch64_emit_void_call_2): Likewise.
1815 (aarch64_emit_eq_goto): Likewise.
1816 (aarch64_emit_ne_goto): Likewise.
1817 (aarch64_emit_lt_goto): Likewise.
1818 (aarch64_emit_le_goto): Likewise.
1819 (aarch64_emit_gt_goto): Likewise.
1820 (aarch64_emit_ge_got): Likewise.
1821 (aarch64_emit_ops_impl): New static global variable.
1822 (aarch64_emit_ops): New target function, return
1823 &aarch64_emit_ops_impl.
1824 (struct linux_target_ops): Install it.
1825
bb903df0
PL
18262015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1827
1828 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
1829 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
1830 aarch64-ipa.o.
1831 * linux-aarch64-ipa.c: New file.
1832 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
1833 and endian.h.
1834 (aarch64_get_thread_area): New target method.
1835 (extract_signed_bitfield): New helper function.
1836 (aarch64_decode_ldr_literal): New function.
1837 (enum aarch64_opcodes): New enum.
1838 (struct aarch64_register): New struct.
1839 (struct aarch64_operand): New struct.
1840 (x0): New static global.
1841 (x1): Likewise.
1842 (x2): Likewise.
1843 (x3): Likewise.
1844 (x4): Likewise.
1845 (w2): Likewise.
1846 (ip0): Likewise.
1847 (sp): Likewise.
1848 (xzr): Likewise.
1849 (aarch64_register): New helper function.
1850 (register_operand): Likewise.
1851 (immediate_operand): Likewise.
1852 (struct aarch64_memory_operand): New struct.
1853 (offset_memory_operand): New helper function.
1854 (preindex_memory_operand): Likewise.
1855 (enum aarch64_system_control_registers): New enum.
1856 (ENCODE): New macro.
1857 (emit_insn): New helper function.
1858 (emit_b): New function.
1859 (emit_bcond): Likewise.
1860 (emit_cb): Likewise.
1861 (emit_tb): Likewise.
1862 (emit_blr): Likewise.
1863 (emit_stp): Likewise.
1864 (emit_ldp_q_offset): Likewise.
1865 (emit_stp_q_offset): Likewise.
1866 (emit_load_store): Likewise.
1867 (emit_ldr): Likewise.
1868 (emit_ldrsw): Likewise.
1869 (emit_str): Likewise.
1870 (emit_ldaxr): Likewise.
1871 (emit_stxr): Likewise.
1872 (emit_stlr): Likewise.
1873 (emit_data_processing_reg): Likewise.
1874 (emit_data_processing): Likewise.
1875 (emit_add): Likewise.
1876 (emit_sub): Likewise.
1877 (emit_mov): Likewise.
1878 (emit_movk): Likewise.
1879 (emit_mov_addr): Likewise.
1880 (emit_mrs): Likewise.
1881 (emit_msr): Likewise.
1882 (emit_sevl): Likewise.
1883 (emit_wfe): Likewise.
1884 (append_insns): Likewise.
1885 (can_encode_int32_in): New helper function.
1886 (aarch64_relocate_instruction): New function.
1887 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
1888 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
1889 (struct linux_target_ops): Install aarch64_get_thread_area,
1890 aarch64_install_fast_tracepoint_jump_pad and
1891 aarch64_get_min_fast_tracepoint_insn_len.
1892
787749ea
PL
18932015-09-21 Pierre Langlois <pierre.langlois@arm.com>
1894
1895 * Makefile.in (aarch64-insn.o): New rule.
1896 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
1897
9812b2e6
YQ
18982015-09-21 Yao Qi <yao.qi@linaro.org>
1899
1900 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
1901
18fe412b
YQ
19022015-09-21 Yao Qi <yao.qi@linaro.org>
1903
1904 * tracepoint.c (max_jump_pad_size): Remove.
1905
a0cc84cd
YQ
19062015-09-18 Yao Qi <yao.qi@linaro.org>
1907
1908 * linux-aarch64-low.c: Don't include sys/uio.h.
1909 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
1910
d78908cf
WW
19112015-09-16 Wei-cheng Wang <cole945@gmail.com>
1912
1913 * tracepoint.c (eval_result_type): Change prototype.
1914 (condition_true_at_tracepoint): Fix argument to compiled_cond.
1915
d57e0d50
PA
19162015-09-15 Pedro Alves <palves@redhat.com>
1917
1918 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
1919 Check whether to report exec events instead of checking whether
1920 multiprocess is enabled.
1921
5a676acc
PA
19222015-09-15 Pedro Alves <palves@redhat.com>
1923
1924 PR remote/18965
1925 * remote-utils.c (prepare_resume_reply): Merge
1926 TARGET_WAITKIND_VFORK_DONE switch case with the
1927 TARGET_WAITKIND_FORKED case.
1928
7c5d0fad
YQ
19292015-09-15 Yao Qi <yao.qi@linaro.org>
1930
1931 * server.c (handle_query): Check string comparison using
1932 "else if" instead of "if".
1933
750ce8d1
YQ
19342015-09-15 Yao Qi <yao.qi@linaro.org>
1935
1936 * server.c (vCont_supported): New global variable.
1937 (handle_query): Set vCont_supported to 1 if "vContSupported+"
1938 matches. Append ";vContSupported+" to own_buf.
1939 (handle_v_requests): Append ";s;S" to own_buf if target supports
1940 hardware single step or vCont_supported is false.
1941 (capture_main): Set vCont_supported to zero.
1942
70b90b91
YQ
19432015-09-15 Yao Qi <yao.qi@linaro.org>
1944
1945 * linux-low.c (linux_supports_conditional_breakpoints): Rename
1946 it to ...
1947 (linux_supports_hardware_single_step): ... New function.
1948 (linux_target_ops): Update.
1949 * lynx-low.c (lynx_target_ops): Set field
1950 supports_hardware_single_step to target_can_do_hardware_single_step.
1951 * nto-low.c (nto_target_ops): Likewise.
1952 * spu-low.c (spu_target_ops): Likewise.
1953 * win32-low.c (win32_target_ops): Likewise.
1954 * target.c (target_can_do_hardware_single_step): New function.
1955 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1956 Remove. <supports_hardware_single_step>: New field.
1957 (target_supports_conditional_breakpoints): Remove.
1958 (target_supports_hardware_single_step): New macro.
1959 (target_can_do_hardware_single_step): Declare.
1960 * server.c (handle_query): Use target_supports_hardware_single_step
1961 instead of target_supports_conditional_breakpoints.
1962
ade90bde
YQ
19632015-09-15 Yao Qi <yao.qi@linaro.org>
1964
1965 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
1966 function.
1967 (struct linux_target_ops the_low_target): Install
1968 aarch64_linux_siginfo_fixup.
1969
94585166
DB
19702015-09-11 Don Breazeal <donb@codesourcery.com>
1971 Luis Machado <lgustavo@codesourcery.com>
1972
1973 * linux-low.c (linux_mourn): Static declaration.
1974 (linux_arch_setup): Move in front of
1975 handle_extended_wait.
1976 (linux_arch_setup_thread): New function.
1977 (handle_extended_wait): Handle exec events. Call
1978 linux_arch_setup_thread. Make event_lwp argument a
1979 pointer-to-a-pointer.
1980 (check_zombie_leaders): Do not check stopped threads.
1981 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
1982 (linux_low_filter_event): Add lwp and thread for exec'ing
1983 non-leader thread if leader thread has been deleted.
1984 Refactor code into linux_arch_setup_thread and call it.
1985 Pass child lwp pointer by reference to handle_extended_wait.
1986 (linux_wait_for_event_filtered): Update comment.
1987 (linux_wait_1): Prevent clobbering exec event status.
1988 (linux_supports_exec_events): New function.
1989 (linux_target_ops) <supports_exec_events>: Initialize new member.
1990 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
1991 new member.
1992 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
1993 * server.c (report_exec_events): New global variable.
1994 (handle_query): Handle qSupported query for exec-events feature.
1995 (captured_main): Initialize report_exec_events.
1996 * server.h (report_exec_events): Declare new global variable.
1997 * target.h (struct target_ops) <supports_exec_events>: New
1998 member.
1999 (target_supports_exec_events): New macro.
2000 * win32-low.c (win32_target_ops) <supports_exec_events>:
2001 Initialize new member.
2002
0568462b
MM
20032015-09-09 Markus Metzger <markus.t.metzger@intel.com>
2004
2005 * linux-low.c (linux_low_enable_btrace): Remove.
2006 (linux_target_ops): Replace linux_low_enable_btrace with
2007 linux_enable_btrace.
2008
39edd165
YQ
20092015-09-03 Yao Qi <yao.qi@linaro.org>
2010
2011 * linux-aarch64-low.c (aarch64_insert_point): Call
2012 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
2013 returns true.
2014
1db33b5a
UW
20152015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
2016
2017 * linux-low.c (check_stopped_by_breakpoint): Use
2018 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
2019
ab290430
PA
20202015-08-27 Pedro Alves <palves@redhat.com>
2021
2022 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
2023
8d749320
SM
20242015-08-26 Simon Marchi <simon.marchi@ericsson.com>
2025
6711b7f8
SM
2026 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
2027 the XNEW-family equivalent.
8d749320
SM
2028 (compile_bytecodes): Likewise.
2029 * dll.c (loaded_dll): Likewise.
2030 * event-loop.c (append_callback_event): Likewise.
2031 (create_file_handler): Likewise.
2032 (create_file_event): Likewise.
2033 * hostio.c (handle_open): Likewise.
2034 * inferiors.c (add_thread): Likewise.
2035 (add_process): Likewise.
2036 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
2037 * linux-arm-low.c (arm_new_process): Likewise.
2038 (arm_new_thread): Likewise.
2039 * linux-low.c (add_to_pid_list): Likewise.
2040 (linux_add_process): Likewise.
2041 (handle_extended_wait): Likewise.
2042 (add_lwp): Likewise.
2043 (enqueue_one_deferred_signal): Likewise.
2044 (enqueue_pending_signal): Likewise.
2045 (linux_resume_one_lwp_throw): Likewise.
2046 (linux_resume_one_thread): Likewise.
2047 (linux_read_memory): Likewise.
2048 (linux_write_memory): Likewise.
2049 * linux-mips-low.c (mips_linux_new_process): Likewise.
2050 (mips_linux_new_thread): Likewise.
2051 (mips_add_watchpoint): Likewise.
2052 * linux-x86-low.c (initialize_low_arch): Likewise.
2053 * lynx-low.c (lynx_add_process): Likewise.
2054 * mem-break.c (set_raw_breakpoint_at): Likewise.
2055 (set_breakpoint): Likewise.
2056 (add_condition_to_breakpoint): Likewise.
2057 (add_commands_to_breakpoint): Likewise.
2058 (clone_agent_expr): Likewise.
2059 (clone_one_breakpoint): Likewise.
2060 * regcache.c (new_register_cache): Likewise.
2061 * remote-utils.c (look_up_one_symbol): Likewise.
2062 * server.c (queue_stop_reply): Likewise.
2063 (start_inferior): Likewise.
2064 (queue_stop_reply_callback): Likewise.
2065 (handle_target_event): Likewise.
2066 * spu-low.c (fetch_ppc_memory): Likewise.
2067 (store_ppc_memory): Likewise.
2068 * target.c (set_target_ops): Likewise.
2069 * thread-db.c (thread_db_load_search): Likewise.
2070 (try_thread_db_load_1): Likewise.
2071 * tracepoint.c (add_tracepoint): Likewise.
2072 (add_tracepoint_action): Likewise.
2073 (create_trace_state_variable): Likewise.
2074 (cmd_qtdpsrc): Likewise.
2075 (cmd_qtro): Likewise.
2076 (add_while_stepping_state): Likewise.
2077 * win32-low.c (child_add_thread): Likewise.
2078 (get_image_name): Likewise.
2079
ed8b7b42
YQ
20802015-08-25 Yao Qi <yao.qi@linaro.org>
2081
2082 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
2083
db3cb7cb
YQ
20842015-08-25 Yao Qi <yao.qi@linaro.org>
2085
2086 * Makefile.in (aarch64-linux.o): New rule.
2087 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
2088 srv_tgtobj.
2089 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
2090 (aarch64_init_debug_reg_state): Make it extern.
2091 (aarch64_linux_prepare_to_resume): Remove.
2092
f6011a1c
YQ
20932015-08-25 Yao Qi <yao.qi@linaro.org>
2094
2095 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
2096 lwp_arch_private_info and ptid_of_lwp.
2097
88e2cf7e
YQ
20982015-08-25 Yao Qi <yao.qi@linaro.org>
2099
2100 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
2101 Find proc_info by find_process_pid. All callers updated.
2102
5e35436e
YQ
21032015-08-25 Yao Qi <yao.qi@linaro.org>
2104
2105 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
2106 Remove.
2107 (debug_reg_change_callback): Remove.
2108 (aarch64_notify_debug_reg_change): Remove.
2109
4a8a7965
YQ
21102015-08-25 Yao Qi <yao.qi@linaro.org>
2111
2112 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
2113 Call current_lwp_ptid.
2114
32a271ee
YQ
21152015-08-25 Yao Qi <yao.qi@linaro.org>
2116
2117 * linux-aarch64-low.c (debug_reg_change_callback): Use
2118 debug_printf.
2119
0d51c8d7
YQ
21202015-08-25 Yao Qi <yao.qi@linaro.org>
2121
2122 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
2123
31a43dd5
YQ
21242015-08-25 Yao Qi <yao.qi@linaro.org>
2125
2126 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
2127
8ee52567
YQ
21282015-08-25 Yao Qi <yao.qi@linaro.org>
2129
2130 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
2131 the code.
2132
ff3f0f45
YQ
21332015-08-25 Yao Qi <yao.qi@linaro.org>
2134
2135 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
2136 Remove.
2137 (debug_reg_change_callback): Remove argument entry and add argument
2138 lwp. Remove local variable thread. Don't print thread id in the
2139 debugging output. Don't check whether pid of thread equals to pid.
2140 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
2141 iterate_over_lwps instead find_inferior.
2142
3d40fbb5
PA
21432015-08-24 Pedro Alves <palves@redhat.com>
2144
2145 * inferiors.c (get_first_process): New function.
2146 * inferiors.h (get_first_process): New declaration.
2147 * remote-utils.c (read_ptid): Default to the first process in the
2148 list, instead of to the current thread's process.
2149
438e1e42
PA
21502015-08-24 Pedro Alves <palves@redhat.com>
2151
2152 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
2153 * event-loop.c: Likewise.
2154 * remote-utils.c: Likewise.
2155 * tracepoint.c: Likewise.
2156
a8c6d4fc
PA
21572015-08-24 Pedro Alves <palves@redhat.com>
2158
2159 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
2160 ptid_get_lwp.
2161
99b0bb12
PA
21622015-08-21 Pedro Alves <palves@redhat.com>
2163
2164 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
2165 instead of literal 1.
2166
f8904751
PA
21672015-08-21 Pedro Alves <palves@redhat.com>
2168
2169 * tdesc.c (default_description): Explicitly zero-initialize.
2170
465a859e
PA
21712015-08-21 Pedro Alves <palves@redhat.com>
2172
2173 PR gdb/18749
2174 * inferiors.c (remove_thread): Discard any pending stop reply for
2175 this thread.
2176 * server.c (remove_all_on_match_pid): Rename to ...
2177 (remove_all_on_match_ptid): ... this. Work with a filter ptid
2178 instead of a pid.
2179 (discard_queued_stop_replies): Change parameter to a ptid. Now
2180 extern.
2181 (handle_v_kill, kill_inferior_callback, captured_main)
2182 (process_serial_event): Adjust.
2183 * server.h (discard_queued_stop_replies): Declare.
2184
f0db101d
PA
21852015-08-21 Pedro Alves <palves@redhat.com>
2186
2187 * linux-low.c (wait_for_sigstop): Always switch to no thread
2188 selected if the previously current thread dies.
2189 * lynx-low.c (lynx_request_interrupt): Use the first thread's
2190 process instead of the current thread's.
2191 * remote-utils.c (input_interrupt): Don't check if there's no
2192 current thread.
2193 * server.c (gdb_read_memory, gdb_write_memory): If setting the
2194 current thread to the general thread fails, error out.
2195 (handle_qxfer_auxv, handle_qxfer_libraries)
2196 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
2197 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
2198 (handle_query): Check if there's a thread selected instead of
2199 checking whether there's any thread in the thread list.
2200 (handle_qxfer_threads, handle_qxfer_btrace)
2201 (handle_qxfer_btrace_conf): Don't error out early if there's no
2202 thread in the thread list.
2203 (handle_v_cont, myresume): Don't set the current thread to the
2204 continue thread.
2205 (process_serial_event) <Hg handling>: Also set thread_id if the
2206 previous general thread is still alive.
2207 (process_serial_event) <g/G handling>: If setting the current
2208 thread to the general thread fails, error out.
2209 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
2210 thread's lwp instead of the current thread's.
2211 * target.c (set_desired_thread): If the desired thread was not
2212 found, leave the current thread pointing to NULL. Return an int
2213 (boolean) indicating success.
2214 * target.h (set_desired_thread): Change return type to int.
2215
40045d91
MF
22162015-08-20 Max Filippov <jcmvbkbc@gmail.com>
2217
2218 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
2219 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
2220 #includes.
2221 (ps_get_thread_area): New function.
2222
45face3b
GB
22232015-08-19 Gary Benson <gbenson@redhat.com>
2224
2225 * hostio.c (handle_pread): Do not attempt to read more data
2226 than hostio_reply_with_data can fit in a packet.
2227
16d5f642
JB
22282015-08-18 Joel Brobecker <brobecker@adacore.com>
2229
2230 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
2231
a738da3a
MF
22322015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
2233
2234 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
2235
33ebda9d
PA
22362015-08-06 Pedro Alves <palves@redhat.com>
2237
2238 * tracepoint.c (expr_eval_result): Now an int.
2239
a44892be
PA
22402015-08-06 Pedro Alves <palves@redhat.com>
2241
2242 * gdbthread.h (struct regcache): Forward declare.
2243 (struct thread_info) <regcache_data>: Now a struct regcache
2244 pointer.
2245 * inferiors.c (inferior_regcache_data)
2246 (set_inferior_regcache_data): Now work with struct regcache
2247 pointers.
2248 * inferiors.h (struct regcache): Forward declare.
2249 (inferior_regcache_data, set_inferior_regcache_data): Now work
2250 with struct regcache pointers.
2251 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
2252 (free_register_cache_thread): Remove struct regcache pointer
2253 casts.
2254
608a1e46
PA
22552015-08-06 Pedro Alves <palves@redhat.com>
2256
2257 * server.c (captured_main): On error, print the exception message
2258 to stderr, and if run_once is set, throw a quit.
2259
f0ce0d3a
PA
22602015-08-06 Pedro Alves <palves@redhat.com>
2261
2262 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
2263 the current thread.
2264
bf47e248
PA
22652015-08-06 Pedro Alves <palves@redhat.com>
2266
2267 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
2268 reading beyond the passed in buffer length.
2269
b6b9ffcc
PL
22702015-08-06 Pierre Langlois <pierre.langlois@arm.com>
2271
2272 * tracepoint.c (symbol_list) <required>: Remove.
2273
863d01bd
PA
22742015-08-06 Pedro Alves <palves@redhat.com>
2275
2276 * linux-low.c (handle_extended_wait): Set the fork child's suspend
2277 count if stopping and suspending threads.
2278 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
2279 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
2280 (linux_detach): Complete an ongoing step-over.
2281 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
2282 throughout.
2283 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
2284 (linux_wait_1): If passing a signal to the inferior after
2285 finishing a step-over, unsuspend and re-resume all lwps. If we
2286 see a single-step event but the thread should be continuing, don't
2287 pass the trap to gdb.
2288 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
2289 internal_error instead of gdb_assert.
2290 (enqueue_pending_signal): New function.
2291 (check_ptrace_stopped_lwp_gone): Add debug output.
2292 (start_step_over): Use internal_error instead of gdb_assert.
2293 (complete_ongoing_step_over): New function.
2294 (linux_resume_one_thread): Don't resume a suspended thread.
2295 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
2296 it stepping.
2297
00db26fa
PA
22982015-08-06 Pedro Alves <palves@redhat.com>
2299
2300 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
2301 (linux_thread_alive): Use lwp_is_marked_dead.
2302 (extended_event_reported): Delete.
2303 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
2304 instead of extended_event_reported.
2305 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
2306 as well.
2307 (lwp_is_marked_dead): New function.
2308 (lwp_running): Use lwp_is_marked_dead.
2309 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
2310 comment.
2311
ad071a30
PA
23122015-08-06 Pedro Alves <palves@redhat.com>
2313
2314 * linux-low.c (linux_wait_1): Move fork event output out of the
2315 !report_to_gdb check. Pass event_child->waitstatus to
2316 target_waitstatus_to_string instead of ourstatus.
2317
524b57e6
YQ
23182015-08-04 Yao Qi <yao.qi@linaro.org>
2319
2320 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
2321 if current_thread is 32 bit.
2322
6085d6f6
YQ
23232015-08-04 Yao Qi <yao.qi@linaro.org>
2324
2325 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
2326 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
2327 * server.c (extended_protocol): Remove "static".
2328 * server.h (extended_protocol): Declare it.
2329
8a7e4587
YQ
23302015-08-04 Yao Qi <yao.qi@linaro.org>
2331
2332 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
2333 both aarch64 and aarch32.
2334 (aarch64_set_pc): Likewise.
2335
3b53ae99
YQ
23362015-08-04 Yao Qi <yao.qi@linaro.org>
2337
2338 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
2339 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
2340 arm-with-neon.xml to srv_xmlfiles.
2341 * linux-aarch64-low.c: Include linux-aarch32-low.h.
2342 (is_64bit_tdesc): New function.
2343 (aarch64_linux_read_description): New function.
2344 (aarch64_arch_setup): Call aarch64_linux_read_description.
2345 (regs_info): Rename to regs_info_aarch64.
2346 (aarch64_regs_info): Return right regs_info.
2347 (initialize_low_arch): Call initialize_low_arch_aarch32.
2348
bd9e6534
YQ
23492015-08-04 Yao Qi <yao.qi@linaro.org>
2350
2351 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
2352 * linux-aarch32-low.c: New file.
2353 * linux-aarch32-low.h: New file.
2354 * linux-arm-low.c (arm_fill_gregset): Move it to
2355 linux-aarch32-low.c.
2356 (arm_store_gregset): Likewise.
2357 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
2358 (arm_store_vfpregset): Call arm_store_vfpregset_num.
2359 (arm_arch_setup): Check if PTRACE_GETREGSET works.
2360 (regs_info): Rename to regs_info_arm.
2361 (arm_regs_info): Return regs_info_aarch32 if
2362 have_ptrace_getregset is 1 and target description is
2363 arm_with_neon or arm_with_vfpv3.
2364 (initialize_low_arch): Don't call init_registers_arm_with_neon.
2365 Call initialize_low_arch_aarch32 instead.
2366
ded48a5e
YQ
23672015-08-04 Yao Qi <yao.qi@linaro.org>
2368
2369 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
2370 * linux-low.c: ... here.
2371 * linux-low.h (have_ptrace_getregset): Declare it.
2372
96e9210f
PA
23732015-08-04 Pedro Alves <palves@redhat.com>
2374
2375 * thread-db.c (struct thread_db): Use new typedefs.
2376 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
2377 CHK calls.
2378 (disable_thread_event_reporting): Cast result of dlsym to
2379 destination function pointer type.
2380 (thread_db_mourn): Use td_ta_delete_ftype.
2381
af60a1ef
SL
23822015-08-03 Sandra Loosemore <sandra@codesourcery.com>
2383
2384 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
2385 arch variant.
2386 (CDX_BREAKPOINT): Define for R2.
2387 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
2388 (the_low_target): Add comments.
2389
e8b41681
YQ
23902015-07-30 Yao Qi <yao.qi@linaro.org>
2391
2392 * linux-arm-low.c (arm_hwcap): Remove it.
2393 (arm_read_description): New local variable arm_hwcap. Don't
2394 set arm_hwcap to zero.
2395
89abb039
YQ
23962015-07-30 Yao Qi <yao.qi@linaro.org>
2397
2398 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
2399 Use regcache->tdesc instead.
2400 (arm_store_wmmxregset): Likewise.
2401 (arm_fill_vfpregset): Likewise.
2402 (arm_store_vfpregset): Likewise.
2403
deca266c
YQ
24042015-07-30 Yao Qi <yao.qi@linaro.org>
2405
2406 * linux-arm-low.c: Include arch/arm.h.
2407 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
2408 (arm_store_gregset): Likewise.
2409
aa58a496
SM
24102015-07-29 Simon Marchi <simon.marchi@ericsson.com>
2411
2412 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
2413 ptrace's 4th parameter.
2414
50904b25
YQ
24152015-07-27 Yao Qi <yao.qi@linaro.org>
2416
2417 * configure.srv (case aarch64*-*-linux*): Don't set
2418 srv_linux_usrregs.
2419
5826e159
PA
24202015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
2421
2422 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
2423 sys/ptrace.h.
2424 * linux-arm-low.c: Likewise.
2425 * linux-cris-low.c: Likewise.
2426 * linux-crisv32-low.c: Likewise.
2427 * linux-low.c: Likewise.
2428 * linux-m68k-low.c: Likewise.
2429 * linux-mips-low.c: Likewise.
2430 * linux-nios2-low.c: Likewise.
2431 * linux-s390-low.c: Likewise.
2432 * linux-sparc-low.c: Likewise.
2433 * linux-tic6x-low.c: Likewise.
2434 * linux-tile-low.c: Likewise.
2435 * linux-x86-low.c: Likewise.
2436
54019719
PA
24372015-07-24 Pedro Alves <palves@redhat.com>
2438
2439 * config.in: Regenerate.
2440 * configure: Regenerate.
2441
eb7aa561
PA
24422015-07-24 Pedro Alves <palves@redhat.com>
2443
2444 * acinclude.m4: Include ../ptrace.m4.
2445 * configure.ac: Call GDB_AC_PTRACE.
2446 * config.in, configure: Regenerate.
2447
55d7b841
YQ
24482015-07-24 Yao Qi <yao.qi@linaro.org>
2449
2450 * linux-low.c (linux_create_inferior): Remove setting to
2451 proc->priv->new_inferior.
2452 (linux_attach): Likewise.
2453 (linux_low_filter_event): Likewise.
2454 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
2455
c06cbd92
YQ
24562015-07-24 Yao Qi <yao.qi@linaro.org>
2457
2458 * linux-low.c (linux_arch_setup): New function.
2459 (linux_low_filter_event): If proc->tdesc is NULL and
2460 proc->attached is true, call the_low_target.arch_setup.
2461 Otherwise, keep status pending, and return.
2462 (linux_resume_one_lwp_throw): Don't call get_pc if
2463 thread->while_stepping isn't NULL. Don't call
2464 get_thread_regcache if proc->tdesc is NULL.
2465 (need_step_over_p): Return 0 if proc->tdesc is NULL.
2466 (linux_target_ops): Install arch_setup.
2467 * server.c (start_inferior): Call the_target->arch_setup.
2468 * target.h (struct target_ops) <arch_setup>: New field.
2469 (target_arch_setup): New marco.
2470 * lynx-low.c (lynx_target_ops): Update.
2471 * nto-low.c (nto_target_ops): Update.
2472 * spu-low.c (spu_target_ops): Update.
2473 * win32-low.c (win32_target_ops): Update.
2474
5ae3ebba
YQ
24752015-07-24 Yao Qi <yao.qi@linaro.org>
2476
2477 * linux-low.c (linux_add_process): Don't set
2478 proc->priv->new_inferior.
2479 (linux_create_inferior): Set proc->priv->new_inferior to 1.
2480 (linux_attach): Likewise.
2481
eb97750b
YQ
24822015-07-24 Yao Qi <yao.qi@linaro.org>
2483
2484 * server.c (start_inferior): Code refactor.
2485
51aee833
YQ
24862015-07-24 Yao Qi <yao.qi@linaro.org>
2487
2488 * server.c (process_serial_event): Set general_thread.
2489
af1b22f3
YQ
24902015-07-21 Yao Qi <yao.qi@linaro.org>
2491
2492 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
2493 aarch64_linux_get_debug_reg_capacity.
2494
554717a3
YQ
24952015-07-17 Yao Qi <yao.qi@linaro.org>
2496
2497 * Makefile.in (aarch64-linux-hw-point.o): New rule.
2498 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
2499 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
2500 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
2501 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
2502 (AARCH64_HWP_ALIGNMENT): Likewise.
2503 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
2504 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
2505 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
2506 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
2507 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
2508 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
2509 (struct aarch64_debug_reg_state): Likewise.
2510 (struct arch_lwp_info): Likewise.
2511 (aarch64_align_watchpoint): Likewise.
2512 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
2513 (aarch64_watchpoint_length): Likewise.
2514 (aarch64_point_encode_ctrl_reg): Likewise
2515 (aarch64_point_is_aligned): Likewise.
2516 (aarch64_align_watchpoint): Likewise.
2517 (aarch64_linux_set_debug_regs):
2518 (aarch64_dr_state_insert_one_point): Likewise.
2519 (aarch64_dr_state_remove_one_point): Likewise.
2520 (aarch64_handle_breakpoint): Likewise.
2521 (aarch64_handle_aligned_watchpoint): Likewise.
2522 (aarch64_handle_unaligned_watchpoint): Likewise.
2523 (aarch64_handle_watchpoint): Likewise.
2524
c67ca4de
YQ
25252015-07-17 Yao Qi <yao.qi@linaro.org>
2526
2527 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
2528 and don't aarch64_get_debug_reg_state. All callers update.
2529 (aarch64_handle_aligned_watchpoint): Likewise.
2530 (aarch64_handle_unaligned_watchpoint): Likewise.
2531 (aarch64_handle_watchpoint): Likewise.
2532 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
2533 (aarch64_remove_point): Likewise.
2534
25abf979
YQ
25352015-07-17 Yao Qi <yao.qi@linaro.org>
2536
2537 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
2538 debug_printf.
2539 (aarch64_handle_unaligned_watchpoint): Likewise.
2540
db1ff28b
JK
25412015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2542
2543 Revert the previous 3 commits:
2544 Move gdb_regex* to common/
2545 Move linux_find_memory_regions_full & co.
2546 gdbserver build-id attribute generator
2547
700ca40f
JK
25482015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2549 Jan Kratochvil <jan.kratochvil@redhat.com>
2550
2551 gdbserver build-id attribute generator.
2552 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
2553 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
2554 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
2555 (find_phdr): New.
2556 (get_dynamic): Use find_pdhr to traverse program headers.
2557 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
2558 (compare_mapping_entry_range, struct find_memory_region_callback_data)
2559 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
2560 (get_hex_build_id): New.
2561 (linux_qxfer_libraries_svr4): Add optional build-id attribute
2562 to reply XML document.
2563
9904185c
JK
25642015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2565 Jan Kratochvil <jan.kratochvil@redhat.com>
2566
2567 * target.c: Include target/target-utils.h and fcntl.h.
2568 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
2569 (target_fileio_read_stralloc): New functions.
2570
6e5b4429
JK
25712015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
2572
2573 * Makefile.in (OBS): Add gdb_regex.o.
2574 (gdb_regex.o): New.
2575 * config.in: Rebuilt.
2576 * configure: Rebuilt.
2577
ddc98fbf
JK
25782015-07-15 Aleksandar Ristovski <aristovski@qnx.com
2579 Jan Kratochvil <jan.kratochvil@redhat.com>
2580
2581 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
2582 * Makefile.in (OBS): Add target-utils.o.
2583 (linux-maps.o, target-utils.o): New.
2584 * configure.srv (srv_linux_obj): Add linux-maps.o.
2585
e57bb7a0
PL
25862015-07-15 Pierre Langlois <pierre.langlois@arm.com>
2587
2588 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
2589 function, return 1.
2590 (the_low_target): Install it.
2591
586b02a9
PA
25922015-07-14 Pedro Alves <palves@redhat.com>
2593
2594 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
2595 Instead, ignore ECHILD, and throw an error for other errnos.
2596
58c1b36c
PA
25972015-07-10 Pedro Alves <palves@redhat.com>
2598
2599 * event-loop.c (struct callback_event) <data>: Change type to
2600 gdb_client_data instance instead of gdb_client_data pointer.
2601 (append_callback_event): Adjust.
2602
421530db
PL
26032015-07-10 Pierre Langlois <pierre.langlois@arm.com>
2604
2605 * linux-aarch64-low.c: Add comments for each linux_target_ops
2606 method. Remove comments already covered in target_ops and
2607 linux_target_ops definitions.
2608 (the_low_target): Add comments for each unimplemented method.
2609
c2d65f38
YQ
26102015-07-09 Yao Qi <yao.qi@linaro.org>
2611
2612 * linux-aarch64-low.c (aarch64_regmap): Remove.
2613 (aarch64_usrregs_info): Remove.
2614 (regs_info): Set field usrregs to NULL.
2615
b20a6524
MM
26162015-07-02 Markus Metzger <markus.t.metzger@intel.com>
2617
2618 * linux-low.c: Include "rsp-low.h"
2619 (linux_low_encode_pt_config, linux_low_encode_raw): New.
2620 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
2621 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
2622 (handle_btrace_enable_pt): New.
2623 (handle_btrace_general_set): Support "pt".
2624 (handle_btrace_conf_general_set): Support "pt:size".
2625
96c97461
PL
26262015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2627
2628 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
2629 Z_PACKET_SW_BP.
2630
37d66942
PL
26312015-06-29 Pierre Langlois <pierre.langlois@arm.com>
2632
2633 * linux-aarch64-low.c: Remove comment about endianness.
2634 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
2635 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
2636 memcmp.
2637
dc06243f
GB
26382015-06-24 Gary Benson <gbenson@redhat.com>
2639
2640 * linux-i386-ipa.c (stdint.h): Do not include.
2641 * lynx-i386-low.c (stdint.h): Likewise.
2642 * lynx-ppc-low.c (stdint.h): Likewise.
2643 * mem-break.c (stdint.h): Likewise.
2644 * thread-db.c (stdint.h): Likewise.
2645 * tracepoint.c (stdint.h): Likewise.
2646 * win32-low.c (stdint.h): Likewise.
2647
124e13d9
SM
26482015-06-18 Simon Marchi <simon.marchi@ericsson.com>
2649
2650 * server.c (write_qxfer_response): Update call to
2651 remote_escape_output.
2652
909c2cda
JK
26532015-06-15 Aleksandar Ristovski <aristovski@qnx.com
2654 Jan Kratochvil <jan.kratochvil@redhat.com>
2655
2656 Merge multiple hex conversions.
2657 * gdbreplay.c (tohex): Rename to 'fromhex'.
2658 (logchar): Use fromhex.
2659
24c05f46
JK
26602015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
2661
2662 * server.c (handle_qxfer_libraries): Set `version' attribute for
2663 <library-list>.
2664
14d2069a
GB
26652015-06-10 Gary Benson <gbenson@redhat.com>
2666
2667 * target.h (struct target_ops) <multifs_open>: New field.
2668 <multifs_unlink>: Likewise.
2669 <multifs_readlink>: Likewise.
2670 * linux-low.c (nat/linux-namespaces.h): New include.
2671 (linux_target_ops): Initialize the_target->multifs_open,
2672 the_target->multifs_unlink and the_target->multifs_readlink.
2673 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
2674 * hostio.c (hostio_fs_pid): New static variable.
2675 (hostio_handle_new_gdb_connection): New function.
2676 (handle_setfs): Likewise.
2677 (handle_open): Use the_target->multifs_open as appropriate.
2678 (handle_unlink): Use the_target->multifs_unlink as appropriate.
2679 (handle_readlink): Use the_target->multifs_readlink as
2680 appropriate.
2681 (handle_vFile): Handle vFile:setfs packets.
2682 * server.c (handle_query): Call hostio_handle_new_gdb_connection
2683 after target_handle_new_gdb_connection.
2684
4b8b5e72
GB
26852015-06-10 Gary Benson <gbenson@redhat.com>
2686
2687 * configure.ac (AC_CHECK_FUNCS): Add setns.
2688 * config.in: Regenerate.
2689 * configure: Likewise.
2690 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
2691 (linux-namespaces.o): New rule.
2692 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
2693
3ac2e371
GB
26942015-06-09 Gary Benson <gbenson@redhat.com>
2695
2696 * hostio.c (handle_open): Process mode argument with
2697 fileio_to_host_mode.
2698
ca9b78ce
YQ
26992015-06-01 Yao Qi <yao.qi@linaro.org>
2700
2701 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
2702 * linux-x86-low.c: Likewise.
2703
bfacd19d
DB
27042015-05-28 Don Breazeal <donb@codesourcery.com>
2705
2706 * linux-low.c (handle_extended_wait): Initialize
2707 thread_info.last_resume_kind for new fork children.
2708
452003ef
PA
27092015-05-15 Pedro Alves <palves@redhat.com>
2710
2711 * target.h (target_handle_new_gdb_connection): Rewrite using if
2712 wrapped in do/while.
2713
1041a03c
JB
27142015-05-14 Joel Brobecker <brobecker@adacore.com>
2715
2716 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
2717 * configure, config.in: Regenerate.
2718 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
2719 Declare typedef.
2720
c269dbdb
DB
27212015-05-12 Don Breazeal <donb@codesourcery.com>
2722
2723 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
2724 PTRACE_EVENT_VFORK_DONE.
2725 (linux_low_ptrace_options, extended_event_reported): Add vfork
2726 events.
2727 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
2728 and "vforkdone" for RSP 'T' Stop Reply Packet.
2729 * server.h (report_vfork_events): Declare
2730 global variable.
2731
3a8a0396
DB
27322015-05-12 Don Breazeal <donb@codesourcery.com>
2733
2734 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
2735 (the_low_target) <new_fork>: Initialize new member.
2736 * linux-arm-low.c (arm_new_fork): New function.
2737 (the_low_target) <new_fork>: Initialize new member.
2738 * linux-low.c (handle_extended_wait): Call new target function
2739 new_fork.
2740 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
2741 * linux-mips-low.c (mips_add_watchpoint): New function
2742 extracted from mips_insert_point.
2743 (the_low_target) <new_fork>: Initialize new member.
2744 (mips_linux_new_fork): New function.
2745 (mips_insert_point): Call mips_add_watchpoint.
2746 * linux-x86-low.c (x86_linux_new_fork): New function.
2747 (the_low_target) <new_fork>: Initialize new member.
2748
de0d863e
DB
27492015-05-12 Don Breazeal <donb@codesourcery.com>
2750
2751 * linux-low.c (handle_extended_wait): Implement return value,
2752 rename argument 'event_child' to 'event_lwp', handle
2753 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
2754 (linux_low_ptrace_options): New function.
2755 (linux_low_filter_event): Call linux_low_ptrace_options,
2756 use different argument fo linux_enable_event_reporting,
2757 use return value from handle_extended_wait.
2758 (extended_event_reported): New function.
2759 (linux_wait_1): Call extended_event_reported and set
2760 status to report fork events.
2761 (linux_write_memory): Add pid to debug message.
2762 (reset_lwp_ptrace_options_callback): New function.
2763 (linux_handle_new_gdb_connection): New function.
2764 (linux_target_ops): Initialize new structure member.
2765 * linux-low.h (struct lwp_info) <waitstatus>: New member.
2766 * lynx-low.c: Initialize new structure member.
2767 * remote-utils.c (prepare_resume_reply): Implement stop reason
2768 "fork" for "T" stop message.
2769 * server.c (handle_query): Call handle_new_gdb_connection.
2770 * server.h (report_fork_events): Declare global flag.
2771 * target.h (struct target_ops) <handle_new_gdb_connection>:
2772 New member.
2773 (target_handle_new_gdb_connection): New macro.
2774 * win32-low.c: Initialize new structure member.
2775
ddcbc397
DB
27762015-05-12 Don Breazeal <donb@codesourcery.com>
2777
2778 * mem-break.c (APPEND_TO_LIST): Define macro.
2779 (clone_agent_expr): New function.
2780 (clone_one_breakpoint): New function.
2781 (clone_all_breakpoints): New function.
2782 * mem-break.h: Declare new functions.
2783
89245bc0
DB
27842015-05-12 Don Breazeal <donb@codesourcery.com>
2785
2786 * linux-low.c (linux_supports_fork_events): New function.
2787 (linux_supports_vfork_events): New function.
2788 (linux_target_ops): Initialize new structure members.
2789 (initialize_low): Call linux_check_ptrace_features.
2790 * lynx-low.c (lynx_target_ops): Initialize new structure
2791 members.
2792 * server.c (report_fork_events, report_vfork_events):
2793 New global flags.
2794 (handle_query): Add new features to qSupported packet and
2795 response.
2796 (captured_main): Initialize new global variables.
2797 * target.h (struct target_ops) <supports_fork_events>:
2798 New member.
2799 <supports_vfork_events>: New member.
2800 (target_supports_fork_events): New macro.
2801 (target_supports_vfork_events): New macro.
2802 * win32-low.c (win32_target_ops): Initialize new structure
2803 members.
2804
835205d0
GB
28052015-05-12 Gary Benson <gbenson@redhat.com>
2806
2807 * server.c (handle_qxfer_exec_file): Use current process
2808 if annex is empty.
2809
21e94bd9
SL
28102015-05-08 Sandra Loosemore <sandra@codesourcery.com>
2811
2812 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
2813 Remove HAVE_PTRACE_GETREGS conditionals.
2814 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
2815 instead of PTRACE_GETREGS and PTRACE_SETREGS.
2816
45614f15
YQ
28172015-05-08 Yao Qi <yao.qi@linaro.org>
2818
2819 * linux-low.c (linux_supports_conditional_breakpoints): New
2820 function.
2821 (linux_target_ops): Install new target method.
2822 * lynx-low.c (lynx_target_ops): Install NULL hook for
2823 supports_conditional_breakpoints.
2824 * nto-low.c (nto_target_ops): Likewise.
2825 * spu-low.c (spu_target_ops): Likewise.
2826 * win32-low.c (win32_target_ops): Likewise.
2827 * server.c (handle_query): Check
2828 target_supports_conditional_breakpoints.
2829 * target.h (struct target_ops) <supports_conditional_breakpoints>:
2830 New field.
2831 (target_supports_conditional_breakpoints): New macro.
2832
80ad801e
PA
28332015-05-06 Pedro Alves <palves@redhat.com>
2834
2835 PR server/18081
2836 * server.c (start_inferior): If the process exits, mourn it.
2837
819843c7
GB
28382015-04-21 Gary Benson <gbenson@redhat.com>
2839
2840 * hostio.c (fileio_open_flags_to_host): Factored out to
2841 fileio_to_host_openflags in common/fileio.c. Single use
2842 updated.
2843
a2d5a9d7
MF
28442015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2845
2846 * linux-xtensa-low.c (xtensa_fill_gregset)
2847 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
2848 XCHAL_HAVE_LOOP.
2849
deb44829
MF
28502015-04-17 Max Filippov <jcmvbkbc@gmail.com>
2851
2852 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
2853 (regs_info): Replace usrregs pointer with NULL.
2854
e57f1de3
GB
28552015-04-17 Gary Benson <gbenson@redhat.com>
2856
2857 * target.h (struct target_ops) <pid_to_exec_file>: New field.
2858 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
2859 * server.c (handle_qxfer_exec_file): New function.
2860 (qxfer_packets): Add exec-file entry.
2861 (handle_query): Report qXfer:exec-file:read as supported packet.
2862
62828379
RN
28632015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
2864
2865 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
2866
b88bb450
GB
28672015-04-09 Gary Benson <gbenson@redhat.com>
2868
2869 * hostio-errno.c (errno_to_fileio_error): Remove function.
2870 Update caller to use remote_fileio_to_fio_error.
2871
c8f4bfdd
YQ
28722015-04-09 Yao Qi <yao.qi@linaro.org>
2873
2874 * linux-low.c (linux_insert_point): Call
2875 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
2876 (linux_remove_point): Call remove_memory_breakpoint if type is
2877 raw_bkpt_type_sw.
2878 * linux-x86-low.c (x86_insert_point): Don't call
2879 insert_memory_breakpoint.
2880 (x86_remove_point): Don't call remove_memory_breakpoint.
2881
41f98f02
PA
28822015-04-01 Pedro Alves <palves@redhat.com>
2883 Cleber Rosa <crosa@redhat.com>
2884
2885 * server.c (gdbserver_usage): Reorganize and extend the usage
2886 message.
2887
2bf6fb9d
PA
28882015-03-24 Pedro Alves <palves@redhat.com>
2889
2890 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
2891 output. Also dump TRAP_TRACE.
2892 (linux_low_filter_event): In debug output, distinguish a
2893 resume_stop SIGSTOP from a delayed SIGSTOP.
2894
369f6daa
GB
28952015-03-24 Gary Benson <gbenson@redhat.com>
2896
2897 * linux-x86-low.c (x86_linux_new_thread): Moved to
2898 nat/x86-linux.c.
2899 (x86_linux_prepare_to_resume): Likewise.
2900
8e5d4070
GB
29012015-03-24 Gary Benson <gbenson@redhat.com>
2902
2903 * Makefile.in (x86-linux-dregs.o): New rule.
2904 * configure.srv: Add x86-linux-dregs.o to relevant targets.
2905 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
2906 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
2907 (x86_linux_dr_get): Likewise.
2908 (x86_linux_dr_set): Likewise.
2909 (update_debug_registers_callback): Likewise.
2910 (x86_linux_dr_set_addr): Likewise.
2911 (x86_linux_dr_get_addr): Likewise.
2912 (x86_linux_dr_set_control): Likewise.
2913 (x86_linux_dr_get_control): Likewise.
2914 (x86_linux_dr_get_status): Likewise.
2915 (x86_linux_update_debug_registers): Likewise.
2916
2b95d440
GB
29172015-03-24 Gary Benson <gbenson@redhat.com>
2918
2919 * linux-x86-low.c (x86_linux_update_debug_registers):
2920 New function, factored out from...
2921 (x86_linux_prepare_to_resume): ...this.
2922
14b0bc68
GB
29232015-03-24 Gary Benson <gbenson@redhat.com>
2924
2925 * linux-x86-low.c (x86_linux_dr_get): Update comments.
2926 (x86_linux_dr_set): Likewise.
2927 (update_debug_registers_callback): Likewise.
2928 (x86_linux_dr_set_addr): Likewise.
2929 (x86_linux_dr_get_addr): Likewise.
2930 (x86_linux_dr_set_control): Likewise.
2931 (x86_linux_dr_get_control): Likewise.
2932 (x86_linux_dr_get_status): Likewise.
2933 (x86_linux_prepare_to_resume): Likewise.
2934
5dfe6ca8
GB
29352015-03-24 Gary Benson <gbenson@redhat.com>
2936
2937 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
2938 Use perror_with_name. Pass string through gettext.
2939 (x86_linux_dr_set): Likewise.
2940
d33472ad
GB
29412015-03-24 Gary Benson <gbenson@redhat.com>
2942
2943 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
2944 (x86_linux_dr_set_addr): ...this.
2945 (x86_dr_low_get_addr): Rename to...
2946 (x86_linux_dr_get_addr): ...this.
2947 (x86_dr_low_set_control): Rename to...
2948 (x86_linux_dr_set_control): ...this.
2949 (x86_dr_low_get_control): Rename to...
2950 (x86_linux_dr_get_control): ...this.
2951 (x86_dr_low_get_status): Rename to...
2952 (x86_linux_dr_get_status): ...this.
2953 (x86_dr_low): Update with new function names.
2954
4b134ca1
GB
29552015-03-24 Gary Benson <gbenson@redhat.com>
2956
2957 * Makefile.in (x86-linux.o): New rule.
2958 * configure.srv: Add x86-linux.o to relevant targets.
2959 * linux-low.c (lwp_set_arch_private_info): New function.
2960 (lwp_arch_private_info): Likewise.
2961 * linux-x86-low.c: Include nat/x86-linux.h.
2962 (arch_lwp_info): Removed structure.
2963 (update_debug_registers_callback):
2964 Use lwp_set_debug_registers_changed.
2965 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
2966 and lwp_set_debug_registers_changed.
2967 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
2968
34c703da
GB
29692015-03-24 Gary Benson <gbenson@redhat.com>
2970
2971 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
2972 * linux-arm-low.c (arm_new_thread): Likewise.
2973 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
2974 * linux-mips-low.c (mips_linux_new_thread): Likewise.
2975 * linux-x86-low.c (x86_linux_new_thread): Likewise.
2976 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
2977
cff068da
GB
29782015-03-24 Gary Benson <gbenson@redhat.com>
2979
2980 * linux-low.c (ptid_of_lwp): New function.
2981 (lwp_is_stopped): Likewise.
2982 (lwp_stop_reason): Likewise.
2983 * linux-x86-low.c (update_debug_registers_callback):
2984 Use lwp_is_stopped.
2985 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
2986 lwp_stop_reason.
2987
b2f7c7e8
GB
29882015-03-24 Gary Benson <gbenson@redhat.com>
2989
2990 * linux-low.h (linux_stop_lwp): Remove declaration.
2991
6d4ee8c6
GB
29922015-03-24 Gary Benson <gbenson@redhat.com>
2993
2994 * linux-low.h: Include nat/linux-nat.h.
2995 * linux-low.c (iterate_over_lwps_args): New structure.
2996 (iterate_over_lwps_filter): New function.
2997 (iterate_over_lwps): Likewise.
2998 * linux-x86-low.c (update_debug_registers_callback):
2999 Update signature to what iterate_over_lwps expects.
3000 Remove PID check that iterate_over_lwps now performs.
3001 (x86_dr_low_set_addr): Use iterate_over_lwps.
3002 (x86_dr_low_set_control): Likewise.
3003
70a0bb6b
GB
30042015-03-24 Gary Benson <gbenson@redhat.com>
3005
3006 * linux-x86-low.c (x86_debug_reg_state): New function.
3007 (x86_linux_prepare_to_resume): Use the above.
3008
7b669087
GB
30092015-03-24 Gary Benson <gbenson@redhat.com>
3010
3011 * linux-low.c (current_lwp_ptid): New function.
3012 * linux-x86-low.c: Include nat/linux-nat.h.
3013 (x86_dr_low_get_addr): Use current_lwp_ptid.
3014 (x86_dr_low_get_control): Likewise.
3015 (x86_dr_low_get_status): Likewise.
3016
eef49a3d
PA
30172015-03-20 Pedro Alves <palves@redhat.com>
3018
3019 * tracepoint.c (cmd_qtstatus): Make "str" const.
3020
b2333d22
PA
30212015-03-20 Pedro Alves <palves@redhat.com>
3022
3023 * server.c (handle_general_set): Make "req_str" const.
3024
23f238d3
PA
30252015-03-19 Pedro Alves <palves@redhat.com>
3026
3027 * linux-low.c (linux_resume_one_lwp): Rename to ...
3028 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
3029 instead call perror_with_name.
3030 (check_ptrace_stopped_lwp_gone): New function.
3031 (linux_resume_one_lwp): Reimplement as wrapper around
3032 linux_resume_one_lwp_throw that swallows errors if the LWP is
3033 gone.
3034
91baf43f
PA
30352015-03-19 Pedro Alves <palves@redhat.com>
3036
3037 * linux-low.c (count_events_callback, select_event_lwp_callback):
3038 No longer check whether the thread has resume_stop as last resume
3039 kind.
3040
8bf3b159
PA
30412015-03-19 Pedro Alves <palves@redhat.com>
3042
3043 * linux-low.c (count_events_callback, select_event_lwp_callback):
3044 Use the lwp's status_pending_p field, not the thread's.
3045
b90fc188
PA
30462015-03-19 Pedro Alves <palves@redhat.com>
3047
3048 * linux-low.c (select_event_lwp_callback): Update comments to
3049 no longer mention SIGTRAP.
3050
464b0089
GB
30512015-03-18 Gary Benson <gbenson@redhat.com>
3052
3053 * server.c (handle_query): Do not report vFile:fstat as supported.
3054
aa9e327f
GB
30552015-03-11 Gary Benson <gbenson@redhat.com>
3056
3057 * hostio.c (sys/types.h): New include.
3058 (sys/stat.h): Likewise.
3059 (common-remote-fileio.h): Likewise.
3060 (handle_fstat): New function.
3061 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 3062
791c0056
GB
30632015-03-11 Gary Benson <gbenson@redhat.com>
3064
3065 * configure.ac (AC_CHECK_MEMBERS): Add checks for
3066 struct stat.st_blocks and struct stat.st_blksize.
3067 * configure: Regenerate.
3068 * config.in: Likewise.
3069 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
3070 (OBS): Add common-remote-fileio.o.
3071 (common-remote-fileio.o): New rule.
3072
9a9df970
PA
30732015-03-09 Pedro Alves <palves@redhat.com>
3074
3075 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
3076 'struct sockaddr' pointer in 'accept' call.
3077
9eb1356e
PA
30782015-03-09 Pedro Alves <palves@redhat.com>
3079
3080 Revert:
3081 2015-03-07 Pedro Alves <palves@redhat.com>
3082 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3083 or <winsock2.h> here. Instead include "gdb_socket.h".
3084 (remote_open): Use union gdb_sockaddr_u.
3085 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3086 or <winsock2.h> here. Instead include "gdb_socket.h".
3087 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3088 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3089 or <sys/un.h>.
3090 (init_named_socket, gdb_agent_helper_thread): Use union
3091 gdb_sockaddr_u.
3092
aac331e4
PA
30932015-03-07 Pedro Alves <palves@redhat.com>
3094
3095 * configure.ac (build_warnings): Move
3096 -Wdeclaration-after-statement to the C-specific set.
3097 * configure: Regenerate.
3098
366c75fc
PA
30992015-03-07 Pedro Alves <palves@redhat.com>
3100
3101 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
3102 or <winsock2.h> here. Instead include "gdb_socket.h".
3103 (remote_open): Use union gdb_sockaddr_u.
3104 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
3105 or <winsock2.h> here. Instead include "gdb_socket.h".
3106 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
3107 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
3108 or <sys/un.h>.
3109 (init_named_socket, gdb_agent_helper_thread): Use union
3110 gdb_sockaddr_u.
3111
492d29ea
PA
31122015-03-07 Pedro Alves <palves@redhat.com>
3113
3114 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
3115 instead.
3116
60a191ed
YQ
31172015-03-06 Yao Qi <yao.qi@linaro.org>
3118
3119 * linux-aarch64-low.c (aarch64_insert_point): Use
3120 show_debug_regs as a boolean.
3121 (aarch64_remove_point): Likewise.
3122
f5771b1d
PA
31232015-03-05 Pedro Alves <palves@redhat.com>
3124
3125 * lynx-low.c (lynx_target_ops): Install NULL hooks for
3126 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
3127 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
3128 * nto-low.c (nto_target_ops): Likewise.
3129 * spu-low.c (spu_target_ops): Likewise.
3130 * win32-low.c (win32_target_ops): Likewise.
3131
3e572f71
PA
31322015-03-04 Pedro Alves <palves@redhat.com>
3133
72f4393d 3134 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
3135 Decide whether a breakpoint triggered based on the SIGTRAP's
3136 siginfo.si_code.
72f4393d
L
3137 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
3138 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
3139 (linux_low_filter_event): Check for breakpoints before checking
3140 watchpoints.
3141 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
3142 siginfo.si_code.
72f4393d
L
3143 (linux_stopped_by_sw_breakpoint)
3144 (linux_supports_stopped_by_sw_breakpoint)
3145 (linux_stopped_by_hw_breakpoint)
3146 (linux_supports_stopped_by_hw_breakpoint): New functions.
3147 (linux_target_ops): Install new target methods.
3e572f71 3148
1ec68e26
PA
31492015-03-04 Pedro Alves <palves@redhat.com>
3150
3151 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
3152 * server.c (swbreak_feature, hwbreak_feature): New globals.
3153 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
3154 (captured_main): Clear swbreak_feature and hwbreak_feature.
3155 * server.h (swbreak_feature, hwbreak_feature): Declare.
3156 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
3157 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
3158 supports_stopped_by_hw_breakpoint>: New fields.
3159 (target_supports_stopped_by_sw_breakpoint)
3160 (target_stopped_by_sw_breakpoint)
3161 (target_supports_stopped_by_hw_breakpoint)
3162 (target_stopped_by_hw_breakpoint): Declare.
3163
15c66dd6
PA
31642015-03-04 Pedro Alves <palves@redhat.com>
3165
3166 enum lwp_stop_reason -> enum target_stop_reason
3167 * linux-low.c (check_stopped_by_breakpoint): Adjust.
3168 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
3169 (linux_wait_1, stuck_in_jump_pad_callback)
3170 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
3171 (linux_stopped_by_watchpoint):
3172 * linux-low.h (enum lwp_stop_reason): Delete.
3173 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
3174 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3175
98fc70d6
YQ
31762015-03-04 Yao Qi <yao.qi@linaro.org>
3177
3178 * Makefile.in (SFILES): Add linux-aarch64-low.c.
3179
dd2ac174
GB
31802015-03-03 Gary Benson <gbenson@redhat.com>
3181
3182 * hostio.c (handle_vFile): Fix prefix lengths.
3183
d68e53f4
MM
31842015-03-03 Markus Metzger <markus.t.metzger@intel.com>
3185
3186 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
3187 ptr_bits.
3188
bf2d68ab
AA
31892015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
3190
3191 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
3192 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
3193 (clean): Add "rm -f" for above C files.
3194 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
3195 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
3196 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
3197 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
3198 * linux-s390-low.c (HWCAP_S390_VX): New macro.
3199 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
3200 (init_registers_s390x_vx_linux64)
3201 (init_registers_s390x_tevx_linux64)
3202 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
3203 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
3204 declarations.
3205 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
3206 (s390_store_vxrs_high): New functions.
3207 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
3208 NT_S390_VXRS_HIGH.
3209 (s390_arch_setup): Add logic for selecting one of the new target
3210 descriptions. Activate the new vector regsets if applicable.
3211 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
3212 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
3213 and init_registers_s390x_tevx_linux64.
3214
c966a859
PA
32152015-03-01 Pedro Alves <palves@redhat.com>
3216
3217 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
3218 parameter.
3219
4180215b
PA
32202015-02-27 Pedro Alves <palves@redhat.com>
3221
3222 * linux-x86-low.c (u_debugreg_offset): New function.
3223 (x86_linux_dr_get, x86_linux_dr_set): Use it.
3224
749bab01
PA
32252015-02-27 Pedro Alves <palves@redhat.com>
3226
3227 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
3228 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
3229 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
3230 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
3231 (ps_lsetfpregs, ps_getpid)
3232 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
3233 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
3234 (ps_lsetxregs, ps_plog): Declare.
3235
3c14e5a3
PA
32362015-02-27 Pedro Alves <palves@redhat.com>
3237
3238 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
3239 IP_AGENT_EXPORT_FUNC.
3240 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
3241 IP_AGENT_EXPORT_FUNC.
3242 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
3243 (IP_AGENT_EXPORT): Delete.
3244 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3245 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3246 (gdb_trampoline_buffer_error, collecting, gdb_collect)
3247 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
3248 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
3249 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
3250 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
3251 (traceframe_read_count, traceframe_write_count)
3252 (traceframes_created, trace_state_variables, get_raw_reg)
3253 (get_trace_state_variable_value, set_trace_state_variable_value)
3254 (ust_loaded, helper_thread_id, cmd_buf): Use
3255 IPA_SYM_EXPORTED_NAME.
3256 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
3257 (tracepoints) Use IP_AGENT_EXPORT_VAR.
3258 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
3259 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3260 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
3261 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
3262 EXTERN_C_PUSH/EXTERN_C_POP.
3263 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
3264 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
3265 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3266 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
3267 (traceframe_write_count, traceframe_read_count)
3268 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
3269 (about_to_request_buffer_space, get_trace_state_variable_value)
3270 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
3271 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
3272 EXTERN_C_PUSH/EXTERN_C_POP.
3273 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
3274 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
3275 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
3276 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
3277 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
3278 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
3279 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
3280 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
3281 Define.
3282 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
3283 (IP_AGENT_EXPORT_VAR_DECL): Define.
3284 (tracing): Declare.
3285 (gdb_agent_get_raw_reg): Declare.
3286
fe978cb0
PA
32872015-02-27 Tom Tromey <tromey@redhat.com>
3288 Pedro Alves <palves@redhat.com>
3289
3290 Rename symbols whose names are reserved C++ keywords throughout.
3291
3bc3d82a
PA
32922015-02-27 Pedro Alves <palves@redhat.com>
3293
3294 * Makefile.in (COMPILER): New, get it from autoconf.
3295 (CXX): Get from autoconf instead.
3296 (COMPILE.pre): Use COMPILER.
3297 (CC-LD): Rename to ...
3298 (CC_LD): ... this. Use COMPILER.
3299 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
3300 (CXX_FOR_TARGET): Default to g++ instead of gcc.
3301 * acinclude.m4: Include build-with-cxx.m4.
3302 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
3303 Disable -Werror by default if building in C++ mode.
3304 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
3305 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
3306 the C++ compiler. Save/restore CXXFLAGS too.
3307 * configure: Regenerate.
3308
07697489
PA
33092015-02-27 Pedro Alves <palves@redhat.com>
3310
3311 * acinclude.m4: Include libiberty.m4.
3312 * configure.ac: Call libiberty_INIT.
3313 * config.in, configure: Regenerate.
3314
9beb7c4e
PA
33152015-02-26 Pedro Alves <palves@redhat.com>
3316
3317 * linux-low.c (linux_wait_1): When incrementing the PC past a
3318 program breakpoint always use the_low_target.breakpoint_len as
3319 increment, rather than the maximum between that and
3320 the_low_target.decr_pc_after_break.
3321
8090aef2
PA
33222015-02-23 Pedro Alves <palves@redhat.com>
3323
3324 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
3325 thread was doing a step-over; always adjust the PC if
3326 we stepped over a permanent breakpoint.
3327 (linux_wait_1): If we stepped over breakpoint that was on top of a
3328 permanent breakpoint, manually advance the PC past it.
3329
bc9540e8
PA
33302015-02-23 Pedro Alves <palves@redhat.com>
3331
3332 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
3333 modes.
3334 (x86_fill_gregset, x86_store_gregset): Use it when handling
3335 $orig_eax.
3336
2db9a427
PA
33372015-02-20 Pedro Alves <palves@redhat.com>
3338
3339 * thread-db.c: Include "nat/linux-procfs.h".
3340 (thread_db_init): Skip listing new threads if the kernel supports
3341 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
3342
afa8d396
PA
33432015-02-20 Pedro Alves <palves@redhat.com>
3344
3345 * linux-low.c (status_pending_p_callback): Use ptid_match.
3346
c9587f88
AT
33472015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
3348
3349 PR breakpoints/16812
3350 * linux-low.c (wstatus_maybe_breakpoint): Remove.
3351 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
3352 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
3353
b05ec7a5
AT
33542015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
3355
3356 PR breakpoints/15956
3357 * tracepoint.c (cmd_qtinit): Add check for current_thread.
3358
d33501a5
MM
33592015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3360
3361 * linux-low.c (linux_low_btrace_conf): Print size.
3362 * server.c (handle_btrace_conf_general_set): New.
3363 (hanle_general_set): Call handle_btrace_conf_general_set.
3364 (handle_query): Report Qbtrace-conf:bts:size as supported.
3365
f4abbc16
MM
33662015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3367
3368 * linux-low.c (linux_low_enable_btrace): Update parameters.
3369 (linux_low_btrace_conf): New.
3370 (linux_target_ops)<to_btrace_conf>: Initialize.
3371 * server.c (current_btrace_conf): New.
3372 (handle_btrace_enable): Rename to ...
3373 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
3374 to target_enable_btrace. Update comment. Update users.
3375 (handle_qxfer_btrace_conf): New.
3376 (qxfer_packets): Add btrace-conf entry.
3377 (handle_query): Report qXfer:btrace-conf:read as supported packet.
3378 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
3379 (target_ops)<read_btrace_conf>: New.
3380 (target_enable_btrace): Update parameters.
3381 (target_read_btrace_conf): New.
3382
043c3577
MM
33832015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3384
3385 * server.c (handle_btrace_general_set): Remove call to
3386 target_supports_btrace.
3387 (supported_btrace_packets): New.
3388 (handle_query): Call supported_btrace_packets.
3389 * target.h: include btrace-common.h.
3390 (btrace_target_info): Removed.
3391 (supports_btrace, target_supports_btrace): Update parameters.
3392
734b0e4b
MM
33932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
3394
3395 * Makefile.in (SFILES): Add common/btrace-common.c.
3396 (OBS): Add common/btrace-common.o.
3397 (btrace-common.o): Add build rules.
3398 * linux-low: Include btrace-common.h.
3399 (linux_low_read_btrace): Use struct btrace_data. Call
3400 btrace_data_init and btrace_data_fini.
3401
d6c146e9
PA
34022015-02-06 Pedro Alves <palves@redhat.com>
3403
3404 * thread-db.c (find_new_threads_callback): Add debug output.
3405
20ba1ce6
PA
34062015-02-04 Pedro Alves <palves@redhat.com>
3407
3408 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
3409 (resume_stopped_resumed_lwps): New function.
3410 (linux_wait_for_event_filtered): Use it.
3411
8cc73a39
SDJ
34122015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3413
3414 * Makefile.in (SFILES): Add linux-personality.c.
3415 (linux-personality.o): New rule.
3416 * configure.srv (srv_linux_obj): Add linux-personality.o to the
3417 list of objects to be built.
3418 * linux-low.c: Include nat/linux-personality.h.
3419 (linux_create_inferior): Remove code to disable address space
3420 randomization (moved to ../nat/linux-personality.c). Create
3421 cleanup to disable address space randomization.
3422
fb23d554
SDJ
34232015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
3424
3425 * Makefile.in (posix-strerror.o): New rule.
3426 (mingw-strerror.o): Likewise.
3427 * configure: Regenerated.
3428 * configure.ac: Source file ../common/common.host. Initialize new
3429 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
3430
cdf43629
YQ
34312015-01-14 Yao Qi <yao@codesourcery.com>
3432
3433 * Makefile.in (SFILES): Add nat/ppc-linux.c.
3434 (ppc-linux.o): New rule.
3435 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
3436 * configure.ac: AC_CHECK_FUNCS(getauxval).
3437 * config.in: Re-generated.
3438 * configure: Re-generated.
3439 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
3440 ppc64_64bit_inferior_p
3441
514c5338
YQ
34422015-01-14 Yao Qi <yao@codesourcery.com>
3443
3444 * linux-ppc-low.c: Include "nat/ppc-linux.h".
3445 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
3446 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
3447 (PT_ORIG_R3, PT_TRAP): Likewise.
3448 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
3449 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
3450 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
3451
3368c1e5
JB
34522015-01-10 Joel Brobecker <brobecker@adacore.com>
3453
3454 * i387-fp.c (i387_cache_to_xsave): In look over
3455 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
3456 zmmh_low_space field by use of zmmh_high_space.
3457
582511be
PA
34582015-01-09 Pedro Alves <palves@redhat.com>
3459
3460 * linux-low.c (step_over_bkpt): Move higher up in the file.
3461 (handle_extended_wait): Don't store the stop_pc here.
3462 (get_stop_pc): Adjust comments and rename to ...
3463 (check_stopped_by_breakpoint): ... this. Record whether the LWP
3464 stopped for a software breakpoint or hardware breakpoint.
3465 (thread_still_has_status_pending_p): New function.
3466 (status_pending_p_callback): Use
3467 thread_still_has_status_pending_p. If the event is no longer
3468 interesting, resume the LWP.
3469 (handle_tracepoints): Add assert.
3470 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
3471 (wstatus_maybe_breakpoint): New function.
3472 (cancel_breakpoint): Delete function.
3473 (check_stopped_by_watchpoint): New function, factored out from
3474 linux_low_filter_event.
3475 (lp_status_maybe_breakpoint): Delete function.
3476 (linux_low_filter_event): Remove filter_ptid argument.
3477 Leave thread group exits pending here. Store the LWP's stop PC.
3478 Always leave events pending.
3479 (linux_wait_for_event_filtered): Pull all events out of the
3480 kernel, and leave them all pending.
3481 (count_events_callback, select_event_lwp_callback): Consider all
3482 events.
3483 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
3484 (select_event_lwp): Only give preference to the stepping LWP in
3485 all-stop mode. Adjust comments.
3486 (ignore_event): New function.
3487 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
3488 references to cancel_breakpoints. Adjust to renames. Also give
3489 equal priority to all LWPs that have had events in non-stop mode.
3490 If reporting a software breakpoint event, unadjust the LWP's PC.
3491 (linux_wait): If linux_wait_1 returned an ignored event, retry.
3492 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
3493 Adjust.
3494 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
3495 (resume_status_pending_p): Use thread_still_has_status_pending_p.
3496 (linux_stopped_by_watchpoint): Adjust.
3497 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
3498 * linux-low.h (enum lwp_stop_reason): New.
3499 (struct lwp_info) <stop_pc>: Adjust comment.
3500 <stopped_by_watchpoint>: Delete field.
3501 <stop_reason>: New field.
3502 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
3503 * mem-break.c (software_breakpoint_inserted_here)
3504 (hardware_breakpoint_inserted_here): New function.
3505 * mem-break.h (software_breakpoint_inserted_here)
3506 (hardware_breakpoint_inserted_here): Declare.
3507 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
3508 (cancel_breakpoints): Delete.
3509 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
3510 (upload_fast_traceframes): Remove references to
3511 cancel_breakpoints.
3512
a33e3959
PA
35132015-01-09 Pedro Alves <palves@redhat.com>
3514
3515 * thread-db.c (find_new_threads_callback): Ignore thread if the
3516 kernel thread ID is -1.
3517
8784d563
PA
35182015-01-09 Pedro Alves <palves@redhat.com>
3519
3520 * linux-low.c (linux_attach_fail_reason_string): Move to
3521 nat/linux-ptrace.c, and rename.
3522 (linux_attach_lwp): Update comment.
3523 (attach_proc_task_lwp_callback): New function.
3524 (linux_attach): Adjust to rename and use
3525 linux_proc_attach_tgid_threads.
3526 (linux_attach_fail_reason_string): Delete declaration.
3527
76f2b779
JB
35282015-01-01 Joel Brobecker <brobecker@adacore.com>
3529
3530 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
3531 * server.c (gdbserver_version): Likewise.
3532
fafcc06a
SDJ
35332014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
3534
3535 * remote-utils.c: Include ctype.h.
3536 (input_interrupt): Explicitly handle the case when the char
3537 received is the NUL byte. Improve the printing of non-ASCII
3538 characters.
3539
beed38b8
JB
35402014-12-16 Joel Brobecker <brobecker@adacore.com>
3541
3542 * linux-low.c (linux_low_filter_event): Update call to
3543 linux_enable_event_reporting following the addition of
3544 a new parameter to that function.
3545
bf330350
CU
35462014-12-16 Catalin Udma <catalin.udma@freescale.com>
3547
3548 PR server/17457
3549 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
3550 (AARCH64_FPCR_REGNO): Likewise.
3551 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
3552 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
3553 (aarch64_store_fpregset): Likewise.
3554
5227d625
JB
35552014-12-15 Joel Brobecker <brobecker@adacore.com>
3556
3557 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
3558 Remove FIXME comment about assumption about N.
3559
f93b65a0
JB
35602014-12-13 Joel Brobecker <brobecker@adacore.com>
3561
3562 * configure.ac: If large-file support is disabled in GDBserver,
3563 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
3564 * configure: Regenerate.
3565
e5a9158d
AA
35662014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3567
3568 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
3569 warning upon ENODATA from ptrace.
3570 * linux-s390-low.c (s390_store_tdb): New.
3571 (s390_regsets): Add regset for NT_S390_TDB.
3572
feea5f36
AA
35732014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3574
3575 * linux-low.c (regsets_store_inferior_registers): Skip regsets
3576 without a fill_function.
3577 * linux-s390-low.c (s390_fill_last_break): Remove.
3578 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
3579 (s390_arch_setup): Use regset's size instead of fill_function for
3580 loop end condition.
3581
098dbe61
AA
35822014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3583
3584 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
3585 the regset's store function when ptrace returned an error.
3586 * regcache.c (get_thread_regcache): Invalidate register cache
3587 before fetching inferior's registers.
3588
28eef672
AA
35892014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
3590
3591 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
3592 while-loop as for-loop.
3593 (regsets_store_inferior_registers): Likewise.
3594
bdca27a2
YQ
35952014-11-28 Yao Qi <yao@codesourcery.com>
3596
3597 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
3598 * config.in, configure: Re-generate.
3599 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
3600 is defined.
3601
9c232dda
YQ
36022014-11-21 Yao Qi <yao@codesourcery.com>
3603
3604 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
3605 (AC_CHECK_HEADERS): Remove malloc.h.
3606 * configure: Re-generated.
3607 * config.in: Re-generated.
3608 * server.h: Don't include alloca.h and malloc.h.
3609 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
3610 Don't include malloc.h.
3611
43968415
JB
36122014-11-17 Joel Brobecker <brobecker@adacore.com>
3613
3614 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
3615 corresponding ERRNO check in same block.
3616
40e91bc7
PA
36172014-11-12 Pedro Alves <palves@redhat.com>
3618
3619 * server.c (cont_thread): Update comment.
3620 (start_inferior, attach_inferior): No longer clear cont_thread.
3621 (handle_v_cont): No longer set cont_thread.
3622 (captured_main): Clear cont_thread each time a GDB connects.
3623
c2c118cf
PA
36242014-11-12 Pedro Alves <palves@redhat.com>
3625
3626 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
3627 thread, and don't resume all threads if the Hc thread has exited.
3628
78708b7c
PA
36292014-11-12 Pedro Alves <palves@redhat.com>
3630
3631 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
3632 the process group instead of to a specific LWP.
3633
a2abc7de
PA
36342014-10-15 Pedro Alves <palves@redhat.com>
3635
3636 PR server/17487
3637 * win32-arm-low.c (arm_set_thread_context): Remove current_event
3638 parameter.
3639 (arm_set_thread_context): Delete.
3640 (the_low_target): Adjust.
3641 * win32-i386-low.c (debug_registers_changed)
3642 (debug_registers_used): Delete.
3643 (update_debug_registers_callback): New function.
3644 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
3645 needing to update their debug registers.
3646 (win32_get_current_dr): New function.
3647 (x86_dr_low_get_addr, x86_dr_low_get_control)
3648 (x86_dr_low_get_status): Fetch the debug register from the thread
3649 record's context.
3650 (i386_initial_stuff): Adjust.
3651 (i386_get_thread_context): Remove current_event parameter. Don't
3652 clear debug_registers_changed nor copy DR values to
3653 debug_reg_state.
3654 (i386_set_thread_context): Delete.
3655 (i386_prepare_to_resume): New function.
3656 (i386_thread_added): Mark the thread as needing to update irs
3657 debug registers.
3658 (the_low_target): Remove i386_set_thread_context and install
3659 i386_prepare_to_resume.
3660 * win32-low.c (win32_get_thread_context): Adjust.
3661 (win32_set_thread_context): Use SetThreadContext
3662 directly.
3663 (win32_prepare_to_resume): New function.
3664 (win32_require_context): New function, factored out from ...
3665 (thread_rec): ... this.
3666 (continue_one_thread): Call win32_prepare_to_resume on each thread
3667 we're about to continue.
3668 (win32_resume): Call win32_prepare_to_resume on the event thread.
3669 * win32-low.h (struct win32_thread_info)
3670 <debug_registers_changed>: New field.
3671 (struct win32_target_ops): Change prototype of set_thread_context,
3672 delete set_thread_context and add prepare_to_resume.
3673 (win32_require_context): New declaration.
3674
a442d071
GB
36752014-10-08 Gary Benson <gbenson@redhat.com>
3676
3677 * server.h: Do not include common-exceptions.h.
3678
6f1947e8
GB
36792014-10-08 Gary Benson <gbenson@redhat.com>
3680
3681 * server.h: Do not include cleanups.h.
3682
63b434a4
JH
36832014-09-30 James Hogan <james.hogan@imgtec.com>
3684
3685 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
3686 mips64-dsp-linux.c.
3687
c4d9ceb6
YQ
36882014-09-23 Yao Qi <yao@codesourcery.com>
3689
3690 * linux-low.c (lp_status_maybe_breakpoint): New function.
3691 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
3692 (count_events_callback): Likewise.
3693 (select_event_lwp_callback): Likewise.
3694 (cancel_breakpoints_callback): Likewise.
3695
89a5711c
DB
36962014-09-19 Don Breazeal <donb@codesourcery.com>
3697
3698 * linux-low.c (handle_extended_wait): Call
3699 linux_ptrace_get_extended_event.
3700 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
3701 linux_is_extended_waitstatus.
3702
bffc0964
JB
37032014-09-16 Joel Brobecker <brobecker@adacore.com>
3704
3705 * Makefile.in (CPPFLAGS): Define.
3706 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
3707 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
3708
0bfdf32f
GB
37092014-09-16 Gary Benson <gbenson@redhat.com>
3710
3711 * inferiors.h (current_inferior): Renamed as...
3712 (current_thread): New variable. All uses updated.
3713 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
3714 (maybe_move_out_of_jump_pad): Likewise.
3715 (cancel_breakpoint): Likewise.
3716 (linux_low_filter_event): Likewise.
3717 (wait_for_sigstop): Likewise.
3718 (linux_resume_one_lwp): Likewise.
3719 (need_step_over_p): Likewise.
3720 (start_step_over): Likewise.
3721 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
3722 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
3723 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
3724 and save_inferior as saved_thread.
3725 * regcache.c (get_thread_regcache): Renamed saved_inferior as
3726 saved_thread.
3727 (regcache_invalidate_thread): Likewise.
3728 * remote-utils.c (prepare_resume_reply): Likewise.
3729 * thread-db.c (thread_db_get_tls_address): Likewise.
3730 (disable_thread_event_reporting): Likewise.
3731 (remove_thread_event_breakpoints): Likewise.
3732 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
3733 as saved_thread.
3734 * target.h (set_desired_inferior): Renamed as...
3735 (set_desired_thread): New declaration. All uses updated.
3736 * server.c (myresume): Updated comment to reference thread instead
3737 of inferior.
3738 (handle_serial_event): Likewise.
3739 (handle_target_event): Likewise.
3740
361c8ade
GB
37412014-09-12 Tom Tromey <tromey@redhat.com>
3742 Gary Benson <gbenson@redhat.com>
3743
3744 * regcache.h: Include common-regcache.h.
3745 (regcache_read_pc): Don't declare.
3746 * regcache.c (get_thread_regcache_for_ptid): New function.
3747
bd9269f7
GB
37482014-09-11 Tom Tromey <tromey@redhat.com>
3749 Gary Benson <gbenson@redhat.com>
3750
3751 * symbol.c: New file.
3752 * Makefile.in (SFILES): Add symbol.c.
3753 (OBS): Add symbol.o.
3754
f8c1d06b
GB
37552014-09-11 Gary Benson <gbenson@redhat.com>
3756
3757 * target.c (target_stop_ptid, target_continue_ptid): New
3758 functions.
3759
721ec300
GB
37602014-09-11 Tom Tromey <tromey@redhat.com>
3761 Gary Benson <gbenson@redhat.com>
3762
3763 * target.h: Include target/target.h.
3764 * target.c (target_read_memory, target_read_uint32)
3765 (target_write_memory): New functions.
3766
c5e92cca
GB
37672014-09-11 Gary Benson <gbenson@redhat.com>
3768
3769 * server.h (debug_hw_points): Don't declare.
3770 * server.c (debug_hw_points): Don't define. Replace all uses
3771 with show_debug_regs.
3772 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
3773 all uses with show_debug_regs.
3774
2e4bb98a
EBM
37752014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
3776
3777 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
3778 endianness into account.
3779 (ppc_supply_ptrace_register): Likewise.
3780
ac740bc7
JH
37812014-09-03 James Hogan <james.hogan@imgtec.com>
3782
3783 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
3784 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
3785
97ea6506
GB
37862014-09-03 Gary Benson <gbenson@redhat.com>
3787
3788 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
3789 ALL_DEBUG_ADDRESS_REGISTERS.
3790
df7e5265
GB
37912014-09-02 Gary Benson <gbenson@redhat.com>
3792
3793 * i386-low.h: Renamed as...
3794 * x86-low.h: New file. All type, function and variable name
3795 prefixes changed from "i386_" to "x86_". All references updated.
3796 * i386-low.c: Renamed as...
3797 * x86-low.c: New file. All type, function and variable name
3798 prefixes changed from "i386_" to "x86_". All references updated.
3799
ed859da7
GB
38002014-09-02 Gary Benson <gbenson@redhat.com>
3801
3802 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
3803 (x86_linux_new_thread): Likewise.
3804
860789c7
GB
38052014-08-29 Gary Benson <gbenson@redhat.com>
3806
3807 * server.h (setjmp.h): Do not include.
3808 (toplevel): Do not declare.
3809 (common-exceptions.h): Include.
3810 (cleanups.h): Likewise.
3811 * server.c (toplevel): Do not define.
3812 (exit_code): New static global.
3813 (detach_or_kill_for_exit_cleanup): New function.
3814 (main): New function. Original main renamed to...
3815 (captured_main): New function.
3816 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
3817
ff55e1b5
GB
38182014-08-29 Gary Benson <gbenson@redhat.com>
3819
3820 * Makefile.in (SFILES): Add common/common-exceptions.c.
3821 (OBS): Add common-exceptions.o.
3822 (common-exceptions.o): New rule.
3823 * utils.c (prepare_to_throw_exception): New function.
3824
e9bcb658
GB
38252014-08-29 Gary Benson <gbenson@redhat.com>
3826
3827 * config.in: Regenerate.
3828 * configure: Likewise.
3829
e3180625
GB
38302014-08-29 Gary Benson <gbenson@redhat.com>
3831
3832 * Makefile.in (SFILES): Add common/cleanups.c.
3833 (OBS): cleanups.o.
3834 (cleanups.o): New rule.
3835
e3d6ba5d
GB
38362014-08-29 Gary Benson <gbenson@redhat.com>
3837
3838 * utils.c (internal_vwarning): New function.
3839
7096e886
GB
38402014-08-28 Gary Benson <gbenson@redhat.com>
3841
3842 * utils.h (fatal): Remove declaration.
3843 * utils.c (fatal): Remove function.
3844
14ce3192
GB
38452014-08-28 Gary Benson <gbenson@redhat.com>
3846
3847 * tracepoint.c (gdb_agent_init): Replace fatal with
3848 perror_with_name.
3849 (initialize_tracepoint): Likewise.
3850
50278d59
GB
38512014-08-28 Gary Benson <gbenson@redhat.com>
3852
3853 * remote-utils.c (remote_prepare): Replace fatal with error.
3854
aa96c426
GB
38552014-08-28 Gary Benson <gbenson@redhat.com>
3856
3857 * linux-low.c (linux_async): Replace fatal with warning.
3858 Tidy up and return.
3859 (linux_start_non_stop): Return -1 if linux_async failed.
3860
f7160e97
GB
38612014-08-28 Gary Benson <gbenson@redhat.com>
3862
3863 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
3864 gdb_assert.
3865 (i386_dr_low_get_addr): Remove vague comment.
3866 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
3867 gdb_assert.
3868
38e08fca
GB
38692014-08-28 Gary Benson <gbenson@redhat.com>
3870
3871 * inferiors.c (get_thread_process): Replace check with gdb_assert.
3872 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
3873 internal_error.
3874 (linux_resume_one_lwp): Likewise.
3875 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
3876 gdb_assert.
3877 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
3878 with internal_error.
3879 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
3880 (init_register_cache): Replace fatal with gdb_assert_not_reached.
3881 (find_register_by_name): Replace fatal with internal_error.
3882 (find_regno): Likewise.
3883 * tdesc.c (init_target_desc): Replace check with gdb_assert.
3884 * thread-db.c (thread_db_create_event): Likewise.
3885 (thread_db_load_search): Likewise.
3886 (try_thread_db_load_1): Likewise.
3887 * tracepoint.c (get_jump_space_head): Replace fatal with
3888 internal_error.
3889 (claim_trampoline_space): Likewise.
3890 (have_fast_tracepoint_trampoline_buffer): Likewise.
3891 (cmd_qtstart): Likewise.
3892 (stop_tracing): Likewise.
3893 (fast_tracepoint_collecting): Likewise.
3894 (target_malloc): Likewise.
3895 (download_tracepoint): Likewise.
3896 (download_trace_state_variables): Replace check with gdb_assert.
3897 (upload_fast_traceframes): Replace fatal with internal_error.
3898
34abf635
GB
38992014-08-19 Tom Tromey <tromey@redhat.com>
3900 Gary Benson <gbenson@redhat.com>
3901
3902 * Makefile.in (SFILES): Add common/common-debug.c.
3903 (OBS): Add common-debug.o.
3904 (common-debug.o): New rule.
3905 * debug.h (debug_printf): Don't declare.
3906 * debug.c (debug_printf): Renamed and rewritten as...
3907 (debug_vprintf): New function.
3908
f6e94d78
GB
39092014-08-19 Gary Benson <gbenson@redhat.com>
3910
3911 * utils.h: Do not include print-utils.h.
3912
9239eeab
GB
39132014-08-19 Tom Tromey <tromey@redhat.com>
3914 Gary Benson <gbenson@redhat.com>
3915
3916 * server.h: Add static assertion.
3917 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
3918
ef87c8bb
GB
39192014-08-19 Tom Tromey <tromey@redhat.com>
3920 Gary Benson <gbenson@redhat.com>
3921
3922 * Makefile.in (SFILES): Add common/errors.c.
3923 (OBS): Add errors.o.
3924 (IPA_OBS): Add errors-ipa.o.
3925 (errors.o): New rule.
3926 (errors-ipa.o): Likewise.
3927 * utils.h (perror_with_name, error, warning): Don't declare.
3928 * utils.c (warning): Renamed and rewritten as...
3929 (vwarning): New function.
3930 (error): Renamed and rewritten as...
3931 (verror): New function.
3932 (internal_error): Renamed and rewritten as...
3933 (internal_verror): New function.
3934
bb974a24
GB
39352014-08-07 Gary Benson <gbenson@redhat.com>
3936
3937 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
3938 * configure: Regenerate.
3939 * config.in: Likewise.
3940 * server.h: Do not include errno.h.
3941 * event-loop.c: Likewise.
3942 * hostio-errno.c: Likewise.
3943 * linux-low.c: Likewise.
3944 * remote-utils.c: Likewise.
3945 * spu-low.c: Likewise.
3946 * utils.c: Likewise.
3947 * gdbreplay.c: Unconditionally include errno.h.
3948
6d3d12eb
GB
39492014-08-07 Gary Benson <gbenson@redhat.com>
3950
3951 * server.h: Do not include string.h.
3952 * event-loop.c: Likewise.
3953 * linux-low.c: Likewise.
3954 * regcache.c: Likewise.
3955 * remote-utils.c: Likewise.
3956 * spu-low.c: Likewise.
3957 * utils.c: Likewise.
3958
dccbb609
GB
39592014-08-07 Gary Benson <gbenson@redhat.com>
3960
3961 * server.h: Do not include gdb_assert.h.
3962
e76df0d0
GB
39632014-08-07 Gary Benson <gbenson@redhat.com>
3964
3965 * server.h: Do not include common-utils.h.
3966
4cb9c816
GB
39672014-08-07 Gary Benson <gbenson@redhat.com>
3968
3969 * server.h: Do not include ptid.h.
3970 * notif.h: Likewise.
3971
3995eeee
GB
39722014-08-07 Gary Benson <gbenson@redhat.com>
3973
3974 * server.h: Do not include gdb_locale.h.
3975
cb9f1a9b
GB
39762014-08-07 Gary Benson <gbenson@redhat.com>
3977
3978 * server.h: Do not include gdb/signals.h.
3979 * win32-low.c: Likewise.
3980
a5fceff8
GB
39812014-08-07 Gary Benson <gbenson@redhat.com>
3982
3983 * server.h: Do not include pathmax.h.
3984
b9391142
GB
39852014-08-07 Gary Benson <gbenson@redhat.com>
3986
3987 * server.h: Do not include libiberty.h.
3988 * linux-bfin-low.c: Likewise.
3989
0e443c87
GB
39902014-08-07 Gary Benson <gbenson@redhat.com>
3991
3992 * server.h: Do not include ansidecl.h.
3993
8ebb3f56
GB
39942014-08-07 Gary Benson <gbenson@redhat.com>
3995
3996 * linux-x86-low.c: Do not include stddef.h.
3997 * lynx-ppc-low.c: Likewise.
3998 * tracepoint.c: Likewise.
3999
8980bdf6
GB
40002014-08-07 Gary Benson <gbenson@redhat.com>
4001
4002 * server.h: Do not include stdarg.h.
4003 * nto-low.c: Likewise.
4004
d7096f71
GB
40052014-08-07 Gary Benson <gbenson@redhat.com>
4006
4007 * server.h: Do not include stdlib.h.
4008 * inferiors.c: Likewise.
4009 * linux-low.c: Likewise.
4010 * regcache.c: Likewise.
4011 * spu-low.c: Likewise.
4012 * tracepoint.c: Likewise.
4013 * utils.c: Likewise.
4014
d02f550d
GB
40152014-08-07 Gary Benson <gbenson@redhat.com>
4016
4017 * server.h: Do not include stdio.h.
4018 * linux-low.c: Likewise.
4019 * remote-utils.c: Likewise.
4020 * spu-low.c: Likewise.
4021 * utils.c: Likewise.
4022 * wincecompat.c: Likewise.
4023
87f6c4e3
GB
40242014-08-06 Gary Benson <gbenson@redhat.com>
4025
4026 * regcache.c (init_register_cache): Move conditionals inside if.
4027
7089dca4
GB
40282014-08-06 Gary Benson <gbenson@redhat.com>
4029
4030 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
4031
462f517e
GB
40322014-07-31 Gary Benson <gbenson@redhat.com>
4033
4034 * ax.h: Do not include server.h.
4035 * gdbthread.h: Likewise.
4036 * lynx-low.h: Likewise.
4037 * notif.h: Likewise.
4038
976411d6
GB
40392014-07-30 Gary Benson <gbenson@redhat.com>
4040
4041 * server.h: Include common-defs.h.
4042 Do not include config.h or build-gnulib-gdbserver/config.h.
4043
d41f6d8e
GB
40442014-07-30 Gary Benson <gbenson@redhat.com>
4045
4046 * hostio-errno.c: Move server.h to top of includes list.
4047 * inferiors.c: Likewise.
4048 * linux-x86-low.c: Likewise.
4049 * notif.c: Include server.h.
4050
314c6a35
TT
40512014-07-24 Tom Tromey <tromey@redhat.com>
4052 Gary Benson <gbenson@redhat.com>
4053
4054 * server.h (CORE_ADDR): Now unsigned.
4055
69ff6be5
PA
40562014-07-16 Pedro Alves <palves@redhat.com>
4057
4058 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
4059
ce9e3fe7
PA
40602014-07-15 Pedro Alves <palves@redhat.com>
4061
4062 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
4063 copy.
4064
e76126e8
PA
40652014-07-11 Pedro Alves <palves@redhat.com>
4066
4067 * linux-low.c (kill_wait_lwp): New function, based on
4068 kill_one_lwp_callback, but use my_waitpid directly.
4069 (kill_one_lwp_callback, linux_kill): Use it.
4070
8e9db26e
PA
40712014-06-23 Pedro Alves <palves@redhat.com>
4072
4073 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
4074 before setting DR0..DR3.
4075
698b3e08
GB
40762014-06-20 Gary Benson <gbenson@redhat.com>
4077
4078 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
4079 * configure: Regenerated.
4080 * config.in: Likewise.
4081
125f8a3d
GB
40822014-06-20 Gary Benson <gbenson@redhat.com>
4083
4084 * Makefile.in (SFILES): Update locations for files moved
4085 from common to nat.
4086 (object file files): Reordered.
4087
42995dbd
GB
40882014-06-20 Gary Benson <gbenson@redhat.com>
4089
4090 * i386-low.h (i386_dr_low_can_set_addr): Removed.
4091 (i386_dr_low_set_addr): Likewise.
4092 (i386_dr_low_get_addr): Likewise.
4093 (i386_dr_low_can_set_control): Likewise.
4094 (i386_dr_low_set_control): Likewise.
4095 (i386_dr_low_get_control): Likewise.
4096 (i386_dr_low_get_status): Likewise.
4097 (i386_get_debug_register_length): Likewise.
4098 * linux-x86-low.c (i386_dr_low_set_addr):
4099 Changed signature. Made static.
4100 (i386_dr_low_get_addr): Likewise.
4101 (i386_dr_low_set_control): Likewise.
4102 (i386_dr_low_get_control): Likewise.
4103 (i386_dr_low_get_status): Likewise.
4104 (i386_dr_low): New global variable.
4105 * win32-i386-low.c (i386_dr_low_set_addr):
4106 Changed signature. Made static.
4107 (i386_dr_low_get_addr): Likewise.
4108 (i386_dr_low_set_control): Likewise.
4109 (i386_dr_low_get_control): Likewise.
4110 (i386_dr_low_get_status): Likewise.
4111 (i386_dr_low): New global variable.
4112
e1d2394b
MS
41132014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
4114
4115 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
4116 * Makefile.in (AR, AR_FLAGS): Define.
4117 * configure: Regenerate.
4118
3a8ee006
GB
41192014-06-19 Gary Benson <gbenson@redhat.com>
4120
4121 * Makefile.in (i386-dregs.o): New rule.
4122 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
4123 * i386-low.c (target.h): Remove include.
4124 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
4125 (DR_CONTROL_SHIFT): Likewise.
4126 (DR_CONTROL_SIZE): Likewise.
4127 (DR_RW_EXECUTE): Likewise.
4128 (DR_RW_WRITE): Likewise.
4129 (DR_RW_READ): Likewise.
4130 (DR_RW_IORW): Likewise.
4131 (DR_LEN_1): Likewise.
4132 (DR_LEN_2): Likewise.
4133 (DR_LEN_4): Likewise.
4134 (DR_LEN_8): Likewise.
4135 (DR_LOCAL_ENABLE_SHIFT): Likewise.
4136 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
4137 (DR_ENABLE_SIZE): Likewise.
4138 (DR_LOCAL_SLOWDOWN): Likewise.
4139 (DR_GLOBAL_SLOWDOWN): Likewise.
4140 (DR_CONTROL_RESERVED): Likewise.
4141 (I386_DR_CONTROL_MASK): Likewise.
4142 (I386_DR_VACANT): Likewise.
4143 (I386_DR_LOCAL_ENABLE): Likewise.
4144 (I386_DR_GLOBAL_ENABLE): Likewise.
4145 (I386_DR_DISABLE): Likewise.
4146 (I386_DR_SET_RW_LEN): Likewise.
4147 (I386_DR_GET_RW_LEN): Likewise.
4148 (I386_DR_WATCH_HIT): Likewise.
4149 (i386_wp_op_t): Likewise.
4150 (i386_show_dr): Likewise.
4151 (i386_length_and_rw_bits): Likewise.
4152 (i386_insert_aligned_watchpoint): Likewise.
4153 (i386_remove_aligned_watchpoint): Likewise.
4154 (i386_handle_nonaligned_watchpoint): Likewise.
4155 i386_update_inferior_debug_regs(): Likewise.
4156 (i386_dr_insert_watchpoint): Likewise.
4157 (i386_dr_remove_watchpoint): Likewise.
4158 (i386_dr_region_ok_for_watchpoint): Likewise.
4159 (i386_dr_stopped_data_address): Likewise.
4160 (i386_dr_stopped_by_watchpoint): Likewise.
4161
8f26655c
GB
41622014-06-19 Gary Benson <gbenson@redhat.com>
4163
4164 * i386-low.c (i386_dr_show): Renamed to
4165 i386_show_dr and made static. All uses updated.
4166 (i386_dr_length_and_rw_bits): Renamed to
4167 i386_length_and_rw_bits and made static.
4168 All uses updated.
4169 (i386_dr_insert_aligned_watchpoint): Renamed to
4170 i386_insert_aligned_watchpoint and made static.
4171 All uses updated.
4172 (i386_dr_remove_aligned_watchpoint): Renamed to
4173 i386_remove_aligned_watchpoint and made static.
4174 All uses updated.
4175 (i386_dr_update_inferior_debug_regs): Renamed to
4176 i386_update_inferior_debug_regs and made static.
4177 All uses updated.
4178
b9228891
GB
41792014-06-18 Gary Benson <gbenson@redhat.com>
4180
5171def3
GB
4181 * i386-low.h (i386_dr_low_can_set_addr): New macro.
4182 (i386_dr_low_can_set_control): Likewise.
4183 (i386_get_debug_register_length): Likewise.
4184 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
4185 (i386_dr_low_can_set_control): Likewise.
4186 (i386_get_debug_register_length): Likewise.
4187
41882014-06-17 Gary Benson <gbenson@redhat.com>
4189
b9228891
GB
4190 * i386-low.h (i386-dregs.h): New include.
4191 (DR_FIRSTADDR): Now in i386-dregs.h.
4192 (DR_LASTADDR): Likewise.
4193 (DR_NADDR): Likewise.
4194 (DR_STATUS): Likewise.
4195 (DR_CONTROL): Likewise.
4196 (i386_debug_reg_state): Likewise.
4197 (i386_dr_insert_watchpoint): Likewise.
4198 (i386_dr_remove_watchpoint): Likewise.
4199 (i386_dr_region_ok_for_watchpoint): Likewise.
4200 (i386_dr_stopped_data_address): Likewise.
4201 (i386_dr_stopped_by_watchpoint): Likewise.
4202 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
4203
4be83cc2
GB
42042014-06-18 Gary Benson <gbenson@redhat.com>
4205
4206 * i386-low.h (i386_low_insert_watchpoint): Renamed to
4207 i386_dr_insert_watchpoint.
4208 (i386_low_remove_watchpoint): Renamed to
4209 i386_dr_remove_watchpoint.
4210 (i386_low_region_ok_for_watchpoint): Renamed to
4211 i386_dr_region_ok_for_watchpoint.
4212 (i386_low_stopped_data_address): Renamed to
4213 i386_dr_stopped_data_address.
4214 (i386_low_stopped_by_watchpoint): Renamed to
4215 i386_dr_stopped_by_watchpoint.
4216 * i386-low.c (i386_show_dr): Renamed to
4217 i386_dr_show and made nonstatic. All uses updated.
4218 (i386_length_and_rw_bits): Renamed to
4219 i386_dr_length_and_rw_bits and made nonstatic.
4220 All uses updated.
4221 (i386_insert_aligned_watchpoint): Renamed to
4222 i386_dr_insert_aligned_watchpoint and made nonstatic.
4223 All uses updated.
4224 (i386_remove_aligned_watchpoint): Renamed to
4225 i386_dr_remove_aligned_watchpoint and made nonstatic.
4226 All uses updated.
4227 (i386_update_inferior_debug_regs): Renamed to
4228 i386_dr_update_inferior_debug_regs and made nonstatic.
4229 All uses updated.
4230 (i386_low_insert_watchpoint): Renamed to
4231 i386_dr_insert_watchpoint. All uses updated.
4232 (i386_low_remove_watchpoint): Renamed to
4233 i386_dr_remove_watchpoint. All uses updated.
4234 (i386_low_region_ok_for_watchpoint): Renamed to
4235 i386_dr_region_ok_for_watchpoint. All uses updated.
4236 (i386_low_stopped_data_address): Renamed to
4237 i386_dr_stopped_data_address. All uses updated.
4238 (i386_low_stopped_by_watchpoint): Renamed to
4239 i386_dr_stopped_by_watchpoint. All uses updated.
4240
131aa0d4
GB
42412014-06-18 Gary Benson <gbenson@redhat.com>
4242
4243 * i386-low.c (i386_dr_low_can_set_addr): New macro.
4244 (i386_dr_low_can_set_control): Likewise.
4245 (i386_insert_aligned_watchpoint): New check.
4246
d9305f7f
GB
42472014-06-18 Gary Benson <gbenson@redhat.com>
4248
4249 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
4250 Renamed to state.
4251
e927c9fc
GB
42522014-06-18 Gary Benson <gbenson@redhat.com>
4253
4254 * i386-low.c (i386_length_and_rw_bits): Use internal_error
4255 instead of fatal and error.
4256 (i386_handle_nonaligned_watchpoint): Likewise.
4257
1b6d4134
GB
42582014-06-18 Gary Benson <gbenson@redhat.com>
4259
4260 * i386-low.c (i386_get_debug_register_length): New macro.
4261 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
4262 (i386_show_dr): Use debug_printf instead of fprintf. Use
4263 phex to format values.
4264
6e62758f
GB
42652014-06-18 Gary Benson <gbenson@redhat.com>
4266
4267 * i386-low.h: Comment changes.
4268 * i386-low.c: Likewise.
4269
fc6e2f03
GB
42702014-06-18 Gary Benson <gbenson@redhat.com>
4271
4272 * i386-low.c: Whitespace changes.
4273
f9d1eeed
TT
42742014-06-12 Tom Tromey <tromey@redhat.com>
4275
4276 * utils.c (freeargv): Remove.
4277
0b04e523
TT
42782014-06-12 Tom Tromey <tromey@redhat.com>
4279
4280 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
4281 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
4282 (parse_debug_format_options): Likewise.
4283 (gdbserver_usage): Likewise.
4284 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
4285 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
4286 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
4287 against libiberty.
4288 ($(LIBGNU)): Depend on libiberty.
4289 (all-lib): Recurse into all subdirs.
4290 (install-only): Invoke "install" target in subdirs.
4291 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
4292 targets.
4293 * configure: Rebuild.
4294 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
4295 for vasprintf, vsnprintf, or gettimeofday.
4296 * configure.srv: Don't add safe-ctype.o or lbasename.o to
4297 srv_tgtobj.
4298
270c9937
JB
42992014-06-05 Joel Brobecker <brobecker@adacore.com>
4300
4301 * development.sh: Delete.
4302 * Makefile.in (config.status): Adjust dependency on development.sh.
4303 * configure.ac: Adjust development.sh source call.
4304 * configure: Regenerate.
4305
0a261ed8
PA
43062014-06-02 Pedro Alves <palves@redhat.com>
4307
4308 * ax.c (gdb_free_agent_expr): New function.
4309 * ax.h (gdb_free_agent_expr): New declaration.
4310 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
4311 list.
4312 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
4313 static.
4314 (clear_breakpoint_conditions_and_commands): New function.
4315 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
4316 (clear_breakpoint_conditions_and_commands): New declaration.
4317
e9dae05e
RR
43182014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
4319
4320 * linux-aarch64-low.c (asm/ptrace.h): Include.
4321
5876f503
JK
43222014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
4323
4324 Fix TLS access for -static -pthread.
4325 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
4326 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
4327 (thread_db_load_search, try_thread_db_load_1): Initialize it.
4328
802e8e6d
PA
43292014-05-20 Pedro Alves <palves@redhat.com>
4330
4331 * linux-aarch64-low.c (aarch64_insert_point)
4332 (aarch64_remove_point): No longer check whether the type is
4333 supported here. Adjust to new interface.
4334 (the_low_target): Install aarch64_supports_z_point_type as
4335 supports_z_point_type method.
4336 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
4337 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
4338 instead of a Z packet char. Adjust.
4339 (arm_supports_z_point_type): New function.
4340 (arm_insert_point, arm_remove_point): Adjust to new interface.
4341 (the_low_target): Install arm_supports_z_point_type.
4342 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
4343 (cris_insert_point, cris_remove_point): Adjust to new interface.
4344 Don't check whether the type is supported here.
4345 (the_low_target): Install cris_supports_z_point_type.
4346 * linux-low.c (linux_supports_z_point_type): New function.
4347 (linux_insert_point, linux_remove_point): Adjust to new interface.
4348 * linux-low.h (struct linux_target_ops) <insert_point,
4349 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
4350 raw_breakpoint pointer parameter.
4351 <supports_z_point_type>: New method.
4352 * linux-mips-low.c (mips_supports_z_point_type): New function.
4353 (mips_insert_point, mips_remove_point): Adjust to new interface.
4354 Use mips_supports_z_point_type.
4355 (the_low_target): Install mips_supports_z_point_type.
4356 * linux-ppc-low.c (the_low_target): Install NULL as
4357 supports_z_point_type method.
4358 * linux-s390-low.c (the_low_target): Install NULL as
4359 supports_z_point_type method.
4360 * linux-sparc-low.c (the_low_target): Install NULL as
4361 supports_z_point_type method.
4362 * linux-x86-low.c (x86_supports_z_point_type): New function.
4363 (x86_insert_point): Adjust to new insert_point interface. Use
4364 insert_memory_breakpoint. Adjust to new
4365 i386_low_insert_watchpoint interface.
4366 (x86_remove_point): Adjust to remove_point interface. Use
4367 remove_memory_breakpoint. Adjust to new
4368 i386_low_remove_watchpoint interface.
4369 (the_low_target): Install x86_supports_z_point_type.
4370 * lynx-low.c (lynx_target_ops): Install NULL as
4371 supports_z_point_type callback.
4372 * nto-low.c (nto_supports_z_point_type): New.
4373 (nto_insert_point, nto_remove_point): Adjust to new interface.
4374 (nto_target_ops): Install nto_supports_z_point_type.
4375 * mem-break.c: Adjust intro comment.
4376 (struct raw_breakpoint) <raw_type, size>: New fields.
4377 <inserted>: Update comment.
4378 <shlib_disabled>: Delete field.
4379 (enum bkpt_type) <gdb_breakpoint>: Delete value.
4380 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
4381 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
4382 (raw_bkpt_type_to_target_hw_bp_type): New function.
4383 (find_enabled_raw_code_breakpoint_at): New function.
4384 (find_raw_breakpoint_at): New type and size parameters. Use them.
4385 (insert_memory_breakpoint): New function, based off
4386 set_raw_breakpoint_at.
4387 (remove_memory_breakpoint): New function.
4388 (set_raw_breakpoint_at): Reimplement.
4389 (set_breakpoint): New, based on set_breakpoint_at.
4390 (set_breakpoint_at): Reimplement.
4391 (delete_raw_breakpoint): Go through the_target->remove_point
4392 instead of assuming memory breakpoints.
4393 (find_gdb_breakpoint_at): Delete.
4394 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
4395 (find_gdb_breakpoint): New function.
4396 (set_gdb_breakpoint_at): Delete.
4397 (z_type_supported): New function.
4398 (set_gdb_breakpoint_1): New function, loosely based off
4399 set_gdb_breakpoint_at.
4400 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
4401 (delete_gdb_breakpoint_at): Delete.
4402 (delete_gdb_breakpoint_1): New function, loosely based off
4403 delete_gdb_breakpoint_at.
4404 (delete_gdb_breakpoint): New function.
4405 (clear_gdb_breakpoint_conditions): Rename to ...
4406 (clear_breakpoint_conditions): ... this. Don't handle a NULL
4407 breakpoint.
4408 (add_condition_to_breakpoint): Make static.
4409 (add_breakpoint_condition): Take a struct breakpoint pointer
4410 instead of an address. Adjust.
4411 (gdb_condition_true_at_breakpoint): Rename to ...
4412 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
4413 z_type parameter.
4414 (gdb_condition_true_at_breakpoint): Reimplement.
4415 (add_breakpoint_commands): Take a struct breakpoint pointer
4416 instead of an address. Adjust.
4417 (gdb_no_commands_at_breakpoint): Rename to ...
4418 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
4419 parameter. Return true if no breakpoint was found. Change debug
4420 output.
4421 (gdb_no_commands_at_breakpoint): Reimplement.
4422 (run_breakpoint_commands): Rename to ...
4423 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
4424 and change return type to boolean.
4425 (run_breakpoint_commands): New function.
4426 (gdb_breakpoint_here): Also check for Z1 breakpoints.
4427 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
4428 breakpoint. Go through the_target->remove_point instead of
4429 assuming memory breakpoint.
4430 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
4431 software and hardware breakpoints.
4432 (reinsert_raw_breakpoint): Go through the_target->insert_point
4433 instead of assuming memory breakpoint.
4434 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
4435 software and hardware breakpoints.
4436 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
4437 Check both software and hardware breakpoints.
4438 (validate_inserted_breakpoint): Assert the breakpoint is a
4439 software breakpoint. Set the inserted flag to -1 instead of
4440 setting shlib_disabled.
4441 (delete_disabled_breakpoints): Adjust.
4442 (validate_breakpoints): Only validate software breakpoints.
4443 Adjust to inserted flag change.
4444 (check_mem_read, check_mem_write): Skip breakpoint types other
4445 than software breakpoints. Adjust to inserted flag change.
4446 * mem-break.h (enum raw_bkpt_type): New enum.
4447 (raw_breakpoint, struct process_info): Forward declare.
4448 (Z_packet_to_target_hw_bp_type): Delete declaration.
4449 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
4450 (set_gdb_breakpoint, delete_gdb_breakpoint)
4451 (clear_breakpoint_conditions): New declarations.
4452 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
4453 (breakpoint_inserted_here): Update comment.
4454 (add_breakpoint_condition, add_breakpoint_commands): Replace
4455 address parameter with a breakpoint pointer parameter.
4456 (gdb_breakpoint_here): Update comment.
4457 (delete_gdb_breakpoint_at): Delete.
4458 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
4459 * server.c (process_point_options): Take a struct breakpoint
4460 pointer instead of an address. Adjust.
4461 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
4462 delete_gdb_breakpoint.
4463 * spu-low.c (spu_target_ops): Install NULL as
4464 supports_z_point_type method.
4465 * target.h: Include mem-break.h.
4466 (struct target_ops) <prepare_to_access_memory>: Update comment.
4467 <supports_z_point_type>: New field.
4468 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4469 instead of a char. Also take a raw breakpoint pointer.
4470 * win32-arm-low.c (the_low_target): Install NULL as
4471 supports_z_point_type.
4472 * win32-i386-low.c (i386_supports_z_point_type): New function.
4473 (i386_insert_point, i386_remove_point): Adjust to new interface.
4474 (the_low_target): Install i386_supports_z_point_type.
4475 * win32-low.c (win32_supports_z_point_type): New function.
4476 (win32_insert_point, win32_remove_point): Adjust to new interface.
4477 (win32_target_ops): Install win32_supports_z_point_type.
4478 * win32-low.h (struct win32_target_ops):
4479 <supports_z_point_type>: New method.
4480 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
4481 instead of a char. Also take a raw breakpoint pointer.
4482
932539e3
PA
44832014-05-20 Pedro Alves <palves@redhat.com>
4484
4485 * mem-break.h: Include break-common.h.
4486 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4487 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
4488 (Z_packet_to_target_hw_bp_type): New declaration.
4489 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
4490 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
4491 (Z_PACKET_ACCESS_WP): Delete macros.
4492 (Z_packet_to_hw_type): Delete function.
4493 * i386-low.h: Don't include break-common.h here.
4494 (Z_packet_to_hw_type): Delete declaration.
4495 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
4496 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4497 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
4498 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
4499 * linux-aarch64-low.c: Don't include break-common.h here.
4500 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
4501 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
4502 (Z_packet_to_target_hw_bp_type): Delete function.
4503 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
4504 function.
4505 (mips_insert_point, mips_remove_point): Use
4506 Z_packet_to_target_hw_bp_type.
4507
4ff0d3d8
PA
45082014-05-20 Pedro Alves <palves@redhat.com>
4509
4510 * linux-aarch64-low.c: Include break-common.h.
4511 (enum target_point_type): Delete.
4512 (Z_packet_to_point_type): Rename to ...
4513 (Z_packet_to_target_hw_bp_type): ... this, and return a
4514 target_hw_bp_type instead.
4515 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
4516 instead of an enum target_point_type.
4517 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
4518 breakpoint type.
4519 (aarch64_dr_state_insert_one_point)
4520 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
4521 (aarch64_handle_aligned_watchpoint)
4522 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
4523 Take an enum target_hw_bp_type instead of an enum
4524 target_point_type.
4525 (aarch64_supports_z_point_type): New function.
4526 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
4527 use Z_packet_to_target_hw_bp_type.
4528
786dc519
JB
45292014-05-20 Joel Brobecker <brobecker@adacore.com>
4530
4531 * configure.ac: Only use -Werror by default when DEVELOPMENT
4532 is true.
4533 * configure: Regenerate.
4534
9e0aa64f
JK
45352014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
4536
4537 Fix gdbserver qGetTLSAddr for x86_64 -m32.
4538 * linux-x86-low.c (X86_64_USER_REGS): New.
4539 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
4540
2b577b92
YQ
45412014-04-28 Yao Qi <yao@codesourcery.com>
4542
4543 * Makefile.in (i386-avx512.c): Fix the typo of generated file
4544 name.
4545
94611da2
PA
45462014-04-25 Pedro Alves <palves@redhat.com>
4547
4548 PR server/16255
4549 * linux-low.c (linux_attach_fail_reason_string): New function.
4550 (linux_attach_lwp): Delete.
4551 (linux_attach_lwp_1): Rename to ...
4552 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
4553 argument. Remove "initial" parameter. Return int instead of
4554 void. Don't error or warn here.
4555 (linux_attach): Adjust to call linux_attach_lwp. Call error on
4556 failure to attach to the tgid. Call warning when failing to
4557 attach to an lwp.
4558 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
4559 argument. Remove "initial" parameter. Return int instead of
4560 void. Don't error or warn here.
4561 (linux_attach_fail_reason_string): New declaration.
4562 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
4563 interface change. Use linux_attach_fail_reason_string.
4564
01f9f808
MS
45652014-04-24 Michael Sturm <michael.sturm@mintel.com>
4566 Walfred Tedeschi <walfred.tedeschi@intel.com>
4567
4568 * Makefile.in: Added rules to handle new files
4569 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
4570 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
4571 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
4572 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
4573 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
4574 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
4575 x32-avx512-linux.o.
4576 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
4577 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
4578 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
4579 i386/x32-avx512.xml.
4580 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
4581 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
4582 i386/x32-avx512-linux.xml.
4583 * i387-fp.c (num_avx512_k_registers): New constant for number
4584 of K registers.
4585 (num_avx512_zmmh_low_registers): New constant for number of
4586 lower ZMM registers (0-15).
4587 (num_avx512_zmmh_high_registers): New constant for number of
4588 higher ZMM registers (16-31).
4589 (num_avx512_ymmh_registers): New contant for number of higher
4590 YMM registers (ymm16-31 added by avx521 on x86_64).
4591 (num_avx512_xmm_registers): New constant for number of higher
4592 XMM registers (xmm16-31 added by AVX512 on x86_64).
4593 (struct i387_xsave): Add space for AVX512 registers.
4594 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
4595 Add code to handle AVX512 registers.
4596 (i387_xsave_to_cache): Add code to handle AVX512 registers.
4597 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
4598 prototypei from generated file.
4599 (tdesc_amd64_avx512_linux): Likewise.
4600 (init_registers_x32_avx512_linux): Likewise.
4601 (tdesc_x32_avx512_linux): Likewise.
4602 (init_registers_i386_avx512_linux): Likewise.
4603 (tdesc_i386_avx512_linux): Likewise.
4604 (x86_64_regmap): Add AVX512 registers.
4605 (x86_linux_read_description): Add code to handle AVX512 XSTATE
4606 mask.
4607 (initialize_low_arch): Add code to initialize AVX512 registers.
4608
51aa91f9
PA
46092014-04-23 Pedro Alves <palves@redhat.com>
4610
4611 * mem-break.c (find_gdb_breakpoint_at): Make static.
4612 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
4613
a4165e94
PA
46142014-04-23 Pedro Alves <palves@redhat.com>
4615
4616 * i386-low.c: Don't include break-common.h here.
4617 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4618 prototype to take target_hw_bp_type as argument instead of a Z
4619 packet char.
4620 * i386-low.h: Include break-common.h here.
4621 (Z_packet_to_hw_type): Declare.
4622 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
4623 prototypes.
4624 * linux-x86-low.c (x86_insert_point): Convert the packet number to
4625 a target_hw_bp_type before calling i386_low_insert_watchpoint.
4626 (x86_remove_point): Convert the packet number to a
4627 target_hw_bp_type before calling i386_low_remove_watchpoint.
4628 * win32-i386-low.c (i386_insert_point): Convert the packet number
4629 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
4630 (i386_remove_point): Convert the packet number to a
4631 target_hw_bp_type before calling i386_low_remove_watchpoint.
4632
b8acf843
PA
46332014-04-23 Pedro Alves <palves@redhat.com>
4634
4635 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
4636
d708bcd1
PA
46372014-04-10 Pedro Alves <palves@redhat.com>
4638
4639 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
4640 Check if the condition or command is NULL before checking if the
4641 breakpoint is known. On success, return true.
4642 * mem-break.h (add_breakpoint_condition): Document return.
4643 (add_breakpoint_commands): Add describing comment.
4644 * server.c (skip_to_semicolon): New function.
4645 (process_point_options): Use it.
4646
2eec7d5b
PA
46472014-04-09 Pedro Alves <palves@redhat.com>
4648
4649 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
4650 to lwpid_of.
4651
fa96cb38
PA
46522014-02-27 Pedro Alves <palves@redhat.com>
4653
4654 PR 12702
4655 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
4656 macros.
4657 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
4658 output.
4659 (last_thread_of_process_p): Take a PID argument instead of a
4660 thread pointer.
4661 (linux_wait_for_lwp): Delete.
4662 (num_lwps, check_zombie_leaders, not_stopped_callback): New
4663 functions.
4664 (linux_low_filter_event): New function, party factored out from
4665 linux_wait_for_event.
4666 (linux_wait_for_event): Rename to ...
4667 (linux_wait_for_event_filtered): ... this. Add new filter ptid
4668 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
4669 sigsuspend. Check for zombie leaders.
4670 (linux_wait_for_event): Reimplement as wrapper around
4671 linux_wait_for_event_filtered.
4672 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
4673 a normal or signal exit is seen, it's the whole process exiting.
4674 (wait_for_sigstop): No longer a for_each_inferior callback.
4675 Rewrite on top of linux_wait_for_event_filtered.
4676 (stop_all_lwps): Call wait_for_sigstop directly.
4677 * server.c (resume, handle_target_event): Handle
4678 TARGET_WAITKIND_NO_RESUMED.
4679
d763de10
JB
46802014-02-26 Joel Brobecker <brobecker@adacore.com>
4681
4682 * win32-low.c (psapi_get_dll_name,
4683 * win32_CreateToolhelp32Snapshot): Delete.
4684 (win32_CreateToolhelp32Snapshot, win32_Module32First)
4685 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
4686 Delete.
4687 (handle_load_dll): Add function description.
4688 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
4689
850a0f76
JB
46902014-02-26 Joel Brobecker <brobecker@adacore.com>
4691
4692 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
4693 Add comment.
4694 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
4695 base address when calling win32_add_one_solib.
4696 (handle_load_dll): Delete local variable load_addr.
4697 Remove 0x1000 offset applied to DLL base address when calling
4698 win32_add_one_solib.
4699 (handle_unload_dll): Add comment.
4700
f25b3fc3
JB
47012014-02-26 Joel Brobecker <brobecker@adacore.com>
4702
4703 * win32-low.c (win32_add_all_dlls): Renames
4704 win32_ensure_ntdll_loaded. Rewrite function documentation.
4705 Adjust implementation to always load all DLLs.
4706 Add 0x1000 offset to DLL base address when calling
4707 win32_add_one_solib.
4708 (child_initialization_done): New static global.
4709 (do_initial_child_stuff): Set child_initialization_done to
4710 zero during child initialization, and 1 after. Replace call
4711 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
4712 Add comment.
4713 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
4714 (handle_unload_dll): Add function documentation.
4715 (get_child_debug_event): Ignore load and unload DLL events
4716 during child initialization.
4717
d86d4aaf
DE
47182014-02-20 Doug Evans <dje@google.com>
4719
3bc32da3 4720 Remove global all_lwps.
d86d4aaf
DE
4721 * inferiors.h (ptid_of): Move here from linux-low.h.
4722 (pid_of, lwpid_of): Ditto.
4723 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
4724 parameter is a struct thread_info * now.
4725 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
4726 directly. Pass &all_threads to find_inferior instead of &all_lwps.
4727 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
4728 directly.
4729 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
4730 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
4731 * linux-arm-low.c (update_registers_callback): Update, "entry"
4732 parameter is a struct thread_info * now.
4733 Fetch lwpid from current_inferior directly.
4734 (arm_insert_point): Pass &all_threads to find_inferior instead of
4735 &all_lwps.
4736 (arm_remove_point): Ditto.
4737 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
4738 (arm_prepare_to_resume): Fetch pid from thread.
4739 (arm_read_description): Fetch lwpid from current_inferior directly.
4740 * linux-low.c (all_lwps): Delete.
4741 (delete_lwp): Delete call to remove_inferior.
4742 (handle_extended_wait): Fetch lwpid from thread.
4743 (add_lwp): Don't set lwp->entry.id. Remove call to
4744 add_inferior_to_list.
4745 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
4746 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
4747 (kill_one_lwp_callback): Ditto.
4748 (linux_kill): Don't dereference NULL pointer.
4749 Fetch ptid,lwpid from thread.
4750 (get_detach_signal): Fetch ptid from thread.
4751 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
4752 Simplify call to regcache_invalidate_thread.
4753 (delete_lwp_callback): Update, "entry" parameter is a
4754 struct thread_info * now. Fetch pid from thread.
4755 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
4756 (status_pending_p_callback): Update, "entry" parameter is a
4757 struct thread_info * now. Fetch ptid from thread.
4758 (find_lwp_pid): Update, "entry" parameter is a
4759 struct thread_info * now.
4760 (linux_wait_for_lwp): Fetch pid from thread.
4761 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
4762 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
4763 (enqueue_one_deferred_signal): Fetch lwpid from thread.
4764 (dequeue_one_deferred_signal): Ditto.
4765 (cancel_breakpoint): Fetch ptid from current_inferior.
4766 (linux_wait_for_event): Pass &all_threads to find_inferior,
4767 not &all_lwps. Fetch ptid, lwpid from thread.
4768 (count_events_callback): Update, "entry" parameter is a
4769 struct thread_info * now.
4770 (select_singlestep_lwp_callback): Ditto.
4771 (select_event_lwp_callback): Ditto.
4772 (cancel_breakpoints_callback): Ditto.
4773 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
4774 not &all_lwps.
4775 (select_event_lwp): Ditto. Fetch ptid from event_thread.
4776 (unsuspend_one_lwp): Update, "entry" parameter is a
4777 struct thread_info * now.
4778 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
4779 not &all_lwps.
4780 (linux_stabilize_threads): Ditto. And for for_each_inferior.
4781 Fetch lwpid from thread, not lwp.
4782 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
4783 Pass &all_threads to find_inferior, not &all_lwps.
4784 (send_sigstop): Fetch lwpid from thread, not lwp.
4785 (send_sigstop_callback): Update, "entry" parameter is a
4786 struct thread_info * now.
4787 (suspend_and_send_sigstop_callback): Ditto.
4788 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
4789 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
4790 struct thread_info * now.
4791 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
4792 from thread, lwp.
4793 (lwp_running): Update, "entry" parameter is a
4794 struct thread_info * now.
4795 (stop_all_lwps): Fetch ptid from thread.
4796 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
4797 (linux_resume_one_lwp): Fetch lwpid from thread.
4798 (linux_set_resume_request): Update, "entry" parameter is a
4799 struct thread_info * now. Fetch pid, lwpid from thread.
4800 (resume_status_pending_p): Update, "entry" parameter is a
4801 struct thread_info * now.
4802 (need_step_over_p): Ditto. Fetch lwpid from thread.
4803 (start_step_over): Fetch lwpid from thread.
4804 (linux_resume_one_thread): Update, "entry" parameter is a
4805 struct thread_info * now. Fetch lwpid from thread.
4806 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
4807 (proceed_one_lwp): Update, "entry" parameter is a
4808 struct thread_info * now. Fetch lwpid from thread.
4809 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
4810 struct thread_info * now.
4811 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
4812 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
4813 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
4814 directly.
4815 (regsets_store_inferior_registers): Ditto.
4816 (fetch_register, store_register): Ditto.
4817 (linux_read_memory, linux_write_memory): Ditto.
4818 (linux_request_interrupt): Ditto.
4819 (linux_read_auxv): Ditto.
4820 (linux_xfer_siginfo): Ditto.
4821 (linux_qxfer_spu): Ditto.
4822 (linux_qxfer_libraries_svr4): Ditto.
4823 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
4824 moved to inferiors.h.
4825 (get_lwp): Delete.
4826 (get_thread_lwp): Update.
4827 (struct lwp_info): Delete member "entry". Simplify comment for
4828 member "thread".
4829 (all_lwps): Delete.
4830 * linux-mips-low.c (mips_read_description): Fetch lwpid from
4831 current_inferior directly.
4832 (update_watch_registers_callback): Update, "entry" parameter is a
4833 struct thread_info * now. Fetch pid from thread.
4834 (mips_linux_prepare_to_resume): Fetch ptid from thread.
4835 (mips_insert_point): Fetch lwpid from current_inferior.
4836 Pass &all_threads to find_inferior, not &all_lwps.
4837 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
4838 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
4839 directly.
4840 (mips_stopped_data_address): Ditto.
4841 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
4842 directly.
4843 * linux-tile-low.c (tile_arch_setup): Ditto.
4844 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
4845 (update_debug_registers_callback): Update, "entry" parameter is a
4846 struct thread_info * now. Fetch pid from thread.
4847 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
4848 Pass &all_threads to find_inferior, not &all_lwps.
4849 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
4850 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
4851 Pass &all_threads to find_inferior, not &all_lwps.
4852 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
4853 (i386_dr_low_get_status): Ditto.
4854 (x86_linux_prepare_to_resume): Fetch ptid from thread.
4855 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
4856 (x86_linux_read_description): Ditto.
4857 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
4858
3b8361aa
DE
48592014-02-20 Doug Evans <dje@google.com>
4860
4861 * inferiors.c (get_first_inferior): Fix buglet.
4862
f7667f0d
DE
48632014-02-19 Doug Evans <dje@google.com>
4864
4865 * gdbthread.h (add_thread): Change result type to struct thread_info *.
4866 * inferiors.c (add_thread): Change result type to struct thread_info *.
4867 All callers updated.
4868 (add_lwp): Call add_thread here instead of in callers.
4869 All callers updated.
4870 * linux-low.h (get_lwp_thread): Rewrite.
4871 (struct lwp_info): New member "thread".
4872
b3312d80
DE
48732014-02-19 Doug Evans <dje@google.com>
4874
4875 * linux-low.c (add_lwp): Change result to struct lwp_info *.
4876 All callers updated.
4877
ecc6f45c
DE
48782014-02-19 Doug Evans <dje@google.com>
4879
4880 * inferiors.c (add_thread): Fix whitespace.
4881
649ebbca
DE
48822014-02-19 Doug Evans <dje@google.com>
4883
4884 * dll.c (clear_dlls): Replace accessing list implemention details
4885 with API function.
4886 * gdbthread.h (get_first_thread): Declare.
4887 * inferiors.c (for_each_inferior_with_data): New function.
4888 (get_first_thread): New function.
4889 (find_thread_ptid): Simplify.
4890 (get_first_inferior): New function.
4891 (clear_list): Delete.
4892 (one_inferior_p): New function.
4893 (clear_inferior_list): New function.
4894 (clear_inferiors): Update.
4895 * inferiors.h (for_each_inferior_with_data): Declare.
4896 (clear_inferior_list): Declare.
4897 (one_inferior_p): Declare.
4898 (get_first_inferior): Declare.
4899 * linux-low.c (linux_wait_for_event): Replace accessing list
4900 implemention details with API function.
4901 * server.c (target_running): Ditto.
4902 (accumulate_file_name_length): New function.
4903 (emit_dll_description): New function.
4904 (handle_qxfer_libraries): Replace accessing list implemention
4905 details with API function.
4906 (handle_qxfer_threads_worker): New function.
4907 (handle_qxfer_threads_proper): Replace accessing list implemention
4908 details with API function.
4909 (handle_query): Ditto.
4910 (visit_actioned_threads_callback_ftype): New typedef.
4911 (visit_actioned_threads_data): New struct.
4912 (visit_actioned_threads): Rewrite to be find_inferior callback.
4913 (resume): Call find_inferior.
4914 (handle_status): Replace accessing list implemention
4915 details with API function.
4916 (process_serial_event): Replace accessing list implemention details
4917 with API function.
4918 * target.c (set_desired_inferior): Replace accessing list implemention
4919 details with API function.
4920 * tracepoint.c (same_process_p): New function.
4921 (gdb_agent_about_to_close): Replace accessing list implemention
4922 details with API function.
4923 * win32-low.c (child_delete_thread): Replace accessing list
4924 implemention details with API function.
4925 (match_dll_by_basename): New function.
4926 (dll_is_loaded_by_basename): New function.
4927 (win32_ensure_ntdll_loaded): Replace accessing list implemention
4928 details call to dll_is_loaded_by_basename.
4929
80894984
DE
49302014-02-19 Doug Evans <dje@google.com>
4931
4932 * dll.h (struct dll_info): Add comment.
4933 * gdbthread.h (struct thread_info): Add comment.
4934 (current_ptid): Simplify.
4935 * inferiors.c (add_process): Update.
4936 (remove_process): Update.
4937 * inferiors.h (struct process_info): Rename member "head" to "entry".
4938 * linux-low.c (delete_lwp): Update.
4939 (add_lwp): Update.
4940 (last_thread_of_process_p): Update.
4941 (kill_one_lwp_callback, linux_kill): Update.
4942 (status_pending_p_callback): Update.
4943 (wait_for_sigstop): Update. Simplify read of ptid.
4944 (start_step_over): Update.
4945 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
4946 (get_lwp_thread): Update.
4947 (struct lwp_info): Rename member "head" to "entry".
4948 * regcache.h (inferior_list_entry): Delete.
4949 * server.c (kill_inferior_callback): Update.
4950 (detach_or_kill_inferior_callback): Update.
4951 (print_started_pid): Update.
4952 (print_attached_pid): Update.
4953 (process_serial_event): Simplify read of ptid.
4954 * thread-db.c (thread_db_create_event): Update.
4955 (thread_db_get_tls_address): Update.
4956 * win32-low.c (current_inferior_ptid): Simplify.
4957
46917d26
TT
49582014-02-19 Tom Tromey <tromey@redhat.com>
4959
4960 * target.h (struct target_ops) <supports_btrace>: Add target_ops
4961 argument.
4962 (target_supports_btrace): Update.
4963
0759a81e
YQ
49642014-02-14 Yao Qi <yao@codesourcery.com>
4965
4966 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
4967 (rsp-low-ipa.o): New target.
4968
a7191e8b
TT
49692014-02-12 Tom Tromey <tromey@redhat.com>
4970
4971 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
4972 convert_ascii_to_int.
4973 * regcache.c (registers_to_string): Likewise.
4974 * remote-utils.c (decode_M_packet): Likewise.
4975 * server.c (process_serial_event): Likewise.
4976
ff0e980e
TT
49772014-02-12 Tom Tromey <tromey@redhat.com>
4978
4979 * server.c (handle_query, handle_v_run): Use hex2bin, not
4980 unhexify.
4981 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
4982
e9371aff
TT
49832014-02-12 Tom Tromey <tromey@redhat.com>
4984
4985 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
4986 convert_int_to_ascii.
4987 * regcache.c (registers_to_string, collect_register_as_string):
4988 Likewise.
4989 * remote-utils.c (look_up_one_symbol, relocate_instruction):
4990 Likewise.
4991 * server.c (process_serial_event): Likewise.
4992 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
4993 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
4994
971dc0b8
TT
49952014-02-12 Tom Tromey <tromey@redhat.com>
4996
4997 * remote-utils.c (look_up_one_symbol, monitor_output): Use
4998 bin2hex, not hexify.
4999 * tracepoint.c (cmd_qtstatus): Likewise.
5000
0a822afb
TT
50012014-02-12 Tom Tromey <tromey@redhat.com>
5002
5003 * remote-utils.c (monitor_output): Pass explicit length to
5004 hexify.
5005
9c3d6531
TT
50062014-02-12 Tom Tromey <tromey@redhat.com>
5007
5008 * tracepoint.c: Include rsp-low.h.
5009 * server.c: Include rsp-low.h.
5010 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
5011 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
5012 declare.
5013 * remote-utils.c: Include rsp-low.h.
5014 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
5015 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
5016 (convert_int_to_ascii, convert_ascii_to_int): Move to
5017 common/rsp-low.c.
5018 * regcache.c: Include rsp-low.h.
5019 * ax.c: Include rsp-low.h.
5020 * Makefile.in (SFILES): Add common/rsp-low.c.
5021 (OBS): Add rsp-low.o.
5022 (rsp-low.o): New target.
5023
01fd3ea5
TT
50242014-02-12 Tom Tromey <tromey@redhat.com>
5025
5026 * utils.h (pulongest, plongest, phex_nz): Don't declare.
5027 Include print-utils.h.
5028 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
5029 (plongest, thirty_two, phex_nz): Remove.
5030 * Makefile.in (SFILES): Add common/print-utils.c.
5031 (OBS): Add print-utils.o.
5032 (print-utils-ipa.o): New target.
5033 (print-utils.o): New target.
5034 (IPA_OBJS): Add print-utils-ipa.o.
5035
e99dc820
TT
50362014-02-06 Tom Tromey <tromey@redhat.com>
5037
5038 * Makefile.in (SFILES): Fix indentation.
5039
ee1e2d4f
DE
50402014-02-05 Doug Evans <dje@google.com>
5041
5042 * linux-low.c (linux_wait_for_event): Improve comment.
5043 (linux_wait_1): Keep current_inferior in sync with event_child.
5044
f5a02773
DE
50452014-01-22 Doug Evans <dje@google.com>
5046
5047 * gdbthread.h (gdb_id_to_thread): Delete, unused.
5048
87ce2a04
DE
50492014-01-22 Doug Evans <dje@google.com>
5050
5051 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
5052 * configure: Regenerate.
5053 * config.in: Regenerate.
5054 * Makefile.in (SFILES): Add debug.c.
5055 (OBS): Add debug.o.
5056 * debug.c: New file.
5057 * debug.h: New file.
5058 * linux-aarch64-low.c (*): Update all debugging printfs to use
5059 debug_printf instead of fprintf.
5060 * linux-arm-low.c (*): Ditto.
5061 * linux-cris-low.c (*): Ditto.
5062 * linux-crisv32-low.c (*): Ditto.
5063 * linux-m32r-low.c (*): Ditto.
5064 * linux-sparc-low.c (*): Ditto.
5065 * linux-x86.c (*): Ditto.
5066 * linux-low.c (*): Ditto.
5067 (linux_wait_1): Add calls to debug_enter, debug_exit.
5068 (linux_wait): Remove redundant debugging printf.
5069 (stop_all_lwps): Add calls to debug_enter, debug_exit.
5070 (linux_resume, unstop_all_lwps): Ditto.
5071 * mem-break.c (*): Update all debugging printfs to use
5072 debug_printf instead of fprintf.
5073 * remote-utils.c (*): Ditto.
5074 * thread-db.c (*): Ditto.
5075 * server.c #include <ctype.h>, "gdb_vecs.h".
5076 (debug_threads): Moved to debug.c.
5077 (*): Update all debugging printfs to use debug_printf instead of
5078 fprintf.
5079 (start_inferior): Replace call to fflush with call to debug_flush.
5080 (monitor_show_help): Mention set debug-format.
5081 (parse_debug_format_options): New function.
5082 (handle_monitor_command): Handle "monitor set debug-format".
5083 (gdbserver_usage): Mention --debug-format.
5084 (main): Parse --debug-format.
5085 * server.h (debug_threads): Declaration moved to debug.h.
5086 #include "debug.h".
5087 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
5088 trace_debug_1 that uses debug_printf.
5089 (tracepoint_look_up_symbols): Update all debugging printfs to use
5090 debug_printf instead of fprintf.
5091
e671835b
BS
50922014-01-20 Baruch Siach <baruch@tkos.co.il>
5093
5094 * linux-xtensa-low.c: Include asm/ptrace.h instead of
5095 sys/ptrace.h.
5096
b5737fa9
PA
50972014-01-17 Pedro Alves <palves@redhat.com>
5098
ea38d2a9 5099 PR build/16445
c7faa97a
PA
5100 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
5101 defined after including gdb_proc_service.h.
b5737fa9 5102
40ed484e
DE
51032014-01-16 Doug Evans <dje@google.com>
5104
5105 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
5106 (match_dll): Use it.
5107
969c39fb
MM
51082014-01-16 Markus Metzger <markus.t.metzger@intel.com>
5109
5110 * target.h (target_ops) <read_btrace>: Change parameters and
5111 return type to allow error reporting.
5112 * server.c (handle_qxfer_btrace): Support delta reads. Pass
5113 trace reading errors on.
5114 * linux-low.c (linux_low_read_btrace): Pass trace reading
5115 errors on.
5116 (linux_low_disable_btrace): New.
5117
ab7f45ba
DE
51182014-01-15 Doug Evans <dje@google.com>
5119
5120 * inferiors.c (thread_id_to_gdb_id): Delete.
5121 * inferiors.h (thread_id_to_gdb_id): Delete.
5122
66af0f44
EZ
51232014-01-13 Eli Zaretskii <eliz@gnu.org>
5124
5125 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
5126 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
5127 versions.
5128
9939e131
PA
51292014-01-08 Pedro Alves <palves@redhat.com>
5130
5131 * server.c (handle_status): Don't discard previous queued stop
5132 replies or thread's pending status here.
5133 (main) <disconnection>: Do it here instead.
5134
b7ea362b
PA
51352014-01-08 Pedro Alves <palves@redhat.com>
5136
5137 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
5138 * server.c (visit_actioned_threads, handle_pending_status): New
5139 function.
5140 (handle_v_cont): Factor out parts to ...
5141 (resume): ... this new function. If in all-stop, and a thread
5142 being resumed has a pending status, report it without actually
5143 resuming.
5144 (myresume): Adjust to use the new 'resume' function.
5145 (clear_pending_status_callback, set_pending_status_callback)
5146 (find_status_pending_thread_callback): New functions.
5147 (handle_status): Handle the case of multiple threads having
5148 interesting statuses to report. Report threads' real last signal
5149 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
5150 with an interesting thread to report the status for, instead of
5151 always reporting the status of the first thread.
5152
28498c42
JB
51532014-01-01 Joel Brobecker <brobecker@adacore.com>
5154
5155 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
5156 * gdbreplay.c (gdbreplay_version): Likewise.
5157
f45c82da
YZ
51582013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
5159
5160 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
5161 iov.iov_len with the real length in use.
5162
379a5e2d
JB
51632013-12-13 Joel Brobecker <brobecker@adacore.com>
5164
5165 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
5166 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
5167 for all targets that use win32-low.c.
5168 * win32-low.c (win32_ensure_ntdll_loaded): New function.
5169 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
5170
4210d83e
PA
51712013-12-13 Pedro Alves <palves@redhat.com>
5172
5173 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
5174 if equal to TARGET_WAITKIND_LOADED.
5175 * win32-low.c (cached_status): New static global.
5176 (win32_wait): Add declaration.
5177 (do_initial_child_stuff): Flush all initial pending debug events
5178 up to the initial breakpoint.
5179 (win32_wait): If CACHED_STATUS was set, return that instead
5180 of doing a real wait. Remove the code resuming the execution
5181 of the inferior after receiving a TARGET_WAITKIND_LOADED event
5182 during the initial phase. Also remove the code changing
5183 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
5184 TARGET_WAITKIND_STOPPED.
5185
e7f0d979
YQ
51862013-12-11 Yao Qi <yao@codesourcery.com>
5187
5188 * notif.c (handle_notif_ack): Return 0 if no notification
5189 matches.
5190
ebcf782c
DE
51912013-11-20 Doug Evans <dje@google.com>
5192
5193 * linux-low.c (linux_set_resume_request): Fix comment.
5194
20ad9378
DE
51952013-11-20 Doug Evans <dje@google.com>
5196
5197 * linux-low.c (resume_status_pending_p): Tweak comment.
5198
a196ebeb
WT
51992013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
5200
5201 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
5202 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
5203 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
5204 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
5205 (srv_amd64_regobj): Add amd64-mpx.o.
5206 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
5207 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
5208 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
5209 * i387-fp.c (num_pl_bnd_register) Added constant.
5210 (num_pl_bnd_cfg_registers) Added constant.
5211 (struct i387_xsave) Added reserved area and MPX fields.
5212 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
5213 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
5214 function.
5215 (tdesc_i386_mpx_linux): Add MPX amd64 target.
5216 (init_registers_amd64_mpx_linux): Declare new function.
5217 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
5218 (x86_64_regmap): Add MPX registers.
5219 (x86_linux_read_description): Add MPX case.
5220 (initialize_low_arch): Initialize MPX targets.
5221
0080a2f6
TT
52222013-11-18 Tom Tromey <tromey@redhat.com>
5223
5224 * configure: Rebuild.
5225 * configure.ac: Don't check for stdlib.h.
5226 * gdbreplay.c: Unconditionally include stdlib.h.
5227
2978b111
TT
52282013-11-18 Tom Tromey <tromey@redhat.com>
5229
5230 * config.in: Rebuild.
5231 * configure: Rebuild.
5232 * configure.ac: Don't use AC_HEADER_DIRENT.
5233
a3d08894
TT
52342013-11-18 Tom Tromey <tromey@redhat.com>
5235
5236 * server.h: Don't check HAVE_STRING_H.
5237 * gdbreplay.c: Don't check HAVE_STRING_H.
5238 * configure: Rebuild.
5239
0a5dd17d
TT
52402013-11-18 Tom Tromey <tromey@redhat.com>
5241
5242 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
5243 LIBGNU.
5244
1bd2f0ba
TT
52452013-11-08 Tom Tromey <tromey@redhat.com>
5246
5247 * configure, config.in: Rebuild.
5248 * configure.ac: Remove unused configury.
5249
3266f10b
TT
52502013-11-08 Tom Tromey <tromey@redhat.com>
5251
5252 * acinclude.m4: Include common.m4, codeset.m4.
5253 * configure, config.in: Rebuild.
5254 * configure.ac: Use GDB_AC_COMMON.
5255
6682d959
AA
52562013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
5257
5258 * linux-s390-low.c (HWCAP_S390_TE): New define.
5259 (s390_arch_setup): Consider the TE field in the HWCAP for
5260 determining 'have_regset_tdb'.
5261
fd0a4d76
SDJ
52622013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
5263
5264 PR gdb/16014
5265 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
5266 call to sizeof.
5267
1a3d890b
PA
52682013-10-02 Pedro Alves <palves@redhat.com>
5269
5270 * server.c (process_serial_event): Don't output "GDBserver
5271 exiting" if GDB is connected through stdio.
5272 * target.c (mywait): Likewise, be silent if GDB is connected
5273 through stdio.
5274
97ad4581
JB
52752013-10-01 Joel Brobecker <brobecker@adacore.com>
5276
5277 * lynx-low.c (lynx_add_threads_after_attach): New function.
5278 (lynx_attach): Remove call to add_thread. Add call to
5279 lynx_add_threads_after_attach instead.
5280
5b4e221c
MF
52812013-09-28 Mike Frysinger <vapier@gentoo.org>
5282
5283 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
5284 * config.in, configure: Regenerated.
5285
ee47b2f8
YQ
52862013-09-18 Yao Qi <yao@codesourcery.com>
5287
5288 PR server/15959
5289 * server.c (start_inferior): Clear 'resume_info'.
5290
d6707650 52912013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5292
d6707650
JW
5293 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
5294 for each register.
5295
9243dd0e 52962013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 5297
9243dd0e
JW
5298 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
5299 linux-tile-low.o to srv_tgtobj.
5300
c623a6ef
WN
53012013-09-16 Will Newton <will.newton@linaro.org>
5302
5303 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
5304 out regs.
5305
fb71d39e
PA
53062013-09-06 Pedro Alves <palves@redhat.com>
5307
5308 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
5309 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
5310 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
5311 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
5312 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
5313 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
5314
8e7e9910
PA
53152013-09-06 Pedro Alves <palves@redhat.com>
5316
5317 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
5318 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
5319
7c3a12ca
PA
53202013-09-06 Pedro Alves <palves@redhat.com>
5321
5322 * linux-amd64-ipa.c: Include tracepoint.h.
5323 * linux-i386-ipa.c: Include tracepoint.h.
5324
8eb3d7b6
RW
53252013-09-06 Ricard Wanderlof <ricardw@axis.com>
5326
5327 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
5328 (ps_get_thread_area): New function.
5329
eddddb9d
RW
53302013-09-06 Ricard Wanderlof <ricardw@axis.com>
5331
5332 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
5333 (initialize_low_arch): Call init_registers_crisv32 rather than
5334 init_register_crisv32.
5335
533b0600
PA
53362013-09-05 Pedro Alves <palves@redhat.com>
5337
5338 * server.h (handle_vFile, hostio_last_error_from_errno): Move
5339 to ...
5340 * hostio.h: ... this new file.
5341 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
5342 win32-low.c: Include hostio.h.
5343
0ce3d3b5
PA
53442013-09-05 Pedro Alves <palves@redhat.com>
5345
5346 * server.h (gdb_client_data, handler_func, callback_handler_func)
5347 (delete_file_handler, add_file_handler, append_callback_event)
5348 (delete_callback_event, start_event_loop, initialize_event_loop):
5349 Move to event-loop.h and include it.
5350 * event-loop.h: New file.
5351
799cdc37
PA
53522013-09-05 Pedro Alves <palves@redhat.com>
5353
5354 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
5355 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
5356 (loaded_dll, unloaded_dll): Move to ...
5357 * dll.h: ... this new file.
5358 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
5359
6a6bbd9d
PA
53602013-09-05 Pedro Alves <palves@redhat.com>
5361
5362 * server.h (current_process, get_thread_process, all_processes)
5363 (add_inferior_to_list, for_each_inferior, current_inferior)
5364 (remove_inferior, add_process, remove_process, find_process_pid)
5365 (have_started_inferiors_p, have_attached_inferiors_p)
5366 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
5367 (clear_inferiors, find_inferior, find_inferior_id)
5368 (inferior_target_data, set_inferior_target_data)
5369 (inferior_regcache_data, set_inferior_regcache_data): Move to
5370 inferiors.h, and include it.
5371 * inferiors.h: New file.
5372
f699aaba
PA
53732013-09-05 Pedro Alves <palves@redhat.com>
5374
5375 * server.h (struct emit_ops, current_insn_ptr, emit_error):
5376 Move ...
72f4393d 5377 * ax.h: ... here.
f699aaba 5378
c144c7a0
PA
53792013-09-05 Pedro Alves <palves@redhat.com>
5380
5381 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
5382 tracepoint.h.
5383 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
5384 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
5385 (handle_tracepoint_general_set, handle_tracepoint_query)
5386 (tracepoint_finished_step, tracepoint_was_hit)
5387 (release_while_stepping_state_list, current_traceframe)
5388 (in_readonly_region, traceframe_read_mem)
5389 (fetch_traceframe_registers, traceframe_read_sdata)
5390 (traceframe_read_info, struct fast_tpoint_collect_status)
5391 (fast_tracepoint_collecting, force_unlock_trace_buffer)
5392 (handle_tracepoit_bkpts, initialize_low_tracepoint)
5393 (supply_fast_tracepoint_registers)
5394 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
5395 (ipa_tdesc, claim_trampoline_space)
5396 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
5397 (agent_mem_read, agent_get_trace_state_variable_value)
5398 (agent_set_trace_state_variable_value, agent_tsv_read)
5399 (agent_mem_read_string, get_raw_reg_func_addr)
5400 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
5401 * tracepoint.h: ... this new file.
5402
ff42e6ab
PA
54032013-09-05 Pedro Alves <palves@redhat.com>
5404
5405 * server.h (perror_with_name, error, fatal, warning, paddress)
5406 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
5407 include it.
5408 * utils.h: New file.
5409
541af0f4
PA
54102013-09-05 Pedro Alves <palves@redhat.com>
5411
5412 * server.h (remote_debug, noack_mode, transport_is_reliable)
5413 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
5414 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
5415 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
5416 (write_enn, initialize_async_io, enable_async_io)
5417 (disable_async_io, check_remote_input_interrupt_request)
5418 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
5419 (dead_thread_notify, prepare_resume_reply)
5420 (decode_address_to_semicolon, decode_address, decode_m_packet)
5421 (decode_M_packet, decode_X_packet, decode_xfer_write)
5422 (decode_search_memory_packet, unhexify, hexify)
5423 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
5424 (look_up_one_symbol, relocate_instruction)
5425 (monitor_output): Move to remote-utils.h, and include it.
5426 * remote-utils.h: New file.
5427
eebdf26b
PA
54282013-09-05 Pedro Alves <palves@redhat.com>
5429
5430 * server.h (_): Delete.
5431
3aafd2ff
PA
54322013-09-02 Pedro Alves <palves@redhat.com>
5433
5434 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
5435 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
5436 allocated.
5437 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
5438
cee83bcb
PM
54392013-09-02 Pierre Muller <muller@sourceware.org>
5440
5441 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
5442 or WriteProcessMemory complete successfully and handle
5443 ERROR_PARTIAL_COPY error.
5444
9a13b2fa
PA
54452013-09-02 Pedro Alves <palves@redhat.com>
5446
5447 * server.c (gdb_read_memory): Return -1 on traceframe memory read
5448 error instead of EIO.
5449
602e3198
JK
54502013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5451
5452 PR server/15604
5453 * linux-low.c: Include filestuff.h.
5454 (linux_create_inferior) <pid == 0>: Call close_most_fds.
5455 * lynx-low.c: Include filestuff.h.
5456 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
5457 * server.c: Include filestuff.h.
5458 (main): Call notice_open_fds.
5459 * spu-low.c: Include filestuff.h.
5460 (spu_create_inferior) <pid == 0>: Call close_most_fds.
5461
96d7229d
LM
54622013-08-22 Luis Machado <lgustavo@codesourcery.com>
5463
5464 * Makefile.in: Explain why ../target and ../nat are not
5465 listed as include file search paths.
5466 (linux-waitpid.o): New object file rule.
5467 * configure.srv (srv_native_linux_obj): New variable.
5468 Replace all occurrences of linux native object files with
5469 $srv_native_linux_obj.
5470 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
5471 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
5472 (linux_enable_event_reporting): Remove declaration.
5473 (my_waitpid): Moved to common/linux-waitpid.c.
5474 (linux_wait_for_event): Pass ptid when calling
5475 linux_enable_event_reporting.
5476 (linux_supports_tracefork_flag): Remove.
5477 (linux_enable_event_reporting): Likewise.
5478 (linux_tracefork_grandchild): Remove.
5479 (STACK_SIZE): Moved to common/linux-ptrace.c.
5480 (linux_tracefork_child): Remove.
5481 (linux_test_for_tracefork): Remove.
5482 (linux_look_up_symbols): Call linux_supports_traceclone.
5483 (initialize_low): Remove call to linux_test_for_tracefork.
5484 * linux-low.h (PTRACE_TYPE_ARG3): Move to
5485 common/linux-ptrace.h.
5486 (PTRACE_TYPE_ARG4): Likewise.
5487 Include linux-ptrace.h.
5488
32940073
PA
54892013-08-21 Pedro Alves <palves@redhat.com>
5490
5491 * config.in: Renegerate.
5492
33b60d58 54932013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 5494
33b60d58
LM
5495 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
5496 (SFILES): Remove $(srcdir)/common/target-common.c and
5497 add $(srcdir)/target/waitstatus.c.
5498 (OBS): Remove target-common.o and add waitstatus.o.
5499 (server_h): Remove $(srcdir)/../common/target-common.h and
5500 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
5501 and $(srcdir)/../target/waitstatus.h.
5502 (target-common.o): Remove.
5503 (waitstatus.o): New target object file.
5504 * target.h: Do not include target-common.h and
5505 include target/resume.h, target/wait.h and
5506 target/waitstatus.h.
5507
b8e1b30e
LM
55082013-08-13 Luis Machado <lgustavo@codesourcery.com>
5509
5510 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5511 to PTRACE_TYPE_ARG3.
5512 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
5513 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
5514 PTRACE_TYPE_ARG4.
5515 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
5516 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
5517
7a60ad40
YQ
55182013-07-27 Jie Zhang <jie@codesourcery.com>
5519 Daniel Jacobowitz <dan@codesourcery.com>
5520 Yao Qi <yao@codesourcery.com>
5521
5522 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
5523 (mips-linux-watch.o): New rule.
5524 (mips_linux_watch_h): New variable.
5525 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
5526 srv_tgtobj.
5527 * linux-mips-low.c: Include mips-linux-watch.h.
5528 (struct arch_process_info, struct arch_lwp_info): New.
5529 (update_watch_registers_callback): New function.
5530 (mips_linux_new_process, mips_linux_new_thread) New functions.
5531 (mips_linux_prepare_to_resume, mips_insert_point): New
5532 functions.
5533 (mips_remove_point, mips_stopped_by_watchpoint): New
5534 functions.
5535 (rsp_bp_type_to_target_hw_bp_type): New function.
5536 (mips_stopped_data_address): New function.
5537 (the_low_target): Add watchpoint support functions.
5538
de6f69ad
YQ
55392013-07-27 Yao Qi <yao@codesourcery.com>
5540
5541 * i386-low.c: Include break-common.h.
5542 (enum target_hw_bp_type): Remove.
5543
3360c0bf
LM
55442013-07-24 Luis Machado <lgustavo@codesourcery.com>
5545
5546 * Makefile.in (SFILES): /common/target-common.c.
5547 (OBS): Add target-common.o.
5548 (server_h): Add $(srcdir)/../common/target-common.h.
5549 (target-common.o): New target.
5550 * server.c (queue_stop_reply_callback): Free
5551 status string after use.
5552 * target.c (target_waitstatus_to_string): Remove.
5553 * target.h: Include target-common.h.
5554 (resume_kind): Likewise.
5555 (target_waitkind): Likewise.
5556 (target_waitstatus): Likewise.
5557 (TARGET_WNOHANG): Likewise.
5558
bd885420
YQ
55592013-07-04 Yao Qi <yao@codesourcery.com>
5560
5561 * Makefile.in (host_alias): Use @host_noncanonical@.
5562 (target_alias): Use @target_noncanonical@.
5563 * configure.ac: Use ACX_NONCANONICAL_TARGET and
5564 ACX_NONCANONICAL_HOST.
5565 * configure: Regenerated.
5566
5567 Revert:
5568 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5569
5570 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5571 * configure: Rebuild.
5572 * Makefile.in (version_host, version_target): Get from configure.
5573 (version.c): Use $(version_host) and $(version_target).
5574
17ef446e
PA
55752013-07-03 Pedro Alves <palves@redhat.com>
5576
5577 * Makefile.in (config.status): Depend on development.sh.
5578 * acinclude.m4: Include libmcheck.m4.
5579 * configure: Regenerate.
5580
7a9a7487
MG
55812013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5582
5583 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
5584 attribute inside the parentheses.
5585 (winapi_DebugSetProcessKillOnExit): Ditto.
5586 (winapi_DebugBreakProcess): Ditto.
5587 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 5588
49b64de6
MG
55892013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
5590
5591 * notif.h (notif_event): Add a dummy member to avoid compiler
5592 errors.
5593
d5749ee7
PA
55942013-07-01 Pedro Alves <palves@redhat.com>
5595
5596 * hostio.c (HOSTIO_PATH_MAX): Define.
5597 (require_filename, handle_open, handle_unlink, handle_readlink):
5598 Use it.
5599
d8d2a3ee
PA
56002013-07-01 Pedro Alves <palves@redhat.com>
5601
5602 * server.h: Include "pathmax.h".
5603 * linux-low.c: Don't include sys/param.h.
5604 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
5605 MAXPATHLEN.
5606 * win32-low.c: Don't include sys/param.h.
5607 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
5608
bc7dea8d
PA
56092013-07-01 Pedro Alves <palves@redhat.com>
5610
5611 * event-loop.c: Don't check HAVE_UNISTD_H before including
5612 <unistd.h>.
5613 * gdbreplay.c: Likewise.
5614 * remote-utils.c: Likewise.
5615 * server.c: Likewise.
5616 * configure.ac: Don't check for unistd.h.
5617 * configure: Regenerate.
5618
d6c2da54
TT
56192013-06-28 Tom Tromey <tromey@redhat.com>
5620
5621 * Makefile.in (version.c): Use version.in, not
5622 common/version.in.
5623
257b6bec
MG
56242013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
5625
5626 * configure.ac (version_host, version_target): Set and AC_SUBST them.
5627 * configure: Rebuild.
5628 * Makefile.in (version_host, version_target): Get from configure.
5629 (version.c): Use $(version_host) and $(version_target).
5630
86ebe149
DK
56312013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5632
5633 Fix trace-status to output user name without trailing colon.
5634 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
5635
f30aa5af
DK
56362013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
5637
5638 Fix trace-status to output proper start-time and stop-time.
5639 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
5640 output start time and stop time in hex as gdb expects.
5641
28a93511
YQ
56422013-06-26 Pedro Alves <pedro@codesourcery.com>
5643
5644 * tracepoint.c (build_traceframe_info_xml): Output trace state
5645 variables present in the trace buffer.
5646
01208463
TT
56472013-06-24 Tom Tromey <tromey@redhat.com>
5648
5649 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
5650 create-version.sh.
5651 (version.o): Remove.
5652 * gdbreplay.c: Include version.h.
5653 (version, host_name): Don't declare.
5654 * server.h: Include version.h.
5655 (version, host_name): Don't declare.
5656
760256f9
PA
56572013-06-12 Pedro Alves <palves@redhat.com>
5658
5659 * linux-x86-low.c (linux_is_elf64): Delete global.
5660 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
5661 with local linux_pid_exe_is_elf_64_file use.
5662
030031ee
PA
56632013-06-11 Pedro Alves <palves@redhat.com>
5664
5665 * linux-low.c (regset_disabled, disable_regset): New functions.
5666 (regsets_fetch_inferior_registers)
5667 (regsets_store_inferior_registers): Use them.
5668 (initialize_regsets_info); Don't allocate the disabled_regsets
5669 array here.
5670 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
5671 comment.
5672
5da6eb0a
PA
56732013-06-11 Pedro Alves <palves@redhat.com>
5674
5675 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
5676 xmalloc.
5677
7e5aaa09
PA
56782013-06-11 Pedro Alves <palves@redhat.com>
5679
5680 * linux-x86-low.c (initialize_low_arch): Call
5681 init_registers_x32_avx_linux.
5682
d878444c
JK
56832013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
5684
5685 Fix compatibility with Android Bionic.
5686 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
5687 it is not empty.
5688
3aee8918
PA
56892013-06-07 Pedro Alves <palves@redhat.com>
5690
5f2b57b5 5691 PR server/14823
3aee8918
PA
5692 * Makefile.in (OBS): Add tdesc.o.
5693 (IPA_OBJS): Add tdesc-ipa.o.
5694 (tdesc-ipa.o): New rule.
5695 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
5696 interface.
5697 * linux-low.c (new_inferior): Delete.
5698 (disabled_regsets, num_regsets): Delete.
5699 (linux_add_process): Adjust to set the new per-process
5700 new_inferior flag.
5701 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
5702 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
5703 was a stop. When calling arch_setup, switch the current inferior
5704 to the thread that got an event.
5705 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
5706 (regsets_fetch_inferior_registers)
5707 (regsets_store_inferior_registers): New regsets_info parameter.
5708 Adjust to use it.
5709 (linux_register_in_regsets): New regs_info parameter. Adjust to
5710 use it.
5711 (register_addr, fetch_register, store_register): New usrregs_info
5712 parameter. Adjust to use it.
5713 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
5714 parameter regs_info. Adjust to use it.
5715 (linux_fetch_registers): Get the current inferior's regs_info, and
5716 adjust to use it.
5717 (linux_store_registers): Ditto.
5718 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
5719 (initialize_low): Don't initialize the target_regsets here. Call
5720 initialize_low_arch.
5721 * linux-low.h (target_regsets): Delete declaration.
5722 (struct regsets_info): New.
5723 (struct usrregs_info): New.
5724 (struct regs_info): New.
5725 (struct process_info_private) <new_inferior>: New field.
5726 (struct linux_target_ops): Delete the num_regs, regmap, and
5727 regset_bitmap fields. New field regs_info.
5728 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
5729 * i387-fp.c (num_xmm_registers): Delete.
5730 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
5731 calls to new interface.
5732 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
5733 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
5734 Infer the number of xmm registers from the regcache's target
5735 description.
5736 * i387-fp.h (num_xmm_registers): Delete.
5737 * inferiors.c (add_thread): Don't install the thread's regcache
5738 here.
5739 * proc-service.c (gregset_info): Fetch the current inferior's
5740 regs_info. Adjust to use it.
5741 * regcache.c: Include tdesc.h.
5742 (register_bytes, reg_defs, num_registers)
5743 (gdbserver_expedite_regs): Delete.
5744 (get_thread_regcache): If the thread doesn't have a regcache yet,
5745 create one, instead of aborting gdbserver.
5746 (regcache_invalidate_one): Rename to ...
5747 (regcache_invalidate_thread): ... this.
5748 (regcache_invalidate_one): New.
5749 (regcache_invalidate): Only invalidate registers of the current
5750 process.
5751 (init_register_cache): Add target_desc parameter, and use it.
5752 (new_register_cache): Ditto. Assert the target description has a
5753 non zero registers_size.
5754 (regcache_cpy): Add assertions. Adjust.
5755 (realloc_register_cache, set_register_cache): Delete.
5756 (registers_to_string, registers_from_string): Adjust.
5757 (find_register_by_name, find_regno, find_register_by_number)
5758 (register_cache_size): Add target_desc parameter, and use it.
5759 (free_register_cache_thread, free_register_cache_thread_one)
5760 (regcache_release, register_cache_size): New.
5761 (register_size): Add target_desc parameter, and use it.
5762 (register_data, supply_register, supply_register_zeroed)
5763 (supply_regblock, supply_register_by_name, collect_register)
5764 (collect_register_as_string, collect_register_by_name): Adjust.
5765 * regcache.h (struct target_desc): Forward declare.
5766 (struct regcache) <tdesc>: New field.
5767 (init_register_cache, new_register_cache): Add target_desc
5768 parameter.
5769 (regcache_invalidate_thread): Declare.
5770 (regcache_invalidate_one): Delete declaration.
5771 (regcache_release): Declare.
5772 (find_register_by_number, register_cache_size, register_size)
5773 (find_regno): Add target_desc parameter.
5774 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
5775 declarations.
5776 * remote-utils.c: Include tdesc.h.
5777 (outreg, prepare_resume_reply): Adjust.
5778 * server.c: Include tdesc.h.
5779 (gdbserver_xmltarget): Delete declaration.
5780 (get_features_xml, process_serial_event): Adjust.
5781 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
5782 declare.
5783 (struct process_info) <tdesc>: New field.
5784 (ipa_tdesc): Declare.
5785 * tdesc.c: New file.
5786 * tdesc.h: New file.
5787 * tracepoint.c: Include tdesc.h.
5788 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
5789 (get_context_regcache): Adjust to pass ipa_tdesc down.
5790 (do_action_at_tracepoint): Adjust to get the register cache size
5791 from the context regcache's description.
5792 (traceframe_walk_blocks): Adjust to get the register cache size
5793 from the current trace frame's description.
5794 (traceframe_get_pc): Adjust to get current trace frame's
5795 description and pass it down.
5796 (gdb_collect): Adjust to get the register cache size from the
5797 IPA's description.
5798 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
5799 (gdbserver_xmltarget): Delete.
5800 (initialize_low_tracepoint): Set the ipa's target description.
5801 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
5802 (initialize_low_tracepoint): Set the ipa's target description.
5803 * linux-x86-low.c: Include tdesc.h.
5804 [__x86_64__] (is_64bit_tdesc): New.
5805 (ps_get_thread_area, x86_get_thread_area): Use it.
5806 (i386_cannot_store_register): Rename to ...
5807 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
5808 (i386_cannot_fetch_register): Rename to ...
5809 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
5810 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
5811 to new interface.
5812 (target_regsets): Rename to ...
5813 (x86_regsets): ... this.
5814 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
5815 interface.
5816 (x86_siginfo_fixup): Use is_64bit_tdesc.
5817 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
5818 (tdesc_x32_avx_linux, tdesc_x32_linux)
5819 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
5820 Declare.
5821 (x86_linux_update_xmltarget): Delete.
5822 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
5823 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
5824 (AMD64_LINUX_USER64_CS): New.
5825 (x86_linux_read_description): New, based on
5826 x86_linux_update_xmltarget.
5827 (same_process_callback): New.
5828 (x86_arch_setup_process_callback): New.
5829 (x86_linux_update_xmltarget): New.
5830 (x86_regsets_info): New.
5831 (amd64_linux_regs_info): New.
5832 (i386_linux_usrregs_info): New.
5833 (i386_linux_regs_info): New.
5834 (x86_linux_regs_info): New.
5835 (x86_arch_setup): Reimplement.
5836 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
5837 (x86_emit_ops): Ditto.
5838 (the_low_target): Adjust. Install x86_linux_regs_info,
5839 x86_cannot_fetch_register, and x86_cannot_store_register.
5840 (initialize_low_arch): New.
5841 * linux-ia64-low.c (tdesc_ia64): Declare.
5842 (ia64_fetch_register): Adjust.
5843 (ia64_usrregs_info, regs_info): New globals.
5844 (ia64_regs_info): New function.
5845 (the_low_target): Adjust.
5846 (initialize_low_arch): New function.
5847 * linux-sparc-low.c (tdesc_sparc64): Declare.
5848 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
5849 Adjust.
5850 (sparc_arch_setup): New function.
5851 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
5852 (the_low_target): Adjust.
5853 (initialize_low_arch): New function.
5854 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
5855 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
5856 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
5857 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
5858 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
5859 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
5860 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
5861 (tdesc_powerpc_isa205_vsx64l): Declare.
5862 (ppc_cannot_store_register, ppc_collect_ptrace_register)
5863 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
5864 (ppc_set_pc, ppc_get_hwcap): Adjust.
5865 (ppc_usrregs_info): Forward declare.
5866 (!__powerpc64__) ppc_regmap_adjusted: New global.
5867 (ppc_arch_setup): Adjust to the current process'es target
5868 description.
5869 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
5870 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
5871 (ppc_store_evrregset): Adjust.
5872 (target_regsets): Rename to ...
5873 (ppc_regsets): ... this, and make static.
5874 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
5875 (ppc_regs_info): New function.
5876 (the_low_target): Adjust.
5877 (initialize_low_arch): New function.
5878 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
5879 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
5880 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
5881 (tdesc_s390x_linux64v2): Declare.
5882 (s390_collect_ptrace_register, s390_supply_ptrace_register)
5883 (s390_fill_gregset, s390_store_last_break): Adjust.
5884 (target_regsets): Rename to ...
5885 (s390_regsets): ... this, and make static.
5886 (s390_get_pc, s390_set_pc): Adjust.
5887 (s390_get_hwcap): New target_desc parameter, and use it.
5888 [__s390x__] (have_hwcap_s390_high_gprs): New global.
5889 (s390_arch_setup): Adjust to set the current process'es target
5890 description. Don't adjust the regmap.
5891 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
5892 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
5893 (regs_info_3264): New globals.
5894 (s390_regs_info): New function.
5895 (the_low_target): Adjust.
5896 (initialize_low_arch): New function.
5897 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
5898 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
5899 [__mips64] (init_registers_mips_linux)
5900 (init_registers_mips_dsp_linux): Delete defines.
5901 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
5902 (have_dsp): New global.
5903 (mips_read_description): New, based on mips_arch_setup.
5904 (mips_arch_setup): Reimplement.
5905 (get_usrregs_info): New function.
5906 (mips_cannot_fetch_register, mips_cannot_store_register)
5907 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
5908 (mips_fill_fpregset, mips_store_fpregset): Adjust.
5909 (target_regsets): Rename to ...
5910 (mips_regsets): ... this, and make static.
5911 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
5912 (dsp_regs_info, regs_info): New globals.
5913 (mips_regs_info): New function.
5914 (the_low_target): Adjust.
5915 (initialize_low_arch): New function.
5916 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
5917 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
5918 Declare.
5919 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
5920 (arm_read_description): New, with bits factored from
5921 arm_arch_setup.
5922 (arm_arch_setup): Reimplement.
5923 (target_regsets): Rename to ...
5924 (arm_regsets): ... this, and make static.
5925 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
5926 (arm_regs_info): New function.
5927 (the_low_target): Adjust.
5928 (initialize_low_arch): New function.
5929 * linux-m68k-low.c (tdesc_m68k): Declare.
5930 (target_regsets): Rename to ...
5931 (m68k_regsets): ... this, and make static.
5932 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
5933 (m68k_regs_info): New function.
5934 (m68k_arch_setup): New function.
5935 (the_low_target): Adjust.
5936 (initialize_low_arch): New function.
5937 * linux-sh-low.c (tdesc_sharch): Declare.
5938 (target_regsets): Rename to ...
5939 (sh_regsets): ... this, and make static.
5940 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
5941 (sh_regs_info, sh_arch_setup): New functions.
5942 (the_low_target): Adjust.
5943 (initialize_low_arch): New function.
5944 * linux-bfin-low.c (tdesc_bfin): Declare.
5945 (bfin_arch_setup): New function.
5946 (bfin_usrregs_info, regs_info): New globals.
5947 (bfin_regs_info): New function.
5948 (the_low_target): Adjust.
5949 (initialize_low_arch): New function.
5950 * linux-cris-low.c (tdesc_cris): Declare.
5951 (cris_arch_setup): New function.
5952 (cris_usrregs_info, regs_info): New globals.
5953 (cris_regs_info): New function.
5954 (the_low_target): Adjust.
5955 (initialize_low_arch): New function.
5956 * linux-cris-low.c (tdesc_crisv32): Declare.
5957 (cris_arch_setup): New function.
5958 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
5959 (cris_regs_info): New function.
5960 (the_low_target): Adjust.
5961 (initialize_low_arch): New function.
5962 * linux-m32r-low.c (tdesc_m32r): Declare.
5963 (m32r_arch_setup): New function.
5964 (m32r_usrregs_info, regs_info): New globals.
5965 (m32r_regs_info): Adjust.
5966 (initialize_low_arch): New function.
5967 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
5968 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
5969 (tic6x_usrregs_info): Forward declare.
5970 (tic6x_read_description): New function, based on ...
5971 (tic6x_arch_setup): ... this. Reimplement.
5972 (target_regsets): Rename to ...
5973 (tic6x_regsets): ... this, and make static.
5974 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
5975 (tic6x_regs_info): New function.
5976 (the_low_target): Adjust.
5977 (initialize_low_arch): New function.
5978 * linux-xtensa-low.c (tdesc_xtensa): Declare.
5979 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
5980 (target_regsets): Rename to ...
5981 (xtensa_regsets): ... this, and make static.
5982 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
5983 globals.
5984 (xtensa_arch_setup, xtensa_regs_info): New functions.
5985 (the_low_target): Adjust.
5986 (initialize_low_arch): New function.
5987 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
5988 (nios2_arch_setup): Set the current process'es tdesc.
5989 (target_regsets): Rename to ...
5990 (nios2_regsets): ... this.
5991 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
5992 (nios2_regs_info): New function.
5993 (the_low_target): Adjust.
5994 (initialize_low_arch): New function.
a261b8f5
PA
5995 * linux-aarch64-low.c (tdesc_aarch64): Declare.
5996 (aarch64_arch_setup): Set the current process'es tdesc.
5997 (target_regsets): Rename to ...
5998 (aarch64_regsets): ... this.
5999 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
6000 (aarch64_regs_info): New function.
6001 (the_low_target): Adjust.
6002 (initialize_low_arch): New function.
3aee8918
PA
6003 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
6004 globals.
6005 (target_regsets): Rename to ...
6006 (tile_regsets): ... this.
6007 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
6008 (tile_regs_info): New function.
6009 (tile_arch_setup): Set the current process'es tdesc.
6010 (the_low_target): Adjust.
6011 (initialize_low_arch): New function.
6012 * spu-low.c (tdesc_spu): Declare.
6013 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
6014 * win32-arm-low.c (tdesc_arm): Declare.
6015 (arm_arch_setup): New function.
6016 (the_low_target): Install arm_arch_setup instead of
6017 init_registers_arm.
6018 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
6019 (init_windows_x86): Rename to ...
6020 (i386_arch_setup): ... this. Set `win32_tdesc'.
6021 (the_low_target): Adjust.
6022 * win32-low.c (win32_tdesc): New global.
6023 (child_add_thread): Don't create the thread cache here.
6024 (do_initial_child_stuff): Set the new process'es tdesc.
6025 * win32-low.h (struct target_desc): Forward declare.
6026 (win32_tdesc): Declare.
6027 * lynx-i386-low.c (tdesc_i386): Declare global.
6028 (lynx_i386_arch_setup): Set `lynx_tdesc'.
6029 * lynx-low.c (lynx_tdesc): New global.
6030 (lynx_add_process): Set the new process'es tdesc.
6031 * lynx-low.h (struct target_desc): Forward declare.
6032 (lynx_tdesc): Declare global.
6033 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
6034 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
6035 * nto-low.c (nto_tdesc): New global.
6036 (do_attach): Set the new process'es tdesc.
6037 * nto-low.h (struct target_desc): Forward declare.
6038 (nto_tdesc): Declare.
6039 * nto-x86-low.c (tdesc_i386): Declare.
6040 (nto_x86_arch_setup): Set `nto_tdesc'.
6041
b1fbec62
GB
60422013-06-04 Gary Benson <gbenson@redhat.com>
6043
6044 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
6045 to qSupported response when appropriate.
6046 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
6047 with nonzero-length annex.
6048 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
6049 arguments supplied in annex.
6050
d1ec4ce7
DE
60512013-05-31 Doug Evans <dje@google.com>
6052
ac44adcb 6053 PR server/15594
d1ec4ce7
DE
6054 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
6055 64 bits in 64-cross-32 environment.
6056
9b25f2d3
PA
60572013-05-28 Pedro Alves <palves@redhat.com>
6058
6059 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
6060 (aarch64-without-fpu.c): Delete rule.
6061 * configure.srv (aarch64*-*-linux*): Remove references to
6062 aarch64-without-fpu.o and aarch64-without-fpu.xml.
6063 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
6064 declaration.
6065
6740dc9c
PA
60662013-05-24 Pedro Alves <palves@redhat.com>
6067
6068 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
6069 instead of strchr/decode_address. Error if the range isn't split
6070 with a ','. Don't assume there's be a ':' in the action.
6071
c2d6af84
PA
60722013-05-23 Yao Qi <yao@codesourcery.com>
6073 Pedro Alves <palves@redhat.com>
6074
6075 * linux-low.c (lwp_in_step_range): New function.
6076 (linux_wait_1): If the thread was range stepping and stopped
6077 outside the stepping range, report the stop to GDB. Otherwise,
6078 continue stepping. Add range stepping debug output.
6079 (linux_set_resume_request): Copy the step range from the resume
6080 request to the lwp.
6081 (linux_supports_range_stepping): New.
6082 (linux_target_ops) <supports_range_stepping>: Set to
6083 linux_supports_range_stepping.
6084 * linux-low.h (struct linux_target_ops)
6085 <supports_range_stepping>: New field.
6086 (struct lwp_info) <step_range_start, step_range_end>: New fields.
6087 * linux-x86-low.c (x86_supports_range_stepping): New.
6088 (the_low_target) <supports_range_stepping>: Set to
6089 x86_supports_range_stepping.
6090 * server.c (handle_v_cont): Handle 'r' action.
6091 (handle_v_requests): Append ";r" if the target supports range
6092 stepping.
6093 * target.h (struct thread_resume) <step_range_start,
6094 step_range_end>: New fields.
6095 (struct target_ops) <supports_range_stepping>:
6096 New field.
6097 (target_supports_range_stepping): New macro.
6098
58794e1a
JB
60992013-05-17 Joel Brobecker <brobecker@adacore.com>
6100
6101 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
6102 confusion in comment.
6103
d631c5a7
JB
61042013-05-17 Joel Brobecker <brobecker@adacore.com>
6105
6106 * lynx-low.c (struct process_info_private): New type.
6107 (lynx_add_process): New function.
6108 (lynx_create_inferior, lynx_attach): Replace calls to
6109 add_process by calls to lynx_add_process.
6110 (lynx_resume): If PTID is null, then try using
6111 current_process()->private->last_wait_event_ptid.
6112 Add comments.
6113 (lynx_clear_inferiors): Delete. The contents of that function
6114 has been inlined in lynx_mourn;
6115 (lynx_wait_1): Save the ptid in the process's private data.
6116 (lynx_mourn): Free the process' private data. Replace call
6117 to lynx_clear_inferiors by call to clear_inferiors.
6118
96f7a20f
YQ
61192013-05-17 Yao Qi <yao@codesourcery.com>
6120
6121 * i386-low.c (i386_length_and_rw_bits): Move the comment to
6122 the right place.
6123
db0dfaa0
LM
61242013-05-16 Luis Machado <lgustavo@codesourcery.com>
6125
6126 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
6127 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
6128 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
6129 PT_TEXT_END_ADDR guards. Update comments.
6130 (linux_target_op) <read_offsets>: Conditionally define to
6131 linux_read_offsets if the target is UCLIBC and if it defines
6132 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
6133
68f5f838
SL
61342013-05-06 Sandra Loosemore <sandra@codesourcery.com>
6135 Andrew Jenner <andrew@codesourcery.com>
6136
6137 * Makefile.in (SFILES): Add linux-nios2-low.c.
6138 (clean): Add action to delete nios2-linux.c.
6139 (nios2-linux.c): New rule.
6140 * configure.srv: Add nios2*-*-linux*.
6141 * linux-nios2-low.c: New.
6142
1ebff1fd
HAQ
61432013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
6144
6145 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
6146
f6150862
HZ
61472013-04-25 Hui Zhu <hui@codesourcery.com>
6148
6149 PR gdb/15186
f6150862
HZ
6150 * ax.c (ax_printf): Add fflush.
6151
614c279d
TT
61522013-04-22 Tom Tromey <tromey@redhat.com>
6153
6154 * Makefile.in (SFILES): Add filestuff.c.
6155 (OBS): Add filestuff.o.
6156 (filestuff.o): New target.
6157 * config.in, configure: Rebuild.
6158 * configure.ac: Check for fdwalk, pipe2.
6159
7d4e5717
PA
61602013-04-17 Pedro Alves <palves@redhat.com>
6161
6162 * configure.ac (USE_THREAD_DB): Delete variable.
6163 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
6164 Don't AC_SUBST USE_THREAD_DB.
6165 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
6166 * config.in, configure: Regenerate.
6167
d5c93e41
PA
61682013-04-16 Pedro Alves <palves@redhat.com>
6169
6170 * linux-low.h (struct lwp_info) <thread_known>: Move under
6171 the USE_THREAD_DB #ifdef.
6172
04f5fe89
PA
61732013-04-16 Pedro Alves <palves@redhat.com>
6174
6175 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
6176 (linux-low.o): Delete rule.
6177 * linux-low.h: Always include "gdb_thread_db.h" instead of
6178 conditionally including thread_db.h.
6179 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
6180 HAVE_THREAD_DB_H.
6181
480b27bf
JK
61822013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6183
6184 * Makefile.in (install-only): Fix make install regression.
6185
43662968
JK
61862013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
6187
6188 Convert man pages to texinfo, new gdbinit.5 texinfo page.
6189 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
6190 installation.
6191 * gdbserver.1: Remove.
6192
3e74e146
PA
61932013-03-22 Pedro Alves <palves@redhat.com>
6194
6195 * linux-low.c (handle_extended_wait): Don't call
6196 linux_enable_event_reporting.
6197
a8347a2a
TT
61982013-03-15 Tony Theodore <tonyt@logyst.com>
6199
6200 PR build/9098:
6201 * Makefile.in (SHELL): Use @SHELL@.
6202
eeb56fa7
SDJ
62032013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
6204
6205 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
6206 compiler warning.
6207
4fa7e2ff
JB
62082013-03-13 Joel Brobecker <brobecker@adacore.com>
6209
6210 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
6211 Remove extraneous NULL element.
6212
8ddb1965
YQ
62132013-03-13 Yao Qi <yao@codesourcery.com>
6214
6215 * tracepoint.c (traceframe_read_tsv): Look for the last matched
6216 'V' block in trace frame.
6217
9accd112
MM
62182013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6219
6220 * target.h (struct target_ops): Add btrace ops.
6221 (target_supports_btrace): New macro.
6222 (target_enable_btrace): New macro.
6223 (target_disable_btrace): New macro.
6224 (target_read_btrace): New macro.
6225 * gdbthread.h (struct thread_info): Add btrace field.
6226 * server.c: Include btrace-common.h.
6227 (handle_btrace_general_set): New function.
6228 (handle_btrace_enable): New function.
6229 (handle_btrace_disable): New function.
6230 (handle_general_set): Call handle_btrace_general_set.
6231 (handle_qxfer_btrace): New function.
6232 (struct qxfer qxfer_packets[]): Add btrace entry.
6233 * inferiors.c (remove_thread): Disable btrace.
6234 * linux-low: Include linux-btrace.h.
6235 (linux_low_enable_btrace): New function.
6236 (linux_low_read_btrace): New function.
6237 (linux_target_ops): Add btrace ops.
6238 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
6239 Add srv_linux_btrace=yes.
6240 (x86_64-*-linux*): Add linux-btrace.o.
6241 Add srv_linux_btrace=yes.
6242 * configure.ac: Define HAVE_LINUX_BTRACE.
6243 * config.in: Regenerated.
6244 * configure: Regenerated.
6245
5cc22e4c
MM
62462013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6247
6248 * server.c (handle_qxfer): Preserve error message if -3 is
6249 returned.
6250 (qxfer): Document the -3 return value.
6251
7c97f91e
MM
62522013-03-11 Markus Metzger <markus.t.metzger@intel.com>
6253
6254 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
6255 (linux_btrace_h): New variable.
6256 (linux-btrace.o): New rule.
6257
be9a119c 62582013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
6259 Hafiz Abid Qadeer <abidh@codesourcery.com>
6260
6261 * tracepoint.c (trace_buffer_size): New global.
6262 (DEFAULT_TRACE_BUFFER_SIZE): New define.
6263 (init_trace_buffer): Change to one-argument function. Allocate
6264 trace buffer memory.
6265 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
6266 handle QTBuffer:size packet.
6267 (cmd_bigqtbuffer_size): New function.
6268 (initialize_tracepoint): Call init_trace_buffer with
6269 DEFAULT_TRACE_BUFFER_SIZE.
6270 * server.c (handle_query): Add QTBuffer:size in the
6271 supported packets.
6272
e64f7499
YQ
62732013-03-07 Yao Qi <yao@codesourcery.com>
6274
6275 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
6276 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
6277 of -1.
6278 (cmd_qtsp): Adjust condition. Do post increment.
6279 Set cur_action and cur_step_action back to 0.
6280
f0ae6fc3
PA
62812013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
6282
6283 PR server/15236
6284 * linux-low.c (linux_write_memory): Return early success if LEN is
6285 zero.
6286
b5b0b0af
CV
62872013-03-05 Corinna Vinschen <vinschen@redhat.de>
6288
334ad4a8 6289 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 6290
589bc927
TT
62912013-02-28 Tom Tromey <tromey@redhat.com>
6292
6293 * configure.ac: Invoke AC_SYS_LARGEFILE.
6294 * configure, config.in: Rebuild.
6295
dfe07582
CV
62962013-02-28 Corinna Vinschen <vinschen@redhat.com>
6297
6298 * win32-low.c: Throughout, fix format strings and casts of
6299 printf-like functions to avoid type related warnings on all
6300 platforms.
6301 (get_child_debug_event): Print dwDebugEventCode as hex since
6302 that's how it's usually documented.
6303
736cd585
YQ
63042013-02-28 Yao Qi <yao@codesourcery.com>
6305
6306 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
6307 pulongest.
6308
e1f58301
JW
63092013-02-27 Jiong Wang <jiwang@tilera.com>
6310
6311 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
6312 (reg-tilegx32.c): New rule.
6313 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
6314 * linux-tile-low.c (tile_arch_setup): New function. Invoke
6315 different register info initializer according to elf class.
6316 (init_registers_tilgx32): New function. The tilegx32 register info
6317 initializer.
6318 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
6319 (tile_store_gregset): Likewise.
6320
d171ca78
YQ
63212013-02-27 Yao Qi <yao@codesourcery.com>
6322
6323 * server.c (process_point_options): Print debug message when
6324 debug_threads is true.
6325
282bbdf3
YQ
63262013-02-26 Yao Qi <yao@codesourcery.com>
6327
6328 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
6329
aca22551
PA
63302013-02-19 Pedro Alves <palves@redhat.com>
6331 Kai Tietz <ktietz@redhat.com>
6332
6333 PR gdb/15161
6334
6335 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
6336 instead of strtoul to extract address from packet.
6337 (process_serial_event) <'z'>: Likewise.
6338
4f3cee1c
YQ
63392013-02-18 Yao Qi <yao@codesourcery.com>
6340
6341 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
6342
8e1d55a3
PA
63432013-02-14 Pedro Alves <palves@redhat.com>
6344
6345 Plug memory leak.
6346
6347 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
6348 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
6349
458820da
PA
63502013-02-14 Pedro Alves <palves@redhat.com>
6351
6352 * tracepoint.c (cmd_qtdpsrc): Use savestring.
6353
baea0dae
PA
63542013-02-14 Pedro Alves <palves@redhat.com>
6355
6356 * tracepoint.c (save_string): Delete.
6357 (add_tracepoint_action): Use savestring instead of save_string.
6358
0b1afbb3
PA
63592013-02-12 Pedro Alves <palves@redhat.com>
6360
6361 * linux-xtensa-low.c: Ditto.
6362 * xtensa-xtregs.c: Ditto.
6363
8a4ac37e
PA
63642013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
6365
6366 * thread-db.c (thread_db_get_tls_address): NULL pointer check
6367 thread_db.
6368
148de6bb
MS
63692013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6370
6371 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
6372 aarch64_num_wp_regs and aarch64_num_bp_regs to
6373 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
6374
55fac6e0
MS
63752013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
6376
6377 * linux-aarch64-low.c (ps_get_thread_area): Replace
6378 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
6379
176eb98c
MS
63802013-02-04 Jim MacArthur <jim.macarthur@arm.com>
6381 Marcus Shawcroft <marcus.shawcroft@arm.com>
6382 Nigel Stephens <nigel.stephens@arm.com>
6383 Yufeng Zhang <yufeng.zhang@arm.com>
6384
6385 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
6386 (aarch64.c, aarch64-without-fpu.c): New targets.
6387 * configure.srv (aarch64*-*-linux*): New.
6388 * linux-aarch64-low.c: New file.
6389
56f7af9c
MS
63902013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
6391
43aaf8b6 6392 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
6393 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
6394 (dequeue_one_deferred_signal, linux_resume_one_thread)
6395 (fetch_register, linux_write_memory, linux_enable_event_reporting)
6396 (linux_tracefork_grandchild, linux_test_for_tracefork)
6397 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
6398 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
6399 where the argument is 0.
6400
60f662b0
YQ
64012013-01-25 Yao Qi <yao@codesourcery.com>
6402
6403 * event-loop.c: Include "queue.h".
6404 (gdb_event_p): New typedef.
6405 (struct gdb_event) <next_event>: Remove.
6406 (event_queue): Change to QUEUE(gdb_event_p).
6407 (async_queue_event): Remove.
6408 (gdb_event_xfree): New.
6409 (initialize_event_loop): New.
6410 (process_event): Use API from QUEUE.
6411 (wait_for_event): Likewise.
6412 * server.c (main): Call initialize_event_loop.
6413 * server.h (initialize_event_loop): Declare.
6414
5ae4861a
YQ
64152013-01-18 Yao Qi <yao@codesourcery.com>
6416
6417 * ax.h (struct eval_agent_expr_context): New.
6418 (gdb_eval_agent_expr): Update declaration.
6419 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
6420 TFRAME. Add new argument CTX.
6421 * server.h (struct eval_agent_expr_context): Declare.
6422 (agent_mem_read, agent_tsv_read): Update declaration.
6423 (agent_mem_read_string): Likewise.
6424 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
6425 (add_traceframe_block): Add new argument TPOINT.
6426 Increase TPOINT->traceframe_usage.
6427 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
6428 eval_tracepoint_agent_expr.
6429 (condition_true_at_tracepoint): Likewise.
6430 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
6431 (agent_mem_read_string, agent_tsv_read): Likewise.
6432
85e00e85
YQ
64332013-01-16 Yao Qi <yao@codesourcery.com>
6434
6435 * linux-low.c (linux_resume_one_lwp): Don't check
6436 'lwp->bp_reinsert != 0'.
6437
4039cf45
JB
64382013-01-07 Joel Brobecker <brobecker@adacore.com>
6439 Pedro Alves <palves@redhat.com>
6440
6441 * lynx-low.c (ptrace_request_to_str): Define a temporary
6442 macro and use it to simplify this function's implementation.
6443
9044dee2
JB
64442013-01-07 Joel Brobecker <brobecker@adacore.com>
6445
6446 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
6447 sets errno.
6448
e6352c8f
JB
64492013-01-07 Joel Brobecker <brobecker@adacore.com>
6450
6451 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
6452
50681a27
JB
64532013-01-07 Joel Brobecker <brobecker@adacore.com>
6454
6455 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
6456
3f6e77ef
JB
64572013-01-07 Joel Brobecker <brobecker@adacore.com>
6458
6459 * lynx-low.c (lynx_resume): Use the resume_info parameter
6460 to determine the ptid for the lynx_ptrace call, unless
6461 it is equal to minus_one_ptid, in which case we use the
6462 ptid of the current_inferior.
6463 (lynx_wait_1): After having received a thread create/exit
6464 event, resume the inferior's execution using the signaling
6465 thread's ptid, rather than the old ptid.
6466
7fda33ae
JB
64672013-01-07 Joel Brobecker <brobecker@adacore.com>
6468
6469 * lynx-low.c (lynx_resume): Delete variable ret.
6470
b9786c74
JB
64712013-01-01 Joel Brobecker <brobecker@adacore.com>
6472
6473 * gdbreplay.c (gdbreplay_version): Update copyright year.
6474 * server.c (gdbserver_version): Likewise.
6475
8b93d60f
JB
64762012-12-17 Joel Brobecker <brobecker@adacore.com>
6477
6478 * lynx-low.c (lynx_wait_1): Add debug trace before adding
6479 new thread.
6480
037335a7
JB
64812012-12-17 Joel Brobecker <brobecker@adacore.com>
6482
6483 * lynx-low.c (ptrace_request_to_str): Add handling for
6484 PTRACE_GETTRACESIG.
6485
52d4cbd8
JB
64862012-12-17 Joel Brobecker <brobecker@adacore.com>
6487
6488 * lynx-low.c (lynx_attach): Delete variable new_process.
6489
ab8f6ca9
JB
64902012-12-17 Joel Brobecker <brobecker@adacore.com>
6491
6492 * lynx-low.c (lynx_create_inferior): Delete variable
6493 new_process.
6494
78cbc024
JB
64952012-12-17 Joel Brobecker <brobecker@adacore.com>
6496
6497 * lynx-low.c (ptrace_request_to_str): Do not handle
6498 PTRACE_GETTHREADLIST if this macro does not exist.
6499
14a00470
YQ
65002012-12-15 Yao Qi <yao@codesourcery.com>
6501
6502 * Makefile.in (OBS): Add notif.o.
6503 * notif.c, notif.h: New.
6504 * server.c: Include "notif.h".
6505 (struct vstop_notif) <next>: Remove.
6506 <base>: New field.
6507 (queue_stop_reply): Update.
6508 (push_event, send_next_stop_reply): Remove.
6509 (discard_queued_stop_replies): Update.
6510 (notif_stop): New variable.
6511 (handle_v_stopped): Remove.
6512 (handle_v_requests): Don't call handle_v_stopped. Call
6513 handle_ack_notif instead.
6514 (queue_stop_reply_callback): Call notif_event_enque instead
6515 of queue_stop_reply.
6516 (handle_status): Don't call send_next_stop_reply, call
6517 notif_write_event instead.
6518 (kill_inferior_callback): Likewise.
6519 (detach_or_kill_inferior_callback): Likewise.
6520 (main): Call initialize_notif.
6521 (process_serial_event): Call QUEUE_is_empty.
6522 (handle_target_event): Call notif_push instead of push event.
6523 * server.h (push_event): Remove declaration.
6524
61c125b9
TT
65252012-12-10 Tom Tromey <tromey@redhat.com>
6526
6527 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
6528 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
6529 macros.
6530 (.c.o): Rewrite.
6531 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
6532 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
6533 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
6534 (amd64-linux-ipa.o, ax.o): Rewrite.
6535 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
6536 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
6537 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
6538 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
6539 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
6540 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
6541 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
6542 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
6543 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
6544 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
6545 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
6546 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
6547 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
6548 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
6549 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
6550 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
6551 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
6552 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
6553 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
6554 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
6555 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
6556 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
6557 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
6558 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
6559 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
6560 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
6561 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
6562 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
6563 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
6564 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
6565 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
6566 (reg-tilegx.o): Remove.
6567 (all_object_files): New macro.
6568 Include .deps files.
6569 * aclocal.m4, configure: Rebuild.
6570 * acinclude.m4: Include depstand.m4, lead-dot.m4.
6571 * configure.ac: Invoke ZW_CREATE_DEPDIR,
6572 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
6573
e90e9ad9
TT
65742012-12-05 Tom Tromey <tromey@redhat.com>
6575
6576 PR gdb/14917:
6577 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
6578
02d403bf 65792012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
6580
6581 * configure.ac: Check for linux/perf_event.h.
6582 * config.in: Regenerated.
6583 * configure: Regenerated.
6584
0270a750
PA
65852012-11-26 Maxime Villard <rustyBSD@gmx.fr>
6586
6587 * hostio.c (handle_readlink): Decrease buffer size
6588 parameter passed to readlink by one byte.
6589
8c29b58e
YQ
65902012-11-26 Yao Qi <yao@codesourcery.com>
6591
6592 * configure.ac (build_warnings): Append '-Wempty-body'.
6593 * configure: Regenerated.
6594 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
6595 body.
6596
8bdce1ff
PM
65972012-11-15 Pierre Muller <muller@sourceware.org>
6598
6599 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
6600 * config.in: Regenerate.
6601 * configure: Regenerate.
6602 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
6603 Use "gdb_wait.h" header instead of <sys/wait.h> header.
6604 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6605 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
6606 header.
6607 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
6608 instead of <sys/wait.h> header.
6609 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
6610
02d403bf 66112012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
6612
6613 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
6614 (various make rules): Remove -DGDBSERVER
6615
fbd5db48
YQ
66162012-11-09 Yao Qi <yao@codesourcery.com>
6617
6618 * spu-low.c (current_ptid): Move it to ..
6619 * gdbthread.h: ... here. New.
6620 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
6621 * server.c (myresume, process_serial_event): Likewise.
6622 * thread-db.c (thread_db_find_new_threads): Likewise.
6623 * tracepoint.c (run_inferior_command): Likewise.
6624
b3dc46ff
AB
66252012-10-01 Andrew Burgess <aburgess@broadcom.com>
6626
6627 * server.c (handle_search_memory_1): Include access length in
6628 warning message.
6629
07c04788
HPN
66302012-09-05 Michael Brandt <michael.brandt@axis.com>
6631
6632 * linux-crisv32-low.c: Fix compile errors.
6633
918d227b
YQ
66342012-09-04 Yao Qi <yao@codesourcery.com>
6635
6636 * tracepoint.c (cmd_qtsv): Adjust debug message.
6637 Don't check CUR_TPOINT.
6638
18c1b81a
YQ
66392012-08-28 Yao Qi <yao@codesourcery.com>
6640
6641 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
6642 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
6643 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
6644 Remove declarations of xmalloc, xreallloc, xstrdup and
6645 freeargv.
6646 * Makefile.in (libiberty_h): New.
6647 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
6648 (linux-bfin-low.o): Append dependency 'libiberty.h'.
6649
dc82f37b
YQ
66502012-08-23 Yao Qi <yao@codesourcery.com>
6651
6652 * server.h: Remove declaration of 'xsnprintf'.
6653
406b1477
KS
66542012-08-22 Keith Seitz <keiths@redhat.com>
6655
6656 * server.h: Include build-gnulib-gbserver/config.h.
6657 * gdbreplay.c: Likewise.
6658
e6712ff1
DE
66592012-08-08 Doug Evans <dje@google.com>
6660
6661 * Makefile.in (SFILES): Add gdb_vecs.c.
6662 (OBS): Add gdb_vecs.o.
6663 (gdb_vecs_h, host_defs_h): New variables.
6664 (thread-db.o): Add $(gdb_vecs_h) dependency.
6665 (gdb_vecs.o): New rule.
6666 * thread-db.c: #include "gdb_vecs.h".
6667 (thread_db_load_search): Use a vector to iterate over path elements.
6668 Handle text appearing after "$pdir".
6669
6670 * configure.ac: Add check for strstr.
6671 * config.in: Regenerate.
6672 * configure: Regenerate.
6673
7c3270ae
UW
66742012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
6675
6676 * hostio.c (handle_pread): If pread fails, fall back to attempting
6677 lseek/read.
6678 (handle_pwrite): Likewise for pwrite.
6679
b62e2b27
UW
66802012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
6681
6682 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
6683 between unsupported TYPE and unimplementable ADDR/LEN combination.
6684 (arm_insert_point): Act on new return value.
6685
78a99e91
PA
66862012-07-31 Pedro Alves <palves@redhat.com>
6687
6688 * server.c (process_point_options): Only skip tokens if we find
6689 one that is unrecognized. Don't treat 'X' specially while
6690 skipping unrecognized tokens.
6691
fcf303ab
UW
66922012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
6693
6694 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
6695 to 4-byte-align HW breakpoint addresses for Thumb.
6696
7255706c
YQ
66972012-07-27 Yao Qi <yao@codesourcery.com>
6698
6699 PR remote/14161.
6700
6701 * server.h: Declare gdb_agent_about_to_close.
6702 * target.c (kill_inferior): Include "agent.h".
6703 New. Send command 'kill'.
6704 * target.h (kill_inferior): Removed macro.
6705 * tracepoint.c (gdb_agent_about_to_close): New.
6706 (gdb_agent_helper_thread): Handle command 'close'.
6707 Wait endlessly until the inferior stops.
6708 Install gdb_agent_remove_socket to atexit hook.
6709 (agent_socket_name): New static variable.
6710 (gdb_agent_socket_init): Replace local variable 'name' with
6711 'agent_socket_name'.
6712 (gdb_agent_remove_socket): New.
6713
5a3f286f
YQ
67142012-07-27 Yao Qi <yao@codesourcery.com>
6715
6716 * server.c (process_point_options): Stop at 'X' when parsing.
6717
961bd387
ME
67182012-07-19 Michael Eager <eager@eagercon.com>
6719
a261b8f5 6720 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
6721 to hw_execute.
6722 * linux-x86-low.c (x86_insert_point, x86_remove_point):
6723 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
6724 hardware breakpoint.
6725
aa7c7447
JK
67262012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6727
6728 * gdbserver/linux-low.c (initialize_low): Call
6729 linux_ptrace_init_warnings.
6730
7f216e7c
DE
67312012-07-02 Doug Evans <dje@google.com>
6732
6733 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
6734 pointer to int.
6735
d3ce09f5
SS
67362012-07-02 Stan Shebs <stan@codesourcery.com>
6737
6738 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
6739 (ax.o): Add it to build rule.
6740 (ax-ipa.o): Ditto.
6741 (OBS): Add format.o.
6742 (IPA_OBS): Add format.o.
6743 * server.c (handle_query): Claim support for breakpoint commands.
6744 (process_point_options): Add command case.
6745 (process_serial_event): Leave running if there are printfs in
6746 effect.
6747 * mem-break.h (any_persistent_commands): Declare.
6748 (add_breakpoint_commands): Declare.
6749 (gdb_no_commands_at_breakpoint): Declare.
6750 (run_breakpoint_commands): Declare.
6751 * mem-break.c (struct point_command_list): New struct.
6752 (struct breakpoint): New field command_list.
6753 (any_persistent_commands): New function.
6754 (add_commands_to_breakpoint): New function.
6755 (add_breakpoint_commands): New function.
6756 (gdb_no_commands_at_breakpoint): New function.
6757 (run_breakpoint_commands): New function.
6758 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
6759 locally.
6760 * ax.c: Include format.h.
6761 (ax_printf): New function.
6762 (gdb_eval_agent_expr): Add printf opcode.
6763
2f8f6aed
YQ
67642012-06-13 Yao Qi <yao@codesourcery.com>
6765
6766 * server.c (start_inferior): Remove duplicated writes to fields
6767 'last_resume_kind' and 'last_status' of 'current_inferior'.
6768
0c9070b3
YQ
67692012-06-12 Yao Qi <yao@codesourcery.com>
6770 Pedro Alves <palves@redhat.com>
6771
6772 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
6773 comment.
6774 * server.c (handle_v_cont): Extend comment.
6775
c52daf70
YQ
67762012-06-11 Yao Qi <yao@codesourcery.com>
6777
6778 * linux-low.c (linux_attach): Add 'static'.
6779
d38bbb0a
YQ
67802012-06-06 Yao Qi <yao@codesourcery.com>
6781
6782 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
6783
89dc0afd
JK
67842012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
6785
6786 Fix gcc -flto compilation warning.
6787 * server.c (main): Make variable multi_mode and attach volatile.
6788
75f62ce7
TJB
67892012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6790
6791 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
6792 if the platform doesn't know about it.
6793
65f479b6
PA
67942012-05-30 Jeff Kenton <jkenton@tilera.com>
6795
6796 * Makefile.in (SFILES): Add linux-tile-low.c.
6797 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
6798 * configure.srv: Handle tilegx-*-linux*.
6799 * linux-tile-low.c: New file.
6800
0c5bf5a9
JK
68012012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6802
6803 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
6804
a493e3e2
PA
68052012-05-24 Pedro Alves <palves@redhat.com>
6806
6807 PR gdb/7205
6808
43aaf8b6 6809 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 6810
2ea28649
PA
68112012-05-24 Pedro Alves <palves@redhat.com>
6812
6813 PR gdb/7205
6814
6815 Replace target_signal with gdb_signal throughout.
6816
8d409d16
MR
68172012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
6818
6819 * linux-low.c (linux_store_registers): Avoid the copying sequence
6820 when no data has been retrieved by ptrace.
6821
23512c01
MGD
68222012-05-22 Will Deacon <will.deacon@arm.com>
6823
6824 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
6825 Include asm/ptrace.h.
6826 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
6827 already defined.
6828
4934b29e
MR
68292012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
6830
6831 * linux-low.c (linux_store_registers): Don't re-retrieve data
6832 with ptrace that has already been obtained from /proc. Always
6833 copy any data retrieved with ptrace to the buffer supplied.
6834
bde24c0a
PA
68352012-05-11 Yao Qi <yao@codesourcery.com>
6836 Pedro Alves <palves@redhat.com>
6837
6838 * linux-low.c (enum stopping_threads_kind): New.
6839 (stopping_threads): Change type to `enum stopping_threads_kind'.
6840 (handle_extended_wait): If stopping and suspending threads, leave
6841 the new_lwp suspended too.
6842 (linux_wait_for_event): Adjust.
6843 (stop_all_lwps): Set `stopping_threads' to
6844 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
6845 whether we're suspending threads or just stopping them. Assert no
6846 recursion happens.
6847
623b6bdf
YQ
68482012-04-29 Yao Qi <yao@codesourcery.com>
6849
6850 * server.h: Move some code to ...
6851 * gdbthread.h: ... here. New.
6852 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
6853 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
6854 (nto-low.o, win32-low.o): Likewise.
6855 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
6856 * regcache.c, remote-utils.c, server.c: Likewise.
6857 * target.c, tracepoint.c, win32-low.c: Likewise.
6858
f15f9948
TJB
68592012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
6860
6861 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
6862 (PTRACE_ARG4_TYPE): Likewise.
6863 (PTRACE_XFER_TYPE): Likewise.
6864 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
6865 ptrace to PTRACE_ARG3_TYPE.
6866 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
6867 (PTRACE_ARG4_TYPE): Likewise.
6868 (PTRACE_XFER_TYPE): Likewise.
6869 (linux_detach_one_lwp): Cast fourth argument of
6870 ptrace to long then PTRACE_ARG4_TYPE.
6871 (regsets_fetch_inferior_registers): Cast third argument of
6872 ptrace to long then PTRACE_ARG3_TYPE.
6873 (regsets_store_inferior_registers): Likewise.
6874
38ea300a
PA
68752012-04-20 Pedro Alves <palves@redhat.com>
6876
6877 * configure: Regenerate.
6878
c971b7fa
PA
68792012-04-19 Pedro Alves <palves@redhat.com>
6880
43aaf8b6 6881 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 6882 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
6883 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
6884 (all, install-only, uninstall, clean-info, all-lib, clean): No
6885 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
6886 (maintainer-clean realclean distclean): Use subdir_do.
6887 (subdir_do): New.
6888 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 6889 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
6890 * acinclude.m4: Include acx_configure_dir.m4.
6891 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
6892 calls. Call AC_PROG_RANLIB. Configure gnulib using
6893 ACX_CONFIGURE_DIR.
6894 (GNULIB): New.
6895 (GNULIB_STDINT_H): Adjust.
6896 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
6897 * gdbreplay.c: Include build-gnulib/config.h.
6898 * server.h: Likewise.
6899 * aclocal.m4: Regenerate.
6900 * config.in: Regenerate.
6901 * configure: Regenerate.
c971b7fa 6902
809277f8
PA
69032012-04-19 Pedro Alves <palves@redhat.com>
6904
6905 * Makefile.in (LIBGNU, INCGNU): Adjust.
6906 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
6907 (all, install-only, uninstall, clean-info, all-lib, clean)
6908 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
6909 * configure.ac: Adjust AC_OUTPUT output.
6910 * aclocal.m4: Regenerate.
6911 * configure: Regenerate.
6912
fd9bb8b8
PA
69132012-04-19 Pedro Alves <palves@redhat.com>
6914
6915 * Makefile.in (generated_files): New.
6916 (server_h): Remove the explicit dependency on config.h, and depend
6917 on $generated_files.
6918
1c298c66
PA
69192012-04-19 Pedro Alves <palves@redhat.com>
6920
6921 * Makefile.in (INCGNU): Add -Ignulib.
6922
57c4b50b
PA
69232012-04-19 Pedro Alves <palves@redhat.com>
6924
6925 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
6926 (INCGNU): ... this, and spell out -I here.
6927 (GNULIB_LIB): Rename to ...
6928 (LIBGNU): ... this.
6929 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
6930
1030e047
PA
69312012-04-19 Pedro Alves <palves@redhat.com>
6932
6933 * config.in: Regenerate.
6934
447d4319
PA
69352012-04-19 Pedro Alves <palves@redhat.com>
6936
6937 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
6938 * server.h (memmem): Remove declaration.
6939 * config.in: Regenerate.
6940 * configure: Regenerate.
6941
aad9eab9
YQ
69422012-04-19 Yao Qi <yao@codesourcery.com>
6943
6944 * Makefile.in (SFILES): Add common/vec.c.
6945 (OBS): Add vec.o.
6946 (vec.o): New rule.
6947
3e10640f
YQ
69482012-04-19 Yao Qi <yao@codesourcery.com>
6949
6950 * remote-utils.c (prepare_resume_reply): Replace with macro
6951 target_core_of_thread.
6952 * server.c (handle_qxfer_threads_proper): Likewise.
6953 * target.h (traget_core_of_thread): New macro.
6954
71622373
PA
69552012-04-18 Pedro Alves <palves@redhat.com>
6956
6957 * aclocal.m4: Regenerate.
6958 * configure: Regenerate.
6959
80d26939
YQ
69602012-04-16 Yao Qi <yao@codesourcery.com>
6961
6962 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
6963 duplicated on address.
6964
42476b70
YQ
69652012-04-16 Yao Qi <yao@codesourcery.com>
6966
6967 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
6968 (struct tracepoint_action_ops) <send>: New field.
6969 (m_tracepoint_action_send, r_tracepoint_action_send): New.
6970 (agent_expr_send, x_tracepoint_action_send): New.
6971 (l_tracepoint_action_send): New.
6972 (cmd_qtdp): Download and install tracepoint
6973 according to `use_agent'.
6974 (run_inferior_command): Add one more parameter `len'.
6975 Update callers.
6976 (tracepoint_send_agent): New.
6977 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
6978
7bc83639
YQ
69792012-04-16 Yao Qi <yao@codesourcery.com>
6980
6981 * tracepoint.c (download_tracepoints): Moved to ...
6982 (cmd_qtstart): ... here.
6983
5f18041e
YQ
69842012-04-14 Yao Qi <yao@codesourcery.com>
6985
6986 * tracepoint.c: Include inttypes.h.
6987 (struct collect_memory_action): Use sized types.
6988 (struct tracepoint): Likewise.
6989 (cmd_qtdp, stop_tracing): Update print specifiers.
6990 (cmd_qtp, response_tracepoint): Likewise.
6991 (collect_data_at_tracepoint): Likewise.
6992 (collect_data_at_step): Likewise.
6993
55a8c076
YQ
69942012-04-14 Yao Qi <yao@codesourcery.com>
6995
6996 Import gnulib module inttypes.
6997 * aclocal.m4, config.in, configure: Regenerated.
6998
dc750257
YQ
69992012-04-14 Yao Qi <yao@codesourcery.com>
7000
7001 * Makefile.in (maintainer-clean, realclean, distclean): Remove
7002 Makefile and config.status at last.
7003
0ab5faf9
YQ
70042012-04-13 Yao Qi <yao@codesourcery.com>
7005
7006 * tracepoint.c: Include stdint.h unconditionally.
7007
18f5fd81
TJB
70082012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7009
7010 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
7011 on BFD_HAVE_SYS_PROCFS_TYPE.
7012 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
7013 * configure: Regenerate.
7014 * config.in: Likewise.
7015
4d47af5c
L
70162012-04-13 H.J. Lu <hongjiu.lu@intel.com>
7017
7018 * Makefile.in (clean): Also remove x32.c x32-linux.c
7019 x32-avx.c x32-avx-linux.c.
7020 (x32.o): New target.
7021 (x32.c): Likewise.
7022 (x32-linux.o): Likewise.
7023 (x32-linux.c): Likewise.
7024 (x32-avx.o): Likewise.
7025 (x32-avx.c): Likewise.
7026 (x32-avx-linux.o): Likewise.
7027 (x32-avx-linux.c): Likewise.
7028
7029 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
7030 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
7031 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
7032 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
7033 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
7034 i386/x32-avx-linux.xml.
7035
7036 * linux-x86-low.c (init_registers_x32_linux): New prototype.
7037 (init_registers_x32_avx_linux): Likwise.
7038 (x86_linux_update_xmltarget): Call init_registers_x32_linux
7039 or init_registers_x32_avx_linux if linux_is_elf64 is false.
7040
ecedbe58
PA
70412012-04-13 Pedro Alves <palves@redhat.com>
7042
7043 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
7044 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
7045 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
7046 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
7047 the sub-make.
7048
c92b5177
L
70492012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7050
7051 * linux-x86-low.c (compat_x32_clock_t): New.
7052 (compat_x32_siginfo_t): Likewise.
7053 (compat_x32_siginfo_from_siginfo): Likewise.
7054 (siginfo_from_compat_x32_siginfo): Likewise.
7055 (linux_is_elf64): Likewise.
7056 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
7057 and siginfo_from_compat_x32_siginfo for x32.
7058 (x86_arch_setup): Set linux_is_elf64.
7059
214d508e
L
70602012-04-12 H.J. Lu <hongjiu.lu@intel.com>
7061
7062 PR gdb/13969
7063 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
7064 e_machine field.
7065 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
7066 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
7067 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
7068 compatible with process.
7069
c9a1864a
YQ
70702012-04-12 Yao Qi <yao@codesourcery.com>
7071
7072 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
7073 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
7074 (install-only, install-info, clean): Handle sub dir gnulib.
7075 (all-lib, am--refresh): New targets.
7076 (memmem.o): Remove target.
7077 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
7078 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
7079 (AC_REPLACE_FUNCS): Remove memmem.
7080 Invoke gl_INIT and AM_INIT_AUTOMAKE.
7081 (AC_OUTPUT): Generate Makefile in gnulib/.
7082 * aclocal.m4, config.in, configure: Regenerated.
7083
367ba2c2
MR
70842012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
7085
7086 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
7087
9d236627
PA
70882012-04-05 Pedro Alves <palves@redhat.com>
7089
7090 -Werror=strict-aliasing
7091
7092 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
7093 pointer.
7094
111217b3
PA
70952012-04-04 Pedro Alves <palves@redhat.com>
7096
7097 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
7098 (sparc_store_gregset_from_stack, sparc_store_gregset)
7099 (sparc_breakpoint_at): Fix formatting.
7100
8365dcf5
TJB
71012012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
7102
7103 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
7104 are available.
7105 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
7106 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
7107 * config.in: Regenerate.
7108 * configure: Likewise.
7109
689cc2ae
PA
71102012-03-29 Pedro Alves <palves@redhat.com>
7111
7112 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
7113 Correct ptrace arguments.
7114
c14dfd32
PA
71152012-03-28 Pedro Alves <palves@redhat.com>
7116
7117 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
7118 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
7119 (IA64_FR1_REGNUM): New defines.
7120 (ia64_fetch_register): New.
7121 (the_low_target): Install it.
7122 * linux-low.h (struct linux_target_ops) <fetch_register>: New
7123 field.
7124 * linux-low.c (linux_fetch_registers): Try the
7125 the_low_target.fetch_register hook first.
7126
7127 * linux-arm-low.c (the_low_target): Adjust.
7128 * linux-bfin-low.c (the_low_target): Adjust.
7129 * linux-cris-low.c (the_low_target): Adjust.
7130 * linux-crisv32-low.c (the_low_target): Adjust.
7131 * linux-m32r-low.c (the_low_target): Adjust.
7132 * linux-m68k-low.c (the_low_target): Adjust.
7133 * linux-mips-low.c (the_low_target): Adjust.
7134 * linux-ppc-low.c (the_low_target): Adjust.
7135 * linux-s390-low.c (the_low_target): Adjust.
7136 * linux-sh-low.c (the_low_target): Adjust.
7137 * linux-sparc-low.c (the_low_target): Adjust.
7138 * linux-tic6x-low.c (the_low_target): Adjust.
7139 * linux-x86-low.c (the_low_target): Adjust.
7140 * linux-xtensa-low.c (the_low_target): Adjust.
7141
63c88e13
PA
71422012-03-26 Pedro Alves <palves@redhat.com>
7143
7144 * server.c (handle_qxfer_libraries): Don't bail early if
7145 the_target->qxfer_libraries_svr4 is not NULL.
7146
fb723180
PA
71472012-03-26 Pedro Alves <palves@redhat.com>
7148
7149 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
7150
0afae3cf
PA
71512012-03-23 Pedro Alves <palves@redhat.com>
7152
7153 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
7154 "library-list-svr4" element's start tag when the the DSO list is
7155 empty.
7156
485f1ee4
PA
71572012-03-23 Pedro Alves <palves@redhat.com>
7158
7159 * linux-low.c (read_one_ptr): Read the inferior's pointer through
7160 a variable whose type size is the same as the inferior's pointer
7161 size.
7162
a5362b9a
TS
71632012-03-21 Thomas Schwinge <thomas@codesourcery.com>
7164
7165 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
7166 struct siginfo.
7167 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
7168 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
7169 * linux-low.h: Include <signal.h>.
7170 (struct siginfo): Remove forward declaration.
7171 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
7172 struct siginfo.
7173
d226c142
MF
71742012-03-21 Mike Frysinger <vapier@gentoo.org>
7175
7176 * .gitignore: Ignore more files.
7177
122f36ef
PA
71782012-03-19 Pedro Alves <palves@redhat.com>
7179 Jan Kratochvil <jan.kratochvil@redhat.com>
7180
7181 * server.c (cont_thread, general_thread): Add describing comments.
7182 (start_inferior): Clear `cont_thread'.
7183 (handle_v_cont): Don't set `cont_thread' if resuming all threads
7184 of a process.
7185
fc3e5175
YQ
71862012-03-15 Yao Qi <yao@codesourcery.com>
7187
7188 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
7189 handling to ...
7190 (cmd_qtdp): ... here.
7191
8d0d92cd
YQ
71922012-03-15 Yao Qi <yao@codesourcery.com>
7193
7194 * tracepoint.c (struct tracepoint_action_ops): New.
7195 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
7196 (m_tracepoint_action_download): New.
7197 (r_tracepoint_action_download): New.
7198 (x_tracepoint_action_download): New.
7199 (l_tracepoint_action_download): New.
7200 (add_tracepoint_action): Install `action->ops' according type.
7201 (download_tracepoint_1): Move code `download' function pointer
7202 of various tracepoint_action_ops.
7203
87b0bb13
JK
72042012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7205
7206 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
7207 linux_ptrace_attach_warnings.
7208
5f572dec
JK
72092012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
7210
7211 * Makefile.in (linux-ptrace.o): New.
7212 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
7213 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
7214 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
7215 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
7216 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
7217 of these targets.
7218 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
7219
f4647387
YQ
72202012-03-08 Yao Qi <yao@codesourcery.com>
7221 Pedro Alves <palves@redhat.com>
7222
7223 Fix PR server/13392.
7224 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
7225 offset of JMP insn.
7226 * tracepoint.c (remove_tracepoint): New.
7227 (cmd_qtdp): Call remove_tracepoint when failed to install.
7228
9b224c5e
PA
72292012-03-07 Pedro Alves <palves@redhat.com>
7230
7231 * linux-low.c (get_detach_signal): New.
7232 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
7233 Pass on pending signals to PTRACE_DETACH. Check the result of the
7234 ptrace call.
7235 * server.c (program_signals, program_signals_p): New.
7236 (handle_general_set): Handle QProgramSignals.
7237 * server.h (program_signals, program_signals_p): Declare.
7238
e237a7e2
JK
72392012-03-05 Pedro Alves <palves@redhat.com>
7240 Jan Kratochvil <jan.kratochvil@redhat.com>
7241
7242 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
7243 New comment why.
7244
5808517f
YQ
72452012-03-03 Yao Qi <yao@codesourcery.com>
7246
7247 * tracepoint.c (tracepoint_look_up_symbols): Update call to
7248 agent_look_up_symbols.
7249
58b4daa5
YQ
72502012-03-03 Yao Qi <yao@codesourcery.com>
7251
7252 * Makefile.in (linux-low.o): Keep dependence on agent.h.
7253 (linux-x86-low.o): Likewise.
7254 * server.h: Remove in_process_agent_loaded.
7255 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
7256 common/agent.c.
7257 Update callers.
7258
8ffcbaaf
YQ
72592012-03-03 Yao Qi <yao@codesourcery.com>
7260
7261 * tracepoint.c (gdb_agent_capability): New global.
7262 (in_process_agent_loaded_ust): Renamed to
7263 `in_process_agent_supports_ust'.
7264 Update callers.
7265 (in_process_agent_supports_ust): Call agent_capability_check.
7266 (clear_installed_tracepoints): Assert that agent supports
7267 agent.
7268
d1feda86
YQ
72692012-03-03 Yao Qi <yao@codesourcery.com>
7270
7271 * linux-low.c (linux_supports_agent): New.
7272 (linux_target_ops): Initialize field `supports_agent' with
7273 linux_supports_agent.
7274 * target.h (struct target_ops) <supports_agent>: New.
7275 (target_supports_agent): New macro.
7276 * server.c (handle_general_set): Handle packet 'QAgent'.
7277 (handle_query): Send `QAgent+'.
7278 * Makefile.in (server.o): Depends on agent.h.
7279
2fa291ac
YQ
72802012-03-03 Yao Qi <yao@codesourcery.com>
7281
7282 * Makefile.in (OBS): Add agent.o.
7283 Add new rule for agent.o.
7284 Track dependence of tracepoint.c on agent.h.
7285 * tracepoint.c (run_inferior_command_1):
7286 (run_inferior_command): Call agent_run_command.
7287 (gdb_ust_connect_sync_socket): Deleted. Move it to
7288 common/agent.c.
7289 (resume_thread, stop_thread): Likewise.
7290 (gdb_ust_socket_init): Renamed to ...
7291 (gdb_agent_socket_init): ... New.
7292 (gdb_ust_thread): Renamed to ...
7293 (gdb_agent_helper_thread): ... New.
7294 (gdb_ust_init): Move some code to ...
7295 (gdb_agent_init): ... here. New.
7296 [HAVE_UST]: Call gdb_ust_init.
7297 (initialize_tracepoint_ftlib): Call gdb_agent_init.
7298 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
7299 * config.in, configure: Regenerated.
7300
05044653
PA
73012012-03-02 Pedro Alves <palves@redhat.com>
7302
7303 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
7304 * linux-low.c (struct simple_pid_list): New.
7305 (stopped_pids): New a struct simple_pid_list pointer.
7306 (add_to_pid_list, pull_pid_from_list): New.
7307 (handle_extended_wait): Don't assume the first signal new children
7308 report is SIGSTOP. Adjust call to pull_pid_from_list.
7309 (linux_wait_for_lwp): Adjust.
7310
8d00225b
YQ
73112012-03-02 Yao Qi <yao@codesourcery.com>
7312
7313 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
7314 debug log.
7315
19560ba5
YQ
73162012-03-02 Yao Qi <yao@codesourcery.com>
7317
7318 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
7319 `stop_pc' and `tpoint'. Update caller.
7320
1faeff08
MR
73212012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
7322
7323 * linux-low.h (linux_target_ops): Add regset_bitmap member.
7324 * linux-low.c (use_linux_regsets): New macro.
7325 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
7326 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
7327 (linux_register_in_regsets): New function.
7328 (usr_fetch_inferior_registers): Skip registers covered by
7329 regsets.
7330 (usr_store_inferior_registers): Likewise.
7331 (usr_fetch_inferior_registers): New macro.
7332 (usr_store_inferior_registers): Likewise.
7333 (linux_fetch_registers): Handle mixed regset/non-regset targets.
7334 (linux_store_registers): Likewise.
7335 * linux-mips-low.c (init_registers_mips_dsp_linux): New
7336 prototype.
7337 (init_registers_mips64_dsp_linux): Likewise.
7338 (init_registers_mips_linux): New macro.
7339 (init_registers_mips_dsp_linux): Likewise.
7340 (mips_dsp_num_regs): Likewise.
7341 (DSP_BASE, DSP_CONTROL): New fallback macros.
7342 (mips_base_regs): New macro.
7343 (mips_regmap): Use it. Fix the size.
7344 (mips_dsp_regmap): New variable.
7345 (mips_dsp_regset_bitmap): Likewise.
7346 (mips_arch_setup): New function.
7347 (mips_cannot_fetch_register): Use the_low_target.regmap rather
7348 than mips_regmap.
7349 (mips_cannot_store_register): Likewise.
7350 (the_low_target): Update .arch_setup, .num_regs and .regmap
7351 initializers. Add .regset_bitmap initializer.
7352 * linux-arm-low.c (the_low_target): Add .regset_bitmap
7353 initializer.
7354 * linux-bfin-low.c (the_low_target): Likewise.
7355 * linux-cris-low.c (the_low_target): Likewise.
7356 * linux-crisv32-low.c (the_low_target): Likewise.
7357 * linux-ia64-low.c (the_low_target): Likewise.
7358 * linux-m32r-low.c (the_low_target): Likewise.
7359 * linux-m68k-low.c (the_low_target): Likewise.
7360 * linux-ppc-low.c (the_low_target): Likewise.
7361 * linux-s390-low.c (the_low_target): Likewise.
7362 * linux-sh-low.c (the_low_target): Likewise.
7363 * linux-sparc-low.c (the_low_target): Likewise.
7364 * linux-tic6x-low.c (the_low_target): Likewise.
7365 * linux-x86-low.c (the_low_target): Likewise.
7366 * linux-xtensa-low.c (the_low_target): Likewise.
7367 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
7368 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
7369 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
7370 srv_xmlfiles.
7371 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
7372 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
7373
c03e6ccc
YQ
73742012-02-29 Yao Qi <yao@codesourcery.com>
7375 Pedro Alves <palves@redhat.com>
7376
7377 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
7378 `step_over_finished' is true.
7379
644cebc9
PA
73802012-02-27 Pedro Alves <palves@redhat.com>
7381
7382 * linux-low.c (pid_is_stopped): Delete, moved to common/.
7383 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
7384
c14d7ab2
PA
73852012-02-27 Pedro Alves <palves@redhat.com>
7386
7387 PR server/9684
7388 * linux-low.c (pid_is_stopped): New.
7389 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
7390
412c89dd
LM
73912012-02-25 Luis Machado <lgustavo@codesourcery.com>
7392
7393 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
7394 of conditions.
7395
b745defe
MR
73962012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
7397
7398 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
7399
9f3a5c85
LM
74002012-02-24 Luis Machado <lgustavo@codesourcery>
7401
7402 * server.c (handle_query): Advertise support for target-side
7403 breakpoint condition evaluation.
7404 (process_point_options): New function.
7405 (process_serial_event): When inserting a breakpoint, check for
7406 a target-side condition that should be evaluated.
7407
7408 * mem-break.c: Include regcache.h and ax.h.
7409 (point_cond_list_t): New data structure.
7410 (breakpoint) <cond_list>: New field.
7411 (find_gdb_breakpoint_at): Make non-static.
7412 (delete_gdb_breakpoint_at): Clear any target-side
7413 conditions.
7414 (clear_gdb_breakpoint_conditions): New function.
7415 (add_condition_to_breakpoint): Likewise.
7416 (add_breakpoint_condition): Likewise.
7417 (gdb_condition_true_at_breakpoint): Likewise.
7418 (gdb_breakpoint_here): Return result directly instead
7419 of going through a local variable.
7420
7421 * mem-break.h (find_gdb_breakpoint_at): New prototype.
7422 (clear_gdb_breakpoint_conditions): Likewise.
7423 (add_breakpoint_condition): Likewise.
7424 (gdb_condition_true_at_breakpoint): Likewise.
7425
7426 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
7427 (need_step_over_p): Take target-side breakpoint condition into
7428 consideration.
7429
5e1dc496
LM
74302012-02-24 Luis Machado <lgustavo@codesourcery>
7431
7432 * server.h: Include tracepoint.h.
7433 (agent_mem_read, agent_get_trace_state_variable_value,
7434 agent_set_trace_state_variable_value,
7435 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
7436 get_set_tsv_func_addr): New prototypes.
7437
7438 * ax.h: New include file.
7439 * ax.c: New source file.
7440
7441 * tracepoint.c: Include ax.h.
7442 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
7443 agent_expr, eval_result_type): Move to ax.h.
7444 (parse_agent_expr): Rename to ...
7445 (gdb_parse_agent_expr): ... this, make it non-static and move
7446 to ax.h.
7447 (unparse_agent_expr) Rename to ...
7448 (gdb_unparse_agent_expr): ... this, make it non-static and move
7449 to ax.h.
7450 (eval_agent_expr): Rename to ...
7451 (eval_tracepoint_agent_expr): ... this.
7452 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
7453 forward declarations.
7454 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
7455 (agent_get_trace_state_variable_value): New function.
7456 (agent_set_trace_state_variable_value): New function.
7457 (cmd_qtdp): Call gdb_parse_agent_expr (...).
7458 (response_tracepoint): Call gdb_unparse_agent_expr (...).
7459 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
7460 (condition_true_at_tracepoint): Likewise.
7461 (parse_agent_expr): Rename to ...
7462 (gdb_parse_agent_expr): ... this and move to ax.c.
7463 (unparse_agent_expr): Rename to ...
7464 (gdb_unparse_agent_expr): ... this and move to ax.c.
7465 (gdb_agent_op_name): Move to ax.c.
7466 (eval_agent_expr): Rename to ...
7467 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
7468 and move to ax.c.
7469 (eval_tracepoint_agent_expr): New function.
7470 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 7471 non-static.
5e1dc496
LM
7472 (current_insn_ptr, emit_error, struct bytecode_address): Move to
7473 ax.c.
7474 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
7475 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
7476 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
7477 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
7478 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
7479 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
7480 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
7481 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
7482 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
7483 (compile_bytecodes): Remove forward declaration.
7484 (is_goto_target): Move to ax.c.
7485 (compile_bytecodes): Move to ax.c and call
7486 agent_get_trace_state_variable_value (...) and
7487 agent_set_trace_state_variable_value (...).
7488
7489 * Makefile.in: Update ax.c and IPA dependencies.
7490
277e4e52
PA
74912012-02-24 Pedro Alves <palves@redhat.com>
7492
7493 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
7494 (cmd_bigqtbuffer_circular): ... this. Only handle
7495 'QTBuffer:circular:'.
7496 (handle_tracepoint_general_set): Adjust.
7497
bf4c19f7
YQ
74982012-02-16 Yao Qi <yao@codesourcery.com>
7499
7500 * inferiors.c: Move code to ...
7501 * dll.c: .... here. New.
7502 * server.h: Declare clear_dlls.
7503 * Makefile.in (SFILES): Add dll.c.
7504 (OBS): Add dll.o
7505 (dll.o): New rule.
7506
d73f2619
YQ
75072012-02-11 Yao Qi <yao@codesourcery.com>
7508
7509 * server.c: (handle_monitor_command): Add a new parameter
7510 `own_buf'.
7511 (handle_query): Update caller.
7512
f8255c2a
JB
75132012-02-09 Joel Brobecker <brobecker@adacore.com>
7514
7515 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
7516 * configure, config.in: Regenerate.
7517 * hostio.c: Provide an alternate implementation if HAVE_READLINK
7518 is not defined.
7519
da84f473
PA
75202012-02-02 Pedro Alves <palves@redhat.com>
7521
7522 Try SIGKILL first, then PTRACE_KILL.
7523 * linux-low.c (linux_kill_one_lwp): New.
7524 (linux_kill_one_lwp): Rename to ...
7525 (kill_one_lwp_callback): ... this. Use the new
7526 linux_kill_one_lwp.
7527
e886a173
PA
75282012-02-02 Pedro Alves <palves@redhat.com>
7529
7530 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
7531 inferior.
7532
be07f1a2
PA
75332012-01-27 Pedro Alves <palves@redhat.com>
7534
7535 * linux-low.c (linux_child_pid_to_exec_file): Delete.
7536 (elf_64_file_p): Make static.
7537 (linux_pid_exe_is_elf_64_file): New.
7538 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
7539 Delete declarations.
7540 (linux_pid_exe_is_elf_64_file): Declare.
7541 * linux-x86-low.c (x86_arch_setup): Use
7542 linux_pid_exe_is_elf_64_file.
7543
d8301ad1
JK
75442012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7545
7546 * linux-low.c (linux_wait_for_event_1): Rename to ...
7547 (linux_wait_for_event): ... here and merge it with former
7548 linux_wait_for_event - new variable wait_ptid, use it.
7549 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
7550
01b17894
PA
75512012-01-23 Pedro Alves <palves@redhat.com>
7552
7553 * server.c (main): Avoid yet another case of infinite loop while
7554 detaching/killing after a longjmp.
7555
e825046f
JK
75562012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
7557
7558 Code cleanup.
7559 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
7560
b9e7b9c3
UW
75612012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
7562
7563 * hostio.c (handle_readlink): New function.
7564 (handle_vFile): Call it to handle "vFile:readlink" packets.
7565
901f9912
UW
75662012-01-20 Pedro Alves <palves@redhat.com>
7567 Ulrich Weigand <ulrich.weigand@linaro.org>
7568
7569 * server.c (handle_v_requests): Only support vAttach and vRun to
7570 start multiple processes when in extended protocol mode.
7571
fc1ab1a0
PA
75722012-01-17 Pedro Alves <palves@redhat.com>
7573
7574 * tracepoint.c (initialize_tracepoint): Use mmap instead of
7575 memalign plus mprotect to allocate the scratch buffer.
7576
7d5d4e98
PA
75772012-01-13 Pedro Alves <palves@redhat.com>
7578
7579 * server.c (attach_inferior): Clear `cont_thread'.
7580
f128d5e9
PA
75812012-01-13 Pedro Alves <palves@redhat.com>
7582
7583 * server.c (main): Avoid infinite loop while detaching/killing
7584 after a longjmp.
7585
06db92f0
DE
75862012-01-09 Doug Evans <dje@google.com>
7587
7588 * server.c (start_inferior): Set last_ptid in --wrapper case.
7589
32d92999
YQ
75902012-01-06 Yao Qi <yao@codesourcery.com>
7591
7592 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
7593 defined.
7594 [IN_PROCESS_AGENT] (debug_agent): New global variable.
7595
5e0a92a9
YQ
75962012-01-04 Yao Qi <yao@codesourcery.com>
7597
7598 * tracepoint.c (cmd_qtdp): Print debug message
7599 for static tracepoint.
7600
ae639e8c
YQ
76012012-01-04 Yao Qi <yao@codesourcery.com>
7602
7603 * tracepoint.c (trace_vdebug): Differentiate debug message
7604 between gdbserver and IPA.
7605
f72429c5
YQ
76062012-01-03 Yao Qi <yao@codesourcery.com>
7607
7608 * tracepoint.c (tracepoint_was_hit): Don't collect for
7609 static tracepoint.
7610
12c3e59c
JB
76112012-01-02 Joel Brobecker <brobecker@adacore.com>
7612
7613 * terminal.h: Reformat copyright header.
7614
67827812
JB
76152012-01-02 Joel Brobecker <brobecker@adacore.com>
7616
7617 * server.c (gdbserver_version): Update copyright year.
7618 * gdbreplay.c (gdbreplay_version): Likewise.
7619
3e52c33d
JK
76202011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
7621
7622 * linux-low.c (linux_create_inferior): Put empty if clause for write.
7623
7624 Revert:
7625 2011-12-18 Hui Zhu <teawater@gmail.com>
7626 * linux-low.c (linux_create_inferior): Save return value to ret.
7627
66f1260e
HZ
76282011-12-18 Hui Zhu <teawater@gmail.com>
7629
7630 * linux-low.c (linux_create_inferior): Save return value to ret.
7631
e77616d7
DE
76322011-12-16 Doug Evans <dje@google.com>
7633
e7b06c57
DE
7634 * linux-low.c (linux_create_inferior): If stdio connection,
7635 redirect stdin from /dev/null, stdout to stderr.
7636 * remote-utils.c (remote_is_stdio): New static global.
7637 (remote_connection_is_stdio): New function.
7638 (remote_prepare): Handle stdio connection.
7639 (remote_open): Ditto.
7640 (remote_close): Don't close stdin for stdio connections.
7641 (read_prim,write_prim): New functions. Replace all calls to
7642 read/write to these.
7643 * server.c (main): Watch for "-" argument. Move call to
7644 remote_prepare before start_inferior.
7645 * server.h (STDIO_CONNECTION_NAME): New macro.
7646 (remote_connection_is_stdio): Declare.
7647
e77616d7
DE
7648 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
7649 in debugging output.
7650
82067193
YQ
76512011-12-15 Yao Qi <yao@codesourcery.com>
7652
7653 * tracepoint.c: Include sys/syscall.h.
7654 (gdb_ust_thread): Remove preprocessor conditional.
7655
82bfbe7e
PA
76562011-12-14 Pedro Alves <pedro@codesourcery.com>
7657
7658 * linux-low.c (linux_detach_one_lwp): Call
7659 the_low_target.prepare_to_resume before detaching.
7660
712c6575
YQ
76612011-12-14 Yao Qi <yao@codesourcery.com>
7662
7663 * tracepoint.c (gdb_ust_thread): Don't ignore return value
7664 of write.
7665
d54d1edf
YQ
76662011-12-14 Yao Qi <yao@codesourcery.com>
7667
7668 * i386-low.c (i386_low_stopped_data_address): Initialize local
7669 variable `control'.
7670
6210a125
PA
76712011-12-13 Pedro Alves <pedro@codesourcery.com>
7672
7673 PR remote/13492
7674
7675 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
7676 DR_CONTROL unless necessary. Extend comments.
7677 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
7678 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
7679
2ece8244
YQ
76802011-12-13 Yao Qi <yao@codesourcery.com>
7681
7682 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
7683 macros.
7684 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
7685
784867a5
JK
76862011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
7687
7688 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
7689 Print new debug message for such case.
7690
6bf36717
JK
76912011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7692
7693 Fix overlapping memcpy.
7694 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
7695 the read_inferior_memory transfer.
7696 (delete_fast_tracepoint_jump): New variable buf. Use it for the
7697 write_inferior_memory transfer.
7698 (set_fast_tracepoint_jump): New variable buf. Use it for the
7699 read_inferior_memory and write_inferior_memory transfers.
7700 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
7701 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
7702 Use it for the write_inferior_memory transfer.
7703 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
7704 buffers.
7705
50275556
MR
77062011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7707
7708 * linux-low.c (fetch_register, store_register): Make code
7709 consistent, fix formatting.
7710
7325beb4
MR
77112011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
7712
7713 * linux-low.c (usr_store_inferior_registers): Factor out code
7714 to handle individual registers into...
7715 (store_register): ... this new function.
7716
c642a434
UW
77172011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
7718
7719 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
7720 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
7721 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
7722 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
7723 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
7724 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
7725 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
7726 (srv_xmlfiles): Add new XML files.
7727
7728 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
7729 and <sys/uio.h>.
7730 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
7731 (init_registers_s390_linux32v1): Add prototype.
7732 (init_registers_s390_linux32v2): Likewise.
7733 (init_registers_s390_linux64v1): Likewise.
7734 (init_registers_s390_linux64v2): Likewise.
7735 (init_registers_s390x_linux64v1): Likewise.
7736 (init_registers_s390x_linux64v2): Likewise.
7737 (s390_num_regs): Increment to 52.
7738 (s390_regmap): Add orig_r2 register.
7739 (s390_num_regs_3264): Increment to 68.
7740 (s390_regmap_3264): Add orig_r2 register.
7741 (s390_collect_ptrace_register): Handle orig_r2 register.
7742 (s390_supply_ptrace_register): Likewise.
7743 (s390_fill_last_break): New function.
7744 (s390_store_last_break): Likewise.
7745 (s390_fill_system_call): New function.
7746 (s390_store_system_call): Likewise.
7747 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
7748 register sets.
7749 (s390_check_regset): New function.
7750 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
7751 NT_S390_SYSTEM_CALL regsets and use appropriate description.
7752 Update target_regsets for available register sets.
7753
2268b414
JK
77542011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
7755 Jan Kratochvil <jan.kratochvil@redhat.com>
7756
7757 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
7758 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
7759 New.
7760 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
7761 * linux-low.h (struct process_info_private): New member r_debug.
7762 * server.c (handle_qxfer_libraries): Call
7763 the_target->qxfer_libraries_svr4.
7764 (handle_qxfer_libraries_svr4): New function.
7765 (qxfer_packets): New entry "libraries-svr4".
7766 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
7767 * target.h (struct target_ops): New member qxfer_libraries_svr4.
7768 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
7769 PACKET_qXfer_libraries_svr4.
7770
d6db1fab
UW
77712011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
7772
7773 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
7774 PSW address/mask between 8-byte and 16-byte formats.
7775 (s390_supply_ptrace_register): Likewise.
7776 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
7777 basic addressing mode bit.
7778
242f5f1c
SS
77792011-11-24 Stan Shebs <stan@codesourcery.com>
7780
7781 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
7782
f196051f
SS
77832011-11-17 Stan Shebs <stan@codesourcery.com>
7784
7785 * tracepoint.c (struct tracepoint): New field traceframe_usage.
7786 (tracing_start_time): New global.
7787 (tracing_stop_time): New global.
7788 (tracing_user_name): New global.
7789 (tracing_notes): New global.
7790 (tracing_stop_note): New global.
7791 (cmd_qtstart): Set traceframe_usage, start_time.
7792 (stop_tracing): Set stop_time.
7793 (cmd_qtstatus): Report additional status.
7794 (cmd_qtp): New function.
7795 (handle_tracepoint_query): Call it.
7796 (cmd_qtnotes): New function.
7797 (handle_tracepoint_general_set): Call it.
7798 (get_timestamp): Rename from tsv_get_timestamp.
7799
405f8e94
SS
78002011-11-14 Stan Shebs <stan@codesourcery.com>
7801 Kwok Cheung Yeung <kcy@codesourcery.com>
7802
7803 * linux-x86-low.c (small_jump_insn): New.
7804 (i386_install_fast_tracepoint_jump_pad): Add arguments for
7805 trampoline and error message, build a trampoline and issue a small
7806 jump instruction to it.
7807 (x86_install_fast_tracepoint_jump_pad): Add arguments for
7808 trampoline and error message.
7809 (x86_get_min_fast_tracepoint_insn_len): New.
7810 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
7811 * linux-low.h (struct linux_target_ops): Add arguments to
7812 install_fast_tracepoint_jump_pad operation, add new operation.
7813 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
7814 arguments.
7815 (linux_get_min_fast_tracepoint_insn_len): New function.
7816 (linux_target_op): Add new operation.
7817 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
7818 (gdb_trampoline_buffer_end): Ditto.
7819 (gdb_trampoline_buffer_error): Ditto.
7820 (struct ipa_sym_addresses): Add fields for new IPA variables.
7821 (symbol_list): Add entries for new IPA variables.
7822 (struct tracepoint): Add fields to hold the address range of the
7823 trampoline used by the tracepoint.
7824 (trampoline_buffer_head): New static variable.
7825 (trampoline_buffer_tail): Ditto.
7826 (claim_trampoline_space): New function.
7827 (have_fast_tracepoint_trampoline_buffer): New function.
7828 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
7829 structure.
7830 (install_fast_tracepoint): Ditto, also add error buffer argument.
7831 (cmd_qtminftpilen): New function.
7832 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
7833 (fast_tracepoint_from_trampoline_address): New function.
7834 (fast_tracepoint_collecting): Handle trampoline as part of jump
7835 pad space.
7836 (set_trampoline_buffer_space): New function.
7837 (initialize_tracepoint): Initialize new IPA variables.
7838 * target.h (struct target_ops): Add arguments to
7839 install_fast_tracepoint_jump_pad operation, add new
7840 get_min_fast_tracepoint_insn_len operation.
7841 (target_get_min_fast_tracepoint_insn_len): New.
7842 (install_fast_tracepoint_jump_pad): Add arguments.
7843 * server.h (IPA_BUFSIZ): Define.
7844 * linux-i386-ipa.c: Include extra header files.
7845 (initialize_fast_tracepoint_trampoline_buffer): New function.
7846 (initialize_low_tracepoint): Call it.
7847 * server.h (set_trampoline_buffer_space): Declare.
7848 (claim_trampoline_space): Ditto.
7849 (have_fast_tracepoint_trampoline_buffer): Ditto.
7850
1e4d1764
YQ
78512011-11-14 Yao Qi <yao@codesourcery.com>
7852
7853 * server.c (handle_query): Handle InstallInTrace for qSupported.
7854 * tracepoint.c (add_tracepoint): Sort list.
7855 (install_tracepoint, download_tracepoint): New.
7856 (cmd_qtdp): Call them to install and download tracepoints.
7857 (sort_tracepoints): Removed.
7858 (cmd_qtstart): Update.
7859
5c73ff4e
YQ
78602011-11-14 Yao Qi <yao@codesourcery.com>
7861
7862 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
7863 * mem-break.h: Declare.
7864 * tracepoint.c (cmd_qtstart): Move some code to ...
7865 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
7866 New.
7867 (download_tracepoints): Move some code to ...
7868 (download_tracepoint_1): ... here. New.
7869
86a30030
YQ
78702011-11-08 Yao Qi <yao@codesourcery.com>
7871
7872 * remote-utils.c (relocate_instruction): A comment fix.
7873
8d26e50c
JB
78742011-11-07 Joel Brobecker <brobecker@adacore.com>
7875
7876 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
7877 (i386_dr_low_get_control, i386_dr_low_get_status): Use
7878 dr_status_mirror and dr_control_mirror from debug_reg_state.
7879 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
7880 (i386_initial_stuff): Remove use of deleted globals.
7881 (i386_get_thread_context, i386_set_thread_context,
7882 i386_thread_added): Use dr_status_mirror and dr_control_mirror
7883 from debug_reg_state.
7884
a59306a3
YQ
78852011-11-05 Yao Qi <yao@codesourcery.com>
7886
7887 * tracepoint.c (gdb_collect): Loop over tracepoints of same
7888 address as TPOINT's.
7889
3065dfb6
SS
78902011-11-02 Stan Shebs <stan@codesourcery.com>
7891
7892 * tracepoint.c (agent_mem_read_string): New function.
7893 (eval_agent_expr): Call it for tracenz.
7894 * server.c (handle_query): Report support for tracenz.
7895
fd0d8c7c
YQ
78962011-11-02 Yao Qi <yao@codesourcery.com>
7897
7898 * tracepoint.c (cmd_qtstart): Remove unused local variables.
7899
609086b1
YQ
79002011-11-02 Yao Qi <yao@codesourcery.com>
7901
7902 * target.h: Fix a typo in comment.
7903
b9fd1791
PA
79042011-10-31 Pedro Alves <pedro@codesourcery.com>
7905
7906 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
7907 clobber the breakpoints' shadows with fast tracepoint jumps.
7908 * mem-break.h (check_mem_write): Add `myaddr' parameter.
7909 * target.c (write_inferior_memory): Also pass MYADDR down to
7910 check_mem_write.
7911
03583c20
UW
79122011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
7913
7914 * configure.ac: Check support for personality routine.
7915 * configure: Regenerate.
7916 * config.in: Likewise.
7917 * linux-low.c: Include <sys/personality.h>.
7918 Define ADDR_NO_RANDOMIZE if necessary.
7919 (linux_create_inferior): Disable address space randomization when
7920 forking inferior, if requested.
7921 (linux_supports_disable_randomization): New function.
7922 (linux_target_ops): Install it.
7923 * server.h (disable_randomization): Declare.
7924 * server.c (disable_randomization): New global variable.
7925 (handle_general_set): Handle QDisableRandomization.
7926 (handle_query): Likewise for qSupported.
7927 (main): Support --disable-randomization and --no-disable-randomization
7928 command line arguments.
7929 * target.h (struct target_ops): Add supports_disable_randomization.
7930 (target_supports_disable_randomization): New macro.
7931
723b724b
MF
79322011-09-29 Mike Frysinger <vapier@gentoo.org>
7933
7934 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
7935 ifdef check.
7936 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
7937 [!PT_GETDSBT] (target_loadmap): New definition.
7938 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
7939 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
7940 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
7941 and PT_GETDSBT to LINUX_LOADMAP.
7942 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
7943 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
7944
55329a5c 79452011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
7946
7947 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
7948 (arm_linux_hwbp_cap): New static variable.
7949 (arm_linux_get_hwbp_cap): Replace by ...
7950 (arm_linux_init_hwbp_cap): ... this new function.
7951 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
7952 (arm_linux_get_hw_watchpoint_count): Likewise.
7953 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7954 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
7955 (arm_prepare_to_resume): Use perror_with_name instead of error.
7956
55329a5c 79572011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
7958
7959 * linux-arm-low.c: Include <signal.h>.
7960 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
7961 (struct arm_linux_hwbp_cap): New data type.
7962 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
7963 (struct arm_linux_hw_breakpoint): New data type.
7964 (MAX_BPTS, MAX_WPTS): Define.
7965 (struct arch_process_info, struct arch_lwp_info): New data types.
7966 (arm_linux_get_hwbp_cap): New function.
7967 (arm_linux_get_hw_breakpoint_count): Likewise.
7968 (arm_linux_get_hw_watchpoint_count): Likewise.
7969 (arm_linux_get_hw_watchpoint_max_length): Likewise.
7970 (arm_hwbp_control_initialize): Likewise.
7971 (arm_hwbp_control_is_enabled): Likewise.
7972 (arm_hwbp_control_is_initialized): Likewise.
7973 (arm_hwbp_control_disable): Likewise.
7974 (arm_linux_hw_breakpoint_equal): Likewise.
7975 (arm_linux_hw_point_initialize): Likewise.
7976 (struct update_registers_data): New data structure.
7977 (update_registers_callback: New function.
7978 (arm_insert_point): Likewise.
7979 (arm_remove_point): Likewise.
7980 (arm_stopped_by_watchpoint): Likewise.
7981 (arm_stopped_data_address): Likewise.
7982 (arm_new_process): Likewise.
7983 (arm_new_thread): Likewise.
7984 (arm_prepare_to_resume): Likewise.
7985 (the_low_target): Register arm_insert_point, arm_remove_point,
7986 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
7987 arm_new_thread, and arm_prepare_to_resume.
7988
6b9801d4
SS
79892011-09-15 Stan Shebs <stan@codesourcery.com>
7990
7991 * server.h (struct emit_ops): Add compare-goto fields.
7992 * tracepoint.c (gdb_agent_op_sizes): New table.
7993 (emit_eq_goto): New function.
7994 (emit_ne_goto): New function.
7995 (emit_lt_goto): New function.
7996 (emit_le_goto): New function.
7997 (emit_gt_goto): New function.
7998 (emit_ge_goto): New function.
7999 (is_goto_target): New function.
8000 (compile_bytecodes): Recognize special cases of compare-goto
8001 combinations and call specialized emitters for them.
8002 * linux-x86-low.c (amd64_emit_eq_goto): New function.
8003 (amd64_emit_ne_goto): New function.
8004 (amd64_emit_lt_goto): New function.
8005 (amd64_emit_le_goto): New function.
8006 (amd64_emit_gt_goto): New function.
8007 (amd64_emit_ge_goto): New function.
8008 (amd64_emit_ops): Add the new functions.
8009 (i386_emit_eq_goto): New function.
8010 (i386_emit_ne_goto): New function.
8011 (i386_emit_lt_goto): New function.
8012 (i386_emit_le_goto): New function.
8013 (i386_emit_gt_goto): New function.
8014 (i386_emit_ge_goto): New function.
8015 (i386_emit_ops): Add the new functions.
8016
bf15cbda
SS
80172011-09-08 Stan Shebs <stan@codesourcery.com>
8018
8019 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
8020 (i386_emit_epilogue): Restore %ebx.
8021
943ca1dd
JZ
80222011-08-31 Jie Zhang <jzhang918@gmail.com>
8023
8024 * server.c (step_thread): Remove definition.
8025 (process_serial_event): Don't handle Hs.
8026 * server.h (step_thread): Remove declaration.
8027 * target.c (set_desired_inferior): Remove use of step_thread.
8028
e3deef73
LM
80292011-08-24 Luis Machado <lgustavo@codesourcery.com>
8030
8031 * linux-low.c: Include linux-procfs.h.
8032 (linux_attach_lwp_1): Update comments.
8033 (linux_attach): Scan for existing threads when attaching to a
8034 process that is the tgid.
8035 * Makefile.in: Update dependencies.
8036
13da1c97
LM
80372011-08-24 Luis Machado <lgustavo@codesourcery.com>
8038
8039 * configure.srv: Add linux-procfs.o dependencies.
8040
881127c9
YQ
80412011-08-14 Yao Qi <yao@codesourcery.com>
8042
8043 * target.h (struct target_ops): Fix indent.
8044 * win32-low.c (win32_target_ops): Fix comment.
8045
58dbd541
YQ
80462011-08-14 Andrew Jenner <andrew@codesourcery.com>
8047 Yao Qi <yao@codesourcery.com>
8048
8049 * Makefile.in (clean): Remove tic6x-*.c files.
8050 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
8051 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
8052 (tic6x-c64xp-linux.c): Likewise.
8053 * configure.srv: Add support for tic6x-*-uclinux.
8054 * linux-tic6x-low.c: New.
8055 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
8056
78d85199
YQ
80572011-08-14 Andrew Stubbs <ams@codesourcery.com>
8058 Yao Qi <yao@codesourcery.com>
8059
8060 * target.h (struct target_ops): Add read_loadmap.
8061 * linux-low.c (struct target_loadseg): New type.
8062 (struct target_loadmap): New type.
8063 (linux_read_loadmap): New function.
8064 (linux_target_ops): Add linux_read_loadmap.
8065 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
8066 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
8067 to NULL.
78d85199 8068
a959a88d
EZ
80692011-08-05 Eli Zaretskii <eliz@gnu.org>
8070
8071 * win32-low.c: Include <stdint.h>.
8072
1ced966e
PA
80732011-07-22 Pedro Alves <pedro@codesourcery.com>
8074
8075 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
8076 to the inferior here.
8077 (i386_remove_aligned_watchpoint): Ditto.
8078 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
8079 fit part of the watchpoint in the debug registers.
8080 (i386_update_inferior_debug_regs): New.
8081 (i386_low_insert_watchpoint): Work on a local mirror of the debug
8082 registers, and only update the inferior on success.
8083 (i386_low_remove_watchpoint): Ditto.
8084
d26e3629
KY
80852011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
8086
8087 * linux-low.c (compare_ints, unique, list_threads, show_process,
8088 linux_core_of_thread): Delete.
8089 (linux_target_ops): Change linux_core_of_thread to
8090 linux_common_core_of_thread.
8091 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
8092 * utils.c (malloc_failure): Change type of argument.
8093 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
8094 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
8095 common/linux-osdata.c, common/ptid.c and common/buffer.c.
8096 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
8097 (IPA_OBJS): Add common-utils-ipa.o.
8098 (ptid_h, linux_osdata_h): New macros.
8099 (server_h): Add common/common-utils.h, common/xml-utils.h,
8100 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
8101 common/ptid.h.
8102 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
8103 ptid.o, buffer.o): New rules.
8104 (linux-low.o): Add common/linux-osdata.h as a dependency.
8105 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
8106 * configure.ac: Add AC_HEADER_DIRENT check.
8107 * config.in: Regenerate.
8108 * configure: Regenerate.
8109 * remote-utils.c (xml_escape_text): Delete.
8110 (buffer_grow, buffer_free, buffer_init, buffer_finish,
8111 buffer_xml_printf): Move to common/buffer.c.
8112 * server.c (main): Remove call to initialize_inferiors.
8113 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
8114 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
8115 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
8116 internal_error, gdb_assert, gdb_assert_fail): Delete.
8117 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
8118 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
8119 common/buffer.h.
8120 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
8121 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
8122 initialize_inferiors): Delete.
8123
2275a1a7
PA
81242011-07-20 Pedro Alves <pedro@codesourcery.com>
8125
8126 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
8127 symbol error.
8128
0a5b1e09
PA
81292011-05-31 Pedro Alves <pedro@codesourcery.com>
8130
8131 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
8132 assertion.
8133 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
8134
6938fd34
YQ
81352011-05-26 Yao Qi <yao@codesourcery.com>
8136
8137 * Makefile.in (thread-db.o): Track dependence to
8138 common/gdb_thread_db.h.
8139 * thread-db.c: include gdb_thread_db.h from right place.
8140
b481f9e0
TT
81412011-05-16 Adrian Cornish <gnu@bluedreamer.com>
8142
8143 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
8144 __FILE__ and __LINE__ to internal_error.
8145
98a5dd13
DE
81462011-05-13 Doug Evans <dje@google.com>
8147
8148 * thread-db.c (try_thread_db_load_from_sdir): New function.
8149 (try_thread_db_load_from_dir): New function.
8150 (thread_db_load_search): Handle $sdir, ignore $pdir.
8151 Remove trying of system directories if search of
8152 libthread-db-search-path fails, that is now done via $sdir.
8153
d248b706
KY
81542011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
8155
8156 * server.c (handle_query): Add EnableDisableTracepoints to the list
8157 of supported features.
43aaf8b6 8158 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 8159 tracepoints.
43aaf8b6
PA
8160 (cmd_qtenable_disable): New.
8161 (cmd_qtstart): Install tracepoints even if disabled.
8162 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
8163 receiving a QTEnable or QTDisable packet.
8164 (gdb_collect): Skip data collection if fast tracepoint is disabled.
8165 (ust_marker_to_static_tracepoint): Do not ignore disabled static
8166 tracepoints.
8167 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 8168
84e578fb
DE
81692011-05-10 Doug Evans <dje@google.com>
8170
8171 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
8172
71f55dd8
DE
81732011-05-04 Doug Evans <dje@google.com>
8174
8175 * linux-low.c (linux_join): Skip process lookup.
8176 * spu-low.c (spu_join): Ditto.
8177 * server.c (join_inferiors_callback): Delete.
8178 (process_serial_event): For 'D' packet (detach) call join_inferior
8179 directly.
8180
4d393d60
JM
81812011-05-04 Joseph Myers <joseph@codesourcery.com>
8182
8183 * README: Don't mention xscale*-*-linux*.
8184 * configure.srv (xscale*-*-linux*): Don't handle target.
8185
b00ad6ff
NF
81862011-04-27 Nathan Froyd <froydnj@codesourcery.com>
8187
8188 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
8189 casting pointers.
8190 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
8191 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
8192 (i386_emit_void_call_2): Likewise.
8193
af96c192
YQ
81942011-04-26 Yao Qi <yao@codesourcery.com>
8195
43aaf8b6
PA
8196 * linux-low.c: Move common macros to linux-ptrace.h.
8197 Include linux-ptrace.h.
af96c192
YQ
8198 * Makefile.in (linux_ptrace_h): New.
8199 (linux-low.o): Depends on linux-ptrace.h.
8200
03f2bd59
JK
82012011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
8202
8203 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
8204 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
8205 (remote_prepare): New function with most of the TCP code from ...
8206 (remote_open): ... here. Detect PORT here unconditionally. Move also
8207 setting transport_is_reliable.
8208 * server.c (run_once): New variable.
8209 (gdbserver_usage): Document it.
8210 (main): Set run_once for `--once'. Call remote_prepare. Exit after
8211 the first run if RUN_ONCE.
8212 * server.h (run_once, remote_prepare): New declarations.
8213
7a9dd1b2
TT
82142011-04-19 Tom Tromey <tromey@redhat.com>
8215
8216 * win32-low.c (handle_load_dll): Remove duplicate "the".
8217
81239425
PM
82182011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
8219
8220 Remove support for old Cygwin 1.5 versions.
8221 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
8222 function to avoid warning.
8223 (win32_add_one_solib): Use cygwin_conv_path function to avoid
8224 warning.
8225
9e0627f1
PM
82262011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
8227
8228 * gdbserver/server.h (Macro _): Define it if not available.
8229
588eebee
MS
82302011-03-14 Michael Snyder <msnyder@vmware.com>
8231
348af9f7 8232 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 8233
43f70d4c
JB
82342011-03-10 Joel Brobecker <brobecker@adacore.com>
8235
8236 * Makefile.in (maintainer-clean realclean distclean): Remove
8237 "make ... subdir_do" command.
8238
348af9f7
MS
82392011-03-10 Michael Snyder <msnyder@vmware.com>
8240
8241 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
8242
8243 * server.c (handle_v_run): Free alloced buffer on early return.
8244
e637a4f5
YQ
82452011-03-09 Yao Qi <yao@codesourcery.com>
8246
8247 Revert:
8248 2011-03-04 Yao Qi <yao@codesourcery.com>
8249
8250 * Makefile.in: Remove GNU make feature --directory.
8251
8252 2011-03-05 Yao Qi <yao@codesourcery.com>
8253
8254 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8255 (subdir_do): New make target. Copied from gdb/Makefile.
8256 (maintainer-clean, realclean, distclean, clean): Call corresponding
8257 make targets in common/Makefile.
8258
8259 2011-02-11 Yao Qi <yao@codesourcery.com>
8260
8261 * configure.ac: Call AC_PROG_RANLIB.
8262 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8263 * configure: Regenerate.
8264
e6edda56
JK
82652011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
8266
8267 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
8268
e5141119
JB
82692011-03-06 Yao Qi <yao@codesourcery.com>
8270
8271 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
8272
64794aa4
JB
82732011-03-05 Yao Qi <yao@codesourcery.com>
8274
8275 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
8276 (subdir_do): New make target. Copied from gdb/Makefile.
8277 (maintainer-clean, realclean, distclean, clean): Call corresponding
8278 make targets in common/Makefile.
8279
7a762829
YQ
82802011-03-04 Yao Qi <yao@codesourcery.com>
8281
8282 * Makefile.in: Remove GNU make feature --directory.
8283
348af9f7
MS
82842011-03-04 Michael Snyder <msnyder@vmware.com>
8285
8286 * server.c (queue_stop_reply): Call xmalloc not malloc.
8287
82882011-03-02 Michael Snyder <msnyder@vmware.com>
8289
8290 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
8291
9f72fee2
MS
82922011-02-28 Michael Snyder <msnyder@vmware.com>
8293
588eebee
MS
8294 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
8295 (cmd_qtframe): Ditto.
8296 (cmd_qtbuffer): Ditto.
8297 (cmd_bigqtbuffer): Ditto.
8298
9f72fee2
MS
8299 * utils.c (decimal2str): Initialize 'width' to nine, then
8300 don't mess with it.
8301
8040bd49
UW
83022011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
8303
8304 * hostio.c (require_data): Free *data, not data.
8305
7e52cbd0
JK
83062011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8307
8308 * hostio.c (require_data): Use free, not xfree.
8309
9130f83e
MS
83102011-02-27 Michael Snyder <msnyder@vmware.com>
8311
4b812f4e
MS
8312 * server.c (handle_query): Discard unused value.
8313
9130f83e
MS
8314 * hostio.c (require_data): Free malloc memory before returning
8315 error.
8316
69d37113
MS
83172011-02-26 Michael Snyder <msnyder@vmware.com>
8318
8319 * linux-low.c (list_threads): Call closedir for dirent.
8320
35f5825a
MS
83212011-02-27 Michael Snyder <msnyder@vmware.com>
8322
2a589cef
MS
8323 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
8324 a case statement falls through.
8325
0adea5f7
MS
8326 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
8327
35f5825a
MS
8328 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
8329 in comparison.
8330
238f1c74
MS
83312011-02-26 Michael Snyder <msnyder@vmware.com>
8332
8333 * utils.c (decimal2str): Eliminate dead code and dead param.
8334 (pulongest): Drop dead param from call to decimal2str.
8335 (plongest): Ditto.
8336
633ff500
JB
83372011-02-24 Joel Brobecker <brobecker@adacore.com>
8338
8339 Revert the following patch (not approved yet):
8340 2011-02-21 Hui Zhu <teawater@gmail.com>
8341 * tracepoint.c (tp_printf): New function.
8342 (eval_agent_expr): Handle gdb_agent_op_printf.
8343
f9c6ff72
HZ
83442011-02-21 Hui Zhu <teawater@gmail.com>
8345
8346 * tracepoint.c (tp_printf): New function.
8347 (eval_agent_expr): Handle gdb_agent_op_printf.
8348
94d5e490
TT
83492011-02-18 Tom Tromey <tromey@redhat.com>
8350
8351 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
8352 (tracepoint.o): Likewise.
8353 * tracepoint.c (enum gdb_agent_op): Use ax.def.
8354 (gdb_agent_op_names): Likewise.
8355
c7f96d2b
TT
83562011-02-18 Tom Tromey <tromey@redhat.com>
8357
8358 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
8359 gdb_agent_op_rot>: New constants.
8360 (gdb_agent_op_names): Add pick and roll.
8361 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
8362 cases.
8363
0feedb2c
JK
83642011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
8365
8366 * aclocal.m4: Regenerated with aclocal-1.11.1.
8367
b3b9301e
PA
83682011-02-14 Pedro Alves <pedro@codesourcery.com>
8369
8370 * server.c (handle_qxfer_traceframe_info): New.
8371 (qxfer_packets): Register "traceframe-info".
8372 (handle_query): Report support for qXfer:traceframe-info:read+.
8373 * tracepoint.c (match_blocktype): New.
8374 (traceframe_find_block_type): Rename to ...
8375 (traceframe_walk_blocks): ... this. Add callback filter argument,
8376 and use it.
8377 (traceframe_find_block_type): New, reimplemented on top of
8378 traceframe_walk_blocks.
8379 (build_traceframe_info_xml): New.
8380 (traceframe_read_info): New.
8381 * server.h (traceframe_read_info): Declare.
8382
4f3e6fb7
YQ
83832011-02-11 Yao Qi <yao@codesourcery.com>
8384
8385 * configure.ac: Call AC_PROG_RANLIB.
8386 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
8387 * configure: Regenerate.
8388
764880b7
PA
83892011-02-07 Pedro Alves <pedro@codesourcery.com>
8390
8391 * server.c (gdb_read_memory): Change return semantics to allow
8392 partial transfers.
8393 (handle_search_memory_1): Adjust.
8394 (process_serial_event) <'m' packet>: Handle partial transfers.
8395 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
8396
1c79eb8a
PA
83972011-01-28 Pedro Alves <pedro@codesourcery.com>
8398
8399 * regcache.c (init_register_cache): Initialize
8400 regcache->register_status.
8401 (free_register_cache): Release regcache->register_status.
8402 (regcache_cpy): Copy register_status.
8403 (registers_to_string): Print 'x's for unavailable registers.
8404 (supply_register): Mark the register's status valid or
8405 unavailable, depending on whether a buffer was passed in or not.
8406 (supply_register_zeroed): New.
8407 (supply_regblock): Mark the registers' status valid or
8408 unavailable, depending on whether a buffer was passed in or not.
8409 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
8410 (struct regcache): New `register_status' field.
8411 (supply_register_zeroed): Declare.
8412 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
8413 supply_register_zeroed, rather than passing a NULL buffer to
8414 supply_register.
8415 * tracepoint.c (fetch_traceframe_registers): Update comment.
8416
85724a0e
PA
84172011-01-28 Pedro Alves <pedro@codesourcery.com>
8418
8419 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
8420 buffer explicit.
8421
d08aafef
PA
84222011-01-25 Pedro Alves <pedro@codesourcery.com>
8423
8424 * server.h (decode_xfer_write): Change prototype.
8425 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
8426 and don't extract the annex here.
8427 * server.c (decode_xfer_read): Remove `annex' parameter,
8428 and don't extract the annex here.
8429 (decode_xfer): New.
8430 (struct qxfer): New.
8431 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
8432 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
8433 (handle_qxfer_statictrace): New functions, abstracted out from
8434 handle_query, and made to use the struct qxfer interface.
8435 (handle_threads_qxfer_proper): Rename to ...
8436 (handle_qxfer_threads_proper): ... this.
8437 (handle_threads_qxfer): Rename to ...
8438 (handle_qxfer_threads): ... this. Adjust.
8439 (qxfer_packets): New array.
8440 (handle_qxfer): New function.
8441 (handle_query): Use handle_qxfer.
8442
493e2a69
MS
84432011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
8444
8445 * gdbreplay.c: Shorten lines of >= 80 columns.
8446 * linux-low.c: Ditto.
8447 * linux-ppc-low.c: Ditto.
8448 * linux-s390-low.c: Ditto.
8449 * linux-sparc-low.c: Ditto.
8450 * linux-x86-low.c: Ditto.
8451 * linux-xtensa-low.c: Ditto.
8452 * mem-break.c: Ditto.
8453 * nto-low.c: Ditto.
8454 * regcache.h: Ditto.
8455 * remote-utils.c: Ditto.
8456 * server.c: Ditto.
8457 * server.h: Ditto.
8458 * thread-db.c: Ditto.
8459 * tracepoint.c: Ditto.
8460 * utils.c: Ditto.
8461 * win32-low.h: Ditto.
8462
44944448
JB
84632011-01-05 Joel Brobecker <brobecker@adacore.com>
8464
8465 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
8466 update.
8467
71ce852c
JB
84682011-01-01 Joel Brobecker <brobecker@adacore.com>
8469
8470 * server.c (gdbserver_version): Update copyright year in version
8471 output.
8472 * gdbreplay.c (gdbreplay_version): Ditto.
8473
eb826dc6
MF
84742010-12-29 Jie Zhang <jie.zhang@analog.com>
8475
8476 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
8477 * linux-bfin-low.c: New file.
8478 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
8479 PT_DATA_ADDR for BFIN targets.
8480 * Makefile.in (SFILES): Add linux-bfin-low.c.
8481 (clean): Remove reg-bfin.c.
8482 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
8483 * README: Mention supported Blackfin targets.
8484
39ab222a
MF
84852010-12-23 Mike Frysinger <vapier@gentoo.org>
8486
8487 * .gitignore: New file.
8488
a1f2ce7d
MF
84892010-11-16 Mike Frysinger <vapier@gentoo.org>
8490
8491 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
8492
f474844c
JZ
84932010-10-22 Jie Zhang <jie@codesourcery.com>
8494
8495 * Makefile.in: Add FLAGS_TO_PASS variable.
8496 (install): Remove dependency of install-only and recursively
8497 invoke make for install-only.
8498
f1048712
DE
84992010-10-04 Doug Evans <dje@google.com>
8500
8501 * Makefile.in (uninstall): Use $(DESTDIR).
8502
b53a1623
PA
85032010-09-24 Pedro Alves <pedro@codesourcery.com>
8504
e6ee044d
PA
8505 PR gdb/11842
8506
b53a1623
PA
8507 * linux-x86-low.c (compat_siginfo_from_siginfo)
8508 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
8509 si_code is < 0. Check for si_code == SI_TIMER before checking for
8510 si_code < 0.
8511
fa1bd1e4
JB
85122010-09-13 Joel Brobecker <brobecker@adacore.com>
8513
8514 * lynx-i386-low.c: New file.
8515 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
8516
47fac8f8
JB
85172010-09-13 Joel Brobecker <brobecker@adacore.com>
8518
8519 * lynx-low.c (ptrace_request_to_str): Remove handling for
8520 request values that have been removed in LynxOS 5.x.
8521
1adfc54d
JB
85222010-09-13 Joel Brobecker <brobecker@adacore.com>
8523
8524 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
8525 <ptrace.h>
8526
c2a66c29
NS
85272010-09-09 Nathan Sidwell <nathan@codesourcery.com>
8528
8529 * configure.ac: Add --enable-inprocess-agent option.
8530 * configure: Rebuilt.
8531
32fcada3
YQ
85322010-09-06 Yao Qi <yao@codesourcery.com>
8533
8534 * linux-low.c (linux_kill): Remove unused variable.
8535 (linux_stabilize_threads): Likewise.
8536 * server.c (start_inferior): Likewise.
8537 (queue_stop_reply_callback): Likewise.
8538 * tracepoint.c (do_action_at_tracepoint): Likewise.
8539
0cccb683
YQ
85402010-09-06 Yao Qi <yao@codesourcery.com>
8541
8542 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
8543 on return.
8544
423ec54c
JK
85452010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
8546
8547 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
8548
12ac6819
PA
85492010-09-06 Pedro Alves <pedro@codesourcery.com>
8550
8551 * Makefile.in (install-only): Replace $IPA_DEPFILES with
8552 "$(IPA_DEPFILES)".
8553
8ed54b31
JB
85542010-09-01 Joel Brobecker <brobecker@adacore.com>
8555
8556 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
8557 gdbserver/lynx-ppc-low.c: New files.
8558 * Makefile.in (lynx_low_h): New variable.
8559 (lynx-low.o, lynx-ppc-low.o): New rules.
8560 * configure.ac: On LynxOS, link with -lnetinet.
8561 * configure.srv: Add handling of powerpc-*-lynxos* targets.
8562 * configure: regenerate.
8563
bb0116a4
JB
85642010-09-01 Joel Brobecker <brobecker@adacore.com>
8565
8566 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
8567 * configure.ac: Add check for vasprintf and vsnprintf.
8568 * configure, config.in: Regenerate.
8569 * server.h (vasprintf, vsnprintf): Add conditional declarations.
8570
a778ab81 85712010-09-01 Joel Brobecker <brobecker@adacore.com>
8572
8573 * gdbreplay.c: Move include of alloca.h up, next to include of
8574 malloc.h.
8575 * server.h: Add include of malloc.h.
8576 * mem-break.c: Remove include of malloc.h.
8577 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
8578
8b034a19 85792010-09-01 Joel Brobecker <brobecker@adacore.com>
8580
8581 * Makefile.in (memmem.o): Build with -Wno-error.
8582
85832010-09-01 Joel Brobecker <brobecker@adacore.com>
8584
8585 * utils.c (xsnprintf): Make non-static.
8586 * server.h: Add xsnprintf declaration.
8587 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
8588 replace calls to snprintf by calls to xsnprintf throughout.
8589
85902010-09-01 Joel Brobecker <brobecker@adacore.com>
8591
8592 * configure.ac: Add configure check for alloca.
8593 * configure, config.in: Regenerate.
8594 * server.h: Include alloca.h if it exists.
8595 * gdbreplay.c: Include alloca.h if it exists.
8596
1a981360
PA
85972010-08-28 Pedro Alves <pedro@codesourcery.com>
8598
8599 * linux-low.c (__SIGRTMIN): Define if not already defined.
8600 (linux_create_inferior): Check for __ANDROID__ rather than
8601 __SIGRTMIN.
8602 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
8603 are already deferred.
8604 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
8605 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
8606 stopped and already has a pending signal to report.
8607 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
8608 a pending signal to report or is moving out of a jump pad.
8609 (linux_init_signals): Check for __ANDROID__ rather than
8610 __SIGRTMIN.
8611
b4d51a55
PA
86122010-08-28 Pedro Alves <pedro@codesourcery.com>
8613
8614 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
8615 debug_threads check. Avoid a linear search when not doing debug
8616 output.
8617
ec48365d
PA
86182010-08-27 Pedro Alves <pedro@codesourcery.com>
8619
8620 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
8621 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
8622 (struct file_handler) <fd>: Change type to gdb_fildes_t.
8623 (process_event): Change local fd's type to gdb_fildes_t.
8624 (create_file_handler): Adjust prototype.
8625 (delete_file_handler): Adjust prototype.
8626 (handle_file_event): Adjust prototype. Use pfildes.
8627 (create_file_event): Adjsut prototype.
8628 * remote-utils.c (remote_desc, listen_desc): Change type to
8629 gdb_fildes_t.
8630 * server.h: New gdb_fildes_t typedef.
8631 [USE_WIN32API]: Include winsock2.h.
8632 (delete_file_handler, add_file_handler): Adjust prototypes.
8633 (pfildes): Declare.
8634 * utils.c (pfildes): New.
8635
854d88f0
PA
86362010-08-27 Pedro Alves <pedro@codesourcery.com>
8637
8638 * configure.ac (build_warnings): Add -Wno-char-subscripts.
8639 * configure: Regenerate.
8640
0146f85b
PA
86412010-08-27 Pedro Alves <pedro@codesourcery.com>
8642
8643 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
8644 (linux_done_accessing_memory): ... this.
8645 (linux_target_ops): Adjust.
8646 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
8647 * nto-low.c (nto_target_ops): Adjust comment.
8648 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
8649 * spu-low.c (spu_target_ops): Adjust comment.
8650 * target.h (target_ops): Rename unprepare_to_access_memory field
8651 to done_accessing_memory.
8652 (unprepare_to_access_memory): Rename to ...
8653 (done_accessing_memory): ... this.
8654
90d74c30
PA
86552010-08-26 Pedro Alves <pedro@codesourcery.com>
8656
8657 * linux-low.c (linux_prepare_to_access_memory): New.
8658 (linux_unprepare_to_access_memory): New.
8659 (linux_target_ops): Install them.
8660 * server.c (read_memory): Rename to ...
8661 (gdb_read_memory): ... this. Use
8662 prepare_to_access_memory/prepare_to_access_memory.
8663 (write_memory): Rename to ...
8664 (gdb_write_memory): ... this. Use
8665 prepare_to_access_memory/prepare_to_access_memory.
8666 (handle_search_memory_1): Adjust.
8667 (process_serial_event): Adjust.
8668 * target.h (struct target_ops): New fields
8669 prepare_to_access_memory and unprepare_to_access_memory.
8670 (prepare_to_access_memory, unprepare_to_access_memory): New.
8671 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
8672 prepare_to_access_memory/prepare_to_access_memory.
8673 * nto-low.c (nto_target_ops): Adjust.
8674 * spu-low.c (spu_target_ops): Adjust.
8675 * win32-low.c (win32_target_ops): Adjust.
8676
fd467969
PA
86772010-08-26 Pedro Alves <pedro@codesourcery.com>
8678
8679 * Makefile.in (WARN_CFLAGS): Get it from configure.
8680 (WERROR_CFLAGS): New.
8681 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
8682 * configure.ac: Introduce --enable-werror, which adds -Werror to
8683 the compiler command line. Enabled by default. Disable with
8684 --disable-werror. Add -Wdeclaration-after-statement
8685 Wpointer-arith and -Wformat-nonliteral to warning flags.
8686 * configure: Regenerate.
8687
331e2f5f
PA
86882010-08-26 Pedro Alves <pedro@codesourcery.com>
8689
8690 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
8691
e581f2b4
PA
86922010-08-26 Pedro Alves <pedro@codesourcery.com>
8693
8694 * gdbreplay.c (remote_error): New.
8695 (gdbchar): New.
8696 (expect): Use gdbchar. Check for error reading from GDB.
8697 Clarify sync error output.
8698 (play): Check for errors writing to GDB.
8699 * linux-low.c (sigchld_handler): Really ignore `write' errors.
8700 * remote-utils.c (getpkt): Check for errors writing to the remote
8701 descriptor.
8702
3c11dd79
PA
87032010-08-25 Pedro Alves <pedro@codesourcery.com>
8704
8705 * linux-low.c (linux_wait_1): Move non-debugging code out of
8706 `debug_threads' control.
8707
d20a8ad9
PA
87082010-08-25 Pedro Alves <pedro@codesourcery.com>
8709
8710 * linux-low.c (linux_wait_1): Don't set last_status here.
8711 * server.c (push_event, queue_stop_reply_callback): Assert we're
8712 not pushing a TARGET_WAITKIND_IGNORE event.
8713 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
8714 (myresume, handle_target_event): Set the thread's last_resume_kind
8715 and last_status from the target returned status.
8716
964e4306
PA
87172010-08-25 Pedro Alves <pedro@codesourcery.com>
8718
8719 PR threads/10729
8720
8721 * linux-x86-low.c (update_debug_registers_callback): New.
8722 (i386_dr_low_set_addr): Use it.
8723 (i386_dr_low_get_addr): New.
8724 (i386_dr_low_set_control): Use update_debug_registers_callback.
8725 (i386_dr_low_get_control): New.
8726 (i386_dr_low_get_status): Adjust.
8727 * linux-low.c (linux_stop_lwp): New.
8728 * linux-low.h (linux_stop_lwp): Declare.
8729
8730 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
8731 argument instead of a i386_debug_reg_state.
8732 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
8733 a i386_debug_reg_state.
8734 (i386_insert_aligned_watchpoint): Adjust.
8735 (i386_remove_aligned_watchpoint): Adjust.
8736 (i386_low_stopped_data_address): Read the debug registers from the
8737 inferior instead of from the mirrors.
8738 * i386-low.h (struct i386_debug_reg_state): Extend comment.
8739 (i386_dr_low_get_addr): Declare.
8740 (i386_dr_low_get_control): Declare.
8741 (i386_dr_low_get_status): Change prototype.
8742
8743 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
8744 (i386_dr_low_get_addr): New.
8745 (i386_dr_low_get_control): New.
8746 (i386_dr_low_get_status): Adjust prototype. Return
8747 dr_status_mirror.
8748 (i386_initial_stuff): Clear dr_status_mirror and
8749 dr_control_mirror.
8750 (i386_get_thread_context): Adjust.
8751 (i386_set_thread_context): Adjust.
8752 (i386_thread_added): Adjust.
8753
5f21a75b
PA
87542010-08-24 Pedro Alves <pedro@codesourcery.com>
8755
8756 * linux-low.h (linux_thread_area): Delete declaration.
8757
3e4c1235
TS
87582010-08-11 Thomas Schwinge <thomas@codesourcery.com>
8759
8760 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
8761 after its termination.
8762
1971b033
PA
87632010-08-09 Pedro Alves <pedro@codesourcery.com>
8764
8765 * linux-low.c (gdb_wants_lwp_stopped): Delete.
8766 (gdb_wants_all_stopped): Delete.
8767 (linux_wait_1): Don't call them.
8768 * server.c (handle_v_cont): Tag all threads as want-stopped.
8769 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
8770 stopped as "client-wants-stopped".
8771
310444ac
PA
87722010-07-31 Pedro Alves <pedro@codesourcery.com>
8773
8774 * Makefile.in (signals_h): New.
8775 (server_h): Depend on it.
8776 (server.o): Don't depend on $(signals_def).
8777 (signals.o): Depend on $(signals_def).
8778
a19cae16
JK
87792010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
8780
8781 * Makefile.in (signals_def): New.
8782 (server_h): Append include/gdb/signals.h and signals_def.
8783 (server.o): Append signals_def.
8784
30d50328
JK
87852010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
8786
8787 * server.c (handle_target_event): Use target_signal_to_host for
8788 resume_info.sig initialization.
8789 * target.h (struct thread_resume) <sig>: New comment.
8790
5c3216e2
OS
87912010-07-20 Ozkan Sezer <sezeroz@gmail.com>
8792
c6f46ca0
OS
8793 * server.c (handle_query): strcpy() the returned string from paddress()
8794 instead of sprintf().
5c3216e2
OS
8795 * utils.c (paddress): Return phex_nz().
8796
6bd31874
JB
87972010-07-07 Joel Brobecker <brobecker@adacore.com>
8798
8799 * server.c (handle_v_cont): Call mourn_inferior if process
8800 just exited.
8801 (myresume): Likewise.
8802
0fb4aa4b
PA
88032010-07-01 Pedro Alves <pedro@codesourcery.com>
8804
8805 Static tracepoints, and integration with UST.
8806
8807 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
8808 * mem-break.c (uninsert_all_breakpoints)
8809 (reinsert_all_breakpoints): New.
8810 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
8811 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
8812 (gdb_agent_ust_loaded, helper_thread_id)
8813 (gdb_agent_helper_thread_id): New macros.
8814 (struct ipa_sym_addresses): Add addr_ust_loaded,
8815 addr_helper_thread_id, addr_cmd_buf.
8816 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
8817 (in_process_agent_loaded_ust): New.
8818 (write_e_ust_not_loaded): New.
8819 (maybe_write_ipa_ust_not_loaded): New.
8820 (struct collect_static_trace_data_action): New.
8821 (enum tracepoint_type) <static_tracepoint>: New.
8822 (struct tracepoint) <handle>: Mention static tracepoints.
8823 (struct static_tracepoint_ctx): New.
8824 (CMD_BUF_SIZE): New.
8825 (add_tracepoint_action): Handle static tracepoint actions.
8826 (unprobe_marker_at): New.
8827 (clear_installed_tracepoints): Handle static tracepoints.
8828 (cmd_qtdp): Handle static tracepoints.
8829 (probe_marker_at): New.
8830 (cmd_qtstart): Handle static tracepoints.
8831 (response_tracepoint): Handle static tracepoints.
8832 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
8833 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
8834 (get_context_regcache): Handle static tracepoints.
8835 (do_action_at_tracepoint): Handle static tracepoint actions.
8836 (traceframe_find_block_type): Handle static trace data blocks.
8837 (traceframe_read_sdata): New.
8838 (download_tracepoints): Download static tracepoint actions.
8839 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
8840 (GDB_PROBE_NAME): New.
8841 (ust_ops): New.
8842 (GET_UST_SYM): New.
8843 (USTF): New.
8844 (dlsym_ust): New.
8845 (ust_marker_to_static_tracepoint): New.
8846 (gdb_probe): New.
8847 (collect_ust_data_at_tracepoint): New.
8848 (gdb_ust_probe): New.
8849 (UNIX_PATH_MAX, SOCK_DIR): New.
8850 (gdb_ust_connect_sync_socket): New.
8851 (resume_thread, stop_thread): New.
8852 (run_inferior_command): New.
8853 (init_named_socket): New.
8854 (gdb_ust_socket_init): New.
8855 (cstr_to_hexstr): New.
8856 (next_st): New.
8857 (first_marker, next_marker): New.
8858 (response_ust_marker): New.
8859 (cmd_qtfstm, cmd_qtsstm): New.
8860 (unprobe_marker_at, probe_marker_at): New.
8861 (cmd_qtstmat, gdb_ust_thread): New.
8862 (gdb_ust_init): New.
8863 (initialize_tracepoint_ftlib): Call gdb_ust_init.
8864 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
8865 (ST_REGENTRY): New.
8866 (x86_64_st_collect_regmap): New.
8867 (X86_64_NUM_ST_COLLECT_GREGS): New.
8868 (AMD64_RIP_REGNUM): New.
8869 (supply_static_tracepoint_registers): New.
8870 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
8871 (ST_REGENTRY): New.
8872 (i386_st_collect_regmap): New.
8873 (i386_NUM_ST_COLLECT_GREGS): New.
8874 (supply_static_tracepoint_registers): New.
8875 * server.c (handle_query): Handle qXfer:statictrace:read.
8876 <qSupported>: Report support for StaticTracepoints, and
8877 qXfer:statictrace:read features.
8878 * server.h (traceframe_read_sdata)
8879 (supply_static_tracepoint_registers): Declare.
8880 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
8881 (unpack_varlen_hex): Include in IPA build.
8882 * Makefile.in (ustlibs, ustinc): New.
8883 (IPA_OBJS): Add remote-utils-ipa.o.
8884 ($(IPA_LIB)): Link -ldl and -lpthread.
8885 (UST_CFLAGS): New.
8886 (IPAGENT_CFLAGS): Add UST_CFLAGS.
8887 * config.in, configure: Regenerate.
8888
9e4344e5
PA
88892010-06-20 Ian Lance Taylor <iant@google.com>
8890 Pedro Alves <pedro@codesourcery.com>
8891
8892 * linux-x86-low.c (always_true): Delete.
8893 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
8894 trying to fool the compiler with always_true.
8895
c6beb2cb
PA
88962010-06-20 Pedro Alves <pedro@codesourcery.com>
8897
8898 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
8899 conditions in gdbserver.
8900
d2ed6730
UW
89012010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
8902
8903 * spu-low.c (spu_read_memory): Wrap around local store limit.
8904 (spu_write_memory): Likewise.
8905
4e29fb54
PA
89062010-06-15 Pedro Alves <pedro@codesourcery.com>
8907
8908 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
8909 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
8910 LONGEST uses.
8911 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
8912 uses.
8913 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
8914 uses with LONGEST uses.
8915
6a271cae
PA
89162010-06-14 Stan Shebs <stan@codesourcery.com>
8917 Pedro Alves <pedro@codesourcery.com>
8918
8919 Bytecode compiler.
8920
8921 * linux-x86-low.c: Include limits.h.
8922 (add_insns): New.
8923 (always_true): New.
8924 (EMIT_ASM): New.
8925 (EMIT_ASM32): New.
8926 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
8927 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
8928 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
8929 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
8930 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
8931 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
8932 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
8933 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
8934 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
8935 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
8936 (amd64_emit_void_call_2): New.
8937 (amd64_emit_ops): New.
8938 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
8939 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
8940 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
8941 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
8942 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
8943 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
8944 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
8945 (i386_emit_call, i386_emit_reg, i386_emit_pop)
8946 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
8947 (i386_emit_stack_adjust, i386_emit_int_call_1)
8948 (i386_emit_void_call_2): New.
8949 (i386_emit_ops): New.
8950 (x86_emit_ops): New.
8951 (the_low_target): Install x86_emit_ops.
8952 * server.h (struct emit_ops): New.
8953 (get_raw_reg_func_addr): Declare.
8954 (current_insn_ptr, emit_error): Declare.
8955 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
8956 (set_trace_state_variable_value): New defines.
8957 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
8958 addr_get_trace_state_variable_value and
8959 addr_set_trace_state_variable_value.
8960 (symbol_list): New fields for get_raw_reg,
8961 get_trace_state_variable_value and set_trace_state_variable_value.
8962 (condfn): New typedef.
8963 (struct tracepoint): New field `compiled_cond'.
8964 (do_action_at_tracepoint): Clear compiled_cond.
8965 (get_trace_state_variable_value, set_trace_state_variable_value):
8966 Export in the IPA.
8967 (condition_true_at_tracepoint): If there's a compiled condition,
8968 run that.
8969 (current_insn_ptr, emit_error): New globals.
8970 (struct bytecode_address): New.
8971 (get_raw_reg_func_addr): New.
8972 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
8973 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
8974 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
8975 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
8976 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
8977 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
8978 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
8979 (compile_tracepoint_condition, compile_bytecodes): New.
8980 * target.h (emit_ops): Forward declare.
8981 (struct target_ops): New field emit_ops.
8982 (target_emit_ops): New.
8983 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
8984 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
8985 * linux-low.c (linux_emit_ops): New.
8986 (linux_target_ops): Install it.
8987 * linux-low.h (struct linux_target_ops): New field emit_ops.
8988
92b72907
UW
89892010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
8990
8991 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
8992 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
8993
fa593d66
PA
89942010-06-01 Pedro Alves <pedro@codesourcery.com>
8995 Stan Shebs <stan@codesourcery.com>
8996
8997 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
8998 (all): Depend on $(extra_libraries).
8999 (install-only): Install the IPA.
9000 (IPA_OBJS, IPA_LIB): New.
9001 (clean): Remove the IPA lib.
9002 (IPAGENT_CFLAGS): New.
9003 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
9004 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
9005 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
9006 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
9007 * configure.ac: Check for atomic builtins support in the compiler.
9008 (IPA_DEPFILES, extra_libraries): Define.
9009 * configure.srv (ipa_obj): Add description.
9010 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
9011 (i[34567]86-*-linux*): Set ipa_obj.
9012 (x86_64-*-linux*): Set ipa_obj.
9013 * linux-low.c (stabilizing_threads): New.
9014 (supports_fast_tracepoints): New.
9015 (linux_detach): Stabilize threads before detaching.
9016 (handle_tracepoints): Handle internal tracing breakpoints. Assert
9017 the lwp is either not stabilizing, or is moving out of a jump pad.
9018 (linux_fast_tracepoint_collecting): New.
9019 (maybe_move_out_of_jump_pad): New.
9020 (enqueue_one_deferred_signal): New.
9021 (dequeue_one_deferred_signal): New.
9022 (linux_wait_for_event_1): If moving out of a jump pad, defer
9023 pending signals to later.
9024 (linux_stabilize_threads): New.
9025 (linux_wait_1): Check if threads need moving out of jump pads, and
9026 do it if so.
9027 (stuck_in_jump_pad_callback): New.
9028 (move_out_of_jump_pad_callback): New.
9029 (lwp_running): New.
9030 (linux_resume_one_lwp): Handle moving out of jump pads.
9031 (linux_set_resume_request): Dequeue deferred signals.
9032 (need_step_over_p): Also step over fast tracepoint jumps.
9033 (start_step_over): Also uninsert fast tracepoint jumps.
9034 (finish_step_over): Also reinsert fast tracepoint jumps.
9035 (linux_install_fast_tracepoint_jump): New.
9036 (linux_target_ops): Install linux_stabilize_threads and
9037 linux_install_fast_tracepoint_jump_pad.
9038 * linux-low.h (linux_target_ops) <get_thread_area,
9039 install_fast_tracepoint_jump_pad>: New fields.
9040 (struct lwp_info) <collecting_fast_tracepoint,
9041 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
9042 (linux_get_thread_area): Declare.
9043 * linux-x86-low.c (jump_insn): New.
9044 (x86_get_thread_area): New.
9045 (append_insns): New.
9046 (push_opcode): New.
9047 (amd64_install_fast_tracepoint_jump_pad): New.
9048 (i386_install_fast_tracepoint_jump_pad): New.
9049 (x86_install_fast_tracepoint_jump_pad): New.
9050 (the_low_target): Install x86_get_thread_area and
9051 x86_install_fast_tracepoint_jump_pad.
9052 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
9053 (struct fast_tracepoint_jump): New.
9054 (fast_tracepoint_jump_insn): New.
9055 (fast_tracepoint_jump_shadow): New.
9056 (find_fast_tracepoint_jump_at): New.
9057 (fast_tracepoint_jump_here): New.
9058 (delete_fast_tracepoint_jump): New.
9059 (set_fast_tracepoint_jump): New.
9060 (uninsert_fast_tracepoint_jumps_at): New.
9061 (reinsert_fast_tracepoint_jumps_at): New.
9062 (set_breakpoint_at): Use write_inferior_memory.
9063 (uninsert_raw_breakpoint): Use write_inferior_memory.
9064 (check_mem_read): Mask out fast tracepoint jumps.
9065 (check_mem_write): Mask out fast tracepoint jumps.
9066 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
9067 (set_fast_tracepoint_jump): Declare.
9068 (delete_fast_tracepoint_jump)
9069 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
9070 (reinsert_fast_tracepoint_jumps_at): Declare.
9071 * regcache.c: Don't compile many functions when building the
9072 in-process agent library.
9073 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
9074 the register buffer in the heap.
9075 (free_register_cache): If the register buffer isn't owned by the
9076 regcache, don't free it.
9077 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
9078 pre-existing register caches.
9079 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
9080 type.
9081 (convert_ascii_to_int): : Constify `from' parameter type.
9082 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
9083 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
9084 the needed buffer in-place.
9085 (relocate_instruction): New.
9086 * server.c (handle_query) <qSymbols>: If the target supports
9087 tracepoints, give it a chance of looking up symbols. Report
9088 support for fast tracepoints.
9089 (handle_status): Stabilize threads.
9090 (process_serial_event): Adjust.
9091 * server.h (struct fast_tracepoint_jump): Forward declare.
9092 (struct process_info) <fast_tracepoint_jumps>: New field.
9093 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
9094 (decode_X_packet, decode_M_packet): Adjust.
9095 (relocate_instruction): Declare.
9096 (in_process_agent_loaded): Declare.
9097 (tracepoint_look_up_symbols): Declare.
9098 (struct fast_tpoint_collect_status): Declare.
9099 (fast_tracepoint_collecting): Declare.
9100 (force_unlock_trace_buffer): Declare.
9101 (handle_tracepoint_bkpts): Declare.
9102 (initialize_low_tracepoint)
9103 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
9104 * target.h (struct target_ops) <stabilize_threads,
9105 install_fast_tracepoint_jump_pad>: New fields.
9106 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
9107 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
9108 [HAVE_STDINT_H]: Include stdint.h.
9109 (trace_debug_1): Rename to ...
9110 (trace_vdebug): ... this.
9111 (trace_debug): Rename to ...
9112 (trace_debug_1): ... this. Add `level' parameter.
9113 (trace_debug): New.
9114 (ATTR_USED, ATTR_NOINLINE): New.
9115 (IP_AGENT_EXPORT): New.
9116 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
9117 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
9118 (about_to_request_buffer_space, trace_buffer_is_full)
9119 (stopping_tracepoint, expr_eval_result, error_tracepoint)
9120 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
9121 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
9122 (traceframe_write_count, traceframes_created)
9123 (trace_state_variables)
9124 New renaming defines.
9125 (struct ipa_sym_addresses): New.
9126 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
9127 (symbol_list): New.
9128 (ipa_sym_addrs): New.
9129 (all_tracepoint_symbols_looked_up): New.
9130 (in_process_agent_loaded): New.
9131 (write_e_ipa_not_loaded): New.
9132 (maybe_write_ipa_not_loaded): New.
9133 (tracepoint_look_up_symbols): New.
9134 (debug_threads) [IN_PROCESS_AGENT]: New.
9135 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
9136 (UNKNOWN_SIDE_EFFECTS): New.
9137 (stop_tracing): New.
9138 (flush_trace_buffer): New.
9139 (stop_tracing_bkpt): New.
9140 (flush_trace_buffer_bkpt): New.
9141 (read_inferior_integer): New.
9142 (read_inferior_uinteger): New.
9143 (read_inferior_data_pointer): New.
9144 (write_inferior_data_pointer): New.
9145 (write_inferior_integer): New.
9146 (write_inferior_uinteger): New.
9147 (struct collect_static_trace_data_action): Delete.
9148 (enum tracepoint_type): New.
9149 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
9150 <actions_str, step_actions, step_actions_str>: Only include in
9151 GDBserver.
fa593d66
PA
9152 <orig_size, obj_addr_on_target, adjusted_insn_addr>
9153 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
9154 (tracepoints): Use IP_AGENT_EXPORT.
9155 (last_tracepoint): Don't include in the IPA.
9156 (stopping_tracepoint): Use IP_AGENT_EXPORT.
9157 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
9158 (alloced_trace_state_variables): New.
9159 (trace_state_variables): Use IP_AGENT_EXPORT.
9160 (traceframe_t): Delete unused variable.
9161 (circular_trace_buffer): Don't include in the IPA.
9162 (trace_buffer_start): Delete.
9163 (struct trace_buffer_control): New.
9164 (trace_buffer_free): Delete.
9165 (struct ipa_trace_buffer_control): New.
9166 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
9167 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
9168 New.
9169 (trace_buffer_ctrl): New.
9170 (TRACE_BUFFER_CTRL_CURR): New.
9171 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
9172 Reimplement as macros.
9173 (trace_buffer_wrap): Delete.
9174 (traceframe_write_count, traceframe_read_count)
9175 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
9176 (struct tracepoint_hit_ctx) <type>: New field.
9177 (struct fast_tracepoint_ctx): New.
9178 (memory_barrier): New.
9179 (cmpxchg): New.
9180 (record_tracepoint_error): Update atomically in the IPA.
9181 (clear_inferior_trace_buffer): New.
9182 (about_to_request_buffer_space): New.
9183 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
9184 updating the same buffer.
9185 (add_tracepoint): Default the tracepoint's type to trap
9186 tracepoint, and orig_size to -1.
9187 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
9188 internal variables.
9189 (create_trace_state_variable): New parameter `gdb'. Handle it.
9190 (clear_installed_tracepoints): Clear fast tracepoint jumps.
9191 (cmd_qtdp): Handle fast tracepoints.
9192 (cmd_qtdv): Adjust.
9193 (max_jump_pad_size): New.
9194 (gdb_jump_pad_head): New.
9195 (get_jump_space_head): New.
9196 (claim_jump_space): New.
9197 (sort_tracepoints): New.
9198 (MAX_JUMP_SIZE): New.
9199 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
9200 IPA.
9201 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
9202 support. Upload fast traceframes, and delete internal IPA
9203 breakpoints.
9204 (stop_tracing_handler): New.
9205 (flush_trace_buffer_handler): New.
9206 (cmd_qtstop): Upload fast tracepoints.
9207 (response_tracepoint): Handle fast tracepoints.
9208 (tracepoint_finished_step): Upload fast traceframes. Set the
9209 tracepoint hit context's tracepoint type.
9210 (handle_tracepoint_bkpts): New.
9211 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
9212 type. Add comment about fast tracepoints.
9213 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
9214 non-existing action_str field.
9215 (get_context_regcache): Handle fast tracepoints.
9216 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
9217 to the regcache.
9218 (fast_tracepoint_from_jump_pad_address): New.
9219 (fast_tracepoint_from_ipa_tpoint_address): New.
9220 (collecting_t): New.
9221 (force_unlock_trace_buffer): New.
9222 (fast_tracepoint_collecting): New.
9223 (collecting): New.
9224 (gdb_collect): New.
9225 (write_inferior_data_ptr): New.
9226 (target_tp_heap): New.
9227 (target_malloc): New.
9228 (download_agent_expr): New.
9229 (UALIGN): New.
9230 (download_tracepoints): New.
9231 (download_trace_state_variables): New.
9232 (upload_fast_traceframes): New.
9233 (IPA_FIRST_TRACEFRAME): New.
9234 (IPA_NEXT_TRACEFRAME_1): New.
9235 (IPA_NEXT_TRACEFRAME): New.
9236 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
9237 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
9238 (gdb_jump_pad_buffer_end): New.
9239 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
9240 (initialize_tracepoint): Adjust.
9241 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
9242 buffer. Initialize the low module.
9243 * utils.c (PREFIX, TOOLNAME): New.
9244 (malloc_failure): Use PREFIX.
9245 (error): In the IPA, an error causes an exit.
9246 (fatal, warning): Use PREFIX.
9247 (internal_error): Use TOOLNAME.
9248 (NUMCELLS): Increase to 10.
9249 * configure, config.in: Regenerate.
9250
d149dd1d
PA
92512010-06-01 Pedro Alves <pedro@codesourcery.com>
9252
9253 * server.c (handle_query) <qSupported>: Do two passes over the
9254 qSupported string to avoid nesting strtok.
9255
f6528abd
JK
92562010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9257
9258 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
9259 (CDEPS): New.
9260 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
9261 -Wl,--dynamic-list.
9262 * configure: Regenerate.
9263 * proc-service.list: New.
9264
ca2a87a0
JK
92652010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
9266
9267 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
9268 New comment.
9269
363a6e9f
OS
92702010-05-26 Ozkan Sezer <sezeroz@gmail.com>
9271
9272 * gdbreplay.c (remote_open): Check error return from socket() call by
9273 its equality to -1 not by it being negative.
9274 * remote-utils.c (remote_open): Likewise.
9275
d23b6cb1
PA
92762010-05-23 Pedro Alves <pedro@codesourcery.com>
9277
9278 * config.h: Regenerate.
9279
28d3cf85
MK
92802010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9281
9282 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
9283 doesn't provide PTRACE_GET_THREAD_AREA.
9284
fea36a59
MK
92852010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
9286
9287 * linux-m68k-low.c: Include <asm/ptrace.h>
9288 (ps_get_thread_area): Implement.
9289
24b066ba
DE
92902010-05-03 Doug Evans <dje@google.com>
9291
9292 * event-loop.c (struct callback_event): New struct.
9293 (callback_list): New global.
9294 (append_callback_event, delete_callback_event): New functions.
9295 (process_callback): New function.
9296 (start_event_loop): Call it.
9297 * remote-utils.c (NOT_SCHEDULED): Define.
9298 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
9299 moved out of readchar.
9300 (readchar): Rewrite. Call reschedule before returning.
9301 (reset_readchar): New function.
9302 (remote_close): Call it.
9303 (process_remaining, reschedule): New functions.
9304 * server.h (callback_handler_func): New typedef.
9305 (append_callback_event, delete_callback_event): Declare.
9306
9836d6ea
PA
93072010-05-03 Pedro Alves <pedro@codesourcery.com>
9308
9309 * proc-service.c (ps_pglobal_lookup): Use
9310 thread_db_look_up_one_symbol.
9311 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
9312 parameter. Use it instead of all_symbols_looked_up.
9313 * server.h (struct process_info) <all_symbols_looked_up>: Delete
9314 field.
9315 (all_symbols_looked_up): Don't declare.
9316 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
9317 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
9318 field.
9319 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
9320 Set all_symbols_looked_up here.
9321 (thread_db_look_up_one_symbol): New.
9322 (thread_db_get_tls_address): Adjust.
9323 (thread_db_load_search, try_thread_db_load_1): Always allocate the
9324 thread_db object on the heap, and tentatively set it in the
9325 process structure.
9326 (thread_db_init): Don't set all_symbols_looked_up here.
9327 * linux-low.h (thread_db_look_up_one_symbol): Declare.
9328
7984d532
PA
93292010-05-03 Pedro Alves <pedro@codesourcery.com>
9330
9331 * linux-low.c (linux_kill, linux_detach): Adjust.
9332 (status_pending_p_callback): Remove redundant statement. Check
9333 for !TARGET_WAITIKIND_IGNORE, instead of
9334 TARGET_WAITKIND_STOPPED.
9335 (handle_tracepoints): Make sure LWP is locked. Adjust.
9336 (linux_wait_for_event_1): Adjust.
9337 (linux_cancel_breakpoints): New.
9338 (unsuspend_one_lwp): New.
9339 (unsuspend_all_lwps): New.
9340 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
9341 (send_sigstop_callback): Change return type to int, add new
9342 `except' parameter and handle it.
9343 (suspend_and_send_sigstop_callback): New.
9344 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
9345 pass them down. If SUSPEND, also increment the lwp's suspend
9346 count.
9347 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
9348 (need_step_over_p): Don't consider suspended LWPs.
9349 (start_step_over): Adjust.
9350 (proceed_one_lwp): Change return type to int, add new `except'
9351 parameter and handle it.
9352 (unsuspend_and_proceed_one_lwp): New.
9353 (proceed_all_lwps): Use find_inferior instead of
9354 for_each_inferior.
9355 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
9356 also decrement the suspend count of LWPs. Pass `except' down,
9357 instead of hacking its suspend count.
9358 (linux_pause_all): Add `freeze' parameter. Adjust.
9359 (linux_unpause_all): New.
9360 (linux_target_ops): Install linux_unpause_all.
9361 * server.c (handle_status): Adjust.
9362 * target.h (struct target_ops): New fields `unpause_all' and
9363 `cancel_breakpoints'. Add new parameter to `pause_all'.
9364 (pause_all): Add new `freeze' parameter.
9365 (unpause_all): New.
9366 (cancel_breakpoints): New.
9367 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
9368 cancel breakpoints.
9369 (cmd_qtstart): Pause threads.
9370 (stop_tracing): Pause threads, and cancel breakpoints.
9371 * win32-low.c (win32_target_ops): Adjust.
9372
e471f25b
PA
93732010-05-03 Pedro Alves <pedro@codesourcery.com>
9374
9375 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
9376 the inferior right away from here...
9377 (linux_wait_1): ... to here, and adjust to check the thread's
9378 last_resume_kind instead of the lwp's step or stop_expected flags.
9379
1915ef4f
PA
93802010-05-02 Pedro Alves <pedro@codesourcery.com>
9381
9382 * README: Use consistent `GDB' and `GDBserver' spellings.
9383
f9e39928
PA
93842010-05-02 Pedro Alves <pedro@codesourcery.com>
9385
9386 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
9387 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
9388 (linux_detach_one_lwp): Assume the lwp is stopped.
9389 (any_thread_of): Delete.
9390 (linux_detach): Stop all lwps here. Don't blindly delete all
9391 breakpoints.
9392 (delete_lwp_callback): New.
9393 (linux_mourn): Delete all lwps of the process that is gone.
9394 (linux_wait_1): Don't delete the last lwp of the process here.
9395 * mem-break.h (mark_breakpoints_out): Declare.
9396 * mem-break.c (mark_breakpoints_out): New.
9397 (free_all_breakpoints): Use it.
9398 * server.c (handle_target_event): If the process is gone, mark
9399 breakpoints out.
9400 * thread-db.c (struct thread_db) <create_bp>: New field.
9401 (thread_db_enable_reporting): Fix prototype. Store a thread event
9402 breakpoint reference in the thread_db struct.
9403 (thread_db_load_search): Clear the thread_db object.
9404 (try_thread_db_load_1): Ditto.
9405 (switch_to_process): New.
9406 (disable_thread_event_reporting): Use it.
9407 (remove_thread_event_breakpoints): New.
9408 (thread_db_detach, thread_db_mourn): Use it.
9409
1e7fc18c
PA
94102010-05-01 Pedro Alves <pedro@codesourcery.com>
9411
9412 * linux-low.c (linux_enable_event_reporting): New.
9413 (linux_wait_for_event_1, handle_extended_wait): Use it.
9414
02fc4de7
PA
94152010-04-30 Pedro Alves <pedro@codesourcery.com>
9416
9417 * linux-low.c (linux_kill_one_lwp, linux_kill)
9418 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
9419 (send_sigstop): Take an lwp_info as parameter instead. Queue a
9420 SIGSTOP even if the LWP is stopped.
9421 (send_sigstop_callback): New.
9422 (stop_all_lwps): Use send_sigstop_callback instead.
9423 (linux_resume_one_thread): Adjust.
9424 (proceed_one_lwp): Still proceed an LWP that the client has
9425 requested to stop, if we haven't reported it as stopped yet. Make
9426 sure that LWPs the client want stopped, have a pending SIGSTOP.
9427
bc3b5632
DE
94282010-04-26 Doug Evans <dje@google.com>
9429
ae1ada35
DE
9430 * server.c (handle_general_set): Make static.
9431
bc3b5632
DE
9432 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
9433 Print received char after testing for error/eof instead of before.
9434 (input_interrupt): Tweak comment.
9435
65730243
DE
94362010-04-23 Doug Evans <dje@google.com>
9437
9438 * server.c (start_inferior): Print inferior argv if --debug.
9439
a8ae7dc0
AR
94402010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
9441
9442 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
9443 * nto-x86-low.c: Include server.h
9444
1c07cc19
PM
94452010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
9446
9447 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
9448 be consistent with other sources of this directory.
9449 (init_registers_amd64): Correct name of source file of this function
9450 in the comment.
9451
e0a61e09
PM
94522010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9453
9454 * configure.srv (x86_64-*-mingw*): New configuration for Windows
9455 64-bit executables.
9456
54709339
PM
94572010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9458
9459 * win32-i386-low.c: Add 64-bit support.
9460 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
9461 (init_registers_amd64): Declare.
9462 (mappings): Add 64-bit version of array.
9463 (init_windows_x86): New function.
9464 (the_low_target): Change init_arch field to init_windows_x86.
9465
e8f0053d
PM
94662010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9467
9468 * win32-low.c: Adapt to support also 64-bit architecture.
9469 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
9470 (get_image_name): Use SIZE_T type for local variable `done'.
9471 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
9472 (toolhelp_get_dll_name): Idem.
9473 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
9474 Use uintptr_t typecast to avoid warning.
9475 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
9476 (handle_exception): Use phex_nz to avoid warning.
9477 (win32_wait): Remove unused local variable `process'.
9478
c481e77e
PM
94792010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
9480
9481 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
9482 `amd64-avx.o'.
9483
12ea4b69
PM
94842010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
9485
9486 * configure.ac: Use `ws2_32' library for srv_mingw.
9487 * configure: Regenerate.
9488 * gdbreplay.c: Include winsock2.h instead of winsock.h.
9489 * remote-utils.c: Likewise.
9490
f6d1620c
L
94912010-04-17 H.J. Lu <hongjiu.lu@intel.com>
9492
9493 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
9494 if __x86_64__ is defined.
9495
8e642873
PM
94962010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9497
9498 * configure: Regenerate.
9499
711e434b
PM
95002010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
9501
9502 * server.c (handle_query): Handle 'qGetTIBAddr' query.
9503 * target.h (target_ops): New get_tib_address field.
9504 * win32-low.h (win32_thread_info): Add thread_local_base field.
9505 * win32-low.c (child_add_thread): Add tlb argument.
9506 Set thread_local_base field to TLB.
9507 (get_child_debug_event): Adapt to child_add_thread change.
9508 (win32_get_tib_address): New function.
9509 (win32_target_ops): Set get_tib_address field to
9510 win32_get_tib_address.
9511 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
9512
505106cd
PA
95132010-04-12 Pedro Alves <pedro@codesourcery.com>
9514
505106cd
PA
9515 * linux-low.c (linux_mourn): Also remove the process.
9516 * server.c (handle_target_event): Don't remove the process here.
9517 * nto-low.c (nto_mourn): New.
9518 (nto_target_ops): Install it.
9519 * spu-low.c (spu_mourn): New.
9520 (spu_target_ops): Install it.
9521 * win32-low.c (win32_mourn): New.
9522 (win32_target_ops): Install it.
9523
e8470a06
PA
95242010-04-12 Pedro Alves <pedro@codesourcery.com>
9525
9526 * server.h (buffer_xml_printf): Remove redundant `;'.
9527
45ba0d02
PA
95282010-04-12 Pedro Alves <pedro@codesourcery.com>
9529
9530 * regcache.c (set_register_cache): Invalidate regcaches before
9531 changing the register cache layout.
9532 (regcache_invalidate_one): Allow a NULL regcache.
9533 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
9534 regcaches before changing the register cache layout or the target
9535 regsets.
9536
59e04013
L
95372010-04-12 H.J. Lu <hongjiu.lu@intel.com>
9538
9539 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
9540 variable warning on Linux/x86-64.
9541
8336d594
PA
95422010-04-11 Pedro Alves <pedro@codesourcery.com>
9543
9544 GDBserver disconnected tracing support.
9545
9546 * linux-low.c (linux_remove_process): Delete.
9547 (add_lwp): Don't set last_resume_kind here.
9548 (linux_kill): Use `mourn'.
9549 (linux_detach): Use `thread_db_detach', and `mourn'.
9550 (linux_mourn): New.
9551 (linux_attach_lwp_1): Adjust comment.
9552 (linux_attach): last_resume_kind moved the thread_info; adjust.
9553 (status_pending_p_callback): Adjust.
9554 (linux_wait_for_event_1): Adjust.
9555 (count_events_callback, select_singlestep_lwp_callback)
9556 (select_event_lwp_callback, cancel_breakpoints_callback)
9557 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
9558 (proceed_one_lwp): Adjust.
9559 (linux_async): Add debug output.
9560 (linux_thread_stopped): New.
9561 (linux_pause_all): New.
9562 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
9563 linux_pause_all.
9564 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
9565 (thread_db_free): Delete declaration.
9566 (thread_db_detach, thread_db_mourn): Declare.
9567 * thread-db.c (thread_db_init): Use thread_db_mourn.
9568 (thread_db_free): Delete, split in two.
9569 (disable_thread_event_reporting): New.
9570 (thread_db_detach): New.
9571 (thread_db_mourn): New.
9572
9573 * server.h (struct thread_info) <last_resume_kind>: New field.
9574 <attached>: Add comment.
9575 <gdb_detached>: New field.
9576 (handler_func): Change return type to int.
9577 (handle_serial_event, handle_target_event): Ditto.
9578 (gdb_connected): Declare.
9579 (tracing): Delete.
9580 (disconnected_tracing): Declare.
9581 (stop_tracing): Declare.
9582
9583 * server.c (handle_query) <qSupported>: Report support for
9584 disconnected tracing.
9585 (queue_stop_reply_callback): Account for running threads.
9586 (gdb_wants_thread_stopped): New.
9587 (gdb_wants_all_threads_stopped): New.
9588 (gdb_reattached_process): New.
9589 (handle_status): Clear the `gdb_detached' flag of all processes.
9590 In all-stop, stop all threads.
9591 (main): Be sure to leave tfind mode. Handle disconnected tracing.
9592 (process_serial_event): If the remote connection breaks, or if an
9593 exit was forced with "monitor exit", force an event loop exit.
9594 Handle disconnected tracing on detach.
9595 (handle_serial_event): Adjust.
9596 (handle_target_event): If GDB isn't connected, forward events back
9597 to the inferior, unless the last process exited, in which case,
9598 exit gdbserver. Adjust interface.
9599
9600 * remote-utils.c (remote_open): Don't block in accept. Instead
9601 register an event loop source on the listen socket file
9602 descriptor. Refactor bits into ...
9603 (listen_desc): ... this new global.
9604 (gdb_connected): ... this new function.
9605 (enable_async_notification): ... this new function.
9606 (handle_accept_event): ... this new function.
9607 (remote_close): Clear remote_desc.
9608
9609 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
9610
9611 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
9612 New fields.
9613 (mourn_inferior): Define.
9614 (target_process_qsupported): Avoid the dangling else problem.
9615 (thread_stopped): Define.
9616 (pause_all): Define.
9617 (target_waitstatus_to_string): Declare.
9618 * target.c (target_waitstatus_to_string): New.
9619
9620 * tracepoint.c (tracing): Make extern.
9621 (disconnected_tracing): New.
9622 (stop_tracing): Make extern. Handle tracing stops due to GDB
9623 disconnecting.
9624 (cmd_qtdisconnected): New.
9625 (cmd_qtstatus): Report disconnected tracing status in trace reply.
9626 (handle_tracepoint_general_set): Handle QTDisconnected.
9627
9628 * event-loop.c (event_handler_func): Change return type to int.
9629 (process_event): Bail out if the event handler wants the event
9630 loop to stop.
9631 (handle_file_event): Ditto.
9632 (start_event_loop): Bail out if the event handler wants the event
9633 loop to stop.
9634
9635 * nto-low.c (nto_target_ops): Adjust.
9636 * spu-low.c (spu_wait): Don't remove the process here.
9637 (spu_target_ops): Adjust.
9638 * win32-low.c (win32_wait): Don't remove the process here.
9639 (win32_target_ops): Adjust.
9640
5d267c4c
PA
96412010-04-11 Pedro Alves <pedro@codesourcery.com>
9642
9643 * regcache.c (realloc_register_cache): Invalidate inferior's
9644 regcache before recreating it.
9645
623ccd72
PA
96462010-04-09 Pedro Alves <pedro@codesourcery.com>
9647
9648 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
9649
219f2f23
PA
96502010-04-09 Stan Shebs <stan@codesourcery.com>
9651 Pedro Alves <pedro@codesourcery.com>
9652
9653 * server.h (LONGEST): New.
9654 (struct thread_info) <while_stepping>: New field.
9655 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
9656 Declare.
9657 (initialize_tracepoint, handle_tracepoint_general_set)
9658 (handle_tracepoint_query, tracepoint_finished_step)
9659 (tracepoint_was_hit, release_while_stepping_state_list):
9660 (current_traceframe): Declare.
9661 * server.c (handle_general_set): Handle tracepoint packets.
9662 (read_memory): New.
9663 (write_memory): New.
9664 (handle_search_memory_1): Use read_memory.
9665 (handle_query): Report support for conditional tracepoints, trace
9666 state variables, and tracepoint sources. Handle tracepoint
9667 queries.
9668 (main): Initialize the tracepoints module.
9669 (process_serial_event): Handle traceframe reads/writes.
9670
9671 * linux-low.c (handle_tracepoints): New.
9672 (linux_wait_1): Call it.
9673 (linux_resume_one_lwp): Handle while-stepping.
9674 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
9675 (linux_target_ops): Install them.
9676 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
9677 New field.
9678 * linux-x86-low.c (x86_supports_tracepoints): New.
9679 (the_low_target). Install it.
9680
9681 * mem-break.h (delete_breakpoint): Declare.
9682 * mem-break.c (delete_breakpoint): Make external.
9683
9684 * target.h (struct target_ops): Add `supports_tracepoints',
9685 `read_pc', and `write_pc' fields.
9686 (target_supports_tracepoints): Define.
9687 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
9688 (phex_nz): New.
9689
9690 * regcache.h (struct regcache) <registers_owned>: New field.
9691 (init_register_cache, regcache_cpy): Declare.
9692 (regcache_read_pc, regcache_write_pc): Declare.
9693 (register_cache_size): Declare.
9694 (supply_regblock): Declare.
9695 * regcache.c (init_register_cache): New.
9696 (new_register_cache): Use it.
9697 (regcache_cpy): New.
9698 (register_cache_size): New.
9699 (supply_regblock): New.
9700 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 9701
219f2f23
PA
9702 * tracepoint.c: New.
9703
9704 * Makefile.in (OBS): Add tracepoint.o.
9705 (tracepoint.o): New rule.
9706
3a13a53b
L
97072010-04-08 H.J. Lu <hongjiu.lu@intel.com>
9708
9709 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
9710 (i386-mmx.o): New.
9711 (i386-mmx.c): Likewise.
9712 (i386-mmx-linux.o): Likewise.
9713 (i386-mmx-linux.c): Likewise.
9714
9715 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
9716 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
9717 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
9718 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
9719
9720 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
9721 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
9722 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
9723
1570b33e
L
97242010-04-07 H.J. Lu <hongjiu.lu@intel.com>
9725
9726 * Makefile.in (clean): Updated.
9727 (i386-avx.o): New.
9728 (i386-avx.c): Likewise.
9729 (i386-avx-linux.o): Likewise.
9730 (i386-avx-linux.c): Likewise.
9731 (amd64-avx.o): Likewise.
9732 (amd64-avx.c): Likewise.
9733 (amd64-avx-linux.o): Likewise.
9734 (amd64-avx-linux.c): Likewise.
9735
9736 * configure.srv (srv_i386_regobj): Add i386-avx.o.
9737 (srv_i386_linux_regobj): Add i386-avx-linux.o.
9738 (srv_amd64_regobj): Add amd64-avx.o.
9739 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
9740 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
9741 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
9742 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
9743 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
9744 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
9745 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
9746
9747 * i387-fp.c: Include "i386-xstate.h".
9748 (i387_xsave): New.
9749 (i387_cache_to_xsave): Likewise.
9750 (i387_xsave_to_cache): Likewise.
9751 (x86_xcr0): Likewise.
9752
9753 * i387-fp.h (i387_cache_to_xsave): Likewise.
9754 (i387_xsave_to_cache): Likewise.
9755 (x86_xcr0): Likewise.
9756
9757 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
9758 * linux-crisv32-low.c (target_regsets): Likewise.
9759 * linux-m68k-low.c (target_regsets): Likewise.
9760 * linux-mips-low.c (target_regsets): Likewise.
9761 * linux-ppc-low.c (target_regsets): Likewise.
9762 * linux-s390-low.c (target_regsets): Likewise.
9763 * linux-sh-low.c (target_regsets): Likewise.
9764 * linux-sparc-low.c (target_regsets): Likewise.
9765 * linux-xtensa-low.c (target_regsets): Likewise.
9766
9767 * linux-low.c: Include <sys/uio.h>.
9768 (regsets_fetch_inferior_registers): Support nt_type.
9769 (regsets_store_inferior_registers): Likewise.
9770 (linux_process_qsupported): New.
9771 (linux_target_ops): Add linux_process_qsupported.
9772
9773 * linux-low.h (regset_info): Add nt_type.
9774 (linux_target_ops): Add process_qsupported.
9775
9776 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
9777 and <sys/uio.h>.
9778 (init_registers_i386_avx_linux): New.
9779 (init_registers_amd64_avx_linux): Likewise.
9780 (xmltarget_i386_linux_no_xml): Likewise.
9781 (xmltarget_amd64_linux_no_xml): Likewise.
9782 (PTRACE_GETREGSET): Likewise.
9783 (PTRACE_SETREGSET): Likewise.
9784 (x86_fill_xstateregset): Likewise.
9785 (x86_store_xstateregset): Likewise.
9786 (use_xml): Likewise.
9787 (x86_linux_update_xmltarget): Likewise.
9788 (x86_linux_process_qsupported): Likewise.
9789 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
9790 (x86_arch_setup): Don't call init_registers_amd64_linux nor
9791 init_registers_i386_linux here. Call
9792 x86_linux_update_xmltarget.
9793 (the_low_target): Add x86_linux_process_qsupported.
9794
9795 * server.c (handle_query): Call target_process_qsupported.
9796
9797 * target.h (target_ops): Add process_qsupported.
9798 (target_process_qsupported): New.
9799
fc7238bb
PA
98002010-04-03 Pedro Alves <pedro@codesourcery.com>
9801
9802 * inferiors.c (add_thread): Set last_status kind to
9803 TARGET_WAITKIND_IGNORE.
9804 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
9805 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
9806 (linux_wait_1): Move `thread' local definition to block that uses
9807 it. Don't NULL initialize `event_child'.
9808 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
9809 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
9810 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
9811
bdabb078
PA
98122010-04-01 Pedro Alves <pedro@codesourcery.com>
9813
9814 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
9815 an extended waitstatus, or by a watchpoint.
9816 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
9817 thread was stepping or has been stopped by a watchpoint.
9818
d3bbe7a0
PA
98192010-04-01 Pedro Alves <pedro@codesourcery.com>
9820
9821 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
9822 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
9823 of another, then delete the previous, and validate all
9824 breakpoints.
9825 (validate_inserted_breakpoint): New.
9826 (delete_disabled_breakpoints): New.
9827 (validate_breakpoints): New.
9828 (check_mem_read): Validate breakpoints before trusting their
9829 shadow. Delete disabled breakpoints.
9830 (check_mem_write): Validate breakpoints before trusting they
9831 should be inserted. Delete disabled breakpoints.
9832 * mem-break.h (validate_breakpoints):
9833 * server.c (handle_query): Validate breakpoints when we see a
9834 qSymbol query.
9835
8b07ae33
PA
98362010-04-01 Pedro Alves <pedro@codesourcery.com>
9837
9838 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
9839 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
9840 if we could tell there's a GDB breakpoint at stop_pc.
9841 (need_step_over_p): Don't do a step over if we find a GDB
9842 breakpoint at the resume PC.
9843
9844 * mem-break.c (struct raw_breakpoint): New.
9845 (enum bkpt_type): New type `gdb_breakpoint'.
9846 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
9847 fields. New field `raw'.
9848 (find_raw_breakpoint_at): New.
9849 (set_raw_breakpoint_at): Handle refcounting. Create a raw
9850 breakpoint instead.
9851 (set_breakpoint_at): Adjust.
9852 (delete_raw_breakpoint): New.
9853 (release_breakpoint): New.
9854 (delete_breakpoint): Rename to...
9855 (delete_breakpoint_1): ... this. Add proc parameter. Use
9856 release_breakpoint. Return ENOENT.
9857 (delete_breakpoint): Reimplement.
9858 (find_breakpoint_at): Delete.
9859 (find_gdb_breakpoint_at): New.
9860 (delete_breakpoint_at): Delete.
9861 (set_gdb_breakpoint_at): New.
9862 (delete_gdb_breakpoint_at): New.
9863 (gdb_breakpoint_here): New.
9864 (set_reinsert_breakpoint): Use release_breakpoint.
9865 (uninsert_breakpoint): Rename to ...
9866 (uninsert_raw_breakpoint): ... this.
9867 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
9868 (reinsert_raw_breakpoint): Change parameter type to
9869 raw_breakpoint.
9870 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
9871 instead.
9872 (check_breakpoints): Adjust. Use release_breakpoint.
9873 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
9874 (breakpoint_inserted_here): Ditto.
9875 (check_mem_read): Adjust to iterate over raw breakpoints instead.
9876 Don't trust the breakpoint's shadow if it is not inserted.
9877 (check_mem_write): Adjust to iterate over raw breakpoints instead.
9878 (delete_all_breakpoints): Adjust.
9879 (free_all_breakpoints): Mark all breakpoints as uninserted, and
9880 use delete_breakpoint_1.
9881
9882 * mem-break.h (breakpoints_supported): Delete declaration.
9883 (set_gdb_breakpoint_at): Declare.
9884 (gdb_breakpoint_here): Declare.
9885 (delete_breakpoint_at): Delete.
9886 (delete_gdb_breakpoint_at): Declare.
9887
9888 * server.h (struct raw_breakpoint): Forward declare.
9889 (struct process_info): New field `raw_breakpoints'.
9890
9891 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
9892 breakpoints.
9893
6bf5e0ba
PA
98942010-03-24 Pedro Alves <pedro@codesourcery.com>
9895
9896 * linux-low.c (status_pending_p_callback): Fix comment.
9897 (linux_wait_for_event_1): Move most of the internal breakpoint
9898 handling from here...
9899 (linux_wait_1): ... to here.
9900 (count_events_callback): New.
9901 (select_singlestep_lwp_callback): New.
9902 (select_event_lwp_callback): New.
9903 (cancel_breakpoints_callback): New.
9904 (select_event_lwp): New.
9905 (linux_wait_1): Simplify internal breakpoint handling. Give equal
9906 priority to all LWPs that have had events that should be reported
9907 to the client. Cancel breakpoints when about to reporting the
9908 event to the client, not while stopping lwps. No longer cancel
9909 finished single-steps here.
9910 (cancel_finished_single_step): Delete.
9911 (cancel_finished_single_steps): Delete.
9912
414a389f
PA
99132010-03-24 Pedro Alves <pedro@codesourcery.com>
9914
9915 * mem-break.c (enum bkpt_type): New.
9916 (struct breakpoint): New field `type'.
9917 (set_breakpoint_at): Change return type to struct breakpoint
9918 pointer. Set type to `other_breakpoint' by default.
9919 (delete_breakpoint): Rewrite, supporting more than one breakpoint
9920 in the breakpoint list.
9921 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
9922 (reinsert_breakpoint): Rename to ...
9923 (reinsert_raw_breakpoint): ... this.
9924 (reinsert_breakpoints_at): Adjust.
9925 * mem-break.h (struct breakpoint): Declare.
9926 (set_breakpoint_at): Change return type to struct breakpoint
9927 pointer.
9928
2280c721
PA
99292010-03-24 Pedro Alves <pedro@codesourcery.com>
9930
9931 * server.c (handle_query): Assign, not compare.
9932
d50171e4
PA
99332010-03-24 Pedro Alves <pedro@codesourcery.com>
9934
9935 Teach linux gdbserver to step-over-breakpoints.
9936
9937 * linux-low.c (can_hardware_single_step): New.
9938 (supports_breakpoints): New.
9939 (handle_extended_wait): If stopping threads, read the stop pc of
9940 the new cloned LWP.
9941 (get_pc): New.
9942 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
9943 low target doesn't support retrieving the PC.
9944 (add_lwp): Set last_resume_kind to resume_continue.
9945 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
9946 (linux_attach): Don't clear stop_expected. Set the lwp's
9947 last_resume_kind to resume_stop.
9948 (linux_detach_one_lwp): Don't check for removed breakpoints.
9949 (check_removed_breakpoint): Delete.
9950 (status_pending_p): Rename to ...
9951 (status_pending_p_callback): ... this. Don't check for removed
9952 breakpoints. Don't consider threads that are stopped from GDB's
9953 perspective.
9954 (linux_wait_for_lwp): Always read the stop_pc here.
9955 (cancel_breakpoint): New.
9956 (step_over_bkpt): New global.
9957 (linux_wait_for_event_1): Implement stepping over breakpoints.
9958 (gdb_wants_lwp_stopped): New.
9959 (gdb_wants_all_stopped): New.
9960 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
9961 single-step traps here. Store the thread's last reported target
9962 wait status.
9963 (send_sigstop): Don't clear stop_expected. Always set it,
9964 instead.
9965 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
9966 (cancel_finished_single_step): New.
9967 (cancel_finished_single_steps): New.
9968 (wait_for_sigstop): Don't cancel finished single-step traps here.
9969 (linux_resume_one_lwp): Don't check for removed breakpoints.
9970 Don't set `step' on non-hardware step archs.
9971 (linux_set_resume_request): Ignore resume_stop requests if already
9972 stopping or stopped. Set the lwp's last_resume_kind.
9973 (resume_status_pending_p): Don't check for removed breakpoints.
9974 (need_step_over_p): New.
9975 (start_step_over): New.
9976 (finish_step_over): New.
9977 (linux_resume_one_thread): Always queue a sigstop for resume_stop
9978 requests. Clear the thread's last reported target waitstatus.
9979 Don't use the `suspended' flag. Don't consider pending breakpoints.
9980 (linux_resume): Start a step-over if necessary.
9981 (proceed_one_lwp): New.
9982 (proceed_all_lwps): New.
9983 (unstop_all_lwps): New.
9984 * linux-low.h (struct lwp_info): Rewrite comment for the
9985 `suspended' flag. Add the `stop_pc' field. Delete the
9986 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
9987 Add `'last_resume_kind' and `need_step_over' fields.
9988 * inferiors.c (struct thread_info): Delete, moved elsewhere.
9989 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
9990 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
9991 (set_raw_breakpoint_at): New.
9992 (set_breakpoint_at): Rewrite to use it.
9993 (reinsert_breakpoint_handler): Delete.
9994 (set_reinsert_breakpoint): New.
9995 (reinsert_breakpoint_by_bp): Delete.
9996 (delete_reinsert_breakpoints): New.
9997 (uninsert_breakpoint): Rewrite.
9998 (uninsert_breakpoints_at): New.
9999 (reinsert_breakpoint): Rewrite.
10000 (reinsert_breakpoints_at): New.
10001 (check_breakpoints): Rewrite.
10002 (breakpoint_here): New.
10003 (breakpoint_inserted_here): New.
10004 (check_mem_read): Adjust.
10005 * mem-break.h (breakpoints_supported, breakpoint_here)
10006 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
10007 (reinsert_breakpoint_by_bp): Delete declaration.
10008 (delete_reinsert_breakpoints): Declare.
10009 (reinsert_breakpoint): Delete declaration.
10010 (reinsert_breakpoints_at): Declare.
10011 (uninsert_breakpoint): Delete declaration.
10012 (uninsert_breakpoints_at): Declare.
10013 (check_breakpoints): Adjust prototype.
10014 * server.h: Adjust include order.
10015 (struct thread_info): Declare here. Add a `last_status' field.
10016
30ba68cb
MS
100172010-03-23 Michael Snyder <msnyder@vmware.com>
10018
10019 * server.c (crc32): New function.
10020 (handle_query): Add handling for 'qCRC:' request.
10021
b9a881c2
PA
100222010-03-23 Pedro Alves <pedro@codesourcery.com>
10023
10024 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
10025 lwp had been stopped by a watchpoint.
10026
e92d13d5
PA
100272010-03-16 Pedro Alves <pedro@codesourcery.com>
10028
10029 * server.h (internal_error): Declare.
10030 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
10031 * utils.c (internal_error): New function.
10032
64daa791
AS
100332010-03-15 Andreas Schwab <schwab@redhat.com>
10034
10035 * configure.srv: Fix typo setting srv_regobj.
10036
f52cd8cd
PA
100372010-03-15 Pedro Alves <pedro@codesourcery.com>
10038
10039 * linux-low.c (fetch_register): Avoid passing a non string literal
10040 format to `error'.
10041 (usr_store_inferior_registers): Ditto.
10042
93ae6fdc
PA
100432010-03-14 Pedro Alves <pedro@codesourcery.com>
10044
10045 * linux-low.c (linux_write_memory): Bail out early if peeking
10046 memory failed.
10047
c3adc08c
PA
100482010-03-14 Pedro Alves <pedro@codesourcery.com>
10049
10050 * linux-low.h (struct lwp_info): New fields
10051 `stopped_by_watchpoint' and `stopped_data_address'.
10052 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
10053 here, and cache them in the lwp object.
10054 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
10055 directly.
10056 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
10057 field.
10058 (linux_stopped_by_watchpoint): Rewrite.
10059 (linux_stopped_data_address): Rewrite.
10060
bce522a2
PA
100612010-03-06 Simo Melenius <simo.melenius@iki.fi>
10062
10063 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
10064 switching the current inferior, not before.
10065
90884b2b
L
100662010-03-01 H.J. Lu <hongjiu.lu@intel.com>
10067
10068 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
10069 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
10070 i386-linux.c and amd64-linux.c.
10071 (reg-i386.o): Removed.
10072 (reg-i386.c): Likewise.
10073 (reg-i386-linux.o): Likewise.
10074 (reg-i386-linux.c): Likewise.
10075 (reg-x86-64.o): Likewise.
10076 (reg-x86-64.c): Likewise.
10077 (reg-x86-64-linux.o): Likewise.
10078 (reg-x86-64-linux.c): Likewise.
10079 (i386.o): New.
10080 (i386.c): Likewise.
10081 (i386-linux.o): Likewise.
10082 (i386-linux.c): Likewise.
10083 (amd64.o): Likewise.
10084 (amd64.c): Likewise.
10085 (amd64-linux.o): Likewise.
10086 (amd64-linux.c): Likewise.
10087
10088 * configure.srv (srv_i386_regobj): New.
10089 (srv_i386_linux_regobj): Likewise.
10090 (srv_amd64_regobj): Likewise.
10091 (srv_amd64_linux_regobj): Likewise.
10092 (srv_i386_32bit_xmlfiles): Likewise.
10093 (srv_i386_64bit_xmlfiles): Likewise.
10094 (srv_i386_xmlfiles): Likewise.
10095 (srv_amd64_xmlfiles): Likewise.
10096 (srv_i386_linux_xmlfiles): Likewise.
10097 (srv_amd64_linux_xmlfiles): Likewise.
10098 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
10099 srv_xmlfiles to $srv_i386_xmlfiles.
10100 (i[34567]86-*-mingw32ce*): Likewise.
10101 (i[34567]86-*-mingw*): Likewise.
10102 (i[34567]86-*-nto*): Likewise.
10103 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
10104 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
10105 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
10106 (x86_64-*-linux*): Likewise.
10107
10108 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
10109 (init_registers_amd64_linux): New.
10110 (x86_arch_setup): Replace init_registers_x86_64_linux with
10111 init_registers_amd64_linux.
10112
193f13e6
MK
101132010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
10114
10115 * configure.ac: Check for libdl. If it is not available link against
10116 static libthread_db.
10117 * configure: Regenerate.
10118
85d721b8
PA
101192010-02-22 Pedro Alves <pedro@codesourcery.com>
10120
10121 PR9605
10122
10123 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
10124 handing a read watchpoint.
10125 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
10126
6076632b
DE
101272010-02-12 Doug Evans <dje@google.com>
10128
10129 * linux-low.c (linux_supports_tracefork_flag): Document.
10130 (linux_look_up_symbols): Add comment.
10131
3327ccf7
L
101322010-02-03 H.J. Lu <hongjiu.lu@intel.com>
10133
10134 * regcache.c (supply_register): Clear regcache if buf is NULL.
10135
0718675c 101362010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 10137 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
10138
10139 * inferiors.c (find_inferior): Add function documentation.
10140 (unloaded_dll): Handle the case where the unloaded dll has not
10141 been previously registered in the dll list.
10142
177321bd
DJ
101432010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
10144
10145 * linux-arm-low.c (thumb_breakpoint_len): Delete.
10146 (thumb2_breakpoint): New.
10147 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
10148
2b009048
DJ
101492010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10150
10151 * linux-low.c (get_stop_pc): Check for SIGTRAP.
10152 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
10153 breakpoints.
10154
3be029c7
PA
101552010-01-21 Pedro Alves <pedro@codesourcery.com>
10156
10157 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
10158
18f5de3b
JK
101592010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
10160
10161 * linux-s390-low.c (s390_collect_ptrace_register)
10162 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
10163
3743bb4f
DE
101642010-01-21 Doug Evans <dje@google.com>
10165
14ce3065
DE
10166 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
10167 (PTRACE_ARG4_TYPE): New macro.
10168 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
10169 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
10170 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
10171 (usr_store_inferior_registers): Ditto.
10172 (linux_read_memory, linux_write_memory): Ditto.
10173 (linux_test_for_tracefork): Ditto.
10174
3743bb4f
DE
10175 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
10176 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
10177
8b315be5
PA
101782010-01-21 Pedro Alves <pedro@codesourcery.com>
10179
10180 * proc-service.c (ps_lgetregs): Don't refetch registers from the
10181 target.
10182
85492558
PA
101832010-01-21 Pedro Alves <pedro@codesourcery.com>
10184
10185 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
10186 prototype to take a regcache. Adjust.
10187
442ea881
PA
101882010-01-20 Pedro Alves <pedro@codesourcery.com>
10189
10190 * regcache.h (struct thread_info): Forward declare.
10191 (struct regcache): New.
10192 (new_register_cache): Adjust prototype.
10193 (get_thread_regcache): Declare.
10194 (free_register_cache): Adjust prototype.
10195 (registers_to_string, registers_from_string): Ditto.
10196 (supply_register, supply_register_by_name, collect_register)
10197 (collect_register_as_string, collect_register_by_name): Ditto.
10198 * regcache.c (struct inferior_regcache_data): Delete.
10199 (get_regcache): Rename to ...
10200 (get_thread_regcache): ... this. Adjust. Switch inferior before
10201 fetching registers.
10202 (regcache_invalidate_one): Adjust.
10203 (regcache_invalidate): Fix prototype.
10204 (new_register_cache): Return the new register cache.
10205 (free_register_cache): Change prototype.
10206 (realloc_register_cache): Adjust.
10207 (registers_to_string): Change prototype to take a regcache. Adjust.
10208 (registers_from_string): Ditto.
10209 (register_data): Ditto.
10210 (supply_register): Ditto.
10211 (supply_register_by_name): Ditto.
10212 (collect_register): Ditto.
10213 (collect_register_as_string): Ditto.
10214 (collect_register_by_name): Ditto.
10215 * server.c (process_serial_event): Adjust.
10216 * linux-low.h (regset_fill_func, regset_store_func): Change
10217 prototype.
10218 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
10219 Change prototype.
10220 * linux-low.c (get_stop_pc): Adjust.
10221 (check_removed_breakpoint): Adjust.
10222 (linux_wait_for_event): Adjust.
10223 (linux_resume_one_lwp): Adjust.
10224 (fetch_register): Add regcache parameter. Adjust.
10225 (usr_store_inferior_registers): Ditto.
10226 (regsets_fetch_inferior_registers): Ditto.
10227 (regsets_store_inferior_registers): Ditto.
10228 (linux_fetch_registers, linux_store_registers): Ditto.
10229 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
10230 regcache. Adjust.
43aaf8b6
PA
10231 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
10232 Ditto.
442ea881
PA
10233 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
10234 prototype to take a regcache.
10235 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
10236 * remote-utils.c (convert_ascii_to_int, outreg)
10237 (prepare_resume_reply): Change prototype to take a regcache.
10238 Adjust.
10239 * target.h (struct target_ops) <fetch_registers, store_registers>:
10240 Change prototype to take a regcache.
10241 (fetch_inferior_registers, store_inferior_registers): Change
10242 prototype to take a regcache. Adjust.
10243 * proc-service.c (ps_lgetregs): Adjust.
10244 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
10245 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
10246 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
10247 take a regcache. Adjust.
10248 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
10249 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
10250 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
10251 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
10252 * linux-cris-low.c (cris_get_pc, cris_set_pc)
10253 (cris_cannot_fetch_register):
10254 (cris_breakpoint_at): Change prototype to take a regcache.
10255 Adjust.
10256 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
10257 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
10258 to take a regcache. Adjust.
10259 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
10260 Adjust.
10261 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
10262 take a regcache. Adjust.
10263 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
10264 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
10265 (m68k_set_pc): Change prototype to take a regcache. Adjust.
10266 * linux-mips-low.c (mips_get_pc):
10267 (mips_set_pc): Change prototype to take a regcache. Adjust.
10268 (mips_reinsert_addr): Adjust.
10269 (mips_collect_register): Change prototype to take a regcache.
10270 Adjust.
10271 (mips_supply_register):
10272 (mips_collect_register_32bit, mips_supply_register_32bit)
10273 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
10274 (mips_store_fpregset): Ditto.
43aaf8b6
PA
10275 * linux-ppc-low.c (ppc_supply_ptrace_register)
10276 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
10277 (parse_spufs_run): Adjust.
10278 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
10279 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
10280 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
10281 take a regcache. Adjust.
10282 * linux-s390-low.c (s390_collect_ptrace_register)
10283 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
10284 (s390_set_pc): Change prototype to take a regcache. Adjust.
10285 (s390_arch_setup): Adjust.
10286 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
10287 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
10288 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
10289 (sparc_fill_gregset, sparc_store_gregset_from_stack)
10290 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
10291 regcache. Adjust.
10292 (sparc_breakpoint_at): Adjust.
10293 * linux-xtensa-low.c (xtensa_fill_gregset):
10294 (xtensa_store_gregset):
10295 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
10296 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
10297 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
10298 prototype to take a regcache. Adjust.
10299 * win32-arm-low.c (arm_fetch_inferior_register)
10300 (arm_store_inferior_register): Change prototype to take a
10301 regcache. Adjust.
10302 * win32-i386-low.c (i386_fetch_inferior_register)
10303 (i386_store_inferior_register): Change prototype to take a
10304 regcache. Adjust.
10305 * win32-low.c (child_fetch_inferior_registers)
10306 (child_store_inferior_registers): Change prototype to take a
10307 regcache. Adjust.
10308 (win32_wait): Adjust.
10309 (win32_fetch_inferior_registers): Change prototype to take a
10310 regcache. Adjust.
10311 (win32_store_inferior_registers): Adjust.
10312 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
10313 store_inferior_register>: Change prototype to take a regcache.
10314
60c3d7b0
DE
103152010-01-20 Doug Evans <dje@google.com>
10316
10317 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
10318 #ifdef.
10319 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 10320 (W_STOPCODE): Provide definition if missing.
60c3d7b0 10321
dc146f7c
VP
103222010-01-13 Vladimir Prus <vladimir@codesourcery.com>
10323
10324 * linux-low.c (linux_core_of_thread): New.
10325 (compare_ints, show_process, list_threads): New.
10326 (linux_qxfer_osdata): Report threads and cores.
10327 (linux_target_op): Register linux_core_of_thread.
10328 * remote-utils.c (prepare_resume_reply): Report the core.
10329 (buffer_xml_printf): Support %d specifier.
10330 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
10331 New.
10332 (handle_query): Handle qXfer:threads. Announce availability
10333 thereof.
10334 * target.h (struct target_ops): New field core_of_thread.
10335
7803799a
UW
103362010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
10337
10338 * Makefile.in (clean): Remove new generated files.
10339 (reg-s390.o, reg-s390.c): Remove rules.
10340 (reg-s390x.o, reg-s390x.c): Likewise.
10341 (s390-linux32.o, s390-linux32.c): Add rules.
10342 (s390-linux64.o, s390-linux64.c): Likewise.
10343 (s390x-linux64.o, s390x-linux64.c): Likewise.
10344 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
10345 * linux-s390-low.c: Include <elf.h>.
10346 (HWCAP_S390_HIGH_GPRS): Define if undefined.
10347 (init_registers_s390): Remove prototype.
10348 (init_registers_s390x): Likewise.
10349 (init_registers_s390_linux32): Add prototype.
10350 (init_registers_s390_linux64): Likewise.
10351 (init_registers_s390x_linux64): Likewise.
10352 (s390_num_regs_3264): New define.
10353 (s390_regmap_3264): New global variable.
10354 (s390_cannot_fetch_register): Remove obsolete check.
10355 (s390_cannot_store_register): Likewise.
10356 (s390_collect_ptrace_register): Handle upper/lower register halves.
10357 (s390_supply_ptrace_register): Likewise.
10358 (s390_fill_gregset): Update to register number changes.
10359 (s390_get_hwcap): New routine.
10360 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
10361 Install appropriate regmap and register set.
10362
6e7ffa39
JB
103632010-01-01 Joel Brobecker <brobecker@adacore.com>
10364
10365 * server.c (gdbserver_version): Update copyright year to 2010.
10366 * gdbreplay.c (gdbreplay_version): Likewise.
10367
957f3f49
DE
103682009-12-28 Doug Evans <dje@google.com>
10369
10370 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
10371 elf/external.h. Include <elf.h> instead but only if necessary.
10372
ca5c370d
PA
103732009-12-28 Pedro Alves <pedro@codesourcery.com>
10374
10375 * linux-low.c (linux_remove_process): Remove `detaching'
10376 parameter. Don't release/detach from thread_db here.
10377 (linux_kill): Release/detach from thread_db here, ...
10378 (linux_detach): ... and here, before actually detaching.
10379 (linux_wait_1): ... and here, when a process exits.
10380 * thread-db.c (any_thread_of): New.
10381 (thread_db_free): Switch the current inferior to a thread of the
10382 passed in process.
10383
4ee62156
DE
103842009-12-21 Doug Evans <dje@google.com>
10385
d90e6a88
DE
10386 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
10387
c5f62d5f
DE
10388 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
10389 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
10390 warning ifndef __NR_tkill. Move setting of errno there too.
10391 Delete unnecessary resetting of errno after syscall.
10392 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
10393
10e86dd7
DE
10394 * configure.ac: Check for dladdr.
10395 * config.in: Regenerate.
10396 * configure: Regenerate.
10397 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
10398 (try_thread_db_load): Update.
10399
4ee62156
DE
10400 * linux-low.c (my_waitpid): Delete unnecessary prototype.
10401
00f515da
DE
104022009-12-18 Doug Evans <dje@google.com>
10403
e9464885
DE
10404 * event-loop.c: Include unistd.h if it exists.
10405
07d4f67e
DE
10406 * linux-low.c (my_waitpid): Move definition away from being in
10407 between linux_tracefork_child/linux_test_for_tracefork.
10408
00f515da
DE
10409 * gdb_proc_service.h (psaddr_t): Fix type.
10410 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
10411 signature to match glibc.
10412
1de1badb
DE
104132009-12-16 Doug Evans <dje@google.com>
10414
10415 * linux-low.c (linux_read_memory): Fix argument to read.
10416
aeeb81d1
PA
104172009-11-26 Pedro Alves <pedro@codesourcery.com>
10418
10419 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
10420 events, don't leave current_inferior pointing at null.
10421
10357975
PA
104222009-11-26 Pedro Alves <pedro@codesourcery.com>
10423
10424 * win32-low.c (LOG): Delete.
10425 (OUTMSG): Output to stderr.
10426 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
10427 on compile time LOG macro.
10428 (win32_wait): Fix debug output.
10429
cf6e3471
PA
104302009-11-26 Pedro Alves <pedro@codesourcery.com>
10431
10432 * win32-low.c (win32_add_one_solib): If the dll name is
10433 "ntdll.dll", prepend the system directory to the dll path.
10434
0c85e18e
MK
104352009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
10438
9ac544ce 104392009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 10440 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
10441
10442 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
10443 * configure.ac: Check for __mcoldfire__ and set
10444 gdb_cv_m68k_is_coldfire.
10445 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
10446 reg-cf.o and reg-m68k.o.
10447 * configure: Regenerated.
10448
fd7dd3e6
PA
104492009-11-16 Pedro Alves <pedro@codesourcery.com>
10450
10451 * linux-low.c (linux_remove_process): Add `detaching' parameter.
10452 Pass it to thread_db_free.
10453 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
10454 proper `detaching' argument to linux_remove_process.
10455 * linux-low.h (thread_db_free): Add `detaching' parameter.
10456 * thread-db.c (thread_db_init): Pass false as `detaching' argument
10457 to thread_db_free.
10458 (thread_db_free): Add `detaching' parameter. Only
10459 call td_ta_clear_event if detaching from process.
10460
75aa492e
MK
104612009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
10462
10463 * thread-db.c (thread_db_free): Fix typo.
10464
21e1bee4
PP
104652009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
10466
10467 PR gdb/10838
10468 * thread-db.c (thread_db_free): Call td_ta_clear_event.
10469
8838b45e
NS
104702009-11-03 Nathan Sidwell <nathan@codesourcery.com>
10471
10472 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
10473 with an i686 compiler.
10474 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
10475 needed.
10476 * configure: Rebuilt.
10477
8a35fb51
SL
104782009-10-29 Sandra Loosemore <sandra@codesourcery.com>
10479
10480 PR gdb/10783
10481
10482 * server.c (handle_search_memory_1): Correct read_addr initialization
10483 in loop for searching subsequent chunks.
10484
96f15937
PP
104852009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
10486
10487 * configure.ac: New --with-libthread-db option.
10488 * thread-db.c: Allow direct dependence on libthread_db.
10489 (thread_db_free): Adjust.
10490 * config.in: Regenerate.
10491 * configure: Likewise.
889bf7c5 10492
5f7d1694
PP
104932009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
10494
10495 PR gdb/10757
10496 * thread-db.c (attach_thread): New function.
10497 (maybe_attach_thread): Return success/failure.
10498 (find_new_threads_callback): Adjust.
889bf7c5
PA
10499 (thread_db_find_new_threads): Loop until no new threads.
10500
88e3b899
PA
105012009-10-13 Pedro Alves <pedro@codesourcery.com>
10502
10503 * proc-service.c (ps_lgetregs): Formatting.
10504
cdbfd419
PP
105052009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
10506
10507 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
10508 * configure.ac: Adjust.
10509 * linux-low.h (struct process_info_private): Move members to struct
10510 thread_db.
10511 (thread_db_free, thread_db_handle_monitor_command): New prototype.
10512 * linux-low.c (linux_remove_process): Adjust.
10513 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
10514 * server.c (handle_query): Move code ...
10515 (handle_monitor_command): ... here. New function.
10516 * target.h (struct target_ops): New member.
10517 * thread-db.c (struct thread_db): New.
10518 (libthread_db_search_path): New variable.
10519 (thread_db_create_event, thread_db_enable_reporting)
10520 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
10521 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
10522 (try_thread_db_load_1, dladdr_to_soname): New functions.
10523 (try_thread_db_load, thread_db_load_search): New functions.
10524 (thread_db_init): Search for libthread_db.
10525 (thread_db_free): New function.
10526 (thread_db_handle_monitor_command): Likewise.
10527 * config.in: Regenerate.
10528 * configure: Regenerate.
889bf7c5 10529
4168d2d6
UW
105302009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
10531
10532 * spu-low.c (spu_kill): Wait for inferior to terminate.
10533 Call clear_inferiors.
10534 (spu_detach): Call clear_inferiors.
10535
81ecdfbb
RW
105362009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10537
10538 * aclocal.m4: Regenerate.
10539 * config.in: Likewise.
10540 * configure: Likewise.
10541
0b9ff2c0
UW
105422009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10543
10544 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
10545 (parse_spufs_run): New function.
10546 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
10547 (ppc_breakpoint_at): Handle SPU breakpoints.
10548
efcbbd14
UW
105492009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10550
10551 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
10552 (SPUFS_MAGIC): Define.
10553 (spu_enumerate_spu_ids): New function.
10554 (linux_qxfer_spu): New function.
10555 (linux_target_ops): Install linux_qxfer_spu.
10556
f4d9bade
UW
105572009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
10558
10559 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
10560 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
10561 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
10562 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
10563 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
10564 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
10565 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
10566 (init_registers_powerpc_cell32l): Add prototype.
10567 (init_registers_powerpc_cell64l): Likewise.
10568 (ppc_arch_setup): Detect Cell/B.E. architecture.
10569
96e946ca
RW
105702009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10571
10572 * Makefile.in (datarootdir): New variable.
10573
58d6951d
DJ
105742009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10575
10576 * linux-low.c (linux_write_memory): Update debugging output.
10577 * Makefile.in (clean): Add new descriptions.
10578 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
10579 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
10580 * configure.srv: Add new files for arm*-*-linux*.
10581 * linux-arm-low.c: Add new declarations.
10582 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
10583 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
10584 (HWCAP_VFPv3D16): New.
10585 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
10586 instead of __IWMMXT__.
10587 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
10588 (arm_arch_setup): New.
10589 (target_regsets): Remove #ifdef. Add VFP regset.
10590 (the_low_target): Use arm_arch_setup.
10591
12b42a12
DJ
105922009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
10593
10594 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
10595 the main thread again.
10596
ac8c974e
AR
105972009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
10598
10599 Adding Neutrino gdbserver.
10600 * configure: Regenerated.
10601 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
10602 * configure.srv (i[34567]86-*-nto*): New target.
10603 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
10604 * remote-utils.c [__QNX__]: Include sys/iomgr.h
10605 (nto_comctrl) [__QNX__]: New function.
10606 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
10607
4424e0c3 106082009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
10609
10610 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
10611 srv_tgtobj.
10612
912cf4ba
PA
106132009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
10614 Pedro Alves <pedro@codesourcery.com>
10615
10616 * win32-i386-low.c (i386_get_thread_context): Handle systems that
10617 don't support CONTEXT_EXTENDED_REGISTERS.
10618 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
10619 (the_low_target): Install them.
10620 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
10621 failing with ERROR_PIPE_NOT_CONNECTED.
10622
aa5ca48f
DE
106232009-06-30 Doug Evans <dje@google.com>
10624 Pierre Muller <muller@ics.u-strasbg.fr>
10625
10626 Add h/w watchpoint support to x86-linux, win32-i386.
10627 * Makefile.in (SFILES): Add i386-low.c
10628 (i386_low_h): Define.
10629 (i386-low.o): Add dependencies.
10630 (linux-x86-low.o): Add i386-low.h dependency.
10631 (win32-i386-low.o): Ditto.
10632 * i386-low.c: New file.
10633 * i386-low.h: New file.
10634 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
10635 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
10636 * linux-low.c (linux_add_process): Initialize arch_private.
10637 (linux_remove_process): Free arch_private.
10638 (add_lwp): Initialize arch_private.
10639 (delete_lwp): Free arch_private.
10640 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
10641 provided.
10642 * linux-low.h (process_info_private): New member arch_private.
10643 (lwp_info): New member arch_private.
10644 (linux_target_ops): New members new_process, new_thread,
10645 prepare_to_resume.
10646 (ptid_of): New macro.
10647 * linux-x86-low.c: Include stddef.h, i386-low.h.
10648 (arch_process_info): New struct.
10649 (arch_lwp_info): New struct.
10650 (x86_linux_dr_get, x86_linux_dr_set): New functions.
10651 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10652 (i386_dr_low_get_status): New function.
10653 (x86_insert_point, x86_remove_point): New functions.
10654 (x86_stopped_by_watchpoint): New function.
10655 (x86_stopped_data_address): New function.
10656 (x86_linux_new_process, x86_linux_new_thread): New functions.
10657 (x86_linux_prepare_to_resume): New function.
10658 (the_low_target): Add entries for insert_point, remove_point,
10659 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
10660 prepare_to_resume.
10661 * server.c (debug_hw_points): New global.
10662 (monitor_show_help): Document set debug-hw-points.
10663 (handle_query): Process "set debug-hw-points".
10664 * server.h (debug_hw_points): Declare.
10665 (paddress): Declare.
10666 * utils.c (NUMCELLS, CELLSIZE): New macros.
10667 (get_sell, xsnprintf, paddress): New functions.
10668 * win32-arm-low.c (the_low_target): Add entries for insert_point,
10669 remove_point, stopped_by_watchpoint, stopped_data_address.
10670 * win32-i386-low.c: Include i386-low.h.
10671 (debug_reg_state): Replaces dr.
10672 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
10673 (i386_dr_low_get_status): New function.
10674 (i386_insert_point, i386_remove_point): New functions.
10675 (i386_stopped_by_watchpoint): New function.
10676 (i386_stopped_data_address): New function.
10677 (i386_initial_stuff): Update.
10678 (get_thread_context,set_thread_context,i386_thread_added): Update.
10679 (the_low_target): Add entries for insert_point,
10680 remove_point, stopped_by_watchpoint, stopped_data_address.
10681 * win32-low.c (win32_insert_watchpoint): New function.
10682 (win32_remove_watchpoint): New function.
10683 (win32_stopped_by_watchpoint): New function.
10684 (win32_stopped_data_address): New function.
10685 (win32_target_ops): Add entries for insert_watchpoint,
10686 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
10687 * win32-low.h (win32_target_ops): New members insert_point,
10688 remove_point, stopped_by_watchpoint, stopped_data_address.
10689
d993e290
PA
106902009-06-25 Pedro Alves <pedro@codesourcery.com>
10691
10692 * server.c (process_serial_event): Re-return unsupported, not
10693 error, if the type isn't recognized. Re-allow supporting only
10694 insert or remove packets. Also call require_running for
10695 breakpoints. Add missing break statement to default case. Tidy.
10696 * target.h (struct target_ops): Rename insert_watchpoint to
10697 insert_point, and remove_watchpoint to remove_point.
10698
10699 * linux-low.h (struct linux_target_ops): Likewise.
10700 * linux-low.c (linux_insert_watchpoint): Rename to ...
10701 (linux_insert_point): ... this. Adjust.
10702 (linux_remove_watchpoint): Rename to ...
10703 (linux_remove_point): ... this. Adjust.
10704 (linux_target_ops): Adjust.
10705 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
10706 (cris_insert_point): ... this.
10707 (cris_remove_watchpoint): Rename to ...
10708 (cris_remove_point): ... this.
10709 (the_low_target): Adjust.
10710
0f54c268
PM
107112009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
10712
10713 * server.c (handle_v_kill): Pass signal_pid to
10714 kill_inferior if multi_process is zero.
10715
c6314022
AR
107162009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
10717
10718 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
10719 * target.h (target_ops): Comment for *_watchpoint to make it clear
10720 the functions can get types '0' and '1'.
10721
4463ce24
AR
107222009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
10723
10724 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
10725 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
10726 * regcache.c (get_regcache): Likewise.
10727 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
10728 * win32-low.c (child_fetch_inferior_registers): Remove check for
10729 regno 0.
10730
cf8fd78b
PA
107312009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
10732 Pedro Alves <pedro@codesourcery.com>
10733
10734 * target.h (struct target_ops) <supports_multi_process>: New
10735 callback.
10736 (target_supports_multi_process): New.
10737 * server.c (handle_query): Even if GDB reports support, only
10738 enable multi-process if the target also supports it. Report
10739 multi-process support only if the target backend supports it.
10740 * linux-low.c (linux_supports_multi_process): New function.
10741 (linux_target_ops): Install it as target_supports_multi_process
10742 callback.
10743
47c0c975
DE
107442009-05-24 Doug Evans <dje@google.com>
10745
e09875d4
DE
10746 Global renaming of find_thread_pid to find_thread_ptid.
10747 * server.h (find_thread_ptid): Renamed from find_thread_pid.
10748 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
10749 All callers updated.
10750
e27d73f6
DE
10751 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
10752 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
10753 directly.
10754
47c0c975
DE
10755 * linux-low.c (get_stop_pc): Print pc if debug_threads.
10756 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
10757 (linux_resume_one_lwp): Ditto.
10758
2acc282a
DE
107592009-05-23 Doug Evans <dje@google.com>
10760
10761 * linux-low.c (linux_resume_one_lwp): Change type of first arg
10762 from struct inferior_list_entry * to struct lwp_info *.
10763 All callers updated.
10764
9f1036c1
DE
107652009-05-13 Doug Evans <dje@google.com>
10766
10767 * linux-x86-low.c: Don't include assert.h.
10768 (x86_siginfo_fixup): Use fatal, not assert.
10769 (x86_arch_setup): Fix comment.
10770
d0722149
DE
107712009-05-12 Doug Evans <dje@google.com>
10772
10773 Biarch support for i386/amd64 gdbserver.
10774 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
10775 Add linux-x86-low.c.
10776 (linux-i386-low.o, linux-x86-64-low.o): Delete.
10777 (linux-x86-low.o): Add.
10778 * linux-x86-64-low.c: Delete.
10779 * linux-i386-low.c: Delete.
10780 * linux-x86-low.c: New file.
10781 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
10782 linux-x86-low.o.
10783 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
10784 linux-x86-low.o.
10785 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
10786 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
10787 (linux_child_pid_to_exec_file): New function.
10788 (elf_64_header_p, elf_64_file_p): New functions.
10789 (siginfo_fixup): New function.
10790 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
10791 give target a chance to convert layout.
10792 * linux-low.h (linux_target_ops): New member siginfo_fixup.
10793 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
10794
fdeb2a12
DE
107952009-05-07 Doug Evans <dje@google.com>
10796
10797 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
10798 (regsets_store_inferior_registers): Ditto.
10799
a6dbe5df
PA
108002009-05-06 Pedro Alves <pedro@codesourcery.com>
10801
10802 PR server/10048
10803
10804 * linux-low.c (must_set_ptrace_flags): Delete.
10805 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
10806 of the global.
10807 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
10808 `lwp->must_set_ptrace_flags' instead.
ba42693b 10809 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
10810 (linux_wait_1): ... not here.
10811
5091eb23
DE
108122009-04-30 Doug Evans <dje@google.com>
10813
9f767825
DE
10814 * inferiors.c (started_inferior_callback): New function.
10815 (attached_inferior_callback): New function.
10816 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
10817 * server.c (print_started_pid, print_attached_pid): New functions.
10818 (detach_or_kill_for_exit): New function.
10819 (main): Call it instead of for_each_inferior (kill_inferior_callback).
10820 * server.h (have_started_inferiors_p): Declare.
10821 (have_attached_inferiors_p): Declare.
10822
5091eb23
DE
10823 * inferiors.c (remove_process): Fix memory leak, free process.
10824 * linux-low.c (linux_remove_process): New function.
10825 (linux_kill): Call it instead of remove_process.
10826 (linux_detach, linux_wait_1): Ditto.
10827
155c8968
PA
108282009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
10829
10830 * configure.srv: Add x86 Windows CE target.
10831
7fe519cb
UW
108322009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10833
10834 * inferiors.c (get_thread_process): Make global.
10835 * server.h (get_thread_process): Add prototype.
10836 * thread-db.c (find_one_thread): Use get_thread_process
10837 instead of current_process.
10838 (thread_db_get_tls_address): Do not crash if called when
10839 thread layer is not yet initialized.
10840
5472f405
UW
108412009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
10842
10843 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
10844 * spu-low.c (current_tid): Rename to ...
10845 (current_ptid): ... this.
10846 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
10847 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
10848 ptid_get_lwp (current_ptid) instead of current_tid.
10849 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
10850 instead of current_tid. Use find_process_pid to verify pid
10851 argument is valid. Pass proper argument to remove_process.
10852 (spu_thread_alive): Compare current_ptid instead of current_tid.
10853 (spu_resume): Likewise.
10854
55ac2b99
PA
108552009-04-02 Pedro Alves <pedro@codesourcery.com>
10856
10857 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
10858 variable.
10859
95954743
PA
108602009-04-01 Pedro Alves <pedro@codesourcery.com>
10861
10862 Implement the multiprocess extensions, and add linux multiprocess
10863 support.
10864
10865 * server.h (ULONGEST): Declare.
10866 (struct ptid, ptid_t): New.
10867 (minus_one_ptid, null_ptid): Declare.
10868 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10869 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
10870 (struct inferior_list_entry): Change `id' type from unsigned from
10871 to ptid_t.
10872 (struct sym_cache, struct breakpoint, struct
10873 process_info_private): Forward declare.
10874 (struct process_info): Declare.
10875 (current_process): Declare.
10876 (all_processes): Declare.
10877 (initialize_inferiors): Declare.
10878 (add_thread): Adjust to use ptid_t.
10879 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
10880 (add_process, remove_process, find_thread_pid): Declare.
10881 (find_inferior_id): Adjust to use ptid_t.
10882 (cont_thread, general_thread, step_thread): Change type to ptid_t.
10883 (multi_process): Declare.
10884 (push_event): Adjust to use ptid_t.
10885 (read_ptid, write_ptid): Declare.
10886 (prepare_resume_reply): Adjust to use ptid_t.
10887 (clear_symbol_cache): Declare.
10888 * inferiors.c (all_processes): New.
10889 (null_ptid, minus_one_ptid): New.
10890 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
10891 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
10892 (add_thread): Change unsigned long to ptid. Remove gdb_id
10893 parameter. Adjust.
10894 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
10895 (gdb_id_to_thread): Rename to ...
10896 (find_thread_pid): ... this. Change unsigned long to ptid.
10897 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
10898 (loaded_dll, pull_pid_from_list): Adjust.
10899 (add_process, remove_process, find_process_pid)
10900 (get_thread_process, current_process, initialize_inferiors): New.
10901 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
10902 (struct target_waitstatus) <related_pid>: Ditto.
10903 (struct target_ops) <kill, detach>: Add `pid' argument. Change
10904 return type to int.
10905 (struct target_ops) <join>: Add `pid' argument.
10906 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
10907 (struct target_ops) <wait>: Add `ptid' field. Change return type
10908 to ptid.
10909 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
10910 (mywait): Add `ptid' argument. Change return type to ptid_t.
10911 (target_pid_to_str): Declare.
10912 * target.c (set_desired_inferior): Adjust to use ptids.
10913 (mywait): Add new `ptid' argument. Adjust.
10914 (target_pid_to_str): New.
10915 * mem-break.h (free_all_breakpoints): Declare.
10916 * mem-break.c (breakpoints): Delelete.
10917 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
10918 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
10919 to use per-process breakpoint list.
10920 (free_all_breakpoints): New.
10921 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
10922 (symbol_cache, all_symbols_looked_up): Delete.
10923 (hexchars): New.
10924 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
10925 read_ptid): New.
10926 (prepare_resume_reply): Change ptid argument's type from unsigned
10927 long to ptid_t. Adjust. Implement W;process and X;process.
10928 (free_sym_cache, clear_symbol_cache): New.
10929 (look_up_one_symbol): Adjust to per-process symbol cache. *
10930 * server.c (cont_thread, general_thread, step_thread): Change type
10931 to ptid_t.
10932 (attached): Delete.
10933 (multi_process): New.
10934 (last_ptid): Change type to ptid_t.
10935 (struct vstop_notif) <ptid>: Change type to ptid_t.
10936 (queue_stop_reply, push_event): Change `ptid' argument's type to
10937 ptid_t.
10938 (discard_queued_stop_replies): Add `pid' argument.
10939 (start_inferior): Adjust to use ptids. Adjust to mywait interface
10940 changes. Don't reference the `attached' global.
10941 (attach_inferior): Adjust to mywait interface changes.
10942 (handle_query): Adjust to use ptids. Parse GDB's qSupported
10943 features. Handle and report "multiprocess+". Handle
10944 "qAttached:PID".
10945 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
10946 changes.
10947 (handle_v_kill): New.
10948 (handle_v_stopped): Adjust to use target_pid_to_str.
10949 (handle_v_requests): Allow multiple attaches and runs when
10950 multiprocess extensions are in effect. Handle "vKill".
10951 (myresume): Adjust to use ptids.
10952 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
10953 (handle_status): Adjust to discard_queued_stop_replies interface
10954 change.
10955 (first_thread_of, kill_inferior_callback)
10956 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
10957 (main): Call initialize_inferiors. Adjust to use ptids, killing
10958 and detaching from all inferiors. Handle multiprocess packet
10959 variants.
10960 * linux-low.h: Include gdb_proc_service.h.
10961 (struct process_info_private): New.
10962 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
10963 <lwpid_of>: Use ptid_get_lwp.
10964 (get_lwp_thread): Adjust.
10965 (struct lwp_info): Add `dead' member.
10966 (find_lwp_pid): Declare.
10967 * linux-low.c (thread_db_active): Delete.
10968 (new_inferior): Adjust comment.
10969 (inferior_pid): Delete.
10970 (linux_add_process): New.
10971 (handle_extended_wait): Adjust.
10972 (add_lwp): Change unsigned long to ptid.
10973 (linux_create_inferior): Add process to processes table. Adjust
10974 to use ptids. Don't set new_inferior here.
10975 (linux_attach_lwp): Rename to ...
10976 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
10977 it. Adjust to use ptids.
10978 (linux_attach_lwp): New.
10979 (linux_attach): Add process to processes table. Don't set
10980 new_inferior here.
10981 (struct counter): New.
10982 (second_thread_of_pid_p, last_thread_of_process_p): New.
10983 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
10984 multiple processes.
10985 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
10986 processes. Remove process from process table.
10987 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
10988 to multiple processes.
10989 (any_thread_of): New.
10990 (linux_detach): Add `pid' argument, and handle it. Remove process
10991 from processes table.
10992 (linux_join): Add `pid' argument. Handle it.
10993 (linux_thread_alive): Change unsighed long argument to ptid_t.
10994 Consider dead lwps as not being alive.
10995 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
10996 threads we're not interested in.
10997 (same_lwp, find_lwp_pid): New.
10998 (linux_wait_for_lwp): Change `pid' argument's type from int to
10999 ptid_t. Adjust.
11000 (linux_wait_for_event): Rename to ...
11001 (linux_wait_for_event_1): ... this. Change `pid' argument's type
11002 from int to ptid_t. Adjust.
11003 (linux_wait_for_event): New.
11004 (linux_wait_1): Add `ptid' argument. Change return type to
11005 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
11006 that exit from the process table.
11007 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
11008 Adjust.
11009 (mark_lwp_dead): New.
11010 (wait_for_sigstop): Adjust to use ptids. If a process exits while
11011 stopping all threads, mark its main lwp as dead.
11012 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
11013 ptids.
11014 (fetch_register, usr_store_inferior_registers)
11015 (regsets_fetch_inferior_registers)
11016 (regsets_store_inferior_registers, linux_read_memory)
11017 (linux_write_memory): Inline `inferior_pid'.
11018 (linux_look_up_symbols): Adjust to use per-process
11019 `thread_db_active'.
11020 (linux_request_interrupt): Adjust to use ptids.
11021 (linux_read_auxv): Inline `inferior_pid'.
11022 (initialize_low): Don't reference thread_db_active.
11023 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
11024 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
11025 (ps_getpid): Return the pid of the current inferior.
11026 * thread-db.c (proc_handle, thread_agent): Delete.
11027 (thread_db_create_event, thread_db_enable_reporting): Adjust to
11028 per-process data.
11029 (find_one_thread): Change argument type to ptid_t. Adjust to
11030 per-process data.
11031 (maybe_attach_thread): Adjust to per-process data and ptids.
11032 (thread_db_find_new_threads): Ditto.
11033 (thread_db_init): Ditto.
11034 * spu-low.c (spu_create_inferior, spu_attach): Add process to
11035 processes table. Adjust to use ptids.
11036 (spu_kill, spu_detach): Adjust interface. Remove process from
11037 processes table.
11038 (spu_join, spu_thread_alive): Adjust interface.
11039 (spu_wait): Adjust interface. Remove process from processes
11040 table. Adjust to use ptids.
11041 * win32-low.c (current_inferior_tid): Delete.
11042 (current_inferior_ptid): New.
11043 (debug_event_ptid): New.
11044 (thread_rec): Take a ptid. Adjust.
11045 (child_add_thread): Add `pid' argument. Adjust to use ptids.
11046 (child_delete_thread): Ditto.
11047 (do_initial_child_stuff): Add `attached' argument. Add process to
11048 processes table.
11049 (child_fetch_inferior_registers, child_store_inferior_registers):
11050 Adjust.
11051 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
11052 (win32_attach): Pass 1 to do_initial_child_stuff.
11053 (win32_kill): Adjust interface. Remove process from processes
11054 table.
11055 (win32_detach): Ditto.
11056 (win32_join): Adjust interface.
11057 (win32_thread_alive): Take a ptid.
11058 (win32_resume): Adjust to use ptids.
11059 (get_child_debug_event): Ditto.
11060 (win32_wait): Adjust interface. Remove exiting process from
11061 processes table.
11062
bd99dc85
PA
110632009-04-01 Pedro Alves <pedro@codesourcery.com>
11064
11065 Non-stop mode support.
11066
11067 * server.h (non_stop): Declare.
11068 (gdb_client_data, handler_func): Declare.
11069 (delete_file_handler, add_file_handler, start_event_loop):
11070 Declare.
11071 (handle_serial_event, handle_target_event, push_event)
11072 (putpkt_notif): Declare.
11073 * target.h (enum resume_kind): New.
11074 (struct thread_resume): Replace `step' field by `kind' field.
11075 (TARGET_WNOHANG): Define.
11076 (struct target_ops) <wait>: Add `options' argument.
11077 <supports_non_stop, async, start_non_stop>: New fields.
11078 (target_supports_non_stop, target_async): New.
11079 (start_non_stop): Declare.
11080 (mywait): Add `options' argument.
11081 * target.c (mywait): Add `options' argument. Print child exit
11082 notifications here.
11083 (start_non_stop): New.
11084 * server.c (non_stop, own_buf, mem_buf): New globals.
11085 (struct vstop_notif): New.
11086 (notif_queue): New global.
11087 (queue_stop_reply, push_event, discard_queued_stop_replies)
11088 (send_next_stop_reply): New.
11089 (start_inferior): Adjust to use resume_kind. Adjust to mywait
11090 interface changes.
11091 (attach_inferior): In non-stop mode, don't wait for the target
11092 here.
11093 (handle_general_set): Handle QNonStop.
11094 (handle_query): When handling qC, return the current general
11095 thread, instead of the first thread of the list.
11096 (handle_query): If the backend supports non-stop mode, include
11097 QNonStop+ in the qSupported query response.
11098 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
11099 and non-stop mode.
11100 (handle_v_attach, handle_v_run): Handle non-stop mode.
11101 (handle_v_stopped): New.
11102 (handle_v_requests): Report support for vCont;t. Handle vStopped.
11103 (myresume): Adjust to use resume_kind. Handle non-stop.
11104 (queue_stop_reply_callback): New.
11105 (handle_status): Handle non-stop mode.
11106 (main): Clear non_stop flag on reconnection. Use the event-loop.
11107 Refactor serial protocol handling from here ...
11108 (process_serial_event): ... to this new function. When GDB
11109 selects any thread, select one here. In non-stop mode, wait until
11110 GDB acks all pending events before exiting.
11111 (handle_serial_event, handle_target_event): New.
11112 * remote-utils.c (remote_open): Install remote_desc in the event
11113 loop.
11114 (remote_close): Remove remote_desc from the event loop.
11115 (putpkt_binary): Rename to...
11116 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
11117 (putpkt_binary): New as wrapper around putpkt_binary_1.
11118 (putpkt_notif): New.
11119 (prepare_resume_reply): In non-stop mode, don't change the
11120 general_thread.
11121 * event-loop.c: New.
11122 * Makefile.in (OBJ): Add event-loop.o.
11123 (event-loop.o): New rule.
11124
11125 * linux-low.h (pid_of): Moved here.
11126 (lwpid_of): New.
11127 (get_lwp_thread): Use lwpid_of.
11128 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
11129 * linux-low.c (pid_of): Delete.
11130 (inferior_pid): Use lwpid_of.
11131 (linux_event_pipe): New.
11132 (target_is_async_p): New.
11133 (delete_lwp): New.
11134 (handle_extended_wait): Use lwpid_of.
11135 (add_lwp): Don't set lwpid field.
11136 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
11137 (linux_kill_one_lwp): If killing a running lwp, stop it first.
11138 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
11139 (linux_detach_one_lwp): If detaching from a running lwp, stop it
11140 first. Adjust to linux_wait_for_event interface changes. Use
11141 lwpid_of.
11142 (linux_detach): Don't delete the main lwp here.
11143 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
11144 (status_pending_p): Don't consider explicitly suspended lwps.
11145 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
11146 pointer. Add OPTIONS argument. Change return type to int. Use
11147 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
11148 (linux_wait_for_event): Take an integer pid instead of a lwp_info
11149 pointer. Add status pointer argument. Return a pid instead of a
11150 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
11151 changes. In non-stop mode, don't switch to a random thread.
11152 (linux_wait): Rename to...
11153 (linux_wait_1): ... this. Add target_options argument, and handle
11154 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
11155 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
11156 clean exit and signal exit code. Don't stop all threads in
11157 non-stop mode. In all-stop mode, only stop all threads when
11158 reporting a stop to GDB. Handle explicit thread stop requests.
11159 (async_file_flush, async_file_mark): New.
11160 (linux_wait): New.
11161 (send_sigstop): Use lwpid_of.
11162 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
11163 interface changes. In non-stop mode, don't switch to a random
11164 thread.
11165 (linux_resume_one_lwp): Use lwpid_of.
11166 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
11167 (linux_resume_one_thread): ... this. Handle resume_stop. In
11168 non-stop mode, don't look for pending flag in all threads.
11169 (resume_status_pending_p): Don't consider explicitly suspended
11170 threads.
11171 (my_waitpid): Reimplement. Emulate __WALL.
11172 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11173 Use lwpid_of.
11174 (sigchld_handler, linux_supports_non_stop, linux_async)
11175 (linux_start_non_stop): New.
11176 (linux_target_ops): Register linux_supports_non_stop, linux_async
11177 and linux_start_non_stop.
11178 (initialize_low): Install SIGCHLD handler.
11179 * thread-db.c (thread_db_create_event, find_one_thread)
11180 (thread_db_get_tls_address): Use lwpid_of.
11181 * win32-low.c (win32_detach): Adjust to use resume_kind.
11182 (win32_wait): Add `options' argument.
11183 * spu-low.c (spu_resume): Adjust to use resume_kind.
11184 (spu_wait): Add `options' argument.
11185
5b1c542e
PA
111862009-04-01 Pedro Alves <pedro@codesourcery.com>
11187
11188 Decouple target code from remote protocol.
11189
11190 * target.h (enum target_waitkind): New.
11191 (struct target_waitstatus): New.
11192 (struct target_ops) <wait>: Return an unsigned long. Take a
11193 target_waitstatus pointer instead of a char pointer.
11194 (mywait): Likewise.
11195 * target.c (mywait): Change prototype to return an unsigned long.
11196 Take a target_waitstatus pointer instead of a char pointer. Adjust.
11197 * server.h (thread_from_wait, old_thread_from_wait): Delete
11198 declarations.
11199 (prepare_resume_reply): Change prototype to take a
11200 target_waitstatus.
11201 * server.c (thread_from_wait, old_thread_from_wait): Delete.
11202 (last_status, last_ptid): New.
11203 (start_inferior): Remove "statusptr" argument. Adjust. Return a
11204 pid instead of a signal.
11205 (attach_inferior): Remove "status" and "signal" parameters.
11206 Adjust.
11207 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
11208 not as an address.
11209 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
11210 (handle_v_requests, myresume): Remove "status" and "signal"
11211 parameters. Adjust.
11212 (handle_status): New.
11213 (main): Delete local `status'. Adjust.
11214 * remote-utils.c: Include target.h.
11215 (prepare_resume_reply): Change prototype to take a
11216 target_waitstatus. Adjust.
11217
11218 * linux-low.c (linux_wait): Adjust to new target_ops->wait
11219 interface.
11220 * spu-low.c (spu_wait): Adjust.
11221 * win32-low.c (enum target_waitkind, struct target_waitstatus):
11222 Delete.
11223 (win32_wait): Adjust.
11224
2bd7c093
PA
112252009-04-01 Pedro Alves <pedro@codesourcery.com>
11226
11227 * target.h (struct thread_resume): Delete leave_stopped member.
11228 (struct target_ops): Add a `n' argument to the `resume' callback.
11229 * server.c (start_inferior): Adjust.
11230 (handle_v_cont, myresume): Adjust.
11231 * linux-low.c (check_removed_breakpoint): Adjust to resume
11232 interface change, and to removed leave_stopped field.
11233 (resume_ptr): Delete.
11234 (struct thread_resume_array): New.
11235 (linux_set_resume_request): Add new `arg' parameter. Adjust to
11236 resume interface change.
11237 (linux_continue_one_thread, linux_queue_one_thread)
11238 (resume_status_pending_p): Check if the resume field is NULL
11239 instead of checking the leave_stopped member.
11240 (linux_resume): Adjust to the target resume interface change.
11241 * spu-low.c (spu_resume): Adjust to the target resume interface
11242 change.
11243 * win32-low.c (win32_detach, win32_resume): Ditto.
11244
c35fafde
PA
112452009-04-01 Pedro Alves <pedro@codesourcery.com>
11246
11247 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
11248 flag.
11249 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
11250 pending.
11251 (linux_continue_one_thread): Only preserve the stepping flag if
11252 there's a pending breakpoint.
11253
0a59d50b
PA
112542009-03-31 Pedro Alves <pedro@codesourcery.com>
11255
11256 * server.c (main): After the inferior having exited, call
11257 remote_close before exiting gdbserver.
11258
f04c6d38
TJB
112592009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
11260
11261 Fix size of FPSCR in Power 7 processors.
11262 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
11263 (PPC_FEATURE_HAS_DFP): New #define.
11264 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
11265 size of the FPSCR.
11266
78e5cee6
PA
112672009-03-23 Pedro Alves <pedro@codesourcery.com>
11268
11269 * server.c (handle_query) Whitespace and formatting.
11270
1b3f6016
PA
112712009-03-22 Pedro Alves <pedro@codesourcery.com>
11272
11273 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
11274 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
11275 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
11276 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
11277 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
11278 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
11279 Makefile.in, configure.ac: Fix whitespace throughout.
11280 * configure: Regenerate.
11281
a07b2135
PA
112822009-03-22 Pedro Alves <pedro@codesourcery.com>
11283
11284 * inferiors.c (find_inferior): Make it safe for the callback
11285 function to delete the currently iterated inferior.
11286
67cc2626
PA
112872009-03-22 Pedro Alves <pedro@codesourcery.com>
11288
11289 * Makefile.in (linuw_low_h): Move higher.
11290 (thread-db.o): Depend on $(linux_low_h).
11291
54a0b537
PA
112922009-03-17 Pedro Alves <pedro@codesourcery.com>
11293
11294 Rename "process" to "lwp" throughout.
11295
11296 * linux-low.c (all_processes): Rename to...
11297 (all_lwps): ... this.
11298 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
11299 (add_process): Rename to ...
11300 (add_lwp): ... this. Adjust.
11301 (linux_create_inferior): Adjust.
11302 (linux_attach_lwp): Adjust.
11303 (linux_attach): Adjust.
11304 (linux_kill_one_process): Rename to ...
11305 (linux_kill_one_lwp): ... this. Adjust.
11306 (linux_kill): Adjust.
11307 (linux_detach_one_process): Rename to ...
11308 (linux_detach_one_lwp): ... this. Adjust.
11309 (linux_detach): Adjust.
11310 (check_removed_breakpoint): Adjust.
11311 (status_pending_p): Adjust.
11312 (linux_wait_for_process): Rename to ...
11313 (linux_wait_for_lwp): ... this. Adjust.
11314 (linux_wait_for_event): Adjust.
11315 (send_sigstop): Adjust.
11316 (wait_for_sigstop): Adjust.
11317 (stop_all_processes): Rename to ...
11318 (stop_all_lwps): ... this.
11319 (linux_resume_one_process): Rename to ...
11320 (linux_resume_one_lwp): ... this. Adjust.
11321 (linux_set_resume_request, linux_continue_one_thread)
11322 (linux_queue_one_thread, resume_status_pending_p)
11323 (usr_store_inferior_registers, regsets_store_inferior_registers)
11324 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
11325 Adjust.
11326 * linux-low.h (get_process): Rename to ...
11327 (get_lwp): ... this. Adjust.
11328 (get_thread_process): Rename to ...
11329 (get_thread_lwp): ... this. Adjust.
11330 (get_process_thread): Rename to ...
11331 (get_lwp_thread): ... this. Adjust.
11332 (struct process_info): Rename to ...
11333 (struct lwp_info): ... this.
11334 (all_processes): Rename to ...
11335 (all_lwps): ... this.
11336 * proc-service.c (ps_lgetregs): Adjust.
11337 * thread-db.c (thread_db_create_event, find_one_thread)
11338 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
11339
0b16c5cf
PA
113402009-03-14 Pedro Alves <pedro@codesourcery.com>
11341
11342 * server.c (handle_query): Handle "qAttached".
11343
32de4b9d
NS
113442009-03-13 Nathan Sidwell <nathan@codesourcery.com>
11345
11346 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
11347 GPLv3, update license URL.
11348
2aecd87f
DE
113492009-03-01 Doug Evans <dje@google.com>
11350
93efd302 11351 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
11352 (server_h): Add gdb_signals.h.
11353 (signals.o): Update.
11354 * server.h (target_signal_from_host,target_signal_to_host_p)
11355 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
11356
86b1f9c5
PM
113572009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
11358
11359 * remote-utils.c (getpkt): Also generate remote-debug
11360 information if noack_mode is set.
11361
4aa995e1
PA
113622009-02-06 Pedro Alves <pedro@codesourcery.com>
11363
11364 * server.c (handle_query): Report qXfer:siginfo:read and
11365 qXfer:siginfo:write as supported and handle them.
11366 * target.h (struct target_ops) <qxfer_siginfo>: New field.
11367 * linux-low.c (linux_xfer_siginfo): New.
11368 (linux_target_ops): Set it.
11369
62709adf
PA
113702009-01-26 Pedro Alves <pedro@codesourcery.com>
11371
11372 * server.c (gdbserver_usage): Mention --remote-debug.
11373 (main): Accept '--remote-debug' switch.
11374
aef93bd7
DE
113752009-01-18 Doug Evans <dje@google.com>
11376
11377 * regcache.c (new_register_cache): No need to check result of xcalloc.
11378 * server.c (handle_search_memory): Back out calls to xmalloc,
11379 result is checked and error is returned to user upon failure.
11380 (handle_query): Ditto. Add more checks for result of malloc.
11381 (handle_v_cont): Check result of malloc, report error back to
11382 user upon failure.
11383 (handle_v_run): Ditto. Call freeargv.
11384 * server.h (freeargv): Declare.
11385 * utils.c (freeargv): New fn.
11386
54363045
DE
113872009-01-15 Doug Evans <dje@google.com>
11388
f626972c
DE
11389 * gdbreplay.c (perror_with_name): Make arg const char *.
11390 * server.h (target_signal_to_name): Make return type const char *.
0842e787 11391 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 11392 * utils.c (perror_with_name): Make arg const char *.
54363045 11393
18aae699
PA
113942009-01-14 Pedro Alves <pedro@codesourcery.com>
11395
11396 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
11397 when handling a EXIT_PROCESS_DEBUG_EVENT.
11398
ff703abe
JB
113992009-01-06 Joel Brobecker <brobecker@adacore.com>
11400
11401 * gdbreplay.c (gdbreplay_version): Update copyright year.
11402 * server.c (gdbserver_version): Likewise.
11403
f21cc1a2 114042009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
11405
11406 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 11407 (handle_extended_wait): Improve comment.
0e21c1ec 11408
bca929d3
DE
114092008-12-13 Doug Evans <dje@google.com>
11410
11411 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
11412 * server.h (ATTR_MALLOC): New macro.
11413 (xmalloc,xcalloc,xstrdup): Declare.
11414 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
11415 * inferiors.c: Ditto.
11416 * linux-low.c: Ditto.
11417 * mem-break.c: Ditto.
11418 * regcache.c: Ditto.
11419 * remote-utils.c: Ditto.
11420 * server.c: Ditto.
11421 * target.c: Ditto.
11422 * win32-low.c: Ditto.
11423
97438e3f
DE
114242008-12-12 Doug Evans <dje@google.com>
11425
896c7fbb
DE
11426 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
11427 in debugging printf.
11428
97438e3f
DE
11429 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
11430
e3b886f8
DE
114312008-12-09 Doug Evans <dje@google.com>
11432
11433 * linux-low.h (struct process_info): Delete member tid, unused.
11434 * thread-db.c (find_one_thread): Update.
11435 (maybe_attach_thread): Update.
11436
07e059b5
VP
114372008-12-02 Pedro Alves <pedro@codesourcery.com>
11438
889bf7c5
PA
11439 * target.h (struct target_ops): Add qxfer_osdata member.
11440 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
11441 and dirent.h.
11442 (linux_qxfer_osdata): New functions.
11443 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
11444 callback.
11445 * server.c (handle_query): Handle "qXfer:osdata:read:".
11446 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
11447 (buffer_xml_printf): New functions.
11448 * server.h (struct buffer): New.
11449 (buffer_grow_str, buffer_grow_str0): New macros.
11450 (buffer_grow, buffer_free, buffer_init, buffer_finish)
11451 (buffer_xml_printf): Declare.
07e059b5 11452
4cab47ab
DE
114532008-11-24 Doug Evans <dje@google.com>
11454
11455 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
11456
f142445f
DJ
114572008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * server.c (handle_v_run): Always use the supplied argument list.
11460
d0107bb6 114612008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 11462
d0107bb6
BW
11463 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
11464 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 11465
2c4ad781
TJB
114662008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
11467
11468 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
11469 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
11470 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
11471 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
11472 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
11473 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
11474 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
11475 XML target descriptions.
11476 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
11477 when inferior is running on an ISA 2.05 or later processor. Add
11478 special case to return offset for full 64-bit slot of FPSCR when
11479 in 32-bits.
11480
dfb64f85
DJ
114812008-11-14 Daniel Gutson <dgutson@codesourcery.com>
11482
11483 * Makefile.in (SFILES, clean): Added sparc64 files.
11484 (reg-sparc64.o, reg-sparc64.c): New.
11485 * configure.srv (sparc*-*-linux*): New configuration.
11486 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
11487 syscall arguments for SPARC.
11488 (regsets_store_inferior_registers): Likewise.
11489 * linux-sparc-low.c: New file.
11490
66b6e1dd
DE
114912008-10-21 Doug Evans <dje@google.com>
11492
11493 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
11494 (READLINE_DIR,READLINE_DEP): Delete.
11495 (INTERNAL_CFLAGS): Update.
11496 (LINTFLAGS): Update.
11497
9b710a42
PA
114982008-10-10 Pedro Alves <pedro@codesourcery.com>
11499
11500 * server.c (handle_v_run): If GDB didn't specify an argv, use the
11501 whole argv from the last run, not just argv[0].
11502
5822d809
PA
115032008-09-08 Pedro Alves <pedro@codesourcery.com>
11504
11505 * regcache.c (new_register_cache): Return NULL if the register
11506 cache size isn't known yet.
11507 (free_register_cache): Avoid dereferencing a NULL regcache.
11508
74aac56f
DJ
115092008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11510
11511 * configure.srv: Merge MIPS and MIPS64.
11512
400b20f5
MR
115132008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
11514
11515 * Makefile.in (uninstall): Apply $(EXEEXT) too.
11516
677c5bb1
LM
115172008-08-18 Luis Machado <luisgpm@br.ibm.com>
11518
11519 * Makefile.in: Add required vsx dependencies.
11520
11521 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
11522 Declare init_registers_powerpc_vsx32l.
11523 Declare init_registers_powerpc_vsx64l.
11524 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
11525 (ppc_arch_setup): Check for VSX in hwcap.
11526 (ppc_fill_vsxregset): New function.
11527 (ppc_store_vsxregset): New function.
11528 Add new VSX entry in regset_info target_regsets.
11529
11530 * configure.srv: Add new VSX dependencies.
11531
a6f3e723
SL
115322008-08-12 Pedro Alves <pedro@codesourcery.com>
11533
11534 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
11535 (remote_open): Set or clear transport_is_reliable.
11536 (putpkt_binary): Don't expect acks in noack mode.
11537 (getpkt): Don't send ack/nac in noack mode.
11538 * server.c (handle_general_set): Handle QStartNoAckMode.
11539 (handle_query): If connected by tcp pass QStartNoAckMode+ in
11540 qSupported.
11541 (main): Reset noack_mode on every connection.
11542 * server.h (noack_mode): Declare.
11543
a417dc56
RW
115442008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
11545
11546 * Makefile.in (GDBREPLAY_OBS): New variable.
11547 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
11548
3221518c
UW
115492008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
11550 Daniel Jacobowitz <dan@codesourcery.com>
11551
11552 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
11553 (usr_store_inferior_registers): Likewise.
11554 (regsets_store_inferior_registers): Likewise.
11555
ec56be1b
PA
115562008-07-31 Rolf Jansen <rj@surtec.com>
11557 Pedro Alves <pedro@codesourcery.com>
11558
11559 * configure.ac: Check for memmem declaration.
11560 * server.c [HAVE_MALLOC_H]: Include malloc.h.
11561 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
11562 (disable_packet_qfThreadInfo): Unconditionally compile.
11563 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
11564 * configure, config.in: Regenerate.
11565
2fe5e3ff
DE
115662008-07-28 Doug Kwan <dougkwan@google.com>
11567
11568 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
11569 (linux_write_memory): Remove declaration of errno.
11570
836acd6d
UW
115712008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
11572
11573 * linux-low.c (handle_extended_wait): Do not use "status"
11574 variable uninitialized.
11575
aeba519e
PA
115762008-07-07 Pedro Alves <pedro@codesourcery.com>
11577
11578 * server.c (handle_v_attach): Inhibit reporting dll changes.
11579
db42f210
PA
115802008-06-27 Pedro Alves <pedro@codesourcery.com>
11581
11582 * remote-utils.c (prepare_resume_reply): If requested, don't
11583 output "thread:TID" in the T stop reply.
11584
11585 * server.c (disable_packet_vCont, disable_packet_Tthread)
11586 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
11587 (handle_query): If requested, disable support for qC, qfThreadInfo
11588 and qsThreadInfo.
11589 (handle_v_requests): If requested, disable support for vCont.
11590 (gdbserver_show_disableable): New.
11591 (main): Handle --disable-packet and --disable-packet=LIST.
11592
11593 * server.h (disable_packet_vCont, disable_packet_Tthread)
11594 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
11595
8e4c5421
CD
115962008-06-20 Carlos O'Donell <carlos@codesourcery.com>
11597
11598 * server.c (gdbserver_usage): Mention --version.
11599
6e23a804
DJ
116002008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
11601
11602 * Makefile.in (gdbreplay.o): New rule.
11603
90aa6a40
JM
116042008-06-06 Joseph Myers <joseph@codesourcery.com>
11605
11606 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
11607 message, not gdbserver.
11608
c16158bc 116092008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
11610 Nathan Sidwell <nathan@codesourcery.com>
11611 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
11612
11613 * acinclude.m4: Include ../../config/acx.m4.
11614 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
11615 * configure, config.in: Regenerate.
11616 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
11617 * server.c (gdbserver_version): Print PKGVERSION.
11618 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
11619 (main): Adjust gdbserver_usage calls.
11620 * gdbreplay.c (version, host_name): Add declarations.
11621 (gdbreplay_version, gdbreplay_usage): New.
11622 (main): Accept --version and --help options.
11623
aeb75bf5
DJ
116242008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
11625
11626 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
11627 (arm_breakpoint_at): Handle Thumb.
11628 (the_low_target): Add comment.
11629
76b233dd
UW
116302008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
11631
11632 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
11633
08388c79
DE
116342008-05-09 Doug Evans <dje@google.com>
11635
a3c83fae
DE
11636 * server.h (decode_search_memory_packet): Declare.
11637 * remote-utils.c (decode_search_memory_packet): New fn.
11638 * server.c (handle_search_memory_1): New fn.
08388c79
DE
11639 (handle_search_memory): New fn.
11640 (handle_query): Process qSearch:memory packets.
11641
bb9c3d36
UW
116422008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
11643
11644 * regcache.c (registers_length): Remove.
11645 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
11646 full register packet.
11647 * regcache.h (registers_length): Remove prototype.
11648 * server.h (PBUFSIZ): Define to 16384.
11649
7284e1be
UW
116502008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
11651
11652 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
11653 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
11654 powerpc-64l.o, and powerpc-altivec64l.o.
11655 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
11656 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
11657 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
11658 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
11659 rs6000/power-linux.xml, and rs6000/power64-linux.xml
11660 to srv_xmlfiles.
11661
11662 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
11663 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
11664 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
11665 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
11666 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
11667 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
11668 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
11669 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
11670 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
11671 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
11672 (clean): Update.
11673
11674 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
11675 (init_registers_powerpc_32l): ... this new prototype.
11676 (init_registers_powerpc_32): Remove, replace by ...
11677 (init_registers_powerpc_altivec32l): ... this new prototype.
11678 (init_registers_powerpc_e500): Remove, replace by ...
11679 (init_registers_powerpc_e500l): ... this new prototype.
11680 (init_registers_ppc64): Remove, replace by ...
11681 (init_registers_powerpc_64l): ... this new prototype.
11682 (init_registers_powerpc_64): Remove, replace by ...
11683 (init_registers_powerpc_altivec64l): ... this new prototype.
11684 (ppc_num_regs): Set to 73.
11685 (PT_ORIG_R3, PT_TRAP): Define if necessary.
11686 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
11687 (ppc_cannot_store_register): Handle orig_r3 and trap.
11688 (ppc_arch_setup): Update init_registers_... calls.
11689 (ppc_fill_gregset): Handle orig_r3 and trap.
11690
11691 * inferiors.c (clear_inferiors): Reset current_inferior.
11692
fdc59709
PB
116932008-04-23 Paolo Bonzini <bonzini@gnu.org>
11694
889bf7c5
PA
11695 * acinclude.m4: Add override.m4.
11696 * configure: Regenerate.
fdc59709 11697
c9b2f845
UW
116982008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11699
11700 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
11701 initial call to init_register_ppc64.
11702
550512b8
UW
117032008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
11704
43aaf8b6
PA
11705 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
11706 single powerpc*-*-linux* case.
550512b8
UW
11707 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
11708
b6430ec3
UW
117092008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
11710
11711 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 11712 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
11713 from reg_xmlfiles.
11714 * linux-ppc-low.c: Include <elf.h>.
11715 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
11716 (ppc_hwcap): New global variable.
11717 (ppc_regmap): Remove __SPE__ #ifdef sections.
11718 (ppc_regmap_e500): New global variable.
11719 (ppc_cannot_store_register): Update __SPE__ special case.
11720 (ppc_get_hwcap): New function.
11721 (ppc_arch_setup): Use it to determine whether inferior supports
11722 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
11723 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
11724 Do not access registers if target does not support AltiVec.
11725 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
11726 Do not access registers if target does not support SPE.
11727 (target_regsets): Unconditionally include AltiVec and SPE regsets.
11728
52fa2412
UW
117292008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
11730
11731 * linux-low.c (disabled_regsets, num_regsets): New.
11732 (use_regsets_p): Delete.
11733 (linux_wait_for_process): Clear disabled_regsets.
11734 (regsets_fetch_inferior_registers): Check and set it.
11735 (regsets_store_inferior_registers): Likewise.
11736 (linux_fetch_registers, linux_store_registers): Do not use
11737 use_regsets_p.
11738 (initialize_low): Allocate disabled_regsets.
11739
e28b3332
DJ
117402008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
11741
11742 * Makefile.in (LIBOBJS): New.
11743 (OBS): Use LIBOBJS.
11744 (memmem.o): New rule.
11745 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
11746 * configure: Regenerated.
11747
4536995d
UW
117482008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
11749
11750 * server.c (handle_query): Never return "unsupported" for
11751 qXfer:features:read queries.
11752
221c031f
UW
117532008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
11754
11755 * server.c (get_features_xml): Fix inverted condition.
11756 (handle_query): Always support qXfer:feature:read.
11757
ccd213ac
DJ
117582008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
11759
11760 * server.c (wrapper_argv): New.
11761 (start_inferior): Handle wrapper_argv. If set, expect an extra
11762 trap.
11763 (gdbserver_usage): Document --wrapper.
11764 (main): Parse --wrapper.
11765
6fe305f7
UW
117662008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11767
11768 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
11769 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
11770 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
11771 (ppc_set_pc): Likewise.
11772 (ppc_arch_setup): New function.
11773 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
11774 of collect_register.
889bf7c5 11775 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 11776
5b0a002e
UW
117772008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11778
11779 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
11780 instead of linux-ppc64-low.o.
11781 * linux-ppc64-low.c: Remove file.
11782 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
11783 (linux-ppc64-low.o): Remove rule.
11784
11785 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
11786 (init_registers_powerpc_64): Likewise.
11787 (ppc_regmap): Conditionally define depending on __powerpc64__.
11788 (ppc_cannot_store_register): Do not special-case "fpscr" when
11789 compiled on __powerpc64__.
11790 (ppc_collect_ptrace_register): New function.
11791 (ppc_supply_ptrace_register): New function.
11792 (ppc_breakpoint): Change type to "unsigned int".
11793 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
11794 (the_low_target): Conditionally provide initializers for the
889bf7c5 11795 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
11796 collect_ptrace_register and supply_ptrace_register members.
11797
9b4b61c8
UW
117982008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
11799
11800 * regcache.h (gdbserver_xmltarget): Add extern declaration.
11801 * server.c (gdbserver_xmltarget): Define.
11802 (get_features_xml): Use it to replace "target.xml" and arch_string.
11803
11804 * configure.srv: Remove srv_xmltarget. Add XML files that were
11805 mentioned there to srv_xmlfiles instead. Remove conditional tests
11806 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
11807 srv_xmlfiles and srv_regobj to include all possible choices.
11808 * configure.ac (srv_xmltarget): Remove.
11809 (srv_xmlfiles): Do not add "target.xml".
11810 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
11811 checks for supplementary target information.
11812 * configure: Regenerate.
11813 * Makefile.in (XML_TARGET): Remove.
11814 (target.xml): Remove rule.
11815 (clean): Do not clean up target.xml.
11816 (.PRECIOUS): Do not mention target.xml.
11817
11818 * target.h (struct target_ops): Remove arch_string member.
11819 * linux-low.c (linux_arch_string): Remove.
11820 (linux_target_ops): Remove arch_string initializer.
11821 * linux-low.h (struct linux_target_ops): Remove arch_string member.
11822 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
11823 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
11824 * spu-low.c (spu_arch_string): Remove.
11825 (spu_target_ops): Remove arch_string initializer.
11826 * win32-low.c (win32_arch_string): Remove.
11827 (win32_target_ops): Remove arch_string initializer.
11828 * win32-low.h (struct win32_target_ops): Remove arch_string member.
11829 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
11830 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
11831
ee1a7ae4
UW
118322008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11833
11834 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
11835 by collect_ptrace_register and supply_ptrace_register hooks.
11836 * linux-low.c (fetch_register): Use supply_ptrace_register callback
11837 instead of checking for the_low_target.left_pad_xfer.
11838 (usr_store_inferior_registers): Use collect_ptrace_register callback
11839 instead of checking for the_low_target.left_pad_xfer.
11840
11841 * linux-s390-low.c (s390_collect_ptrace_register): New function.
11842 (s390_supply_ptrace_register): Likewise.
11843 (s390_fill_gregset): Call s390_collect_ptrace_register.
11844 (the_low_target): Update.
11845
11846 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
11847 (ppc_supply_ptrace_register): Likewise.
11848 (the_low_target): Update.
11849
11850 * linux-i386-low.c (the_low_target): Update.
11851 * linux-x86-64-low.c (the_low_target): Update.
11852
d61ddec4
UW
118532008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11854
11855 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
11856 reg-s390.o and reg-s390x.o.
11857
11858 * linux-low.c (new_inferior): New global variable.
11859 (linux_create_inferior, linux_attach): Set it.
11860 (linux_wait_for_process): Call the_low_target.arch_setup after the
11861 target has stopped for the first time.
11862 (initialize_low): Do not call the_low_target.arch_setup.
11863
11864 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
11865 (s390_set_pc): Likewise.
11866 (s390_arch_setup): New function.
11867 (the_low_target): Use s390_arch_setup as arch_setup routine.
11868
11869 * regcache.c (realloc_register_cache): New function.
11870 (set_register_cache): Call it for each existing regcache.
11871
d05b4ac3
UW
118722008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
11873
11874 * server.h (init_registers): Remove prototype.
11875
11876 * linux-low.h (struct linux_target_ops): Add arch_setup field.
11877 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
11878 instead of init_registers ().
11879 * linux-arm-low.c (init_registers_arm): Add prototype.
11880 (init_registers_arm_with_iwmmxt): Likewise.
11881 (the_low_target): Add initializer for arch_setup field.
11882 * linux-cris-low.c (init_registers_cris): Add prototype.
11883 (the_low_target): Add initializer for arch_setup field.
11884 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
11885 (the_low_target): Add initializer for arch_setup field.
11886 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
11887 (the_low_target): Add initializer for arch_setup field.
11888 * linux-ia64-low.c (init_registers_ia64): Add prototype.
11889 (the_low_target): Add initializer for arch_setup field.
11890 * linux-m32r-low.c (init_registers_m32r): Add prototype.
11891 (the_low_target): Add initializer for arch_setup field.
11892 * linux-m68k-low.c (init_registers_m68k): Add prototype.
11893 (the_low_target): Add initializer for arch_setup field.
11894 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
11895 (init_registers_mips64_linux): Likewise.
11896 (the_low_target): Add initializer for arch_setup field.
11897 * linux-ppc-low.c (init_registers_ppc): Add prototype.
11898 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
11899 (the_low_target): Add initializer for arch_setup field.
11900 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
11901 (init_registers_powerpc_64): Likewise.
11902 (the_low_target): Add initializer for arch_setup field.
11903 * linux-s390-low.c (init_registers_s390): Add prototype.
11904 (init_registers_s390x): Likewise.
11905 (the_low_target): Add initializer for arch_setup field.
11906 * linux-sh-low.c (init_registers_sh): Add prototype.
11907 (the_low_target): Add initializer for arch_setup field.
11908 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
11909 (the_low_target): Add initializer for arch_setup field.
11910 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
11911 (the_low_target): Add initializer for arch_setup field.
11912
11913 * win32-low.h (struct win32_target_ops): Add arch_setup field.
11914 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
11915 instead of init_registers ().
11916 * win32-arm-low.c (init_registers_arm): Add prototype.
11917 (the_low_target): Add initializer for arch_setup field.
11918 * win32-i386-low.c (init_registers_i386): Add prototype.
11919 (the_low_target): Add initializer for arch_setup field.
11920
11921 * spu-low.c (init_registers_spu): Add prototype.
11922 (initialize_low): Call initialie_registers_spu () instead of
11923 initialize_registers ().
11924
fd96d250
PA
119252008-02-19 Pedro Alves <pedro@codesourcery.com>
11926
11927 * server.c (handle_v_requests): When handling the vRun and vAttach
11928 packets, if already debugging a process, don't kill it. Return an
11929 error instead.
11930
d41b6bb4
DJ
119312008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
11932
11933 * server.c (handle_query): Correct length check.
11934
5ac588cf
PA
119352008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
11936
11937 * win32-low.c (do_initial_child_stuff): Add process handle
11938 parameter. Set current_process_handle and current_process_id from the
11939 parameters. Clear globals.
11940 (win32_create_inferior): Don't set current_process_handle and
11941 current_process_id here. Instead pass them on the call to
11942 do_initial_child_stuff.
11943 (win32_attach): Likewise.
11944 (win32_clear_inferiors): New.
11945 (win32_kill): Don't close the current process handle or the
11946 current thread handle here. Instead call win32_clear_inferiors.
11947 (win32_detach): Don't open a new handle to the process. Call
11948 win32_clear_inferiors.
11949 (win32_join): Don't rely on current_process_handle; open a new
11950 handle using the process id.
11951 (win32_wait): Call win32_clear_inferiors when the inferior process
11952 has exited.
11953
ecd7ecbc
DJ
119542008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
11955
11956 * server.c (monitor_show_help): Add "exit".
11957
1525d545
MG
119582008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
11959
ecd7ecbc 11960 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
11961 (clean): Add reg-xtensa.c.
11962 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
11963 * configure.srv (xtensa*-*-linux*) New target.
11964 * linux-xtensa-low.c: New.
11965 * xtensa-xtregs.c: New.
1525d545 11966
59a016f0
PA
119672008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
11968
11969 * hostio.c: Don't include errno.h.
11970 (errno_to_fileio_errno): Move to hostio-errno.
11971 * hostio.c: (hostio_error): Remove the error parameter. Defer the
11972 error number outputting to the target->hostio_last_error callback.
11973 (hostio_packet_error): Use FILEIO_EINVAL directly.
11974 (handle_open, handle_pread, hostio_error, handle_unlink): Update
11975 calls to hostio_error.
11976 * hostio-errno.c: New.
11977 * server.h (hostio_last_error_from_errno): Declare.
11978 * target.h (target_ops): Add hostio_last_error member.
11979 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
11980 as hostio_last_error handler.
889bf7c5 11981 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
11982 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
11983 (wince_hostio_last_error): New functions.
11984 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
11985 as hostio_last_error handler.
11986 (win32_target_ops) [!_WIN32_WCE]: Register
11987 hostio_last_error_from_errno as hostio_last_error handler.
11988 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
11989 (hostio-errno.o): New rule.
11990 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
11991 * configure.srv (srv_hostio_err_objs): New variable. Default to
11992 hostio-errno.o.
11993 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
11994 * configure: Regenerate.
11995
2d717e4f
DJ
119962008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11997
11998 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
11999 (linux_kill, linux_detach): Clean up the process list.
12000 * remote-utils.c (remote_open): Improve port number parsing.
12001 (putpkt_binary, input_interrupt): Only send interrupts if the target
12002 is running.
12003 * server.c (extended_protocol): Make static.
12004 (attached): Define earlier.
12005 (exit_requested, response_needed, program_argv): New variables.
12006 (target_running): New.
12007 (start_inferior): Clear attached here.
12008 (attach_inferior): Set attached here.
12009 (require_running): Define.
12010 (handle_query): Use require_running and target_running. Implement
12011 "monitor exit".
12012 (handle_v_attach, handle_v_run): New.
12013 (handle_v_requests): Use require_running. Handle vAttach and vRun.
12014 (gdbserver_usage): Update.
12015 (main): Redo argument parsing. Handle --debug and --multi. Handle
12016 --attach along with other options or after the port. Save
12017 program_argv. Support no initial program. Resynchronize
12018 communication with GDB after an error. Handle "monitor exit".
12019 Use require_running and target_running. Always allow the extended
12020 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
12021 restart in extended mode.
12022 * README: Refer to the GDB manual. Update --attach usage.
12023
7407e2de
AS
120242007-12-20 Andreas Schwab <schwab@suse.de>
12025
12026 * linux-low.c (STACK_SIZE): Define.
12027 (linux_tracefork_child): Use it. Use __clone2 on ia64.
12028 (linux_test_for_tracefork): Likewise.
12029
b65d95c5
DJ
120302007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
12031
12032 * linux-low.c (linux_wait_for_event): Update messages. Do not
12033 reinsert auto-delete breakpoints.
12034 * mem-break.c (struct breakpoint): Change return type of handler to
12035 int.
12036 (set_breakpoint_at): Update handler type.
12037 (reinsert_breakpoint_handler): Return 1 instead of calling
12038 delete_breakpoint.
12039 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
12040 setting a new one.
12041 (check_breakpoints): Delete auto-delete breakpoints and return 2.
12042 * mem-break.h (set_breakpoint_at): Update handler type.
12043 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
12044 * win32-low.c (auto_delete_breakpoint): New.
12045 (get_child_debug_event): Use it.
12046
4e799345
DJ
120472007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
12048
12049 * configure.ac: Check for pread and pwrite.
12050 * hostio.c (handle_pread): Fall back to lseek and read.
12051 (handle_pwrite): Fall back to lseek and write.
12052 * config.in, configure: Regenerated.
12053
27524b67
DJ
120542007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
12055
12056 * server.c (myresume): Add own_buf argument.
12057 (main): Update calls.
12058
a20d5e98
DJ
120592007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
12060
12061 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
12062 * remote-utils.c (remote_open): Do not call disable_async_io.
12063 (block_async_io): Delete.
12064 (unblock_async_io): Make static.
12065 (initialize_async_io): New.
12066 * server.c (handle_v_cont): Handle async I/O here.
12067 (myresume): Likewise. Move other common resume tasks here...
12068 (main): ... from here. Call initialize_async_io. Disable async
12069 I/O before the main loop.
12070 * server.h (initialize_async_io): Declare.
12071 (block_async_io, unblock_async_io): Delete prototypes.
12072 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
12073
b79d787e
DJ
120742007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
12075
12076 * remote-utils.c (readchar): Allow binary data in received messages.
12077
d97903b2
PA
120782007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12079
12080 * win32-low.c (attaching): New global.
12081 (win32_create_inferior): Clear the `attaching' global.
12082 (win32_attach): Set the `attaching' global.
12083 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
12084 attaching. Only set a breakpoint at the entry point if not
12085 attaching.
12086
311de423
PA
120872007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12088
12089 * server.c (main): Don't report dll events on the initial
12090 connection on attaches.
12091
6c2d16d2
PA
120922007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12093
12094 * server.c (main): Relax numerical bases supported for the pid of
12095 the --attach command line argument.
12096
5ca906e6
PA
120972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12098
12099 * win32-low.c (win32_attach): Call OpenProcess before
12100 DebugActiveProcess, not after. Add last error output to error
12101 call.
12102
9c6c8194
PA
121032007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
12104
12105 * win32-low.c (win32_get_thread_context)
12106 (win32_set_thread_context): New functions.
12107 (thread_rec): Use win32_get_thread_context.
12108 (continue_one_thread, win32_resume): Use win32_set_thread_context.
12109 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
12110 field.
12111
4d5d1aaa
PA
121122007-12-03 Leo Zayas
12113 Pedro Alves <pedro_alves@portugalmail.pt>
12114
12115 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
12116 global variables.
12117 (child_add_thread): Minor cleanup.
12118 (child_continue): Resume artificially suspended threads before
12119 calling ContinueDebugEvent.
12120 (suspend_one_thread): New.
12121 (fake_breakpoint_event): New.
12122 (get_child_debug_event): Change return type to int. Check here if
12123 gdb sent an interrupt request. If a soft interrupt was requested,
12124 fake a breakpoint event. Return 0 if there is no event to handle,
12125 and 1 otherwise.
12126 (win32_wait): Don't check here if gdb sent an interrupt request.
12127 Ensure there is a valid event to handle.
12128 (win32_request_interrupt): Add soft interruption method as last
12129 resort.
12130
c436e841
PA
121312007-12-03 Leo Zayas
12132 Pedro Alves <pedro_alves@portugalmail.pt>
12133
12134 * win32-low.h (win32_thread_info): Add descriptions to the
12135 structure members. Replace `suspend_count' counter by a
12136 `suspended' flag.
12137 * win32-low.c (thread_rec): Update condition of when to get the
12138 context from the inferior. Rely on ContextFlags being set if it
12139 has already been retrieved. Only suspend the inferior thread if
12140 we haven't already. Warn if that fails.
12141 (continue_one_thread): s/suspend_count/suspended/. Only call
12142 ResumeThread once. Warn if that fails.
12143
e7b5fa67
PA
121442007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12145
12146 * win32-low.c (win32_wait): Don't read from the inferior when it
12147 has already exited.
12148
a385171d
PA
121492007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
12150
12151 * Makefile.in (win32_low_h): New variable.
12152 (win32-low.o): Add dependency on $(win32_low_h).
12153 (win32-arm-low.o, win32-i386-low.o): New rules.
12154
f80c84b3
DJ
121552007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12156
12157 * hostio.c: Correct copyright year.
12158
a6b151f1
DJ
121592007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
12160
12161 * Makefile.in (OBS): Add hostio.o.
12162 (hostio.o): New rule.
12163 * server.h (handle_vFile): Declare.
12164 * hostio.c: New file.
12165 * server.c (handle_v_requests): Take packet_len and new_packet_len
12166 for binary packets. Call handle_vFile.
12167 (main): Update call to handle_v_requests.
12168
f9387fc3
DJ
121692007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
12170
12171 * linux-low.c: Include <sched.h>.
12172
51c2684e
DJ
121732007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
12174
12175 * linux-low.c (linux_tracefork_grandchild): New.
12176 (linux_tracefork_child): Use clone.
12177 (linux_test_for_tracefork): Use clone; allocate and free a stack.
12178
75f83163
JB
121792007-10-31 Joel Brobecker <brobecker@adacore.com>
12180
12181 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
12182
da5898ce
DJ
121832007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
12184
12185 * linux-low.c (handle_extended_wait): Handle unexpected signals.
12186
24a09b5f
DJ
121872007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
12188
12189 * inferiors.c (change_inferior_id): Delete.
12190 (add_pid_to_list, pull_pid_from_list): New.
12191 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
12192 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
12193 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
12194 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
12195 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
12196 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
12197 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
12198 (using_threads): Always set to 1.
12199 (handle_extended_wait): New.
12200 (add_process): Do not set TID.
12201 (linux_create_inferior): Set must_set_ptrace_flags.
12202 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
12203 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
12204 (linux_thread_alive): Rename TID argument to LWPID.
12205 (linux_wait_for_process): Handle unknown processes. Do not use TID.
12206 (linux_wait_for_event): Do not use TID or check using_threads. Update
12207 call to dead_thread_notify. Call handle_extended_wait.
12208 (linux_create_inferior): Use PTRACE_SETOPTIONS.
12209 (send_sigstop): Delete sigstop_sent.
12210 (wait_for_sigstop): Avoid TID.
12211 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
12212 (linux_test_for_tracefork): New.
12213 (linux_lookup_signals): Use thread_db_active and
12214 linux_supports_tracefork_flag.
12215 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
12216 * linux-low.h (get_process_thread): Avoid TID.
12217 (struct process_ifo): Move thread_known and tid to the end. Remove
12218 sigstop_sent.
12219 (linux_attach_lwp, thread_db_init): Update prototypes.
12220 * server.h (change_inferior_id): Delete prototype.
12221 (add_pid_to_list, pull_pid_from_list): New prototypes.
12222 * thread-db.c (thread_db_use_events): New.
12223 (find_first_thread): Rename to...
12224 (find_one_thread): ...this. Update callers and messages. Do not
12225 call fatal. Check thread_db_use_events. Do not call
12226 change_inferior_id or new_thread_notify.
12227 (maybe_attach_thread): Update. Do not call new_thread_notify.
12228 (thread_db_init): Set thread_db_use_events. Check use_events.
12229 * utils.c (fatal, warning): Correct message prefix.
12230
30ed0a8f
DJ
122312007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
12232
12233 * Makefile.in (clean): Remove new files.
12234 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
12235 (powerpc-64.o, powerpc-64.c): New rules.
12236 * configure.srv: Use alternate register sets for powerpc64-*-linux*
12237 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
12238 with SPE.
12239 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
12240 SPE targets.
12241 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
12242 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
12243 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
12244 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
12245 (target_regsets): Add AltiVec and SPE register sets.
12246 * configure.ac: Check for AltiVec and SPE.
12247 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
12248 (ppc_fill_vrregset, ppc_store_vrregset): New.
12249 (target_regsets): Add AltiVec register set.
12250 * configure: Regenerated.
12251
fd462a61
DJ
122522007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
12253
12254 * linux-low.c (O_LARGEFILE): Define.
12255 (linux_read_memory): Use /proc/PID/mem.
12256 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
12257 * configure, config.in: Regenerated.
12258
69f223ed
DJ
122592007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
12260
12261 * linux-low.c (linux_wait_for_event): Do not pass signals while
12262 single-stepping.
12263
aec18585
PA
122642007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12265
12266 * win32-low.c (create_process): New.
12267 (win32_create_inferior): Use create_process instead of
12268 CreateProcess. If create_process failed retry appending an ".exe"
12269 suffix. Store the GetLastError result immediatelly after
12270 create_process calls and use it on the call to error.
12271
34d86ddd
PA
122722007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
12273
12274 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
12275
5a0e3bd0
JB
122762007-08-23 Joel Brobecker <brobecker@adacore.com>
12277
12278 * configure.ac: Switch license to GPLv3.
12279
f88c79e6
MS
122802007-08-01 Michael Snyder <msnyder@access-company.com>
12281
12282 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
12283
6b3d9b83
PA
122842007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
12285
12286 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
12287 typedef.
12288 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
12289 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
12290 CloseToolhelp32Snapshot.
12291 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
12292 CloseToolhelp32Snapshot.
12293
c588c53c
MS
122942007-07-27 Michael Snyder <michael.snyder@access-company.com>
12295
12296 * server.c (main): Check for inferior exit before main loop.
12297
aa0403d9
PA
122982007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
12299
12300 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
12301 instead of on tmp_desc.
12302
255e7678
DJ
123032007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
12304 Daniel Jacobowitz <dan@codesourcery.com>
12305
12306 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
12307 (add_thread): Minor cleanups.
12308 (clear_inferiors): Move lower in the file. Clear the DLL
12309 list.
12310 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
12311 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
12312 (xml_escape_text): New.
12313 * server.c (handle_query): Handle qXfer:libraries:read. Report it
12314 for qSupported.
12315 (handle_v_cont): Report errors.
12316 (gdbserver_version): Update.
12317 (main): Correct size of own_buf. Do not report initial DLL events.
12318 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
12319 (unloaded_dll, xml_escape_text): New.
12320 * win32-low.c (enum target_waitkind): Update comments.
12321 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
12322 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
12323 (win32_EnumProcessModules, win32_GetModuleInformation)
12324 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
12325 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
12326 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
12327 (win32_Module32First, win32_Module32Next, load_toolhelp)
12328 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
12329 (get_child_debug_event): Handle DLL events.
12330 (win32_wait): Likewise.
12331
0d37add9
DJ
123322007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12333
12334 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
12335 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
12336
45e2715e
PA
123372007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12338
12339 * win32-low.c (handle_output_debug_string): Ignore event if not
12340 waiting.
12341
c5674cf1
PA
123422007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
12343
12344 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
12345
2bbe3cc1
DJ
123462007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
12347
12348 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
12349
ae13219e
DJ
123502007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
12351
12352 * inferiors.c (change_inferior_id): Add comment.
12353 * linux-low.c (check_removed_breakpoint): Add an early
12354 prototype. Improve debug output.
12355 (linux_attach): Doc update.
12356 (linux_detach_one_process, linux_detach): Clean up before releasing
12357 each process.
12358 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
12359 * linux-low.h (struct process_info): Doc improvement.
12360 * mem-break.c (delete_all_breakpoints): New.
12361 * mem-break.h (delete_all_breakpoints): New prototype.
12362 * thread-db.c (find_first_thread): New.
12363 (thread_db_create_event): Call it instead of
12364 thread_db_find_new_threads. Clean up unused variables.
12365 (maybe_attach_thread): Remove first thread handling.
12366 (thread_db_find_new_threads): Use find_first_thread.
12367 (thread_db_get_tls_address): Likewise.
12368
4105de34
DJ
123692007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
12370
12371 * thread-db.c (thread_db_find_new_threads): Add prototype.
12372 (thread_db_create_event): Check for the main thread before adding
12373 a new thread.
12374 (maybe_attach_thread): Only enable event reporting if TID == 0.
12375 (thread_db_get_tls_address): Check for new threads.
12376
2b876972
DJ
123772007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
12378
12379 * linux-low.c (linux_create_inferior): Try execv before execvp.
12380 * spu-low.c (spu_create_inferior): Likewise.
12381
7a245884
DJ
123822007-06-13 Mike Frysinger <vapier@gentoo.org>
12383
12384 * linux-low.c (linux_create_inferior): Change execv to execvp.
12385 * spu-low.c (spu_create_inferior): Likewies.
12386
117ce543
DJ
123872007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
12388
12389 * Makefile.in (clean): Clean new files instead of deleted ones.
12390 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
12391 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
12392 rules.
12393 * configure.srv: Specify XML files and new regformats for MIPS and
12394 MIPS64 GNU/Linux.
12395 * linux-mips-low.c (mips_num_regs): Set to only used registers.
12396 (mips_regmap): Do not fetch $0. Remove unused registers. Add
12397 an entry for the restart register.
12398 (mips_cannot_fetch_register, mips_cannot_store_register)
12399 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
12400 register names to match the XML descriptions.
12401 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
12402 restart register instead of $0.
12403
0e7f50da
UW
124042007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12405 Markus Deuling <deuling@de.ibm.com>
12406
12407 * remote-utils.c (decode_xfer_write): New function.
12408 * server.h (decode_xfer_write): Add prototype.
12409 * server.c (handle_query): Add PACKET_LEN argument. Support
12410 qXfer:spu:read and qXfer:spu:write packets.
12411 (main): Pass packet_len to handle_query.
12412 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
12413 * target.h (target_ops): Add qxfer_spu.
12414
374c1d38
UW
124152007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
12416
12417 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
12418 accessing non-seekable spufs files.
12419
bb63802a
UW
124202007-05-16 Markus Deuling <deuling@de.ibm.com>
12421
889bf7c5 12422 * server.c (handle_query): Add reply for qC packet.
bb63802a 12423
7390519e
PA
124242007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12425 Leo Zayas <lerele@champenstudios@com>
12426
12427 * server.h (check_remote_input_interrupt_request): New function.
12428 * remote_utils.c (INVALID_DESCRIPTOR): New define.
12429 (remote_desc): Initialize with INVALID_DESCRIPTOR.
12430 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
12431 (check_remote_input_interrupt_request): New function.
12432 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 12433 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
12434 winapi_GenerateConsoleCtrlEvent): New typedefs.
12435 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
12436 to 250 ms.
12437 (win32_wait): Check for remote interrupt request
12438 with check_remote_input_interrupt_request.
12439 (win32_request_interrupt): New function.
12440 (win32_target_op): Set request_interrupt to win32_request_interrupt.
12441
34b34921
PA
124422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12443
12444 * win32-low.c (debug_registers_changed,
12445 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
12446 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
12447 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
12448 (thread_rec): Get context using the low target.
12449 (child_add_thread): Call thread_added on the low target,
12450 which does the same thing.
12451 (regptr): Delete.
12452 (do_initial_child_stuff): Remove debug registers references.
12453 Set context using the low target. Resume threads after
12454 setting the contexts.
12455 (child_continue): Remove dead variable. Remove debug
12456 registers references.
12457 (child_fetch_inferior_registers): Go through the low target.
12458 (do_child_store_inferior_registers): Remove.
12459 (child_store_inferior_registers): Go through the low target.
12460 (win32_resume): Remove debug registers references.
12461 Set context using the low target.
12462 (handle_exception): Change return type to void. Don't record
12463 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
12464 first chance exception.
889bf7c5 12465 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
12466 goto loop. Always return after waiting for debug event.
12467 (win32_wait): Convert to switch statement. Handle spurious
12468 events.
12469
12470 * win32-i386-low.c (debug_registers_changed,
12471 debug_registers_used): New.
12472 (initial_stuff): Rename to ...
12473 (i386_initial_stuff): ... this. Clear debug registers
12474 state variables.
12475 (store_debug_registers): Delete.
12476 (i386_get_thread_context): New.
12477 (load_debug_registers): Delete.
12478 (i386_set_thread_context): New.
12479 (i386_thread_added): New.
12480 (single_step): Rename to ...
12481 (i386_single_step): ... this.
12482 (do_fetch_inferior_registers): Rename to ...
12483 (i386_fetch_inferior_register): ... this.
12484 (i386_store_inferior_register): New.
12485 (the_low_target): Adapt to new interface.
12486
12487 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
12488 (arm_get_thread_context): New.
12489 (arm_set_thread_context): New.
12490 (regptr): New.
12491 (do_fetch_inferior_registers): Rename to ...
12492 (arm_fetch_inferior_register): ... this.
12493 (arm_store_inferior_register): New.
12494 (arm_wince_breakpoint): Reimplement as unsigned long.
12495 (arm_wince_breakpoint_len): Define.
12496 (the_low_target): Adapt to new interface.
12497
12498 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
12499 load_debug_registers. Add get_thread_context, set_thread_context,
12500 thread_added and store_inferior_register. Rename
12501 fetch_inferior_registers to fetch_inferior_register.
12502 (regptr): Remove declaration.
12503
dd6953e1
PA
125042007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12505
12506 * linux-low.c (linux_detach): Change return type to int. Return 0.
12507 * spu-low.c (spu_detach): Likewise.
12508
444d6139
PA
125092007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12510
12511 * target.h (target_ops): Change return type of detach to int.
12512 Add join.
12513 (join_inferior): New.
12514 * server.c (main): Don't skip detach support on mingw32.
12515 If the inferior doesn't support detaching return error.
12516 Call join_inferior instead of using waitpid.
12517 * linux-low.c (linux_join): New.
12518 (linux_target_op): Add linux_join.
12519 * spu-low.c (spu_join): New.
12520 (spu_target_ops): Add spu_join.
12521 * win32-low.c (win32_detach): Adapt to new interface.
12522 Reopen current_process_handle before detaching. Issue a child
12523 resume before detaching.
12524 (win32_join): New.
12525 (win32_target_op): Add win32_join.
12526
1d5315fe
PA
125272007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12528
12529 * win32-low.c (win32-attach): Fix return value.
12530 * target.h (target_ops): Describe ATTACH return values.
12531
bf914831
PA
125322007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12533
12534 * win32-low.c (GETPROCADDRESS): Define.
12535 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
12536 (winapi_DebugSetProcessKillOnExit): Likewise.
12537 (win32_create_inferior): Force usage of ansi CreateProcessA.
12538 (win32_attach): Use GETPROCADDRESS.
12539 (win32_detach): Likewise.
12540
f72f3e60
PA
125412007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
12542
12543 * win32-low.c (win32_wait): Don't use WSTOPSIG.
12544
ed50f18f
PA
125452007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
12546
12547 * win32-low.c: Commit leftover changes from 2007-03-29.
12548
0c2ead7e
DJ
125492007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12550
12551 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
12552 fields short instead of int. Add explicit padding.
12553 (i387_cache_to_fsave): Remove unnecessary casts.
12554 (i387_fsave_to_cache): Doc fix.
12555 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
12556
73725ff3
DJ
125572007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
12558
12559 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
12560 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
12561
d99f33d8
PA
125622007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12563
12564 * configure.srv (arm*-*-mingw32ce*): Move near the other
12565 arm targets.
12566
68070c10
PA
125672007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
12568
2482afc6 12569 * configure.ac: Add errno checking.
68070c10
PA
12570 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
12571 sys/file.h and malloc.h.
12572 (AC_CHECK_DECLS): Add perror.
12573 (srv_mingwce): Handle.
2482afc6 12574 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
12575 win32-i386-low.o to srv_tgtobj.
12576 (i[34567]86-*-mingw*): Likewise.
12577 (arm*-*-mingw32ce*): Add case.
12578 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12579 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
12580 [__MINGW32CE__] (strerror): New function.
12581 [__MINGW32CE__] (errno): Define to GetLastError.
12582 [__MINGW32CE__] (COUNTOF): New macro.
12583 (remote_open): Remove extra close call.
12584 * mem-break.c (delete_breakpoint_at): New function.
12585 * mem-break.h (delete_breakpoint_at): Declare.
12586 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
12587 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
12588 [USE_WIN32API] (read, write): Add char* casts.
12589 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
12590 * server.h: Include wincecompat.h on Windows CE.
12591 [HAVE_ERRNO_H]: Check.
12592 (perror): Declare if not declared.
12593 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
12594 (perror_with_name): Remove errno declaration.
12595 * wincecompat.h: New.
12596 * wincecompat.c: New.
12597 * win32-low.h: New.
12598 * win32-arm-low.c: New.
12599 * win32-i386-low.c: New.
12600 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
12601 (OUTMSG2): Make it safe.
12602 (_T): New macro.
12603 (COUNTOF): New macro.
12604 (NUM_REGS): Get it from the low target.
12605 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
12606 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
12607 (thread_rec): Let low target handle debug registers.
12608 (child_add_thread): Likewise.
12609 (child_init_thread_list): Likewise.
12610 (continue_one_thread): Likewise.
12611 (regptr): New.
12612 (do_child_fetch_inferior_registers): Move to ...
12613 * win32-i386-low.c: ... here, and rename to ...
12614 (do_fetch_inferior_registers): ... this.
889bf7c5 12615 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
12616 Go through the low target.
12617 (do_child_store_inferior_registers): Use regptr.
12618 (strwinerror): New function.
12619 (win32_create_inferior): Handle Windows CE.
12620 Use strwinerror instead of strerror on Windows error
12621 codes. Add program to the error output.
12622 Don't close the main thread handle on Windows CE.
12623 (win32_attach): Use coredll.dll on Windows CE.
12624 (win32_kill): Close current process and current
12625 thread handles.
12626 (win32_detach): Use coredll.dll on Windows CE.
12627 (win32_resume): Let low target handle debug registers, and
12628 step request.
12629 (handle_exception): Add/Remove initial breakpoint. Avoid
12630 non-existant WSTOPSIG on Windows CE.
12631 (win32_read_inferior_memory): Cast to remove warning.
12632 (win32_arch_string): Go through the low target.
12633 (initialize_low): Call set_breakpoint_data with the low
12634 target's breakpoint.
12635 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
12636 FOP_REGNUM, mappings): Move to ...
12637 * win32-i386-low.c: ... here.
12638 * win32-low.c (win32_thread_info): Move to ...
12639 * win32-low.h: ... here.
12640 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
12641 win32-arm-low.c and wincecompat.c.
12642 (all:): Add $EXEEXT.
12643 (install-only:): Likewise.
12644 (gdbserver:): Likewise.
12645 (gdbreplay:): Likewise.
12646 * config.in: Regenerate.
12647 * configure: Regenerate.
12648
41093d81
PA
126492007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12650
12651 * win32-low.c: Rename typedef thread_info to
12652 win32_thread_info throughout.
12653
544afa54
PA
126542007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
12655
12656 * win32-i386-low.c: Rename to ...
12657 * win32-low.c: ... this.
12658 * configure.srv: Replace win32-i386-low.o with win32-low.o.
12659 * Makefile.in: Likewise.
12660
bce7165d
PA
126612007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
12662
12663 * remote-utils.c (monitor_output): Constify msg parameter.
12664 * server.h (monitor_output): Likewise.
12665 * win32-i386-low.c (handle_output_debug_string): New.
12666 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
12667 handle_output_debug_string.
12668 (get_child_debug_event): Likewise.
12669
506c7aa0
DJ
126702007-03-27 Mat Hostetter <mat@lcs.mit.edu>
12671
12672 * server.c (main): Correct strtoul check.
12673
42c81e2a
DJ
126742007-03-27 Jon Ringle <jon@ringle.org>
12675
12676 * linux-low.c: Check __ARCH_HAS_MMU__ also.
12677
9453113a
DJ
126782007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
12679
12680 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
12681
64a69107
DJ
126822007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
12683
12684 * terminal.h: Check HAVE_SGTTY_H.
12685
126862007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
12687
12688 * remote-utils.c (remote_open): Print out the assigned port number.
12689
c74d0ad8
DJ
126902007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
12691
12692 * remote-utils.c (monitor_output): New function.
12693 * server.c (debug_threads): Define here.
12694 (monitor_show_help): New function.
12695 (handle_query): Handle qRcmd.
12696 (main): Do not handle 'd' packet.
12697 * server.h (debug_threads, remote_debug, monitor_output): Declare.
12698 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
12699 of debug_threads.
12700
de7c3b4a
PA
127012007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12702
12703 * Makefile.in (EXEEXT): New.
12704 (clean): Use $(EXEEXT).
12705
ef57601b
PA
127062007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12707
12708 * target.h (target_ops): Rename send_signal to request_interrupt,
12709 and remove enum target_signal parameter.
12710 * linux-low.c (linux_request_interrupt): Rename from
12711 linux_send_signal, and always send SIGINT.
12712 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
12713 and always send SIGINT.
12714 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
12715 of send_signal.
12716 (input_interrupt): Likewise.
12717
820f2bda
PA
127182007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
12719
12720 * server.c (get_features_xml): Check if target implemented
12721 arch_string.
12722 * win32-i386-low.c (win32_arch_string): New.
12723 (win32_target_ops): Add win32_arch_string as arch_string member.
12724
ab39bf24
UW
127252007-02-22 Markus Deuling <deuling@de.ibm.com>
12726
12727 * spu-low.c (spu_arch_string): New.
12728 (spu_target_ops): Add spu_arch_string.
12729
61ff6e04
DJ
127302007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
12731
12732 * remote-utils.c: Remove HAVE_TERMINAL_H check.
12733 * configure.ac: Do not check for terminal.h.
12734 * configure, config.in: Regenerated.
12735
fb1e4ffc
DJ
127362007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
12737
12738 * Makefile.in (OBS): Add $(XML_BUILTIN).
12739 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
12740 (clean): Update.
12741 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
12742 (arm-with-iwmmxt.c): New.
12743 * config.in, configure: Regenerate.
12744 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
12745 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
12746 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
12747 (arm*-*-linux*): Add iWMMXt and regset support.
12748 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
12749 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
12750 (arm_store_wmmxregset, target_regsets): New.
12751 * server.c (get_features_xml): Take annex argument. Check builtin
12752 XML documents.
12753 (handle_query): Handle multiple annexes.
12754
0f48aa01
DJ
127552007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
12756
12757 * remote-utils.c [USE_WIN32API] (read, write): Define.
12758 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
12759 write.
12760
23181151
DJ
127612007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
12762
12763 * linux-i386-low.c (the_low_target): Set arch_string.
12764 * linux-x86-64-low.c (the_low_target): Likewise.
12765 * linux-low.c (linux_arch_string): New.
12766 (linux_target_ops): Add it.
12767 * linux-low.h (struct linux_target_ops): Add arch_string.
12768 * server.c (write_qxfer_response): Use const void * for DATA.
12769 (get_features_xml): New.
12770 (handle_query): Handle qXfer:features:read. Report it for qSupported.
12771 * target.h (struct target_ops): Add arch_string method.
12772
9d606399
DJ
127732007-01-03 Denis Pilat <denis.pilat@st.com>
12774 Daniel Jacobowitz <dan@codesourcery.com>
12775
12776 * linux-low.c (linux_kill): Handle being called with no threads.
12777 * win32-i386-low.c (win32_kill): Likewise.
12778 (get_child_debug_event): Clear current_process_handle.
12779
127802006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
12781 Daniel Jacobowitz <dan@codesourcery.com>
12782
12783 * remote-utils.c (remote_open): Check the type of specified
12784 serial port devices before opening them.
12785 * server.c (main): Kill the inferior if an error occurs during
12786 the first remote_open.
12787
a5e13d24
DJ
127882006-12-05 Markus Deuling <deuling@de.ibm.com>
12789
12790 * README: Update supported targets.
12791
186947f7
DJ
127922006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
12793
12794 * Makefile.in (clean): Remove reg-mips64.c.
12795 (reg-mips64.c, reg-mips64.o): New rules.
12796 * configure.srv: Handle mips64. Include regset support for mips.
12797 * linux-mips-low.c (union mips_register): New.
12798 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
12799 (mips_breakpoint, mips_breakpoint_at): Use int.
12800 (mips_collect_register, mips_supply_register)
12801 (mips_collect_register_32bit, mips_supply_register_32bit)
12802 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
12803 (mips_store_fpregset, target_regsets): New.
12804 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
12805
a13e2c95
UW
128062006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
12807
12808 * configure.srv: Add target "spu*-*-*".
12809 * Makefile.in (clean): Remove reg-spu.c.
12810 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
12811 * spu-low.c: New file.
12812
cb7283db
DJ
128132006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12814
12815 * configure.ac: Correct td_thr_tls_get_addr test.
12816 * configure: Regenerated.
12817
89be2091
DJ
128182006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
12819
12820 * linux-low.c (linux_wait_for_event): Reformat. Use the
12821 pass_signals array.
12822 * remote-utils.c (decode_address_to_semicolon): New.
12823 * server.c (pass_signals, handle_general_set): New.
12824 (handle_query): Mention QPassSignals for qSupported.
12825 (main): Call handle_general_set.
12826 * server.h (pass_signals, decode_address_to_semicolon): New.
12827
000ef4f0
DJ
128282006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
12829
12830 * server.c (handle_query): Correct error handling for read_auxv.
12831
b7149293
UW
128322005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
12833
12834 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
12835 and srv_linux_thread_db to yes.
12836 * linux-s390-low.c (s390_fill_gregset): New function.
12837 (target_regsets): Define data structure.
12838
dae5f5cf
DJ
128392006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
12840
12841 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
12842 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
12843 * config.in, configure: Regenerated.
12844 * inferiors.c (gdb_id_to_thread): New function.
12845 (gdb_id_to_thread_id): Use it.
12846 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
12847 * linux-low.h (struct process_info): Add th member.
12848 (thread_db_get_tls_address): New prototype.
12849 * remote-utils.c (decode_address): Make non-static.
12850 * server.c (handle_query): Handle qGetTLSAddr.
12851 * server.h (gdb_id_to_thread, decode_address): New prototypes.
12852 * target.h (struct target_ops): Add get_tls_address.
12853 * thread-db.c (maybe_attach_thread): Save the thread handle.
12854 (thread_db_get_tls_address): New.
12855
32ca6d61
DJ
128562006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
12857
12858 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
12859 (linux_resume_one_process): Take a siginfo_t *. Update all
12860 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
12861 (struct pending_signals): Add a siginfo_t.
12862 (linux_wait_for_process): Always set last_status.
12863 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
12864 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
12865 * linux-low.h (struct process_info): Add last_status.
12866
5ffff7c1
DJ
128672006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
12868
12869 * remote-utils.c (try_rle): New function.
12870 (putpkt_binary): Use it.
12871
8695c747
DJ
128722006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
12873
12874 * Makefile.in (clean): Clean reg-x86-64-linux.c.
12875 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
12876 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
12877 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
12878 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
12879 point registers.
12880
290fadea
RS
128812006-08-08 Richard Sandiford <richard@codesourcery.com>
12882
12883 * server.c (terminal_fd): New variable.
12884 (old_foreground_pgrp): Likewise.
12885 (restore_old_foreground_pgrp): New function.
12886 (start_inferior): Record the terminal file descriptor in terminal_fd
12887 and its original foreground group in old_foreground_pgrp. Register
12888 restore_old_foreground_pgrp with atexit().
12889
9f2e1e63
DJ
128902006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
12891
12892 * server.c (handle_query): Correct qPart to qXfer.
12893
b80864fb
DJ
128942006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
12895
12896 * configure.ac: Check for more headers which are missing on
12897 Windows. Automatically supply -lwsock32 and USE_WIN32API.
12898 * configure.srv: Add Cygwin and mingw32.
12899 * remote-utils.c: Don't include headers unconditionally which
12900 are missing on mingw32. Include <winsock.h> for mingw32.
12901 (remote_open): Adjust for mingw32 support. Flush
12902 standard error after writing to it.
12903 (remote_close, putpkt_binary, input_interrupt, block_async_io)
12904 (unblock_async_io, enable_async_io, disable_async_io)
12905 (readchar, getpkt): Update for Winsock support.
12906 (prepare_resume_reply): Expect a protocol signal number.
12907 * server.c: Disable <sys/wait.h> on mingw32.
12908 (start_inferior): Adjust for mingw32 support. Flush
12909 standard error after writing to it.
12910 (attach_inferior): Likewise. Use protocol signal
12911 numbers.
12912 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
12913 and names.
12914 * win32-i386-low.c: New file.
12915 * Makefile.in (XM_CLIBS): Set.
12916 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
12917 (win32-i386-low.o): New dependency rule.
12918 * linux-low.c (linux_wait): Use target signal numbers.
12919 * target.h (struct target_ops): Doc fix.
12920 * server.h (target_signal_to_name): New prototype.
12921 * gdbreplay.c: Don't include headers unconditionally which
12922 are missing on mingw32. Include <winsock.h> for mingw32.
12923 (remote_close, remote_open): Adjust for Winsock support.
12924 * configure, config.in: Regenerated.
12925
0876f84a
DJ
129262006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
12927
12928 * server.c (decode_xfer_read, write_qxfer_response): New.
12929 (handle_query): Take a packet length argument. Handle
12930 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
12931 the qSupported response.
12932 (main): Update call to handle_query.
12933
01f9e8fa
DJ
129342006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
12935
12936 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
12937 (putpkt_binary): Renamed from putpkt and adjusted for binary
12938 data.
12939 (putpkt): New wrapper for putpkt_binary.
12940 (readchar): Don't mask off the high bit.
12941 (decode_X_packet): New function.
12942 * server.c (main): Call putpkt_binary if a handler sets the packet
12943 length. Save the length of the incoming packet. Handle 'X'.
12944 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
12945
be2a5f71
DJ
129462006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
12947
12948 * server.c (handle_query): Handle qSupported.
12949
ea025f5f
DJ
129502006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12951
12952 * remote-utils.c (all_symbols_looked_up): New variable.
12953 (look_up_one_symbol): Check it.
12954 * server.h (look_up_one_symbol): New declaration.
12955 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
12956
9308fc88
DJ
129572006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
12958
12959 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 12960 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
12961 (PTRACE_GET_THREAD_AREA): Define.
12962 (ps_get_thread_area): New function.
12963
52fb6437
NS
129642006-05-09 Nathan Sidwell <nathan@codesourcery.com>
12965
12966 * configure.srv (m68k*-*-uclinux*): New target.
12967 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
12968 (linux_resume_one_process): Remove extraneous cast.
12969 (linux_read_offsets): New.
12970 (linux_target_op): Add linux_read_offsets on mmuless systems.
12971 * server.c (handle_query): Add qOffsets logic.
12972 * target.h (struct target_ops): Add read_offsets.
12973
21b0f40c
DJ
129742006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12975
12976 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
12977 (PTRACE_GET_THREAD_AREA): Define.
12978 (ps_get_thread_area): New function.
12979 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
12980 (linux-x86-64-low.o): Update.
12981
0050a760
DJ
129822006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
12983
12984 * configure.ac: Remove checks for prfpregset_t.
12985 * gdb_proc_service.h: New file.
12986 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
12987 new "gdb_proc_service.h".
12988 * proc-service.c: Likewise.
12989 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
12990 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
12991 * Makefile.in (gdb_proc_service_h): Updated.
12992 * configure, config.in: Regenerated.
12993
b92a518e
DJ
129942006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12995
12996 * remote-utils.c (prepare_resume_reply): Move declaration
12997 of gdb_id_from_wait to the top of the block.
12998
545587ee
DJ
129992006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
13000
13001 * linux-low.c (regsets_store_inferior_registers): Read the regset
13002 from the target before filling it.
13003
9db87ebd
DJ
130042006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
13005
13006 * server.c (attach_inferior): Return SIGTRAP for a successful
13007 attach.
13008
dd24457d
DJ
130092006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
13010
13011 * Makefile.in (OBS): Add version.o.
13012 (STAGESTUFF): Delete.
13013 (version.o): Add dependencies.
13014 (version.c): Replace rule.
13015 (clean): Remove version.c.
13016 * server.c (gdbserver_version): New.
13017 (gdbserver_usage): Use printf.
13018 (main): Handle --version and --help.
13019 * server.h (version, host_name): Add declarations.
13020
6f0f660e
EZ
130212005-12-23 Eli Zaretskii <eliz@gnu.org>
13022
889bf7c5
PA
13023 * linux-arm-low.c:
13024 * linux-arm-low.c:
13025 * inferiors.c:
13026 * i387-fp.h:
13027 * i387-fp.c:
13028 * gdbreplay.c:
13029 * regcache.c:
13030 * proc-service.c:
13031 * mem-break.h:
13032 * mem-break.c:
13033 * linux-x86-64-low.c:
13034 * linux-sh-low.c:
13035 * linux-s390-low.c:
13036 * linux-ppc64-low.c:
13037 * linux-ppc-low.c:
13038 * linux-mips-low.c:
13039 * linux-m68k-low.c:
13040 * linux-m32r-low.c:
13041 * linux-low.h:
13042 * linux-low.c:
13043 * linux-ia64-low.c:
13044 * linux-i386-low.c:
13045 * linux-crisv32-low.c:
13046 * thread-db.c:
13047 * terminal.h:
13048 * target.h:
13049 * target.c:
13050 * server.h:
13051 * server.c:
13052 * remote-utils.c:
13053 * regcache.h:
13054 * utils.c:
13055 * Makefile.in:
13056 * configure.ac:
6f0f660e
EZ
13057 * gdbserver.1: Add (C) after Copyright. Update the FSF
13058 address.
13059
9d1fb177
DJ
130602005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
13061
13062 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
13063 (arm_breakpoint_at): Recognize both breakpoints.
13064 (the_low_target): Use the correct breakpoint instruction.
13065
011a70c2
DJ
130662005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
13067
13068 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
13069 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
13070 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
13071 (the_low_target): Update.
13072
7fb85e41
AS
130732005-10-25 Andreas Schwab <schwab@suse.de>
13074
13075 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
13076
13077 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
13078 (ia64_num_regs): Reduce to 462.
13079
3db0444b
DJ
130802005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
13081
13082 * acinclude.m4: Correct quoting.
13083 * aclocal.m4: Regenerated.
13084
13085 Suggested by SZOKOVACS Robert <szo@ies.hu>:
13086 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
13087 (thread_db_init): Call thread_db_err_str.
13088 * configure.ac: Check for TD_VERSION.
13089 * config.in, configure: Regenerated.
13090
bee0189a
DJ
130912005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
13092
13093 * server.h (error, fatal, warning): Add ATTR_FORMAT.
13094
e9d25b98
DJ
130952005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13096
13097 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
13098 is not available. Define HAVE_PTRACE_GETREGS if it is.
13099 * config.in, configure: Regenerated.
13100 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
13101 * linux-i386-low.c, linux-m68k-low.c: Update to use
13102 HAVE_PTRACE_GETREGS.
13103 * linux-low.c (regsets_fetch_inferior_registers)
13104 (regsets_store_inferior_registers): Only return 0 if we processed
13105 GENERAL_REGS.
13106 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
13107 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
13108
a06660f7
DJ
131092005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13110
13111 * inferiors.c (struct thread_info): Add gdb_id.
13112 (add_thread): Add gdb_id argument.
13113 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
13114 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
13115 calls to add_thread.
13116 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
13117 * server.c (handle_query): Use thread_to_gdb_id.
13118 (handle_v_cont, main): Use gdb_id_to_thread_id.
13119 * server.h (add_thread): Update prototype.
13120 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
13121 prototypes.
13122
5a1f5858
DJ
131232005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
13124
13125 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
13126 left-padded registers.
13127 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
13128 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
13129
e122f1f5
SE
131302005-07-01 Steve Ellcey <sje@cup.hp.com>
13131
13132 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
13133 * configure: Regenerate.
13134 * config.in: Regenerate.
13135 * server.h (NEED_DECLARATION_STRERROR):
13136 Replace with !HAVE_DECL_STRERROR.
13137
d592fa2f
DJ
131382005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
13139
13140 * linux-low.c (linux_wait, linux_send_signal): Don't test
13141 an unsigned long variable for > 0 if it could be MAX_ULONG.
13142 * server.c (myresume): Likewise.
13143 * target.c (set_desired_inferior): Likewise.
13144
ccbd4912
MK
131452005-06-13 Mark Kettenis <kettenis@gnu.org>
13146
13147 * configure.ac: Simplify and improve check for socklen_t.
13148 * configure, config.in: Regenerate.
13149
f450004a
DJ
131502005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
13151
13152 * acconfig.h: Remove.
13153 * configure.ac: Add a test for socklen_t. Use three-argument
13154 AC_DEFINE throughout.
13155 * config.in: Regenerated using autoheader 2.59.
13156 * configure: Regenerated.
13157
13158 * gdbreplay.c (socklen_t): Provide a default.
13159 (remote_open): Use socklen_t.
13160 * remote-utils.c (socklen_t): Provide a default.
13161 (remote_open): Use socklen_t.
13162 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
13163 unsigned char.
13164
13165 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
13166 char for buffers.
13167 * linux-low.c (linux_read_memory, linux_write_memory)
13168 (linux_read_auxv): Likewise.
13169 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
13170 (check_mem_write): Likewise.
13171 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
13172 Likewise.
13173 * regcache.c (struct inferior_rgcache_data, registers_to_string)
13174 (registers_from_string, register_data): Likewise.
13175 * server.c (handle_query, main): Likewise.
13176 * server.h (convert_ascii_to_int, convert_int_to_ascii)
13177 (decode_M_packet): Likewise.
13178 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
13179 * target.h (struct target_ops): Update read_memory, write_memory,
13180 and read_auxv.
13181 (read_inferior_memory, write_inferior_memory): Update.
13182 * linux-low.h (struct linux_target_ops): Change type of breakpoint
13183 to unsigned char *.
13184 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
13185 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
13186 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
13187 linux-s390-low.c, linux-sh-low.c: Update for changes in
13188 read_inferior_memory and the_low_target->breakpoint.
13189
eee84df1
DJ
131902005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
13191
13192 * Makefile.in (SFILES): Add linux-ppc64-low.c.
13193 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
13194 * configure.srv: Add powerpc64-*-linux*.
13195 * linux-ppc64-low.c: New file.
13196
45b134e5
OF
131972005-05-23 Orjan Friberg <orjanf@axis.com>
13198
13199 * linux-cris-low.c: New file with support for CRIS.
13200 * linux-crisv32-low.c: Ditto for CRISv32.
13201 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
13202 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 13203 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
13204 reg-crisv32.o, and reg-crisv32.c to make rules.
13205 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
13206 recognized targets.
13207
48d93c75
UW
132082005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
13209
13210 * linux-low.c (fetch_register): Ensure buffer size is a multiple
13211 of sizeof (PTRACE_XFER_TYPE).
13212 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
13213
e013ee27
OF
132142005-05-12 Orjan Friberg <orjanf@axis.com>
13215
889bf7c5 13216 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
13217 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
13218 pointers for hardware watchpoint support.
13219 * linux-low.h (struct linux_target_ops): Ditto.
13220 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
13221 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
13222 to linux_target_ops.
13223 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
13224 reply packet.
13225 * server.c (main): Recognize 'Z' and 'z' packets.
13226
b0ded00b
UW
132272005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
13228
13229 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
13230 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
13231 (the_low_target): Add new members.
13232
8643e2ad
DJ
132332005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13234
13235 * proc-service.c (ps_lgetregs): Search all_processes instead of
13236 all_threads.
13237
fc620387
DJ
132382005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
13239
13240 * server.c (start_inferior): Change return type to int.
13241 (attach_inferior): Change sigptr to int *.
13242 (handle_v_cont, handle_v_requests): Change signal to int *.
13243 (main): Change signal to int.
13244
132452005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
13246
13247 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
13248 * configure.srv: Add m32r*-*-linux*.
13249 * linux-m32r-low.c: New file.
13250
e0e76420
DJ
132512005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
13252
13253 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
13254
a1928bad
DJ
132552005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
13256
13257 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
13258 Take unsigned long arguments for PIDs.
13259 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
13260 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
13261 (wait_for_sigstop, linux_resume_one_process)
13262 (regsets_fetch_inferior_registers, linux_send_signal)
13263 (linux_read_auxv): Likewise. Update the types of variables holding
13264 PIDs. Update format string specifiers.
13265 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
13266 * remote-utils.c (prepare_resume_reply): Likewise.
13267 * server.c (cont_thread, general_thread, step_thread)
13268 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
13269 unsigned long.
13270 (handle_query): Update format specifiers.
13271 (handle_v_cont, main): Use strtoul for thread IDs.
13272 * server.h (struct inferior_list_entry): Use unsigned long for ID.
13273 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
13274 (general_thread, step_thread, thread_from_wait)
13275 (old_thread_from_wait): Update.
13276 * target.h (struct thread_resume): Use unsigned long for THREAD.
13277 (struct target_ops): Use unsigned long for arguments to attach and
13278 thread_alive.
13279
dcdb98d2
DJ
132802005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
13281
13282 * acinclude.m4: Include bfd/bfd.m4 directly.
13283 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
13284 <agriffis@toolchain.org>.
13285 * aclocal.m4, configure: Regenerated.
13286
bec39cab
AC
132872005-01-07 Andrew Cagney <cagney@gnu.org>
13288
13289 * configure.ac: Rename configure.in, require autoconf 2.59.
13290 * configure: Re-generate.
13291
434c4c77
DJ
132922004-12-08 Daniel Jacobowitz <dan@debian.org>
13293
13294 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
13295 LIBS when finished.
13296 * aclocal.m4: Regenerated.
13297 * configure: Regenerated.
13298
db1d3e1b
AS
132992004-11-21 Andreas Schwab <schwab@suse.de>
13300
13301 * linux-m68k-low.c (m68k_num_gregs): Define.
13302 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
13303 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
13304 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
13305 (m68k_breakpoint_at): New. Add to the_low_target.
13306
13307 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
13308 srv_linux_thread_db to yes.
13309
43360365
JB
133102004-10-20 Joel Brobecker <brobecker@gnat.com>
13311
13312 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
13313 (ARCH_SET_FS): Likewise.
13314 (ARCH_GET_FS): Likewise.
13315 (ARCH_GET_GS): Likewise.
13316
fd500816
DJ
133172004-10-16 Daniel Jacobowitz <dan@debian.org>
13318
13319 * linux-i386-low.c (ps_get_thread_area): New.
13320 * linux-x86-64-low.c (ps_get_thread_area): New.
13321 * linux-low.c: Include <sys/syscall.h>.
13322 (linux_kill_one_process): Don't kill the first thread here.
13323 (linux_kill): Kill the first thread here.
13324 (kill_lwp): New function.
13325 (send_sigstop, linux_send_signal): Use it.
13326 * proc-service.c: Clean up #ifdefs.
13327 (fpregset_info): Delete.
13328 (ps_lgetregs): Update and enable implementation.
13329 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
13330 implementations.
13331 * remote-utils.c (struct sym_cache, symbol_cache): New.
13332 (input_interrupt): Print a clearer message.
13333 (async_io_enabled): New variable.
13334 (enable_async_io, disable_async_io): Use it. Update comments.
13335 (look_up_one_symbol): Use the symbol cache.
13336 * thread-db.c (thread_db_look_up_symbols): New function.
13337 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
13338
f6de3c42
DJ
133392004-10-16 Daniel Jacobowitz <dan@debian.org>
13340
13341 * configure.in: Test for -rdynamic.
13342 * configure: Regenerated.
13343 * Makefile (INTERNAL_LDFLAGS): New.
13344 (gdbserver, gdbreplay): Use it.
13345
2c0fc042
AC
133462004-09-02 Andrew Cagney <cagney@gnu.org>
13347
13348 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
13349
075b3282
DJ
133502004-03-23 Daniel Jacobowitz <drow@mvista.com>
13351
13352 * linux-low.c (linux_wait): Clear all_processes list also.
13353
fa6a77dc
DJ
133542004-03-12 Daniel Jacobowitz <drow@mvista.com>
13355
13356 * linux-low.c: Include <errno.h>. Remove extern declaration of
13357 errno.
13358
6d782a97
DJ
133592004-03-12 Daniel Jacobowitz <drow@mvista.com>
13360
13361 * gdbreplay.c, server.h, utils.c: Update copyright years.
13362
3a7fb99b
DJ
133632004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13364
13365 * server.c (main): Print child status or termination signal from
13366 variable 'signal', not 'sig'.
13367
c3e735a6
DJ
133682004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
13369
13370 * linux-low.c (linux_read_memory): Change return type to
13371 int. Check for and return error from ptrace().
13372 * target.c (read_inferior_memory): Change return type to int. Pass
13373 back return status from the_target->read_memory().
13374 * target.h (struct target_ops): Adapt *read_memory() prototype.
13375 Update comment.
13376 (read_inferior_memory): Adapt prototype.
13377 * server.c (main): Return an error packet if
13378 read_inferior_memory() returns an error.
13379
a59d1c82
DJ
133802004-03-04 Daniel Jacobowitz <drow@mvista.com>
13381
13382 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
13383 Unify with other clean targets.
13384
dc3f8883
DJ
133852004-02-29 Daniel Jacobowitz <drow@mvista.com>
13386
13387 * server.c (handle_v_cont): Call set_desired_inferior.
13388
89a208da
DJ
133892004-02-29 Daniel Jacobowitz <drow@mvista.com>
13390
13391 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
13392
62ea82f5
DJ
133932004-02-29 Daniel Jacobowitz <drow@mvista.com>
13394
13395 * linux-low.c (linux_wait): Unblock async I/O.
13396 (linux_resume): Block and enable async I/O.
13397 * remote-utils.c (block_async_io, unblock_async_io): New functions.
13398 * server.h (block_async_io, unblock_async_io): Add prototypes.
13399
6910d122
DJ
134002004-02-29 Daniel Jacobowitz <drow@mvista.com>
13401
13402 * remote-utils.c (remote_open): Print a status notice after
13403 opening a TCP port.
13404 * server.c (attach_inferior): Print a status notice after
13405 attaching.
13406
134072004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
13408
13409 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
13410
c89dc5d4
DJ
134112004-02-26 Daniel Jacobowitz <drow@mvista.com>
13412
13413 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
13414 error packet.
13415 * server.c, target.h: Update copyright years.
13416
4b8dad4a
RM
134172004-02-25 Roland McGrath <roland@redhat.com>
13418
13419 * target.h (struct target_ops): New member `read_auxv'.
13420 * server.c (handle_query): Handle qPart:auxv:read: query using that.
13421 * linux-low.c (linux_read_auxv): New function.
13422 (linux_target_ops): Initialize `read_auxv' member to that.
13423
d7446758
JB
134242004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
13425
13426 Committed by Jim Blandy <jimb@redhat.com>.
13427
13428 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 13429 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
13430 instead of GPR_SIZE to distiguish s390 and s390x targets.
13431
5544ad89
DJ
134322004-01-31 Daniel Jacobowitz <drow@mvista.com>
13433
13434 * linux-low.c: Update copyright year.
13435 (check_removed_breakpoint): Clear pending_is_breakpoint.
13436 (linux_set_resume_request, linux_queue_one_thread)
13437 (resume_status_pending_p): New functions.
13438 (linux_continue_one_thread): Use process->resume.
13439 (linux_resume): Only resume threads if there are no pending events.
13440 * linux-low.h (struct process_info): Add resume request
13441 pointer.
13442
2a68b70e
DJ
134432004-01-30 Daniel Jacobowitz <drow@mvista.com>
13444
13445 * regcache.c (new_register_cache): Clear the allocated register
13446 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
13447
64386c31
DJ
134482003-10-13 Daniel Jacobowitz <drow@mvista.com>
13449
13450 * linux-low.c (linux_resume): Take a struct thread_resume *
13451 argument.
13452 (linux_wait): Update call.
13453 (resume_ptr): New static variable.
13454 (linux_continue_one_thread): Renamed from
13455 linux_continue_one_process. Use resume_ptr.
13456 (linux_resume): Use linux_continue_one_thread.
13457 * server.c (handle_v_cont, handle_v_requests): New functions.
13458 (myresume): New function.
13459 (main): Handle 'v' case.
13460 * target.h (struct thread_resume): New type.
13461 (struct target_ops): Change argument of "resume" to struct
13462 thread_resume *.
13463 (myresume): Delete macro.
13464
c938e9b0
L
134652003-08-08 H.J. Lu <hongjiu.lu@intel.com>
13466
13467 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
13468 (uninstall): Support DESTDIR.
13469
7f313d07
BC
13470Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
13471
13472 * configure.srv: Add xscale*linux copy of arm*linux entry.
13473
3b2fc2ea
DJ
134742003-07-24 Daniel Jacobowitz <drow@mvista.com>
13475
13476 * linux-arm-low.c (arm_reinsert_addr): New function.
13477 (the_low_target): Add arm_reinsert_addr.
13478
1c0a559e
MK
134792003-07-08 Mark Kettenis <kettenis@gnu.org>
13480
13481 * mem-break.c: Remove whitespace at end of file.
13482
43d5792c
DJ
134832003-06-28 Daniel Jacobowitz <drow@mvista.com>
13484
13485 * configure.in: Check whether we need to prototype strerror.
13486 * server.h: Optionally prototype strerror.
13487 * gdbreplay.c (perror_with_name): Use strerror.
13488 * linux-low.c (linux_attach_lwp): Use strerror.
13489 * utils.c (perror_with_name): Use strerror.
13490 * config.in, configure: Regenerated.
13491
c8a86edf
DJ
134922003-06-28 Daniel Jacobowitz <drow@mvista.com>
13493
13494 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
13495 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
13496
73d37363
DJ
134972003-06-20 Daniel Jacobowitz <drow@mvista.com>
13498
13499 * Makefile.in (SFILES): Update.
13500 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
13501 low-sun3.c: Remove files.
13502
6ad8ae5c
DJ
135032003-06-17 Daniel Jacobowitz <drow@mvista.com>
13504
13505 * linux-low.c: Move comment to linux_thread_alive where it belonged.
13506 (linux_detach_one_process, linux_detach): New functions.
13507 (linux_target_ops): Add linux_detach.
13508 * server.c (main): Handle 'D' packet.
13509 * target.h (struct target_ops): Add "detach" member.
13510 (detach_inferior): Define.
13511
1581182a
MK
135122003-06-13 Mark Kettenis <kettenis@gnu.org>
13513
13514 From Kelley Cook <kelleycook@wideopenwest.com>:
13515 * configure.srv: Accept i[34567]86 variants.
13516
e5379b03
DJ
135172003-06-05 Daniel Jacobowitz <drow@mvista.com>
13518
13519 * linux-low.c (linux_wait_for_event): Correct comment typos.
13520 (linux_resume_one_process): Call check_removed_breakpoint.
13521 (linux_send_signal): New function.
13522 (linux_target_ops): Add linux_send_signal.
13523 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
13524 of kill.
13525 * target.h (struct target_ops): Add send_signal.
13526
2ff29de4
JB
135272003-05-29 Jim Blandy <jimb@redhat.com>
13528
13529 * linux-low.c (usr_store_inferior_registers): Transfer buf in
13530 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
13531 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
13532 away part of the register's value.
13533
254787d4
DJ
135342003-03-26 Daniel Jacobowitz <drow@mvista.com>
13535
13536 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
13537 (linux_wait_for_event, linux_init_signals): Likewise.
13538
94e10508
DJ
135392003-03-17 Daniel Jacobowitz <drow@mvista.com>
13540
13541 * configure.in: Check for stdlib.h.
13542 * configure: Regenerated.
13543 * config.in: Regenerated.
13544
4c0711e0
DJ
135452003-01-04 Andreas Schwab <schwab@suse.de>
13546
13547 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
13548
ef66e766
AC
135492003-01-02 Andrew Cagney <ac131313@redhat.com>
13550
13551 * Makefile.in: Remove obsolete code.
13552
a1358604
DJ
135532002-11-20 Daniel Jacobowitz <drow@mvista.com>
13554
13555 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
13556 defined(PT_FPR0_HI).
13557
23ce3b1c
DJ
135582002-11-17 Stuart Hughes <seh@zee2.com>
13559
13560 * linux-arm-low.c (arm_num_regs): Increase.
13561 (arm_regmap): Include status register.
13562
135632002-11-17 Daniel Jacobowitz <drow@mvista.com>
13564
13565 * linux-low.c (register_addr): Remove incorrect -1 check.
13566
a9fa9f7d
DJ
135672002-08-29 Daniel Jacobowitz <drow@mvista.com>
13568
13569 * linux-low.c (linux_create_inferior): Call setpgid. Return
13570 the new PID.
13571 (unstopped_p, linux_signal_pid): Remove.
13572 (linux_target_ops): Remove linux_signal_pid.
13573 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
13574 global instead of target method.
13575 * target.h (struct target_ops): Remove signal_pid. Update comment
13576 for create_inferior.
13577 * server.c (signal_pid): New variable.
13578 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 13579 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
13580 (attach_inferior): Set signal_pid.
13581
17574093
DJ
135822002-08-23 Daniel Jacobowitz <drow@mvista.com>
13583
13584 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
13585
135862002-08-20 Jim Blandy <jimb@redhat.com>
13587
13588 * Makefile.in (LDFLAGS): Allow the configure script to establish a
13589 default for this.
13590
135912002-08-01 Andrew Cagney <cagney@redhat.com>
13592
13593 * Makefile.in: Make chill references obsolete.
13594
135952002-07-24 Kevin Buettner <kevinb@redhat.com>
13596
13597 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
13598 * configure: Regenerate.
13599 * config.in: Regenerate.
13600
136012002-07-09 David O'Brien <obrien@FreeBSD.org>
13602
13603 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
13604 (perror_with_name, remote_close, remote_open, expect, play): Static.
13605
136062002-07-04 Michal Ludvig <mludvig@suse.cz>
13607
4b8dad4a 13608 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
13609 byte offsets instead of an array of indexes.
13610 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
13611
136122002-06-13 Daniel Jacobowitz <drow@mvista.com>
13613
13614 * regcache.c: Add comment.
13615
136162002-06-11 Daniel Jacobowitz <drow@mvista.com>
13617
13618 * thread-db.c: New file.
13619 * proc-service.c: New file.
13620 * acinclude.m4: New file.
13621 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
13622 proc-service.o, and thread-db.o.
13623 (linux-low.o): Add USE_THREAD_DB.
13624 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
13625 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
13626 * aclocal.m4: Regenerated.
13627 * config.in: Regenerated.
13628 * configure: Regenerated.
13629 * configure.in: Check for proc_service.h, sys/procfs.h,
13630 thread_db.h, and linux/elf.h headrs.
13631 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
13632 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
13633 Check for -lthread_db and thread support.
13634 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
13635 PowerPC, and SuperH.
13636 * i387-fp.c: Constify arguments.
13637 * i387-fp.h: Likewise.
13638 * inferiors.c: (struct thread_info): Renamed from
13639 `struct inferior_info'. Remove PID member. Use generic inferior
13640 list header. All uses updated.
13641 (inferiors, signal_pid): Removed.
13642 (all_threads): New variable.
13643 (get_thread): Define.
13644 (add_inferior_to_list): New function.
13645 (for_each_inferior): New function.
13646 (change_inferior_id): New function.
13647 (add_inferior): Removed.
13648 (remove_inferior): New function.
13649 (add_thread): New function.
13650 (free_one_thread): New function.
13651 (remove_thread): New function.
13652 (clear_inferiors): Use for_each_inferior and free_one_thread.
13653 (find_inferior): New function.
13654 (find_inferior_id): New function.
13655 (inferior_target_data): Update argument type.
13656 (set_inferior_target_data): Likewise.
13657 (inferior_regcache_data): Likewise.
13658 (set_inferior_regcache_data): Likewise.
13659 * linux-low.c (linux_bp_reinsert): Remove.
13660 (all_processes, stopping_threads, using_thrads)
13661 (struct pending_signals, debug_threads, pid_of): New.
13662 (inferior_pid): Replace with macro.
13663 (struct inferior_linux_data): Remove.
13664 (get_stop_pc, add_process): New functions.
13665 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
13666 Use add_process and add_thread.
13667 (linux_attach_lwp): New function, based on old linux_attach. Use
13668 add_process and add_thread. Set stop_expected for new threads.
13669 (linux_attach): New function.
13670 (linux_kill_one_process): New function.
13671 (linux_kill): Kill all LWPs.
13672 (linux_thread_alive): Use find_inferior_id.
13673 (check_removed_breakpoints, status_pending_p): New functions.
13674 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
13675 Update. Use WNOHANG. Wait for cloned processes also. Update process
13676 struct for the found process.
13677 (linux_wait_for_event): New function.
13678 (linux_wait): Use it. Support LWPs.
13679 (send_sigstop, wait_for_sigstop, stop_all_processes)
13680 (linux_resume_one_process, linux_continue_one_process): New functions.
13681 (linux_resume): Support LWPs.
13682 (REGISTER_RAW_SIZE): Remove.
13683 (fetch_register): Use register_size instead. Call supply_register.
13684 (usr_store_inferior_registers): Likewise. Call collect_register.
13685 Fix recursive case.
13686 (regsets_fetch_inferior_registers): Improve error message.
13687 (regsets_store_inferior_registers): Add debugging.
13688 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
13689 (unstopped_p, linux_signal_pid): New functions.
13690 (linux_target_ops): Add linux_signal_pid.
13691 (linux_init_signals): New function.
13692 (initialize_low): Call it. Initialize using_threads.
13693 * regcache.c (inferior_regcache_data): Add valid
13694 flag.
13695 (get_regcache): Fetch registers lazily. Add fetch argument
13696 and update all callers.
13697 (regcache_invalidate_one, regcache_invalidate): New
13698 functions.
13699 (new_register_cache): Renamed from create_register_cache.
13700 Return the new regcache.
13701 (free_register_cache): Change argument to a void *.
13702 (registers_to_string, registers_from_string): Call get_regcache
13703 with fetch flag set.
13704 (register_data): Make static. Pass fetch flag to get_regcache.
13705 (supply_register): Call get_regcache with fetch flag clear.
13706 (collect_register): Call get_regcache with fetch flag set.
13707 (collect_register_as_string): New function.
13708 * regcache.h: Update.
13709 * remote-utils.c (putpkt): Flush after debug output and use
13710 stderr.
13711 Handle input interrupts while waiting for an ACK.
13712 (input_interrupt): Use signal_pid method.
13713 (getpkt): Flush after debug output and use stderr.
13714 (outreg): Use collect_register_as_string.
13715 (new_thread_notify, dead_thread_notify): New functions.
13716 (prepare_resume_reply): Check using_threads. Set thread_from_wait
13717 and general_thread.
13718 (look_up_one_symbol): Flush after debug output.
13719 * server.c (step_thread, server_waiting): New variables.
13720 (start_inferior): Don't use signal_pid. Update call to mywait.
13721 (attach_inferior): Update call to mywait.
13722 (handle_query): Handle qfThreadInfo and qsThreadInfo.
13723 (main): Don't fetch/store registers explicitly. Use
13724 set_desired_inferior. Support proposed ``Hs'' packet. Update
13725 calls to mywait.
13726 * server.h: Update.
13727 (struct inferior_list, struct_inferior_list_entry): New.
13728 * target.c (set_desired_inferior): New.
13729 (write_inferior_memory): Constify.
13730 (mywait): New function.
13731 * target.h: Update.
13732 (struct target_ops): New signal_pid method.
13733 (mywait): Removed macro, added prototype.
13734
13735 * linux-low.h (regset_func): Removed.
13736 (regset_fill_func, regset_store_func): New.
13737 (enum regset_type): New.
13738 (struct regset_info): Add type field. Use new operation types.
13739 (struct linux_target_ops): stop_pc renamed to get_pc.
13740 Add decr_pc_after_break and breakpoint_at.
13741 (get_process, get_thread_proess, get_process_thread)
13742 (strut process_info, all_processes, linux_attach_lwp)
13743 (thread_db_init): New.
13744
13745 * linux-arm-low.c (arm_get_pc, arm_set_pc,
13746 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
13747 (the_low_target): Add new members.
13748 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
13749 (i386_store_fpxregset): Constify.
13750 (target_regsets): Add new kind identifier.
13751 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
13752 (i386_set_pc): Add debugging.
13753 (i386_breakpoint_at): New function.
13754 (the_low_target): Add new members.
13755 * linux-mips-low.c (mips_get_pc, mips_set_pc)
13756 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
13757 (mips_breakpoint_at): New.
13758 (the_low_target): Add new members.
13759 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
13760 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
13761 (the_low_target): Add new members.
13762 * linux-sh-low.c (sh_get_pc, sh_set_pc)
13763 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
13764 (the_low_target): Add new members.
13765 * linux-x86-64-low.c (target_regsets): Add new kind
13766 identifier.
13767
137682002-05-15 Daniel Jacobowitz <drow@mvista.com>
13769
13770 From Martin Pool <mbp@samba.org>:
13771 * server.c (gdbserver_usage): New function.
13772 (main): Call it.
13773
137742002-05-14 Daniel Jacobowitz <drow@mvista.com>
13775
13776 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
13777 stop_at -> stop_pc.
13778
137792002-05-04 Andrew Cagney <ac131313@redhat.com>
13780
13781 * Makefile.in: Remove obsolete code.
13782
137832002-04-24 Michal Ludvig <mludvig@suse.cz>
13784
13785 * linux-low.c (regsets_fetch_inferior_registers),
13786 (regsets_store_inferior_registers): Removed cast to int from
13787 ptrace() calls.
13788 * regcache.h: Added declaration of struct inferior_info.
13789
137902002-04-20 Daniel Jacobowitz <drow@mvista.com>
13791
13792 * inferiors.c (struct inferior_info): Add regcache_data.
13793 (add_inferior): Call create_register_cache.
13794 (clear_inferiors): Call free_register_cache.
13795 (inferior_regcache_data, set_inferior_regcache_data): New functions.
13796 * regcache.c (struct inferior_regcache_data): New.
13797 (registers): Remove.
13798 (get_regcache): New function.
13799 (create_register_cache, free_register_cache): New functions.
13800 (set_register_cache): Don't initialize the register cache here.
13801 (registers_to_string, registers_from_string, register_data): Call
13802 get_regcache.
13803 * regcache.h: Add prototypes.
13804 * server.h: Likewise.
13805
138062002-04-20 Daniel Jacobowitz <drow@mvista.com>
13807
13808 * mem-break.c: New file.
13809 * mem-break.h: New file.
13810 * Makefile.in: Add mem-break.o rule; update server.h
13811 dependencies.
13812 * inferiors.c (struct inferior_info): Add target_data
13813 member.
13814 (clear_inferiors): Free target_data member if set.
13815 (inferior_target_data, set_inferior_target_data): New functions.
13816 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
13817 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
13818 * linux-low.c (linux_bp_reinsert): New variable.
13819 (struct inferior_linux_data): New.
13820 (linux_create_inferior): Use set_inferior_target_data.
13821 (linux_attach): Likewise. Call add_inferior.
13822 (linux_wait_for_one_inferior): New function.
13823 (linux_wait): Call it.
13824 (linux_write_memory): Add const.
13825 (initialize_low): Call set_breakpoint_data.
13826 * linux-low.h (struct linux_target_ops): Add breakpoint
13827 handling members.
13828 * server.c (attach_inferior): Remove extra add_inferior
13829 call.
13830 * server.h: Include mem-break.h. Update inferior.c
13831 prototypes.
13832 * target.c (read_inferior_memory)
13833 (write_inferior_memory): New functions.
13834 * target.h (read_inferior_memory)
13835 (write_inferior_memory): Change macros to prototypes.
13836 (struct target_ops): Update comments. Add const to write_memory
13837 definition.
13838
138392002-04-11 Daniel Jacobowitz <drow@mvista.com>
13840
13841 * linux-low.c (usr_store_inferior_registers): Support
13842 registers which are allowed to fail to store.
13843 * linux-low.h (linux_target_ops): Likewise.
13844 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
13845 (ppc_cannot_store_register): FPSCR may not be storable.
13846
138472002-04-09 Daniel Jacobowitz <drow@mvista.com>
13848
13849 * server.h: Include <string.h> if HAVE_STRING_H.
13850 * ChangeLog: Correct paths in last ChangeLog entry.
13851
138522002-04-09 Daniel Jacobowitz <drow@mvista.com>
13853
13854 * linux-low.h: Remove obsolete prototypes.
13855 (struct linux_target_ops): New.
13856 (extern the_low_target): New.
13857 * linux-low.c (num_regs, regmap): Remove declarations.
13858 (register_addr): Use the_low_target explicitly.
13859 (fetch_register): Likewise.
13860 (usr_fetch_inferior_registers): Likewise.
13861 (usr_store_inferior_registers): Likewise.
13862 * linux-arm-low.c (num_regs): Remove.
13863 (arm_num_regs): Define.
13864 (arm_regmap): Renamed from regmap, made static.
13865 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
13866 made static.
13867 (arm_cannot_store_register): Renamed from cannot_store_register,
13868 made static.
13869 (the_low_target): New.
13870 * linux-i386-low.c (num_regs): Remove.
13871 (i386_num_regs): Define.
13872 (i386_regmap): Renamed from regmap, made static.
13873 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
13874 made static.
13875 (i386_cannot_store_register): Renamed from cannot_store_register,
13876 made static.
13877 (the_low_target): New.
13878 * linux-ia64-low.c (num_regs): Remove.
13879 (ia64_num_regs): Define.
13880 (ia64_regmap): Renamed from regmap, made static.
13881 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
13882 made static.
13883 (ia64_cannot_store_register): Renamed from cannot_store_register,
13884 made static.
13885 (the_low_target): New.
13886 * linux-m68k-low.c (num_regs): Remove.
13887 (m68k_num_regs): Define.
13888 (m68k_regmap): Renamed from regmap, made static.
13889 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
13890 made static.
13891 (m68k_cannot_store_register): Renamed from cannot_store_register,
13892 made static.
13893 (the_low_target): New.
13894 * linux-mips-low.c (num_regs): Remove.
13895 (mips_num_regs): Define.
13896 (mips_regmap): Renamed from regmap, made static.
13897 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
13898 made static.
13899 (mips_cannot_store_register): Renamed from cannot_store_register,
13900 made static.
13901 (the_low_target): New.
13902 * linux-ppc-low.c (num_regs): Remove.
13903 (ppc_num_regs): Define.
13904 (ppc_regmap): Renamed from regmap, made static.
13905 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
13906 made static.
13907 (ppc_cannot_store_register): Renamed from cannot_store_register,
13908 made static.
13909 (the_low_target): New.
13910 * linux-s390-low.c (num_regs): Remove.
13911 (s390_num_regs): Define.
13912 (s390_regmap): Renamed from regmap, made static.
13913 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
13914 made static.
13915 (s390_cannot_store_register): Renamed from cannot_store_register,
13916 made static.
13917 (the_low_target): New.
13918 * linux-sh-low.c (num_regs): Remove.
13919 (sh_num_regs): Define.
13920 (sh_regmap): Renamed from regmap, made static.
13921 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
13922 made static.
13923 (sh_cannot_store_register): Renamed from cannot_store_register,
13924 made static.
13925 (the_low_target): New.
13926 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
13927 (the_low_target): New.
13928
139292002-04-09 Daniel Jacobowitz <drow@mvista.com>
13930
13931 * Makefile.in: Add stamp-h target.
13932 * configure.in: Create stamp-h.
13933 * configure: Regenerated.
13934
139352002-04-09 Daniel Jacobowitz <drow@mvista.com>
13936
13937 * inferiors.c: New file.
13938 * target.c: New file.
13939 * target.h: New file.
13940 * Makefile.in: Add target.o and inferiors.o. Update
13941 dependencies.
13942 * linux-low.c (inferior_pid): New static variable,
13943 moved from server.c.
13944 (linux_create_inferior): Renamed from create_inferior.
13945 Call add_inferior. Return 0 on success instead of a PID.
13946 (linux_attach): Renamed from myattach.
13947 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
13948 (linux_thread_alive): Renamed from mythread_alive.
13949 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
13950 child dies.
13951 (linux_resume): Renamed from myresume. Add missing ``return 0''.
13952 (regsets_store_inferior_registers): Correct error message.
13953 Add missing ``return 0''.
13954 (linux_fetch_registers): Renamed from fetch_inferior_registers.
13955 (linux_store_registers): Renamed from store_inferior_registers.
13956 (linux_read_memory): Renamed from read_inferior_memory.
13957 (linux_write_memory): Renamed from write_inferior_memory.
13958 (linux_target_ops): New structure.
13959 (initialize_low): Call set_target_ops ().
13960 * remote-utils.c (unhexify): New function.
13961 (hexify): New function.
13962 (input_interrupt): Send signals to ``signal_pid''.
13963 * server.c (inferior_pid): Remove.
13964 (start_inferior): Update create_inferior call.
13965 (attach_inferior): Call add_inferior.
13966 (handle_query): New function.
13967 (main): Call handle_query for `q' packets.
13968 * server.h: Include "target.h". Remove obsolete prototypes.
13969 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
13970
139712002-04-09 Daniel Jacobowitz <drow@mvista.com>
13972
13973 * Makefile.in: Add WARN_CFLAGS. Update configury
13974 dependencies.
13975 * configure.in: Check for <string.h>
13976 * configure: Regenerate.
13977 * config.in: Regenerate.
13978 * gdbreplay.c: Include needed system headers.
13979 (remote_open): Remove strchr prototype.
13980 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
13981 * regcache.c (supply_register): Change buf argument to const void *.
13982 (supply_register_by_name): Likewise.
13983 (collect_register): Change buf argument to void *.
13984 (collect_register_by_name): Likewise.
13985 * regcache.h: Add missing prototypes.
13986 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
13987 * server.c (handle_query): New function.
13988 (attached): New static variable, moved out of main.
13989 (main): Quiet longjmp clobber warnings.
13990 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
13991 * utils.c (error): Remove NORETURN.
13992 (fatal): Likewise.