[C++] Default to -Werror in C++ mode too
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-11-19 Pedro Alves <palves@redhat.com>
2
3 * configure.ac (ERROR_ON_WARNING): Don't check whether in C++
4 mode.
5 * configure: Regenerate.
6
7 2015-11-19 Pedro Alves <palves@redhat.com>
8
9 * configure: Regenerate.
10
11 2015-11-19 Yao Qi <yao.qi@linaro.org>
12
13 * linux-aarch64-low.c (emit_data_processing_reg): Change opcode
14 type to uint32_t.
15
16 2015-11-19 Yao Qi <yao.qi@linaro.org>
17
18 * linux-aarch64-low.c (enum aarch64_operand_type): New.
19 (struct aarch64_operand): Move enum out.
20
21 2015-11-19 Yao Qi <yao.qi@linaro.org>
22
23 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
24 struct user_fpsimd_state *.
25 (aarch64_store_fpregset): Likewise.
26
27 2015-11-19 Yao Qi <yao.qi@linaro.org>
28
29 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
30 struct user_pt_regs *.
31 (aarch64_store_gregset): Likewise.
32
33 2015-11-18 Pedro Alves <palves@redhat.com>
34
35 * Makefile.in (all_object_files): Add $IPA_OBJS.
36
37 2015-11-17 Pedro Alves <palves@redhat.com>
38
39 * win32-low.c (win32_resume): Use gdb_signal_from_host,
40 GDB_SIGNAL_0 and gdb_signal_to_string.
41
42 2015-11-17 Pedro Alves <palves@redhat.com>
43
44 * win32-low.c (handle_output_debug_string): Remove parameter.
45 (win32_kill): Remove our_status local and adjust call to
46 handle_output_debug_string.
47 (get_child_debug_event): Adjust call to
48 handle_output_debug_string.
49
50 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
51
52 * linux-mips-low.c (mips_fill_gregset): Add cast.
53 (mips_store_gregset): Likewise.
54 (mips_fill_fpregset): Likewise.
55 (mips_store_fpregset): Likewise.
56
57 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
58
59 * linux-mips-low.c (mips_add_watchpoint): Rename private to
60 priv.
61
62 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
63
64 * linux-mips-low.c (mips_linux_new_thread): Change type of
65 watch_type to enum target_hw_bp_type.
66
67 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
68
69 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
70 Change return type to arm_hwbp_type.
71
72 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
73
74 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
75 (arm_store_gregset): Likewise.
76 * linux-arm-low.c (arm_get_hwcap): Likewise.
77 (arm_read_description): Likewise.
78
79 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
80
81 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
82
83 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
84
85 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
86 (ppc_fill_vsxregset): Likewise.
87 (ppc_store_vsxregset): Likewise.
88 (ppc_fill_vrregset): Likewise.
89 (ppc_store_vrregset): Likewise.
90 (ppc_fill_evrregset): Likewise.
91 (ppc_store_evrregset): Likewise.
92
93 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
94
95 * linux-ppc-low.c (ppc_usrregs_info): Remove
96 forward-declaration.
97 (ppc_arch_setup): Move lower in file.
98
99 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
100
101 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
102 (ps_pdwrite): Likewise.
103
104 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
105
106 * linux-arm-low.c (arm_new_thread): Move pointer dereference
107 to after assert checks.
108
109 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
110
111 * proc-service.c (ps_pdread): Add/adjust casts.
112 (ps_pdwrite): Add/adjust casts.
113
114 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
115
116 * server.c (handle_search_memory_1): Cast return value of
117 memmem.
118
119 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
120
121 * server.c (write_qxfer_response): Change type of data to
122 gdb_byte *.
123
124 2015-10-29 Pedro Alves <palves@redhat.com>
125
126 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
127
128 2015-10-29 Pedro Alves <palves@redhat.com>
129
130 * tracepoint.c (clear_installed_tracepoints): Add casts.
131
132 2015-10-29 Pedro Alves <palves@redhat.com>
133
134 * server.c (handle_v_cont, process_serial_event): Add enum
135 gdb_signal casts to signal parsing code.
136
137 2015-10-29 Pedro Alves <palves@redhat.com>
138
139 * linux-low.h (NULL_REGSET): Define.
140 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
141 * linux-arm-low.c (arm_regsets): Likewise.
142 * linux-crisv32-low.c (cris_regsets): Likewise.
143 * linux-m68k-low.c (m68k_regsets): Likewise.
144 * linux-mips-low.c (mips_regsets): Likewise.
145 * linux-nios2-low.c (nios2_regsets): Likewise.
146 * linux-ppc-low.c (ppc_regsets): Likewise.
147 * linux-s390-low.c (s390_regsets): Likewise.
148 * linux-sh-low.c (sh_regsets): Likewise.
149 * linux-sparc-low.c (sparc_regsets): Likewise.
150 * linux-tic6x-low.c (tic6x_regsets): Likewise.
151 * linux-tile-low.c (tile_regsets): Likewise.
152 * linux-x86-low.c (x86_regsets): Likewise.
153 * linux-xtensa-low.c (xtensa_regsets): Likewise.
154
155 2015-10-29 Pedro Alves <palves@redhat.com>
156
157 * linux-low.h (NULL_REGSET): Define.
158 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
159 * linux-arm-low.c (arm_regsets): Likewise.
160 * linux-crisv32-low.c (cris_regsets): Likewise.
161 * linux-m68k-low.c (m68k_regsets): Likewise.
162 * linux-mips-low.c (mips_regsets): Likewise.
163 * linux-nios2-low.c (nios2_regsets): Likewise.
164 * linux-ppc-low.c (ppc_regsets): Likewise.
165 * linux-s390-low.c (s390_regsets): Likewise.
166 * linux-sh-low.c (sh_regsets): Likewise.
167 * linux-sparc-low.c (sparc_regsets): Likewise.
168 * linux-tic6x-low.c (tic6x_regsets): Likewise.
169 * linux-tile-low.c (tile_regsets): Likewise.
170 * linux-x86-low.c (x86_regsets): Likewise.
171 * linux-xtensa-low.c (xtensa_regsets): Likewise.
172
173 2015-10-26 Doug Evans <dje@google.com>
174
175 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
176
177 2015-10-26 Doug Evans <dje@google.com>
178
179 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
180
181 2015-10-26 Doug Evans <dje@google.com>
182
183 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
184 for debug_printf.
185 (attach_thread, find_new_threads_callback): Ditto.
186
187 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
188
189 * mem-break.h (set_breakpoint_data): Remove.
190
191 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
192
193 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
194 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
195 (initialize_low): Remove set_breakpoint_data call.
196 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
197 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
198 (initialize_low): Remove set_breakpoint_data call.
199 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
200 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
201 (initialize_low): Remove set_breakpoint_data call.
202
203 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
204
205 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
206 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
207 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
208 * target.h (target_breakpoint_kind_from_pc): New macro.
209
210 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
211
212 * linux-low.c (default_breakpoint_kind_from_pc): New function.
213 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
214 the default breakpoint kind.
215
216 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
217
218 * linux-arm-low.c (arm_supports_z_point_type): Add software
219 breakpoint support.
220
221 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
222
223 * linux-arm-low.c: Refactor breakpoint definitions.
224 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
225 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
226
227 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
228
229 * Makefile.in: Add arm.c/o.
230 * configure.srv: Likewise.
231 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
232 (arm_breakpoint_kind_from_pc): New function.
233 (arm_sw_breakpoint_from_kind): Return proper kind.
234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
235
236 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
237
238 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
239 removal.
240 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
241 (struct raw_breakpoint) <size>: Remove.
242 (struct raw_breakpoint) <kind>: Add.
243 (bp_size): New function.
244 (bp_opcode): Likewise.
245 (find_raw_breakpoint_at): Adjust for kind.
246 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
247 (remove_memory_breakpoint): Adjust for kind call bp_size.
248 (set_raw_breakpoint_at): Adjust for kind.
249 (set_breakpoint): Likewise.
250 (set_breakpoint_at): Call breakpoint_kind_from_pc.
251 (delete_raw_breakpoint): Adjust for kind.
252 (delete_breakpoint): Likewise.
253 (find_gdb_breakpoint): Likewise.
254 (set_gdb_breakpoint_1): Likewise.
255 (set_gdb_breakpoint): Likewise.
256 (delete_gdb_breakpoint_1): Likewise.
257 (delete_gdb_breakpoint): Likewise.
258 (uninsert_raw_breakpoint): Likewise.
259 (reinsert_raw_breakpoint): Likewise.
260 (set_breakpoint_data): Remove.
261 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
262 (check_mem_read): Adjust for kind call bp_size.
263 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
264 (clone_one_breakpoint): Adjust for kind.
265 * mem-break.h (set_gdb_breakpoint): Likewise.
266 (delete_gdb_breakpoint): Likewise.
267 * server.c (process_serial_event): Likewise.
268
269 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
270
271 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
272 (struct linux_target_ops) <breakpoint>: Remove.
273 (struct linux_target_ops) <breakpoint_len>: Remove.
274 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
275 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
276 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
277 (arm_sw_breakpoint_from_kind): New function.
278 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
279 (struct linux_target_ops) <breakpoint>: Remove.
280 (struct linux_target_ops) <breakpoint_len>: Remove.
281 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
282 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
283 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
284 (struct linux_target_ops) <breakpoint>: Remove.
285 (struct linux_target_ops) <breakpoint_len>: Remove.
286 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
287 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
288 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
289 (struct linux_target_ops) <breakpoint>: Remove.
290 (struct linux_target_ops) <breakpoint_len>: Remove.
291 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
292 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
293 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
294 and sw_breakpoint_from_kind to increment the pc.
295 (linux_breakpoint_kind_from_pc): New function.
296 (linux_sw_breakpoint_from_kind): New function.
297 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
298 (initialize_low): Call breakpoint_kind_from_pc and
299 sw_breakpoint_from_kind to replace breakpoint_data/len.
300 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
301 New field.
302 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
303 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
304 (struct linux_target_ops) <breakpoint>: Remove.
305 (struct linux_target_ops) <breakpoint_len>: Remove.
306 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
307 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
308 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
309 (struct linux_target_ops) <breakpoint>: Remove.
310 (struct linux_target_ops) <breakpoint_len>: Remove.
311 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
312 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
313 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
314 (struct linux_target_ops) <breakpoint>: Remove.
315 (struct linux_target_ops) <breakpoint_len>: Remove.
316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
318 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
319 (struct linux_target_ops) <breakpoint>: Remove.
320 (struct linux_target_ops) <breakpoint_len>: Remove.
321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
323 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
324 (struct linux_target_ops) <breakpoint>: Remove.
325 (struct linux_target_ops) <breakpoint_len>: Remove.
326 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
327 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
328 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
329 (struct linux_target_ops) <breakpoint>: Remove.
330 (struct linux_target_ops) <breakpoint_len>: Remove.
331 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
332 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
333 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
334 (struct linux_target_ops) <breakpoint>: Remove.
335 (struct linux_target_ops) <breakpoint_len>: Remove.
336 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
337 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
338 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
339 (struct linux_target_ops) <breakpoint>: Remove.
340 (struct linux_target_ops) <breakpoint_len>: Remove.
341 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
342 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
343 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
344 (struct linux_target_ops) <breakpoint>: Remove.
345 (struct linux_target_ops) <breakpoint_len>: Remove.
346 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
347 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
348 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
349 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
350 (struct linux_target_ops) <breakpoint>: Remove.
351 (struct linux_target_ops) <breakpoint_len>: Remove.
352 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
353 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
354 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
355 (struct linux_target_ops) <breakpoint>: Remove.
356 (struct linux_target_ops) <breakpoint_len>: Remove.
357 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
358 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
359
360 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
361
362 * linux-cris-low.c (cris_get_pc): Remove void arg.
363
364 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
365
366 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
367 variable name.
368
369 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
370
371 * inferiors.c (thread_pid_matches_callback): New function.
372 (find_thread_process): New function.
373 (remove_thread): Reset current_thread.
374 (remove_process): Assert threads have been removed first.
375
376 2015-10-15 Yao Qi <yao.qi@linaro.org>
377
378 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
379 if it is 3.
380 (aarch64_remove_point): Likewise.
381 * regcache.c (regcache_register_size): New function.
382
383 2015-10-12 Yao Qi <yao.qi@linaro.org>
384
385 * linux-aarch64-low.c: Update all callers as emit_load_store
386 is renamed to aarch64_emit_load_store.
387
388 2015-10-12 Yao Qi <yao.qi@linaro.org>
389
390 * linux-aarch64-low.c: Update all callers of function renaming
391 from emit_insn to aarch64_emit_insn.
392
393 2015-10-12 Yao Qi <yao.qi@linaro.org>
394
395 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
396 arch/aarch64-insn.h.
397 (struct aarch64_memory_operand): Likewise.
398 (ENCODE): Likewise.
399 (emit_insn): Move to arch/aarch64-insn.c.
400 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
401 (emit_load_store): Move to arch/aarch64-insn.c.
402 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
403 (can_encode_int32): Remove.
404
405 2015-10-12 Yao Qi <yao.qi@linaro.org>
406
407 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
408 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
409 (aarch64_relocate_instruction): Likewise.
410 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
411 (struct aarch64_insn_visitor): Likewise.
412
413 2015-10-12 Yao Qi <yao.qi@linaro.org>
414
415 * linux-aarch64-low.c (struct aarch64_insn_data): New.
416 (struct aarch64_insn_visitor): New.
417 (struct aarch64_insn_relocation_data): New.
418 (aarch64_ftrace_insn_reloc_b): New function.
419 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
420 (aarch64_ftrace_insn_reloc_cb): Likewise.
421 (aarch64_ftrace_insn_reloc_tb): Likewise.
422 (aarch64_ftrace_insn_reloc_adr): Likewise.
423 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
424 (aarch64_ftrace_insn_reloc_others): Likewise.
425 (visitor): New.
426 (aarch64_relocate_instruction): Use visitor.
427
428 2015-10-12 Yao Qi <yao.qi@linaro.org>
429
430 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
431 int. Add argument buf.
432 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
433 aarch64_relocate_instruction.
434
435 2015-10-12 Yao Qi <yao.qi@linaro.org>
436
437 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
438 argument insn. Remove local variable insn. Don't call
439 target_read_uint32.
440 (aarch64_install_fast_tracepoint_jump_pad): Call
441 target_read_uint32.
442
443 2015-09-30 Yao Qi <yao.qi@linaro.org>
444
445 * linux-aarch64-low.c (emit_movk): Shorten a long line.
446 (emit_load_store_pair): Likewise.
447
448 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
449
450 * dll.c (match_dll): Add cast(s).
451 (unloaded_dll): Likewise.
452 * linux-low.c (second_thread_of_pid_p): Likewise.
453 (delete_lwp_callback): Likewise.
454 (count_events_callback): Likewise.
455 (select_event_lwp_callback): Likewise.
456 (linux_set_resume_request): Likewise.
457 * server.c (accumulate_file_name_length): Likewise.
458 (emit_dll_description): Likewise.
459 (handle_qxfer_threads_worker): Likewise.
460 (visit_actioned_threads): Likewise.
461 * thread-db.c (any_thread_of): Likewise.
462 * tracepoint.c (same_process_p): Likewise.
463 (match_blocktype): Likewise.
464 (build_traceframe_info_xml): Likewise.
465
466 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
467
468 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
469 assignment.
470 (gdb_unparse_agent_expr): Likewise.
471 * hostio.c (require_data): Likewise.
472 (handle_pread): Likewise.
473 * linux-low.c (disable_regset): Likewise.
474 (fetch_register): Likewise.
475 (store_register): Likewise.
476 (get_dynamic): Likewise.
477 (linux_qxfer_libraries_svr4): Likewise.
478 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
479 (set_fast_tracepoint_jump): Likewise.
480 (uninsert_fast_tracepoint_jumps_at): Likewise.
481 (reinsert_fast_tracepoint_jumps_at): Likewise.
482 (validate_inserted_breakpoint): Likewise.
483 (clone_agent_expr): Likewise.
484 * regcache.c (init_register_cache): Likewise.
485 * remote-utils.c (putpkt_binary_1): Likewise.
486 (decode_M_packet): Likewise.
487 (decode_X_packet): Likewise.
488 (look_up_one_symbol): Likewise.
489 (relocate_instruction): Likewise.
490 (monitor_output): Likewise.
491 * server.c (handle_search_memory): Likewise.
492 (handle_qxfer_exec_file): Likewise.
493 (handle_qxfer_libraries): Likewise.
494 (handle_qxfer): Likewise.
495 (handle_query): Likewise.
496 (handle_v_cont): Likewise.
497 (handle_v_run): Likewise.
498 (captured_main): Likewise.
499 * target.c (write_inferior_memory): Likewise.
500 * thread-db.c (try_thread_db_load_from_dir): Likewise.
501 * tracepoint.c (init_trace_buffer): Likewise.
502 (add_tracepoint_action): Likewise.
503 (add_traceframe): Likewise.
504 (add_traceframe_block): Likewise.
505 (cmd_qtdpsrc): Likewise.
506 (cmd_qtdv): Likewise.
507 (cmd_qtstatus): Likewise.
508 (response_source): Likewise.
509 (response_tsv): Likewise.
510 (cmd_qtnotes): Likewise.
511 (gdb_collect): Likewise.
512 (initialize_tracepoint): Likewise.
513
514 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
515
516 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
517 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
518 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
519 <NOP>: New.
520 (enum aarch64_condition_codes): New enum.
521 (w0): New static global.
522 (fp): Likewise.
523 (lr): Likewise.
524 (struct aarch64_memory_operand) <type>: New
525 MEMORY_OPERAND_POSTINDEX type.
526 (postindex_memory_operand): New helper function.
527 (emit_ret): New function.
528 (emit_load_store_pair): New function, factored out of emit_stp
529 with support for MEMORY_OPERAND_POSTINDEX.
530 (emit_stp): Rewrite using emit_load_store_pair.
531 (emit_ldp): New function.
532 (emit_load_store): Likewise.
533 (emit_ldr): Mention post-index instruction in comment.
534 (emit_ldrh): New function.
535 (emit_ldrb): New function.
536 (emit_ldrsw): Mention post-index instruction in comment.
537 (emit_str): Likewise.
538 (emit_subs): New function.
539 (emit_cmp): Likewise.
540 (emit_and): Likewise.
541 (emit_orr): Likewise.
542 (emit_orn): Likewise.
543 (emit_eor): Likewise.
544 (emit_mvn): Likewise.
545 (emit_lslv): Likewise.
546 (emit_lsrv): Likewise.
547 (emit_asrv): Likewise.
548 (emit_mul): Likewise.
549 (emit_sbfm): Likewise.
550 (emit_sbfx): Likewise.
551 (emit_ubfm): Likewise.
552 (emit_ubfx): Likewise.
553 (emit_csinc): Likewise.
554 (emit_cset): Likewise.
555 (emit_nop): Likewise.
556 (emit_ops_insns): New helper function.
557 (emit_pop): Likewise.
558 (emit_push): Likewise.
559 (aarch64_emit_prologue): New function.
560 (aarch64_emit_epilogue): Likewise.
561 (aarch64_emit_add): Likewise.
562 (aarch64_emit_sub): Likewise.
563 (aarch64_emit_mul): Likewise.
564 (aarch64_emit_lsh): Likewise.
565 (aarch64_emit_rsh_signed): Likewise.
566 (aarch64_emit_rsh_unsigned): Likewise.
567 (aarch64_emit_ext): Likewise.
568 (aarch64_emit_log_not): Likewise.
569 (aarch64_emit_bit_and): Likewise.
570 (aarch64_emit_bit_or): Likewise.
571 (aarch64_emit_bit_xor): Likewise.
572 (aarch64_emit_bit_not): Likewise.
573 (aarch64_emit_equal): Likewise.
574 (aarch64_emit_less_signed): Likewise.
575 (aarch64_emit_less_unsigned): Likewise.
576 (aarch64_emit_ref): Likewise.
577 (aarch64_emit_if_goto): Likewise.
578 (aarch64_emit_goto): Likewise.
579 (aarch64_write_goto_address): Likewise.
580 (aarch64_emit_const): Likewise.
581 (aarch64_emit_call): Likewise.
582 (aarch64_emit_reg): Likewise.
583 (aarch64_emit_pop): Likewise.
584 (aarch64_emit_stack_flush): Likewise.
585 (aarch64_emit_zero_ext): Likewise.
586 (aarch64_emit_swap): Likewise.
587 (aarch64_emit_stack_adjust): Likewise.
588 (aarch64_emit_int_call_1): Likewise.
589 (aarch64_emit_void_call_2): Likewise.
590 (aarch64_emit_eq_goto): Likewise.
591 (aarch64_emit_ne_goto): Likewise.
592 (aarch64_emit_lt_goto): Likewise.
593 (aarch64_emit_le_goto): Likewise.
594 (aarch64_emit_gt_goto): Likewise.
595 (aarch64_emit_ge_got): Likewise.
596 (aarch64_emit_ops_impl): New static global variable.
597 (aarch64_emit_ops): New target function, return
598 &aarch64_emit_ops_impl.
599 (struct linux_target_ops): Install it.
600
601 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
602
603 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
604 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
605 aarch64-ipa.o.
606 * linux-aarch64-ipa.c: New file.
607 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
608 and endian.h.
609 (aarch64_get_thread_area): New target method.
610 (extract_signed_bitfield): New helper function.
611 (aarch64_decode_ldr_literal): New function.
612 (enum aarch64_opcodes): New enum.
613 (struct aarch64_register): New struct.
614 (struct aarch64_operand): New struct.
615 (x0): New static global.
616 (x1): Likewise.
617 (x2): Likewise.
618 (x3): Likewise.
619 (x4): Likewise.
620 (w2): Likewise.
621 (ip0): Likewise.
622 (sp): Likewise.
623 (xzr): Likewise.
624 (aarch64_register): New helper function.
625 (register_operand): Likewise.
626 (immediate_operand): Likewise.
627 (struct aarch64_memory_operand): New struct.
628 (offset_memory_operand): New helper function.
629 (preindex_memory_operand): Likewise.
630 (enum aarch64_system_control_registers): New enum.
631 (ENCODE): New macro.
632 (emit_insn): New helper function.
633 (emit_b): New function.
634 (emit_bcond): Likewise.
635 (emit_cb): Likewise.
636 (emit_tb): Likewise.
637 (emit_blr): Likewise.
638 (emit_stp): Likewise.
639 (emit_ldp_q_offset): Likewise.
640 (emit_stp_q_offset): Likewise.
641 (emit_load_store): Likewise.
642 (emit_ldr): Likewise.
643 (emit_ldrsw): Likewise.
644 (emit_str): Likewise.
645 (emit_ldaxr): Likewise.
646 (emit_stxr): Likewise.
647 (emit_stlr): Likewise.
648 (emit_data_processing_reg): Likewise.
649 (emit_data_processing): Likewise.
650 (emit_add): Likewise.
651 (emit_sub): Likewise.
652 (emit_mov): Likewise.
653 (emit_movk): Likewise.
654 (emit_mov_addr): Likewise.
655 (emit_mrs): Likewise.
656 (emit_msr): Likewise.
657 (emit_sevl): Likewise.
658 (emit_wfe): Likewise.
659 (append_insns): Likewise.
660 (can_encode_int32_in): New helper function.
661 (aarch64_relocate_instruction): New function.
662 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
663 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
664 (struct linux_target_ops): Install aarch64_get_thread_area,
665 aarch64_install_fast_tracepoint_jump_pad and
666 aarch64_get_min_fast_tracepoint_insn_len.
667
668 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
669
670 * Makefile.in (aarch64-insn.o): New rule.
671 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
672
673 2015-09-21 Yao Qi <yao.qi@linaro.org>
674
675 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
676
677 2015-09-21 Yao Qi <yao.qi@linaro.org>
678
679 * tracepoint.c (max_jump_pad_size): Remove.
680
681 2015-09-18 Yao Qi <yao.qi@linaro.org>
682
683 * linux-aarch64-low.c: Don't include sys/uio.h.
684 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
685
686 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
687
688 * tracepoint.c (eval_result_type): Change prototype.
689 (condition_true_at_tracepoint): Fix argument to compiled_cond.
690
691 2015-09-15 Pedro Alves <palves@redhat.com>
692
693 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
694 Check whether to report exec events instead of checking whether
695 multiprocess is enabled.
696
697 2015-09-15 Pedro Alves <palves@redhat.com>
698
699 PR remote/18965
700 * remote-utils.c (prepare_resume_reply): Merge
701 TARGET_WAITKIND_VFORK_DONE switch case with the
702 TARGET_WAITKIND_FORKED case.
703
704 2015-09-15 Yao Qi <yao.qi@linaro.org>
705
706 * server.c (handle_query): Check string comparison using
707 "else if" instead of "if".
708
709 2015-09-15 Yao Qi <yao.qi@linaro.org>
710
711 * server.c (vCont_supported): New global variable.
712 (handle_query): Set vCont_supported to 1 if "vContSupported+"
713 matches. Append ";vContSupported+" to own_buf.
714 (handle_v_requests): Append ";s;S" to own_buf if target supports
715 hardware single step or vCont_supported is false.
716 (capture_main): Set vCont_supported to zero.
717
718 2015-09-15 Yao Qi <yao.qi@linaro.org>
719
720 * linux-low.c (linux_supports_conditional_breakpoints): Rename
721 it to ...
722 (linux_supports_hardware_single_step): ... New function.
723 (linux_target_ops): Update.
724 * lynx-low.c (lynx_target_ops): Set field
725 supports_hardware_single_step to target_can_do_hardware_single_step.
726 * nto-low.c (nto_target_ops): Likewise.
727 * spu-low.c (spu_target_ops): Likewise.
728 * win32-low.c (win32_target_ops): Likewise.
729 * target.c (target_can_do_hardware_single_step): New function.
730 * target.h (struct target_ops) <supports_conditional_breakpoints>:
731 Remove. <supports_hardware_single_step>: New field.
732 (target_supports_conditional_breakpoints): Remove.
733 (target_supports_hardware_single_step): New macro.
734 (target_can_do_hardware_single_step): Declare.
735 * server.c (handle_query): Use target_supports_hardware_single_step
736 instead of target_supports_conditional_breakpoints.
737
738 2015-09-15 Yao Qi <yao.qi@linaro.org>
739
740 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
741 function.
742 (struct linux_target_ops the_low_target): Install
743 aarch64_linux_siginfo_fixup.
744
745 2015-09-11 Don Breazeal <donb@codesourcery.com>
746 Luis Machado <lgustavo@codesourcery.com>
747
748 * linux-low.c (linux_mourn): Static declaration.
749 (linux_arch_setup): Move in front of
750 handle_extended_wait.
751 (linux_arch_setup_thread): New function.
752 (handle_extended_wait): Handle exec events. Call
753 linux_arch_setup_thread. Make event_lwp argument a
754 pointer-to-a-pointer.
755 (check_zombie_leaders): Do not check stopped threads.
756 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
757 (linux_low_filter_event): Add lwp and thread for exec'ing
758 non-leader thread if leader thread has been deleted.
759 Refactor code into linux_arch_setup_thread and call it.
760 Pass child lwp pointer by reference to handle_extended_wait.
761 (linux_wait_for_event_filtered): Update comment.
762 (linux_wait_1): Prevent clobbering exec event status.
763 (linux_supports_exec_events): New function.
764 (linux_target_ops) <supports_exec_events>: Initialize new member.
765 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
766 new member.
767 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
768 * server.c (report_exec_events): New global variable.
769 (handle_query): Handle qSupported query for exec-events feature.
770 (captured_main): Initialize report_exec_events.
771 * server.h (report_exec_events): Declare new global variable.
772 * target.h (struct target_ops) <supports_exec_events>: New
773 member.
774 (target_supports_exec_events): New macro.
775 * win32-low.c (win32_target_ops) <supports_exec_events>:
776 Initialize new member.
777
778 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
779
780 * linux-low.c (linux_low_enable_btrace): Remove.
781 (linux_target_ops): Replace linux_low_enable_btrace with
782 linux_enable_btrace.
783
784 2015-09-03 Yao Qi <yao.qi@linaro.org>
785
786 * linux-aarch64-low.c (aarch64_insert_point): Call
787 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
788 returns true.
789
790 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
791
792 * linux-low.c (check_stopped_by_breakpoint): Use
793 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
794
795 2015-08-27 Pedro Alves <palves@redhat.com>
796
797 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
798
799 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
800
801 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
802 the XNEW-family equivalent.
803 (compile_bytecodes): Likewise.
804 * dll.c (loaded_dll): Likewise.
805 * event-loop.c (append_callback_event): Likewise.
806 (create_file_handler): Likewise.
807 (create_file_event): Likewise.
808 * hostio.c (handle_open): Likewise.
809 * inferiors.c (add_thread): Likewise.
810 (add_process): Likewise.
811 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
812 * linux-arm-low.c (arm_new_process): Likewise.
813 (arm_new_thread): Likewise.
814 * linux-low.c (add_to_pid_list): Likewise.
815 (linux_add_process): Likewise.
816 (handle_extended_wait): Likewise.
817 (add_lwp): Likewise.
818 (enqueue_one_deferred_signal): Likewise.
819 (enqueue_pending_signal): Likewise.
820 (linux_resume_one_lwp_throw): Likewise.
821 (linux_resume_one_thread): Likewise.
822 (linux_read_memory): Likewise.
823 (linux_write_memory): Likewise.
824 * linux-mips-low.c (mips_linux_new_process): Likewise.
825 (mips_linux_new_thread): Likewise.
826 (mips_add_watchpoint): Likewise.
827 * linux-x86-low.c (initialize_low_arch): Likewise.
828 * lynx-low.c (lynx_add_process): Likewise.
829 * mem-break.c (set_raw_breakpoint_at): Likewise.
830 (set_breakpoint): Likewise.
831 (add_condition_to_breakpoint): Likewise.
832 (add_commands_to_breakpoint): Likewise.
833 (clone_agent_expr): Likewise.
834 (clone_one_breakpoint): Likewise.
835 * regcache.c (new_register_cache): Likewise.
836 * remote-utils.c (look_up_one_symbol): Likewise.
837 * server.c (queue_stop_reply): Likewise.
838 (start_inferior): Likewise.
839 (queue_stop_reply_callback): Likewise.
840 (handle_target_event): Likewise.
841 * spu-low.c (fetch_ppc_memory): Likewise.
842 (store_ppc_memory): Likewise.
843 * target.c (set_target_ops): Likewise.
844 * thread-db.c (thread_db_load_search): Likewise.
845 (try_thread_db_load_1): Likewise.
846 * tracepoint.c (add_tracepoint): Likewise.
847 (add_tracepoint_action): Likewise.
848 (create_trace_state_variable): Likewise.
849 (cmd_qtdpsrc): Likewise.
850 (cmd_qtro): Likewise.
851 (add_while_stepping_state): Likewise.
852 * win32-low.c (child_add_thread): Likewise.
853 (get_image_name): Likewise.
854
855 2015-08-25 Yao Qi <yao.qi@linaro.org>
856
857 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
858
859 2015-08-25 Yao Qi <yao.qi@linaro.org>
860
861 * Makefile.in (aarch64-linux.o): New rule.
862 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
863 srv_tgtobj.
864 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
865 (aarch64_init_debug_reg_state): Make it extern.
866 (aarch64_linux_prepare_to_resume): Remove.
867
868 2015-08-25 Yao Qi <yao.qi@linaro.org>
869
870 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
871 lwp_arch_private_info and ptid_of_lwp.
872
873 2015-08-25 Yao Qi <yao.qi@linaro.org>
874
875 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
876 Find proc_info by find_process_pid. All callers updated.
877
878 2015-08-25 Yao Qi <yao.qi@linaro.org>
879
880 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
881 Remove.
882 (debug_reg_change_callback): Remove.
883 (aarch64_notify_debug_reg_change): Remove.
884
885 2015-08-25 Yao Qi <yao.qi@linaro.org>
886
887 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
888 Call current_lwp_ptid.
889
890 2015-08-25 Yao Qi <yao.qi@linaro.org>
891
892 * linux-aarch64-low.c (debug_reg_change_callback): Use
893 debug_printf.
894
895 2015-08-25 Yao Qi <yao.qi@linaro.org>
896
897 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
898
899 2015-08-25 Yao Qi <yao.qi@linaro.org>
900
901 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
902
903 2015-08-25 Yao Qi <yao.qi@linaro.org>
904
905 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
906 the code.
907
908 2015-08-25 Yao Qi <yao.qi@linaro.org>
909
910 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
911 Remove.
912 (debug_reg_change_callback): Remove argument entry and add argument
913 lwp. Remove local variable thread. Don't print thread id in the
914 debugging output. Don't check whether pid of thread equals to pid.
915 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
916 iterate_over_lwps instead find_inferior.
917
918 2015-08-24 Pedro Alves <palves@redhat.com>
919
920 * inferiors.c (get_first_process): New function.
921 * inferiors.h (get_first_process): New declaration.
922 * remote-utils.c (read_ptid): Default to the first process in the
923 list, instead of to the current thread's process.
924
925 2015-08-24 Pedro Alves <palves@redhat.com>
926
927 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
928 * event-loop.c: Likewise.
929 * remote-utils.c: Likewise.
930 * tracepoint.c: Likewise.
931
932 2015-08-24 Pedro Alves <palves@redhat.com>
933
934 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
935 ptid_get_lwp.
936
937 2015-08-21 Pedro Alves <palves@redhat.com>
938
939 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
940 instead of literal 1.
941
942 2015-08-21 Pedro Alves <palves@redhat.com>
943
944 * tdesc.c (default_description): Explicitly zero-initialize.
945
946 2015-08-21 Pedro Alves <palves@redhat.com>
947
948 PR gdb/18749
949 * inferiors.c (remove_thread): Discard any pending stop reply for
950 this thread.
951 * server.c (remove_all_on_match_pid): Rename to ...
952 (remove_all_on_match_ptid): ... this. Work with a filter ptid
953 instead of a pid.
954 (discard_queued_stop_replies): Change parameter to a ptid. Now
955 extern.
956 (handle_v_kill, kill_inferior_callback, captured_main)
957 (process_serial_event): Adjust.
958 * server.h (discard_queued_stop_replies): Declare.
959
960 2015-08-21 Pedro Alves <palves@redhat.com>
961
962 * linux-low.c (wait_for_sigstop): Always switch to no thread
963 selected if the previously current thread dies.
964 * lynx-low.c (lynx_request_interrupt): Use the first thread's
965 process instead of the current thread's.
966 * remote-utils.c (input_interrupt): Don't check if there's no
967 current thread.
968 * server.c (gdb_read_memory, gdb_write_memory): If setting the
969 current thread to the general thread fails, error out.
970 (handle_qxfer_auxv, handle_qxfer_libraries)
971 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
972 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
973 (handle_query): Check if there's a thread selected instead of
974 checking whether there's any thread in the thread list.
975 (handle_qxfer_threads, handle_qxfer_btrace)
976 (handle_qxfer_btrace_conf): Don't error out early if there's no
977 thread in the thread list.
978 (handle_v_cont, myresume): Don't set the current thread to the
979 continue thread.
980 (process_serial_event) <Hg handling>: Also set thread_id if the
981 previous general thread is still alive.
982 (process_serial_event) <g/G handling>: If setting the current
983 thread to the general thread fails, error out.
984 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
985 thread's lwp instead of the current thread's.
986 * target.c (set_desired_thread): If the desired thread was not
987 found, leave the current thread pointing to NULL. Return an int
988 (boolean) indicating success.
989 * target.h (set_desired_thread): Change return type to int.
990
991 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
992
993 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
994 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
995 #includes.
996 (ps_get_thread_area): New function.
997
998 2015-08-19 Gary Benson <gbenson@redhat.com>
999
1000 * hostio.c (handle_pread): Do not attempt to read more data
1001 than hostio_reply_with_data can fit in a packet.
1002
1003 2015-08-18 Joel Brobecker <brobecker@adacore.com>
1004
1005 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
1006
1007 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
1008
1009 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
1010
1011 2015-08-06 Pedro Alves <palves@redhat.com>
1012
1013 * tracepoint.c (expr_eval_result): Now an int.
1014
1015 2015-08-06 Pedro Alves <palves@redhat.com>
1016
1017 * gdbthread.h (struct regcache): Forward declare.
1018 (struct thread_info) <regcache_data>: Now a struct regcache
1019 pointer.
1020 * inferiors.c (inferior_regcache_data)
1021 (set_inferior_regcache_data): Now work with struct regcache
1022 pointers.
1023 * inferiors.h (struct regcache): Forward declare.
1024 (inferior_regcache_data, set_inferior_regcache_data): Now work
1025 with struct regcache pointers.
1026 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1027 (free_register_cache_thread): Remove struct regcache pointer
1028 casts.
1029
1030 2015-08-06 Pedro Alves <palves@redhat.com>
1031
1032 * server.c (captured_main): On error, print the exception message
1033 to stderr, and if run_once is set, throw a quit.
1034
1035 2015-08-06 Pedro Alves <palves@redhat.com>
1036
1037 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1038 the current thread.
1039
1040 2015-08-06 Pedro Alves <palves@redhat.com>
1041
1042 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1043 reading beyond the passed in buffer length.
1044
1045 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1046
1047 * tracepoint.c (symbol_list) <required>: Remove.
1048
1049 2015-08-06 Pedro Alves <palves@redhat.com>
1050
1051 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1052 count if stopping and suspending threads.
1053 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1054 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1055 (linux_detach): Complete an ongoing step-over.
1056 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1057 throughout.
1058 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1059 (linux_wait_1): If passing a signal to the inferior after
1060 finishing a step-over, unsuspend and re-resume all lwps. If we
1061 see a single-step event but the thread should be continuing, don't
1062 pass the trap to gdb.
1063 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1064 internal_error instead of gdb_assert.
1065 (enqueue_pending_signal): New function.
1066 (check_ptrace_stopped_lwp_gone): Add debug output.
1067 (start_step_over): Use internal_error instead of gdb_assert.
1068 (complete_ongoing_step_over): New function.
1069 (linux_resume_one_thread): Don't resume a suspended thread.
1070 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1071 it stepping.
1072
1073 2015-08-06 Pedro Alves <palves@redhat.com>
1074
1075 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1076 (linux_thread_alive): Use lwp_is_marked_dead.
1077 (extended_event_reported): Delete.
1078 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1079 instead of extended_event_reported.
1080 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1081 as well.
1082 (lwp_is_marked_dead): New function.
1083 (lwp_running): Use lwp_is_marked_dead.
1084 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1085 comment.
1086
1087 2015-08-06 Pedro Alves <palves@redhat.com>
1088
1089 * linux-low.c (linux_wait_1): Move fork event output out of the
1090 !report_to_gdb check. Pass event_child->waitstatus to
1091 target_waitstatus_to_string instead of ourstatus.
1092
1093 2015-08-04 Yao Qi <yao.qi@linaro.org>
1094
1095 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1096 if current_thread is 32 bit.
1097
1098 2015-08-04 Yao Qi <yao.qi@linaro.org>
1099
1100 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1101 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1102 * server.c (extended_protocol): Remove "static".
1103 * server.h (extended_protocol): Declare it.
1104
1105 2015-08-04 Yao Qi <yao.qi@linaro.org>
1106
1107 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1108 both aarch64 and aarch32.
1109 (aarch64_set_pc): Likewise.
1110
1111 2015-08-04 Yao Qi <yao.qi@linaro.org>
1112
1113 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1114 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1115 arm-with-neon.xml to srv_xmlfiles.
1116 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1117 (is_64bit_tdesc): New function.
1118 (aarch64_linux_read_description): New function.
1119 (aarch64_arch_setup): Call aarch64_linux_read_description.
1120 (regs_info): Rename to regs_info_aarch64.
1121 (aarch64_regs_info): Return right regs_info.
1122 (initialize_low_arch): Call initialize_low_arch_aarch32.
1123
1124 2015-08-04 Yao Qi <yao.qi@linaro.org>
1125
1126 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1127 * linux-aarch32-low.c: New file.
1128 * linux-aarch32-low.h: New file.
1129 * linux-arm-low.c (arm_fill_gregset): Move it to
1130 linux-aarch32-low.c.
1131 (arm_store_gregset): Likewise.
1132 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1133 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1134 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1135 (regs_info): Rename to regs_info_arm.
1136 (arm_regs_info): Return regs_info_aarch32 if
1137 have_ptrace_getregset is 1 and target description is
1138 arm_with_neon or arm_with_vfpv3.
1139 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1140 Call initialize_low_arch_aarch32 instead.
1141
1142 2015-08-04 Yao Qi <yao.qi@linaro.org>
1143
1144 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1145 * linux-low.c: ... here.
1146 * linux-low.h (have_ptrace_getregset): Declare it.
1147
1148 2015-08-04 Pedro Alves <palves@redhat.com>
1149
1150 * thread-db.c (struct thread_db): Use new typedefs.
1151 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1152 CHK calls.
1153 (disable_thread_event_reporting): Cast result of dlsym to
1154 destination function pointer type.
1155 (thread_db_mourn): Use td_ta_delete_ftype.
1156
1157 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1158
1159 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1160 arch variant.
1161 (CDX_BREAKPOINT): Define for R2.
1162 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1163 (the_low_target): Add comments.
1164
1165 2015-07-30 Yao Qi <yao.qi@linaro.org>
1166
1167 * linux-arm-low.c (arm_hwcap): Remove it.
1168 (arm_read_description): New local variable arm_hwcap. Don't
1169 set arm_hwcap to zero.
1170
1171 2015-07-30 Yao Qi <yao.qi@linaro.org>
1172
1173 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1174 Use regcache->tdesc instead.
1175 (arm_store_wmmxregset): Likewise.
1176 (arm_fill_vfpregset): Likewise.
1177 (arm_store_vfpregset): Likewise.
1178
1179 2015-07-30 Yao Qi <yao.qi@linaro.org>
1180
1181 * linux-arm-low.c: Include arch/arm.h.
1182 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1183 (arm_store_gregset): Likewise.
1184
1185 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1186
1187 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1188 ptrace's 4th parameter.
1189
1190 2015-07-27 Yao Qi <yao.qi@linaro.org>
1191
1192 * configure.srv (case aarch64*-*-linux*): Don't set
1193 srv_linux_usrregs.
1194
1195 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1196
1197 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1198 sys/ptrace.h.
1199 * linux-arm-low.c: Likewise.
1200 * linux-cris-low.c: Likewise.
1201 * linux-crisv32-low.c: Likewise.
1202 * linux-low.c: Likewise.
1203 * linux-m68k-low.c: Likewise.
1204 * linux-mips-low.c: Likewise.
1205 * linux-nios2-low.c: Likewise.
1206 * linux-s390-low.c: Likewise.
1207 * linux-sparc-low.c: Likewise.
1208 * linux-tic6x-low.c: Likewise.
1209 * linux-tile-low.c: Likewise.
1210 * linux-x86-low.c: Likewise.
1211
1212 2015-07-24 Pedro Alves <palves@redhat.com>
1213
1214 * config.in: Regenerate.
1215 * configure: Regenerate.
1216
1217 2015-07-24 Pedro Alves <palves@redhat.com>
1218
1219 * acinclude.m4: Include ../ptrace.m4.
1220 * configure.ac: Call GDB_AC_PTRACE.
1221 * config.in, configure: Regenerate.
1222
1223 2015-07-24 Yao Qi <yao.qi@linaro.org>
1224
1225 * linux-low.c (linux_create_inferior): Remove setting to
1226 proc->priv->new_inferior.
1227 (linux_attach): Likewise.
1228 (linux_low_filter_event): Likewise.
1229 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1230
1231 2015-07-24 Yao Qi <yao.qi@linaro.org>
1232
1233 * linux-low.c (linux_arch_setup): New function.
1234 (linux_low_filter_event): If proc->tdesc is NULL and
1235 proc->attached is true, call the_low_target.arch_setup.
1236 Otherwise, keep status pending, and return.
1237 (linux_resume_one_lwp_throw): Don't call get_pc if
1238 thread->while_stepping isn't NULL. Don't call
1239 get_thread_regcache if proc->tdesc is NULL.
1240 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1241 (linux_target_ops): Install arch_setup.
1242 * server.c (start_inferior): Call the_target->arch_setup.
1243 * target.h (struct target_ops) <arch_setup>: New field.
1244 (target_arch_setup): New marco.
1245 * lynx-low.c (lynx_target_ops): Update.
1246 * nto-low.c (nto_target_ops): Update.
1247 * spu-low.c (spu_target_ops): Update.
1248 * win32-low.c (win32_target_ops): Update.
1249
1250 2015-07-24 Yao Qi <yao.qi@linaro.org>
1251
1252 * linux-low.c (linux_add_process): Don't set
1253 proc->priv->new_inferior.
1254 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1255 (linux_attach): Likewise.
1256
1257 2015-07-24 Yao Qi <yao.qi@linaro.org>
1258
1259 * server.c (start_inferior): Code refactor.
1260
1261 2015-07-24 Yao Qi <yao.qi@linaro.org>
1262
1263 * server.c (process_serial_event): Set general_thread.
1264
1265 2015-07-21 Yao Qi <yao.qi@linaro.org>
1266
1267 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1268 aarch64_linux_get_debug_reg_capacity.
1269
1270 2015-07-17 Yao Qi <yao.qi@linaro.org>
1271
1272 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1273 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1274 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1275 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1276 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1277 (AARCH64_HWP_ALIGNMENT): Likewise.
1278 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1279 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1280 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1281 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1282 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1283 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1284 (struct aarch64_debug_reg_state): Likewise.
1285 (struct arch_lwp_info): Likewise.
1286 (aarch64_align_watchpoint): Likewise.
1287 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1288 (aarch64_watchpoint_length): Likewise.
1289 (aarch64_point_encode_ctrl_reg): Likewise
1290 (aarch64_point_is_aligned): Likewise.
1291 (aarch64_align_watchpoint): Likewise.
1292 (aarch64_linux_set_debug_regs):
1293 (aarch64_dr_state_insert_one_point): Likewise.
1294 (aarch64_dr_state_remove_one_point): Likewise.
1295 (aarch64_handle_breakpoint): Likewise.
1296 (aarch64_handle_aligned_watchpoint): Likewise.
1297 (aarch64_handle_unaligned_watchpoint): Likewise.
1298 (aarch64_handle_watchpoint): Likewise.
1299
1300 2015-07-17 Yao Qi <yao.qi@linaro.org>
1301
1302 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1303 and don't aarch64_get_debug_reg_state. All callers update.
1304 (aarch64_handle_aligned_watchpoint): Likewise.
1305 (aarch64_handle_unaligned_watchpoint): Likewise.
1306 (aarch64_handle_watchpoint): Likewise.
1307 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1308 (aarch64_remove_point): Likewise.
1309
1310 2015-07-17 Yao Qi <yao.qi@linaro.org>
1311
1312 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1313 debug_printf.
1314 (aarch64_handle_unaligned_watchpoint): Likewise.
1315
1316 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1317
1318 Revert the previous 3 commits:
1319 Move gdb_regex* to common/
1320 Move linux_find_memory_regions_full & co.
1321 gdbserver build-id attribute generator
1322
1323 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1324 Jan Kratochvil <jan.kratochvil@redhat.com>
1325
1326 gdbserver build-id attribute generator.
1327 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1328 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1329 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1330 (find_phdr): New.
1331 (get_dynamic): Use find_pdhr to traverse program headers.
1332 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1333 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1334 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1335 (get_hex_build_id): New.
1336 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1337 to reply XML document.
1338
1339 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1340 Jan Kratochvil <jan.kratochvil@redhat.com>
1341
1342 * target.c: Include target/target-utils.h and fcntl.h.
1343 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1344 (target_fileio_read_stralloc): New functions.
1345
1346 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1347
1348 * Makefile.in (OBS): Add gdb_regex.o.
1349 (gdb_regex.o): New.
1350 * config.in: Rebuilt.
1351 * configure: Rebuilt.
1352
1353 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1354 Jan Kratochvil <jan.kratochvil@redhat.com>
1355
1356 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1357 * Makefile.in (OBS): Add target-utils.o.
1358 (linux-maps.o, target-utils.o): New.
1359 * configure.srv (srv_linux_obj): Add linux-maps.o.
1360
1361 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1362
1363 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1364 function, return 1.
1365 (the_low_target): Install it.
1366
1367 2015-07-14 Pedro Alves <palves@redhat.com>
1368
1369 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1370 Instead, ignore ECHILD, and throw an error for other errnos.
1371
1372 2015-07-10 Pedro Alves <palves@redhat.com>
1373
1374 * event-loop.c (struct callback_event) <data>: Change type to
1375 gdb_client_data instance instead of gdb_client_data pointer.
1376 (append_callback_event): Adjust.
1377
1378 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1379
1380 * linux-aarch64-low.c: Add comments for each linux_target_ops
1381 method. Remove comments already covered in target_ops and
1382 linux_target_ops definitions.
1383 (the_low_target): Add comments for each unimplemented method.
1384
1385 2015-07-09 Yao Qi <yao.qi@linaro.org>
1386
1387 * linux-aarch64-low.c (aarch64_regmap): Remove.
1388 (aarch64_usrregs_info): Remove.
1389 (regs_info): Set field usrregs to NULL.
1390
1391 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1392
1393 * linux-low.c: Include "rsp-low.h"
1394 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1395 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1396 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1397 (handle_btrace_enable_pt): New.
1398 (handle_btrace_general_set): Support "pt".
1399 (handle_btrace_conf_general_set): Support "pt:size".
1400
1401 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1402
1403 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1404 Z_PACKET_SW_BP.
1405
1406 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1407
1408 * linux-aarch64-low.c: Remove comment about endianness.
1409 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1410 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1411 memcmp.
1412
1413 2015-06-24 Gary Benson <gbenson@redhat.com>
1414
1415 * linux-i386-ipa.c (stdint.h): Do not include.
1416 * lynx-i386-low.c (stdint.h): Likewise.
1417 * lynx-ppc-low.c (stdint.h): Likewise.
1418 * mem-break.c (stdint.h): Likewise.
1419 * thread-db.c (stdint.h): Likewise.
1420 * tracepoint.c (stdint.h): Likewise.
1421 * win32-low.c (stdint.h): Likewise.
1422
1423 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1424
1425 * server.c (write_qxfer_response): Update call to
1426 remote_escape_output.
1427
1428 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1429 Jan Kratochvil <jan.kratochvil@redhat.com>
1430
1431 Merge multiple hex conversions.
1432 * gdbreplay.c (tohex): Rename to 'fromhex'.
1433 (logchar): Use fromhex.
1434
1435 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1436
1437 * server.c (handle_qxfer_libraries): Set `version' attribute for
1438 <library-list>.
1439
1440 2015-06-10 Gary Benson <gbenson@redhat.com>
1441
1442 * target.h (struct target_ops) <multifs_open>: New field.
1443 <multifs_unlink>: Likewise.
1444 <multifs_readlink>: Likewise.
1445 * linux-low.c (nat/linux-namespaces.h): New include.
1446 (linux_target_ops): Initialize the_target->multifs_open,
1447 the_target->multifs_unlink and the_target->multifs_readlink.
1448 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1449 * hostio.c (hostio_fs_pid): New static variable.
1450 (hostio_handle_new_gdb_connection): New function.
1451 (handle_setfs): Likewise.
1452 (handle_open): Use the_target->multifs_open as appropriate.
1453 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1454 (handle_readlink): Use the_target->multifs_readlink as
1455 appropriate.
1456 (handle_vFile): Handle vFile:setfs packets.
1457 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1458 after target_handle_new_gdb_connection.
1459
1460 2015-06-10 Gary Benson <gbenson@redhat.com>
1461
1462 * configure.ac (AC_CHECK_FUNCS): Add setns.
1463 * config.in: Regenerate.
1464 * configure: Likewise.
1465 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1466 (linux-namespaces.o): New rule.
1467 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1468
1469 2015-06-09 Gary Benson <gbenson@redhat.com>
1470
1471 * hostio.c (handle_open): Process mode argument with
1472 fileio_to_host_mode.
1473
1474 2015-06-01 Yao Qi <yao.qi@linaro.org>
1475
1476 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1477 * linux-x86-low.c: Likewise.
1478
1479 2015-05-28 Don Breazeal <donb@codesourcery.com>
1480
1481 * linux-low.c (handle_extended_wait): Initialize
1482 thread_info.last_resume_kind for new fork children.
1483
1484 2015-05-15 Pedro Alves <palves@redhat.com>
1485
1486 * target.h (target_handle_new_gdb_connection): Rewrite using if
1487 wrapped in do/while.
1488
1489 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1490
1491 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1492 * configure, config.in: Regenerate.
1493 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1494 Declare typedef.
1495
1496 2015-05-12 Don Breazeal <donb@codesourcery.com>
1497
1498 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1499 PTRACE_EVENT_VFORK_DONE.
1500 (linux_low_ptrace_options, extended_event_reported): Add vfork
1501 events.
1502 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1503 and "vforkdone" for RSP 'T' Stop Reply Packet.
1504 * server.h (report_vfork_events): Declare
1505 global variable.
1506
1507 2015-05-12 Don Breazeal <donb@codesourcery.com>
1508
1509 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1510 (the_low_target) <new_fork>: Initialize new member.
1511 * linux-arm-low.c (arm_new_fork): New function.
1512 (the_low_target) <new_fork>: Initialize new member.
1513 * linux-low.c (handle_extended_wait): Call new target function
1514 new_fork.
1515 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1516 * linux-mips-low.c (mips_add_watchpoint): New function
1517 extracted from mips_insert_point.
1518 (the_low_target) <new_fork>: Initialize new member.
1519 (mips_linux_new_fork): New function.
1520 (mips_insert_point): Call mips_add_watchpoint.
1521 * linux-x86-low.c (x86_linux_new_fork): New function.
1522 (the_low_target) <new_fork>: Initialize new member.
1523
1524 2015-05-12 Don Breazeal <donb@codesourcery.com>
1525
1526 * linux-low.c (handle_extended_wait): Implement return value,
1527 rename argument 'event_child' to 'event_lwp', handle
1528 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1529 (linux_low_ptrace_options): New function.
1530 (linux_low_filter_event): Call linux_low_ptrace_options,
1531 use different argument fo linux_enable_event_reporting,
1532 use return value from handle_extended_wait.
1533 (extended_event_reported): New function.
1534 (linux_wait_1): Call extended_event_reported and set
1535 status to report fork events.
1536 (linux_write_memory): Add pid to debug message.
1537 (reset_lwp_ptrace_options_callback): New function.
1538 (linux_handle_new_gdb_connection): New function.
1539 (linux_target_ops): Initialize new structure member.
1540 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1541 * lynx-low.c: Initialize new structure member.
1542 * remote-utils.c (prepare_resume_reply): Implement stop reason
1543 "fork" for "T" stop message.
1544 * server.c (handle_query): Call handle_new_gdb_connection.
1545 * server.h (report_fork_events): Declare global flag.
1546 * target.h (struct target_ops) <handle_new_gdb_connection>:
1547 New member.
1548 (target_handle_new_gdb_connection): New macro.
1549 * win32-low.c: Initialize new structure member.
1550
1551 2015-05-12 Don Breazeal <donb@codesourcery.com>
1552
1553 * mem-break.c (APPEND_TO_LIST): Define macro.
1554 (clone_agent_expr): New function.
1555 (clone_one_breakpoint): New function.
1556 (clone_all_breakpoints): New function.
1557 * mem-break.h: Declare new functions.
1558
1559 2015-05-12 Don Breazeal <donb@codesourcery.com>
1560
1561 * linux-low.c (linux_supports_fork_events): New function.
1562 (linux_supports_vfork_events): New function.
1563 (linux_target_ops): Initialize new structure members.
1564 (initialize_low): Call linux_check_ptrace_features.
1565 * lynx-low.c (lynx_target_ops): Initialize new structure
1566 members.
1567 * server.c (report_fork_events, report_vfork_events):
1568 New global flags.
1569 (handle_query): Add new features to qSupported packet and
1570 response.
1571 (captured_main): Initialize new global variables.
1572 * target.h (struct target_ops) <supports_fork_events>:
1573 New member.
1574 <supports_vfork_events>: New member.
1575 (target_supports_fork_events): New macro.
1576 (target_supports_vfork_events): New macro.
1577 * win32-low.c (win32_target_ops): Initialize new structure
1578 members.
1579
1580 2015-05-12 Gary Benson <gbenson@redhat.com>
1581
1582 * server.c (handle_qxfer_exec_file): Use current process
1583 if annex is empty.
1584
1585 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1586
1587 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1588 Remove HAVE_PTRACE_GETREGS conditionals.
1589 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1590 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1591
1592 2015-05-08 Yao Qi <yao.qi@linaro.org>
1593
1594 * linux-low.c (linux_supports_conditional_breakpoints): New
1595 function.
1596 (linux_target_ops): Install new target method.
1597 * lynx-low.c (lynx_target_ops): Install NULL hook for
1598 supports_conditional_breakpoints.
1599 * nto-low.c (nto_target_ops): Likewise.
1600 * spu-low.c (spu_target_ops): Likewise.
1601 * win32-low.c (win32_target_ops): Likewise.
1602 * server.c (handle_query): Check
1603 target_supports_conditional_breakpoints.
1604 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1605 New field.
1606 (target_supports_conditional_breakpoints): New macro.
1607
1608 2015-05-06 Pedro Alves <palves@redhat.com>
1609
1610 PR server/18081
1611 * server.c (start_inferior): If the process exits, mourn it.
1612
1613 2015-04-21 Gary Benson <gbenson@redhat.com>
1614
1615 * hostio.c (fileio_open_flags_to_host): Factored out to
1616 fileio_to_host_openflags in common/fileio.c. Single use
1617 updated.
1618
1619 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1620
1621 * linux-xtensa-low.c (xtensa_fill_gregset)
1622 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1623 XCHAL_HAVE_LOOP.
1624
1625 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1626
1627 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1628 (regs_info): Replace usrregs pointer with NULL.
1629
1630 2015-04-17 Gary Benson <gbenson@redhat.com>
1631
1632 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1633 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1634 * server.c (handle_qxfer_exec_file): New function.
1635 (qxfer_packets): Add exec-file entry.
1636 (handle_query): Report qXfer:exec-file:read as supported packet.
1637
1638 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1639
1640 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1641
1642 2015-04-09 Gary Benson <gbenson@redhat.com>
1643
1644 * hostio-errno.c (errno_to_fileio_error): Remove function.
1645 Update caller to use remote_fileio_to_fio_error.
1646
1647 2015-04-09 Yao Qi <yao.qi@linaro.org>
1648
1649 * linux-low.c (linux_insert_point): Call
1650 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1651 (linux_remove_point): Call remove_memory_breakpoint if type is
1652 raw_bkpt_type_sw.
1653 * linux-x86-low.c (x86_insert_point): Don't call
1654 insert_memory_breakpoint.
1655 (x86_remove_point): Don't call remove_memory_breakpoint.
1656
1657 2015-04-01 Pedro Alves <palves@redhat.com>
1658 Cleber Rosa <crosa@redhat.com>
1659
1660 * server.c (gdbserver_usage): Reorganize and extend the usage
1661 message.
1662
1663 2015-03-24 Pedro Alves <palves@redhat.com>
1664
1665 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1666 output. Also dump TRAP_TRACE.
1667 (linux_low_filter_event): In debug output, distinguish a
1668 resume_stop SIGSTOP from a delayed SIGSTOP.
1669
1670 2015-03-24 Gary Benson <gbenson@redhat.com>
1671
1672 * linux-x86-low.c (x86_linux_new_thread): Moved to
1673 nat/x86-linux.c.
1674 (x86_linux_prepare_to_resume): Likewise.
1675
1676 2015-03-24 Gary Benson <gbenson@redhat.com>
1677
1678 * Makefile.in (x86-linux-dregs.o): New rule.
1679 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1680 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1681 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1682 (x86_linux_dr_get): Likewise.
1683 (x86_linux_dr_set): Likewise.
1684 (update_debug_registers_callback): Likewise.
1685 (x86_linux_dr_set_addr): Likewise.
1686 (x86_linux_dr_get_addr): Likewise.
1687 (x86_linux_dr_set_control): Likewise.
1688 (x86_linux_dr_get_control): Likewise.
1689 (x86_linux_dr_get_status): Likewise.
1690 (x86_linux_update_debug_registers): Likewise.
1691
1692 2015-03-24 Gary Benson <gbenson@redhat.com>
1693
1694 * linux-x86-low.c (x86_linux_update_debug_registers):
1695 New function, factored out from...
1696 (x86_linux_prepare_to_resume): ...this.
1697
1698 2015-03-24 Gary Benson <gbenson@redhat.com>
1699
1700 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1701 (x86_linux_dr_set): Likewise.
1702 (update_debug_registers_callback): Likewise.
1703 (x86_linux_dr_set_addr): Likewise.
1704 (x86_linux_dr_get_addr): Likewise.
1705 (x86_linux_dr_set_control): Likewise.
1706 (x86_linux_dr_get_control): Likewise.
1707 (x86_linux_dr_get_status): Likewise.
1708 (x86_linux_prepare_to_resume): Likewise.
1709
1710 2015-03-24 Gary Benson <gbenson@redhat.com>
1711
1712 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1713 Use perror_with_name. Pass string through gettext.
1714 (x86_linux_dr_set): Likewise.
1715
1716 2015-03-24 Gary Benson <gbenson@redhat.com>
1717
1718 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1719 (x86_linux_dr_set_addr): ...this.
1720 (x86_dr_low_get_addr): Rename to...
1721 (x86_linux_dr_get_addr): ...this.
1722 (x86_dr_low_set_control): Rename to...
1723 (x86_linux_dr_set_control): ...this.
1724 (x86_dr_low_get_control): Rename to...
1725 (x86_linux_dr_get_control): ...this.
1726 (x86_dr_low_get_status): Rename to...
1727 (x86_linux_dr_get_status): ...this.
1728 (x86_dr_low): Update with new function names.
1729
1730 2015-03-24 Gary Benson <gbenson@redhat.com>
1731
1732 * Makefile.in (x86-linux.o): New rule.
1733 * configure.srv: Add x86-linux.o to relevant targets.
1734 * linux-low.c (lwp_set_arch_private_info): New function.
1735 (lwp_arch_private_info): Likewise.
1736 * linux-x86-low.c: Include nat/x86-linux.h.
1737 (arch_lwp_info): Removed structure.
1738 (update_debug_registers_callback):
1739 Use lwp_set_debug_registers_changed.
1740 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1741 and lwp_set_debug_registers_changed.
1742 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1743
1744 2015-03-24 Gary Benson <gbenson@redhat.com>
1745
1746 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1747 * linux-arm-low.c (arm_new_thread): Likewise.
1748 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1749 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1750 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1751 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1752
1753 2015-03-24 Gary Benson <gbenson@redhat.com>
1754
1755 * linux-low.c (ptid_of_lwp): New function.
1756 (lwp_is_stopped): Likewise.
1757 (lwp_stop_reason): Likewise.
1758 * linux-x86-low.c (update_debug_registers_callback):
1759 Use lwp_is_stopped.
1760 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1761 lwp_stop_reason.
1762
1763 2015-03-24 Gary Benson <gbenson@redhat.com>
1764
1765 * linux-low.h (linux_stop_lwp): Remove declaration.
1766
1767 2015-03-24 Gary Benson <gbenson@redhat.com>
1768
1769 * linux-low.h: Include nat/linux-nat.h.
1770 * linux-low.c (iterate_over_lwps_args): New structure.
1771 (iterate_over_lwps_filter): New function.
1772 (iterate_over_lwps): Likewise.
1773 * linux-x86-low.c (update_debug_registers_callback):
1774 Update signature to what iterate_over_lwps expects.
1775 Remove PID check that iterate_over_lwps now performs.
1776 (x86_dr_low_set_addr): Use iterate_over_lwps.
1777 (x86_dr_low_set_control): Likewise.
1778
1779 2015-03-24 Gary Benson <gbenson@redhat.com>
1780
1781 * linux-x86-low.c (x86_debug_reg_state): New function.
1782 (x86_linux_prepare_to_resume): Use the above.
1783
1784 2015-03-24 Gary Benson <gbenson@redhat.com>
1785
1786 * linux-low.c (current_lwp_ptid): New function.
1787 * linux-x86-low.c: Include nat/linux-nat.h.
1788 (x86_dr_low_get_addr): Use current_lwp_ptid.
1789 (x86_dr_low_get_control): Likewise.
1790 (x86_dr_low_get_status): Likewise.
1791
1792 2015-03-20 Pedro Alves <palves@redhat.com>
1793
1794 * tracepoint.c (cmd_qtstatus): Make "str" const.
1795
1796 2015-03-20 Pedro Alves <palves@redhat.com>
1797
1798 * server.c (handle_general_set): Make "req_str" const.
1799
1800 2015-03-19 Pedro Alves <palves@redhat.com>
1801
1802 * linux-low.c (linux_resume_one_lwp): Rename to ...
1803 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1804 instead call perror_with_name.
1805 (check_ptrace_stopped_lwp_gone): New function.
1806 (linux_resume_one_lwp): Reimplement as wrapper around
1807 linux_resume_one_lwp_throw that swallows errors if the LWP is
1808 gone.
1809
1810 2015-03-19 Pedro Alves <palves@redhat.com>
1811
1812 * linux-low.c (count_events_callback, select_event_lwp_callback):
1813 No longer check whether the thread has resume_stop as last resume
1814 kind.
1815
1816 2015-03-19 Pedro Alves <palves@redhat.com>
1817
1818 * linux-low.c (count_events_callback, select_event_lwp_callback):
1819 Use the lwp's status_pending_p field, not the thread's.
1820
1821 2015-03-19 Pedro Alves <palves@redhat.com>
1822
1823 * linux-low.c (select_event_lwp_callback): Update comments to
1824 no longer mention SIGTRAP.
1825
1826 2015-03-18 Gary Benson <gbenson@redhat.com>
1827
1828 * server.c (handle_query): Do not report vFile:fstat as supported.
1829
1830 2015-03-11 Gary Benson <gbenson@redhat.com>
1831
1832 * hostio.c (sys/types.h): New include.
1833 (sys/stat.h): Likewise.
1834 (common-remote-fileio.h): Likewise.
1835 (handle_fstat): New function.
1836 (handle_vFile): Handle vFile:fstat packets.
1837
1838 2015-03-11 Gary Benson <gbenson@redhat.com>
1839
1840 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1841 struct stat.st_blocks and struct stat.st_blksize.
1842 * configure: Regenerate.
1843 * config.in: Likewise.
1844 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1845 (OBS): Add common-remote-fileio.o.
1846 (common-remote-fileio.o): New rule.
1847
1848 2015-03-09 Pedro Alves <palves@redhat.com>
1849
1850 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1851 'struct sockaddr' pointer in 'accept' call.
1852
1853 2015-03-09 Pedro Alves <palves@redhat.com>
1854
1855 Revert:
1856 2015-03-07 Pedro Alves <palves@redhat.com>
1857 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1858 or <winsock2.h> here. Instead include "gdb_socket.h".
1859 (remote_open): Use union gdb_sockaddr_u.
1860 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1861 or <winsock2.h> here. Instead include "gdb_socket.h".
1862 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1863 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1864 or <sys/un.h>.
1865 (init_named_socket, gdb_agent_helper_thread): Use union
1866 gdb_sockaddr_u.
1867
1868 2015-03-07 Pedro Alves <palves@redhat.com>
1869
1870 * configure.ac (build_warnings): Move
1871 -Wdeclaration-after-statement to the C-specific set.
1872 * configure: Regenerate.
1873
1874 2015-03-07 Pedro Alves <palves@redhat.com>
1875
1876 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1877 or <winsock2.h> here. Instead include "gdb_socket.h".
1878 (remote_open): Use union gdb_sockaddr_u.
1879 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1880 or <winsock2.h> here. Instead include "gdb_socket.h".
1881 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1882 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1883 or <sys/un.h>.
1884 (init_named_socket, gdb_agent_helper_thread): Use union
1885 gdb_sockaddr_u.
1886
1887 2015-03-07 Pedro Alves <palves@redhat.com>
1888
1889 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1890 instead.
1891
1892 2015-03-06 Yao Qi <yao.qi@linaro.org>
1893
1894 * linux-aarch64-low.c (aarch64_insert_point): Use
1895 show_debug_regs as a boolean.
1896 (aarch64_remove_point): Likewise.
1897
1898 2015-03-05 Pedro Alves <palves@redhat.com>
1899
1900 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1901 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1902 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1903 * nto-low.c (nto_target_ops): Likewise.
1904 * spu-low.c (spu_target_ops): Likewise.
1905 * win32-low.c (win32_target_ops): Likewise.
1906
1907 2015-03-04 Pedro Alves <palves@redhat.com>
1908
1909 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1910 Decide whether a breakpoint triggered based on the SIGTRAP's
1911 siginfo.si_code.
1912 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1913 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1914 (linux_low_filter_event): Check for breakpoints before checking
1915 watchpoints.
1916 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1917 siginfo.si_code.
1918 (linux_stopped_by_sw_breakpoint)
1919 (linux_supports_stopped_by_sw_breakpoint)
1920 (linux_stopped_by_hw_breakpoint)
1921 (linux_supports_stopped_by_hw_breakpoint): New functions.
1922 (linux_target_ops): Install new target methods.
1923
1924 2015-03-04 Pedro Alves <palves@redhat.com>
1925
1926 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1927 * server.c (swbreak_feature, hwbreak_feature): New globals.
1928 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1929 (captured_main): Clear swbreak_feature and hwbreak_feature.
1930 * server.h (swbreak_feature, hwbreak_feature): Declare.
1931 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1932 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1933 supports_stopped_by_hw_breakpoint>: New fields.
1934 (target_supports_stopped_by_sw_breakpoint)
1935 (target_stopped_by_sw_breakpoint)
1936 (target_supports_stopped_by_hw_breakpoint)
1937 (target_stopped_by_hw_breakpoint): Declare.
1938
1939 2015-03-04 Pedro Alves <palves@redhat.com>
1940
1941 enum lwp_stop_reason -> enum target_stop_reason
1942 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1943 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1944 (linux_wait_1, stuck_in_jump_pad_callback)
1945 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1946 (linux_stopped_by_watchpoint):
1947 * linux-low.h (enum lwp_stop_reason): Delete.
1948 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1949 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1950
1951 2015-03-04 Yao Qi <yao.qi@linaro.org>
1952
1953 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1954
1955 2015-03-03 Gary Benson <gbenson@redhat.com>
1956
1957 * hostio.c (handle_vFile): Fix prefix lengths.
1958
1959 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1960
1961 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1962 ptr_bits.
1963
1964 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1965
1966 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1967 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1968 (clean): Add "rm -f" for above C files.
1969 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1970 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1971 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1972 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1973 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1974 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1975 (init_registers_s390x_vx_linux64)
1976 (init_registers_s390x_tevx_linux64)
1977 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1978 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1979 declarations.
1980 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1981 (s390_store_vxrs_high): New functions.
1982 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1983 NT_S390_VXRS_HIGH.
1984 (s390_arch_setup): Add logic for selecting one of the new target
1985 descriptions. Activate the new vector regsets if applicable.
1986 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1987 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1988 and init_registers_s390x_tevx_linux64.
1989
1990 2015-03-01 Pedro Alves <palves@redhat.com>
1991
1992 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1993 parameter.
1994
1995 2015-02-27 Pedro Alves <palves@redhat.com>
1996
1997 * linux-x86-low.c (u_debugreg_offset): New function.
1998 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1999
2000 2015-02-27 Pedro Alves <palves@redhat.com>
2001
2002 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
2003 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
2004 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
2005 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
2006 (ps_lsetfpregs, ps_getpid)
2007 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
2008 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
2009 (ps_lsetxregs, ps_plog): Declare.
2010
2011 2015-02-27 Pedro Alves <palves@redhat.com>
2012
2013 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
2014 IP_AGENT_EXPORT_FUNC.
2015 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
2016 IP_AGENT_EXPORT_FUNC.
2017 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
2018 (IP_AGENT_EXPORT): Delete.
2019 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2020 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2021 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2022 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2023 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2024 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2025 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2026 (traceframe_read_count, traceframe_write_count)
2027 (traceframes_created, trace_state_variables, get_raw_reg)
2028 (get_trace_state_variable_value, set_trace_state_variable_value)
2029 (ust_loaded, helper_thread_id, cmd_buf): Use
2030 IPA_SYM_EXPORTED_NAME.
2031 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2032 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2033 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2034 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2035 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2036 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2037 EXTERN_C_PUSH/EXTERN_C_POP.
2038 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2039 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2040 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2041 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2042 (traceframe_write_count, traceframe_read_count)
2043 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2044 (about_to_request_buffer_space, get_trace_state_variable_value)
2045 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2046 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2047 EXTERN_C_PUSH/EXTERN_C_POP.
2048 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2049 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2050 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2051 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2052 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2053 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2054 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2055 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2056 Define.
2057 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2058 (IP_AGENT_EXPORT_VAR_DECL): Define.
2059 (tracing): Declare.
2060 (gdb_agent_get_raw_reg): Declare.
2061
2062 2015-02-27 Tom Tromey <tromey@redhat.com>
2063 Pedro Alves <palves@redhat.com>
2064
2065 Rename symbols whose names are reserved C++ keywords throughout.
2066
2067 2015-02-27 Pedro Alves <palves@redhat.com>
2068
2069 * Makefile.in (COMPILER): New, get it from autoconf.
2070 (CXX): Get from autoconf instead.
2071 (COMPILE.pre): Use COMPILER.
2072 (CC-LD): Rename to ...
2073 (CC_LD): ... this. Use COMPILER.
2074 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2075 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2076 * acinclude.m4: Include build-with-cxx.m4.
2077 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2078 Disable -Werror by default if building in C++ mode.
2079 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2080 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2081 the C++ compiler. Save/restore CXXFLAGS too.
2082 * configure: Regenerate.
2083
2084 2015-02-27 Pedro Alves <palves@redhat.com>
2085
2086 * acinclude.m4: Include libiberty.m4.
2087 * configure.ac: Call libiberty_INIT.
2088 * config.in, configure: Regenerate.
2089
2090 2015-02-26 Pedro Alves <palves@redhat.com>
2091
2092 * linux-low.c (linux_wait_1): When incrementing the PC past a
2093 program breakpoint always use the_low_target.breakpoint_len as
2094 increment, rather than the maximum between that and
2095 the_low_target.decr_pc_after_break.
2096
2097 2015-02-23 Pedro Alves <palves@redhat.com>
2098
2099 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2100 thread was doing a step-over; always adjust the PC if
2101 we stepped over a permanent breakpoint.
2102 (linux_wait_1): If we stepped over breakpoint that was on top of a
2103 permanent breakpoint, manually advance the PC past it.
2104
2105 2015-02-23 Pedro Alves <palves@redhat.com>
2106
2107 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2108 modes.
2109 (x86_fill_gregset, x86_store_gregset): Use it when handling
2110 $orig_eax.
2111
2112 2015-02-20 Pedro Alves <palves@redhat.com>
2113
2114 * thread-db.c: Include "nat/linux-procfs.h".
2115 (thread_db_init): Skip listing new threads if the kernel supports
2116 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2117
2118 2015-02-20 Pedro Alves <palves@redhat.com>
2119
2120 * linux-low.c (status_pending_p_callback): Use ptid_match.
2121
2122 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2123
2124 PR breakpoints/16812
2125 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2126 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2127 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2128
2129 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2130
2131 PR breakpoints/15956
2132 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2133
2134 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2135
2136 * linux-low.c (linux_low_btrace_conf): Print size.
2137 * server.c (handle_btrace_conf_general_set): New.
2138 (hanle_general_set): Call handle_btrace_conf_general_set.
2139 (handle_query): Report Qbtrace-conf:bts:size as supported.
2140
2141 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2142
2143 * linux-low.c (linux_low_enable_btrace): Update parameters.
2144 (linux_low_btrace_conf): New.
2145 (linux_target_ops)<to_btrace_conf>: Initialize.
2146 * server.c (current_btrace_conf): New.
2147 (handle_btrace_enable): Rename to ...
2148 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
2149 to target_enable_btrace. Update comment. Update users.
2150 (handle_qxfer_btrace_conf): New.
2151 (qxfer_packets): Add btrace-conf entry.
2152 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2153 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2154 (target_ops)<read_btrace_conf>: New.
2155 (target_enable_btrace): Update parameters.
2156 (target_read_btrace_conf): New.
2157
2158 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2159
2160 * server.c (handle_btrace_general_set): Remove call to
2161 target_supports_btrace.
2162 (supported_btrace_packets): New.
2163 (handle_query): Call supported_btrace_packets.
2164 * target.h: include btrace-common.h.
2165 (btrace_target_info): Removed.
2166 (supports_btrace, target_supports_btrace): Update parameters.
2167
2168 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2169
2170 * Makefile.in (SFILES): Add common/btrace-common.c.
2171 (OBS): Add common/btrace-common.o.
2172 (btrace-common.o): Add build rules.
2173 * linux-low: Include btrace-common.h.
2174 (linux_low_read_btrace): Use struct btrace_data. Call
2175 btrace_data_init and btrace_data_fini.
2176
2177 2015-02-06 Pedro Alves <palves@redhat.com>
2178
2179 * thread-db.c (find_new_threads_callback): Add debug output.
2180
2181 2015-02-04 Pedro Alves <palves@redhat.com>
2182
2183 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2184 (resume_stopped_resumed_lwps): New function.
2185 (linux_wait_for_event_filtered): Use it.
2186
2187 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2188
2189 * Makefile.in (SFILES): Add linux-personality.c.
2190 (linux-personality.o): New rule.
2191 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2192 list of objects to be built.
2193 * linux-low.c: Include nat/linux-personality.h.
2194 (linux_create_inferior): Remove code to disable address space
2195 randomization (moved to ../nat/linux-personality.c). Create
2196 cleanup to disable address space randomization.
2197
2198 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2199
2200 * Makefile.in (posix-strerror.o): New rule.
2201 (mingw-strerror.o): Likewise.
2202 * configure: Regenerated.
2203 * configure.ac: Source file ../common/common.host. Initialize new
2204 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2205
2206 2015-01-14 Yao Qi <yao@codesourcery.com>
2207
2208 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2209 (ppc-linux.o): New rule.
2210 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2211 * configure.ac: AC_CHECK_FUNCS(getauxval).
2212 * config.in: Re-generated.
2213 * configure: Re-generated.
2214 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2215 ppc64_64bit_inferior_p
2216
2217 2015-01-14 Yao Qi <yao@codesourcery.com>
2218
2219 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2220 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2221 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2222 (PT_ORIG_R3, PT_TRAP): Likewise.
2223 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2224 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2225 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2226
2227 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2228
2229 * i387-fp.c (i387_cache_to_xsave): In look over
2230 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2231 zmmh_low_space field by use of zmmh_high_space.
2232
2233 2015-01-09 Pedro Alves <palves@redhat.com>
2234
2235 * linux-low.c (step_over_bkpt): Move higher up in the file.
2236 (handle_extended_wait): Don't store the stop_pc here.
2237 (get_stop_pc): Adjust comments and rename to ...
2238 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2239 stopped for a software breakpoint or hardware breakpoint.
2240 (thread_still_has_status_pending_p): New function.
2241 (status_pending_p_callback): Use
2242 thread_still_has_status_pending_p. If the event is no longer
2243 interesting, resume the LWP.
2244 (handle_tracepoints): Add assert.
2245 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2246 (wstatus_maybe_breakpoint): New function.
2247 (cancel_breakpoint): Delete function.
2248 (check_stopped_by_watchpoint): New function, factored out from
2249 linux_low_filter_event.
2250 (lp_status_maybe_breakpoint): Delete function.
2251 (linux_low_filter_event): Remove filter_ptid argument.
2252 Leave thread group exits pending here. Store the LWP's stop PC.
2253 Always leave events pending.
2254 (linux_wait_for_event_filtered): Pull all events out of the
2255 kernel, and leave them all pending.
2256 (count_events_callback, select_event_lwp_callback): Consider all
2257 events.
2258 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2259 (select_event_lwp): Only give preference to the stepping LWP in
2260 all-stop mode. Adjust comments.
2261 (ignore_event): New function.
2262 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2263 references to cancel_breakpoints. Adjust to renames. Also give
2264 equal priority to all LWPs that have had events in non-stop mode.
2265 If reporting a software breakpoint event, unadjust the LWP's PC.
2266 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2267 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2268 Adjust.
2269 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2270 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2271 (linux_stopped_by_watchpoint): Adjust.
2272 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2273 * linux-low.h (enum lwp_stop_reason): New.
2274 (struct lwp_info) <stop_pc>: Adjust comment.
2275 <stopped_by_watchpoint>: Delete field.
2276 <stop_reason>: New field.
2277 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2278 * mem-break.c (software_breakpoint_inserted_here)
2279 (hardware_breakpoint_inserted_here): New function.
2280 * mem-break.h (software_breakpoint_inserted_here)
2281 (hardware_breakpoint_inserted_here): Declare.
2282 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2283 (cancel_breakpoints): Delete.
2284 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2285 (upload_fast_traceframes): Remove references to
2286 cancel_breakpoints.
2287
2288 2015-01-09 Pedro Alves <palves@redhat.com>
2289
2290 * thread-db.c (find_new_threads_callback): Ignore thread if the
2291 kernel thread ID is -1.
2292
2293 2015-01-09 Pedro Alves <palves@redhat.com>
2294
2295 * linux-low.c (linux_attach_fail_reason_string): Move to
2296 nat/linux-ptrace.c, and rename.
2297 (linux_attach_lwp): Update comment.
2298 (attach_proc_task_lwp_callback): New function.
2299 (linux_attach): Adjust to rename and use
2300 linux_proc_attach_tgid_threads.
2301 (linux_attach_fail_reason_string): Delete declaration.
2302
2303 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2304
2305 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2306 * server.c (gdbserver_version): Likewise.
2307
2308 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2309
2310 * remote-utils.c: Include ctype.h.
2311 (input_interrupt): Explicitly handle the case when the char
2312 received is the NUL byte. Improve the printing of non-ASCII
2313 characters.
2314
2315 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2316
2317 * linux-low.c (linux_low_filter_event): Update call to
2318 linux_enable_event_reporting following the addition of
2319 a new parameter to that function.
2320
2321 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2322
2323 PR server/17457
2324 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2325 (AARCH64_FPCR_REGNO): Likewise.
2326 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2327 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2328 (aarch64_store_fpregset): Likewise.
2329
2330 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2331
2332 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2333 Remove FIXME comment about assumption about N.
2334
2335 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2336
2337 * configure.ac: If large-file support is disabled in GDBserver,
2338 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2339 * configure: Regenerate.
2340
2341 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2342
2343 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2344 warning upon ENODATA from ptrace.
2345 * linux-s390-low.c (s390_store_tdb): New.
2346 (s390_regsets): Add regset for NT_S390_TDB.
2347
2348 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2349
2350 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2351 without a fill_function.
2352 * linux-s390-low.c (s390_fill_last_break): Remove.
2353 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2354 (s390_arch_setup): Use regset's size instead of fill_function for
2355 loop end condition.
2356
2357 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2358
2359 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2360 the regset's store function when ptrace returned an error.
2361 * regcache.c (get_thread_regcache): Invalidate register cache
2362 before fetching inferior's registers.
2363
2364 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2365
2366 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2367 while-loop as for-loop.
2368 (regsets_store_inferior_registers): Likewise.
2369
2370 2014-11-28 Yao Qi <yao@codesourcery.com>
2371
2372 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2373 * config.in, configure: Re-generate.
2374 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2375 is defined.
2376
2377 2014-11-21 Yao Qi <yao@codesourcery.com>
2378
2379 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2380 (AC_CHECK_HEADERS): Remove malloc.h.
2381 * configure: Re-generated.
2382 * config.in: Re-generated.
2383 * server.h: Don't include alloca.h and malloc.h.
2384 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2385 Don't include malloc.h.
2386
2387 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2388
2389 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2390 corresponding ERRNO check in same block.
2391
2392 2014-11-12 Pedro Alves <palves@redhat.com>
2393
2394 * server.c (cont_thread): Update comment.
2395 (start_inferior, attach_inferior): No longer clear cont_thread.
2396 (handle_v_cont): No longer set cont_thread.
2397 (captured_main): Clear cont_thread each time a GDB connects.
2398
2399 2014-11-12 Pedro Alves <palves@redhat.com>
2400
2401 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2402 thread, and don't resume all threads if the Hc thread has exited.
2403
2404 2014-11-12 Pedro Alves <palves@redhat.com>
2405
2406 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2407 the process group instead of to a specific LWP.
2408
2409 2014-10-15 Pedro Alves <palves@redhat.com>
2410
2411 PR server/17487
2412 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2413 parameter.
2414 (arm_set_thread_context): Delete.
2415 (the_low_target): Adjust.
2416 * win32-i386-low.c (debug_registers_changed)
2417 (debug_registers_used): Delete.
2418 (update_debug_registers_callback): New function.
2419 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2420 needing to update their debug registers.
2421 (win32_get_current_dr): New function.
2422 (x86_dr_low_get_addr, x86_dr_low_get_control)
2423 (x86_dr_low_get_status): Fetch the debug register from the thread
2424 record's context.
2425 (i386_initial_stuff): Adjust.
2426 (i386_get_thread_context): Remove current_event parameter. Don't
2427 clear debug_registers_changed nor copy DR values to
2428 debug_reg_state.
2429 (i386_set_thread_context): Delete.
2430 (i386_prepare_to_resume): New function.
2431 (i386_thread_added): Mark the thread as needing to update irs
2432 debug registers.
2433 (the_low_target): Remove i386_set_thread_context and install
2434 i386_prepare_to_resume.
2435 * win32-low.c (win32_get_thread_context): Adjust.
2436 (win32_set_thread_context): Use SetThreadContext
2437 directly.
2438 (win32_prepare_to_resume): New function.
2439 (win32_require_context): New function, factored out from ...
2440 (thread_rec): ... this.
2441 (continue_one_thread): Call win32_prepare_to_resume on each thread
2442 we're about to continue.
2443 (win32_resume): Call win32_prepare_to_resume on the event thread.
2444 * win32-low.h (struct win32_thread_info)
2445 <debug_registers_changed>: New field.
2446 (struct win32_target_ops): Change prototype of set_thread_context,
2447 delete set_thread_context and add prepare_to_resume.
2448 (win32_require_context): New declaration.
2449
2450 2014-10-08 Gary Benson <gbenson@redhat.com>
2451
2452 * server.h: Do not include common-exceptions.h.
2453
2454 2014-10-08 Gary Benson <gbenson@redhat.com>
2455
2456 * server.h: Do not include cleanups.h.
2457
2458 2014-09-30 James Hogan <james.hogan@imgtec.com>
2459
2460 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2461 mips64-dsp-linux.c.
2462
2463 2014-09-23 Yao Qi <yao@codesourcery.com>
2464
2465 * linux-low.c (lp_status_maybe_breakpoint): New function.
2466 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2467 (count_events_callback): Likewise.
2468 (select_event_lwp_callback): Likewise.
2469 (cancel_breakpoints_callback): Likewise.
2470
2471 2014-09-19 Don Breazeal <donb@codesourcery.com>
2472
2473 * linux-low.c (handle_extended_wait): Call
2474 linux_ptrace_get_extended_event.
2475 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2476 linux_is_extended_waitstatus.
2477
2478 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2479
2480 * Makefile.in (CPPFLAGS): Define.
2481 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2482 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2483
2484 2014-09-16 Gary Benson <gbenson@redhat.com>
2485
2486 * inferiors.h (current_inferior): Renamed as...
2487 (current_thread): New variable. All uses updated.
2488 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2489 (maybe_move_out_of_jump_pad): Likewise.
2490 (cancel_breakpoint): Likewise.
2491 (linux_low_filter_event): Likewise.
2492 (wait_for_sigstop): Likewise.
2493 (linux_resume_one_lwp): Likewise.
2494 (need_step_over_p): Likewise.
2495 (start_step_over): Likewise.
2496 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2497 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2498 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2499 and save_inferior as saved_thread.
2500 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2501 saved_thread.
2502 (regcache_invalidate_thread): Likewise.
2503 * remote-utils.c (prepare_resume_reply): Likewise.
2504 * thread-db.c (thread_db_get_tls_address): Likewise.
2505 (disable_thread_event_reporting): Likewise.
2506 (remove_thread_event_breakpoints): Likewise.
2507 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2508 as saved_thread.
2509 * target.h (set_desired_inferior): Renamed as...
2510 (set_desired_thread): New declaration. All uses updated.
2511 * server.c (myresume): Updated comment to reference thread instead
2512 of inferior.
2513 (handle_serial_event): Likewise.
2514 (handle_target_event): Likewise.
2515
2516 2014-09-12 Tom Tromey <tromey@redhat.com>
2517 Gary Benson <gbenson@redhat.com>
2518
2519 * regcache.h: Include common-regcache.h.
2520 (regcache_read_pc): Don't declare.
2521 * regcache.c (get_thread_regcache_for_ptid): New function.
2522
2523 2014-09-11 Tom Tromey <tromey@redhat.com>
2524 Gary Benson <gbenson@redhat.com>
2525
2526 * symbol.c: New file.
2527 * Makefile.in (SFILES): Add symbol.c.
2528 (OBS): Add symbol.o.
2529
2530 2014-09-11 Gary Benson <gbenson@redhat.com>
2531
2532 * target.c (target_stop_ptid, target_continue_ptid): New
2533 functions.
2534
2535 2014-09-11 Tom Tromey <tromey@redhat.com>
2536 Gary Benson <gbenson@redhat.com>
2537
2538 * target.h: Include target/target.h.
2539 * target.c (target_read_memory, target_read_uint32)
2540 (target_write_memory): New functions.
2541
2542 2014-09-11 Gary Benson <gbenson@redhat.com>
2543
2544 * server.h (debug_hw_points): Don't declare.
2545 * server.c (debug_hw_points): Don't define. Replace all uses
2546 with show_debug_regs.
2547 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2548 all uses with show_debug_regs.
2549
2550 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2551
2552 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2553 endianness into account.
2554 (ppc_supply_ptrace_register): Likewise.
2555
2556 2014-09-03 James Hogan <james.hogan@imgtec.com>
2557
2558 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2559 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2560
2561 2014-09-03 Gary Benson <gbenson@redhat.com>
2562
2563 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2564 ALL_DEBUG_ADDRESS_REGISTERS.
2565
2566 2014-09-02 Gary Benson <gbenson@redhat.com>
2567
2568 * i386-low.h: Renamed as...
2569 * x86-low.h: New file. All type, function and variable name
2570 prefixes changed from "i386_" to "x86_". All references updated.
2571 * i386-low.c: Renamed as...
2572 * x86-low.c: New file. All type, function and variable name
2573 prefixes changed from "i386_" to "x86_". All references updated.
2574
2575 2014-09-02 Gary Benson <gbenson@redhat.com>
2576
2577 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2578 (x86_linux_new_thread): Likewise.
2579
2580 2014-08-29 Gary Benson <gbenson@redhat.com>
2581
2582 * server.h (setjmp.h): Do not include.
2583 (toplevel): Do not declare.
2584 (common-exceptions.h): Include.
2585 (cleanups.h): Likewise.
2586 * server.c (toplevel): Do not define.
2587 (exit_code): New static global.
2588 (detach_or_kill_for_exit_cleanup): New function.
2589 (main): New function. Original main renamed to...
2590 (captured_main): New function.
2591 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2592
2593 2014-08-29 Gary Benson <gbenson@redhat.com>
2594
2595 * Makefile.in (SFILES): Add common/common-exceptions.c.
2596 (OBS): Add common-exceptions.o.
2597 (common-exceptions.o): New rule.
2598 * utils.c (prepare_to_throw_exception): New function.
2599
2600 2014-08-29 Gary Benson <gbenson@redhat.com>
2601
2602 * config.in: Regenerate.
2603 * configure: Likewise.
2604
2605 2014-08-29 Gary Benson <gbenson@redhat.com>
2606
2607 * Makefile.in (SFILES): Add common/cleanups.c.
2608 (OBS): cleanups.o.
2609 (cleanups.o): New rule.
2610
2611 2014-08-29 Gary Benson <gbenson@redhat.com>
2612
2613 * utils.c (internal_vwarning): New function.
2614
2615 2014-08-28 Gary Benson <gbenson@redhat.com>
2616
2617 * utils.h (fatal): Remove declaration.
2618 * utils.c (fatal): Remove function.
2619
2620 2014-08-28 Gary Benson <gbenson@redhat.com>
2621
2622 * tracepoint.c (gdb_agent_init): Replace fatal with
2623 perror_with_name.
2624 (initialize_tracepoint): Likewise.
2625
2626 2014-08-28 Gary Benson <gbenson@redhat.com>
2627
2628 * remote-utils.c (remote_prepare): Replace fatal with error.
2629
2630 2014-08-28 Gary Benson <gbenson@redhat.com>
2631
2632 * linux-low.c (linux_async): Replace fatal with warning.
2633 Tidy up and return.
2634 (linux_start_non_stop): Return -1 if linux_async failed.
2635
2636 2014-08-28 Gary Benson <gbenson@redhat.com>
2637
2638 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2639 gdb_assert.
2640 (i386_dr_low_get_addr): Remove vague comment.
2641 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2642 gdb_assert.
2643
2644 2014-08-28 Gary Benson <gbenson@redhat.com>
2645
2646 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2647 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2648 internal_error.
2649 (linux_resume_one_lwp): Likewise.
2650 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2651 gdb_assert.
2652 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2653 with internal_error.
2654 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2655 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2656 (find_register_by_name): Replace fatal with internal_error.
2657 (find_regno): Likewise.
2658 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2659 * thread-db.c (thread_db_create_event): Likewise.
2660 (thread_db_load_search): Likewise.
2661 (try_thread_db_load_1): Likewise.
2662 * tracepoint.c (get_jump_space_head): Replace fatal with
2663 internal_error.
2664 (claim_trampoline_space): Likewise.
2665 (have_fast_tracepoint_trampoline_buffer): Likewise.
2666 (cmd_qtstart): Likewise.
2667 (stop_tracing): Likewise.
2668 (fast_tracepoint_collecting): Likewise.
2669 (target_malloc): Likewise.
2670 (download_tracepoint): Likewise.
2671 (download_trace_state_variables): Replace check with gdb_assert.
2672 (upload_fast_traceframes): Replace fatal with internal_error.
2673
2674 2014-08-19 Tom Tromey <tromey@redhat.com>
2675 Gary Benson <gbenson@redhat.com>
2676
2677 * Makefile.in (SFILES): Add common/common-debug.c.
2678 (OBS): Add common-debug.o.
2679 (common-debug.o): New rule.
2680 * debug.h (debug_printf): Don't declare.
2681 * debug.c (debug_printf): Renamed and rewritten as...
2682 (debug_vprintf): New function.
2683
2684 2014-08-19 Gary Benson <gbenson@redhat.com>
2685
2686 * utils.h: Do not include print-utils.h.
2687
2688 2014-08-19 Tom Tromey <tromey@redhat.com>
2689 Gary Benson <gbenson@redhat.com>
2690
2691 * server.h: Add static assertion.
2692 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2693
2694 2014-08-19 Tom Tromey <tromey@redhat.com>
2695 Gary Benson <gbenson@redhat.com>
2696
2697 * Makefile.in (SFILES): Add common/errors.c.
2698 (OBS): Add errors.o.
2699 (IPA_OBS): Add errors-ipa.o.
2700 (errors.o): New rule.
2701 (errors-ipa.o): Likewise.
2702 * utils.h (perror_with_name, error, warning): Don't declare.
2703 * utils.c (warning): Renamed and rewritten as...
2704 (vwarning): New function.
2705 (error): Renamed and rewritten as...
2706 (verror): New function.
2707 (internal_error): Renamed and rewritten as...
2708 (internal_verror): New function.
2709
2710 2014-08-07 Gary Benson <gbenson@redhat.com>
2711
2712 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2713 * configure: Regenerate.
2714 * config.in: Likewise.
2715 * server.h: Do not include errno.h.
2716 * event-loop.c: Likewise.
2717 * hostio-errno.c: Likewise.
2718 * linux-low.c: Likewise.
2719 * remote-utils.c: Likewise.
2720 * spu-low.c: Likewise.
2721 * utils.c: Likewise.
2722 * gdbreplay.c: Unconditionally include errno.h.
2723
2724 2014-08-07 Gary Benson <gbenson@redhat.com>
2725
2726 * server.h: Do not include string.h.
2727 * event-loop.c: Likewise.
2728 * linux-low.c: Likewise.
2729 * regcache.c: Likewise.
2730 * remote-utils.c: Likewise.
2731 * spu-low.c: Likewise.
2732 * utils.c: Likewise.
2733
2734 2014-08-07 Gary Benson <gbenson@redhat.com>
2735
2736 * server.h: Do not include gdb_assert.h.
2737
2738 2014-08-07 Gary Benson <gbenson@redhat.com>
2739
2740 * server.h: Do not include common-utils.h.
2741
2742 2014-08-07 Gary Benson <gbenson@redhat.com>
2743
2744 * server.h: Do not include ptid.h.
2745 * notif.h: Likewise.
2746
2747 2014-08-07 Gary Benson <gbenson@redhat.com>
2748
2749 * server.h: Do not include gdb_locale.h.
2750
2751 2014-08-07 Gary Benson <gbenson@redhat.com>
2752
2753 * server.h: Do not include gdb/signals.h.
2754 * win32-low.c: Likewise.
2755
2756 2014-08-07 Gary Benson <gbenson@redhat.com>
2757
2758 * server.h: Do not include pathmax.h.
2759
2760 2014-08-07 Gary Benson <gbenson@redhat.com>
2761
2762 * server.h: Do not include libiberty.h.
2763 * linux-bfin-low.c: Likewise.
2764
2765 2014-08-07 Gary Benson <gbenson@redhat.com>
2766
2767 * server.h: Do not include ansidecl.h.
2768
2769 2014-08-07 Gary Benson <gbenson@redhat.com>
2770
2771 * linux-x86-low.c: Do not include stddef.h.
2772 * lynx-ppc-low.c: Likewise.
2773 * tracepoint.c: Likewise.
2774
2775 2014-08-07 Gary Benson <gbenson@redhat.com>
2776
2777 * server.h: Do not include stdarg.h.
2778 * nto-low.c: Likewise.
2779
2780 2014-08-07 Gary Benson <gbenson@redhat.com>
2781
2782 * server.h: Do not include stdlib.h.
2783 * inferiors.c: Likewise.
2784 * linux-low.c: Likewise.
2785 * regcache.c: Likewise.
2786 * spu-low.c: Likewise.
2787 * tracepoint.c: Likewise.
2788 * utils.c: Likewise.
2789
2790 2014-08-07 Gary Benson <gbenson@redhat.com>
2791
2792 * server.h: Do not include stdio.h.
2793 * linux-low.c: Likewise.
2794 * remote-utils.c: Likewise.
2795 * spu-low.c: Likewise.
2796 * utils.c: Likewise.
2797 * wincecompat.c: Likewise.
2798
2799 2014-08-06 Gary Benson <gbenson@redhat.com>
2800
2801 * regcache.c (init_register_cache): Move conditionals inside if.
2802
2803 2014-08-06 Gary Benson <gbenson@redhat.com>
2804
2805 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2806
2807 2014-07-31 Gary Benson <gbenson@redhat.com>
2808
2809 * ax.h: Do not include server.h.
2810 * gdbthread.h: Likewise.
2811 * lynx-low.h: Likewise.
2812 * notif.h: Likewise.
2813
2814 2014-07-30 Gary Benson <gbenson@redhat.com>
2815
2816 * server.h: Include common-defs.h.
2817 Do not include config.h or build-gnulib-gdbserver/config.h.
2818
2819 2014-07-30 Gary Benson <gbenson@redhat.com>
2820
2821 * hostio-errno.c: Move server.h to top of includes list.
2822 * inferiors.c: Likewise.
2823 * linux-x86-low.c: Likewise.
2824 * notif.c: Include server.h.
2825
2826 2014-07-24 Tom Tromey <tromey@redhat.com>
2827 Gary Benson <gbenson@redhat.com>
2828
2829 * server.h (CORE_ADDR): Now unsigned.
2830
2831 2014-07-16 Pedro Alves <palves@redhat.com>
2832
2833 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2834
2835 2014-07-15 Pedro Alves <palves@redhat.com>
2836
2837 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2838 copy.
2839
2840 2014-07-11 Pedro Alves <palves@redhat.com>
2841
2842 * linux-low.c (kill_wait_lwp): New function, based on
2843 kill_one_lwp_callback, but use my_waitpid directly.
2844 (kill_one_lwp_callback, linux_kill): Use it.
2845
2846 2014-06-23 Pedro Alves <palves@redhat.com>
2847
2848 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2849 before setting DR0..DR3.
2850
2851 2014-06-20 Gary Benson <gbenson@redhat.com>
2852
2853 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2854 * configure: Regenerated.
2855 * config.in: Likewise.
2856
2857 2014-06-20 Gary Benson <gbenson@redhat.com>
2858
2859 * Makefile.in (SFILES): Update locations for files moved
2860 from common to nat.
2861 (object file files): Reordered.
2862
2863 2014-06-20 Gary Benson <gbenson@redhat.com>
2864
2865 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2866 (i386_dr_low_set_addr): Likewise.
2867 (i386_dr_low_get_addr): Likewise.
2868 (i386_dr_low_can_set_control): Likewise.
2869 (i386_dr_low_set_control): Likewise.
2870 (i386_dr_low_get_control): Likewise.
2871 (i386_dr_low_get_status): Likewise.
2872 (i386_get_debug_register_length): Likewise.
2873 * linux-x86-low.c (i386_dr_low_set_addr):
2874 Changed signature. Made static.
2875 (i386_dr_low_get_addr): Likewise.
2876 (i386_dr_low_set_control): Likewise.
2877 (i386_dr_low_get_control): Likewise.
2878 (i386_dr_low_get_status): Likewise.
2879 (i386_dr_low): New global variable.
2880 * win32-i386-low.c (i386_dr_low_set_addr):
2881 Changed signature. Made static.
2882 (i386_dr_low_get_addr): Likewise.
2883 (i386_dr_low_set_control): Likewise.
2884 (i386_dr_low_get_control): Likewise.
2885 (i386_dr_low_get_status): Likewise.
2886 (i386_dr_low): New global variable.
2887
2888 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2889
2890 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2891 * Makefile.in (AR, AR_FLAGS): Define.
2892 * configure: Regenerate.
2893
2894 2014-06-19 Gary Benson <gbenson@redhat.com>
2895
2896 * Makefile.in (i386-dregs.o): New rule.
2897 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2898 * i386-low.c (target.h): Remove include.
2899 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2900 (DR_CONTROL_SHIFT): Likewise.
2901 (DR_CONTROL_SIZE): Likewise.
2902 (DR_RW_EXECUTE): Likewise.
2903 (DR_RW_WRITE): Likewise.
2904 (DR_RW_READ): Likewise.
2905 (DR_RW_IORW): Likewise.
2906 (DR_LEN_1): Likewise.
2907 (DR_LEN_2): Likewise.
2908 (DR_LEN_4): Likewise.
2909 (DR_LEN_8): Likewise.
2910 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2911 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2912 (DR_ENABLE_SIZE): Likewise.
2913 (DR_LOCAL_SLOWDOWN): Likewise.
2914 (DR_GLOBAL_SLOWDOWN): Likewise.
2915 (DR_CONTROL_RESERVED): Likewise.
2916 (I386_DR_CONTROL_MASK): Likewise.
2917 (I386_DR_VACANT): Likewise.
2918 (I386_DR_LOCAL_ENABLE): Likewise.
2919 (I386_DR_GLOBAL_ENABLE): Likewise.
2920 (I386_DR_DISABLE): Likewise.
2921 (I386_DR_SET_RW_LEN): Likewise.
2922 (I386_DR_GET_RW_LEN): Likewise.
2923 (I386_DR_WATCH_HIT): Likewise.
2924 (i386_wp_op_t): Likewise.
2925 (i386_show_dr): Likewise.
2926 (i386_length_and_rw_bits): Likewise.
2927 (i386_insert_aligned_watchpoint): Likewise.
2928 (i386_remove_aligned_watchpoint): Likewise.
2929 (i386_handle_nonaligned_watchpoint): Likewise.
2930 i386_update_inferior_debug_regs(): Likewise.
2931 (i386_dr_insert_watchpoint): Likewise.
2932 (i386_dr_remove_watchpoint): Likewise.
2933 (i386_dr_region_ok_for_watchpoint): Likewise.
2934 (i386_dr_stopped_data_address): Likewise.
2935 (i386_dr_stopped_by_watchpoint): Likewise.
2936
2937 2014-06-19 Gary Benson <gbenson@redhat.com>
2938
2939 * i386-low.c (i386_dr_show): Renamed to
2940 i386_show_dr and made static. All uses updated.
2941 (i386_dr_length_and_rw_bits): Renamed to
2942 i386_length_and_rw_bits and made static.
2943 All uses updated.
2944 (i386_dr_insert_aligned_watchpoint): Renamed to
2945 i386_insert_aligned_watchpoint and made static.
2946 All uses updated.
2947 (i386_dr_remove_aligned_watchpoint): Renamed to
2948 i386_remove_aligned_watchpoint and made static.
2949 All uses updated.
2950 (i386_dr_update_inferior_debug_regs): Renamed to
2951 i386_update_inferior_debug_regs and made static.
2952 All uses updated.
2953
2954 2014-06-18 Gary Benson <gbenson@redhat.com>
2955
2956 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2957 (i386_dr_low_can_set_control): Likewise.
2958 (i386_get_debug_register_length): Likewise.
2959 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2960 (i386_dr_low_can_set_control): Likewise.
2961 (i386_get_debug_register_length): Likewise.
2962
2963 2014-06-17 Gary Benson <gbenson@redhat.com>
2964
2965 * i386-low.h (i386-dregs.h): New include.
2966 (DR_FIRSTADDR): Now in i386-dregs.h.
2967 (DR_LASTADDR): Likewise.
2968 (DR_NADDR): Likewise.
2969 (DR_STATUS): Likewise.
2970 (DR_CONTROL): Likewise.
2971 (i386_debug_reg_state): Likewise.
2972 (i386_dr_insert_watchpoint): Likewise.
2973 (i386_dr_remove_watchpoint): Likewise.
2974 (i386_dr_region_ok_for_watchpoint): Likewise.
2975 (i386_dr_stopped_data_address): Likewise.
2976 (i386_dr_stopped_by_watchpoint): Likewise.
2977 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2978
2979 2014-06-18 Gary Benson <gbenson@redhat.com>
2980
2981 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2982 i386_dr_insert_watchpoint.
2983 (i386_low_remove_watchpoint): Renamed to
2984 i386_dr_remove_watchpoint.
2985 (i386_low_region_ok_for_watchpoint): Renamed to
2986 i386_dr_region_ok_for_watchpoint.
2987 (i386_low_stopped_data_address): Renamed to
2988 i386_dr_stopped_data_address.
2989 (i386_low_stopped_by_watchpoint): Renamed to
2990 i386_dr_stopped_by_watchpoint.
2991 * i386-low.c (i386_show_dr): Renamed to
2992 i386_dr_show and made nonstatic. All uses updated.
2993 (i386_length_and_rw_bits): Renamed to
2994 i386_dr_length_and_rw_bits and made nonstatic.
2995 All uses updated.
2996 (i386_insert_aligned_watchpoint): Renamed to
2997 i386_dr_insert_aligned_watchpoint and made nonstatic.
2998 All uses updated.
2999 (i386_remove_aligned_watchpoint): Renamed to
3000 i386_dr_remove_aligned_watchpoint and made nonstatic.
3001 All uses updated.
3002 (i386_update_inferior_debug_regs): Renamed to
3003 i386_dr_update_inferior_debug_regs and made nonstatic.
3004 All uses updated.
3005 (i386_low_insert_watchpoint): Renamed to
3006 i386_dr_insert_watchpoint. All uses updated.
3007 (i386_low_remove_watchpoint): Renamed to
3008 i386_dr_remove_watchpoint. All uses updated.
3009 (i386_low_region_ok_for_watchpoint): Renamed to
3010 i386_dr_region_ok_for_watchpoint. All uses updated.
3011 (i386_low_stopped_data_address): Renamed to
3012 i386_dr_stopped_data_address. All uses updated.
3013 (i386_low_stopped_by_watchpoint): Renamed to
3014 i386_dr_stopped_by_watchpoint. All uses updated.
3015
3016 2014-06-18 Gary Benson <gbenson@redhat.com>
3017
3018 * i386-low.c (i386_dr_low_can_set_addr): New macro.
3019 (i386_dr_low_can_set_control): Likewise.
3020 (i386_insert_aligned_watchpoint): New check.
3021
3022 2014-06-18 Gary Benson <gbenson@redhat.com>
3023
3024 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3025 Renamed to state.
3026
3027 2014-06-18 Gary Benson <gbenson@redhat.com>
3028
3029 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3030 instead of fatal and error.
3031 (i386_handle_nonaligned_watchpoint): Likewise.
3032
3033 2014-06-18 Gary Benson <gbenson@redhat.com>
3034
3035 * i386-low.c (i386_get_debug_register_length): New macro.
3036 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3037 (i386_show_dr): Use debug_printf instead of fprintf. Use
3038 phex to format values.
3039
3040 2014-06-18 Gary Benson <gbenson@redhat.com>
3041
3042 * i386-low.h: Comment changes.
3043 * i386-low.c: Likewise.
3044
3045 2014-06-18 Gary Benson <gbenson@redhat.com>
3046
3047 * i386-low.c: Whitespace changes.
3048
3049 2014-06-12 Tom Tromey <tromey@redhat.com>
3050
3051 * utils.c (freeargv): Remove.
3052
3053 2014-06-12 Tom Tromey <tromey@redhat.com>
3054
3055 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3056 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3057 (parse_debug_format_options): Likewise.
3058 (gdbserver_usage): Likewise.
3059 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3060 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3061 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3062 against libiberty.
3063 ($(LIBGNU)): Depend on libiberty.
3064 (all-lib): Recurse into all subdirs.
3065 (install-only): Invoke "install" target in subdirs.
3066 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3067 targets.
3068 * configure: Rebuild.
3069 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3070 for vasprintf, vsnprintf, or gettimeofday.
3071 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3072 srv_tgtobj.
3073
3074 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3075
3076 * development.sh: Delete.
3077 * Makefile.in (config.status): Adjust dependency on development.sh.
3078 * configure.ac: Adjust development.sh source call.
3079 * configure: Regenerate.
3080
3081 2014-06-02 Pedro Alves <palves@redhat.com>
3082
3083 * ax.c (gdb_free_agent_expr): New function.
3084 * ax.h (gdb_free_agent_expr): New declaration.
3085 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3086 list.
3087 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3088 static.
3089 (clear_breakpoint_conditions_and_commands): New function.
3090 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3091 (clear_breakpoint_conditions_and_commands): New declaration.
3092
3093 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3094
3095 * linux-aarch64-low.c (asm/ptrace.h): Include.
3096
3097 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3098
3099 Fix TLS access for -static -pthread.
3100 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3101 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3102 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3103
3104 2014-05-20 Pedro Alves <palves@redhat.com>
3105
3106 * linux-aarch64-low.c (aarch64_insert_point)
3107 (aarch64_remove_point): No longer check whether the type is
3108 supported here. Adjust to new interface.
3109 (the_low_target): Install aarch64_supports_z_point_type as
3110 supports_z_point_type method.
3111 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3112 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3113 instead of a Z packet char. Adjust.
3114 (arm_supports_z_point_type): New function.
3115 (arm_insert_point, arm_remove_point): Adjust to new interface.
3116 (the_low_target): Install arm_supports_z_point_type.
3117 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3118 (cris_insert_point, cris_remove_point): Adjust to new interface.
3119 Don't check whether the type is supported here.
3120 (the_low_target): Install cris_supports_z_point_type.
3121 * linux-low.c (linux_supports_z_point_type): New function.
3122 (linux_insert_point, linux_remove_point): Adjust to new interface.
3123 * linux-low.h (struct linux_target_ops) <insert_point,
3124 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3125 raw_breakpoint pointer parameter.
3126 <supports_z_point_type>: New method.
3127 * linux-mips-low.c (mips_supports_z_point_type): New function.
3128 (mips_insert_point, mips_remove_point): Adjust to new interface.
3129 Use mips_supports_z_point_type.
3130 (the_low_target): Install mips_supports_z_point_type.
3131 * linux-ppc-low.c (the_low_target): Install NULL as
3132 supports_z_point_type method.
3133 * linux-s390-low.c (the_low_target): Install NULL as
3134 supports_z_point_type method.
3135 * linux-sparc-low.c (the_low_target): Install NULL as
3136 supports_z_point_type method.
3137 * linux-x86-low.c (x86_supports_z_point_type): New function.
3138 (x86_insert_point): Adjust to new insert_point interface. Use
3139 insert_memory_breakpoint. Adjust to new
3140 i386_low_insert_watchpoint interface.
3141 (x86_remove_point): Adjust to remove_point interface. Use
3142 remove_memory_breakpoint. Adjust to new
3143 i386_low_remove_watchpoint interface.
3144 (the_low_target): Install x86_supports_z_point_type.
3145 * lynx-low.c (lynx_target_ops): Install NULL as
3146 supports_z_point_type callback.
3147 * nto-low.c (nto_supports_z_point_type): New.
3148 (nto_insert_point, nto_remove_point): Adjust to new interface.
3149 (nto_target_ops): Install nto_supports_z_point_type.
3150 * mem-break.c: Adjust intro comment.
3151 (struct raw_breakpoint) <raw_type, size>: New fields.
3152 <inserted>: Update comment.
3153 <shlib_disabled>: Delete field.
3154 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3155 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3156 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3157 (raw_bkpt_type_to_target_hw_bp_type): New function.
3158 (find_enabled_raw_code_breakpoint_at): New function.
3159 (find_raw_breakpoint_at): New type and size parameters. Use them.
3160 (insert_memory_breakpoint): New function, based off
3161 set_raw_breakpoint_at.
3162 (remove_memory_breakpoint): New function.
3163 (set_raw_breakpoint_at): Reimplement.
3164 (set_breakpoint): New, based on set_breakpoint_at.
3165 (set_breakpoint_at): Reimplement.
3166 (delete_raw_breakpoint): Go through the_target->remove_point
3167 instead of assuming memory breakpoints.
3168 (find_gdb_breakpoint_at): Delete.
3169 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3170 (find_gdb_breakpoint): New function.
3171 (set_gdb_breakpoint_at): Delete.
3172 (z_type_supported): New function.
3173 (set_gdb_breakpoint_1): New function, loosely based off
3174 set_gdb_breakpoint_at.
3175 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3176 (delete_gdb_breakpoint_at): Delete.
3177 (delete_gdb_breakpoint_1): New function, loosely based off
3178 delete_gdb_breakpoint_at.
3179 (delete_gdb_breakpoint): New function.
3180 (clear_gdb_breakpoint_conditions): Rename to ...
3181 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3182 breakpoint.
3183 (add_condition_to_breakpoint): Make static.
3184 (add_breakpoint_condition): Take a struct breakpoint pointer
3185 instead of an address. Adjust.
3186 (gdb_condition_true_at_breakpoint): Rename to ...
3187 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3188 z_type parameter.
3189 (gdb_condition_true_at_breakpoint): Reimplement.
3190 (add_breakpoint_commands): Take a struct breakpoint pointer
3191 instead of an address. Adjust.
3192 (gdb_no_commands_at_breakpoint): Rename to ...
3193 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3194 parameter. Return true if no breakpoint was found. Change debug
3195 output.
3196 (gdb_no_commands_at_breakpoint): Reimplement.
3197 (run_breakpoint_commands): Rename to ...
3198 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3199 and change return type to boolean.
3200 (run_breakpoint_commands): New function.
3201 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3202 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3203 breakpoint. Go through the_target->remove_point instead of
3204 assuming memory breakpoint.
3205 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3206 software and hardware breakpoints.
3207 (reinsert_raw_breakpoint): Go through the_target->insert_point
3208 instead of assuming memory breakpoint.
3209 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3210 software and hardware breakpoints.
3211 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3212 Check both software and hardware breakpoints.
3213 (validate_inserted_breakpoint): Assert the breakpoint is a
3214 software breakpoint. Set the inserted flag to -1 instead of
3215 setting shlib_disabled.
3216 (delete_disabled_breakpoints): Adjust.
3217 (validate_breakpoints): Only validate software breakpoints.
3218 Adjust to inserted flag change.
3219 (check_mem_read, check_mem_write): Skip breakpoint types other
3220 than software breakpoints. Adjust to inserted flag change.
3221 * mem-break.h (enum raw_bkpt_type): New enum.
3222 (raw_breakpoint, struct process_info): Forward declare.
3223 (Z_packet_to_target_hw_bp_type): Delete declaration.
3224 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3225 (set_gdb_breakpoint, delete_gdb_breakpoint)
3226 (clear_breakpoint_conditions): New declarations.
3227 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3228 (breakpoint_inserted_here): Update comment.
3229 (add_breakpoint_condition, add_breakpoint_commands): Replace
3230 address parameter with a breakpoint pointer parameter.
3231 (gdb_breakpoint_here): Update comment.
3232 (delete_gdb_breakpoint_at): Delete.
3233 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3234 * server.c (process_point_options): Take a struct breakpoint
3235 pointer instead of an address. Adjust.
3236 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3237 delete_gdb_breakpoint.
3238 * spu-low.c (spu_target_ops): Install NULL as
3239 supports_z_point_type method.
3240 * target.h: Include mem-break.h.
3241 (struct target_ops) <prepare_to_access_memory>: Update comment.
3242 <supports_z_point_type>: New field.
3243 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3244 instead of a char. Also take a raw breakpoint pointer.
3245 * win32-arm-low.c (the_low_target): Install NULL as
3246 supports_z_point_type.
3247 * win32-i386-low.c (i386_supports_z_point_type): New function.
3248 (i386_insert_point, i386_remove_point): Adjust to new interface.
3249 (the_low_target): Install i386_supports_z_point_type.
3250 * win32-low.c (win32_supports_z_point_type): New function.
3251 (win32_insert_point, win32_remove_point): Adjust to new interface.
3252 (win32_target_ops): Install win32_supports_z_point_type.
3253 * win32-low.h (struct win32_target_ops):
3254 <supports_z_point_type>: New method.
3255 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3256 instead of a char. Also take a raw breakpoint pointer.
3257
3258 2014-05-20 Pedro Alves <palves@redhat.com>
3259
3260 * mem-break.h: Include break-common.h.
3261 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3262 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3263 (Z_packet_to_target_hw_bp_type): New declaration.
3264 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3265 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3266 (Z_PACKET_ACCESS_WP): Delete macros.
3267 (Z_packet_to_hw_type): Delete function.
3268 * i386-low.h: Don't include break-common.h here.
3269 (Z_packet_to_hw_type): Delete declaration.
3270 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3271 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3272 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3273 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3274 * linux-aarch64-low.c: Don't include break-common.h here.
3275 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3276 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3277 (Z_packet_to_target_hw_bp_type): Delete function.
3278 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3279 function.
3280 (mips_insert_point, mips_remove_point): Use
3281 Z_packet_to_target_hw_bp_type.
3282
3283 2014-05-20 Pedro Alves <palves@redhat.com>
3284
3285 * linux-aarch64-low.c: Include break-common.h.
3286 (enum target_point_type): Delete.
3287 (Z_packet_to_point_type): Rename to ...
3288 (Z_packet_to_target_hw_bp_type): ... this, and return a
3289 target_hw_bp_type instead.
3290 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3291 instead of an enum target_point_type.
3292 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3293 breakpoint type.
3294 (aarch64_dr_state_insert_one_point)
3295 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3296 (aarch64_handle_aligned_watchpoint)
3297 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3298 Take an enum target_hw_bp_type instead of an enum
3299 target_point_type.
3300 (aarch64_supports_z_point_type): New function.
3301 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3302 use Z_packet_to_target_hw_bp_type.
3303
3304 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3305
3306 * configure.ac: Only use -Werror by default when DEVELOPMENT
3307 is true.
3308 * configure: Regenerate.
3309
3310 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3311
3312 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3313 * linux-x86-low.c (X86_64_USER_REGS): New.
3314 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3315
3316 2014-04-28 Yao Qi <yao@codesourcery.com>
3317
3318 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3319 name.
3320
3321 2014-04-25 Pedro Alves <palves@redhat.com>
3322
3323 PR server/16255
3324 * linux-low.c (linux_attach_fail_reason_string): New function.
3325 (linux_attach_lwp): Delete.
3326 (linux_attach_lwp_1): Rename to ...
3327 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3328 argument. Remove "initial" parameter. Return int instead of
3329 void. Don't error or warn here.
3330 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3331 failure to attach to the tgid. Call warning when failing to
3332 attach to an lwp.
3333 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3334 argument. Remove "initial" parameter. Return int instead of
3335 void. Don't error or warn here.
3336 (linux_attach_fail_reason_string): New declaration.
3337 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3338 interface change. Use linux_attach_fail_reason_string.
3339
3340 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3341 Walfred Tedeschi <walfred.tedeschi@intel.com>
3342
3343 * Makefile.in: Added rules to handle new files
3344 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3345 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3346 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3347 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3348 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3349 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3350 x32-avx512-linux.o.
3351 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3352 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3353 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3354 i386/x32-avx512.xml.
3355 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3356 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3357 i386/x32-avx512-linux.xml.
3358 * i387-fp.c (num_avx512_k_registers): New constant for number
3359 of K registers.
3360 (num_avx512_zmmh_low_registers): New constant for number of
3361 lower ZMM registers (0-15).
3362 (num_avx512_zmmh_high_registers): New constant for number of
3363 higher ZMM registers (16-31).
3364 (num_avx512_ymmh_registers): New contant for number of higher
3365 YMM registers (ymm16-31 added by avx521 on x86_64).
3366 (num_avx512_xmm_registers): New constant for number of higher
3367 XMM registers (xmm16-31 added by AVX512 on x86_64).
3368 (struct i387_xsave): Add space for AVX512 registers.
3369 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3370 Add code to handle AVX512 registers.
3371 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3372 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3373 prototypei from generated file.
3374 (tdesc_amd64_avx512_linux): Likewise.
3375 (init_registers_x32_avx512_linux): Likewise.
3376 (tdesc_x32_avx512_linux): Likewise.
3377 (init_registers_i386_avx512_linux): Likewise.
3378 (tdesc_i386_avx512_linux): Likewise.
3379 (x86_64_regmap): Add AVX512 registers.
3380 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3381 mask.
3382 (initialize_low_arch): Add code to initialize AVX512 registers.
3383
3384 2014-04-23 Pedro Alves <palves@redhat.com>
3385
3386 * mem-break.c (find_gdb_breakpoint_at): Make static.
3387 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3388
3389 2014-04-23 Pedro Alves <palves@redhat.com>
3390
3391 * i386-low.c: Don't include break-common.h here.
3392 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3393 prototype to take target_hw_bp_type as argument instead of a Z
3394 packet char.
3395 * i386-low.h: Include break-common.h here.
3396 (Z_packet_to_hw_type): Declare.
3397 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3398 prototypes.
3399 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3400 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3401 (x86_remove_point): Convert the packet number to a
3402 target_hw_bp_type before calling i386_low_remove_watchpoint.
3403 * win32-i386-low.c (i386_insert_point): Convert the packet number
3404 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3405 (i386_remove_point): Convert the packet number to a
3406 target_hw_bp_type before calling i386_low_remove_watchpoint.
3407
3408 2014-04-23 Pedro Alves <palves@redhat.com>
3409
3410 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3411
3412 2014-04-10 Pedro Alves <palves@redhat.com>
3413
3414 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3415 Check if the condition or command is NULL before checking if the
3416 breakpoint is known. On success, return true.
3417 * mem-break.h (add_breakpoint_condition): Document return.
3418 (add_breakpoint_commands): Add describing comment.
3419 * server.c (skip_to_semicolon): New function.
3420 (process_point_options): Use it.
3421
3422 2014-04-09 Pedro Alves <palves@redhat.com>
3423
3424 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3425 to lwpid_of.
3426
3427 2014-02-27 Pedro Alves <palves@redhat.com>
3428
3429 PR 12702
3430 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3431 macros.
3432 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3433 output.
3434 (last_thread_of_process_p): Take a PID argument instead of a
3435 thread pointer.
3436 (linux_wait_for_lwp): Delete.
3437 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3438 functions.
3439 (linux_low_filter_event): New function, party factored out from
3440 linux_wait_for_event.
3441 (linux_wait_for_event): Rename to ...
3442 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3443 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3444 sigsuspend. Check for zombie leaders.
3445 (linux_wait_for_event): Reimplement as wrapper around
3446 linux_wait_for_event_filtered.
3447 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3448 a normal or signal exit is seen, it's the whole process exiting.
3449 (wait_for_sigstop): No longer a for_each_inferior callback.
3450 Rewrite on top of linux_wait_for_event_filtered.
3451 (stop_all_lwps): Call wait_for_sigstop directly.
3452 * server.c (resume, handle_target_event): Handle
3453 TARGET_WAITKIND_NO_RESUMED.
3454
3455 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3456
3457 * win32-low.c (psapi_get_dll_name,
3458 * win32_CreateToolhelp32Snapshot): Delete.
3459 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3460 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3461 Delete.
3462 (handle_load_dll): Add function description.
3463 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3464
3465 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3466
3467 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3468 Add comment.
3469 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3470 base address when calling win32_add_one_solib.
3471 (handle_load_dll): Delete local variable load_addr.
3472 Remove 0x1000 offset applied to DLL base address when calling
3473 win32_add_one_solib.
3474 (handle_unload_dll): Add comment.
3475
3476 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3477
3478 * win32-low.c (win32_add_all_dlls): Renames
3479 win32_ensure_ntdll_loaded. Rewrite function documentation.
3480 Adjust implementation to always load all DLLs.
3481 Add 0x1000 offset to DLL base address when calling
3482 win32_add_one_solib.
3483 (child_initialization_done): New static global.
3484 (do_initial_child_stuff): Set child_initialization_done to
3485 zero during child initialization, and 1 after. Replace call
3486 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3487 Add comment.
3488 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3489 (handle_unload_dll): Add function documentation.
3490 (get_child_debug_event): Ignore load and unload DLL events
3491 during child initialization.
3492
3493 2014-02-20 Doug Evans <dje@google.com>
3494
3495 Remove global all_lwps.
3496 * inferiors.h (ptid_of): Move here from linux-low.h.
3497 (pid_of, lwpid_of): Ditto.
3498 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3499 parameter is a struct thread_info * now.
3500 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3501 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3502 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3503 directly.
3504 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3505 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3506 * linux-arm-low.c (update_registers_callback): Update, "entry"
3507 parameter is a struct thread_info * now.
3508 Fetch lwpid from current_inferior directly.
3509 (arm_insert_point): Pass &all_threads to find_inferior instead of
3510 &all_lwps.
3511 (arm_remove_point): Ditto.
3512 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3513 (arm_prepare_to_resume): Fetch pid from thread.
3514 (arm_read_description): Fetch lwpid from current_inferior directly.
3515 * linux-low.c (all_lwps): Delete.
3516 (delete_lwp): Delete call to remove_inferior.
3517 (handle_extended_wait): Fetch lwpid from thread.
3518 (add_lwp): Don't set lwp->entry.id. Remove call to
3519 add_inferior_to_list.
3520 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3521 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3522 (kill_one_lwp_callback): Ditto.
3523 (linux_kill): Don't dereference NULL pointer.
3524 Fetch ptid,lwpid from thread.
3525 (get_detach_signal): Fetch ptid from thread.
3526 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3527 Simplify call to regcache_invalidate_thread.
3528 (delete_lwp_callback): Update, "entry" parameter is a
3529 struct thread_info * now. Fetch pid from thread.
3530 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3531 (status_pending_p_callback): Update, "entry" parameter is a
3532 struct thread_info * now. Fetch ptid from thread.
3533 (find_lwp_pid): Update, "entry" parameter is a
3534 struct thread_info * now.
3535 (linux_wait_for_lwp): Fetch pid from thread.
3536 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3537 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3538 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3539 (dequeue_one_deferred_signal): Ditto.
3540 (cancel_breakpoint): Fetch ptid from current_inferior.
3541 (linux_wait_for_event): Pass &all_threads to find_inferior,
3542 not &all_lwps. Fetch ptid, lwpid from thread.
3543 (count_events_callback): Update, "entry" parameter is a
3544 struct thread_info * now.
3545 (select_singlestep_lwp_callback): Ditto.
3546 (select_event_lwp_callback): Ditto.
3547 (cancel_breakpoints_callback): Ditto.
3548 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3549 not &all_lwps.
3550 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3551 (unsuspend_one_lwp): Update, "entry" parameter is a
3552 struct thread_info * now.
3553 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3554 not &all_lwps.
3555 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3556 Fetch lwpid from thread, not lwp.
3557 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3558 Pass &all_threads to find_inferior, not &all_lwps.
3559 (send_sigstop): Fetch lwpid from thread, not lwp.
3560 (send_sigstop_callback): Update, "entry" parameter is a
3561 struct thread_info * now.
3562 (suspend_and_send_sigstop_callback): Ditto.
3563 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3564 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3565 struct thread_info * now.
3566 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3567 from thread, lwp.
3568 (lwp_running): Update, "entry" parameter is a
3569 struct thread_info * now.
3570 (stop_all_lwps): Fetch ptid from thread.
3571 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3572 (linux_resume_one_lwp): Fetch lwpid from thread.
3573 (linux_set_resume_request): Update, "entry" parameter is a
3574 struct thread_info * now. Fetch pid, lwpid from thread.
3575 (resume_status_pending_p): Update, "entry" parameter is a
3576 struct thread_info * now.
3577 (need_step_over_p): Ditto. Fetch lwpid from thread.
3578 (start_step_over): Fetch lwpid from thread.
3579 (linux_resume_one_thread): Update, "entry" parameter is a
3580 struct thread_info * now. Fetch lwpid from thread.
3581 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3582 (proceed_one_lwp): Update, "entry" parameter is a
3583 struct thread_info * now. Fetch lwpid from thread.
3584 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3585 struct thread_info * now.
3586 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3587 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3588 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3589 directly.
3590 (regsets_store_inferior_registers): Ditto.
3591 (fetch_register, store_register): Ditto.
3592 (linux_read_memory, linux_write_memory): Ditto.
3593 (linux_request_interrupt): Ditto.
3594 (linux_read_auxv): Ditto.
3595 (linux_xfer_siginfo): Ditto.
3596 (linux_qxfer_spu): Ditto.
3597 (linux_qxfer_libraries_svr4): Ditto.
3598 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3599 moved to inferiors.h.
3600 (get_lwp): Delete.
3601 (get_thread_lwp): Update.
3602 (struct lwp_info): Delete member "entry". Simplify comment for
3603 member "thread".
3604 (all_lwps): Delete.
3605 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3606 current_inferior directly.
3607 (update_watch_registers_callback): Update, "entry" parameter is a
3608 struct thread_info * now. Fetch pid from thread.
3609 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3610 (mips_insert_point): Fetch lwpid from current_inferior.
3611 Pass &all_threads to find_inferior, not &all_lwps.
3612 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3613 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3614 directly.
3615 (mips_stopped_data_address): Ditto.
3616 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3617 directly.
3618 * linux-tile-low.c (tile_arch_setup): Ditto.
3619 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3620 (update_debug_registers_callback): Update, "entry" parameter is a
3621 struct thread_info * now. Fetch pid from thread.
3622 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3623 Pass &all_threads to find_inferior, not &all_lwps.
3624 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3625 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3626 Pass &all_threads to find_inferior, not &all_lwps.
3627 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3628 (i386_dr_low_get_status): Ditto.
3629 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3630 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3631 (x86_linux_read_description): Ditto.
3632 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3633
3634 2014-02-20 Doug Evans <dje@google.com>
3635
3636 * inferiors.c (get_first_inferior): Fix buglet.
3637
3638 2014-02-19 Doug Evans <dje@google.com>
3639
3640 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3641 * inferiors.c (add_thread): Change result type to struct thread_info *.
3642 All callers updated.
3643 (add_lwp): Call add_thread here instead of in callers.
3644 All callers updated.
3645 * linux-low.h (get_lwp_thread): Rewrite.
3646 (struct lwp_info): New member "thread".
3647
3648 2014-02-19 Doug Evans <dje@google.com>
3649
3650 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3651 All callers updated.
3652
3653 2014-02-19 Doug Evans <dje@google.com>
3654
3655 * inferiors.c (add_thread): Fix whitespace.
3656
3657 2014-02-19 Doug Evans <dje@google.com>
3658
3659 * dll.c (clear_dlls): Replace accessing list implemention details
3660 with API function.
3661 * gdbthread.h (get_first_thread): Declare.
3662 * inferiors.c (for_each_inferior_with_data): New function.
3663 (get_first_thread): New function.
3664 (find_thread_ptid): Simplify.
3665 (get_first_inferior): New function.
3666 (clear_list): Delete.
3667 (one_inferior_p): New function.
3668 (clear_inferior_list): New function.
3669 (clear_inferiors): Update.
3670 * inferiors.h (for_each_inferior_with_data): Declare.
3671 (clear_inferior_list): Declare.
3672 (one_inferior_p): Declare.
3673 (get_first_inferior): Declare.
3674 * linux-low.c (linux_wait_for_event): Replace accessing list
3675 implemention details with API function.
3676 * server.c (target_running): Ditto.
3677 (accumulate_file_name_length): New function.
3678 (emit_dll_description): New function.
3679 (handle_qxfer_libraries): Replace accessing list implemention
3680 details with API function.
3681 (handle_qxfer_threads_worker): New function.
3682 (handle_qxfer_threads_proper): Replace accessing list implemention
3683 details with API function.
3684 (handle_query): Ditto.
3685 (visit_actioned_threads_callback_ftype): New typedef.
3686 (visit_actioned_threads_data): New struct.
3687 (visit_actioned_threads): Rewrite to be find_inferior callback.
3688 (resume): Call find_inferior.
3689 (handle_status): Replace accessing list implemention
3690 details with API function.
3691 (process_serial_event): Replace accessing list implemention details
3692 with API function.
3693 * target.c (set_desired_inferior): Replace accessing list implemention
3694 details with API function.
3695 * tracepoint.c (same_process_p): New function.
3696 (gdb_agent_about_to_close): Replace accessing list implemention
3697 details with API function.
3698 * win32-low.c (child_delete_thread): Replace accessing list
3699 implemention details with API function.
3700 (match_dll_by_basename): New function.
3701 (dll_is_loaded_by_basename): New function.
3702 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3703 details call to dll_is_loaded_by_basename.
3704
3705 2014-02-19 Doug Evans <dje@google.com>
3706
3707 * dll.h (struct dll_info): Add comment.
3708 * gdbthread.h (struct thread_info): Add comment.
3709 (current_ptid): Simplify.
3710 * inferiors.c (add_process): Update.
3711 (remove_process): Update.
3712 * inferiors.h (struct process_info): Rename member "head" to "entry".
3713 * linux-low.c (delete_lwp): Update.
3714 (add_lwp): Update.
3715 (last_thread_of_process_p): Update.
3716 (kill_one_lwp_callback, linux_kill): Update.
3717 (status_pending_p_callback): Update.
3718 (wait_for_sigstop): Update. Simplify read of ptid.
3719 (start_step_over): Update.
3720 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3721 (get_lwp_thread): Update.
3722 (struct lwp_info): Rename member "head" to "entry".
3723 * regcache.h (inferior_list_entry): Delete.
3724 * server.c (kill_inferior_callback): Update.
3725 (detach_or_kill_inferior_callback): Update.
3726 (print_started_pid): Update.
3727 (print_attached_pid): Update.
3728 (process_serial_event): Simplify read of ptid.
3729 * thread-db.c (thread_db_create_event): Update.
3730 (thread_db_get_tls_address): Update.
3731 * win32-low.c (current_inferior_ptid): Simplify.
3732
3733 2014-02-19 Tom Tromey <tromey@redhat.com>
3734
3735 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3736 argument.
3737 (target_supports_btrace): Update.
3738
3739 2014-02-14 Yao Qi <yao@codesourcery.com>
3740
3741 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3742 (rsp-low-ipa.o): New target.
3743
3744 2014-02-12 Tom Tromey <tromey@redhat.com>
3745
3746 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3747 convert_ascii_to_int.
3748 * regcache.c (registers_to_string): Likewise.
3749 * remote-utils.c (decode_M_packet): Likewise.
3750 * server.c (process_serial_event): Likewise.
3751
3752 2014-02-12 Tom Tromey <tromey@redhat.com>
3753
3754 * server.c (handle_query, handle_v_run): Use hex2bin, not
3755 unhexify.
3756 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3757
3758 2014-02-12 Tom Tromey <tromey@redhat.com>
3759
3760 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3761 convert_int_to_ascii.
3762 * regcache.c (registers_to_string, collect_register_as_string):
3763 Likewise.
3764 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3765 Likewise.
3766 * server.c (process_serial_event): Likewise.
3767 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3768 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3769
3770 2014-02-12 Tom Tromey <tromey@redhat.com>
3771
3772 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3773 bin2hex, not hexify.
3774 * tracepoint.c (cmd_qtstatus): Likewise.
3775
3776 2014-02-12 Tom Tromey <tromey@redhat.com>
3777
3778 * remote-utils.c (monitor_output): Pass explicit length to
3779 hexify.
3780
3781 2014-02-12 Tom Tromey <tromey@redhat.com>
3782
3783 * tracepoint.c: Include rsp-low.h.
3784 * server.c: Include rsp-low.h.
3785 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3786 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3787 declare.
3788 * remote-utils.c: Include rsp-low.h.
3789 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3790 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3791 (convert_int_to_ascii, convert_ascii_to_int): Move to
3792 common/rsp-low.c.
3793 * regcache.c: Include rsp-low.h.
3794 * ax.c: Include rsp-low.h.
3795 * Makefile.in (SFILES): Add common/rsp-low.c.
3796 (OBS): Add rsp-low.o.
3797 (rsp-low.o): New target.
3798
3799 2014-02-12 Tom Tromey <tromey@redhat.com>
3800
3801 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3802 Include print-utils.h.
3803 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3804 (plongest, thirty_two, phex_nz): Remove.
3805 * Makefile.in (SFILES): Add common/print-utils.c.
3806 (OBS): Add print-utils.o.
3807 (print-utils-ipa.o): New target.
3808 (print-utils.o): New target.
3809 (IPA_OBJS): Add print-utils-ipa.o.
3810
3811 2014-02-06 Tom Tromey <tromey@redhat.com>
3812
3813 * Makefile.in (SFILES): Fix indentation.
3814
3815 2014-02-05 Doug Evans <dje@google.com>
3816
3817 * linux-low.c (linux_wait_for_event): Improve comment.
3818 (linux_wait_1): Keep current_inferior in sync with event_child.
3819
3820 2014-01-22 Doug Evans <dje@google.com>
3821
3822 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3823
3824 2014-01-22 Doug Evans <dje@google.com>
3825
3826 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3827 * configure: Regenerate.
3828 * config.in: Regenerate.
3829 * Makefile.in (SFILES): Add debug.c.
3830 (OBS): Add debug.o.
3831 * debug.c: New file.
3832 * debug.h: New file.
3833 * linux-aarch64-low.c (*): Update all debugging printfs to use
3834 debug_printf instead of fprintf.
3835 * linux-arm-low.c (*): Ditto.
3836 * linux-cris-low.c (*): Ditto.
3837 * linux-crisv32-low.c (*): Ditto.
3838 * linux-m32r-low.c (*): Ditto.
3839 * linux-sparc-low.c (*): Ditto.
3840 * linux-x86.c (*): Ditto.
3841 * linux-low.c (*): Ditto.
3842 (linux_wait_1): Add calls to debug_enter, debug_exit.
3843 (linux_wait): Remove redundant debugging printf.
3844 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3845 (linux_resume, unstop_all_lwps): Ditto.
3846 * mem-break.c (*): Update all debugging printfs to use
3847 debug_printf instead of fprintf.
3848 * remote-utils.c (*): Ditto.
3849 * thread-db.c (*): Ditto.
3850 * server.c #include <ctype.h>, "gdb_vecs.h".
3851 (debug_threads): Moved to debug.c.
3852 (*): Update all debugging printfs to use debug_printf instead of
3853 fprintf.
3854 (start_inferior): Replace call to fflush with call to debug_flush.
3855 (monitor_show_help): Mention set debug-format.
3856 (parse_debug_format_options): New function.
3857 (handle_monitor_command): Handle "monitor set debug-format".
3858 (gdbserver_usage): Mention --debug-format.
3859 (main): Parse --debug-format.
3860 * server.h (debug_threads): Declaration moved to debug.h.
3861 #include "debug.h".
3862 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3863 trace_debug_1 that uses debug_printf.
3864 (tracepoint_look_up_symbols): Update all debugging printfs to use
3865 debug_printf instead of fprintf.
3866
3867 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3868
3869 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3870 sys/ptrace.h.
3871
3872 2014-01-17 Pedro Alves <palves@redhat.com>
3873
3874 PR build/16445
3875 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3876 defined after including gdb_proc_service.h.
3877
3878 2014-01-16 Doug Evans <dje@google.com>
3879
3880 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3881 (match_dll): Use it.
3882
3883 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3884
3885 * target.h (target_ops) <read_btrace>: Change parameters and
3886 return type to allow error reporting.
3887 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3888 trace reading errors on.
3889 * linux-low.c (linux_low_read_btrace): Pass trace reading
3890 errors on.
3891 (linux_low_disable_btrace): New.
3892
3893 2014-01-15 Doug Evans <dje@google.com>
3894
3895 * inferiors.c (thread_id_to_gdb_id): Delete.
3896 * inferiors.h (thread_id_to_gdb_id): Delete.
3897
3898 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3899
3900 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3901 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3902 versions.
3903
3904 2014-01-08 Pedro Alves <palves@redhat.com>
3905
3906 * server.c (handle_status): Don't discard previous queued stop
3907 replies or thread's pending status here.
3908 (main) <disconnection>: Do it here instead.
3909
3910 2014-01-08 Pedro Alves <palves@redhat.com>
3911
3912 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3913 * server.c (visit_actioned_threads, handle_pending_status): New
3914 function.
3915 (handle_v_cont): Factor out parts to ...
3916 (resume): ... this new function. If in all-stop, and a thread
3917 being resumed has a pending status, report it without actually
3918 resuming.
3919 (myresume): Adjust to use the new 'resume' function.
3920 (clear_pending_status_callback, set_pending_status_callback)
3921 (find_status_pending_thread_callback): New functions.
3922 (handle_status): Handle the case of multiple threads having
3923 interesting statuses to report. Report threads' real last signal
3924 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3925 with an interesting thread to report the status for, instead of
3926 always reporting the status of the first thread.
3927
3928 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3929
3930 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3931 * gdbreplay.c (gdbreplay_version): Likewise.
3932
3933 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3934
3935 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3936 iov.iov_len with the real length in use.
3937
3938 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3939
3940 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3941 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3942 for all targets that use win32-low.c.
3943 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3944 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3945
3946 2013-12-13 Pedro Alves <palves@redhat.com>
3947
3948 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3949 if equal to TARGET_WAITKIND_LOADED.
3950 * win32-low.c (cached_status): New static global.
3951 (win32_wait): Add declaration.
3952 (do_initial_child_stuff): Flush all initial pending debug events
3953 up to the initial breakpoint.
3954 (win32_wait): If CACHED_STATUS was set, return that instead
3955 of doing a real wait. Remove the code resuming the execution
3956 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3957 during the initial phase. Also remove the code changing
3958 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3959 TARGET_WAITKIND_STOPPED.
3960
3961 2013-12-11 Yao Qi <yao@codesourcery.com>
3962
3963 * notif.c (handle_notif_ack): Return 0 if no notification
3964 matches.
3965
3966 2013-11-20 Doug Evans <dje@google.com>
3967
3968 * linux-low.c (linux_set_resume_request): Fix comment.
3969
3970 2013-11-20 Doug Evans <dje@google.com>
3971
3972 * linux-low.c (resume_status_pending_p): Tweak comment.
3973
3974 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3975
3976 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3977 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3978 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3979 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3980 (srv_amd64_regobj): Add amd64-mpx.o.
3981 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3982 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3983 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3984 * i387-fp.c (num_pl_bnd_register) Added constant.
3985 (num_pl_bnd_cfg_registers) Added constant.
3986 (struct i387_xsave) Added reserved area and MPX fields.
3987 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3988 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3989 function.
3990 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3991 (init_registers_amd64_mpx_linux): Declare new function.
3992 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3993 (x86_64_regmap): Add MPX registers.
3994 (x86_linux_read_description): Add MPX case.
3995 (initialize_low_arch): Initialize MPX targets.
3996
3997 2013-11-18 Tom Tromey <tromey@redhat.com>
3998
3999 * configure: Rebuild.
4000 * configure.ac: Don't check for stdlib.h.
4001 * gdbreplay.c: Unconditionally include stdlib.h.
4002
4003 2013-11-18 Tom Tromey <tromey@redhat.com>
4004
4005 * config.in: Rebuild.
4006 * configure: Rebuild.
4007 * configure.ac: Don't use AC_HEADER_DIRENT.
4008
4009 2013-11-18 Tom Tromey <tromey@redhat.com>
4010
4011 * server.h: Don't check HAVE_STRING_H.
4012 * gdbreplay.c: Don't check HAVE_STRING_H.
4013 * configure: Rebuild.
4014
4015 2013-11-18 Tom Tromey <tromey@redhat.com>
4016
4017 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4018 LIBGNU.
4019
4020 2013-11-08 Tom Tromey <tromey@redhat.com>
4021
4022 * configure, config.in: Rebuild.
4023 * configure.ac: Remove unused configury.
4024
4025 2013-11-08 Tom Tromey <tromey@redhat.com>
4026
4027 * acinclude.m4: Include common.m4, codeset.m4.
4028 * configure, config.in: Rebuild.
4029 * configure.ac: Use GDB_AC_COMMON.
4030
4031 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4032
4033 * linux-s390-low.c (HWCAP_S390_TE): New define.
4034 (s390_arch_setup): Consider the TE field in the HWCAP for
4035 determining 'have_regset_tdb'.
4036
4037 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4038
4039 PR gdb/16014
4040 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4041 call to sizeof.
4042
4043 2013-10-02 Pedro Alves <palves@redhat.com>
4044
4045 * server.c (process_serial_event): Don't output "GDBserver
4046 exiting" if GDB is connected through stdio.
4047 * target.c (mywait): Likewise, be silent if GDB is connected
4048 through stdio.
4049
4050 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4051
4052 * lynx-low.c (lynx_add_threads_after_attach): New function.
4053 (lynx_attach): Remove call to add_thread. Add call to
4054 lynx_add_threads_after_attach instead.
4055
4056 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4057
4058 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4059 * config.in, configure: Regenerated.
4060
4061 2013-09-18 Yao Qi <yao@codesourcery.com>
4062
4063 PR server/15959
4064 * server.c (start_inferior): Clear 'resume_info'.
4065
4066 2013-09-16 Jiong Wang <jiwang@tilera.com>
4067
4068 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4069 for each register.
4070
4071 2013-09-16 Jiong Wang <jiwang@tilera.com>
4072
4073 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4074 linux-tile-low.o to srv_tgtobj.
4075
4076 2013-09-16 Will Newton <will.newton@linaro.org>
4077
4078 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4079 out regs.
4080
4081 2013-09-06 Pedro Alves <palves@redhat.com>
4082
4083 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4084 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4085 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4086 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4087 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4088 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4089
4090 2013-09-06 Pedro Alves <palves@redhat.com>
4091
4092 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4093 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4094
4095 2013-09-06 Pedro Alves <palves@redhat.com>
4096
4097 * linux-amd64-ipa.c: Include tracepoint.h.
4098 * linux-i386-ipa.c: Include tracepoint.h.
4099
4100 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4101
4102 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4103 (ps_get_thread_area): New function.
4104
4105 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4106
4107 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4108 (initialize_low_arch): Call init_registers_crisv32 rather than
4109 init_register_crisv32.
4110
4111 2013-09-05 Pedro Alves <palves@redhat.com>
4112
4113 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4114 to ...
4115 * hostio.h: ... this new file.
4116 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4117 win32-low.c: Include hostio.h.
4118
4119 2013-09-05 Pedro Alves <palves@redhat.com>
4120
4121 * server.h (gdb_client_data, handler_func, callback_handler_func)
4122 (delete_file_handler, add_file_handler, append_callback_event)
4123 (delete_callback_event, start_event_loop, initialize_event_loop):
4124 Move to event-loop.h and include it.
4125 * event-loop.h: New file.
4126
4127 2013-09-05 Pedro Alves <palves@redhat.com>
4128
4129 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4130 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4131 (loaded_dll, unloaded_dll): Move to ...
4132 * dll.h: ... this new file.
4133 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4134
4135 2013-09-05 Pedro Alves <palves@redhat.com>
4136
4137 * server.h (current_process, get_thread_process, all_processes)
4138 (add_inferior_to_list, for_each_inferior, current_inferior)
4139 (remove_inferior, add_process, remove_process, find_process_pid)
4140 (have_started_inferiors_p, have_attached_inferiors_p)
4141 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4142 (clear_inferiors, find_inferior, find_inferior_id)
4143 (inferior_target_data, set_inferior_target_data)
4144 (inferior_regcache_data, set_inferior_regcache_data): Move to
4145 inferiors.h, and include it.
4146 * inferiors.h: New file.
4147
4148 2013-09-05 Pedro Alves <palves@redhat.com>
4149
4150 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4151 Move ...
4152 * ax.h: ... here.
4153
4154 2013-09-05 Pedro Alves <palves@redhat.com>
4155
4156 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4157 tracepoint.h.
4158 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4159 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4160 (handle_tracepoint_general_set, handle_tracepoint_query)
4161 (tracepoint_finished_step, tracepoint_was_hit)
4162 (release_while_stepping_state_list, current_traceframe)
4163 (in_readonly_region, traceframe_read_mem)
4164 (fetch_traceframe_registers, traceframe_read_sdata)
4165 (traceframe_read_info, struct fast_tpoint_collect_status)
4166 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4167 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4168 (supply_fast_tracepoint_registers)
4169 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4170 (ipa_tdesc, claim_trampoline_space)
4171 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4172 (agent_mem_read, agent_get_trace_state_variable_value)
4173 (agent_set_trace_state_variable_value, agent_tsv_read)
4174 (agent_mem_read_string, get_raw_reg_func_addr)
4175 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4176 * tracepoint.h: ... this new file.
4177
4178 2013-09-05 Pedro Alves <palves@redhat.com>
4179
4180 * server.h (perror_with_name, error, fatal, warning, paddress)
4181 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4182 include it.
4183 * utils.h: New file.
4184
4185 2013-09-05 Pedro Alves <palves@redhat.com>
4186
4187 * server.h (remote_debug, noack_mode, transport_is_reliable)
4188 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4189 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4190 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4191 (write_enn, initialize_async_io, enable_async_io)
4192 (disable_async_io, check_remote_input_interrupt_request)
4193 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4194 (dead_thread_notify, prepare_resume_reply)
4195 (decode_address_to_semicolon, decode_address, decode_m_packet)
4196 (decode_M_packet, decode_X_packet, decode_xfer_write)
4197 (decode_search_memory_packet, unhexify, hexify)
4198 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4199 (look_up_one_symbol, relocate_instruction)
4200 (monitor_output): Move to remote-utils.h, and include it.
4201 * remote-utils.h: New file.
4202
4203 2013-09-05 Pedro Alves <palves@redhat.com>
4204
4205 * server.h (_): Delete.
4206
4207 2013-09-02 Pedro Alves <palves@redhat.com>
4208
4209 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4210 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4211 allocated.
4212 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4213
4214 2013-09-02 Pierre Muller <muller@sourceware.org>
4215
4216 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4217 or WriteProcessMemory complete successfully and handle
4218 ERROR_PARTIAL_COPY error.
4219
4220 2013-09-02 Pedro Alves <palves@redhat.com>
4221
4222 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4223 error instead of EIO.
4224
4225 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4226
4227 PR server/15604
4228 * linux-low.c: Include filestuff.h.
4229 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4230 * lynx-low.c: Include filestuff.h.
4231 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4232 * server.c: Include filestuff.h.
4233 (main): Call notice_open_fds.
4234 * spu-low.c: Include filestuff.h.
4235 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4236
4237 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4238
4239 * Makefile.in: Explain why ../target and ../nat are not
4240 listed as include file search paths.
4241 (linux-waitpid.o): New object file rule.
4242 * configure.srv (srv_native_linux_obj): New variable.
4243 Replace all occurrences of linux native object files with
4244 $srv_native_linux_obj.
4245 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4246 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4247 (linux_enable_event_reporting): Remove declaration.
4248 (my_waitpid): Moved to common/linux-waitpid.c.
4249 (linux_wait_for_event): Pass ptid when calling
4250 linux_enable_event_reporting.
4251 (linux_supports_tracefork_flag): Remove.
4252 (linux_enable_event_reporting): Likewise.
4253 (linux_tracefork_grandchild): Remove.
4254 (STACK_SIZE): Moved to common/linux-ptrace.c.
4255 (linux_tracefork_child): Remove.
4256 (linux_test_for_tracefork): Remove.
4257 (linux_look_up_symbols): Call linux_supports_traceclone.
4258 (initialize_low): Remove call to linux_test_for_tracefork.
4259 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4260 common/linux-ptrace.h.
4261 (PTRACE_TYPE_ARG4): Likewise.
4262 Include linux-ptrace.h.
4263
4264 2013-08-21 Pedro Alves <palves@redhat.com>
4265
4266 * config.in: Renegerate.
4267
4268 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4269
4270 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4271 (SFILES): Remove $(srcdir)/common/target-common.c and
4272 add $(srcdir)/target/waitstatus.c.
4273 (OBS): Remove target-common.o and add waitstatus.o.
4274 (server_h): Remove $(srcdir)/../common/target-common.h and
4275 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4276 and $(srcdir)/../target/waitstatus.h.
4277 (target-common.o): Remove.
4278 (waitstatus.o): New target object file.
4279 * target.h: Do not include target-common.h and
4280 include target/resume.h, target/wait.h and
4281 target/waitstatus.h.
4282
4283 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4284
4285 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4286 to PTRACE_TYPE_ARG3.
4287 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4288 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4289 PTRACE_TYPE_ARG4.
4290 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4291 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4292
4293 2013-07-27 Jie Zhang <jie@codesourcery.com>
4294 Daniel Jacobowitz <dan@codesourcery.com>
4295 Yao Qi <yao@codesourcery.com>
4296
4297 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4298 (mips-linux-watch.o): New rule.
4299 (mips_linux_watch_h): New variable.
4300 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4301 srv_tgtobj.
4302 * linux-mips-low.c: Include mips-linux-watch.h.
4303 (struct arch_process_info, struct arch_lwp_info): New.
4304 (update_watch_registers_callback): New function.
4305 (mips_linux_new_process, mips_linux_new_thread) New functions.
4306 (mips_linux_prepare_to_resume, mips_insert_point): New
4307 functions.
4308 (mips_remove_point, mips_stopped_by_watchpoint): New
4309 functions.
4310 (rsp_bp_type_to_target_hw_bp_type): New function.
4311 (mips_stopped_data_address): New function.
4312 (the_low_target): Add watchpoint support functions.
4313
4314 2013-07-27 Yao Qi <yao@codesourcery.com>
4315
4316 * i386-low.c: Include break-common.h.
4317 (enum target_hw_bp_type): Remove.
4318
4319 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4320
4321 * Makefile.in (SFILES): /common/target-common.c.
4322 (OBS): Add target-common.o.
4323 (server_h): Add $(srcdir)/../common/target-common.h.
4324 (target-common.o): New target.
4325 * server.c (queue_stop_reply_callback): Free
4326 status string after use.
4327 * target.c (target_waitstatus_to_string): Remove.
4328 * target.h: Include target-common.h.
4329 (resume_kind): Likewise.
4330 (target_waitkind): Likewise.
4331 (target_waitstatus): Likewise.
4332 (TARGET_WNOHANG): Likewise.
4333
4334 2013-07-04 Yao Qi <yao@codesourcery.com>
4335
4336 * Makefile.in (host_alias): Use @host_noncanonical@.
4337 (target_alias): Use @target_noncanonical@.
4338 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4339 ACX_NONCANONICAL_HOST.
4340 * configure: Regenerated.
4341
4342 Revert:
4343 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4344
4345 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4346 * configure: Rebuild.
4347 * Makefile.in (version_host, version_target): Get from configure.
4348 (version.c): Use $(version_host) and $(version_target).
4349
4350 2013-07-03 Pedro Alves <palves@redhat.com>
4351
4352 * Makefile.in (config.status): Depend on development.sh.
4353 * acinclude.m4: Include libmcheck.m4.
4354 * configure: Regenerate.
4355
4356 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4357
4358 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4359 attribute inside the parentheses.
4360 (winapi_DebugSetProcessKillOnExit): Ditto.
4361 (winapi_DebugBreakProcess): Ditto.
4362 (winapi_GenerateConsoleCtrlEvent): Ditto.
4363
4364 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4365
4366 * notif.h (notif_event): Add a dummy member to avoid compiler
4367 errors.
4368
4369 2013-07-01 Pedro Alves <palves@redhat.com>
4370
4371 * hostio.c (HOSTIO_PATH_MAX): Define.
4372 (require_filename, handle_open, handle_unlink, handle_readlink):
4373 Use it.
4374
4375 2013-07-01 Pedro Alves <palves@redhat.com>
4376
4377 * server.h: Include "pathmax.h".
4378 * linux-low.c: Don't include sys/param.h.
4379 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4380 MAXPATHLEN.
4381 * win32-low.c: Don't include sys/param.h.
4382 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4383
4384 2013-07-01 Pedro Alves <palves@redhat.com>
4385
4386 * event-loop.c: Don't check HAVE_UNISTD_H before including
4387 <unistd.h>.
4388 * gdbreplay.c: Likewise.
4389 * remote-utils.c: Likewise.
4390 * server.c: Likewise.
4391 * configure.ac: Don't check for unistd.h.
4392 * configure: Regenerate.
4393
4394 2013-06-28 Tom Tromey <tromey@redhat.com>
4395
4396 * Makefile.in (version.c): Use version.in, not
4397 common/version.in.
4398
4399 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4400
4401 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4402 * configure: Rebuild.
4403 * Makefile.in (version_host, version_target): Get from configure.
4404 (version.c): Use $(version_host) and $(version_target).
4405
4406 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4407
4408 Fix trace-status to output user name without trailing colon.
4409 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4410
4411 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4412
4413 Fix trace-status to output proper start-time and stop-time.
4414 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4415 output start time and stop time in hex as gdb expects.
4416
4417 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4418
4419 * tracepoint.c (build_traceframe_info_xml): Output trace state
4420 variables present in the trace buffer.
4421
4422 2013-06-24 Tom Tromey <tromey@redhat.com>
4423
4424 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4425 create-version.sh.
4426 (version.o): Remove.
4427 * gdbreplay.c: Include version.h.
4428 (version, host_name): Don't declare.
4429 * server.h: Include version.h.
4430 (version, host_name): Don't declare.
4431
4432 2013-06-12 Pedro Alves <palves@redhat.com>
4433
4434 * linux-x86-low.c (linux_is_elf64): Delete global.
4435 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4436 with local linux_pid_exe_is_elf_64_file use.
4437
4438 2013-06-11 Pedro Alves <palves@redhat.com>
4439
4440 * linux-low.c (regset_disabled, disable_regset): New functions.
4441 (regsets_fetch_inferior_registers)
4442 (regsets_store_inferior_registers): Use them.
4443 (initialize_regsets_info); Don't allocate the disabled_regsets
4444 array here.
4445 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4446 comment.
4447
4448 2013-06-11 Pedro Alves <palves@redhat.com>
4449
4450 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4451 xmalloc.
4452
4453 2013-06-11 Pedro Alves <palves@redhat.com>
4454
4455 * linux-x86-low.c (initialize_low_arch): Call
4456 init_registers_x32_avx_linux.
4457
4458 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4459
4460 Fix compatibility with Android Bionic.
4461 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4462 it is not empty.
4463
4464 2013-06-07 Pedro Alves <palves@redhat.com>
4465
4466 PR server/14823
4467 * Makefile.in (OBS): Add tdesc.o.
4468 (IPA_OBJS): Add tdesc-ipa.o.
4469 (tdesc-ipa.o): New rule.
4470 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4471 interface.
4472 * linux-low.c (new_inferior): Delete.
4473 (disabled_regsets, num_regsets): Delete.
4474 (linux_add_process): Adjust to set the new per-process
4475 new_inferior flag.
4476 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4477 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4478 was a stop. When calling arch_setup, switch the current inferior
4479 to the thread that got an event.
4480 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4481 (regsets_fetch_inferior_registers)
4482 (regsets_store_inferior_registers): New regsets_info parameter.
4483 Adjust to use it.
4484 (linux_register_in_regsets): New regs_info parameter. Adjust to
4485 use it.
4486 (register_addr, fetch_register, store_register): New usrregs_info
4487 parameter. Adjust to use it.
4488 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4489 parameter regs_info. Adjust to use it.
4490 (linux_fetch_registers): Get the current inferior's regs_info, and
4491 adjust to use it.
4492 (linux_store_registers): Ditto.
4493 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4494 (initialize_low): Don't initialize the target_regsets here. Call
4495 initialize_low_arch.
4496 * linux-low.h (target_regsets): Delete declaration.
4497 (struct regsets_info): New.
4498 (struct usrregs_info): New.
4499 (struct regs_info): New.
4500 (struct process_info_private) <new_inferior>: New field.
4501 (struct linux_target_ops): Delete the num_regs, regmap, and
4502 regset_bitmap fields. New field regs_info.
4503 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4504 * i387-fp.c (num_xmm_registers): Delete.
4505 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4506 calls to new interface.
4507 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4508 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4509 Infer the number of xmm registers from the regcache's target
4510 description.
4511 * i387-fp.h (num_xmm_registers): Delete.
4512 * inferiors.c (add_thread): Don't install the thread's regcache
4513 here.
4514 * proc-service.c (gregset_info): Fetch the current inferior's
4515 regs_info. Adjust to use it.
4516 * regcache.c: Include tdesc.h.
4517 (register_bytes, reg_defs, num_registers)
4518 (gdbserver_expedite_regs): Delete.
4519 (get_thread_regcache): If the thread doesn't have a regcache yet,
4520 create one, instead of aborting gdbserver.
4521 (regcache_invalidate_one): Rename to ...
4522 (regcache_invalidate_thread): ... this.
4523 (regcache_invalidate_one): New.
4524 (regcache_invalidate): Only invalidate registers of the current
4525 process.
4526 (init_register_cache): Add target_desc parameter, and use it.
4527 (new_register_cache): Ditto. Assert the target description has a
4528 non zero registers_size.
4529 (regcache_cpy): Add assertions. Adjust.
4530 (realloc_register_cache, set_register_cache): Delete.
4531 (registers_to_string, registers_from_string): Adjust.
4532 (find_register_by_name, find_regno, find_register_by_number)
4533 (register_cache_size): Add target_desc parameter, and use it.
4534 (free_register_cache_thread, free_register_cache_thread_one)
4535 (regcache_release, register_cache_size): New.
4536 (register_size): Add target_desc parameter, and use it.
4537 (register_data, supply_register, supply_register_zeroed)
4538 (supply_regblock, supply_register_by_name, collect_register)
4539 (collect_register_as_string, collect_register_by_name): Adjust.
4540 * regcache.h (struct target_desc): Forward declare.
4541 (struct regcache) <tdesc>: New field.
4542 (init_register_cache, new_register_cache): Add target_desc
4543 parameter.
4544 (regcache_invalidate_thread): Declare.
4545 (regcache_invalidate_one): Delete declaration.
4546 (regcache_release): Declare.
4547 (find_register_by_number, register_cache_size, register_size)
4548 (find_regno): Add target_desc parameter.
4549 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4550 declarations.
4551 * remote-utils.c: Include tdesc.h.
4552 (outreg, prepare_resume_reply): Adjust.
4553 * server.c: Include tdesc.h.
4554 (gdbserver_xmltarget): Delete declaration.
4555 (get_features_xml, process_serial_event): Adjust.
4556 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4557 declare.
4558 (struct process_info) <tdesc>: New field.
4559 (ipa_tdesc): Declare.
4560 * tdesc.c: New file.
4561 * tdesc.h: New file.
4562 * tracepoint.c: Include tdesc.h.
4563 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4564 (get_context_regcache): Adjust to pass ipa_tdesc down.
4565 (do_action_at_tracepoint): Adjust to get the register cache size
4566 from the context regcache's description.
4567 (traceframe_walk_blocks): Adjust to get the register cache size
4568 from the current trace frame's description.
4569 (traceframe_get_pc): Adjust to get current trace frame's
4570 description and pass it down.
4571 (gdb_collect): Adjust to get the register cache size from the
4572 IPA's description.
4573 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4574 (gdbserver_xmltarget): Delete.
4575 (initialize_low_tracepoint): Set the ipa's target description.
4576 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4577 (initialize_low_tracepoint): Set the ipa's target description.
4578 * linux-x86-low.c: Include tdesc.h.
4579 [__x86_64__] (is_64bit_tdesc): New.
4580 (ps_get_thread_area, x86_get_thread_area): Use it.
4581 (i386_cannot_store_register): Rename to ...
4582 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4583 (i386_cannot_fetch_register): Rename to ...
4584 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4585 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4586 to new interface.
4587 (target_regsets): Rename to ...
4588 (x86_regsets): ... this.
4589 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4590 interface.
4591 (x86_siginfo_fixup): Use is_64bit_tdesc.
4592 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4593 (tdesc_x32_avx_linux, tdesc_x32_linux)
4594 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4595 Declare.
4596 (x86_linux_update_xmltarget): Delete.
4597 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4598 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4599 (AMD64_LINUX_USER64_CS): New.
4600 (x86_linux_read_description): New, based on
4601 x86_linux_update_xmltarget.
4602 (same_process_callback): New.
4603 (x86_arch_setup_process_callback): New.
4604 (x86_linux_update_xmltarget): New.
4605 (x86_regsets_info): New.
4606 (amd64_linux_regs_info): New.
4607 (i386_linux_usrregs_info): New.
4608 (i386_linux_regs_info): New.
4609 (x86_linux_regs_info): New.
4610 (x86_arch_setup): Reimplement.
4611 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4612 (x86_emit_ops): Ditto.
4613 (the_low_target): Adjust. Install x86_linux_regs_info,
4614 x86_cannot_fetch_register, and x86_cannot_store_register.
4615 (initialize_low_arch): New.
4616 * linux-ia64-low.c (tdesc_ia64): Declare.
4617 (ia64_fetch_register): Adjust.
4618 (ia64_usrregs_info, regs_info): New globals.
4619 (ia64_regs_info): New function.
4620 (the_low_target): Adjust.
4621 (initialize_low_arch): New function.
4622 * linux-sparc-low.c (tdesc_sparc64): Declare.
4623 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4624 Adjust.
4625 (sparc_arch_setup): New function.
4626 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4627 (the_low_target): Adjust.
4628 (initialize_low_arch): New function.
4629 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4630 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4631 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4632 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4633 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4634 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4635 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4636 (tdesc_powerpc_isa205_vsx64l): Declare.
4637 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4638 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4639 (ppc_set_pc, ppc_get_hwcap): Adjust.
4640 (ppc_usrregs_info): Forward declare.
4641 (!__powerpc64__) ppc_regmap_adjusted: New global.
4642 (ppc_arch_setup): Adjust to the current process'es target
4643 description.
4644 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4645 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4646 (ppc_store_evrregset): Adjust.
4647 (target_regsets): Rename to ...
4648 (ppc_regsets): ... this, and make static.
4649 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4650 (ppc_regs_info): New function.
4651 (the_low_target): Adjust.
4652 (initialize_low_arch): New function.
4653 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4654 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4655 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4656 (tdesc_s390x_linux64v2): Declare.
4657 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4658 (s390_fill_gregset, s390_store_last_break): Adjust.
4659 (target_regsets): Rename to ...
4660 (s390_regsets): ... this, and make static.
4661 (s390_get_pc, s390_set_pc): Adjust.
4662 (s390_get_hwcap): New target_desc parameter, and use it.
4663 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4664 (s390_arch_setup): Adjust to set the current process'es target
4665 description. Don't adjust the regmap.
4666 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4667 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4668 (regs_info_3264): New globals.
4669 (s390_regs_info): New function.
4670 (the_low_target): Adjust.
4671 (initialize_low_arch): New function.
4672 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4673 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4674 [__mips64] (init_registers_mips_linux)
4675 (init_registers_mips_dsp_linux): Delete defines.
4676 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4677 (have_dsp): New global.
4678 (mips_read_description): New, based on mips_arch_setup.
4679 (mips_arch_setup): Reimplement.
4680 (get_usrregs_info): New function.
4681 (mips_cannot_fetch_register, mips_cannot_store_register)
4682 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4683 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4684 (target_regsets): Rename to ...
4685 (mips_regsets): ... this, and make static.
4686 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4687 (dsp_regs_info, regs_info): New globals.
4688 (mips_regs_info): New function.
4689 (the_low_target): Adjust.
4690 (initialize_low_arch): New function.
4691 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4692 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4693 Declare.
4694 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4695 (arm_read_description): New, with bits factored from
4696 arm_arch_setup.
4697 (arm_arch_setup): Reimplement.
4698 (target_regsets): Rename to ...
4699 (arm_regsets): ... this, and make static.
4700 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4701 (arm_regs_info): New function.
4702 (the_low_target): Adjust.
4703 (initialize_low_arch): New function.
4704 * linux-m68k-low.c (tdesc_m68k): Declare.
4705 (target_regsets): Rename to ...
4706 (m68k_regsets): ... this, and make static.
4707 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4708 (m68k_regs_info): New function.
4709 (m68k_arch_setup): New function.
4710 (the_low_target): Adjust.
4711 (initialize_low_arch): New function.
4712 * linux-sh-low.c (tdesc_sharch): Declare.
4713 (target_regsets): Rename to ...
4714 (sh_regsets): ... this, and make static.
4715 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4716 (sh_regs_info, sh_arch_setup): New functions.
4717 (the_low_target): Adjust.
4718 (initialize_low_arch): New function.
4719 * linux-bfin-low.c (tdesc_bfin): Declare.
4720 (bfin_arch_setup): New function.
4721 (bfin_usrregs_info, regs_info): New globals.
4722 (bfin_regs_info): New function.
4723 (the_low_target): Adjust.
4724 (initialize_low_arch): New function.
4725 * linux-cris-low.c (tdesc_cris): Declare.
4726 (cris_arch_setup): New function.
4727 (cris_usrregs_info, regs_info): New globals.
4728 (cris_regs_info): New function.
4729 (the_low_target): Adjust.
4730 (initialize_low_arch): New function.
4731 * linux-cris-low.c (tdesc_crisv32): Declare.
4732 (cris_arch_setup): New function.
4733 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4734 (cris_regs_info): New function.
4735 (the_low_target): Adjust.
4736 (initialize_low_arch): New function.
4737 * linux-m32r-low.c (tdesc_m32r): Declare.
4738 (m32r_arch_setup): New function.
4739 (m32r_usrregs_info, regs_info): New globals.
4740 (m32r_regs_info): Adjust.
4741 (initialize_low_arch): New function.
4742 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4743 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4744 (tic6x_usrregs_info): Forward declare.
4745 (tic6x_read_description): New function, based on ...
4746 (tic6x_arch_setup): ... this. Reimplement.
4747 (target_regsets): Rename to ...
4748 (tic6x_regsets): ... this, and make static.
4749 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4750 (tic6x_regs_info): New function.
4751 (the_low_target): Adjust.
4752 (initialize_low_arch): New function.
4753 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4754 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4755 (target_regsets): Rename to ...
4756 (xtensa_regsets): ... this, and make static.
4757 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4758 globals.
4759 (xtensa_arch_setup, xtensa_regs_info): New functions.
4760 (the_low_target): Adjust.
4761 (initialize_low_arch): New function.
4762 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4763 (nios2_arch_setup): Set the current process'es tdesc.
4764 (target_regsets): Rename to ...
4765 (nios2_regsets): ... this.
4766 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4767 (nios2_regs_info): New function.
4768 (the_low_target): Adjust.
4769 (initialize_low_arch): New function.
4770 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4771 (aarch64_arch_setup): Set the current process'es tdesc.
4772 (target_regsets): Rename to ...
4773 (aarch64_regsets): ... this.
4774 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4775 (aarch64_regs_info): New function.
4776 (the_low_target): Adjust.
4777 (initialize_low_arch): New function.
4778 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4779 globals.
4780 (target_regsets): Rename to ...
4781 (tile_regsets): ... this.
4782 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4783 (tile_regs_info): New function.
4784 (tile_arch_setup): Set the current process'es tdesc.
4785 (the_low_target): Adjust.
4786 (initialize_low_arch): New function.
4787 * spu-low.c (tdesc_spu): Declare.
4788 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4789 * win32-arm-low.c (tdesc_arm): Declare.
4790 (arm_arch_setup): New function.
4791 (the_low_target): Install arm_arch_setup instead of
4792 init_registers_arm.
4793 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4794 (init_windows_x86): Rename to ...
4795 (i386_arch_setup): ... this. Set `win32_tdesc'.
4796 (the_low_target): Adjust.
4797 * win32-low.c (win32_tdesc): New global.
4798 (child_add_thread): Don't create the thread cache here.
4799 (do_initial_child_stuff): Set the new process'es tdesc.
4800 * win32-low.h (struct target_desc): Forward declare.
4801 (win32_tdesc): Declare.
4802 * lynx-i386-low.c (tdesc_i386): Declare global.
4803 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4804 * lynx-low.c (lynx_tdesc): New global.
4805 (lynx_add_process): Set the new process'es tdesc.
4806 * lynx-low.h (struct target_desc): Forward declare.
4807 (lynx_tdesc): Declare global.
4808 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4809 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4810 * nto-low.c (nto_tdesc): New global.
4811 (do_attach): Set the new process'es tdesc.
4812 * nto-low.h (struct target_desc): Forward declare.
4813 (nto_tdesc): Declare.
4814 * nto-x86-low.c (tdesc_i386): Declare.
4815 (nto_x86_arch_setup): Set `nto_tdesc'.
4816
4817 2013-06-04 Gary Benson <gbenson@redhat.com>
4818
4819 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4820 to qSupported response when appropriate.
4821 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4822 with nonzero-length annex.
4823 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4824 arguments supplied in annex.
4825
4826 2013-05-31 Doug Evans <dje@google.com>
4827
4828 PR server/15594
4829 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4830 64 bits in 64-cross-32 environment.
4831
4832 2013-05-28 Pedro Alves <palves@redhat.com>
4833
4834 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4835 (aarch64-without-fpu.c): Delete rule.
4836 * configure.srv (aarch64*-*-linux*): Remove references to
4837 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4838 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4839 declaration.
4840
4841 2013-05-24 Pedro Alves <palves@redhat.com>
4842
4843 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4844 instead of strchr/decode_address. Error if the range isn't split
4845 with a ','. Don't assume there's be a ':' in the action.
4846
4847 2013-05-23 Yao Qi <yao@codesourcery.com>
4848 Pedro Alves <palves@redhat.com>
4849
4850 * linux-low.c (lwp_in_step_range): New function.
4851 (linux_wait_1): If the thread was range stepping and stopped
4852 outside the stepping range, report the stop to GDB. Otherwise,
4853 continue stepping. Add range stepping debug output.
4854 (linux_set_resume_request): Copy the step range from the resume
4855 request to the lwp.
4856 (linux_supports_range_stepping): New.
4857 (linux_target_ops) <supports_range_stepping>: Set to
4858 linux_supports_range_stepping.
4859 * linux-low.h (struct linux_target_ops)
4860 <supports_range_stepping>: New field.
4861 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4862 * linux-x86-low.c (x86_supports_range_stepping): New.
4863 (the_low_target) <supports_range_stepping>: Set to
4864 x86_supports_range_stepping.
4865 * server.c (handle_v_cont): Handle 'r' action.
4866 (handle_v_requests): Append ";r" if the target supports range
4867 stepping.
4868 * target.h (struct thread_resume) <step_range_start,
4869 step_range_end>: New fields.
4870 (struct target_ops) <supports_range_stepping>:
4871 New field.
4872 (target_supports_range_stepping): New macro.
4873
4874 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4875
4876 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4877 confusion in comment.
4878
4879 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4880
4881 * lynx-low.c (struct process_info_private): New type.
4882 (lynx_add_process): New function.
4883 (lynx_create_inferior, lynx_attach): Replace calls to
4884 add_process by calls to lynx_add_process.
4885 (lynx_resume): If PTID is null, then try using
4886 current_process()->private->last_wait_event_ptid.
4887 Add comments.
4888 (lynx_clear_inferiors): Delete. The contents of that function
4889 has been inlined in lynx_mourn;
4890 (lynx_wait_1): Save the ptid in the process's private data.
4891 (lynx_mourn): Free the process' private data. Replace call
4892 to lynx_clear_inferiors by call to clear_inferiors.
4893
4894 2013-05-17 Yao Qi <yao@codesourcery.com>
4895
4896 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4897 the right place.
4898
4899 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4900
4901 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4902 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4903 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4904 PT_TEXT_END_ADDR guards. Update comments.
4905 (linux_target_op) <read_offsets>: Conditionally define to
4906 linux_read_offsets if the target is UCLIBC and if it defines
4907 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4908
4909 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4910 Andrew Jenner <andrew@codesourcery.com>
4911
4912 * Makefile.in (SFILES): Add linux-nios2-low.c.
4913 (clean): Add action to delete nios2-linux.c.
4914 (nios2-linux.c): New rule.
4915 * configure.srv: Add nios2*-*-linux*.
4916 * linux-nios2-low.c: New.
4917
4918 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4919
4920 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4921
4922 2013-04-25 Hui Zhu <hui@codesourcery.com>
4923
4924 PR gdb/15186
4925 * ax.c (ax_printf): Add fflush.
4926
4927 2013-04-22 Tom Tromey <tromey@redhat.com>
4928
4929 * Makefile.in (SFILES): Add filestuff.c.
4930 (OBS): Add filestuff.o.
4931 (filestuff.o): New target.
4932 * config.in, configure: Rebuild.
4933 * configure.ac: Check for fdwalk, pipe2.
4934
4935 2013-04-17 Pedro Alves <palves@redhat.com>
4936
4937 * configure.ac (USE_THREAD_DB): Delete variable.
4938 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4939 Don't AC_SUBST USE_THREAD_DB.
4940 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4941 * config.in, configure: Regenerate.
4942
4943 2013-04-16 Pedro Alves <palves@redhat.com>
4944
4945 * linux-low.h (struct lwp_info) <thread_known>: Move under
4946 the USE_THREAD_DB #ifdef.
4947
4948 2013-04-16 Pedro Alves <palves@redhat.com>
4949
4950 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4951 (linux-low.o): Delete rule.
4952 * linux-low.h: Always include "gdb_thread_db.h" instead of
4953 conditionally including thread_db.h.
4954 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4955 HAVE_THREAD_DB_H.
4956
4957 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4958
4959 * Makefile.in (install-only): Fix make install regression.
4960
4961 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4962
4963 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4964 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4965 installation.
4966 * gdbserver.1: Remove.
4967
4968 2013-03-22 Pedro Alves <palves@redhat.com>
4969
4970 * linux-low.c (handle_extended_wait): Don't call
4971 linux_enable_event_reporting.
4972
4973 2013-03-15 Tony Theodore <tonyt@logyst.com>
4974
4975 PR build/9098:
4976 * Makefile.in (SHELL): Use @SHELL@.
4977
4978 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4979
4980 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4981 compiler warning.
4982
4983 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4984
4985 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4986 Remove extraneous NULL element.
4987
4988 2013-03-13 Yao Qi <yao@codesourcery.com>
4989
4990 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4991 'V' block in trace frame.
4992
4993 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4994
4995 * target.h (struct target_ops): Add btrace ops.
4996 (target_supports_btrace): New macro.
4997 (target_enable_btrace): New macro.
4998 (target_disable_btrace): New macro.
4999 (target_read_btrace): New macro.
5000 * gdbthread.h (struct thread_info): Add btrace field.
5001 * server.c: Include btrace-common.h.
5002 (handle_btrace_general_set): New function.
5003 (handle_btrace_enable): New function.
5004 (handle_btrace_disable): New function.
5005 (handle_general_set): Call handle_btrace_general_set.
5006 (handle_qxfer_btrace): New function.
5007 (struct qxfer qxfer_packets[]): Add btrace entry.
5008 * inferiors.c (remove_thread): Disable btrace.
5009 * linux-low: Include linux-btrace.h.
5010 (linux_low_enable_btrace): New function.
5011 (linux_low_read_btrace): New function.
5012 (linux_target_ops): Add btrace ops.
5013 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
5014 Add srv_linux_btrace=yes.
5015 (x86_64-*-linux*): Add linux-btrace.o.
5016 Add srv_linux_btrace=yes.
5017 * configure.ac: Define HAVE_LINUX_BTRACE.
5018 * config.in: Regenerated.
5019 * configure: Regenerated.
5020
5021 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5022
5023 * server.c (handle_qxfer): Preserve error message if -3 is
5024 returned.
5025 (qxfer): Document the -3 return value.
5026
5027 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5028
5029 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5030 (linux_btrace_h): New variable.
5031 (linux-btrace.o): New rule.
5032
5033 2013-03-08 Stan Shebs <stan@codesourcery.com>
5034 Hafiz Abid Qadeer <abidh@codesourcery.com>
5035
5036 * tracepoint.c (trace_buffer_size): New global.
5037 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5038 (init_trace_buffer): Change to one-argument function. Allocate
5039 trace buffer memory.
5040 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5041 handle QTBuffer:size packet.
5042 (cmd_bigqtbuffer_size): New function.
5043 (initialize_tracepoint): Call init_trace_buffer with
5044 DEFAULT_TRACE_BUFFER_SIZE.
5045 * server.c (handle_query): Add QTBuffer:size in the
5046 supported packets.
5047
5048 2013-03-07 Yao Qi <yao@codesourcery.com>
5049
5050 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5051 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5052 of -1.
5053 (cmd_qtsp): Adjust condition. Do post increment.
5054 Set cur_action and cur_step_action back to 0.
5055
5056 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5057
5058 PR server/15236
5059 * linux-low.c (linux_write_memory): Return early success if LEN is
5060 zero.
5061
5062 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5063
5064 * configure.srv: Add x86_64-*-cygwin* as target.
5065
5066 2013-02-28 Tom Tromey <tromey@redhat.com>
5067
5068 * configure.ac: Invoke AC_SYS_LARGEFILE.
5069 * configure, config.in: Rebuild.
5070
5071 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5072
5073 * win32-low.c: Throughout, fix format strings and casts of
5074 printf-like functions to avoid type related warnings on all
5075 platforms.
5076 (get_child_debug_event): Print dwDebugEventCode as hex since
5077 that's how it's usually documented.
5078
5079 2013-02-28 Yao Qi <yao@codesourcery.com>
5080
5081 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5082 pulongest.
5083
5084 2013-02-27 Jiong Wang <jiwang@tilera.com>
5085
5086 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5087 (reg-tilegx32.c): New rule.
5088 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5089 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5090 different register info initializer according to elf class.
5091 (init_registers_tilgx32): New function. The tilegx32 register info
5092 initializer.
5093 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5094 (tile_store_gregset): Likewise.
5095
5096 2013-02-27 Yao Qi <yao@codesourcery.com>
5097
5098 * server.c (process_point_options): Print debug message when
5099 debug_threads is true.
5100
5101 2013-02-26 Yao Qi <yao@codesourcery.com>
5102
5103 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5104
5105 2013-02-19 Pedro Alves <palves@redhat.com>
5106 Kai Tietz <ktietz@redhat.com>
5107
5108 PR gdb/15161
5109
5110 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5111 instead of strtoul to extract address from packet.
5112 (process_serial_event) <'z'>: Likewise.
5113
5114 2013-02-18 Yao Qi <yao@codesourcery.com>
5115
5116 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5117
5118 2013-02-14 Pedro Alves <palves@redhat.com>
5119
5120 Plug memory leak.
5121
5122 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5123 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5124
5125 2013-02-14 Pedro Alves <palves@redhat.com>
5126
5127 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5128
5129 2013-02-14 Pedro Alves <palves@redhat.com>
5130
5131 * tracepoint.c (save_string): Delete.
5132 (add_tracepoint_action): Use savestring instead of save_string.
5133
5134 2013-02-12 Pedro Alves <palves@redhat.com>
5135
5136 * linux-xtensa-low.c: Ditto.
5137 * xtensa-xtregs.c: Ditto.
5138
5139 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5140
5141 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5142 thread_db.
5143
5144 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5145
5146 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5147 aarch64_num_wp_regs and aarch64_num_bp_regs to
5148 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5149
5150 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5151
5152 * linux-aarch64-low.c (ps_get_thread_area): Replace
5153 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5154
5155 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5156 Marcus Shawcroft <marcus.shawcroft@arm.com>
5157 Nigel Stephens <nigel.stephens@arm.com>
5158 Yufeng Zhang <yufeng.zhang@arm.com>
5159
5160 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5161 (aarch64.c, aarch64-without-fpu.c): New targets.
5162 * configure.srv (aarch64*-*-linux*): New.
5163 * linux-aarch64-low.c: New file.
5164
5165 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5166
5167 * linux-low.c (handle_extended_wait, linux_create_inferior)
5168 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5169 (dequeue_one_deferred_signal, linux_resume_one_thread)
5170 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5171 (linux_tracefork_grandchild, linux_test_for_tracefork)
5172 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5173 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5174 where the argument is 0.
5175
5176 2013-01-25 Yao Qi <yao@codesourcery.com>
5177
5178 * event-loop.c: Include "queue.h".
5179 (gdb_event_p): New typedef.
5180 (struct gdb_event) <next_event>: Remove.
5181 (event_queue): Change to QUEUE(gdb_event_p).
5182 (async_queue_event): Remove.
5183 (gdb_event_xfree): New.
5184 (initialize_event_loop): New.
5185 (process_event): Use API from QUEUE.
5186 (wait_for_event): Likewise.
5187 * server.c (main): Call initialize_event_loop.
5188 * server.h (initialize_event_loop): Declare.
5189
5190 2013-01-18 Yao Qi <yao@codesourcery.com>
5191
5192 * ax.h (struct eval_agent_expr_context): New.
5193 (gdb_eval_agent_expr): Update declaration.
5194 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5195 TFRAME. Add new argument CTX.
5196 * server.h (struct eval_agent_expr_context): Declare.
5197 (agent_mem_read, agent_tsv_read): Update declaration.
5198 (agent_mem_read_string): Likewise.
5199 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5200 (add_traceframe_block): Add new argument TPOINT.
5201 Increase TPOINT->traceframe_usage.
5202 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5203 eval_tracepoint_agent_expr.
5204 (condition_true_at_tracepoint): Likewise.
5205 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5206 (agent_mem_read_string, agent_tsv_read): Likewise.
5207
5208 2013-01-16 Yao Qi <yao@codesourcery.com>
5209
5210 * linux-low.c (linux_resume_one_lwp): Don't check
5211 'lwp->bp_reinsert != 0'.
5212
5213 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5214 Pedro Alves <palves@redhat.com>
5215
5216 * lynx-low.c (ptrace_request_to_str): Define a temporary
5217 macro and use it to simplify this function's implementation.
5218
5219 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5220
5221 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5222 sets errno.
5223
5224 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5225
5226 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5227
5228 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5229
5230 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5231
5232 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5233
5234 * lynx-low.c (lynx_resume): Use the resume_info parameter
5235 to determine the ptid for the lynx_ptrace call, unless
5236 it is equal to minus_one_ptid, in which case we use the
5237 ptid of the current_inferior.
5238 (lynx_wait_1): After having received a thread create/exit
5239 event, resume the inferior's execution using the signaling
5240 thread's ptid, rather than the old ptid.
5241
5242 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5243
5244 * lynx-low.c (lynx_resume): Delete variable ret.
5245
5246 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5247
5248 * gdbreplay.c (gdbreplay_version): Update copyright year.
5249 * server.c (gdbserver_version): Likewise.
5250
5251 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5252
5253 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5254 new thread.
5255
5256 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5257
5258 * lynx-low.c (ptrace_request_to_str): Add handling for
5259 PTRACE_GETTRACESIG.
5260
5261 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5262
5263 * lynx-low.c (lynx_attach): Delete variable new_process.
5264
5265 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5266
5267 * lynx-low.c (lynx_create_inferior): Delete variable
5268 new_process.
5269
5270 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5271
5272 * lynx-low.c (ptrace_request_to_str): Do not handle
5273 PTRACE_GETTHREADLIST if this macro does not exist.
5274
5275 2012-12-15 Yao Qi <yao@codesourcery.com>
5276
5277 * Makefile.in (OBS): Add notif.o.
5278 * notif.c, notif.h: New.
5279 * server.c: Include "notif.h".
5280 (struct vstop_notif) <next>: Remove.
5281 <base>: New field.
5282 (queue_stop_reply): Update.
5283 (push_event, send_next_stop_reply): Remove.
5284 (discard_queued_stop_replies): Update.
5285 (notif_stop): New variable.
5286 (handle_v_stopped): Remove.
5287 (handle_v_requests): Don't call handle_v_stopped. Call
5288 handle_ack_notif instead.
5289 (queue_stop_reply_callback): Call notif_event_enque instead
5290 of queue_stop_reply.
5291 (handle_status): Don't call send_next_stop_reply, call
5292 notif_write_event instead.
5293 (kill_inferior_callback): Likewise.
5294 (detach_or_kill_inferior_callback): Likewise.
5295 (main): Call initialize_notif.
5296 (process_serial_event): Call QUEUE_is_empty.
5297 (handle_target_event): Call notif_push instead of push event.
5298 * server.h (push_event): Remove declaration.
5299
5300 2012-12-10 Tom Tromey <tromey@redhat.com>
5301
5302 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5303 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5304 macros.
5305 (.c.o): Rewrite.
5306 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5307 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5308 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5309 (amd64-linux-ipa.o, ax.o): Rewrite.
5310 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5311 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5312 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5313 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5314 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5315 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5316 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5317 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5318 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5319 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5320 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5321 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5322 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5323 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5324 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5325 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5326 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5327 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5328 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5329 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5330 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5331 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5332 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5333 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5334 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5335 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5336 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5337 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5338 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5339 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5340 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5341 (reg-tilegx.o): Remove.
5342 (all_object_files): New macro.
5343 Include .deps files.
5344 * aclocal.m4, configure: Rebuild.
5345 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5346 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5347 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5348
5349 2012-12-05 Tom Tromey <tromey@redhat.com>
5350
5351 PR gdb/14917:
5352 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5353
5354 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5355
5356 * configure.ac: Check for linux/perf_event.h.
5357 * config.in: Regenerated.
5358 * configure: Regenerated.
5359
5360 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5361
5362 * hostio.c (handle_readlink): Decrease buffer size
5363 parameter passed to readlink by one byte.
5364
5365 2012-11-26 Yao Qi <yao@codesourcery.com>
5366
5367 * configure.ac (build_warnings): Append '-Wempty-body'.
5368 * configure: Regenerated.
5369 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5370 body.
5371
5372 2012-11-15 Pierre Muller <muller@sourceware.org>
5373
5374 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5375 * config.in: Regenerate.
5376 * configure: Regenerate.
5377 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5378 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5379 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5380 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5381 header.
5382 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5383 instead of <sys/wait.h> header.
5384 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5385
5386 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5387
5388 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5389 (various make rules): Remove -DGDBSERVER
5390
5391 2012-11-09 Yao Qi <yao@codesourcery.com>
5392
5393 * spu-low.c (current_ptid): Move it to ..
5394 * gdbthread.h: ... here. New.
5395 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5396 * server.c (myresume, process_serial_event): Likewise.
5397 * thread-db.c (thread_db_find_new_threads): Likewise.
5398 * tracepoint.c (run_inferior_command): Likewise.
5399
5400 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5401
5402 * server.c (handle_search_memory_1): Include access length in
5403 warning message.
5404
5405 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5406
5407 * linux-crisv32-low.c: Fix compile errors.
5408
5409 2012-09-04 Yao Qi <yao@codesourcery.com>
5410
5411 * tracepoint.c (cmd_qtsv): Adjust debug message.
5412 Don't check CUR_TPOINT.
5413
5414 2012-08-28 Yao Qi <yao@codesourcery.com>
5415
5416 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5417 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5418 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5419 Remove declarations of xmalloc, xreallloc, xstrdup and
5420 freeargv.
5421 * Makefile.in (libiberty_h): New.
5422 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5423 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5424
5425 2012-08-23 Yao Qi <yao@codesourcery.com>
5426
5427 * server.h: Remove declaration of 'xsnprintf'.
5428
5429 2012-08-22 Keith Seitz <keiths@redhat.com>
5430
5431 * server.h: Include build-gnulib-gbserver/config.h.
5432 * gdbreplay.c: Likewise.
5433
5434 2012-08-08 Doug Evans <dje@google.com>
5435
5436 * Makefile.in (SFILES): Add gdb_vecs.c.
5437 (OBS): Add gdb_vecs.o.
5438 (gdb_vecs_h, host_defs_h): New variables.
5439 (thread-db.o): Add $(gdb_vecs_h) dependency.
5440 (gdb_vecs.o): New rule.
5441 * thread-db.c: #include "gdb_vecs.h".
5442 (thread_db_load_search): Use a vector to iterate over path elements.
5443 Handle text appearing after "$pdir".
5444
5445 * configure.ac: Add check for strstr.
5446 * config.in: Regenerate.
5447 * configure: Regenerate.
5448
5449 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5450
5451 * hostio.c (handle_pread): If pread fails, fall back to attempting
5452 lseek/read.
5453 (handle_pwrite): Likewise for pwrite.
5454
5455 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5456
5457 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5458 between unsupported TYPE and unimplementable ADDR/LEN combination.
5459 (arm_insert_point): Act on new return value.
5460
5461 2012-07-31 Pedro Alves <palves@redhat.com>
5462
5463 * server.c (process_point_options): Only skip tokens if we find
5464 one that is unrecognized. Don't treat 'X' specially while
5465 skipping unrecognized tokens.
5466
5467 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5468
5469 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5470 to 4-byte-align HW breakpoint addresses for Thumb.
5471
5472 2012-07-27 Yao Qi <yao@codesourcery.com>
5473
5474 PR remote/14161.
5475
5476 * server.h: Declare gdb_agent_about_to_close.
5477 * target.c (kill_inferior): Include "agent.h".
5478 New. Send command 'kill'.
5479 * target.h (kill_inferior): Removed macro.
5480 * tracepoint.c (gdb_agent_about_to_close): New.
5481 (gdb_agent_helper_thread): Handle command 'close'.
5482 Wait endlessly until the inferior stops.
5483 Install gdb_agent_remove_socket to atexit hook.
5484 (agent_socket_name): New static variable.
5485 (gdb_agent_socket_init): Replace local variable 'name' with
5486 'agent_socket_name'.
5487 (gdb_agent_remove_socket): New.
5488
5489 2012-07-27 Yao Qi <yao@codesourcery.com>
5490
5491 * server.c (process_point_options): Stop at 'X' when parsing.
5492
5493 2012-07-19 Michael Eager <eager@eagercon.com>
5494
5495 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5496 to hw_execute.
5497 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5498 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5499 hardware breakpoint.
5500
5501 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5502
5503 * gdbserver/linux-low.c (initialize_low): Call
5504 linux_ptrace_init_warnings.
5505
5506 2012-07-02 Doug Evans <dje@google.com>
5507
5508 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5509 pointer to int.
5510
5511 2012-07-02 Stan Shebs <stan@codesourcery.com>
5512
5513 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5514 (ax.o): Add it to build rule.
5515 (ax-ipa.o): Ditto.
5516 (OBS): Add format.o.
5517 (IPA_OBS): Add format.o.
5518 * server.c (handle_query): Claim support for breakpoint commands.
5519 (process_point_options): Add command case.
5520 (process_serial_event): Leave running if there are printfs in
5521 effect.
5522 * mem-break.h (any_persistent_commands): Declare.
5523 (add_breakpoint_commands): Declare.
5524 (gdb_no_commands_at_breakpoint): Declare.
5525 (run_breakpoint_commands): Declare.
5526 * mem-break.c (struct point_command_list): New struct.
5527 (struct breakpoint): New field command_list.
5528 (any_persistent_commands): New function.
5529 (add_commands_to_breakpoint): New function.
5530 (add_breakpoint_commands): New function.
5531 (gdb_no_commands_at_breakpoint): New function.
5532 (run_breakpoint_commands): New function.
5533 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5534 locally.
5535 * ax.c: Include format.h.
5536 (ax_printf): New function.
5537 (gdb_eval_agent_expr): Add printf opcode.
5538
5539 2012-06-13 Yao Qi <yao@codesourcery.com>
5540
5541 * server.c (start_inferior): Remove duplicated writes to fields
5542 'last_resume_kind' and 'last_status' of 'current_inferior'.
5543
5544 2012-06-12 Yao Qi <yao@codesourcery.com>
5545 Pedro Alves <palves@redhat.com>
5546
5547 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5548 comment.
5549 * server.c (handle_v_cont): Extend comment.
5550
5551 2012-06-11 Yao Qi <yao@codesourcery.com>
5552
5553 * linux-low.c (linux_attach): Add 'static'.
5554
5555 2012-06-06 Yao Qi <yao@codesourcery.com>
5556
5557 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5558
5559 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5560
5561 Fix gcc -flto compilation warning.
5562 * server.c (main): Make variable multi_mode and attach volatile.
5563
5564 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5565
5566 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5567 if the platform doesn't know about it.
5568
5569 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5570
5571 * Makefile.in (SFILES): Add linux-tile-low.c.
5572 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5573 * configure.srv: Handle tilegx-*-linux*.
5574 * linux-tile-low.c: New file.
5575
5576 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5577
5578 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5579
5580 2012-05-24 Pedro Alves <palves@redhat.com>
5581
5582 PR gdb/7205
5583
5584 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5585
5586 2012-05-24 Pedro Alves <palves@redhat.com>
5587
5588 PR gdb/7205
5589
5590 Replace target_signal with gdb_signal throughout.
5591
5592 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5593
5594 * linux-low.c (linux_store_registers): Avoid the copying sequence
5595 when no data has been retrieved by ptrace.
5596
5597 2012-05-22 Will Deacon <will.deacon@arm.com>
5598
5599 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5600 Include asm/ptrace.h.
5601 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5602 already defined.
5603
5604 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5605
5606 * linux-low.c (linux_store_registers): Don't re-retrieve data
5607 with ptrace that has already been obtained from /proc. Always
5608 copy any data retrieved with ptrace to the buffer supplied.
5609
5610 2012-05-11 Yao Qi <yao@codesourcery.com>
5611 Pedro Alves <palves@redhat.com>
5612
5613 * linux-low.c (enum stopping_threads_kind): New.
5614 (stopping_threads): Change type to `enum stopping_threads_kind'.
5615 (handle_extended_wait): If stopping and suspending threads, leave
5616 the new_lwp suspended too.
5617 (linux_wait_for_event): Adjust.
5618 (stop_all_lwps): Set `stopping_threads' to
5619 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5620 whether we're suspending threads or just stopping them. Assert no
5621 recursion happens.
5622
5623 2012-04-29 Yao Qi <yao@codesourcery.com>
5624
5625 * server.h: Move some code to ...
5626 * gdbthread.h: ... here. New.
5627 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5628 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5629 (nto-low.o, win32-low.o): Likewise.
5630 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5631 * regcache.c, remote-utils.c, server.c: Likewise.
5632 * target.c, tracepoint.c, win32-low.c: Likewise.
5633
5634 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5635
5636 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5637 (PTRACE_ARG4_TYPE): Likewise.
5638 (PTRACE_XFER_TYPE): Likewise.
5639 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5640 ptrace to PTRACE_ARG3_TYPE.
5641 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5642 (PTRACE_ARG4_TYPE): Likewise.
5643 (PTRACE_XFER_TYPE): Likewise.
5644 (linux_detach_one_lwp): Cast fourth argument of
5645 ptrace to long then PTRACE_ARG4_TYPE.
5646 (regsets_fetch_inferior_registers): Cast third argument of
5647 ptrace to long then PTRACE_ARG3_TYPE.
5648 (regsets_store_inferior_registers): Likewise.
5649
5650 2012-04-20 Pedro Alves <palves@redhat.com>
5651
5652 * configure: Regenerate.
5653
5654 2012-04-19 Pedro Alves <palves@redhat.com>
5655
5656 * Makefile.in (GNULIB_BUILDDIR): New.
5657 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5658 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5659 (all, install-only, uninstall, clean-info, all-lib, clean): No
5660 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5661 (maintainer-clean realclean distclean): Use subdir_do.
5662 (subdir_do): New.
5663 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5664 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5665 * acinclude.m4: Include acx_configure_dir.m4.
5666 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5667 calls. Call AC_PROG_RANLIB. Configure gnulib using
5668 ACX_CONFIGURE_DIR.
5669 (GNULIB): New.
5670 (GNULIB_STDINT_H): Adjust.
5671 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5672 * gdbreplay.c: Include build-gnulib/config.h.
5673 * server.h: Likewise.
5674 * aclocal.m4: Regenerate.
5675 * config.in: Regenerate.
5676 * configure: Regenerate.
5677
5678 2012-04-19 Pedro Alves <palves@redhat.com>
5679
5680 * Makefile.in (LIBGNU, INCGNU): Adjust.
5681 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5682 (all, install-only, uninstall, clean-info, all-lib, clean)
5683 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5684 * configure.ac: Adjust AC_OUTPUT output.
5685 * aclocal.m4: Regenerate.
5686 * configure: Regenerate.
5687
5688 2012-04-19 Pedro Alves <palves@redhat.com>
5689
5690 * Makefile.in (generated_files): New.
5691 (server_h): Remove the explicit dependency on config.h, and depend
5692 on $generated_files.
5693
5694 2012-04-19 Pedro Alves <palves@redhat.com>
5695
5696 * Makefile.in (INCGNU): Add -Ignulib.
5697
5698 2012-04-19 Pedro Alves <palves@redhat.com>
5699
5700 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5701 (INCGNU): ... this, and spell out -I here.
5702 (GNULIB_LIB): Rename to ...
5703 (LIBGNU): ... this.
5704 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5705
5706 2012-04-19 Pedro Alves <palves@redhat.com>
5707
5708 * config.in: Regenerate.
5709
5710 2012-04-19 Pedro Alves <palves@redhat.com>
5711
5712 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5713 * server.h (memmem): Remove declaration.
5714 * config.in: Regenerate.
5715 * configure: Regenerate.
5716
5717 2012-04-19 Yao Qi <yao@codesourcery.com>
5718
5719 * Makefile.in (SFILES): Add common/vec.c.
5720 (OBS): Add vec.o.
5721 (vec.o): New rule.
5722
5723 2012-04-19 Yao Qi <yao@codesourcery.com>
5724
5725 * remote-utils.c (prepare_resume_reply): Replace with macro
5726 target_core_of_thread.
5727 * server.c (handle_qxfer_threads_proper): Likewise.
5728 * target.h (traget_core_of_thread): New macro.
5729
5730 2012-04-18 Pedro Alves <palves@redhat.com>
5731
5732 * aclocal.m4: Regenerate.
5733 * configure: Regenerate.
5734
5735 2012-04-16 Yao Qi <yao@codesourcery.com>
5736
5737 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5738 duplicated on address.
5739
5740 2012-04-16 Yao Qi <yao@codesourcery.com>
5741
5742 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5743 (struct tracepoint_action_ops) <send>: New field.
5744 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5745 (agent_expr_send, x_tracepoint_action_send): New.
5746 (l_tracepoint_action_send): New.
5747 (cmd_qtdp): Download and install tracepoint
5748 according to `use_agent'.
5749 (run_inferior_command): Add one more parameter `len'.
5750 Update callers.
5751 (tracepoint_send_agent): New.
5752 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5753
5754 2012-04-16 Yao Qi <yao@codesourcery.com>
5755
5756 * tracepoint.c (download_tracepoints): Moved to ...
5757 (cmd_qtstart): ... here.
5758
5759 2012-04-14 Yao Qi <yao@codesourcery.com>
5760
5761 * tracepoint.c: Include inttypes.h.
5762 (struct collect_memory_action): Use sized types.
5763 (struct tracepoint): Likewise.
5764 (cmd_qtdp, stop_tracing): Update print specifiers.
5765 (cmd_qtp, response_tracepoint): Likewise.
5766 (collect_data_at_tracepoint): Likewise.
5767 (collect_data_at_step): Likewise.
5768
5769 2012-04-14 Yao Qi <yao@codesourcery.com>
5770
5771 Import gnulib module inttypes.
5772 * aclocal.m4, config.in, configure: Regenerated.
5773
5774 2012-04-14 Yao Qi <yao@codesourcery.com>
5775
5776 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5777 Makefile and config.status at last.
5778
5779 2012-04-13 Yao Qi <yao@codesourcery.com>
5780
5781 * tracepoint.c: Include stdint.h unconditionally.
5782
5783 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5784
5785 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5786 on BFD_HAVE_SYS_PROCFS_TYPE.
5787 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5788 * configure: Regenerate.
5789 * config.in: Likewise.
5790
5791 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5792
5793 * Makefile.in (clean): Also remove x32.c x32-linux.c
5794 x32-avx.c x32-avx-linux.c.
5795 (x32.o): New target.
5796 (x32.c): Likewise.
5797 (x32-linux.o): Likewise.
5798 (x32-linux.c): Likewise.
5799 (x32-avx.o): Likewise.
5800 (x32-avx.c): Likewise.
5801 (x32-avx-linux.o): Likewise.
5802 (x32-avx-linux.c): Likewise.
5803
5804 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5805 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5806 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5807 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5808 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5809 i386/x32-avx-linux.xml.
5810
5811 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5812 (init_registers_x32_avx_linux): Likwise.
5813 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5814 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5815
5816 2012-04-13 Pedro Alves <palves@redhat.com>
5817
5818 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5819 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5820 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5821 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5822 the sub-make.
5823
5824 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5825
5826 * linux-x86-low.c (compat_x32_clock_t): New.
5827 (compat_x32_siginfo_t): Likewise.
5828 (compat_x32_siginfo_from_siginfo): Likewise.
5829 (siginfo_from_compat_x32_siginfo): Likewise.
5830 (linux_is_elf64): Likewise.
5831 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5832 and siginfo_from_compat_x32_siginfo for x32.
5833 (x86_arch_setup): Set linux_is_elf64.
5834
5835 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5836
5837 PR gdb/13969
5838 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5839 e_machine field.
5840 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5841 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5842 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5843 compatible with process.
5844
5845 2012-04-12 Yao Qi <yao@codesourcery.com>
5846
5847 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5848 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5849 (install-only, install-info, clean): Handle sub dir gnulib.
5850 (all-lib, am--refresh): New targets.
5851 (memmem.o): Remove target.
5852 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5853 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5854 (AC_REPLACE_FUNCS): Remove memmem.
5855 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5856 (AC_OUTPUT): Generate Makefile in gnulib/.
5857 * aclocal.m4, config.in, configure: Regenerated.
5858
5859 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5860
5861 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5862
5863 2012-04-05 Pedro Alves <palves@redhat.com>
5864
5865 -Werror=strict-aliasing
5866
5867 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5868 pointer.
5869
5870 2012-04-04 Pedro Alves <palves@redhat.com>
5871
5872 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5873 (sparc_store_gregset_from_stack, sparc_store_gregset)
5874 (sparc_breakpoint_at): Fix formatting.
5875
5876 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5877
5878 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5879 are available.
5880 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5881 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5882 * config.in: Regenerate.
5883 * configure: Likewise.
5884
5885 2012-03-29 Pedro Alves <palves@redhat.com>
5886
5887 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5888 Correct ptrace arguments.
5889
5890 2012-03-28 Pedro Alves <palves@redhat.com>
5891
5892 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5893 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5894 (IA64_FR1_REGNUM): New defines.
5895 (ia64_fetch_register): New.
5896 (the_low_target): Install it.
5897 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5898 field.
5899 * linux-low.c (linux_fetch_registers): Try the
5900 the_low_target.fetch_register hook first.
5901
5902 * linux-arm-low.c (the_low_target): Adjust.
5903 * linux-bfin-low.c (the_low_target): Adjust.
5904 * linux-cris-low.c (the_low_target): Adjust.
5905 * linux-crisv32-low.c (the_low_target): Adjust.
5906 * linux-m32r-low.c (the_low_target): Adjust.
5907 * linux-m68k-low.c (the_low_target): Adjust.
5908 * linux-mips-low.c (the_low_target): Adjust.
5909 * linux-ppc-low.c (the_low_target): Adjust.
5910 * linux-s390-low.c (the_low_target): Adjust.
5911 * linux-sh-low.c (the_low_target): Adjust.
5912 * linux-sparc-low.c (the_low_target): Adjust.
5913 * linux-tic6x-low.c (the_low_target): Adjust.
5914 * linux-x86-low.c (the_low_target): Adjust.
5915 * linux-xtensa-low.c (the_low_target): Adjust.
5916
5917 2012-03-26 Pedro Alves <palves@redhat.com>
5918
5919 * server.c (handle_qxfer_libraries): Don't bail early if
5920 the_target->qxfer_libraries_svr4 is not NULL.
5921
5922 2012-03-26 Pedro Alves <palves@redhat.com>
5923
5924 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5925
5926 2012-03-23 Pedro Alves <palves@redhat.com>
5927
5928 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5929 "library-list-svr4" element's start tag when the the DSO list is
5930 empty.
5931
5932 2012-03-23 Pedro Alves <palves@redhat.com>
5933
5934 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5935 a variable whose type size is the same as the inferior's pointer
5936 size.
5937
5938 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5939
5940 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5941 struct siginfo.
5942 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5943 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5944 * linux-low.h: Include <signal.h>.
5945 (struct siginfo): Remove forward declaration.
5946 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5947 struct siginfo.
5948
5949 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5950
5951 * .gitignore: Ignore more files.
5952
5953 2012-03-19 Pedro Alves <palves@redhat.com>
5954 Jan Kratochvil <jan.kratochvil@redhat.com>
5955
5956 * server.c (cont_thread, general_thread): Add describing comments.
5957 (start_inferior): Clear `cont_thread'.
5958 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5959 of a process.
5960
5961 2012-03-15 Yao Qi <yao@codesourcery.com>
5962
5963 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5964 handling to ...
5965 (cmd_qtdp): ... here.
5966
5967 2012-03-15 Yao Qi <yao@codesourcery.com>
5968
5969 * tracepoint.c (struct tracepoint_action_ops): New.
5970 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5971 (m_tracepoint_action_download): New.
5972 (r_tracepoint_action_download): New.
5973 (x_tracepoint_action_download): New.
5974 (l_tracepoint_action_download): New.
5975 (add_tracepoint_action): Install `action->ops' according type.
5976 (download_tracepoint_1): Move code `download' function pointer
5977 of various tracepoint_action_ops.
5978
5979 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5980
5981 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5982 linux_ptrace_attach_warnings.
5983
5984 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5985
5986 * Makefile.in (linux-ptrace.o): New.
5987 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5988 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5989 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5990 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5991 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5992 of these targets.
5993 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5994
5995 2012-03-08 Yao Qi <yao@codesourcery.com>
5996 Pedro Alves <palves@redhat.com>
5997
5998 Fix PR server/13392.
5999 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
6000 offset of JMP insn.
6001 * tracepoint.c (remove_tracepoint): New.
6002 (cmd_qtdp): Call remove_tracepoint when failed to install.
6003
6004 2012-03-07 Pedro Alves <palves@redhat.com>
6005
6006 * linux-low.c (get_detach_signal): New.
6007 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
6008 Pass on pending signals to PTRACE_DETACH. Check the result of the
6009 ptrace call.
6010 * server.c (program_signals, program_signals_p): New.
6011 (handle_general_set): Handle QProgramSignals.
6012 * server.h (program_signals, program_signals_p): Declare.
6013
6014 2012-03-05 Pedro Alves <palves@redhat.com>
6015 Jan Kratochvil <jan.kratochvil@redhat.com>
6016
6017 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6018 New comment why.
6019
6020 2012-03-03 Yao Qi <yao@codesourcery.com>
6021
6022 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6023 agent_look_up_symbols.
6024
6025 2012-03-03 Yao Qi <yao@codesourcery.com>
6026
6027 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6028 (linux-x86-low.o): Likewise.
6029 * server.h: Remove in_process_agent_loaded.
6030 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6031 common/agent.c.
6032 Update callers.
6033
6034 2012-03-03 Yao Qi <yao@codesourcery.com>
6035
6036 * tracepoint.c (gdb_agent_capability): New global.
6037 (in_process_agent_loaded_ust): Renamed to
6038 `in_process_agent_supports_ust'.
6039 Update callers.
6040 (in_process_agent_supports_ust): Call agent_capability_check.
6041 (clear_installed_tracepoints): Assert that agent supports
6042 agent.
6043
6044 2012-03-03 Yao Qi <yao@codesourcery.com>
6045
6046 * linux-low.c (linux_supports_agent): New.
6047 (linux_target_ops): Initialize field `supports_agent' with
6048 linux_supports_agent.
6049 * target.h (struct target_ops) <supports_agent>: New.
6050 (target_supports_agent): New macro.
6051 * server.c (handle_general_set): Handle packet 'QAgent'.
6052 (handle_query): Send `QAgent+'.
6053 * Makefile.in (server.o): Depends on agent.h.
6054
6055 2012-03-03 Yao Qi <yao@codesourcery.com>
6056
6057 * Makefile.in (OBS): Add agent.o.
6058 Add new rule for agent.o.
6059 Track dependence of tracepoint.c on agent.h.
6060 * tracepoint.c (run_inferior_command_1):
6061 (run_inferior_command): Call agent_run_command.
6062 (gdb_ust_connect_sync_socket): Deleted. Move it to
6063 common/agent.c.
6064 (resume_thread, stop_thread): Likewise.
6065 (gdb_ust_socket_init): Renamed to ...
6066 (gdb_agent_socket_init): ... New.
6067 (gdb_ust_thread): Renamed to ...
6068 (gdb_agent_helper_thread): ... New.
6069 (gdb_ust_init): Move some code to ...
6070 (gdb_agent_init): ... here. New.
6071 [HAVE_UST]: Call gdb_ust_init.
6072 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6073 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6074 * config.in, configure: Regenerated.
6075
6076 2012-03-02 Pedro Alves <palves@redhat.com>
6077
6078 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6079 * linux-low.c (struct simple_pid_list): New.
6080 (stopped_pids): New a struct simple_pid_list pointer.
6081 (add_to_pid_list, pull_pid_from_list): New.
6082 (handle_extended_wait): Don't assume the first signal new children
6083 report is SIGSTOP. Adjust call to pull_pid_from_list.
6084 (linux_wait_for_lwp): Adjust.
6085
6086 2012-03-02 Yao Qi <yao@codesourcery.com>
6087
6088 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6089 debug log.
6090
6091 2012-03-02 Yao Qi <yao@codesourcery.com>
6092
6093 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6094 `stop_pc' and `tpoint'. Update caller.
6095
6096 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6097
6098 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6099 * linux-low.c (use_linux_regsets): New macro.
6100 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6101 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6102 (linux_register_in_regsets): New function.
6103 (usr_fetch_inferior_registers): Skip registers covered by
6104 regsets.
6105 (usr_store_inferior_registers): Likewise.
6106 (usr_fetch_inferior_registers): New macro.
6107 (usr_store_inferior_registers): Likewise.
6108 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6109 (linux_store_registers): Likewise.
6110 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6111 prototype.
6112 (init_registers_mips64_dsp_linux): Likewise.
6113 (init_registers_mips_linux): New macro.
6114 (init_registers_mips_dsp_linux): Likewise.
6115 (mips_dsp_num_regs): Likewise.
6116 (DSP_BASE, DSP_CONTROL): New fallback macros.
6117 (mips_base_regs): New macro.
6118 (mips_regmap): Use it. Fix the size.
6119 (mips_dsp_regmap): New variable.
6120 (mips_dsp_regset_bitmap): Likewise.
6121 (mips_arch_setup): New function.
6122 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6123 than mips_regmap.
6124 (mips_cannot_store_register): Likewise.
6125 (the_low_target): Update .arch_setup, .num_regs and .regmap
6126 initializers. Add .regset_bitmap initializer.
6127 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6128 initializer.
6129 * linux-bfin-low.c (the_low_target): Likewise.
6130 * linux-cris-low.c (the_low_target): Likewise.
6131 * linux-crisv32-low.c (the_low_target): Likewise.
6132 * linux-ia64-low.c (the_low_target): Likewise.
6133 * linux-m32r-low.c (the_low_target): Likewise.
6134 * linux-m68k-low.c (the_low_target): Likewise.
6135 * linux-ppc-low.c (the_low_target): Likewise.
6136 * linux-s390-low.c (the_low_target): Likewise.
6137 * linux-sh-low.c (the_low_target): Likewise.
6138 * linux-sparc-low.c (the_low_target): Likewise.
6139 * linux-tic6x-low.c (the_low_target): Likewise.
6140 * linux-x86-low.c (the_low_target): Likewise.
6141 * linux-xtensa-low.c (the_low_target): Likewise.
6142 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6143 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6144 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6145 srv_xmlfiles.
6146 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6147 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6148
6149 2012-02-29 Yao Qi <yao@codesourcery.com>
6150 Pedro Alves <palves@redhat.com>
6151
6152 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6153 `step_over_finished' is true.
6154
6155 2012-02-27 Pedro Alves <palves@redhat.com>
6156
6157 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6158 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6159
6160 2012-02-27 Pedro Alves <palves@redhat.com>
6161
6162 PR server/9684
6163 * linux-low.c (pid_is_stopped): New.
6164 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6165
6166 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6167
6168 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6169 of conditions.
6170
6171 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6172
6173 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6174
6175 2012-02-24 Luis Machado <lgustavo@codesourcery>
6176
6177 * server.c (handle_query): Advertise support for target-side
6178 breakpoint condition evaluation.
6179 (process_point_options): New function.
6180 (process_serial_event): When inserting a breakpoint, check for
6181 a target-side condition that should be evaluated.
6182
6183 * mem-break.c: Include regcache.h and ax.h.
6184 (point_cond_list_t): New data structure.
6185 (breakpoint) <cond_list>: New field.
6186 (find_gdb_breakpoint_at): Make non-static.
6187 (delete_gdb_breakpoint_at): Clear any target-side
6188 conditions.
6189 (clear_gdb_breakpoint_conditions): New function.
6190 (add_condition_to_breakpoint): Likewise.
6191 (add_breakpoint_condition): Likewise.
6192 (gdb_condition_true_at_breakpoint): Likewise.
6193 (gdb_breakpoint_here): Return result directly instead
6194 of going through a local variable.
6195
6196 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6197 (clear_gdb_breakpoint_conditions): Likewise.
6198 (add_breakpoint_condition): Likewise.
6199 (gdb_condition_true_at_breakpoint): Likewise.
6200
6201 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6202 (need_step_over_p): Take target-side breakpoint condition into
6203 consideration.
6204
6205 2012-02-24 Luis Machado <lgustavo@codesourcery>
6206
6207 * server.h: Include tracepoint.h.
6208 (agent_mem_read, agent_get_trace_state_variable_value,
6209 agent_set_trace_state_variable_value,
6210 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6211 get_set_tsv_func_addr): New prototypes.
6212
6213 * ax.h: New include file.
6214 * ax.c: New source file.
6215
6216 * tracepoint.c: Include ax.h.
6217 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6218 agent_expr, eval_result_type): Move to ax.h.
6219 (parse_agent_expr): Rename to ...
6220 (gdb_parse_agent_expr): ... this, make it non-static and move
6221 to ax.h.
6222 (unparse_agent_expr) Rename to ...
6223 (gdb_unparse_agent_expr): ... this, make it non-static and move
6224 to ax.h.
6225 (eval_agent_expr): Rename to ...
6226 (eval_tracepoint_agent_expr): ... this.
6227 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6228 forward declarations.
6229 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6230 (agent_get_trace_state_variable_value): New function.
6231 (agent_set_trace_state_variable_value): New function.
6232 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6233 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6234 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6235 (condition_true_at_tracepoint): Likewise.
6236 (parse_agent_expr): Rename to ...
6237 (gdb_parse_agent_expr): ... this and move to ax.c.
6238 (unparse_agent_expr): Rename to ...
6239 (gdb_unparse_agent_expr): ... this and move to ax.c.
6240 (gdb_agent_op_name): Move to ax.c.
6241 (eval_agent_expr): Rename to ...
6242 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6243 and move to ax.c.
6244 (eval_tracepoint_agent_expr): New function.
6245 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6246 non-static.
6247 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6248 ax.c.
6249 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6250 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6251 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6252 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6253 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6254 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6255 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6256 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6257 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6258 (compile_bytecodes): Remove forward declaration.
6259 (is_goto_target): Move to ax.c.
6260 (compile_bytecodes): Move to ax.c and call
6261 agent_get_trace_state_variable_value (...) and
6262 agent_set_trace_state_variable_value (...).
6263
6264 * Makefile.in: Update ax.c and IPA dependencies.
6265
6266 2012-02-24 Pedro Alves <palves@redhat.com>
6267
6268 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6269 (cmd_bigqtbuffer_circular): ... this. Only handle
6270 'QTBuffer:circular:'.
6271 (handle_tracepoint_general_set): Adjust.
6272
6273 2012-02-16 Yao Qi <yao@codesourcery.com>
6274
6275 * inferiors.c: Move code to ...
6276 * dll.c: .... here. New.
6277 * server.h: Declare clear_dlls.
6278 * Makefile.in (SFILES): Add dll.c.
6279 (OBS): Add dll.o
6280 (dll.o): New rule.
6281
6282 2012-02-11 Yao Qi <yao@codesourcery.com>
6283
6284 * server.c: (handle_monitor_command): Add a new parameter
6285 `own_buf'.
6286 (handle_query): Update caller.
6287
6288 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6289
6290 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6291 * configure, config.in: Regenerate.
6292 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6293 is not defined.
6294
6295 2012-02-02 Pedro Alves <palves@redhat.com>
6296
6297 Try SIGKILL first, then PTRACE_KILL.
6298 * linux-low.c (linux_kill_one_lwp): New.
6299 (linux_kill_one_lwp): Rename to ...
6300 (kill_one_lwp_callback): ... this. Use the new
6301 linux_kill_one_lwp.
6302
6303 2012-02-02 Pedro Alves <palves@redhat.com>
6304
6305 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6306 inferior.
6307
6308 2012-01-27 Pedro Alves <palves@redhat.com>
6309
6310 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6311 (elf_64_file_p): Make static.
6312 (linux_pid_exe_is_elf_64_file): New.
6313 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6314 Delete declarations.
6315 (linux_pid_exe_is_elf_64_file): Declare.
6316 * linux-x86-low.c (x86_arch_setup): Use
6317 linux_pid_exe_is_elf_64_file.
6318
6319 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6320
6321 * linux-low.c (linux_wait_for_event_1): Rename to ...
6322 (linux_wait_for_event): ... here and merge it with former
6323 linux_wait_for_event - new variable wait_ptid, use it.
6324 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6325
6326 2012-01-23 Pedro Alves <palves@redhat.com>
6327
6328 * server.c (main): Avoid yet another case of infinite loop while
6329 detaching/killing after a longjmp.
6330
6331 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6332
6333 Code cleanup.
6334 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6335
6336 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6337
6338 * hostio.c (handle_readlink): New function.
6339 (handle_vFile): Call it to handle "vFile:readlink" packets.
6340
6341 2012-01-20 Pedro Alves <palves@redhat.com>
6342 Ulrich Weigand <ulrich.weigand@linaro.org>
6343
6344 * server.c (handle_v_requests): Only support vAttach and vRun to
6345 start multiple processes when in extended protocol mode.
6346
6347 2012-01-17 Pedro Alves <palves@redhat.com>
6348
6349 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6350 memalign plus mprotect to allocate the scratch buffer.
6351
6352 2012-01-13 Pedro Alves <palves@redhat.com>
6353
6354 * server.c (attach_inferior): Clear `cont_thread'.
6355
6356 2012-01-13 Pedro Alves <palves@redhat.com>
6357
6358 * server.c (main): Avoid infinite loop while detaching/killing
6359 after a longjmp.
6360
6361 2012-01-09 Doug Evans <dje@google.com>
6362
6363 * server.c (start_inferior): Set last_ptid in --wrapper case.
6364
6365 2012-01-06 Yao Qi <yao@codesourcery.com>
6366
6367 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6368 defined.
6369 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6370
6371 2012-01-04 Yao Qi <yao@codesourcery.com>
6372
6373 * tracepoint.c (cmd_qtdp): Print debug message
6374 for static tracepoint.
6375
6376 2012-01-04 Yao Qi <yao@codesourcery.com>
6377
6378 * tracepoint.c (trace_vdebug): Differentiate debug message
6379 between gdbserver and IPA.
6380
6381 2012-01-03 Yao Qi <yao@codesourcery.com>
6382
6383 * tracepoint.c (tracepoint_was_hit): Don't collect for
6384 static tracepoint.
6385
6386 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6387
6388 * terminal.h: Reformat copyright header.
6389
6390 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6391
6392 * server.c (gdbserver_version): Update copyright year.
6393 * gdbreplay.c (gdbreplay_version): Likewise.
6394
6395 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6396
6397 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6398
6399 Revert:
6400 2011-12-18 Hui Zhu <teawater@gmail.com>
6401 * linux-low.c (linux_create_inferior): Save return value to ret.
6402
6403 2011-12-18 Hui Zhu <teawater@gmail.com>
6404
6405 * linux-low.c (linux_create_inferior): Save return value to ret.
6406
6407 2011-12-16 Doug Evans <dje@google.com>
6408
6409 * linux-low.c (linux_create_inferior): If stdio connection,
6410 redirect stdin from /dev/null, stdout to stderr.
6411 * remote-utils.c (remote_is_stdio): New static global.
6412 (remote_connection_is_stdio): New function.
6413 (remote_prepare): Handle stdio connection.
6414 (remote_open): Ditto.
6415 (remote_close): Don't close stdin for stdio connections.
6416 (read_prim,write_prim): New functions. Replace all calls to
6417 read/write to these.
6418 * server.c (main): Watch for "-" argument. Move call to
6419 remote_prepare before start_inferior.
6420 * server.h (STDIO_CONNECTION_NAME): New macro.
6421 (remote_connection_is_stdio): Declare.
6422
6423 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6424 in debugging output.
6425
6426 2011-12-15 Yao Qi <yao@codesourcery.com>
6427
6428 * tracepoint.c: Include sys/syscall.h.
6429 (gdb_ust_thread): Remove preprocessor conditional.
6430
6431 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6432
6433 * linux-low.c (linux_detach_one_lwp): Call
6434 the_low_target.prepare_to_resume before detaching.
6435
6436 2011-12-14 Yao Qi <yao@codesourcery.com>
6437
6438 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6439 of write.
6440
6441 2011-12-14 Yao Qi <yao@codesourcery.com>
6442
6443 * i386-low.c (i386_low_stopped_data_address): Initialize local
6444 variable `control'.
6445
6446 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6447
6448 PR remote/13492
6449
6450 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6451 DR_CONTROL unless necessary. Extend comments.
6452 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6453 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6454
6455 2011-12-13 Yao Qi <yao@codesourcery.com>
6456
6457 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6458 macros.
6459 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6460
6461 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6462
6463 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6464 Print new debug message for such case.
6465
6466 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6467
6468 Fix overlapping memcpy.
6469 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6470 the read_inferior_memory transfer.
6471 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6472 write_inferior_memory transfer.
6473 (set_fast_tracepoint_jump): New variable buf. Use it for the
6474 read_inferior_memory and write_inferior_memory transfers.
6475 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6476 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6477 Use it for the write_inferior_memory transfer.
6478 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6479 buffers.
6480
6481 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6482
6483 * linux-low.c (fetch_register, store_register): Make code
6484 consistent, fix formatting.
6485
6486 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6487
6488 * linux-low.c (usr_store_inferior_registers): Factor out code
6489 to handle individual registers into...
6490 (store_register): ... this new function.
6491
6492 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6493
6494 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6495 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6496 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6497 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6498 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6499 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6500 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6501 (srv_xmlfiles): Add new XML files.
6502
6503 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6504 and <sys/uio.h>.
6505 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6506 (init_registers_s390_linux32v1): Add prototype.
6507 (init_registers_s390_linux32v2): Likewise.
6508 (init_registers_s390_linux64v1): Likewise.
6509 (init_registers_s390_linux64v2): Likewise.
6510 (init_registers_s390x_linux64v1): Likewise.
6511 (init_registers_s390x_linux64v2): Likewise.
6512 (s390_num_regs): Increment to 52.
6513 (s390_regmap): Add orig_r2 register.
6514 (s390_num_regs_3264): Increment to 68.
6515 (s390_regmap_3264): Add orig_r2 register.
6516 (s390_collect_ptrace_register): Handle orig_r2 register.
6517 (s390_supply_ptrace_register): Likewise.
6518 (s390_fill_last_break): New function.
6519 (s390_store_last_break): Likewise.
6520 (s390_fill_system_call): New function.
6521 (s390_store_system_call): Likewise.
6522 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6523 register sets.
6524 (s390_check_regset): New function.
6525 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6526 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6527 Update target_regsets for available register sets.
6528
6529 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6530 Jan Kratochvil <jan.kratochvil@redhat.com>
6531
6532 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6533 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6534 New.
6535 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6536 * linux-low.h (struct process_info_private): New member r_debug.
6537 * server.c (handle_qxfer_libraries): Call
6538 the_target->qxfer_libraries_svr4.
6539 (handle_qxfer_libraries_svr4): New function.
6540 (qxfer_packets): New entry "libraries-svr4".
6541 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6542 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6543 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6544 PACKET_qXfer_libraries_svr4.
6545
6546 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6547
6548 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6549 PSW address/mask between 8-byte and 16-byte formats.
6550 (s390_supply_ptrace_register): Likewise.
6551 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6552 basic addressing mode bit.
6553
6554 2011-11-24 Stan Shebs <stan@codesourcery.com>
6555
6556 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6557
6558 2011-11-17 Stan Shebs <stan@codesourcery.com>
6559
6560 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6561 (tracing_start_time): New global.
6562 (tracing_stop_time): New global.
6563 (tracing_user_name): New global.
6564 (tracing_notes): New global.
6565 (tracing_stop_note): New global.
6566 (cmd_qtstart): Set traceframe_usage, start_time.
6567 (stop_tracing): Set stop_time.
6568 (cmd_qtstatus): Report additional status.
6569 (cmd_qtp): New function.
6570 (handle_tracepoint_query): Call it.
6571 (cmd_qtnotes): New function.
6572 (handle_tracepoint_general_set): Call it.
6573 (get_timestamp): Rename from tsv_get_timestamp.
6574
6575 2011-11-14 Stan Shebs <stan@codesourcery.com>
6576 Kwok Cheung Yeung <kcy@codesourcery.com>
6577
6578 * linux-x86-low.c (small_jump_insn): New.
6579 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6580 trampoline and error message, build a trampoline and issue a small
6581 jump instruction to it.
6582 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6583 trampoline and error message.
6584 (x86_get_min_fast_tracepoint_insn_len): New.
6585 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6586 * linux-low.h (struct linux_target_ops): Add arguments to
6587 install_fast_tracepoint_jump_pad operation, add new operation.
6588 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6589 arguments.
6590 (linux_get_min_fast_tracepoint_insn_len): New function.
6591 (linux_target_op): Add new operation.
6592 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6593 (gdb_trampoline_buffer_end): Ditto.
6594 (gdb_trampoline_buffer_error): Ditto.
6595 (struct ipa_sym_addresses): Add fields for new IPA variables.
6596 (symbol_list): Add entries for new IPA variables.
6597 (struct tracepoint): Add fields to hold the address range of the
6598 trampoline used by the tracepoint.
6599 (trampoline_buffer_head): New static variable.
6600 (trampoline_buffer_tail): Ditto.
6601 (claim_trampoline_space): New function.
6602 (have_fast_tracepoint_trampoline_buffer): New function.
6603 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6604 structure.
6605 (install_fast_tracepoint): Ditto, also add error buffer argument.
6606 (cmd_qtminftpilen): New function.
6607 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6608 (fast_tracepoint_from_trampoline_address): New function.
6609 (fast_tracepoint_collecting): Handle trampoline as part of jump
6610 pad space.
6611 (set_trampoline_buffer_space): New function.
6612 (initialize_tracepoint): Initialize new IPA variables.
6613 * target.h (struct target_ops): Add arguments to
6614 install_fast_tracepoint_jump_pad operation, add new
6615 get_min_fast_tracepoint_insn_len operation.
6616 (target_get_min_fast_tracepoint_insn_len): New.
6617 (install_fast_tracepoint_jump_pad): Add arguments.
6618 * server.h (IPA_BUFSIZ): Define.
6619 * linux-i386-ipa.c: Include extra header files.
6620 (initialize_fast_tracepoint_trampoline_buffer): New function.
6621 (initialize_low_tracepoint): Call it.
6622 * server.h (set_trampoline_buffer_space): Declare.
6623 (claim_trampoline_space): Ditto.
6624 (have_fast_tracepoint_trampoline_buffer): Ditto.
6625
6626 2011-11-14 Yao Qi <yao@codesourcery.com>
6627
6628 * server.c (handle_query): Handle InstallInTrace for qSupported.
6629 * tracepoint.c (add_tracepoint): Sort list.
6630 (install_tracepoint, download_tracepoint): New.
6631 (cmd_qtdp): Call them to install and download tracepoints.
6632 (sort_tracepoints): Removed.
6633 (cmd_qtstart): Update.
6634
6635 2011-11-14 Yao Qi <yao@codesourcery.com>
6636
6637 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6638 * mem-break.h: Declare.
6639 * tracepoint.c (cmd_qtstart): Move some code to ...
6640 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6641 New.
6642 (download_tracepoints): Move some code to ...
6643 (download_tracepoint_1): ... here. New.
6644
6645 2011-11-08 Yao Qi <yao@codesourcery.com>
6646
6647 * remote-utils.c (relocate_instruction): A comment fix.
6648
6649 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6650
6651 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6652 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6653 dr_status_mirror and dr_control_mirror from debug_reg_state.
6654 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6655 (i386_initial_stuff): Remove use of deleted globals.
6656 (i386_get_thread_context, i386_set_thread_context,
6657 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6658 from debug_reg_state.
6659
6660 2011-11-05 Yao Qi <yao@codesourcery.com>
6661
6662 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6663 address as TPOINT's.
6664
6665 2011-11-02 Stan Shebs <stan@codesourcery.com>
6666
6667 * tracepoint.c (agent_mem_read_string): New function.
6668 (eval_agent_expr): Call it for tracenz.
6669 * server.c (handle_query): Report support for tracenz.
6670
6671 2011-11-02 Yao Qi <yao@codesourcery.com>
6672
6673 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6674
6675 2011-11-02 Yao Qi <yao@codesourcery.com>
6676
6677 * target.h: Fix a typo in comment.
6678
6679 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6680
6681 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6682 clobber the breakpoints' shadows with fast tracepoint jumps.
6683 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6684 * target.c (write_inferior_memory): Also pass MYADDR down to
6685 check_mem_write.
6686
6687 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6688
6689 * configure.ac: Check support for personality routine.
6690 * configure: Regenerate.
6691 * config.in: Likewise.
6692 * linux-low.c: Include <sys/personality.h>.
6693 Define ADDR_NO_RANDOMIZE if necessary.
6694 (linux_create_inferior): Disable address space randomization when
6695 forking inferior, if requested.
6696 (linux_supports_disable_randomization): New function.
6697 (linux_target_ops): Install it.
6698 * server.h (disable_randomization): Declare.
6699 * server.c (disable_randomization): New global variable.
6700 (handle_general_set): Handle QDisableRandomization.
6701 (handle_query): Likewise for qSupported.
6702 (main): Support --disable-randomization and --no-disable-randomization
6703 command line arguments.
6704 * target.h (struct target_ops): Add supports_disable_randomization.
6705 (target_supports_disable_randomization): New macro.
6706
6707 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6708
6709 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6710 ifdef check.
6711 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6712 [!PT_GETDSBT] (target_loadmap): New definition.
6713 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6714 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6715 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6716 and PT_GETDSBT to LINUX_LOADMAP.
6717 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6718 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6719
6720 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6721
6722 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6723 (arm_linux_hwbp_cap): New static variable.
6724 (arm_linux_get_hwbp_cap): Replace by ...
6725 (arm_linux_init_hwbp_cap): ... this new function.
6726 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6727 (arm_linux_get_hw_watchpoint_count): Likewise.
6728 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6729 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6730 (arm_prepare_to_resume): Use perror_with_name instead of error.
6731
6732 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6733
6734 * linux-arm-low.c: Include <signal.h>.
6735 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6736 (struct arm_linux_hwbp_cap): New data type.
6737 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6738 (struct arm_linux_hw_breakpoint): New data type.
6739 (MAX_BPTS, MAX_WPTS): Define.
6740 (struct arch_process_info, struct arch_lwp_info): New data types.
6741 (arm_linux_get_hwbp_cap): New function.
6742 (arm_linux_get_hw_breakpoint_count): Likewise.
6743 (arm_linux_get_hw_watchpoint_count): Likewise.
6744 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6745 (arm_hwbp_control_initialize): Likewise.
6746 (arm_hwbp_control_is_enabled): Likewise.
6747 (arm_hwbp_control_is_initialized): Likewise.
6748 (arm_hwbp_control_disable): Likewise.
6749 (arm_linux_hw_breakpoint_equal): Likewise.
6750 (arm_linux_hw_point_initialize): Likewise.
6751 (struct update_registers_data): New data structure.
6752 (update_registers_callback: New function.
6753 (arm_insert_point): Likewise.
6754 (arm_remove_point): Likewise.
6755 (arm_stopped_by_watchpoint): Likewise.
6756 (arm_stopped_data_address): Likewise.
6757 (arm_new_process): Likewise.
6758 (arm_new_thread): Likewise.
6759 (arm_prepare_to_resume): Likewise.
6760 (the_low_target): Register arm_insert_point, arm_remove_point,
6761 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6762 arm_new_thread, and arm_prepare_to_resume.
6763
6764 2011-09-15 Stan Shebs <stan@codesourcery.com>
6765
6766 * server.h (struct emit_ops): Add compare-goto fields.
6767 * tracepoint.c (gdb_agent_op_sizes): New table.
6768 (emit_eq_goto): New function.
6769 (emit_ne_goto): New function.
6770 (emit_lt_goto): New function.
6771 (emit_le_goto): New function.
6772 (emit_gt_goto): New function.
6773 (emit_ge_goto): New function.
6774 (is_goto_target): New function.
6775 (compile_bytecodes): Recognize special cases of compare-goto
6776 combinations and call specialized emitters for them.
6777 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6778 (amd64_emit_ne_goto): New function.
6779 (amd64_emit_lt_goto): New function.
6780 (amd64_emit_le_goto): New function.
6781 (amd64_emit_gt_goto): New function.
6782 (amd64_emit_ge_goto): New function.
6783 (amd64_emit_ops): Add the new functions.
6784 (i386_emit_eq_goto): New function.
6785 (i386_emit_ne_goto): New function.
6786 (i386_emit_lt_goto): New function.
6787 (i386_emit_le_goto): New function.
6788 (i386_emit_gt_goto): New function.
6789 (i386_emit_ge_goto): New function.
6790 (i386_emit_ops): Add the new functions.
6791
6792 2011-09-08 Stan Shebs <stan@codesourcery.com>
6793
6794 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6795 (i386_emit_epilogue): Restore %ebx.
6796
6797 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6798
6799 * server.c (step_thread): Remove definition.
6800 (process_serial_event): Don't handle Hs.
6801 * server.h (step_thread): Remove declaration.
6802 * target.c (set_desired_inferior): Remove use of step_thread.
6803
6804 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6805
6806 * linux-low.c: Include linux-procfs.h.
6807 (linux_attach_lwp_1): Update comments.
6808 (linux_attach): Scan for existing threads when attaching to a
6809 process that is the tgid.
6810 * Makefile.in: Update dependencies.
6811
6812 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6813
6814 * configure.srv: Add linux-procfs.o dependencies.
6815
6816 2011-08-14 Yao Qi <yao@codesourcery.com>
6817
6818 * target.h (struct target_ops): Fix indent.
6819 * win32-low.c (win32_target_ops): Fix comment.
6820
6821 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6822 Yao Qi <yao@codesourcery.com>
6823
6824 * Makefile.in (clean): Remove tic6x-*.c files.
6825 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6826 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6827 (tic6x-c64xp-linux.c): Likewise.
6828 * configure.srv: Add support for tic6x-*-uclinux.
6829 * linux-tic6x-low.c: New.
6830 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6831
6832 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6833 Yao Qi <yao@codesourcery.com>
6834
6835 * target.h (struct target_ops): Add read_loadmap.
6836 * linux-low.c (struct target_loadseg): New type.
6837 (struct target_loadmap): New type.
6838 (linux_read_loadmap): New function.
6839 (linux_target_ops): Add linux_read_loadmap.
6840 * server.c (handle_query): Support qXfer:fdpic:read packet.
6841 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6842 to NULL.
6843
6844 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6845
6846 * win32-low.c: Include <stdint.h>.
6847
6848 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6849
6850 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6851 to the inferior here.
6852 (i386_remove_aligned_watchpoint): Ditto.
6853 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6854 fit part of the watchpoint in the debug registers.
6855 (i386_update_inferior_debug_regs): New.
6856 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6857 registers, and only update the inferior on success.
6858 (i386_low_remove_watchpoint): Ditto.
6859
6860 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6861
6862 * linux-low.c (compare_ints, unique, list_threads, show_process,
6863 linux_core_of_thread): Delete.
6864 (linux_target_ops): Change linux_core_of_thread to
6865 linux_common_core_of_thread.
6866 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6867 * utils.c (malloc_failure): Change type of argument.
6868 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6869 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6870 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6871 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6872 (IPA_OBJS): Add common-utils-ipa.o.
6873 (ptid_h, linux_osdata_h): New macros.
6874 (server_h): Add common/common-utils.h, common/xml-utils.h,
6875 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6876 common/ptid.h.
6877 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6878 ptid.o, buffer.o): New rules.
6879 (linux-low.o): Add common/linux-osdata.h as a dependency.
6880 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6881 * configure.ac: Add AC_HEADER_DIRENT check.
6882 * config.in: Regenerate.
6883 * configure: Regenerate.
6884 * remote-utils.c (xml_escape_text): Delete.
6885 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6886 buffer_xml_printf): Move to common/buffer.c.
6887 * server.c (main): Remove call to initialize_inferiors.
6888 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6889 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6890 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6891 internal_error, gdb_assert, gdb_assert_fail): Delete.
6892 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6893 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6894 common/buffer.h.
6895 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6896 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6897 initialize_inferiors): Delete.
6898
6899 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6900
6901 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6902 symbol error.
6903
6904 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6905
6906 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6907 assertion.
6908 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6909
6910 2011-05-26 Yao Qi <yao@codesourcery.com>
6911
6912 * Makefile.in (thread-db.o): Track dependence to
6913 common/gdb_thread_db.h.
6914 * thread-db.c: include gdb_thread_db.h from right place.
6915
6916 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6917
6918 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6919 __FILE__ and __LINE__ to internal_error.
6920
6921 2011-05-13 Doug Evans <dje@google.com>
6922
6923 * thread-db.c (try_thread_db_load_from_sdir): New function.
6924 (try_thread_db_load_from_dir): New function.
6925 (thread_db_load_search): Handle $sdir, ignore $pdir.
6926 Remove trying of system directories if search of
6927 libthread-db-search-path fails, that is now done via $sdir.
6928
6929 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6930
6931 * server.c (handle_query): Add EnableDisableTracepoints to the list
6932 of supported features.
6933 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6934 tracepoints.
6935 (cmd_qtenable_disable): New.
6936 (cmd_qtstart): Install tracepoints even if disabled.
6937 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6938 receiving a QTEnable or QTDisable packet.
6939 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6940 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6941 tracepoints.
6942 (gdb_probe): Skip data collection if static tracepoint is disabled.
6943
6944 2011-05-10 Doug Evans <dje@google.com>
6945
6946 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6947
6948 2011-05-04 Doug Evans <dje@google.com>
6949
6950 * linux-low.c (linux_join): Skip process lookup.
6951 * spu-low.c (spu_join): Ditto.
6952 * server.c (join_inferiors_callback): Delete.
6953 (process_serial_event): For 'D' packet (detach) call join_inferior
6954 directly.
6955
6956 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6957
6958 * README: Don't mention xscale*-*-linux*.
6959 * configure.srv (xscale*-*-linux*): Don't handle target.
6960
6961 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6962
6963 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6964 casting pointers.
6965 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6966 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6967 (i386_emit_void_call_2): Likewise.
6968
6969 2011-04-26 Yao Qi <yao@codesourcery.com>
6970
6971 * linux-low.c: Move common macros to linux-ptrace.h.
6972 Include linux-ptrace.h.
6973 * Makefile.in (linux_ptrace_h): New.
6974 (linux-low.o): Depends on linux-ptrace.h.
6975
6976 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6977
6978 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6979 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6980 (remote_prepare): New function with most of the TCP code from ...
6981 (remote_open): ... here. Detect PORT here unconditionally. Move also
6982 setting transport_is_reliable.
6983 * server.c (run_once): New variable.
6984 (gdbserver_usage): Document it.
6985 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6986 the first run if RUN_ONCE.
6987 * server.h (run_once, remote_prepare): New declarations.
6988
6989 2011-04-19 Tom Tromey <tromey@redhat.com>
6990
6991 * win32-low.c (handle_load_dll): Remove duplicate "the".
6992
6993 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6994
6995 Remove support for old Cygwin 1.5 versions.
6996 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6997 function to avoid warning.
6998 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6999 warning.
7000
7001 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
7002
7003 * gdbserver/server.h (Macro _): Define it if not available.
7004
7005 2011-03-14 Michael Snyder <msnyder@vmware.com>
7006
7007 * hostio.c (handle_close): Remove unnecessary null test.
7008
7009 2011-03-10 Joel Brobecker <brobecker@adacore.com>
7010
7011 * Makefile.in (maintainer-clean realclean distclean): Remove
7012 "make ... subdir_do" command.
7013
7014 2011-03-10 Michael Snyder <msnyder@vmware.com>
7015
7016 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
7017
7018 * server.c (handle_v_run): Free alloced buffer on early return.
7019
7020 2011-03-09 Yao Qi <yao@codesourcery.com>
7021
7022 Revert:
7023 2011-03-04 Yao Qi <yao@codesourcery.com>
7024
7025 * Makefile.in: Remove GNU make feature --directory.
7026
7027 2011-03-05 Yao Qi <yao@codesourcery.com>
7028
7029 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7030 (subdir_do): New make target. Copied from gdb/Makefile.
7031 (maintainer-clean, realclean, distclean, clean): Call corresponding
7032 make targets in common/Makefile.
7033
7034 2011-02-11 Yao Qi <yao@codesourcery.com>
7035
7036 * configure.ac: Call AC_PROG_RANLIB.
7037 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7038 * configure: Regenerate.
7039
7040 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7041
7042 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7043
7044 2011-03-06 Yao Qi <yao@codesourcery.com>
7045
7046 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7047
7048 2011-03-05 Yao Qi <yao@codesourcery.com>
7049
7050 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7051 (subdir_do): New make target. Copied from gdb/Makefile.
7052 (maintainer-clean, realclean, distclean, clean): Call corresponding
7053 make targets in common/Makefile.
7054
7055 2011-03-04 Yao Qi <yao@codesourcery.com>
7056
7057 * Makefile.in: Remove GNU make feature --directory.
7058
7059 2011-03-04 Michael Snyder <msnyder@vmware.com>
7060
7061 * server.c (queue_stop_reply): Call xmalloc not malloc.
7062
7063 2011-03-02 Michael Snyder <msnyder@vmware.com>
7064
7065 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7066
7067 2011-02-28 Michael Snyder <msnyder@vmware.com>
7068
7069 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7070 (cmd_qtframe): Ditto.
7071 (cmd_qtbuffer): Ditto.
7072 (cmd_bigqtbuffer): Ditto.
7073
7074 * utils.c (decimal2str): Initialize 'width' to nine, then
7075 don't mess with it.
7076
7077 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7078
7079 * hostio.c (require_data): Free *data, not data.
7080
7081 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7082
7083 * hostio.c (require_data): Use free, not xfree.
7084
7085 2011-02-27 Michael Snyder <msnyder@vmware.com>
7086
7087 * server.c (handle_query): Discard unused value.
7088
7089 * hostio.c (require_data): Free malloc memory before returning
7090 error.
7091
7092 2011-02-26 Michael Snyder <msnyder@vmware.com>
7093
7094 * linux-low.c (list_threads): Call closedir for dirent.
7095
7096 2011-02-27 Michael Snyder <msnyder@vmware.com>
7097
7098 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7099 a case statement falls through.
7100
7101 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7102
7103 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7104 in comparison.
7105
7106 2011-02-26 Michael Snyder <msnyder@vmware.com>
7107
7108 * utils.c (decimal2str): Eliminate dead code and dead param.
7109 (pulongest): Drop dead param from call to decimal2str.
7110 (plongest): Ditto.
7111
7112 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7113
7114 Revert the following patch (not approved yet):
7115 2011-02-21 Hui Zhu <teawater@gmail.com>
7116 * tracepoint.c (tp_printf): New function.
7117 (eval_agent_expr): Handle gdb_agent_op_printf.
7118
7119 2011-02-21 Hui Zhu <teawater@gmail.com>
7120
7121 * tracepoint.c (tp_printf): New function.
7122 (eval_agent_expr): Handle gdb_agent_op_printf.
7123
7124 2011-02-18 Tom Tromey <tromey@redhat.com>
7125
7126 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7127 (tracepoint.o): Likewise.
7128 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7129 (gdb_agent_op_names): Likewise.
7130
7131 2011-02-18 Tom Tromey <tromey@redhat.com>
7132
7133 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7134 gdb_agent_op_rot>: New constants.
7135 (gdb_agent_op_names): Add pick and roll.
7136 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7137 cases.
7138
7139 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7140
7141 * aclocal.m4: Regenerated with aclocal-1.11.1.
7142
7143 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7144
7145 * server.c (handle_qxfer_traceframe_info): New.
7146 (qxfer_packets): Register "traceframe-info".
7147 (handle_query): Report support for qXfer:traceframe-info:read+.
7148 * tracepoint.c (match_blocktype): New.
7149 (traceframe_find_block_type): Rename to ...
7150 (traceframe_walk_blocks): ... this. Add callback filter argument,
7151 and use it.
7152 (traceframe_find_block_type): New, reimplemented on top of
7153 traceframe_walk_blocks.
7154 (build_traceframe_info_xml): New.
7155 (traceframe_read_info): New.
7156 * server.h (traceframe_read_info): Declare.
7157
7158 2011-02-11 Yao Qi <yao@codesourcery.com>
7159
7160 * configure.ac: Call AC_PROG_RANLIB.
7161 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7162 * configure: Regenerate.
7163
7164 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7165
7166 * server.c (gdb_read_memory): Change return semantics to allow
7167 partial transfers.
7168 (handle_search_memory_1): Adjust.
7169 (process_serial_event) <'m' packet>: Handle partial transfers.
7170 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7171
7172 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7173
7174 * regcache.c (init_register_cache): Initialize
7175 regcache->register_status.
7176 (free_register_cache): Release regcache->register_status.
7177 (regcache_cpy): Copy register_status.
7178 (registers_to_string): Print 'x's for unavailable registers.
7179 (supply_register): Mark the register's status valid or
7180 unavailable, depending on whether a buffer was passed in or not.
7181 (supply_register_zeroed): New.
7182 (supply_regblock): Mark the registers' status valid or
7183 unavailable, depending on whether a buffer was passed in or not.
7184 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7185 (struct regcache): New `register_status' field.
7186 (supply_register_zeroed): Declare.
7187 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7188 supply_register_zeroed, rather than passing a NULL buffer to
7189 supply_register.
7190 * tracepoint.c (fetch_traceframe_registers): Update comment.
7191
7192 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7193
7194 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7195 buffer explicit.
7196
7197 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7198
7199 * server.h (decode_xfer_write): Change prototype.
7200 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7201 and don't extract the annex here.
7202 * server.c (decode_xfer_read): Remove `annex' parameter,
7203 and don't extract the annex here.
7204 (decode_xfer): New.
7205 (struct qxfer): New.
7206 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7207 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7208 (handle_qxfer_statictrace): New functions, abstracted out from
7209 handle_query, and made to use the struct qxfer interface.
7210 (handle_threads_qxfer_proper): Rename to ...
7211 (handle_qxfer_threads_proper): ... this.
7212 (handle_threads_qxfer): Rename to ...
7213 (handle_qxfer_threads): ... this. Adjust.
7214 (qxfer_packets): New array.
7215 (handle_qxfer): New function.
7216 (handle_query): Use handle_qxfer.
7217
7218 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7219
7220 * gdbreplay.c: Shorten lines of >= 80 columns.
7221 * linux-low.c: Ditto.
7222 * linux-ppc-low.c: Ditto.
7223 * linux-s390-low.c: Ditto.
7224 * linux-sparc-low.c: Ditto.
7225 * linux-x86-low.c: Ditto.
7226 * linux-xtensa-low.c: Ditto.
7227 * mem-break.c: Ditto.
7228 * nto-low.c: Ditto.
7229 * regcache.h: Ditto.
7230 * remote-utils.c: Ditto.
7231 * server.c: Ditto.
7232 * server.h: Ditto.
7233 * thread-db.c: Ditto.
7234 * tracepoint.c: Ditto.
7235 * utils.c: Ditto.
7236 * win32-low.h: Ditto.
7237
7238 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7239
7240 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7241 update.
7242
7243 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7244
7245 * server.c (gdbserver_version): Update copyright year in version
7246 output.
7247 * gdbreplay.c (gdbreplay_version): Ditto.
7248
7249 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7250
7251 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7252 * linux-bfin-low.c: New file.
7253 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7254 PT_DATA_ADDR for BFIN targets.
7255 * Makefile.in (SFILES): Add linux-bfin-low.c.
7256 (clean): Remove reg-bfin.c.
7257 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7258 * README: Mention supported Blackfin targets.
7259
7260 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7261
7262 * .gitignore: New file.
7263
7264 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7265
7266 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7267
7268 2010-10-22 Jie Zhang <jie@codesourcery.com>
7269
7270 * Makefile.in: Add FLAGS_TO_PASS variable.
7271 (install): Remove dependency of install-only and recursively
7272 invoke make for install-only.
7273
7274 2010-10-04 Doug Evans <dje@google.com>
7275
7276 * Makefile.in (uninstall): Use $(DESTDIR).
7277
7278 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7279
7280 PR gdb/11842
7281
7282 * linux-x86-low.c (compat_siginfo_from_siginfo)
7283 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7284 si_code is < 0. Check for si_code == SI_TIMER before checking for
7285 si_code < 0.
7286
7287 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7288
7289 * lynx-i386-low.c: New file.
7290 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7291
7292 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7293
7294 * lynx-low.c (ptrace_request_to_str): Remove handling for
7295 request values that have been removed in LynxOS 5.x.
7296
7297 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7298
7299 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7300 <ptrace.h>
7301
7302 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7303
7304 * configure.ac: Add --enable-inprocess-agent option.
7305 * configure: Rebuilt.
7306
7307 2010-09-06 Yao Qi <yao@codesourcery.com>
7308
7309 * linux-low.c (linux_kill): Remove unused variable.
7310 (linux_stabilize_threads): Likewise.
7311 * server.c (start_inferior): Likewise.
7312 (queue_stop_reply_callback): Likewise.
7313 * tracepoint.c (do_action_at_tracepoint): Likewise.
7314
7315 2010-09-06 Yao Qi <yao@codesourcery.com>
7316
7317 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7318 on return.
7319
7320 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7321
7322 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7323
7324 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7325
7326 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7327 "$(IPA_DEPFILES)".
7328
7329 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7330
7331 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7332 gdbserver/lynx-ppc-low.c: New files.
7333 * Makefile.in (lynx_low_h): New variable.
7334 (lynx-low.o, lynx-ppc-low.o): New rules.
7335 * configure.ac: On LynxOS, link with -lnetinet.
7336 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7337 * configure: regenerate.
7338
7339 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7340
7341 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7342 * configure.ac: Add check for vasprintf and vsnprintf.
7343 * configure, config.in: Regenerate.
7344 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7345
7346 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7347
7348 * gdbreplay.c: Move include of alloca.h up, next to include of
7349 malloc.h.
7350 * server.h: Add include of malloc.h.
7351 * mem-break.c: Remove include of malloc.h.
7352 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7353
7354 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7355
7356 * Makefile.in (memmem.o): Build with -Wno-error.
7357
7358 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7359
7360 * utils.c (xsnprintf): Make non-static.
7361 * server.h: Add xsnprintf declaration.
7362 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7363 replace calls to snprintf by calls to xsnprintf throughout.
7364
7365 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7366
7367 * configure.ac: Add configure check for alloca.
7368 * configure, config.in: Regenerate.
7369 * server.h: Include alloca.h if it exists.
7370 * gdbreplay.c: Include alloca.h if it exists.
7371
7372 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7373
7374 * linux-low.c (__SIGRTMIN): Define if not already defined.
7375 (linux_create_inferior): Check for __ANDROID__ rather than
7376 __SIGRTMIN.
7377 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7378 are already deferred.
7379 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7380 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7381 stopped and already has a pending signal to report.
7382 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7383 a pending signal to report or is moving out of a jump pad.
7384 (linux_init_signals): Check for __ANDROID__ rather than
7385 __SIGRTMIN.
7386
7387 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7388
7389 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7390 debug_threads check. Avoid a linear search when not doing debug
7391 output.
7392
7393 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7394
7395 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7396 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7397 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7398 (process_event): Change local fd's type to gdb_fildes_t.
7399 (create_file_handler): Adjust prototype.
7400 (delete_file_handler): Adjust prototype.
7401 (handle_file_event): Adjust prototype. Use pfildes.
7402 (create_file_event): Adjsut prototype.
7403 * remote-utils.c (remote_desc, listen_desc): Change type to
7404 gdb_fildes_t.
7405 * server.h: New gdb_fildes_t typedef.
7406 [USE_WIN32API]: Include winsock2.h.
7407 (delete_file_handler, add_file_handler): Adjust prototypes.
7408 (pfildes): Declare.
7409 * utils.c (pfildes): New.
7410
7411 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7412
7413 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7414 * configure: Regenerate.
7415
7416 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7417
7418 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7419 (linux_done_accessing_memory): ... this.
7420 (linux_target_ops): Adjust.
7421 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7422 * nto-low.c (nto_target_ops): Adjust comment.
7423 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7424 * spu-low.c (spu_target_ops): Adjust comment.
7425 * target.h (target_ops): Rename unprepare_to_access_memory field
7426 to done_accessing_memory.
7427 (unprepare_to_access_memory): Rename to ...
7428 (done_accessing_memory): ... this.
7429
7430 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7431
7432 * linux-low.c (linux_prepare_to_access_memory): New.
7433 (linux_unprepare_to_access_memory): New.
7434 (linux_target_ops): Install them.
7435 * server.c (read_memory): Rename to ...
7436 (gdb_read_memory): ... this. Use
7437 prepare_to_access_memory/prepare_to_access_memory.
7438 (write_memory): Rename to ...
7439 (gdb_write_memory): ... this. Use
7440 prepare_to_access_memory/prepare_to_access_memory.
7441 (handle_search_memory_1): Adjust.
7442 (process_serial_event): Adjust.
7443 * target.h (struct target_ops): New fields
7444 prepare_to_access_memory and unprepare_to_access_memory.
7445 (prepare_to_access_memory, unprepare_to_access_memory): New.
7446 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7447 prepare_to_access_memory/prepare_to_access_memory.
7448 * nto-low.c (nto_target_ops): Adjust.
7449 * spu-low.c (spu_target_ops): Adjust.
7450 * win32-low.c (win32_target_ops): Adjust.
7451
7452 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7453
7454 * Makefile.in (WARN_CFLAGS): Get it from configure.
7455 (WERROR_CFLAGS): New.
7456 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7457 * configure.ac: Introduce --enable-werror, which adds -Werror to
7458 the compiler command line. Enabled by default. Disable with
7459 --disable-werror. Add -Wdeclaration-after-statement
7460 Wpointer-arith and -Wformat-nonliteral to warning flags.
7461 * configure: Regenerate.
7462
7463 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7464
7465 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7466
7467 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7468
7469 * gdbreplay.c (remote_error): New.
7470 (gdbchar): New.
7471 (expect): Use gdbchar. Check for error reading from GDB.
7472 Clarify sync error output.
7473 (play): Check for errors writing to GDB.
7474 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7475 * remote-utils.c (getpkt): Check for errors writing to the remote
7476 descriptor.
7477
7478 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7479
7480 * linux-low.c (linux_wait_1): Move non-debugging code out of
7481 `debug_threads' control.
7482
7483 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7484
7485 * linux-low.c (linux_wait_1): Don't set last_status here.
7486 * server.c (push_event, queue_stop_reply_callback): Assert we're
7487 not pushing a TARGET_WAITKIND_IGNORE event.
7488 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7489 (myresume, handle_target_event): Set the thread's last_resume_kind
7490 and last_status from the target returned status.
7491
7492 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7493
7494 PR threads/10729
7495
7496 * linux-x86-low.c (update_debug_registers_callback): New.
7497 (i386_dr_low_set_addr): Use it.
7498 (i386_dr_low_get_addr): New.
7499 (i386_dr_low_set_control): Use update_debug_registers_callback.
7500 (i386_dr_low_get_control): New.
7501 (i386_dr_low_get_status): Adjust.
7502 * linux-low.c (linux_stop_lwp): New.
7503 * linux-low.h (linux_stop_lwp): Declare.
7504
7505 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7506 argument instead of a i386_debug_reg_state.
7507 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7508 a i386_debug_reg_state.
7509 (i386_insert_aligned_watchpoint): Adjust.
7510 (i386_remove_aligned_watchpoint): Adjust.
7511 (i386_low_stopped_data_address): Read the debug registers from the
7512 inferior instead of from the mirrors.
7513 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7514 (i386_dr_low_get_addr): Declare.
7515 (i386_dr_low_get_control): Declare.
7516 (i386_dr_low_get_status): Change prototype.
7517
7518 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7519 (i386_dr_low_get_addr): New.
7520 (i386_dr_low_get_control): New.
7521 (i386_dr_low_get_status): Adjust prototype. Return
7522 dr_status_mirror.
7523 (i386_initial_stuff): Clear dr_status_mirror and
7524 dr_control_mirror.
7525 (i386_get_thread_context): Adjust.
7526 (i386_set_thread_context): Adjust.
7527 (i386_thread_added): Adjust.
7528
7529 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7530
7531 * linux-low.h (linux_thread_area): Delete declaration.
7532
7533 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7534
7535 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7536 after its termination.
7537
7538 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7539
7540 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7541 (gdb_wants_all_stopped): Delete.
7542 (linux_wait_1): Don't call them.
7543 * server.c (handle_v_cont): Tag all threads as want-stopped.
7544 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7545 stopped as "client-wants-stopped".
7546
7547 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7548
7549 * Makefile.in (signals_h): New.
7550 (server_h): Depend on it.
7551 (server.o): Don't depend on $(signals_def).
7552 (signals.o): Depend on $(signals_def).
7553
7554 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7555
7556 * Makefile.in (signals_def): New.
7557 (server_h): Append include/gdb/signals.h and signals_def.
7558 (server.o): Append signals_def.
7559
7560 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7561
7562 * server.c (handle_target_event): Use target_signal_to_host for
7563 resume_info.sig initialization.
7564 * target.h (struct thread_resume) <sig>: New comment.
7565
7566 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7567
7568 * server.c (handle_query): strcpy() the returned string from paddress()
7569 instead of sprintf().
7570 * utils.c (paddress): Return phex_nz().
7571
7572 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7573
7574 * server.c (handle_v_cont): Call mourn_inferior if process
7575 just exited.
7576 (myresume): Likewise.
7577
7578 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7579
7580 Static tracepoints, and integration with UST.
7581
7582 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7583 * mem-break.c (uninsert_all_breakpoints)
7584 (reinsert_all_breakpoints): New.
7585 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7586 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7587 (gdb_agent_ust_loaded, helper_thread_id)
7588 (gdb_agent_helper_thread_id): New macros.
7589 (struct ipa_sym_addresses): Add addr_ust_loaded,
7590 addr_helper_thread_id, addr_cmd_buf.
7591 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7592 (in_process_agent_loaded_ust): New.
7593 (write_e_ust_not_loaded): New.
7594 (maybe_write_ipa_ust_not_loaded): New.
7595 (struct collect_static_trace_data_action): New.
7596 (enum tracepoint_type) <static_tracepoint>: New.
7597 (struct tracepoint) <handle>: Mention static tracepoints.
7598 (struct static_tracepoint_ctx): New.
7599 (CMD_BUF_SIZE): New.
7600 (add_tracepoint_action): Handle static tracepoint actions.
7601 (unprobe_marker_at): New.
7602 (clear_installed_tracepoints): Handle static tracepoints.
7603 (cmd_qtdp): Handle static tracepoints.
7604 (probe_marker_at): New.
7605 (cmd_qtstart): Handle static tracepoints.
7606 (response_tracepoint): Handle static tracepoints.
7607 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7608 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7609 (get_context_regcache): Handle static tracepoints.
7610 (do_action_at_tracepoint): Handle static tracepoint actions.
7611 (traceframe_find_block_type): Handle static trace data blocks.
7612 (traceframe_read_sdata): New.
7613 (download_tracepoints): Download static tracepoint actions.
7614 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7615 (GDB_PROBE_NAME): New.
7616 (ust_ops): New.
7617 (GET_UST_SYM): New.
7618 (USTF): New.
7619 (dlsym_ust): New.
7620 (ust_marker_to_static_tracepoint): New.
7621 (gdb_probe): New.
7622 (collect_ust_data_at_tracepoint): New.
7623 (gdb_ust_probe): New.
7624 (UNIX_PATH_MAX, SOCK_DIR): New.
7625 (gdb_ust_connect_sync_socket): New.
7626 (resume_thread, stop_thread): New.
7627 (run_inferior_command): New.
7628 (init_named_socket): New.
7629 (gdb_ust_socket_init): New.
7630 (cstr_to_hexstr): New.
7631 (next_st): New.
7632 (first_marker, next_marker): New.
7633 (response_ust_marker): New.
7634 (cmd_qtfstm, cmd_qtsstm): New.
7635 (unprobe_marker_at, probe_marker_at): New.
7636 (cmd_qtstmat, gdb_ust_thread): New.
7637 (gdb_ust_init): New.
7638 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7639 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7640 (ST_REGENTRY): New.
7641 (x86_64_st_collect_regmap): New.
7642 (X86_64_NUM_ST_COLLECT_GREGS): New.
7643 (AMD64_RIP_REGNUM): New.
7644 (supply_static_tracepoint_registers): New.
7645 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7646 (ST_REGENTRY): New.
7647 (i386_st_collect_regmap): New.
7648 (i386_NUM_ST_COLLECT_GREGS): New.
7649 (supply_static_tracepoint_registers): New.
7650 * server.c (handle_query): Handle qXfer:statictrace:read.
7651 <qSupported>: Report support for StaticTracepoints, and
7652 qXfer:statictrace:read features.
7653 * server.h (traceframe_read_sdata)
7654 (supply_static_tracepoint_registers): Declare.
7655 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7656 (unpack_varlen_hex): Include in IPA build.
7657 * Makefile.in (ustlibs, ustinc): New.
7658 (IPA_OBJS): Add remote-utils-ipa.o.
7659 ($(IPA_LIB)): Link -ldl and -lpthread.
7660 (UST_CFLAGS): New.
7661 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7662 * config.in, configure: Regenerate.
7663
7664 2010-06-20 Ian Lance Taylor <iant@google.com>
7665 Pedro Alves <pedro@codesourcery.com>
7666
7667 * linux-x86-low.c (always_true): Delete.
7668 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7669 trying to fool the compiler with always_true.
7670
7671 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7672
7673 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7674 conditions in gdbserver.
7675
7676 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7677
7678 * spu-low.c (spu_read_memory): Wrap around local store limit.
7679 (spu_write_memory): Likewise.
7680
7681 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7682
7683 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7684 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7685 LONGEST uses.
7686 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7687 uses.
7688 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7689 uses with LONGEST uses.
7690
7691 2010-06-14 Stan Shebs <stan@codesourcery.com>
7692 Pedro Alves <pedro@codesourcery.com>
7693
7694 Bytecode compiler.
7695
7696 * linux-x86-low.c: Include limits.h.
7697 (add_insns): New.
7698 (always_true): New.
7699 (EMIT_ASM): New.
7700 (EMIT_ASM32): New.
7701 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7702 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7703 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7704 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7705 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7706 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7707 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7708 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7709 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7710 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7711 (amd64_emit_void_call_2): New.
7712 (amd64_emit_ops): New.
7713 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7714 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7715 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7716 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7717 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7718 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7719 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7720 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7721 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7722 (i386_emit_stack_adjust, i386_emit_int_call_1)
7723 (i386_emit_void_call_2): New.
7724 (i386_emit_ops): New.
7725 (x86_emit_ops): New.
7726 (the_low_target): Install x86_emit_ops.
7727 * server.h (struct emit_ops): New.
7728 (get_raw_reg_func_addr): Declare.
7729 (current_insn_ptr, emit_error): Declare.
7730 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7731 (set_trace_state_variable_value): New defines.
7732 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7733 addr_get_trace_state_variable_value and
7734 addr_set_trace_state_variable_value.
7735 (symbol_list): New fields for get_raw_reg,
7736 get_trace_state_variable_value and set_trace_state_variable_value.
7737 (condfn): New typedef.
7738 (struct tracepoint): New field `compiled_cond'.
7739 (do_action_at_tracepoint): Clear compiled_cond.
7740 (get_trace_state_variable_value, set_trace_state_variable_value):
7741 Export in the IPA.
7742 (condition_true_at_tracepoint): If there's a compiled condition,
7743 run that.
7744 (current_insn_ptr, emit_error): New globals.
7745 (struct bytecode_address): New.
7746 (get_raw_reg_func_addr): New.
7747 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7748 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7749 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7750 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7751 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7752 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7753 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7754 (compile_tracepoint_condition, compile_bytecodes): New.
7755 * target.h (emit_ops): Forward declare.
7756 (struct target_ops): New field emit_ops.
7757 (target_emit_ops): New.
7758 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7759 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7760 * linux-low.c (linux_emit_ops): New.
7761 (linux_target_ops): Install it.
7762 * linux-low.h (struct linux_target_ops): New field emit_ops.
7763
7764 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7765
7766 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7767 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7768
7769 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7770 Stan Shebs <stan@codesourcery.com>
7771
7772 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7773 (all): Depend on $(extra_libraries).
7774 (install-only): Install the IPA.
7775 (IPA_OBJS, IPA_LIB): New.
7776 (clean): Remove the IPA lib.
7777 (IPAGENT_CFLAGS): New.
7778 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7779 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7780 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7781 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7782 * configure.ac: Check for atomic builtins support in the compiler.
7783 (IPA_DEPFILES, extra_libraries): Define.
7784 * configure.srv (ipa_obj): Add description.
7785 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7786 (i[34567]86-*-linux*): Set ipa_obj.
7787 (x86_64-*-linux*): Set ipa_obj.
7788 * linux-low.c (stabilizing_threads): New.
7789 (supports_fast_tracepoints): New.
7790 (linux_detach): Stabilize threads before detaching.
7791 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7792 the lwp is either not stabilizing, or is moving out of a jump pad.
7793 (linux_fast_tracepoint_collecting): New.
7794 (maybe_move_out_of_jump_pad): New.
7795 (enqueue_one_deferred_signal): New.
7796 (dequeue_one_deferred_signal): New.
7797 (linux_wait_for_event_1): If moving out of a jump pad, defer
7798 pending signals to later.
7799 (linux_stabilize_threads): New.
7800 (linux_wait_1): Check if threads need moving out of jump pads, and
7801 do it if so.
7802 (stuck_in_jump_pad_callback): New.
7803 (move_out_of_jump_pad_callback): New.
7804 (lwp_running): New.
7805 (linux_resume_one_lwp): Handle moving out of jump pads.
7806 (linux_set_resume_request): Dequeue deferred signals.
7807 (need_step_over_p): Also step over fast tracepoint jumps.
7808 (start_step_over): Also uninsert fast tracepoint jumps.
7809 (finish_step_over): Also reinsert fast tracepoint jumps.
7810 (linux_install_fast_tracepoint_jump): New.
7811 (linux_target_ops): Install linux_stabilize_threads and
7812 linux_install_fast_tracepoint_jump_pad.
7813 * linux-low.h (linux_target_ops) <get_thread_area,
7814 install_fast_tracepoint_jump_pad>: New fields.
7815 (struct lwp_info) <collecting_fast_tracepoint,
7816 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7817 (linux_get_thread_area): Declare.
7818 * linux-x86-low.c (jump_insn): New.
7819 (x86_get_thread_area): New.
7820 (append_insns): New.
7821 (push_opcode): New.
7822 (amd64_install_fast_tracepoint_jump_pad): New.
7823 (i386_install_fast_tracepoint_jump_pad): New.
7824 (x86_install_fast_tracepoint_jump_pad): New.
7825 (the_low_target): Install x86_get_thread_area and
7826 x86_install_fast_tracepoint_jump_pad.
7827 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7828 (struct fast_tracepoint_jump): New.
7829 (fast_tracepoint_jump_insn): New.
7830 (fast_tracepoint_jump_shadow): New.
7831 (find_fast_tracepoint_jump_at): New.
7832 (fast_tracepoint_jump_here): New.
7833 (delete_fast_tracepoint_jump): New.
7834 (set_fast_tracepoint_jump): New.
7835 (uninsert_fast_tracepoint_jumps_at): New.
7836 (reinsert_fast_tracepoint_jumps_at): New.
7837 (set_breakpoint_at): Use write_inferior_memory.
7838 (uninsert_raw_breakpoint): Use write_inferior_memory.
7839 (check_mem_read): Mask out fast tracepoint jumps.
7840 (check_mem_write): Mask out fast tracepoint jumps.
7841 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7842 (set_fast_tracepoint_jump): Declare.
7843 (delete_fast_tracepoint_jump)
7844 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7845 (reinsert_fast_tracepoint_jumps_at): Declare.
7846 * regcache.c: Don't compile many functions when building the
7847 in-process agent library.
7848 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7849 the register buffer in the heap.
7850 (free_register_cache): If the register buffer isn't owned by the
7851 regcache, don't free it.
7852 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7853 pre-existing register caches.
7854 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7855 type.
7856 (convert_ascii_to_int): : Constify `from' parameter type.
7857 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7858 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7859 the needed buffer in-place.
7860 (relocate_instruction): New.
7861 * server.c (handle_query) <qSymbols>: If the target supports
7862 tracepoints, give it a chance of looking up symbols. Report
7863 support for fast tracepoints.
7864 (handle_status): Stabilize threads.
7865 (process_serial_event): Adjust.
7866 * server.h (struct fast_tracepoint_jump): Forward declare.
7867 (struct process_info) <fast_tracepoint_jumps>: New field.
7868 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7869 (decode_X_packet, decode_M_packet): Adjust.
7870 (relocate_instruction): Declare.
7871 (in_process_agent_loaded): Declare.
7872 (tracepoint_look_up_symbols): Declare.
7873 (struct fast_tpoint_collect_status): Declare.
7874 (fast_tracepoint_collecting): Declare.
7875 (force_unlock_trace_buffer): Declare.
7876 (handle_tracepoint_bkpts): Declare.
7877 (initialize_low_tracepoint)
7878 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7879 * target.h (struct target_ops) <stabilize_threads,
7880 install_fast_tracepoint_jump_pad>: New fields.
7881 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7882 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7883 [HAVE_STDINT_H]: Include stdint.h.
7884 (trace_debug_1): Rename to ...
7885 (trace_vdebug): ... this.
7886 (trace_debug): Rename to ...
7887 (trace_debug_1): ... this. Add `level' parameter.
7888 (trace_debug): New.
7889 (ATTR_USED, ATTR_NOINLINE): New.
7890 (IP_AGENT_EXPORT): New.
7891 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7892 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7893 (about_to_request_buffer_space, trace_buffer_is_full)
7894 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7895 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7896 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7897 (traceframe_write_count, traceframes_created)
7898 (trace_state_variables)
7899 New renaming defines.
7900 (struct ipa_sym_addresses): New.
7901 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7902 (symbol_list): New.
7903 (ipa_sym_addrs): New.
7904 (all_tracepoint_symbols_looked_up): New.
7905 (in_process_agent_loaded): New.
7906 (write_e_ipa_not_loaded): New.
7907 (maybe_write_ipa_not_loaded): New.
7908 (tracepoint_look_up_symbols): New.
7909 (debug_threads) [IN_PROCESS_AGENT]: New.
7910 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7911 (UNKNOWN_SIDE_EFFECTS): New.
7912 (stop_tracing): New.
7913 (flush_trace_buffer): New.
7914 (stop_tracing_bkpt): New.
7915 (flush_trace_buffer_bkpt): New.
7916 (read_inferior_integer): New.
7917 (read_inferior_uinteger): New.
7918 (read_inferior_data_pointer): New.
7919 (write_inferior_data_pointer): New.
7920 (write_inferior_integer): New.
7921 (write_inferior_uinteger): New.
7922 (struct collect_static_trace_data_action): Delete.
7923 (enum tracepoint_type): New.
7924 (struct tracepoint) <type>: New field `type'.
7925 <actions_str, step_actions, step_actions_str>: Only include in
7926 GDBserver.
7927 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7928 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7929 (tracepoints): Use IP_AGENT_EXPORT.
7930 (last_tracepoint): Don't include in the IPA.
7931 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7932 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7933 (alloced_trace_state_variables): New.
7934 (trace_state_variables): Use IP_AGENT_EXPORT.
7935 (traceframe_t): Delete unused variable.
7936 (circular_trace_buffer): Don't include in the IPA.
7937 (trace_buffer_start): Delete.
7938 (struct trace_buffer_control): New.
7939 (trace_buffer_free): Delete.
7940 (struct ipa_trace_buffer_control): New.
7941 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7942 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7943 New.
7944 (trace_buffer_ctrl): New.
7945 (TRACE_BUFFER_CTRL_CURR): New.
7946 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7947 Reimplement as macros.
7948 (trace_buffer_wrap): Delete.
7949 (traceframe_write_count, traceframe_read_count)
7950 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7951 (struct tracepoint_hit_ctx) <type>: New field.
7952 (struct fast_tracepoint_ctx): New.
7953 (memory_barrier): New.
7954 (cmpxchg): New.
7955 (record_tracepoint_error): Update atomically in the IPA.
7956 (clear_inferior_trace_buffer): New.
7957 (about_to_request_buffer_space): New.
7958 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7959 updating the same buffer.
7960 (add_tracepoint): Default the tracepoint's type to trap
7961 tracepoint, and orig_size to -1.
7962 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7963 internal variables.
7964 (create_trace_state_variable): New parameter `gdb'. Handle it.
7965 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7966 (cmd_qtdp): Handle fast tracepoints.
7967 (cmd_qtdv): Adjust.
7968 (max_jump_pad_size): New.
7969 (gdb_jump_pad_head): New.
7970 (get_jump_space_head): New.
7971 (claim_jump_space): New.
7972 (sort_tracepoints): New.
7973 (MAX_JUMP_SIZE): New.
7974 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7975 IPA.
7976 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7977 support. Upload fast traceframes, and delete internal IPA
7978 breakpoints.
7979 (stop_tracing_handler): New.
7980 (flush_trace_buffer_handler): New.
7981 (cmd_qtstop): Upload fast tracepoints.
7982 (response_tracepoint): Handle fast tracepoints.
7983 (tracepoint_finished_step): Upload fast traceframes. Set the
7984 tracepoint hit context's tracepoint type.
7985 (handle_tracepoint_bkpts): New.
7986 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7987 type. Add comment about fast tracepoints.
7988 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7989 non-existing action_str field.
7990 (get_context_regcache): Handle fast tracepoints.
7991 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7992 to the regcache.
7993 (fast_tracepoint_from_jump_pad_address): New.
7994 (fast_tracepoint_from_ipa_tpoint_address): New.
7995 (collecting_t): New.
7996 (force_unlock_trace_buffer): New.
7997 (fast_tracepoint_collecting): New.
7998 (collecting): New.
7999 (gdb_collect): New.
8000 (write_inferior_data_ptr): New.
8001 (target_tp_heap): New.
8002 (target_malloc): New.
8003 (download_agent_expr): New.
8004 (UALIGN): New.
8005 (download_tracepoints): New.
8006 (download_trace_state_variables): New.
8007 (upload_fast_traceframes): New.
8008 (IPA_FIRST_TRACEFRAME): New.
8009 (IPA_NEXT_TRACEFRAME_1): New.
8010 (IPA_NEXT_TRACEFRAME): New.
8011 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
8012 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
8013 (gdb_jump_pad_buffer_end): New.
8014 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
8015 (initialize_tracepoint): Adjust.
8016 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
8017 buffer. Initialize the low module.
8018 * utils.c (PREFIX, TOOLNAME): New.
8019 (malloc_failure): Use PREFIX.
8020 (error): In the IPA, an error causes an exit.
8021 (fatal, warning): Use PREFIX.
8022 (internal_error): Use TOOLNAME.
8023 (NUMCELLS): Increase to 10.
8024 * configure, config.in: Regenerate.
8025
8026 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8027
8028 * server.c (handle_query) <qSupported>: Do two passes over the
8029 qSupported string to avoid nesting strtok.
8030
8031 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8032
8033 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8034 (CDEPS): New.
8035 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8036 -Wl,--dynamic-list.
8037 * configure: Regenerate.
8038 * proc-service.list: New.
8039
8040 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8041
8042 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8043 New comment.
8044
8045 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8046
8047 * gdbreplay.c (remote_open): Check error return from socket() call by
8048 its equality to -1 not by it being negative.
8049 * remote-utils.c (remote_open): Likewise.
8050
8051 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8052
8053 * config.h: Regenerate.
8054
8055 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8056
8057 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8058 doesn't provide PTRACE_GET_THREAD_AREA.
8059
8060 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8061
8062 * linux-m68k-low.c: Include <asm/ptrace.h>
8063 (ps_get_thread_area): Implement.
8064
8065 2010-05-03 Doug Evans <dje@google.com>
8066
8067 * event-loop.c (struct callback_event): New struct.
8068 (callback_list): New global.
8069 (append_callback_event, delete_callback_event): New functions.
8070 (process_callback): New function.
8071 (start_event_loop): Call it.
8072 * remote-utils.c (NOT_SCHEDULED): Define.
8073 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8074 moved out of readchar.
8075 (readchar): Rewrite. Call reschedule before returning.
8076 (reset_readchar): New function.
8077 (remote_close): Call it.
8078 (process_remaining, reschedule): New functions.
8079 * server.h (callback_handler_func): New typedef.
8080 (append_callback_event, delete_callback_event): Declare.
8081
8082 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8083
8084 * proc-service.c (ps_pglobal_lookup): Use
8085 thread_db_look_up_one_symbol.
8086 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8087 parameter. Use it instead of all_symbols_looked_up.
8088 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8089 field.
8090 (all_symbols_looked_up): Don't declare.
8091 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8092 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8093 field.
8094 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8095 Set all_symbols_looked_up here.
8096 (thread_db_look_up_one_symbol): New.
8097 (thread_db_get_tls_address): Adjust.
8098 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8099 thread_db object on the heap, and tentatively set it in the
8100 process structure.
8101 (thread_db_init): Don't set all_symbols_looked_up here.
8102 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8103
8104 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8105
8106 * linux-low.c (linux_kill, linux_detach): Adjust.
8107 (status_pending_p_callback): Remove redundant statement. Check
8108 for !TARGET_WAITIKIND_IGNORE, instead of
8109 TARGET_WAITKIND_STOPPED.
8110 (handle_tracepoints): Make sure LWP is locked. Adjust.
8111 (linux_wait_for_event_1): Adjust.
8112 (linux_cancel_breakpoints): New.
8113 (unsuspend_one_lwp): New.
8114 (unsuspend_all_lwps): New.
8115 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8116 (send_sigstop_callback): Change return type to int, add new
8117 `except' parameter and handle it.
8118 (suspend_and_send_sigstop_callback): New.
8119 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8120 pass them down. If SUSPEND, also increment the lwp's suspend
8121 count.
8122 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8123 (need_step_over_p): Don't consider suspended LWPs.
8124 (start_step_over): Adjust.
8125 (proceed_one_lwp): Change return type to int, add new `except'
8126 parameter and handle it.
8127 (unsuspend_and_proceed_one_lwp): New.
8128 (proceed_all_lwps): Use find_inferior instead of
8129 for_each_inferior.
8130 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8131 also decrement the suspend count of LWPs. Pass `except' down,
8132 instead of hacking its suspend count.
8133 (linux_pause_all): Add `freeze' parameter. Adjust.
8134 (linux_unpause_all): New.
8135 (linux_target_ops): Install linux_unpause_all.
8136 * server.c (handle_status): Adjust.
8137 * target.h (struct target_ops): New fields `unpause_all' and
8138 `cancel_breakpoints'. Add new parameter to `pause_all'.
8139 (pause_all): Add new `freeze' parameter.
8140 (unpause_all): New.
8141 (cancel_breakpoints): New.
8142 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8143 cancel breakpoints.
8144 (cmd_qtstart): Pause threads.
8145 (stop_tracing): Pause threads, and cancel breakpoints.
8146 * win32-low.c (win32_target_ops): Adjust.
8147
8148 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8149
8150 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8151 the inferior right away from here...
8152 (linux_wait_1): ... to here, and adjust to check the thread's
8153 last_resume_kind instead of the lwp's step or stop_expected flags.
8154
8155 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8156
8157 * README: Use consistent `GDB' and `GDBserver' spellings.
8158
8159 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8160
8161 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8162 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8163 (linux_detach_one_lwp): Assume the lwp is stopped.
8164 (any_thread_of): Delete.
8165 (linux_detach): Stop all lwps here. Don't blindly delete all
8166 breakpoints.
8167 (delete_lwp_callback): New.
8168 (linux_mourn): Delete all lwps of the process that is gone.
8169 (linux_wait_1): Don't delete the last lwp of the process here.
8170 * mem-break.h (mark_breakpoints_out): Declare.
8171 * mem-break.c (mark_breakpoints_out): New.
8172 (free_all_breakpoints): Use it.
8173 * server.c (handle_target_event): If the process is gone, mark
8174 breakpoints out.
8175 * thread-db.c (struct thread_db) <create_bp>: New field.
8176 (thread_db_enable_reporting): Fix prototype. Store a thread event
8177 breakpoint reference in the thread_db struct.
8178 (thread_db_load_search): Clear the thread_db object.
8179 (try_thread_db_load_1): Ditto.
8180 (switch_to_process): New.
8181 (disable_thread_event_reporting): Use it.
8182 (remove_thread_event_breakpoints): New.
8183 (thread_db_detach, thread_db_mourn): Use it.
8184
8185 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8186
8187 * linux-low.c (linux_enable_event_reporting): New.
8188 (linux_wait_for_event_1, handle_extended_wait): Use it.
8189
8190 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8191
8192 * linux-low.c (linux_kill_one_lwp, linux_kill)
8193 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8194 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8195 SIGSTOP even if the LWP is stopped.
8196 (send_sigstop_callback): New.
8197 (stop_all_lwps): Use send_sigstop_callback instead.
8198 (linux_resume_one_thread): Adjust.
8199 (proceed_one_lwp): Still proceed an LWP that the client has
8200 requested to stop, if we haven't reported it as stopped yet. Make
8201 sure that LWPs the client want stopped, have a pending SIGSTOP.
8202
8203 2010-04-26 Doug Evans <dje@google.com>
8204
8205 * server.c (handle_general_set): Make static.
8206
8207 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8208 Print received char after testing for error/eof instead of before.
8209 (input_interrupt): Tweak comment.
8210
8211 2010-04-23 Doug Evans <dje@google.com>
8212
8213 * server.c (start_inferior): Print inferior argv if --debug.
8214
8215 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8216
8217 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8218 * nto-x86-low.c: Include server.h
8219
8220 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8221
8222 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8223 be consistent with other sources of this directory.
8224 (init_registers_amd64): Correct name of source file of this function
8225 in the comment.
8226
8227 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8228
8229 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8230 64-bit executables.
8231
8232 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8233
8234 * win32-i386-low.c: Add 64-bit support.
8235 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8236 (init_registers_amd64): Declare.
8237 (mappings): Add 64-bit version of array.
8238 (init_windows_x86): New function.
8239 (the_low_target): Change init_arch field to init_windows_x86.
8240
8241 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8242
8243 * win32-low.c: Adapt to support also 64-bit architecture.
8244 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8245 (get_image_name): Use SIZE_T type for local variable `done'.
8246 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8247 (toolhelp_get_dll_name): Idem.
8248 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8249 Use uintptr_t typecast to avoid warning.
8250 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8251 (handle_exception): Use phex_nz to avoid warning.
8252 (win32_wait): Remove unused local variable `process'.
8253
8254 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8255
8256 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8257 `amd64-avx.o'.
8258
8259 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8260
8261 * configure.ac: Use `ws2_32' library for srv_mingw.
8262 * configure: Regenerate.
8263 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8264 * remote-utils.c: Likewise.
8265
8266 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8267
8268 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8269 if __x86_64__ is defined.
8270
8271 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8272
8273 * configure: Regenerate.
8274
8275 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8276
8277 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8278 * target.h (target_ops): New get_tib_address field.
8279 * win32-low.h (win32_thread_info): Add thread_local_base field.
8280 * win32-low.c (child_add_thread): Add tlb argument.
8281 Set thread_local_base field to TLB.
8282 (get_child_debug_event): Adapt to child_add_thread change.
8283 (win32_get_tib_address): New function.
8284 (win32_target_ops): Set get_tib_address field to
8285 win32_get_tib_address.
8286 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8287
8288 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8289
8290 * linux-low.c (linux_mourn): Also remove the process.
8291 * server.c (handle_target_event): Don't remove the process here.
8292 * nto-low.c (nto_mourn): New.
8293 (nto_target_ops): Install it.
8294 * spu-low.c (spu_mourn): New.
8295 (spu_target_ops): Install it.
8296 * win32-low.c (win32_mourn): New.
8297 (win32_target_ops): Install it.
8298
8299 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8300
8301 * server.h (buffer_xml_printf): Remove redundant `;'.
8302
8303 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8304
8305 * regcache.c (set_register_cache): Invalidate regcaches before
8306 changing the register cache layout.
8307 (regcache_invalidate_one): Allow a NULL regcache.
8308 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8309 regcaches before changing the register cache layout or the target
8310 regsets.
8311
8312 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8313
8314 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8315 variable warning on Linux/x86-64.
8316
8317 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8318
8319 GDBserver disconnected tracing support.
8320
8321 * linux-low.c (linux_remove_process): Delete.
8322 (add_lwp): Don't set last_resume_kind here.
8323 (linux_kill): Use `mourn'.
8324 (linux_detach): Use `thread_db_detach', and `mourn'.
8325 (linux_mourn): New.
8326 (linux_attach_lwp_1): Adjust comment.
8327 (linux_attach): last_resume_kind moved the thread_info; adjust.
8328 (status_pending_p_callback): Adjust.
8329 (linux_wait_for_event_1): Adjust.
8330 (count_events_callback, select_singlestep_lwp_callback)
8331 (select_event_lwp_callback, cancel_breakpoints_callback)
8332 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8333 (proceed_one_lwp): Adjust.
8334 (linux_async): Add debug output.
8335 (linux_thread_stopped): New.
8336 (linux_pause_all): New.
8337 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8338 linux_pause_all.
8339 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8340 (thread_db_free): Delete declaration.
8341 (thread_db_detach, thread_db_mourn): Declare.
8342 * thread-db.c (thread_db_init): Use thread_db_mourn.
8343 (thread_db_free): Delete, split in two.
8344 (disable_thread_event_reporting): New.
8345 (thread_db_detach): New.
8346 (thread_db_mourn): New.
8347
8348 * server.h (struct thread_info) <last_resume_kind>: New field.
8349 <attached>: Add comment.
8350 <gdb_detached>: New field.
8351 (handler_func): Change return type to int.
8352 (handle_serial_event, handle_target_event): Ditto.
8353 (gdb_connected): Declare.
8354 (tracing): Delete.
8355 (disconnected_tracing): Declare.
8356 (stop_tracing): Declare.
8357
8358 * server.c (handle_query) <qSupported>: Report support for
8359 disconnected tracing.
8360 (queue_stop_reply_callback): Account for running threads.
8361 (gdb_wants_thread_stopped): New.
8362 (gdb_wants_all_threads_stopped): New.
8363 (gdb_reattached_process): New.
8364 (handle_status): Clear the `gdb_detached' flag of all processes.
8365 In all-stop, stop all threads.
8366 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8367 (process_serial_event): If the remote connection breaks, or if an
8368 exit was forced with "monitor exit", force an event loop exit.
8369 Handle disconnected tracing on detach.
8370 (handle_serial_event): Adjust.
8371 (handle_target_event): If GDB isn't connected, forward events back
8372 to the inferior, unless the last process exited, in which case,
8373 exit gdbserver. Adjust interface.
8374
8375 * remote-utils.c (remote_open): Don't block in accept. Instead
8376 register an event loop source on the listen socket file
8377 descriptor. Refactor bits into ...
8378 (listen_desc): ... this new global.
8379 (gdb_connected): ... this new function.
8380 (enable_async_notification): ... this new function.
8381 (handle_accept_event): ... this new function.
8382 (remote_close): Clear remote_desc.
8383
8384 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8385
8386 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8387 New fields.
8388 (mourn_inferior): Define.
8389 (target_process_qsupported): Avoid the dangling else problem.
8390 (thread_stopped): Define.
8391 (pause_all): Define.
8392 (target_waitstatus_to_string): Declare.
8393 * target.c (target_waitstatus_to_string): New.
8394
8395 * tracepoint.c (tracing): Make extern.
8396 (disconnected_tracing): New.
8397 (stop_tracing): Make extern. Handle tracing stops due to GDB
8398 disconnecting.
8399 (cmd_qtdisconnected): New.
8400 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8401 (handle_tracepoint_general_set): Handle QTDisconnected.
8402
8403 * event-loop.c (event_handler_func): Change return type to int.
8404 (process_event): Bail out if the event handler wants the event
8405 loop to stop.
8406 (handle_file_event): Ditto.
8407 (start_event_loop): Bail out if the event handler wants the event
8408 loop to stop.
8409
8410 * nto-low.c (nto_target_ops): Adjust.
8411 * spu-low.c (spu_wait): Don't remove the process here.
8412 (spu_target_ops): Adjust.
8413 * win32-low.c (win32_wait): Don't remove the process here.
8414 (win32_target_ops): Adjust.
8415
8416 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8417
8418 * regcache.c (realloc_register_cache): Invalidate inferior's
8419 regcache before recreating it.
8420
8421 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8422
8423 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8424
8425 2010-04-09 Stan Shebs <stan@codesourcery.com>
8426 Pedro Alves <pedro@codesourcery.com>
8427
8428 * server.h (LONGEST): New.
8429 (struct thread_info) <while_stepping>: New field.
8430 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8431 Declare.
8432 (initialize_tracepoint, handle_tracepoint_general_set)
8433 (handle_tracepoint_query, tracepoint_finished_step)
8434 (tracepoint_was_hit, release_while_stepping_state_list):
8435 (current_traceframe): Declare.
8436 * server.c (handle_general_set): Handle tracepoint packets.
8437 (read_memory): New.
8438 (write_memory): New.
8439 (handle_search_memory_1): Use read_memory.
8440 (handle_query): Report support for conditional tracepoints, trace
8441 state variables, and tracepoint sources. Handle tracepoint
8442 queries.
8443 (main): Initialize the tracepoints module.
8444 (process_serial_event): Handle traceframe reads/writes.
8445
8446 * linux-low.c (handle_tracepoints): New.
8447 (linux_wait_1): Call it.
8448 (linux_resume_one_lwp): Handle while-stepping.
8449 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8450 (linux_target_ops): Install them.
8451 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8452 New field.
8453 * linux-x86-low.c (x86_supports_tracepoints): New.
8454 (the_low_target). Install it.
8455
8456 * mem-break.h (delete_breakpoint): Declare.
8457 * mem-break.c (delete_breakpoint): Make external.
8458
8459 * target.h (struct target_ops): Add `supports_tracepoints',
8460 `read_pc', and `write_pc' fields.
8461 (target_supports_tracepoints): Define.
8462 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8463 (phex_nz): New.
8464
8465 * regcache.h (struct regcache) <registers_owned>: New field.
8466 (init_register_cache, regcache_cpy): Declare.
8467 (regcache_read_pc, regcache_write_pc): Declare.
8468 (register_cache_size): Declare.
8469 (supply_regblock): Declare.
8470 * regcache.c (init_register_cache): New.
8471 (new_register_cache): Use it.
8472 (regcache_cpy): New.
8473 (register_cache_size): New.
8474 (supply_regblock): New.
8475 (regcache_read_pc, regcache_write_pc): New.
8476
8477 * tracepoint.c: New.
8478
8479 * Makefile.in (OBS): Add tracepoint.o.
8480 (tracepoint.o): New rule.
8481
8482 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8483
8484 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8485 (i386-mmx.o): New.
8486 (i386-mmx.c): Likewise.
8487 (i386-mmx-linux.o): Likewise.
8488 (i386-mmx-linux.c): Likewise.
8489
8490 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8491 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8492 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8493 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8494
8495 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8496 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8497 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8498
8499 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8500
8501 * Makefile.in (clean): Updated.
8502 (i386-avx.o): New.
8503 (i386-avx.c): Likewise.
8504 (i386-avx-linux.o): Likewise.
8505 (i386-avx-linux.c): Likewise.
8506 (amd64-avx.o): Likewise.
8507 (amd64-avx.c): Likewise.
8508 (amd64-avx-linux.o): Likewise.
8509 (amd64-avx-linux.c): Likewise.
8510
8511 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8512 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8513 (srv_amd64_regobj): Add amd64-avx.o.
8514 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8515 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8516 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8517 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8518 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8519 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8520 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8521
8522 * i387-fp.c: Include "i386-xstate.h".
8523 (i387_xsave): New.
8524 (i387_cache_to_xsave): Likewise.
8525 (i387_xsave_to_cache): Likewise.
8526 (x86_xcr0): Likewise.
8527
8528 * i387-fp.h (i387_cache_to_xsave): Likewise.
8529 (i387_xsave_to_cache): Likewise.
8530 (x86_xcr0): Likewise.
8531
8532 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8533 * linux-crisv32-low.c (target_regsets): Likewise.
8534 * linux-m68k-low.c (target_regsets): Likewise.
8535 * linux-mips-low.c (target_regsets): Likewise.
8536 * linux-ppc-low.c (target_regsets): Likewise.
8537 * linux-s390-low.c (target_regsets): Likewise.
8538 * linux-sh-low.c (target_regsets): Likewise.
8539 * linux-sparc-low.c (target_regsets): Likewise.
8540 * linux-xtensa-low.c (target_regsets): Likewise.
8541
8542 * linux-low.c: Include <sys/uio.h>.
8543 (regsets_fetch_inferior_registers): Support nt_type.
8544 (regsets_store_inferior_registers): Likewise.
8545 (linux_process_qsupported): New.
8546 (linux_target_ops): Add linux_process_qsupported.
8547
8548 * linux-low.h (regset_info): Add nt_type.
8549 (linux_target_ops): Add process_qsupported.
8550
8551 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8552 and <sys/uio.h>.
8553 (init_registers_i386_avx_linux): New.
8554 (init_registers_amd64_avx_linux): Likewise.
8555 (xmltarget_i386_linux_no_xml): Likewise.
8556 (xmltarget_amd64_linux_no_xml): Likewise.
8557 (PTRACE_GETREGSET): Likewise.
8558 (PTRACE_SETREGSET): Likewise.
8559 (x86_fill_xstateregset): Likewise.
8560 (x86_store_xstateregset): Likewise.
8561 (use_xml): Likewise.
8562 (x86_linux_update_xmltarget): Likewise.
8563 (x86_linux_process_qsupported): Likewise.
8564 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8565 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8566 init_registers_i386_linux here. Call
8567 x86_linux_update_xmltarget.
8568 (the_low_target): Add x86_linux_process_qsupported.
8569
8570 * server.c (handle_query): Call target_process_qsupported.
8571
8572 * target.h (target_ops): Add process_qsupported.
8573 (target_process_qsupported): New.
8574
8575 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8576
8577 * inferiors.c (add_thread): Set last_status kind to
8578 TARGET_WAITKIND_IGNORE.
8579 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8580 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8581 (linux_wait_1): Move `thread' local definition to block that uses
8582 it. Don't NULL initialize `event_child'.
8583 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8584 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8585 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8586
8587 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8588
8589 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8590 an extended waitstatus, or by a watchpoint.
8591 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8592 thread was stepping or has been stopped by a watchpoint.
8593
8594 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8595
8596 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8597 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8598 of another, then delete the previous, and validate all
8599 breakpoints.
8600 (validate_inserted_breakpoint): New.
8601 (delete_disabled_breakpoints): New.
8602 (validate_breakpoints): New.
8603 (check_mem_read): Validate breakpoints before trusting their
8604 shadow. Delete disabled breakpoints.
8605 (check_mem_write): Validate breakpoints before trusting they
8606 should be inserted. Delete disabled breakpoints.
8607 * mem-break.h (validate_breakpoints):
8608 * server.c (handle_query): Validate breakpoints when we see a
8609 qSymbol query.
8610
8611 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8612
8613 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8614 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8615 if we could tell there's a GDB breakpoint at stop_pc.
8616 (need_step_over_p): Don't do a step over if we find a GDB
8617 breakpoint at the resume PC.
8618
8619 * mem-break.c (struct raw_breakpoint): New.
8620 (enum bkpt_type): New type `gdb_breakpoint'.
8621 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8622 fields. New field `raw'.
8623 (find_raw_breakpoint_at): New.
8624 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8625 breakpoint instead.
8626 (set_breakpoint_at): Adjust.
8627 (delete_raw_breakpoint): New.
8628 (release_breakpoint): New.
8629 (delete_breakpoint): Rename to...
8630 (delete_breakpoint_1): ... this. Add proc parameter. Use
8631 release_breakpoint. Return ENOENT.
8632 (delete_breakpoint): Reimplement.
8633 (find_breakpoint_at): Delete.
8634 (find_gdb_breakpoint_at): New.
8635 (delete_breakpoint_at): Delete.
8636 (set_gdb_breakpoint_at): New.
8637 (delete_gdb_breakpoint_at): New.
8638 (gdb_breakpoint_here): New.
8639 (set_reinsert_breakpoint): Use release_breakpoint.
8640 (uninsert_breakpoint): Rename to ...
8641 (uninsert_raw_breakpoint): ... this.
8642 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8643 (reinsert_raw_breakpoint): Change parameter type to
8644 raw_breakpoint.
8645 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8646 instead.
8647 (check_breakpoints): Adjust. Use release_breakpoint.
8648 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8649 (breakpoint_inserted_here): Ditto.
8650 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8651 Don't trust the breakpoint's shadow if it is not inserted.
8652 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8653 (delete_all_breakpoints): Adjust.
8654 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8655 use delete_breakpoint_1.
8656
8657 * mem-break.h (breakpoints_supported): Delete declaration.
8658 (set_gdb_breakpoint_at): Declare.
8659 (gdb_breakpoint_here): Declare.
8660 (delete_breakpoint_at): Delete.
8661 (delete_gdb_breakpoint_at): Declare.
8662
8663 * server.h (struct raw_breakpoint): Forward declare.
8664 (struct process_info): New field `raw_breakpoints'.
8665
8666 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8667 breakpoints.
8668
8669 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8670
8671 * linux-low.c (status_pending_p_callback): Fix comment.
8672 (linux_wait_for_event_1): Move most of the internal breakpoint
8673 handling from here...
8674 (linux_wait_1): ... to here.
8675 (count_events_callback): New.
8676 (select_singlestep_lwp_callback): New.
8677 (select_event_lwp_callback): New.
8678 (cancel_breakpoints_callback): New.
8679 (select_event_lwp): New.
8680 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8681 priority to all LWPs that have had events that should be reported
8682 to the client. Cancel breakpoints when about to reporting the
8683 event to the client, not while stopping lwps. No longer cancel
8684 finished single-steps here.
8685 (cancel_finished_single_step): Delete.
8686 (cancel_finished_single_steps): Delete.
8687
8688 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8689
8690 * mem-break.c (enum bkpt_type): New.
8691 (struct breakpoint): New field `type'.
8692 (set_breakpoint_at): Change return type to struct breakpoint
8693 pointer. Set type to `other_breakpoint' by default.
8694 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8695 in the breakpoint list.
8696 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8697 (reinsert_breakpoint): Rename to ...
8698 (reinsert_raw_breakpoint): ... this.
8699 (reinsert_breakpoints_at): Adjust.
8700 * mem-break.h (struct breakpoint): Declare.
8701 (set_breakpoint_at): Change return type to struct breakpoint
8702 pointer.
8703
8704 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8705
8706 * server.c (handle_query): Assign, not compare.
8707
8708 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8709
8710 Teach linux gdbserver to step-over-breakpoints.
8711
8712 * linux-low.c (can_hardware_single_step): New.
8713 (supports_breakpoints): New.
8714 (handle_extended_wait): If stopping threads, read the stop pc of
8715 the new cloned LWP.
8716 (get_pc): New.
8717 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8718 low target doesn't support retrieving the PC.
8719 (add_lwp): Set last_resume_kind to resume_continue.
8720 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8721 (linux_attach): Don't clear stop_expected. Set the lwp's
8722 last_resume_kind to resume_stop.
8723 (linux_detach_one_lwp): Don't check for removed breakpoints.
8724 (check_removed_breakpoint): Delete.
8725 (status_pending_p): Rename to ...
8726 (status_pending_p_callback): ... this. Don't check for removed
8727 breakpoints. Don't consider threads that are stopped from GDB's
8728 perspective.
8729 (linux_wait_for_lwp): Always read the stop_pc here.
8730 (cancel_breakpoint): New.
8731 (step_over_bkpt): New global.
8732 (linux_wait_for_event_1): Implement stepping over breakpoints.
8733 (gdb_wants_lwp_stopped): New.
8734 (gdb_wants_all_stopped): New.
8735 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8736 single-step traps here. Store the thread's last reported target
8737 wait status.
8738 (send_sigstop): Don't clear stop_expected. Always set it,
8739 instead.
8740 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8741 (cancel_finished_single_step): New.
8742 (cancel_finished_single_steps): New.
8743 (wait_for_sigstop): Don't cancel finished single-step traps here.
8744 (linux_resume_one_lwp): Don't check for removed breakpoints.
8745 Don't set `step' on non-hardware step archs.
8746 (linux_set_resume_request): Ignore resume_stop requests if already
8747 stopping or stopped. Set the lwp's last_resume_kind.
8748 (resume_status_pending_p): Don't check for removed breakpoints.
8749 (need_step_over_p): New.
8750 (start_step_over): New.
8751 (finish_step_over): New.
8752 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8753 requests. Clear the thread's last reported target waitstatus.
8754 Don't use the `suspended' flag. Don't consider pending breakpoints.
8755 (linux_resume): Start a step-over if necessary.
8756 (proceed_one_lwp): New.
8757 (proceed_all_lwps): New.
8758 (unstop_all_lwps): New.
8759 * linux-low.h (struct lwp_info): Rewrite comment for the
8760 `suspended' flag. Add the `stop_pc' field. Delete the
8761 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8762 Add `'last_resume_kind' and `need_step_over' fields.
8763 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8764 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8765 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8766 (set_raw_breakpoint_at): New.
8767 (set_breakpoint_at): Rewrite to use it.
8768 (reinsert_breakpoint_handler): Delete.
8769 (set_reinsert_breakpoint): New.
8770 (reinsert_breakpoint_by_bp): Delete.
8771 (delete_reinsert_breakpoints): New.
8772 (uninsert_breakpoint): Rewrite.
8773 (uninsert_breakpoints_at): New.
8774 (reinsert_breakpoint): Rewrite.
8775 (reinsert_breakpoints_at): New.
8776 (check_breakpoints): Rewrite.
8777 (breakpoint_here): New.
8778 (breakpoint_inserted_here): New.
8779 (check_mem_read): Adjust.
8780 * mem-break.h (breakpoints_supported, breakpoint_here)
8781 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8782 (reinsert_breakpoint_by_bp): Delete declaration.
8783 (delete_reinsert_breakpoints): Declare.
8784 (reinsert_breakpoint): Delete declaration.
8785 (reinsert_breakpoints_at): Declare.
8786 (uninsert_breakpoint): Delete declaration.
8787 (uninsert_breakpoints_at): Declare.
8788 (check_breakpoints): Adjust prototype.
8789 * server.h: Adjust include order.
8790 (struct thread_info): Declare here. Add a `last_status' field.
8791
8792 2010-03-23 Michael Snyder <msnyder@vmware.com>
8793
8794 * server.c (crc32): New function.
8795 (handle_query): Add handling for 'qCRC:' request.
8796
8797 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8798
8799 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8800 lwp had been stopped by a watchpoint.
8801
8802 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8803
8804 * server.h (internal_error): Declare.
8805 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8806 * utils.c (internal_error): New function.
8807
8808 2010-03-15 Andreas Schwab <schwab@redhat.com>
8809
8810 * configure.srv: Fix typo setting srv_regobj.
8811
8812 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8813
8814 * linux-low.c (fetch_register): Avoid passing a non string literal
8815 format to `error'.
8816 (usr_store_inferior_registers): Ditto.
8817
8818 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8819
8820 * linux-low.c (linux_write_memory): Bail out early if peeking
8821 memory failed.
8822
8823 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8824
8825 * linux-low.h (struct lwp_info): New fields
8826 `stopped_by_watchpoint' and `stopped_data_address'.
8827 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8828 here, and cache them in the lwp object.
8829 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8830 directly.
8831 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8832 field.
8833 (linux_stopped_by_watchpoint): Rewrite.
8834 (linux_stopped_data_address): Rewrite.
8835
8836 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8837
8838 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8839 switching the current inferior, not before.
8840
8841 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8842
8843 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8844 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8845 i386-linux.c and amd64-linux.c.
8846 (reg-i386.o): Removed.
8847 (reg-i386.c): Likewise.
8848 (reg-i386-linux.o): Likewise.
8849 (reg-i386-linux.c): Likewise.
8850 (reg-x86-64.o): Likewise.
8851 (reg-x86-64.c): Likewise.
8852 (reg-x86-64-linux.o): Likewise.
8853 (reg-x86-64-linux.c): Likewise.
8854 (i386.o): New.
8855 (i386.c): Likewise.
8856 (i386-linux.o): Likewise.
8857 (i386-linux.c): Likewise.
8858 (amd64.o): Likewise.
8859 (amd64.c): Likewise.
8860 (amd64-linux.o): Likewise.
8861 (amd64-linux.c): Likewise.
8862
8863 * configure.srv (srv_i386_regobj): New.
8864 (srv_i386_linux_regobj): Likewise.
8865 (srv_amd64_regobj): Likewise.
8866 (srv_amd64_linux_regobj): Likewise.
8867 (srv_i386_32bit_xmlfiles): Likewise.
8868 (srv_i386_64bit_xmlfiles): Likewise.
8869 (srv_i386_xmlfiles): Likewise.
8870 (srv_amd64_xmlfiles): Likewise.
8871 (srv_i386_linux_xmlfiles): Likewise.
8872 (srv_amd64_linux_xmlfiles): Likewise.
8873 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8874 srv_xmlfiles to $srv_i386_xmlfiles.
8875 (i[34567]86-*-mingw32ce*): Likewise.
8876 (i[34567]86-*-mingw*): Likewise.
8877 (i[34567]86-*-nto*): Likewise.
8878 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8879 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8880 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8881 (x86_64-*-linux*): Likewise.
8882
8883 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8884 (init_registers_amd64_linux): New.
8885 (x86_arch_setup): Replace init_registers_x86_64_linux with
8886 init_registers_amd64_linux.
8887
8888 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8889
8890 * configure.ac: Check for libdl. If it is not available link against
8891 static libthread_db.
8892 * configure: Regenerate.
8893
8894 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8895
8896 PR9605
8897
8898 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8899 handing a read watchpoint.
8900 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8901
8902 2010-02-12 Doug Evans <dje@google.com>
8903
8904 * linux-low.c (linux_supports_tracefork_flag): Document.
8905 (linux_look_up_symbols): Add comment.
8906
8907 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8908
8909 * regcache.c (supply_register): Clear regcache if buf is NULL.
8910
8911 2010-02-02 Nicolas Roche <roche@sourceware.org>
8912 Joel Brobecker <brobecker@adacore.com>
8913
8914 * inferiors.c (find_inferior): Add function documentation.
8915 (unloaded_dll): Handle the case where the unloaded dll has not
8916 been previously registered in the dll list.
8917
8918 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8919
8920 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8921 (thumb2_breakpoint): New.
8922 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8923
8924 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8925
8926 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8927 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8928 breakpoints.
8929
8930 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8931
8932 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8933
8934 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8935
8936 * linux-s390-low.c (s390_collect_ptrace_register)
8937 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8938
8939 2010-01-21 Doug Evans <dje@google.com>
8940
8941 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8942 (PTRACE_ARG4_TYPE): New macro.
8943 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8944 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8945 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8946 (usr_store_inferior_registers): Ditto.
8947 (linux_read_memory, linux_write_memory): Ditto.
8948 (linux_test_for_tracefork): Ditto.
8949
8950 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8951 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8952
8953 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8954
8955 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8956 target.
8957
8958 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8959
8960 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8961 prototype to take a regcache. Adjust.
8962
8963 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8964
8965 * regcache.h (struct thread_info): Forward declare.
8966 (struct regcache): New.
8967 (new_register_cache): Adjust prototype.
8968 (get_thread_regcache): Declare.
8969 (free_register_cache): Adjust prototype.
8970 (registers_to_string, registers_from_string): Ditto.
8971 (supply_register, supply_register_by_name, collect_register)
8972 (collect_register_as_string, collect_register_by_name): Ditto.
8973 * regcache.c (struct inferior_regcache_data): Delete.
8974 (get_regcache): Rename to ...
8975 (get_thread_regcache): ... this. Adjust. Switch inferior before
8976 fetching registers.
8977 (regcache_invalidate_one): Adjust.
8978 (regcache_invalidate): Fix prototype.
8979 (new_register_cache): Return the new register cache.
8980 (free_register_cache): Change prototype.
8981 (realloc_register_cache): Adjust.
8982 (registers_to_string): Change prototype to take a regcache. Adjust.
8983 (registers_from_string): Ditto.
8984 (register_data): Ditto.
8985 (supply_register): Ditto.
8986 (supply_register_by_name): Ditto.
8987 (collect_register): Ditto.
8988 (collect_register_as_string): Ditto.
8989 (collect_register_by_name): Ditto.
8990 * server.c (process_serial_event): Adjust.
8991 * linux-low.h (regset_fill_func, regset_store_func): Change
8992 prototype.
8993 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8994 Change prototype.
8995 * linux-low.c (get_stop_pc): Adjust.
8996 (check_removed_breakpoint): Adjust.
8997 (linux_wait_for_event): Adjust.
8998 (linux_resume_one_lwp): Adjust.
8999 (fetch_register): Add regcache parameter. Adjust.
9000 (usr_store_inferior_registers): Ditto.
9001 (regsets_fetch_inferior_registers): Ditto.
9002 (regsets_store_inferior_registers): Ditto.
9003 (linux_fetch_registers, linux_store_registers): Ditto.
9004 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
9005 regcache. Adjust.
9006 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
9007 Ditto.
9008 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
9009 prototype to take a regcache.
9010 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
9011 * remote-utils.c (convert_ascii_to_int, outreg)
9012 (prepare_resume_reply): Change prototype to take a regcache.
9013 Adjust.
9014 * target.h (struct target_ops) <fetch_registers, store_registers>:
9015 Change prototype to take a regcache.
9016 (fetch_inferior_registers, store_inferior_registers): Change
9017 prototype to take a regcache. Adjust.
9018 * proc-service.c (ps_lgetregs): Adjust.
9019 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9020 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9021 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9022 take a regcache. Adjust.
9023 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9024 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9025 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9026 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9027 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9028 (cris_cannot_fetch_register):
9029 (cris_breakpoint_at): Change prototype to take a regcache.
9030 Adjust.
9031 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9032 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9033 to take a regcache. Adjust.
9034 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9035 Adjust.
9036 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9037 take a regcache. Adjust.
9038 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9039 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9040 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9041 * linux-mips-low.c (mips_get_pc):
9042 (mips_set_pc): Change prototype to take a regcache. Adjust.
9043 (mips_reinsert_addr): Adjust.
9044 (mips_collect_register): Change prototype to take a regcache.
9045 Adjust.
9046 (mips_supply_register):
9047 (mips_collect_register_32bit, mips_supply_register_32bit)
9048 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9049 (mips_store_fpregset): Ditto.
9050 * linux-ppc-low.c (ppc_supply_ptrace_register)
9051 (ppc_supply_ptrace_register): Ditto.
9052 (parse_spufs_run): Adjust.
9053 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9054 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9055 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9056 take a regcache. Adjust.
9057 * linux-s390-low.c (s390_collect_ptrace_register)
9058 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9059 (s390_set_pc): Change prototype to take a regcache. Adjust.
9060 (s390_arch_setup): Adjust.
9061 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9062 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9063 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9064 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9065 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9066 regcache. Adjust.
9067 (sparc_breakpoint_at): Adjust.
9068 * linux-xtensa-low.c (xtensa_fill_gregset):
9069 (xtensa_store_gregset):
9070 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9071 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9072 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9073 prototype to take a regcache. Adjust.
9074 * win32-arm-low.c (arm_fetch_inferior_register)
9075 (arm_store_inferior_register): Change prototype to take a
9076 regcache. Adjust.
9077 * win32-i386-low.c (i386_fetch_inferior_register)
9078 (i386_store_inferior_register): Change prototype to take a
9079 regcache. Adjust.
9080 * win32-low.c (child_fetch_inferior_registers)
9081 (child_store_inferior_registers): Change prototype to take a
9082 regcache. Adjust.
9083 (win32_wait): Adjust.
9084 (win32_fetch_inferior_registers): Change prototype to take a
9085 regcache. Adjust.
9086 (win32_store_inferior_registers): Adjust.
9087 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9088 store_inferior_register>: Change prototype to take a regcache.
9089
9090 2010-01-20 Doug Evans <dje@google.com>
9091
9092 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9093 #ifdef.
9094 (linux_wait_for_event1, linux_init_signals): Ditto.
9095 (W_STOPCODE): Provide definition if missing.
9096
9097 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9098
9099 * linux-low.c (linux_core_of_thread): New.
9100 (compare_ints, show_process, list_threads): New.
9101 (linux_qxfer_osdata): Report threads and cores.
9102 (linux_target_op): Register linux_core_of_thread.
9103 * remote-utils.c (prepare_resume_reply): Report the core.
9104 (buffer_xml_printf): Support %d specifier.
9105 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9106 New.
9107 (handle_query): Handle qXfer:threads. Announce availability
9108 thereof.
9109 * target.h (struct target_ops): New field core_of_thread.
9110
9111 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9112
9113 * Makefile.in (clean): Remove new generated files.
9114 (reg-s390.o, reg-s390.c): Remove rules.
9115 (reg-s390x.o, reg-s390x.c): Likewise.
9116 (s390-linux32.o, s390-linux32.c): Add rules.
9117 (s390-linux64.o, s390-linux64.c): Likewise.
9118 (s390x-linux64.o, s390x-linux64.c): Likewise.
9119 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9120 * linux-s390-low.c: Include <elf.h>.
9121 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9122 (init_registers_s390): Remove prototype.
9123 (init_registers_s390x): Likewise.
9124 (init_registers_s390_linux32): Add prototype.
9125 (init_registers_s390_linux64): Likewise.
9126 (init_registers_s390x_linux64): Likewise.
9127 (s390_num_regs_3264): New define.
9128 (s390_regmap_3264): New global variable.
9129 (s390_cannot_fetch_register): Remove obsolete check.
9130 (s390_cannot_store_register): Likewise.
9131 (s390_collect_ptrace_register): Handle upper/lower register halves.
9132 (s390_supply_ptrace_register): Likewise.
9133 (s390_fill_gregset): Update to register number changes.
9134 (s390_get_hwcap): New routine.
9135 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9136 Install appropriate regmap and register set.
9137
9138 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9139
9140 * server.c (gdbserver_version): Update copyright year to 2010.
9141 * gdbreplay.c (gdbreplay_version): Likewise.
9142
9143 2009-12-28 Doug Evans <dje@google.com>
9144
9145 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9146 elf/external.h. Include <elf.h> instead but only if necessary.
9147
9148 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9149
9150 * linux-low.c (linux_remove_process): Remove `detaching'
9151 parameter. Don't release/detach from thread_db here.
9152 (linux_kill): Release/detach from thread_db here, ...
9153 (linux_detach): ... and here, before actually detaching.
9154 (linux_wait_1): ... and here, when a process exits.
9155 * thread-db.c (any_thread_of): New.
9156 (thread_db_free): Switch the current inferior to a thread of the
9157 passed in process.
9158
9159 2009-12-21 Doug Evans <dje@google.com>
9160
9161 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9162
9163 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9164 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9165 warning ifndef __NR_tkill. Move setting of errno there too.
9166 Delete unnecessary resetting of errno after syscall.
9167 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9168
9169 * configure.ac: Check for dladdr.
9170 * config.in: Regenerate.
9171 * configure: Regenerate.
9172 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9173 (try_thread_db_load): Update.
9174
9175 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9176
9177 2009-12-18 Doug Evans <dje@google.com>
9178
9179 * event-loop.c: Include unistd.h if it exists.
9180
9181 * linux-low.c (my_waitpid): Move definition away from being in
9182 between linux_tracefork_child/linux_test_for_tracefork.
9183
9184 * gdb_proc_service.h (psaddr_t): Fix type.
9185 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9186 signature to match glibc.
9187
9188 2009-12-16 Doug Evans <dje@google.com>
9189
9190 * linux-low.c (linux_read_memory): Fix argument to read.
9191
9192 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9193
9194 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9195 events, don't leave current_inferior pointing at null.
9196
9197 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9198
9199 * win32-low.c (LOG): Delete.
9200 (OUTMSG): Output to stderr.
9201 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9202 on compile time LOG macro.
9203 (win32_wait): Fix debug output.
9204
9205 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9206
9207 * win32-low.c (win32_add_one_solib): If the dll name is
9208 "ntdll.dll", prepend the system directory to the dll path.
9209
9210 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9211
9212 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9213
9214 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9215 Vladimir Prus <vladimir@codesourcery.com>
9216
9217 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9218 * configure.ac: Check for __mcoldfire__ and set
9219 gdb_cv_m68k_is_coldfire.
9220 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9221 reg-cf.o and reg-m68k.o.
9222 * configure: Regenerated.
9223
9224 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9225
9226 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9227 Pass it to thread_db_free.
9228 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9229 proper `detaching' argument to linux_remove_process.
9230 * linux-low.h (thread_db_free): Add `detaching' parameter.
9231 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9232 to thread_db_free.
9233 (thread_db_free): Add `detaching' parameter. Only
9234 call td_ta_clear_event if detaching from process.
9235
9236 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9237
9238 * thread-db.c (thread_db_free): Fix typo.
9239
9240 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9241
9242 PR gdb/10838
9243 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9244
9245 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9246
9247 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9248 with an i686 compiler.
9249 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9250 needed.
9251 * configure: Rebuilt.
9252
9253 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9254
9255 PR gdb/10783
9256
9257 * server.c (handle_search_memory_1): Correct read_addr initialization
9258 in loop for searching subsequent chunks.
9259
9260 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9261
9262 * configure.ac: New --with-libthread-db option.
9263 * thread-db.c: Allow direct dependence on libthread_db.
9264 (thread_db_free): Adjust.
9265 * config.in: Regenerate.
9266 * configure: Likewise.
9267
9268 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9269
9270 PR gdb/10757
9271 * thread-db.c (attach_thread): New function.
9272 (maybe_attach_thread): Return success/failure.
9273 (find_new_threads_callback): Adjust.
9274 (thread_db_find_new_threads): Loop until no new threads.
9275
9276 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9277
9278 * proc-service.c (ps_lgetregs): Formatting.
9279
9280 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9281
9282 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9283 * configure.ac: Adjust.
9284 * linux-low.h (struct process_info_private): Move members to struct
9285 thread_db.
9286 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9287 * linux-low.c (linux_remove_process): Adjust.
9288 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9289 * server.c (handle_query): Move code ...
9290 (handle_monitor_command): ... here. New function.
9291 * target.h (struct target_ops): New member.
9292 * thread-db.c (struct thread_db): New.
9293 (libthread_db_search_path): New variable.
9294 (thread_db_create_event, thread_db_enable_reporting)
9295 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9296 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9297 (try_thread_db_load_1, dladdr_to_soname): New functions.
9298 (try_thread_db_load, thread_db_load_search): New functions.
9299 (thread_db_init): Search for libthread_db.
9300 (thread_db_free): New function.
9301 (thread_db_handle_monitor_command): Likewise.
9302 * config.in: Regenerate.
9303 * configure: Regenerate.
9304
9305 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9306
9307 * spu-low.c (spu_kill): Wait for inferior to terminate.
9308 Call clear_inferiors.
9309 (spu_detach): Call clear_inferiors.
9310
9311 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9312
9313 * aclocal.m4: Regenerate.
9314 * config.in: Likewise.
9315 * configure: Likewise.
9316
9317 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9318
9319 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9320 (parse_spufs_run): New function.
9321 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9322 (ppc_breakpoint_at): Handle SPU breakpoints.
9323
9324 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9325
9326 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9327 (SPUFS_MAGIC): Define.
9328 (spu_enumerate_spu_ids): New function.
9329 (linux_qxfer_spu): New function.
9330 (linux_target_ops): Install linux_qxfer_spu.
9331
9332 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9333
9334 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9335 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9336 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9337 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9338 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9339 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9340 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9341 (init_registers_powerpc_cell32l): Add prototype.
9342 (init_registers_powerpc_cell64l): Likewise.
9343 (ppc_arch_setup): Detect Cell/B.E. architecture.
9344
9345 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9346
9347 * Makefile.in (datarootdir): New variable.
9348
9349 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9350
9351 * linux-low.c (linux_write_memory): Update debugging output.
9352 * Makefile.in (clean): Add new descriptions.
9353 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9354 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9355 * configure.srv: Add new files for arm*-*-linux*.
9356 * linux-arm-low.c: Add new declarations.
9357 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9358 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9359 (HWCAP_VFPv3D16): New.
9360 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9361 instead of __IWMMXT__.
9362 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9363 (arm_arch_setup): New.
9364 (target_regsets): Remove #ifdef. Add VFP regset.
9365 (the_low_target): Use arm_arch_setup.
9366
9367 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9368
9369 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9370 the main thread again.
9371
9372 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9373
9374 Adding Neutrino gdbserver.
9375 * configure: Regenerated.
9376 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9377 * configure.srv (i[34567]86-*-nto*): New target.
9378 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9379 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9380 (nto_comctrl) [__QNX__]: New function.
9381 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9382
9383 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9384
9385 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9386 srv_tgtobj.
9387
9388 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9389 Pedro Alves <pedro@codesourcery.com>
9390
9391 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9392 don't support CONTEXT_EXTENDED_REGISTERS.
9393 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9394 (the_low_target): Install them.
9395 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9396 failing with ERROR_PIPE_NOT_CONNECTED.
9397
9398 2009-06-30 Doug Evans <dje@google.com>
9399 Pierre Muller <muller@ics.u-strasbg.fr>
9400
9401 Add h/w watchpoint support to x86-linux, win32-i386.
9402 * Makefile.in (SFILES): Add i386-low.c
9403 (i386_low_h): Define.
9404 (i386-low.o): Add dependencies.
9405 (linux-x86-low.o): Add i386-low.h dependency.
9406 (win32-i386-low.o): Ditto.
9407 * i386-low.c: New file.
9408 * i386-low.h: New file.
9409 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9410 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9411 * linux-low.c (linux_add_process): Initialize arch_private.
9412 (linux_remove_process): Free arch_private.
9413 (add_lwp): Initialize arch_private.
9414 (delete_lwp): Free arch_private.
9415 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9416 provided.
9417 * linux-low.h (process_info_private): New member arch_private.
9418 (lwp_info): New member arch_private.
9419 (linux_target_ops): New members new_process, new_thread,
9420 prepare_to_resume.
9421 (ptid_of): New macro.
9422 * linux-x86-low.c: Include stddef.h, i386-low.h.
9423 (arch_process_info): New struct.
9424 (arch_lwp_info): New struct.
9425 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9426 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9427 (i386_dr_low_get_status): New function.
9428 (x86_insert_point, x86_remove_point): New functions.
9429 (x86_stopped_by_watchpoint): New function.
9430 (x86_stopped_data_address): New function.
9431 (x86_linux_new_process, x86_linux_new_thread): New functions.
9432 (x86_linux_prepare_to_resume): New function.
9433 (the_low_target): Add entries for insert_point, remove_point,
9434 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9435 prepare_to_resume.
9436 * server.c (debug_hw_points): New global.
9437 (monitor_show_help): Document set debug-hw-points.
9438 (handle_query): Process "set debug-hw-points".
9439 * server.h (debug_hw_points): Declare.
9440 (paddress): Declare.
9441 * utils.c (NUMCELLS, CELLSIZE): New macros.
9442 (get_sell, xsnprintf, paddress): New functions.
9443 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9444 remove_point, stopped_by_watchpoint, stopped_data_address.
9445 * win32-i386-low.c: Include i386-low.h.
9446 (debug_reg_state): Replaces dr.
9447 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9448 (i386_dr_low_get_status): New function.
9449 (i386_insert_point, i386_remove_point): New functions.
9450 (i386_stopped_by_watchpoint): New function.
9451 (i386_stopped_data_address): New function.
9452 (i386_initial_stuff): Update.
9453 (get_thread_context,set_thread_context,i386_thread_added): Update.
9454 (the_low_target): Add entries for insert_point,
9455 remove_point, stopped_by_watchpoint, stopped_data_address.
9456 * win32-low.c (win32_insert_watchpoint): New function.
9457 (win32_remove_watchpoint): New function.
9458 (win32_stopped_by_watchpoint): New function.
9459 (win32_stopped_data_address): New function.
9460 (win32_target_ops): Add entries for insert_watchpoint,
9461 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9462 * win32-low.h (win32_target_ops): New members insert_point,
9463 remove_point, stopped_by_watchpoint, stopped_data_address.
9464
9465 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9466
9467 * server.c (process_serial_event): Re-return unsupported, not
9468 error, if the type isn't recognized. Re-allow supporting only
9469 insert or remove packets. Also call require_running for
9470 breakpoints. Add missing break statement to default case. Tidy.
9471 * target.h (struct target_ops): Rename insert_watchpoint to
9472 insert_point, and remove_watchpoint to remove_point.
9473
9474 * linux-low.h (struct linux_target_ops): Likewise.
9475 * linux-low.c (linux_insert_watchpoint): Rename to ...
9476 (linux_insert_point): ... this. Adjust.
9477 (linux_remove_watchpoint): Rename to ...
9478 (linux_remove_point): ... this. Adjust.
9479 (linux_target_ops): Adjust.
9480 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9481 (cris_insert_point): ... this.
9482 (cris_remove_watchpoint): Rename to ...
9483 (cris_remove_point): ... this.
9484 (the_low_target): Adjust.
9485
9486 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9487
9488 * server.c (handle_v_kill): Pass signal_pid to
9489 kill_inferior if multi_process is zero.
9490
9491 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9492
9493 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9494 * target.h (target_ops): Comment for *_watchpoint to make it clear
9495 the functions can get types '0' and '1'.
9496
9497 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9498
9499 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9500 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9501 * regcache.c (get_regcache): Likewise.
9502 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9503 * win32-low.c (child_fetch_inferior_registers): Remove check for
9504 regno 0.
9505
9506 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9507 Pedro Alves <pedro@codesourcery.com>
9508
9509 * target.h (struct target_ops) <supports_multi_process>: New
9510 callback.
9511 (target_supports_multi_process): New.
9512 * server.c (handle_query): Even if GDB reports support, only
9513 enable multi-process if the target also supports it. Report
9514 multi-process support only if the target backend supports it.
9515 * linux-low.c (linux_supports_multi_process): New function.
9516 (linux_target_ops): Install it as target_supports_multi_process
9517 callback.
9518
9519 2009-05-24 Doug Evans <dje@google.com>
9520
9521 Global renaming of find_thread_pid to find_thread_ptid.
9522 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9523 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9524 All callers updated.
9525
9526 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9527 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9528 directly.
9529
9530 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9531 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9532 (linux_resume_one_lwp): Ditto.
9533
9534 2009-05-23 Doug Evans <dje@google.com>
9535
9536 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9537 from struct inferior_list_entry * to struct lwp_info *.
9538 All callers updated.
9539
9540 2009-05-13 Doug Evans <dje@google.com>
9541
9542 * linux-x86-low.c: Don't include assert.h.
9543 (x86_siginfo_fixup): Use fatal, not assert.
9544 (x86_arch_setup): Fix comment.
9545
9546 2009-05-12 Doug Evans <dje@google.com>
9547
9548 Biarch support for i386/amd64 gdbserver.
9549 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9550 Add linux-x86-low.c.
9551 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9552 (linux-x86-low.o): Add.
9553 * linux-x86-64-low.c: Delete.
9554 * linux-i386-low.c: Delete.
9555 * linux-x86-low.c: New file.
9556 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9557 linux-x86-low.o.
9558 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9559 linux-x86-low.o.
9560 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9561 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9562 (linux_child_pid_to_exec_file): New function.
9563 (elf_64_header_p, elf_64_file_p): New functions.
9564 (siginfo_fixup): New function.
9565 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9566 give target a chance to convert layout.
9567 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9568 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9569
9570 2009-05-07 Doug Evans <dje@google.com>
9571
9572 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9573 (regsets_store_inferior_registers): Ditto.
9574
9575 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9576
9577 PR server/10048
9578
9579 * linux-low.c (must_set_ptrace_flags): Delete.
9580 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9581 of the global.
9582 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9583 `lwp->must_set_ptrace_flags' instead.
9584 (linux_wait_for_event_1): Set ptrace options here.
9585 (linux_wait_1): ... not here.
9586
9587 2009-04-30 Doug Evans <dje@google.com>
9588
9589 * inferiors.c (started_inferior_callback): New function.
9590 (attached_inferior_callback): New function.
9591 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9592 * server.c (print_started_pid, print_attached_pid): New functions.
9593 (detach_or_kill_for_exit): New function.
9594 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9595 * server.h (have_started_inferiors_p): Declare.
9596 (have_attached_inferiors_p): Declare.
9597
9598 * inferiors.c (remove_process): Fix memory leak, free process.
9599 * linux-low.c (linux_remove_process): New function.
9600 (linux_kill): Call it instead of remove_process.
9601 (linux_detach, linux_wait_1): Ditto.
9602
9603 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9604
9605 * configure.srv: Add x86 Windows CE target.
9606
9607 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9608
9609 * inferiors.c (get_thread_process): Make global.
9610 * server.h (get_thread_process): Add prototype.
9611 * thread-db.c (find_one_thread): Use get_thread_process
9612 instead of current_process.
9613 (thread_db_get_tls_address): Do not crash if called when
9614 thread layer is not yet initialized.
9615
9616 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9617
9618 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9619 * spu-low.c (current_tid): Rename to ...
9620 (current_ptid): ... this.
9621 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9622 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9623 ptid_get_lwp (current_ptid) instead of current_tid.
9624 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9625 instead of current_tid. Use find_process_pid to verify pid
9626 argument is valid. Pass proper argument to remove_process.
9627 (spu_thread_alive): Compare current_ptid instead of current_tid.
9628 (spu_resume): Likewise.
9629
9630 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9631
9632 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9633 variable.
9634
9635 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9636
9637 Implement the multiprocess extensions, and add linux multiprocess
9638 support.
9639
9640 * server.h (ULONGEST): Declare.
9641 (struct ptid, ptid_t): New.
9642 (minus_one_ptid, null_ptid): Declare.
9643 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9644 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9645 (struct inferior_list_entry): Change `id' type from unsigned from
9646 to ptid_t.
9647 (struct sym_cache, struct breakpoint, struct
9648 process_info_private): Forward declare.
9649 (struct process_info): Declare.
9650 (current_process): Declare.
9651 (all_processes): Declare.
9652 (initialize_inferiors): Declare.
9653 (add_thread): Adjust to use ptid_t.
9654 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9655 (add_process, remove_process, find_thread_pid): Declare.
9656 (find_inferior_id): Adjust to use ptid_t.
9657 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9658 (multi_process): Declare.
9659 (push_event): Adjust to use ptid_t.
9660 (read_ptid, write_ptid): Declare.
9661 (prepare_resume_reply): Adjust to use ptid_t.
9662 (clear_symbol_cache): Declare.
9663 * inferiors.c (all_processes): New.
9664 (null_ptid, minus_one_ptid): New.
9665 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9666 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9667 (add_thread): Change unsigned long to ptid. Remove gdb_id
9668 parameter. Adjust.
9669 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9670 (gdb_id_to_thread): Rename to ...
9671 (find_thread_pid): ... this. Change unsigned long to ptid.
9672 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9673 (loaded_dll, pull_pid_from_list): Adjust.
9674 (add_process, remove_process, find_process_pid)
9675 (get_thread_process, current_process, initialize_inferiors): New.
9676 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9677 (struct target_waitstatus) <related_pid>: Ditto.
9678 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9679 return type to int.
9680 (struct target_ops) <join>: Add `pid' argument.
9681 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9682 (struct target_ops) <wait>: Add `ptid' field. Change return type
9683 to ptid.
9684 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9685 (mywait): Add `ptid' argument. Change return type to ptid_t.
9686 (target_pid_to_str): Declare.
9687 * target.c (set_desired_inferior): Adjust to use ptids.
9688 (mywait): Add new `ptid' argument. Adjust.
9689 (target_pid_to_str): New.
9690 * mem-break.h (free_all_breakpoints): Declare.
9691 * mem-break.c (breakpoints): Delelete.
9692 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9693 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9694 to use per-process breakpoint list.
9695 (free_all_breakpoints): New.
9696 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9697 (symbol_cache, all_symbols_looked_up): Delete.
9698 (hexchars): New.
9699 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9700 read_ptid): New.
9701 (prepare_resume_reply): Change ptid argument's type from unsigned
9702 long to ptid_t. Adjust. Implement W;process and X;process.
9703 (free_sym_cache, clear_symbol_cache): New.
9704 (look_up_one_symbol): Adjust to per-process symbol cache. *
9705 * server.c (cont_thread, general_thread, step_thread): Change type
9706 to ptid_t.
9707 (attached): Delete.
9708 (multi_process): New.
9709 (last_ptid): Change type to ptid_t.
9710 (struct vstop_notif) <ptid>: Change type to ptid_t.
9711 (queue_stop_reply, push_event): Change `ptid' argument's type to
9712 ptid_t.
9713 (discard_queued_stop_replies): Add `pid' argument.
9714 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9715 changes. Don't reference the `attached' global.
9716 (attach_inferior): Adjust to mywait interface changes.
9717 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9718 features. Handle and report "multiprocess+". Handle
9719 "qAttached:PID".
9720 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9721 changes.
9722 (handle_v_kill): New.
9723 (handle_v_stopped): Adjust to use target_pid_to_str.
9724 (handle_v_requests): Allow multiple attaches and runs when
9725 multiprocess extensions are in effect. Handle "vKill".
9726 (myresume): Adjust to use ptids.
9727 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9728 (handle_status): Adjust to discard_queued_stop_replies interface
9729 change.
9730 (first_thread_of, kill_inferior_callback)
9731 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9732 (main): Call initialize_inferiors. Adjust to use ptids, killing
9733 and detaching from all inferiors. Handle multiprocess packet
9734 variants.
9735 * linux-low.h: Include gdb_proc_service.h.
9736 (struct process_info_private): New.
9737 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9738 <lwpid_of>: Use ptid_get_lwp.
9739 (get_lwp_thread): Adjust.
9740 (struct lwp_info): Add `dead' member.
9741 (find_lwp_pid): Declare.
9742 * linux-low.c (thread_db_active): Delete.
9743 (new_inferior): Adjust comment.
9744 (inferior_pid): Delete.
9745 (linux_add_process): New.
9746 (handle_extended_wait): Adjust.
9747 (add_lwp): Change unsigned long to ptid.
9748 (linux_create_inferior): Add process to processes table. Adjust
9749 to use ptids. Don't set new_inferior here.
9750 (linux_attach_lwp): Rename to ...
9751 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9752 it. Adjust to use ptids.
9753 (linux_attach_lwp): New.
9754 (linux_attach): Add process to processes table. Don't set
9755 new_inferior here.
9756 (struct counter): New.
9757 (second_thread_of_pid_p, last_thread_of_process_p): New.
9758 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9759 multiple processes.
9760 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9761 processes. Remove process from process table.
9762 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9763 to multiple processes.
9764 (any_thread_of): New.
9765 (linux_detach): Add `pid' argument, and handle it. Remove process
9766 from processes table.
9767 (linux_join): Add `pid' argument. Handle it.
9768 (linux_thread_alive): Change unsighed long argument to ptid_t.
9769 Consider dead lwps as not being alive.
9770 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9771 threads we're not interested in.
9772 (same_lwp, find_lwp_pid): New.
9773 (linux_wait_for_lwp): Change `pid' argument's type from int to
9774 ptid_t. Adjust.
9775 (linux_wait_for_event): Rename to ...
9776 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9777 from int to ptid_t. Adjust.
9778 (linux_wait_for_event): New.
9779 (linux_wait_1): Add `ptid' argument. Change return type to
9780 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9781 that exit from the process table.
9782 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9783 Adjust.
9784 (mark_lwp_dead): New.
9785 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9786 stopping all threads, mark its main lwp as dead.
9787 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9788 ptids.
9789 (fetch_register, usr_store_inferior_registers)
9790 (regsets_fetch_inferior_registers)
9791 (regsets_store_inferior_registers, linux_read_memory)
9792 (linux_write_memory): Inline `inferior_pid'.
9793 (linux_look_up_symbols): Adjust to use per-process
9794 `thread_db_active'.
9795 (linux_request_interrupt): Adjust to use ptids.
9796 (linux_read_auxv): Inline `inferior_pid'.
9797 (initialize_low): Don't reference thread_db_active.
9798 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9799 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9800 (ps_getpid): Return the pid of the current inferior.
9801 * thread-db.c (proc_handle, thread_agent): Delete.
9802 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9803 per-process data.
9804 (find_one_thread): Change argument type to ptid_t. Adjust to
9805 per-process data.
9806 (maybe_attach_thread): Adjust to per-process data and ptids.
9807 (thread_db_find_new_threads): Ditto.
9808 (thread_db_init): Ditto.
9809 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9810 processes table. Adjust to use ptids.
9811 (spu_kill, spu_detach): Adjust interface. Remove process from
9812 processes table.
9813 (spu_join, spu_thread_alive): Adjust interface.
9814 (spu_wait): Adjust interface. Remove process from processes
9815 table. Adjust to use ptids.
9816 * win32-low.c (current_inferior_tid): Delete.
9817 (current_inferior_ptid): New.
9818 (debug_event_ptid): New.
9819 (thread_rec): Take a ptid. Adjust.
9820 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9821 (child_delete_thread): Ditto.
9822 (do_initial_child_stuff): Add `attached' argument. Add process to
9823 processes table.
9824 (child_fetch_inferior_registers, child_store_inferior_registers):
9825 Adjust.
9826 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9827 (win32_attach): Pass 1 to do_initial_child_stuff.
9828 (win32_kill): Adjust interface. Remove process from processes
9829 table.
9830 (win32_detach): Ditto.
9831 (win32_join): Adjust interface.
9832 (win32_thread_alive): Take a ptid.
9833 (win32_resume): Adjust to use ptids.
9834 (get_child_debug_event): Ditto.
9835 (win32_wait): Adjust interface. Remove exiting process from
9836 processes table.
9837
9838 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9839
9840 Non-stop mode support.
9841
9842 * server.h (non_stop): Declare.
9843 (gdb_client_data, handler_func): Declare.
9844 (delete_file_handler, add_file_handler, start_event_loop):
9845 Declare.
9846 (handle_serial_event, handle_target_event, push_event)
9847 (putpkt_notif): Declare.
9848 * target.h (enum resume_kind): New.
9849 (struct thread_resume): Replace `step' field by `kind' field.
9850 (TARGET_WNOHANG): Define.
9851 (struct target_ops) <wait>: Add `options' argument.
9852 <supports_non_stop, async, start_non_stop>: New fields.
9853 (target_supports_non_stop, target_async): New.
9854 (start_non_stop): Declare.
9855 (mywait): Add `options' argument.
9856 * target.c (mywait): Add `options' argument. Print child exit
9857 notifications here.
9858 (start_non_stop): New.
9859 * server.c (non_stop, own_buf, mem_buf): New globals.
9860 (struct vstop_notif): New.
9861 (notif_queue): New global.
9862 (queue_stop_reply, push_event, discard_queued_stop_replies)
9863 (send_next_stop_reply): New.
9864 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9865 interface changes.
9866 (attach_inferior): In non-stop mode, don't wait for the target
9867 here.
9868 (handle_general_set): Handle QNonStop.
9869 (handle_query): When handling qC, return the current general
9870 thread, instead of the first thread of the list.
9871 (handle_query): If the backend supports non-stop mode, include
9872 QNonStop+ in the qSupported query response.
9873 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9874 and non-stop mode.
9875 (handle_v_attach, handle_v_run): Handle non-stop mode.
9876 (handle_v_stopped): New.
9877 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9878 (myresume): Adjust to use resume_kind. Handle non-stop.
9879 (queue_stop_reply_callback): New.
9880 (handle_status): Handle non-stop mode.
9881 (main): Clear non_stop flag on reconnection. Use the event-loop.
9882 Refactor serial protocol handling from here ...
9883 (process_serial_event): ... to this new function. When GDB
9884 selects any thread, select one here. In non-stop mode, wait until
9885 GDB acks all pending events before exiting.
9886 (handle_serial_event, handle_target_event): New.
9887 * remote-utils.c (remote_open): Install remote_desc in the event
9888 loop.
9889 (remote_close): Remove remote_desc from the event loop.
9890 (putpkt_binary): Rename to...
9891 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9892 (putpkt_binary): New as wrapper around putpkt_binary_1.
9893 (putpkt_notif): New.
9894 (prepare_resume_reply): In non-stop mode, don't change the
9895 general_thread.
9896 * event-loop.c: New.
9897 * Makefile.in (OBJ): Add event-loop.o.
9898 (event-loop.o): New rule.
9899
9900 * linux-low.h (pid_of): Moved here.
9901 (lwpid_of): New.
9902 (get_lwp_thread): Use lwpid_of.
9903 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9904 * linux-low.c (pid_of): Delete.
9905 (inferior_pid): Use lwpid_of.
9906 (linux_event_pipe): New.
9907 (target_is_async_p): New.
9908 (delete_lwp): New.
9909 (handle_extended_wait): Use lwpid_of.
9910 (add_lwp): Don't set lwpid field.
9911 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9912 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9913 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9914 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9915 first. Adjust to linux_wait_for_event interface changes. Use
9916 lwpid_of.
9917 (linux_detach): Don't delete the main lwp here.
9918 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9919 (status_pending_p): Don't consider explicitly suspended lwps.
9920 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9921 pointer. Add OPTIONS argument. Change return type to int. Use
9922 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9923 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9924 pointer. Add status pointer argument. Return a pid instead of a
9925 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9926 changes. In non-stop mode, don't switch to a random thread.
9927 (linux_wait): Rename to...
9928 (linux_wait_1): ... this. Add target_options argument, and handle
9929 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9930 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9931 clean exit and signal exit code. Don't stop all threads in
9932 non-stop mode. In all-stop mode, only stop all threads when
9933 reporting a stop to GDB. Handle explicit thread stop requests.
9934 (async_file_flush, async_file_mark): New.
9935 (linux_wait): New.
9936 (send_sigstop): Use lwpid_of.
9937 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9938 interface changes. In non-stop mode, don't switch to a random
9939 thread.
9940 (linux_resume_one_lwp): Use lwpid_of.
9941 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9942 (linux_resume_one_thread): ... this. Handle resume_stop. In
9943 non-stop mode, don't look for pending flag in all threads.
9944 (resume_status_pending_p): Don't consider explicitly suspended
9945 threads.
9946 (my_waitpid): Reimplement. Emulate __WALL.
9947 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9948 Use lwpid_of.
9949 (sigchld_handler, linux_supports_non_stop, linux_async)
9950 (linux_start_non_stop): New.
9951 (linux_target_ops): Register linux_supports_non_stop, linux_async
9952 and linux_start_non_stop.
9953 (initialize_low): Install SIGCHLD handler.
9954 * thread-db.c (thread_db_create_event, find_one_thread)
9955 (thread_db_get_tls_address): Use lwpid_of.
9956 * win32-low.c (win32_detach): Adjust to use resume_kind.
9957 (win32_wait): Add `options' argument.
9958 * spu-low.c (spu_resume): Adjust to use resume_kind.
9959 (spu_wait): Add `options' argument.
9960
9961 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9962
9963 Decouple target code from remote protocol.
9964
9965 * target.h (enum target_waitkind): New.
9966 (struct target_waitstatus): New.
9967 (struct target_ops) <wait>: Return an unsigned long. Take a
9968 target_waitstatus pointer instead of a char pointer.
9969 (mywait): Likewise.
9970 * target.c (mywait): Change prototype to return an unsigned long.
9971 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9972 * server.h (thread_from_wait, old_thread_from_wait): Delete
9973 declarations.
9974 (prepare_resume_reply): Change prototype to take a
9975 target_waitstatus.
9976 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9977 (last_status, last_ptid): New.
9978 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9979 pid instead of a signal.
9980 (attach_inferior): Remove "status" and "signal" parameters.
9981 Adjust.
9982 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9983 not as an address.
9984 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9985 (handle_v_requests, myresume): Remove "status" and "signal"
9986 parameters. Adjust.
9987 (handle_status): New.
9988 (main): Delete local `status'. Adjust.
9989 * remote-utils.c: Include target.h.
9990 (prepare_resume_reply): Change prototype to take a
9991 target_waitstatus. Adjust.
9992
9993 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9994 interface.
9995 * spu-low.c (spu_wait): Adjust.
9996 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9997 Delete.
9998 (win32_wait): Adjust.
9999
10000 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10001
10002 * target.h (struct thread_resume): Delete leave_stopped member.
10003 (struct target_ops): Add a `n' argument to the `resume' callback.
10004 * server.c (start_inferior): Adjust.
10005 (handle_v_cont, myresume): Adjust.
10006 * linux-low.c (check_removed_breakpoint): Adjust to resume
10007 interface change, and to removed leave_stopped field.
10008 (resume_ptr): Delete.
10009 (struct thread_resume_array): New.
10010 (linux_set_resume_request): Add new `arg' parameter. Adjust to
10011 resume interface change.
10012 (linux_continue_one_thread, linux_queue_one_thread)
10013 (resume_status_pending_p): Check if the resume field is NULL
10014 instead of checking the leave_stopped member.
10015 (linux_resume): Adjust to the target resume interface change.
10016 * spu-low.c (spu_resume): Adjust to the target resume interface
10017 change.
10018 * win32-low.c (win32_detach, win32_resume): Ditto.
10019
10020 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10021
10022 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10023 flag.
10024 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10025 pending.
10026 (linux_continue_one_thread): Only preserve the stepping flag if
10027 there's a pending breakpoint.
10028
10029 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10030
10031 * server.c (main): After the inferior having exited, call
10032 remote_close before exiting gdbserver.
10033
10034 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10035
10036 Fix size of FPSCR in Power 7 processors.
10037 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10038 (PPC_FEATURE_HAS_DFP): New #define.
10039 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10040 size of the FPSCR.
10041
10042 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10043
10044 * server.c (handle_query) Whitespace and formatting.
10045
10046 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10047
10048 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10049 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10050 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10051 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10052 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10053 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10054 Makefile.in, configure.ac: Fix whitespace throughout.
10055 * configure: Regenerate.
10056
10057 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10058
10059 * inferiors.c (find_inferior): Make it safe for the callback
10060 function to delete the currently iterated inferior.
10061
10062 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10063
10064 * Makefile.in (linuw_low_h): Move higher.
10065 (thread-db.o): Depend on $(linux_low_h).
10066
10067 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10068
10069 Rename "process" to "lwp" throughout.
10070
10071 * linux-low.c (all_processes): Rename to...
10072 (all_lwps): ... this.
10073 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10074 (add_process): Rename to ...
10075 (add_lwp): ... this. Adjust.
10076 (linux_create_inferior): Adjust.
10077 (linux_attach_lwp): Adjust.
10078 (linux_attach): Adjust.
10079 (linux_kill_one_process): Rename to ...
10080 (linux_kill_one_lwp): ... this. Adjust.
10081 (linux_kill): Adjust.
10082 (linux_detach_one_process): Rename to ...
10083 (linux_detach_one_lwp): ... this. Adjust.
10084 (linux_detach): Adjust.
10085 (check_removed_breakpoint): Adjust.
10086 (status_pending_p): Adjust.
10087 (linux_wait_for_process): Rename to ...
10088 (linux_wait_for_lwp): ... this. Adjust.
10089 (linux_wait_for_event): Adjust.
10090 (send_sigstop): Adjust.
10091 (wait_for_sigstop): Adjust.
10092 (stop_all_processes): Rename to ...
10093 (stop_all_lwps): ... this.
10094 (linux_resume_one_process): Rename to ...
10095 (linux_resume_one_lwp): ... this. Adjust.
10096 (linux_set_resume_request, linux_continue_one_thread)
10097 (linux_queue_one_thread, resume_status_pending_p)
10098 (usr_store_inferior_registers, regsets_store_inferior_registers)
10099 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10100 Adjust.
10101 * linux-low.h (get_process): Rename to ...
10102 (get_lwp): ... this. Adjust.
10103 (get_thread_process): Rename to ...
10104 (get_thread_lwp): ... this. Adjust.
10105 (get_process_thread): Rename to ...
10106 (get_lwp_thread): ... this. Adjust.
10107 (struct process_info): Rename to ...
10108 (struct lwp_info): ... this.
10109 (all_processes): Rename to ...
10110 (all_lwps): ... this.
10111 * proc-service.c (ps_lgetregs): Adjust.
10112 * thread-db.c (thread_db_create_event, find_one_thread)
10113 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10114
10115 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10116
10117 * server.c (handle_query): Handle "qAttached".
10118
10119 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10120
10121 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10122 GPLv3, update license URL.
10123
10124 2009-03-01 Doug Evans <dje@google.com>
10125
10126 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10127 (server_h): Add gdb_signals.h.
10128 (signals.o): Update.
10129 * server.h (target_signal_from_host,target_signal_to_host_p)
10130 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10131
10132 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10133
10134 * remote-utils.c (getpkt): Also generate remote-debug
10135 information if noack_mode is set.
10136
10137 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10138
10139 * server.c (handle_query): Report qXfer:siginfo:read and
10140 qXfer:siginfo:write as supported and handle them.
10141 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10142 * linux-low.c (linux_xfer_siginfo): New.
10143 (linux_target_ops): Set it.
10144
10145 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10146
10147 * server.c (gdbserver_usage): Mention --remote-debug.
10148 (main): Accept '--remote-debug' switch.
10149
10150 2009-01-18 Doug Evans <dje@google.com>
10151
10152 * regcache.c (new_register_cache): No need to check result of xcalloc.
10153 * server.c (handle_search_memory): Back out calls to xmalloc,
10154 result is checked and error is returned to user upon failure.
10155 (handle_query): Ditto. Add more checks for result of malloc.
10156 (handle_v_cont): Check result of malloc, report error back to
10157 user upon failure.
10158 (handle_v_run): Ditto. Call freeargv.
10159 * server.h (freeargv): Declare.
10160 * utils.c (freeargv): New fn.
10161
10162 2009-01-15 Doug Evans <dje@google.com>
10163
10164 * gdbreplay.c (perror_with_name): Make arg const char *.
10165 * server.h (target_signal_to_name): Make return type const char *.
10166 * thread-db.c (thread_db_err_str): Make return type const char *.
10167 * utils.c (perror_with_name): Make arg const char *.
10168
10169 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10170
10171 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10172 when handling a EXIT_PROCESS_DEBUG_EVENT.
10173
10174 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10175
10176 * gdbreplay.c (gdbreplay_version): Update copyright year.
10177 * server.c (gdbserver_version): Likewise.
10178
10179 2009-01-05 Doug Evans <dje@google.com>
10180
10181 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10182 (handle_extended_wait): Improve comment.
10183
10184 2008-12-13 Doug Evans <dje@google.com>
10185
10186 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10187 * server.h (ATTR_MALLOC): New macro.
10188 (xmalloc,xcalloc,xstrdup): Declare.
10189 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10190 * inferiors.c: Ditto.
10191 * linux-low.c: Ditto.
10192 * mem-break.c: Ditto.
10193 * regcache.c: Ditto.
10194 * remote-utils.c: Ditto.
10195 * server.c: Ditto.
10196 * target.c: Ditto.
10197 * win32-low.c: Ditto.
10198
10199 2008-12-12 Doug Evans <dje@google.com>
10200
10201 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10202 in debugging printf.
10203
10204 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10205
10206 2008-12-09 Doug Evans <dje@google.com>
10207
10208 * linux-low.h (struct process_info): Delete member tid, unused.
10209 * thread-db.c (find_one_thread): Update.
10210 (maybe_attach_thread): Update.
10211
10212 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10213
10214 * target.h (struct target_ops): Add qxfer_osdata member.
10215 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10216 and dirent.h.
10217 (linux_qxfer_osdata): New functions.
10218 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10219 callback.
10220 * server.c (handle_query): Handle "qXfer:osdata:read:".
10221 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10222 (buffer_xml_printf): New functions.
10223 * server.h (struct buffer): New.
10224 (buffer_grow_str, buffer_grow_str0): New macros.
10225 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10226 (buffer_xml_printf): Declare.
10227
10228 2008-11-24 Doug Evans <dje@google.com>
10229
10230 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10231
10232 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10233
10234 * server.c (handle_v_run): Always use the supplied argument list.
10235
10236 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10237
10238 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10239 (xtensa_regmap_table): Add entry for scompare1.
10240
10241 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10242
10243 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10244 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10245 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10246 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10247 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10248 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10249 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10250 XML target descriptions.
10251 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10252 when inferior is running on an ISA 2.05 or later processor. Add
10253 special case to return offset for full 64-bit slot of FPSCR when
10254 in 32-bits.
10255
10256 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10257
10258 * Makefile.in (SFILES, clean): Added sparc64 files.
10259 (reg-sparc64.o, reg-sparc64.c): New.
10260 * configure.srv (sparc*-*-linux*): New configuration.
10261 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10262 syscall arguments for SPARC.
10263 (regsets_store_inferior_registers): Likewise.
10264 * linux-sparc-low.c: New file.
10265
10266 2008-10-21 Doug Evans <dje@google.com>
10267
10268 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10269 (READLINE_DIR,READLINE_DEP): Delete.
10270 (INTERNAL_CFLAGS): Update.
10271 (LINTFLAGS): Update.
10272
10273 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10274
10275 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10276 whole argv from the last run, not just argv[0].
10277
10278 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10279
10280 * regcache.c (new_register_cache): Return NULL if the register
10281 cache size isn't known yet.
10282 (free_register_cache): Avoid dereferencing a NULL regcache.
10283
10284 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10285
10286 * configure.srv: Merge MIPS and MIPS64.
10287
10288 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10289
10290 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10291
10292 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10293
10294 * Makefile.in: Add required vsx dependencies.
10295
10296 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10297 Declare init_registers_powerpc_vsx32l.
10298 Declare init_registers_powerpc_vsx64l.
10299 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10300 (ppc_arch_setup): Check for VSX in hwcap.
10301 (ppc_fill_vsxregset): New function.
10302 (ppc_store_vsxregset): New function.
10303 Add new VSX entry in regset_info target_regsets.
10304
10305 * configure.srv: Add new VSX dependencies.
10306
10307 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10308
10309 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10310 (remote_open): Set or clear transport_is_reliable.
10311 (putpkt_binary): Don't expect acks in noack mode.
10312 (getpkt): Don't send ack/nac in noack mode.
10313 * server.c (handle_general_set): Handle QStartNoAckMode.
10314 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10315 qSupported.
10316 (main): Reset noack_mode on every connection.
10317 * server.h (noack_mode): Declare.
10318
10319 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10320
10321 * Makefile.in (GDBREPLAY_OBS): New variable.
10322 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10323
10324 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10325 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10328 (usr_store_inferior_registers): Likewise.
10329 (regsets_store_inferior_registers): Likewise.
10330
10331 2008-07-31 Rolf Jansen <rj@surtec.com>
10332 Pedro Alves <pedro@codesourcery.com>
10333
10334 * configure.ac: Check for memmem declaration.
10335 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10336 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10337 (disable_packet_qfThreadInfo): Unconditionally compile.
10338 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10339 * configure, config.in: Regenerate.
10340
10341 2008-07-28 Doug Kwan <dougkwan@google.com>
10342
10343 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10344 (linux_write_memory): Remove declaration of errno.
10345
10346 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10347
10348 * linux-low.c (handle_extended_wait): Do not use "status"
10349 variable uninitialized.
10350
10351 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10352
10353 * server.c (handle_v_attach): Inhibit reporting dll changes.
10354
10355 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10356
10357 * remote-utils.c (prepare_resume_reply): If requested, don't
10358 output "thread:TID" in the T stop reply.
10359
10360 * server.c (disable_packet_vCont, disable_packet_Tthread)
10361 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10362 (handle_query): If requested, disable support for qC, qfThreadInfo
10363 and qsThreadInfo.
10364 (handle_v_requests): If requested, disable support for vCont.
10365 (gdbserver_show_disableable): New.
10366 (main): Handle --disable-packet and --disable-packet=LIST.
10367
10368 * server.h (disable_packet_vCont, disable_packet_Tthread)
10369 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10370
10371 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10372
10373 * server.c (gdbserver_usage): Mention --version.
10374
10375 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10376
10377 * Makefile.in (gdbreplay.o): New rule.
10378
10379 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10380
10381 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10382 message, not gdbserver.
10383
10384 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10385 Nathan Sidwell <nathan@codesourcery.com>
10386 Joseph Myers <joseph@codesourcery.com>
10387
10388 * acinclude.m4: Include ../../config/acx.m4.
10389 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10390 * configure, config.in: Regenerate.
10391 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10392 * server.c (gdbserver_version): Print PKGVERSION.
10393 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10394 (main): Adjust gdbserver_usage calls.
10395 * gdbreplay.c (version, host_name): Add declarations.
10396 (gdbreplay_version, gdbreplay_usage): New.
10397 (main): Accept --version and --help options.
10398
10399 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10400
10401 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10402 (arm_breakpoint_at): Handle Thumb.
10403 (the_low_target): Add comment.
10404
10405 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10406
10407 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10408
10409 2008-05-09 Doug Evans <dje@google.com>
10410
10411 * server.h (decode_search_memory_packet): Declare.
10412 * remote-utils.c (decode_search_memory_packet): New fn.
10413 * server.c (handle_search_memory_1): New fn.
10414 (handle_search_memory): New fn.
10415 (handle_query): Process qSearch:memory packets.
10416
10417 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10418
10419 * regcache.c (registers_length): Remove.
10420 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10421 full register packet.
10422 * regcache.h (registers_length): Remove prototype.
10423 * server.h (PBUFSIZ): Define to 16384.
10424
10425 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10426
10427 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10428 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10429 powerpc-64l.o, and powerpc-altivec64l.o.
10430 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10431 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10432 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10433 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10434 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10435 to srv_xmlfiles.
10436
10437 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10438 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10439 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10440 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10441 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10442 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10443 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10444 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10445 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10446 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10447 (clean): Update.
10448
10449 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10450 (init_registers_powerpc_32l): ... this new prototype.
10451 (init_registers_powerpc_32): Remove, replace by ...
10452 (init_registers_powerpc_altivec32l): ... this new prototype.
10453 (init_registers_powerpc_e500): Remove, replace by ...
10454 (init_registers_powerpc_e500l): ... this new prototype.
10455 (init_registers_ppc64): Remove, replace by ...
10456 (init_registers_powerpc_64l): ... this new prototype.
10457 (init_registers_powerpc_64): Remove, replace by ...
10458 (init_registers_powerpc_altivec64l): ... this new prototype.
10459 (ppc_num_regs): Set to 73.
10460 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10461 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10462 (ppc_cannot_store_register): Handle orig_r3 and trap.
10463 (ppc_arch_setup): Update init_registers_... calls.
10464 (ppc_fill_gregset): Handle orig_r3 and trap.
10465
10466 * inferiors.c (clear_inferiors): Reset current_inferior.
10467
10468 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10469
10470 * acinclude.m4: Add override.m4.
10471 * configure: Regenerate.
10472
10473 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10474
10475 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10476 initial call to init_register_ppc64.
10477
10478 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10479
10480 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10481 single powerpc*-*-linux* case.
10482 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10483
10484 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10485
10486 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10487 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10488 from reg_xmlfiles.
10489 * linux-ppc-low.c: Include <elf.h>.
10490 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10491 (ppc_hwcap): New global variable.
10492 (ppc_regmap): Remove __SPE__ #ifdef sections.
10493 (ppc_regmap_e500): New global variable.
10494 (ppc_cannot_store_register): Update __SPE__ special case.
10495 (ppc_get_hwcap): New function.
10496 (ppc_arch_setup): Use it to determine whether inferior supports
10497 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10498 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10499 Do not access registers if target does not support AltiVec.
10500 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10501 Do not access registers if target does not support SPE.
10502 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10503
10504 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10505
10506 * linux-low.c (disabled_regsets, num_regsets): New.
10507 (use_regsets_p): Delete.
10508 (linux_wait_for_process): Clear disabled_regsets.
10509 (regsets_fetch_inferior_registers): Check and set it.
10510 (regsets_store_inferior_registers): Likewise.
10511 (linux_fetch_registers, linux_store_registers): Do not use
10512 use_regsets_p.
10513 (initialize_low): Allocate disabled_regsets.
10514
10515 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10516
10517 * Makefile.in (LIBOBJS): New.
10518 (OBS): Use LIBOBJS.
10519 (memmem.o): New rule.
10520 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10521 * configure: Regenerated.
10522
10523 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10524
10525 * server.c (handle_query): Never return "unsupported" for
10526 qXfer:features:read queries.
10527
10528 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10529
10530 * server.c (get_features_xml): Fix inverted condition.
10531 (handle_query): Always support qXfer:feature:read.
10532
10533 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10534
10535 * server.c (wrapper_argv): New.
10536 (start_inferior): Handle wrapper_argv. If set, expect an extra
10537 trap.
10538 (gdbserver_usage): Document --wrapper.
10539 (main): Parse --wrapper.
10540
10541 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10542
10543 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10544 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10545 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10546 (ppc_set_pc): Likewise.
10547 (ppc_arch_setup): New function.
10548 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10549 of collect_register.
10550 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10551
10552 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10553
10554 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10555 instead of linux-ppc64-low.o.
10556 * linux-ppc64-low.c: Remove file.
10557 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10558 (linux-ppc64-low.o): Remove rule.
10559
10560 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10561 (init_registers_powerpc_64): Likewise.
10562 (ppc_regmap): Conditionally define depending on __powerpc64__.
10563 (ppc_cannot_store_register): Do not special-case "fpscr" when
10564 compiled on __powerpc64__.
10565 (ppc_collect_ptrace_register): New function.
10566 (ppc_supply_ptrace_register): New function.
10567 (ppc_breakpoint): Change type to "unsigned int".
10568 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10569 (the_low_target): Conditionally provide initializers for the
10570 arch_setup member depending on __powerpc64__. Install
10571 collect_ptrace_register and supply_ptrace_register members.
10572
10573 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10574
10575 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10576 * server.c (gdbserver_xmltarget): Define.
10577 (get_features_xml): Use it to replace "target.xml" and arch_string.
10578
10579 * configure.srv: Remove srv_xmltarget. Add XML files that were
10580 mentioned there to srv_xmlfiles instead. Remove conditional tests
10581 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10582 srv_xmlfiles and srv_regobj to include all possible choices.
10583 * configure.ac (srv_xmltarget): Remove.
10584 (srv_xmlfiles): Do not add "target.xml".
10585 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10586 checks for supplementary target information.
10587 * configure: Regenerate.
10588 * Makefile.in (XML_TARGET): Remove.
10589 (target.xml): Remove rule.
10590 (clean): Do not clean up target.xml.
10591 (.PRECIOUS): Do not mention target.xml.
10592
10593 * target.h (struct target_ops): Remove arch_string member.
10594 * linux-low.c (linux_arch_string): Remove.
10595 (linux_target_ops): Remove arch_string initializer.
10596 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10597 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10598 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10599 * spu-low.c (spu_arch_string): Remove.
10600 (spu_target_ops): Remove arch_string initializer.
10601 * win32-low.c (win32_arch_string): Remove.
10602 (win32_target_ops): Remove arch_string initializer.
10603 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10604 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10605 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10606
10607 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10608
10609 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10610 by collect_ptrace_register and supply_ptrace_register hooks.
10611 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10612 instead of checking for the_low_target.left_pad_xfer.
10613 (usr_store_inferior_registers): Use collect_ptrace_register callback
10614 instead of checking for the_low_target.left_pad_xfer.
10615
10616 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10617 (s390_supply_ptrace_register): Likewise.
10618 (s390_fill_gregset): Call s390_collect_ptrace_register.
10619 (the_low_target): Update.
10620
10621 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10622 (ppc_supply_ptrace_register): Likewise.
10623 (the_low_target): Update.
10624
10625 * linux-i386-low.c (the_low_target): Update.
10626 * linux-x86-64-low.c (the_low_target): Update.
10627
10628 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10629
10630 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10631 reg-s390.o and reg-s390x.o.
10632
10633 * linux-low.c (new_inferior): New global variable.
10634 (linux_create_inferior, linux_attach): Set it.
10635 (linux_wait_for_process): Call the_low_target.arch_setup after the
10636 target has stopped for the first time.
10637 (initialize_low): Do not call the_low_target.arch_setup.
10638
10639 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10640 (s390_set_pc): Likewise.
10641 (s390_arch_setup): New function.
10642 (the_low_target): Use s390_arch_setup as arch_setup routine.
10643
10644 * regcache.c (realloc_register_cache): New function.
10645 (set_register_cache): Call it for each existing regcache.
10646
10647 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10648
10649 * server.h (init_registers): Remove prototype.
10650
10651 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10652 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10653 instead of init_registers ().
10654 * linux-arm-low.c (init_registers_arm): Add prototype.
10655 (init_registers_arm_with_iwmmxt): Likewise.
10656 (the_low_target): Add initializer for arch_setup field.
10657 * linux-cris-low.c (init_registers_cris): Add prototype.
10658 (the_low_target): Add initializer for arch_setup field.
10659 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10660 (the_low_target): Add initializer for arch_setup field.
10661 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10662 (the_low_target): Add initializer for arch_setup field.
10663 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10664 (the_low_target): Add initializer for arch_setup field.
10665 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10666 (the_low_target): Add initializer for arch_setup field.
10667 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10668 (the_low_target): Add initializer for arch_setup field.
10669 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10670 (init_registers_mips64_linux): Likewise.
10671 (the_low_target): Add initializer for arch_setup field.
10672 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10673 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10674 (the_low_target): Add initializer for arch_setup field.
10675 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10676 (init_registers_powerpc_64): Likewise.
10677 (the_low_target): Add initializer for arch_setup field.
10678 * linux-s390-low.c (init_registers_s390): Add prototype.
10679 (init_registers_s390x): Likewise.
10680 (the_low_target): Add initializer for arch_setup field.
10681 * linux-sh-low.c (init_registers_sh): Add prototype.
10682 (the_low_target): Add initializer for arch_setup field.
10683 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10684 (the_low_target): Add initializer for arch_setup field.
10685 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10686 (the_low_target): Add initializer for arch_setup field.
10687
10688 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10689 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10690 instead of init_registers ().
10691 * win32-arm-low.c (init_registers_arm): Add prototype.
10692 (the_low_target): Add initializer for arch_setup field.
10693 * win32-i386-low.c (init_registers_i386): Add prototype.
10694 (the_low_target): Add initializer for arch_setup field.
10695
10696 * spu-low.c (init_registers_spu): Add prototype.
10697 (initialize_low): Call initialie_registers_spu () instead of
10698 initialize_registers ().
10699
10700 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10701
10702 * server.c (handle_v_requests): When handling the vRun and vAttach
10703 packets, if already debugging a process, don't kill it. Return an
10704 error instead.
10705
10706 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10707
10708 * server.c (handle_query): Correct length check.
10709
10710 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10711
10712 * win32-low.c (do_initial_child_stuff): Add process handle
10713 parameter. Set current_process_handle and current_process_id from the
10714 parameters. Clear globals.
10715 (win32_create_inferior): Don't set current_process_handle and
10716 current_process_id here. Instead pass them on the call to
10717 do_initial_child_stuff.
10718 (win32_attach): Likewise.
10719 (win32_clear_inferiors): New.
10720 (win32_kill): Don't close the current process handle or the
10721 current thread handle here. Instead call win32_clear_inferiors.
10722 (win32_detach): Don't open a new handle to the process. Call
10723 win32_clear_inferiors.
10724 (win32_join): Don't rely on current_process_handle; open a new
10725 handle using the process id.
10726 (win32_wait): Call win32_clear_inferiors when the inferior process
10727 has exited.
10728
10729 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10730
10731 * server.c (monitor_show_help): Add "exit".
10732
10733 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10734
10735 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10736 (clean): Add reg-xtensa.c.
10737 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10738 * configure.srv (xtensa*-*-linux*) New target.
10739 * linux-xtensa-low.c: New.
10740 * xtensa-xtregs.c: New.
10741
10742 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10743
10744 * hostio.c: Don't include errno.h.
10745 (errno_to_fileio_errno): Move to hostio-errno.
10746 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10747 error number outputting to the target->hostio_last_error callback.
10748 (hostio_packet_error): Use FILEIO_EINVAL directly.
10749 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10750 calls to hostio_error.
10751 * hostio-errno.c: New.
10752 * server.h (hostio_last_error_from_errno): Declare.
10753 * target.h (target_ops): Add hostio_last_error member.
10754 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10755 as hostio_last_error handler.
10756 * spu-low.c (spu_target_ops): Likewise.
10757 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10758 (wince_hostio_last_error): New functions.
10759 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10760 as hostio_last_error handler.
10761 (win32_target_ops) [!_WIN32_WCE]: Register
10762 hostio_last_error_from_errno as hostio_last_error handler.
10763 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10764 (hostio-errno.o): New rule.
10765 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10766 * configure.srv (srv_hostio_err_objs): New variable. Default to
10767 hostio-errno.o.
10768 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10769 * configure: Regenerate.
10770
10771 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10772
10773 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10774 (linux_kill, linux_detach): Clean up the process list.
10775 * remote-utils.c (remote_open): Improve port number parsing.
10776 (putpkt_binary, input_interrupt): Only send interrupts if the target
10777 is running.
10778 * server.c (extended_protocol): Make static.
10779 (attached): Define earlier.
10780 (exit_requested, response_needed, program_argv): New variables.
10781 (target_running): New.
10782 (start_inferior): Clear attached here.
10783 (attach_inferior): Set attached here.
10784 (require_running): Define.
10785 (handle_query): Use require_running and target_running. Implement
10786 "monitor exit".
10787 (handle_v_attach, handle_v_run): New.
10788 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10789 (gdbserver_usage): Update.
10790 (main): Redo argument parsing. Handle --debug and --multi. Handle
10791 --attach along with other options or after the port. Save
10792 program_argv. Support no initial program. Resynchronize
10793 communication with GDB after an error. Handle "monitor exit".
10794 Use require_running and target_running. Always allow the extended
10795 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10796 restart in extended mode.
10797 * README: Refer to the GDB manual. Update --attach usage.
10798
10799 2007-12-20 Andreas Schwab <schwab@suse.de>
10800
10801 * linux-low.c (STACK_SIZE): Define.
10802 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10803 (linux_test_for_tracefork): Likewise.
10804
10805 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10806
10807 * linux-low.c (linux_wait_for_event): Update messages. Do not
10808 reinsert auto-delete breakpoints.
10809 * mem-break.c (struct breakpoint): Change return type of handler to
10810 int.
10811 (set_breakpoint_at): Update handler type.
10812 (reinsert_breakpoint_handler): Return 1 instead of calling
10813 delete_breakpoint.
10814 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10815 setting a new one.
10816 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10817 * mem-break.h (set_breakpoint_at): Update handler type.
10818 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10819 * win32-low.c (auto_delete_breakpoint): New.
10820 (get_child_debug_event): Use it.
10821
10822 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10823
10824 * configure.ac: Check for pread and pwrite.
10825 * hostio.c (handle_pread): Fall back to lseek and read.
10826 (handle_pwrite): Fall back to lseek and write.
10827 * config.in, configure: Regenerated.
10828
10829 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10830
10831 * server.c (myresume): Add own_buf argument.
10832 (main): Update calls.
10833
10834 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10835
10836 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10837 * remote-utils.c (remote_open): Do not call disable_async_io.
10838 (block_async_io): Delete.
10839 (unblock_async_io): Make static.
10840 (initialize_async_io): New.
10841 * server.c (handle_v_cont): Handle async I/O here.
10842 (myresume): Likewise. Move other common resume tasks here...
10843 (main): ... from here. Call initialize_async_io. Disable async
10844 I/O before the main loop.
10845 * server.h (initialize_async_io): Declare.
10846 (block_async_io, unblock_async_io): Delete prototypes.
10847 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10848
10849 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10850
10851 * remote-utils.c (readchar): Allow binary data in received messages.
10852
10853 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10854
10855 * win32-low.c (attaching): New global.
10856 (win32_create_inferior): Clear the `attaching' global.
10857 (win32_attach): Set the `attaching' global.
10858 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10859 attaching. Only set a breakpoint at the entry point if not
10860 attaching.
10861
10862 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10863
10864 * server.c (main): Don't report dll events on the initial
10865 connection on attaches.
10866
10867 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10868
10869 * server.c (main): Relax numerical bases supported for the pid of
10870 the --attach command line argument.
10871
10872 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10873
10874 * win32-low.c (win32_attach): Call OpenProcess before
10875 DebugActiveProcess, not after. Add last error output to error
10876 call.
10877
10878 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10879
10880 * win32-low.c (win32_get_thread_context)
10881 (win32_set_thread_context): New functions.
10882 (thread_rec): Use win32_get_thread_context.
10883 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10884 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10885 field.
10886
10887 2007-12-03 Leo Zayas
10888 Pedro Alves <pedro_alves@portugalmail.pt>
10889
10890 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10891 global variables.
10892 (child_add_thread): Minor cleanup.
10893 (child_continue): Resume artificially suspended threads before
10894 calling ContinueDebugEvent.
10895 (suspend_one_thread): New.
10896 (fake_breakpoint_event): New.
10897 (get_child_debug_event): Change return type to int. Check here if
10898 gdb sent an interrupt request. If a soft interrupt was requested,
10899 fake a breakpoint event. Return 0 if there is no event to handle,
10900 and 1 otherwise.
10901 (win32_wait): Don't check here if gdb sent an interrupt request.
10902 Ensure there is a valid event to handle.
10903 (win32_request_interrupt): Add soft interruption method as last
10904 resort.
10905
10906 2007-12-03 Leo Zayas
10907 Pedro Alves <pedro_alves@portugalmail.pt>
10908
10909 * win32-low.h (win32_thread_info): Add descriptions to the
10910 structure members. Replace `suspend_count' counter by a
10911 `suspended' flag.
10912 * win32-low.c (thread_rec): Update condition of when to get the
10913 context from the inferior. Rely on ContextFlags being set if it
10914 has already been retrieved. Only suspend the inferior thread if
10915 we haven't already. Warn if that fails.
10916 (continue_one_thread): s/suspend_count/suspended/. Only call
10917 ResumeThread once. Warn if that fails.
10918
10919 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10920
10921 * win32-low.c (win32_wait): Don't read from the inferior when it
10922 has already exited.
10923
10924 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10925
10926 * Makefile.in (win32_low_h): New variable.
10927 (win32-low.o): Add dependency on $(win32_low_h).
10928 (win32-arm-low.o, win32-i386-low.o): New rules.
10929
10930 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10931
10932 * hostio.c: Correct copyright year.
10933
10934 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10935
10936 * Makefile.in (OBS): Add hostio.o.
10937 (hostio.o): New rule.
10938 * server.h (handle_vFile): Declare.
10939 * hostio.c: New file.
10940 * server.c (handle_v_requests): Take packet_len and new_packet_len
10941 for binary packets. Call handle_vFile.
10942 (main): Update call to handle_v_requests.
10943
10944 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10945
10946 * linux-low.c: Include <sched.h>.
10947
10948 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10949
10950 * linux-low.c (linux_tracefork_grandchild): New.
10951 (linux_tracefork_child): Use clone.
10952 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10953
10954 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10955
10956 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10957
10958 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10959
10960 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10961
10962 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10963
10964 * inferiors.c (change_inferior_id): Delete.
10965 (add_pid_to_list, pull_pid_from_list): New.
10966 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10967 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10968 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10969 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10970 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10971 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10972 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10973 (using_threads): Always set to 1.
10974 (handle_extended_wait): New.
10975 (add_process): Do not set TID.
10976 (linux_create_inferior): Set must_set_ptrace_flags.
10977 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10978 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10979 (linux_thread_alive): Rename TID argument to LWPID.
10980 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10981 (linux_wait_for_event): Do not use TID or check using_threads. Update
10982 call to dead_thread_notify. Call handle_extended_wait.
10983 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10984 (send_sigstop): Delete sigstop_sent.
10985 (wait_for_sigstop): Avoid TID.
10986 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10987 (linux_test_for_tracefork): New.
10988 (linux_lookup_signals): Use thread_db_active and
10989 linux_supports_tracefork_flag.
10990 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10991 * linux-low.h (get_process_thread): Avoid TID.
10992 (struct process_ifo): Move thread_known and tid to the end. Remove
10993 sigstop_sent.
10994 (linux_attach_lwp, thread_db_init): Update prototypes.
10995 * server.h (change_inferior_id): Delete prototype.
10996 (add_pid_to_list, pull_pid_from_list): New prototypes.
10997 * thread-db.c (thread_db_use_events): New.
10998 (find_first_thread): Rename to...
10999 (find_one_thread): ...this. Update callers and messages. Do not
11000 call fatal. Check thread_db_use_events. Do not call
11001 change_inferior_id or new_thread_notify.
11002 (maybe_attach_thread): Update. Do not call new_thread_notify.
11003 (thread_db_init): Set thread_db_use_events. Check use_events.
11004 * utils.c (fatal, warning): Correct message prefix.
11005
11006 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
11007
11008 * Makefile.in (clean): Remove new files.
11009 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
11010 (powerpc-64.o, powerpc-64.c): New rules.
11011 * configure.srv: Use alternate register sets for powerpc64-*-linux*
11012 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
11013 with SPE.
11014 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
11015 SPE targets.
11016 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
11017 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
11018 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
11019 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11020 (target_regsets): Add AltiVec and SPE register sets.
11021 * configure.ac: Check for AltiVec and SPE.
11022 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11023 (ppc_fill_vrregset, ppc_store_vrregset): New.
11024 (target_regsets): Add AltiVec register set.
11025 * configure: Regenerated.
11026
11027 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11028
11029 * linux-low.c (O_LARGEFILE): Define.
11030 (linux_read_memory): Use /proc/PID/mem.
11031 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11032 * configure, config.in: Regenerated.
11033
11034 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11035
11036 * linux-low.c (linux_wait_for_event): Do not pass signals while
11037 single-stepping.
11038
11039 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11040
11041 * win32-low.c (create_process): New.
11042 (win32_create_inferior): Use create_process instead of
11043 CreateProcess. If create_process failed retry appending an ".exe"
11044 suffix. Store the GetLastError result immediatelly after
11045 create_process calls and use it on the call to error.
11046
11047 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11048
11049 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11050
11051 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11052
11053 * configure.ac: Switch license to GPLv3.
11054
11055 2007-08-01 Michael Snyder <msnyder@access-company.com>
11056
11057 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11058
11059 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11060
11061 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11062 typedef.
11063 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11064 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11065 CloseToolhelp32Snapshot.
11066 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11067 CloseToolhelp32Snapshot.
11068
11069 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11070
11071 * server.c (main): Check for inferior exit before main loop.
11072
11073 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11074
11075 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11076 instead of on tmp_desc.
11077
11078 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11079 Daniel Jacobowitz <dan@codesourcery.com>
11080
11081 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11082 (add_thread): Minor cleanups.
11083 (clear_inferiors): Move lower in the file. Clear the DLL
11084 list.
11085 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11086 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11087 (xml_escape_text): New.
11088 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11089 for qSupported.
11090 (handle_v_cont): Report errors.
11091 (gdbserver_version): Update.
11092 (main): Correct size of own_buf. Do not report initial DLL events.
11093 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11094 (unloaded_dll, xml_escape_text): New.
11095 * win32-low.c (enum target_waitkind): Update comments.
11096 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11097 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11098 (win32_EnumProcessModules, win32_GetModuleInformation)
11099 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11100 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11101 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11102 (win32_Module32First, win32_Module32Next, load_toolhelp)
11103 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11104 (get_child_debug_event): Handle DLL events.
11105 (win32_wait): Likewise.
11106
11107 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11108
11109 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11110 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11111
11112 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11113
11114 * win32-low.c (handle_output_debug_string): Ignore event if not
11115 waiting.
11116
11117 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11118
11119 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11120
11121 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11122
11123 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11124
11125 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11126
11127 * inferiors.c (change_inferior_id): Add comment.
11128 * linux-low.c (check_removed_breakpoint): Add an early
11129 prototype. Improve debug output.
11130 (linux_attach): Doc update.
11131 (linux_detach_one_process, linux_detach): Clean up before releasing
11132 each process.
11133 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11134 * linux-low.h (struct process_info): Doc improvement.
11135 * mem-break.c (delete_all_breakpoints): New.
11136 * mem-break.h (delete_all_breakpoints): New prototype.
11137 * thread-db.c (find_first_thread): New.
11138 (thread_db_create_event): Call it instead of
11139 thread_db_find_new_threads. Clean up unused variables.
11140 (maybe_attach_thread): Remove first thread handling.
11141 (thread_db_find_new_threads): Use find_first_thread.
11142 (thread_db_get_tls_address): Likewise.
11143
11144 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11145
11146 * thread-db.c (thread_db_find_new_threads): Add prototype.
11147 (thread_db_create_event): Check for the main thread before adding
11148 a new thread.
11149 (maybe_attach_thread): Only enable event reporting if TID == 0.
11150 (thread_db_get_tls_address): Check for new threads.
11151
11152 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11153
11154 * linux-low.c (linux_create_inferior): Try execv before execvp.
11155 * spu-low.c (spu_create_inferior): Likewise.
11156
11157 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11158
11159 * linux-low.c (linux_create_inferior): Change execv to execvp.
11160 * spu-low.c (spu_create_inferior): Likewies.
11161
11162 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11163
11164 * Makefile.in (clean): Clean new files instead of deleted ones.
11165 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11166 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11167 rules.
11168 * configure.srv: Specify XML files and new regformats for MIPS and
11169 MIPS64 GNU/Linux.
11170 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11171 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11172 an entry for the restart register.
11173 (mips_cannot_fetch_register, mips_cannot_store_register)
11174 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11175 register names to match the XML descriptions.
11176 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11177 restart register instead of $0.
11178
11179 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11180 Markus Deuling <deuling@de.ibm.com>
11181
11182 * remote-utils.c (decode_xfer_write): New function.
11183 * server.h (decode_xfer_write): Add prototype.
11184 * server.c (handle_query): Add PACKET_LEN argument. Support
11185 qXfer:spu:read and qXfer:spu:write packets.
11186 (main): Pass packet_len to handle_query.
11187 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11188 * target.h (target_ops): Add qxfer_spu.
11189
11190 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11191
11192 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11193 accessing non-seekable spufs files.
11194
11195 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11196
11197 * server.c (handle_query): Add reply for qC packet.
11198
11199 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11200 Leo Zayas <lerele@champenstudios@com>
11201
11202 * server.h (check_remote_input_interrupt_request): New function.
11203 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11204 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11205 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11206 (check_remote_input_interrupt_request): New function.
11207 * server.h (check_remote_input_interrupt_request): Declare.
11208 * win32-low.c (winapi_DebugBreakProcess,
11209 winapi_GenerateConsoleCtrlEvent): New typedefs.
11210 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11211 to 250 ms.
11212 (win32_wait): Check for remote interrupt request
11213 with check_remote_input_interrupt_request.
11214 (win32_request_interrupt): New function.
11215 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11216
11217 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11218
11219 * win32-low.c (debug_registers_changed,
11220 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11221 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11222 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11223 (thread_rec): Get context using the low target.
11224 (child_add_thread): Call thread_added on the low target,
11225 which does the same thing.
11226 (regptr): Delete.
11227 (do_initial_child_stuff): Remove debug registers references.
11228 Set context using the low target. Resume threads after
11229 setting the contexts.
11230 (child_continue): Remove dead variable. Remove debug
11231 registers references.
11232 (child_fetch_inferior_registers): Go through the low target.
11233 (do_child_store_inferior_registers): Remove.
11234 (child_store_inferior_registers): Go through the low target.
11235 (win32_resume): Remove debug registers references.
11236 Set context using the low target.
11237 (handle_exception): Change return type to void. Don't record
11238 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11239 first chance exception.
11240 (get_child_debug_event): Change return type to void. Remove
11241 goto loop. Always return after waiting for debug event.
11242 (win32_wait): Convert to switch statement. Handle spurious
11243 events.
11244
11245 * win32-i386-low.c (debug_registers_changed,
11246 debug_registers_used): New.
11247 (initial_stuff): Rename to ...
11248 (i386_initial_stuff): ... this. Clear debug registers
11249 state variables.
11250 (store_debug_registers): Delete.
11251 (i386_get_thread_context): New.
11252 (load_debug_registers): Delete.
11253 (i386_set_thread_context): New.
11254 (i386_thread_added): New.
11255 (single_step): Rename to ...
11256 (i386_single_step): ... this.
11257 (do_fetch_inferior_registers): Rename to ...
11258 (i386_fetch_inferior_register): ... this.
11259 (i386_store_inferior_register): New.
11260 (the_low_target): Adapt to new interface.
11261
11262 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11263 (arm_get_thread_context): New.
11264 (arm_set_thread_context): New.
11265 (regptr): New.
11266 (do_fetch_inferior_registers): Rename to ...
11267 (arm_fetch_inferior_register): ... this.
11268 (arm_store_inferior_register): New.
11269 (arm_wince_breakpoint): Reimplement as unsigned long.
11270 (arm_wince_breakpoint_len): Define.
11271 (the_low_target): Adapt to new interface.
11272
11273 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11274 load_debug_registers. Add get_thread_context, set_thread_context,
11275 thread_added and store_inferior_register. Rename
11276 fetch_inferior_registers to fetch_inferior_register.
11277 (regptr): Remove declaration.
11278
11279 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11280
11281 * linux-low.c (linux_detach): Change return type to int. Return 0.
11282 * spu-low.c (spu_detach): Likewise.
11283
11284 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11285
11286 * target.h (target_ops): Change return type of detach to int.
11287 Add join.
11288 (join_inferior): New.
11289 * server.c (main): Don't skip detach support on mingw32.
11290 If the inferior doesn't support detaching return error.
11291 Call join_inferior instead of using waitpid.
11292 * linux-low.c (linux_join): New.
11293 (linux_target_op): Add linux_join.
11294 * spu-low.c (spu_join): New.
11295 (spu_target_ops): Add spu_join.
11296 * win32-low.c (win32_detach): Adapt to new interface.
11297 Reopen current_process_handle before detaching. Issue a child
11298 resume before detaching.
11299 (win32_join): New.
11300 (win32_target_op): Add win32_join.
11301
11302 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11303
11304 * win32-low.c (win32-attach): Fix return value.
11305 * target.h (target_ops): Describe ATTACH return values.
11306
11307 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11308
11309 * win32-low.c (GETPROCADDRESS): Define.
11310 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11311 (winapi_DebugSetProcessKillOnExit): Likewise.
11312 (win32_create_inferior): Force usage of ansi CreateProcessA.
11313 (win32_attach): Use GETPROCADDRESS.
11314 (win32_detach): Likewise.
11315
11316 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11317
11318 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11319
11320 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11321
11322 * win32-low.c: Commit leftover changes from 2007-03-29.
11323
11324 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11325
11326 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11327 fields short instead of int. Add explicit padding.
11328 (i387_cache_to_fsave): Remove unnecessary casts.
11329 (i387_fsave_to_cache): Doc fix.
11330 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11331
11332 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11333
11334 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11335 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11336
11337 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11338
11339 * configure.srv (arm*-*-mingw32ce*): Move near the other
11340 arm targets.
11341
11342 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11343
11344 * configure.ac: Add errno checking.
11345 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11346 sys/file.h and malloc.h.
11347 (AC_CHECK_DECLS): Add perror.
11348 (srv_mingwce): Handle.
11349 * configure.srv (i[34567]86-*-cygwin*): Add
11350 win32-i386-low.o to srv_tgtobj.
11351 (i[34567]86-*-mingw*): Likewise.
11352 (arm*-*-mingw32ce*): Add case.
11353 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11354 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11355 [__MINGW32CE__] (strerror): New function.
11356 [__MINGW32CE__] (errno): Define to GetLastError.
11357 [__MINGW32CE__] (COUNTOF): New macro.
11358 (remote_open): Remove extra close call.
11359 * mem-break.c (delete_breakpoint_at): New function.
11360 * mem-break.h (delete_breakpoint_at): Declare.
11361 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11362 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11363 [USE_WIN32API] (read, write): Add char* casts.
11364 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11365 * server.h: Include wincecompat.h on Windows CE.
11366 [HAVE_ERRNO_H]: Check.
11367 (perror): Declare if not declared.
11368 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11369 (perror_with_name): Remove errno declaration.
11370 * wincecompat.h: New.
11371 * wincecompat.c: New.
11372 * win32-low.h: New.
11373 * win32-arm-low.c: New.
11374 * win32-i386-low.c: New.
11375 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11376 (OUTMSG2): Make it safe.
11377 (_T): New macro.
11378 (COUNTOF): New macro.
11379 (NUM_REGS): Get it from the low target.
11380 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11381 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11382 (thread_rec): Let low target handle debug registers.
11383 (child_add_thread): Likewise.
11384 (child_init_thread_list): Likewise.
11385 (continue_one_thread): Likewise.
11386 (regptr): New.
11387 (do_child_fetch_inferior_registers): Move to ...
11388 * win32-i386-low.c: ... here, and rename to ...
11389 (do_fetch_inferior_registers): ... this.
11390 * win32-low.c (child_fetch_inferior_registers):
11391 Go through the low target.
11392 (do_child_store_inferior_registers): Use regptr.
11393 (strwinerror): New function.
11394 (win32_create_inferior): Handle Windows CE.
11395 Use strwinerror instead of strerror on Windows error
11396 codes. Add program to the error output.
11397 Don't close the main thread handle on Windows CE.
11398 (win32_attach): Use coredll.dll on Windows CE.
11399 (win32_kill): Close current process and current
11400 thread handles.
11401 (win32_detach): Use coredll.dll on Windows CE.
11402 (win32_resume): Let low target handle debug registers, and
11403 step request.
11404 (handle_exception): Add/Remove initial breakpoint. Avoid
11405 non-existant WSTOPSIG on Windows CE.
11406 (win32_read_inferior_memory): Cast to remove warning.
11407 (win32_arch_string): Go through the low target.
11408 (initialize_low): Call set_breakpoint_data with the low
11409 target's breakpoint.
11410 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11411 FOP_REGNUM, mappings): Move to ...
11412 * win32-i386-low.c: ... here.
11413 * win32-low.c (win32_thread_info): Move to ...
11414 * win32-low.h: ... here.
11415 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11416 win32-arm-low.c and wincecompat.c.
11417 (all:): Add $EXEEXT.
11418 (install-only:): Likewise.
11419 (gdbserver:): Likewise.
11420 (gdbreplay:): Likewise.
11421 * config.in: Regenerate.
11422 * configure: Regenerate.
11423
11424 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11425
11426 * win32-low.c: Rename typedef thread_info to
11427 win32_thread_info throughout.
11428
11429 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11430
11431 * win32-i386-low.c: Rename to ...
11432 * win32-low.c: ... this.
11433 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11434 * Makefile.in: Likewise.
11435
11436 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11437
11438 * remote-utils.c (monitor_output): Constify msg parameter.
11439 * server.h (monitor_output): Likewise.
11440 * win32-i386-low.c (handle_output_debug_string): New.
11441 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11442 handle_output_debug_string.
11443 (get_child_debug_event): Likewise.
11444
11445 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11446
11447 * server.c (main): Correct strtoul check.
11448
11449 2007-03-27 Jon Ringle <jon@ringle.org>
11450
11451 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11452
11453 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11454
11455 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11456
11457 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11458
11459 * terminal.h: Check HAVE_SGTTY_H.
11460
11461 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11462
11463 * remote-utils.c (remote_open): Print out the assigned port number.
11464
11465 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11466
11467 * remote-utils.c (monitor_output): New function.
11468 * server.c (debug_threads): Define here.
11469 (monitor_show_help): New function.
11470 (handle_query): Handle qRcmd.
11471 (main): Do not handle 'd' packet.
11472 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11473 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11474 of debug_threads.
11475
11476 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11477
11478 * Makefile.in (EXEEXT): New.
11479 (clean): Use $(EXEEXT).
11480
11481 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11482
11483 * target.h (target_ops): Rename send_signal to request_interrupt,
11484 and remove enum target_signal parameter.
11485 * linux-low.c (linux_request_interrupt): Rename from
11486 linux_send_signal, and always send SIGINT.
11487 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11488 and always send SIGINT.
11489 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11490 of send_signal.
11491 (input_interrupt): Likewise.
11492
11493 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11494
11495 * server.c (get_features_xml): Check if target implemented
11496 arch_string.
11497 * win32-i386-low.c (win32_arch_string): New.
11498 (win32_target_ops): Add win32_arch_string as arch_string member.
11499
11500 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11501
11502 * spu-low.c (spu_arch_string): New.
11503 (spu_target_ops): Add spu_arch_string.
11504
11505 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11506
11507 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11508 * configure.ac: Do not check for terminal.h.
11509 * configure, config.in: Regenerated.
11510
11511 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11512
11513 * Makefile.in (OBS): Add $(XML_BUILTIN).
11514 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11515 (clean): Update.
11516 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11517 (arm-with-iwmmxt.c): New.
11518 * config.in, configure: Regenerate.
11519 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11520 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11521 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11522 (arm*-*-linux*): Add iWMMXt and regset support.
11523 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11524 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11525 (arm_store_wmmxregset, target_regsets): New.
11526 * server.c (get_features_xml): Take annex argument. Check builtin
11527 XML documents.
11528 (handle_query): Handle multiple annexes.
11529
11530 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11531
11532 * remote-utils.c [USE_WIN32API] (read, write): Define.
11533 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11534 write.
11535
11536 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11537
11538 * linux-i386-low.c (the_low_target): Set arch_string.
11539 * linux-x86-64-low.c (the_low_target): Likewise.
11540 * linux-low.c (linux_arch_string): New.
11541 (linux_target_ops): Add it.
11542 * linux-low.h (struct linux_target_ops): Add arch_string.
11543 * server.c (write_qxfer_response): Use const void * for DATA.
11544 (get_features_xml): New.
11545 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11546 * target.h (struct target_ops): Add arch_string method.
11547
11548 2007-01-03 Denis Pilat <denis.pilat@st.com>
11549 Daniel Jacobowitz <dan@codesourcery.com>
11550
11551 * linux-low.c (linux_kill): Handle being called with no threads.
11552 * win32-i386-low.c (win32_kill): Likewise.
11553 (get_child_debug_event): Clear current_process_handle.
11554
11555 2006-12-30 Denis PILAT <denis.pilat@st.com>
11556 Daniel Jacobowitz <dan@codesourcery.com>
11557
11558 * remote-utils.c (remote_open): Check the type of specified
11559 serial port devices before opening them.
11560 * server.c (main): Kill the inferior if an error occurs during
11561 the first remote_open.
11562
11563 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11564
11565 * README: Update supported targets.
11566
11567 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11568
11569 * Makefile.in (clean): Remove reg-mips64.c.
11570 (reg-mips64.c, reg-mips64.o): New rules.
11571 * configure.srv: Handle mips64. Include regset support for mips.
11572 * linux-mips-low.c (union mips_register): New.
11573 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11574 (mips_breakpoint, mips_breakpoint_at): Use int.
11575 (mips_collect_register, mips_supply_register)
11576 (mips_collect_register_32bit, mips_supply_register_32bit)
11577 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11578 (mips_store_fpregset, target_regsets): New.
11579 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11580
11581 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11582
11583 * configure.srv: Add target "spu*-*-*".
11584 * Makefile.in (clean): Remove reg-spu.c.
11585 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11586 * spu-low.c: New file.
11587
11588 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11589
11590 * configure.ac: Correct td_thr_tls_get_addr test.
11591 * configure: Regenerated.
11592
11593 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11594
11595 * linux-low.c (linux_wait_for_event): Reformat. Use the
11596 pass_signals array.
11597 * remote-utils.c (decode_address_to_semicolon): New.
11598 * server.c (pass_signals, handle_general_set): New.
11599 (handle_query): Mention QPassSignals for qSupported.
11600 (main): Call handle_general_set.
11601 * server.h (pass_signals, decode_address_to_semicolon): New.
11602
11603 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11604
11605 * server.c (handle_query): Correct error handling for read_auxv.
11606
11607 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11608
11609 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11610 and srv_linux_thread_db to yes.
11611 * linux-s390-low.c (s390_fill_gregset): New function.
11612 (target_regsets): Define data structure.
11613
11614 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11615
11616 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11617 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11618 * config.in, configure: Regenerated.
11619 * inferiors.c (gdb_id_to_thread): New function.
11620 (gdb_id_to_thread_id): Use it.
11621 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11622 * linux-low.h (struct process_info): Add th member.
11623 (thread_db_get_tls_address): New prototype.
11624 * remote-utils.c (decode_address): Make non-static.
11625 * server.c (handle_query): Handle qGetTLSAddr.
11626 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11627 * target.h (struct target_ops): Add get_tls_address.
11628 * thread-db.c (maybe_attach_thread): Save the thread handle.
11629 (thread_db_get_tls_address): New.
11630
11631 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11632
11633 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11634 (linux_resume_one_process): Take a siginfo_t *. Update all
11635 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11636 (struct pending_signals): Add a siginfo_t.
11637 (linux_wait_for_process): Always set last_status.
11638 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11639 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11640 * linux-low.h (struct process_info): Add last_status.
11641
11642 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11643
11644 * remote-utils.c (try_rle): New function.
11645 (putpkt_binary): Use it.
11646
11647 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11648
11649 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11650 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11651 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11652 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11653 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11654 point registers.
11655
11656 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11657
11658 * server.c (terminal_fd): New variable.
11659 (old_foreground_pgrp): Likewise.
11660 (restore_old_foreground_pgrp): New function.
11661 (start_inferior): Record the terminal file descriptor in terminal_fd
11662 and its original foreground group in old_foreground_pgrp. Register
11663 restore_old_foreground_pgrp with atexit().
11664
11665 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11666
11667 * server.c (handle_query): Correct qPart to qXfer.
11668
11669 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11670
11671 * configure.ac: Check for more headers which are missing on
11672 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11673 * configure.srv: Add Cygwin and mingw32.
11674 * remote-utils.c: Don't include headers unconditionally which
11675 are missing on mingw32. Include <winsock.h> for mingw32.
11676 (remote_open): Adjust for mingw32 support. Flush
11677 standard error after writing to it.
11678 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11679 (unblock_async_io, enable_async_io, disable_async_io)
11680 (readchar, getpkt): Update for Winsock support.
11681 (prepare_resume_reply): Expect a protocol signal number.
11682 * server.c: Disable <sys/wait.h> on mingw32.
11683 (start_inferior): Adjust for mingw32 support. Flush
11684 standard error after writing to it.
11685 (attach_inferior): Likewise. Use protocol signal
11686 numbers.
11687 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11688 and names.
11689 * win32-i386-low.c: New file.
11690 * Makefile.in (XM_CLIBS): Set.
11691 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11692 (win32-i386-low.o): New dependency rule.
11693 * linux-low.c (linux_wait): Use target signal numbers.
11694 * target.h (struct target_ops): Doc fix.
11695 * server.h (target_signal_to_name): New prototype.
11696 * gdbreplay.c: Don't include headers unconditionally which
11697 are missing on mingw32. Include <winsock.h> for mingw32.
11698 (remote_close, remote_open): Adjust for Winsock support.
11699 * configure, config.in: Regenerated.
11700
11701 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11702
11703 * server.c (decode_xfer_read, write_qxfer_response): New.
11704 (handle_query): Take a packet length argument. Handle
11705 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11706 the qSupported response.
11707 (main): Update call to handle_query.
11708
11709 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11710
11711 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11712 (putpkt_binary): Renamed from putpkt and adjusted for binary
11713 data.
11714 (putpkt): New wrapper for putpkt_binary.
11715 (readchar): Don't mask off the high bit.
11716 (decode_X_packet): New function.
11717 * server.c (main): Call putpkt_binary if a handler sets the packet
11718 length. Save the length of the incoming packet. Handle 'X'.
11719 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11720
11721 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11722
11723 * server.c (handle_query): Handle qSupported.
11724
11725 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11726
11727 * remote-utils.c (all_symbols_looked_up): New variable.
11728 (look_up_one_symbol): Check it.
11729 * server.h (look_up_one_symbol): New declaration.
11730 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11731
11732 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11733
11734 * Makefile.in (linux-arm-low.o): Update dependencies.
11735 * linux-arm-low.c: Include "gdb_proc_service.h".
11736 (PTRACE_GET_THREAD_AREA): Define.
11737 (ps_get_thread_area): New function.
11738
11739 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11740
11741 * configure.srv (m68k*-*-uclinux*): New target.
11742 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11743 (linux_resume_one_process): Remove extraneous cast.
11744 (linux_read_offsets): New.
11745 (linux_target_op): Add linux_read_offsets on mmuless systems.
11746 * server.c (handle_query): Add qOffsets logic.
11747 * target.h (struct target_ops): Add read_offsets.
11748
11749 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11750
11751 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11752 (PTRACE_GET_THREAD_AREA): Define.
11753 (ps_get_thread_area): New function.
11754 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11755 (linux-x86-64-low.o): Update.
11756
11757 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11758
11759 * configure.ac: Remove checks for prfpregset_t.
11760 * gdb_proc_service.h: New file.
11761 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11762 new "gdb_proc_service.h".
11763 * proc-service.c: Likewise.
11764 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11765 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11766 * Makefile.in (gdb_proc_service_h): Updated.
11767 * configure, config.in: Regenerated.
11768
11769 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11770
11771 * remote-utils.c (prepare_resume_reply): Move declaration
11772 of gdb_id_from_wait to the top of the block.
11773
11774 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11775
11776 * linux-low.c (regsets_store_inferior_registers): Read the regset
11777 from the target before filling it.
11778
11779 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11780
11781 * server.c (attach_inferior): Return SIGTRAP for a successful
11782 attach.
11783
11784 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11785
11786 * Makefile.in (OBS): Add version.o.
11787 (STAGESTUFF): Delete.
11788 (version.o): Add dependencies.
11789 (version.c): Replace rule.
11790 (clean): Remove version.c.
11791 * server.c (gdbserver_version): New.
11792 (gdbserver_usage): Use printf.
11793 (main): Handle --version and --help.
11794 * server.h (version, host_name): Add declarations.
11795
11796 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11797
11798 * linux-arm-low.c:
11799 * linux-arm-low.c:
11800 * inferiors.c:
11801 * i387-fp.h:
11802 * i387-fp.c:
11803 * gdbreplay.c:
11804 * regcache.c:
11805 * proc-service.c:
11806 * mem-break.h:
11807 * mem-break.c:
11808 * linux-x86-64-low.c:
11809 * linux-sh-low.c:
11810 * linux-s390-low.c:
11811 * linux-ppc64-low.c:
11812 * linux-ppc-low.c:
11813 * linux-mips-low.c:
11814 * linux-m68k-low.c:
11815 * linux-m32r-low.c:
11816 * linux-low.h:
11817 * linux-low.c:
11818 * linux-ia64-low.c:
11819 * linux-i386-low.c:
11820 * linux-crisv32-low.c:
11821 * thread-db.c:
11822 * terminal.h:
11823 * target.h:
11824 * target.c:
11825 * server.h:
11826 * server.c:
11827 * remote-utils.c:
11828 * regcache.h:
11829 * utils.c:
11830 * Makefile.in:
11831 * configure.ac:
11832 * gdbserver.1: Add (C) after Copyright. Update the FSF
11833 address.
11834
11835 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11836
11837 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11838 (arm_breakpoint_at): Recognize both breakpoints.
11839 (the_low_target): Use the correct breakpoint instruction.
11840
11841 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11842
11843 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11844 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11845 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11846 (the_low_target): Update.
11847
11848 2005-10-25 Andreas Schwab <schwab@suse.de>
11849
11850 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11851
11852 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11853 (ia64_num_regs): Reduce to 462.
11854
11855 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11856
11857 * acinclude.m4: Correct quoting.
11858 * aclocal.m4: Regenerated.
11859
11860 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11861 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11862 (thread_db_init): Call thread_db_err_str.
11863 * configure.ac: Check for TD_VERSION.
11864 * config.in, configure: Regenerated.
11865
11866 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11867
11868 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11869
11870 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11871
11872 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11873 is not available. Define HAVE_PTRACE_GETREGS if it is.
11874 * config.in, configure: Regenerated.
11875 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11876 * linux-i386-low.c, linux-m68k-low.c: Update to use
11877 HAVE_PTRACE_GETREGS.
11878 * linux-low.c (regsets_fetch_inferior_registers)
11879 (regsets_store_inferior_registers): Only return 0 if we processed
11880 GENERAL_REGS.
11881 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11882 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11883
11884 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11885
11886 * inferiors.c (struct thread_info): Add gdb_id.
11887 (add_thread): Add gdb_id argument.
11888 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11889 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11890 calls to add_thread.
11891 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11892 * server.c (handle_query): Use thread_to_gdb_id.
11893 (handle_v_cont, main): Use gdb_id_to_thread_id.
11894 * server.h (add_thread): Update prototype.
11895 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11896 prototypes.
11897
11898 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11899
11900 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11901 left-padded registers.
11902 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11903 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11904
11905 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11906
11907 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11908 * configure: Regenerate.
11909 * config.in: Regenerate.
11910 * server.h (NEED_DECLARATION_STRERROR):
11911 Replace with !HAVE_DECL_STRERROR.
11912
11913 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11914
11915 * linux-low.c (linux_wait, linux_send_signal): Don't test
11916 an unsigned long variable for > 0 if it could be MAX_ULONG.
11917 * server.c (myresume): Likewise.
11918 * target.c (set_desired_inferior): Likewise.
11919
11920 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11921
11922 * configure.ac: Simplify and improve check for socklen_t.
11923 * configure, config.in: Regenerate.
11924
11925 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11926
11927 * acconfig.h: Remove.
11928 * configure.ac: Add a test for socklen_t. Use three-argument
11929 AC_DEFINE throughout.
11930 * config.in: Regenerated using autoheader 2.59.
11931 * configure: Regenerated.
11932
11933 * gdbreplay.c (socklen_t): Provide a default.
11934 (remote_open): Use socklen_t.
11935 * remote-utils.c (socklen_t): Provide a default.
11936 (remote_open): Use socklen_t.
11937 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11938 unsigned char.
11939
11940 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11941 char for buffers.
11942 * linux-low.c (linux_read_memory, linux_write_memory)
11943 (linux_read_auxv): Likewise.
11944 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11945 (check_mem_write): Likewise.
11946 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11947 Likewise.
11948 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11949 (registers_from_string, register_data): Likewise.
11950 * server.c (handle_query, main): Likewise.
11951 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11952 (decode_M_packet): Likewise.
11953 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11954 * target.h (struct target_ops): Update read_memory, write_memory,
11955 and read_auxv.
11956 (read_inferior_memory, write_inferior_memory): Update.
11957 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11958 to unsigned char *.
11959 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11960 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11961 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11962 linux-s390-low.c, linux-sh-low.c: Update for changes in
11963 read_inferior_memory and the_low_target->breakpoint.
11964
11965 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11966
11967 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11968 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11969 * configure.srv: Add powerpc64-*-linux*.
11970 * linux-ppc64-low.c: New file.
11971
11972 2005-05-23 Orjan Friberg <orjanf@axis.com>
11973
11974 * linux-cris-low.c: New file with support for CRIS.
11975 * linux-crisv32-low.c: Ditto for CRISv32.
11976 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11977 (clean): Add reg-cris.c and reg-crisv32.c.
11978 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11979 reg-crisv32.o, and reg-crisv32.c to make rules.
11980 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11981 recognized targets.
11982
11983 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11984
11985 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11986 of sizeof (PTRACE_XFER_TYPE).
11987 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11988
11989 2005-05-12 Orjan Friberg <orjanf@axis.com>
11990
11991 * target.h (struct target_ops): Add insert_watchpoint,
11992 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11993 pointers for hardware watchpoint support.
11994 * linux-low.h (struct linux_target_ops): Ditto.
11995 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11996 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11997 to linux_target_ops.
11998 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11999 reply packet.
12000 * server.c (main): Recognize 'Z' and 'z' packets.
12001
12002 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
12003
12004 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
12005 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
12006 (the_low_target): Add new members.
12007
12008 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12009
12010 * proc-service.c (ps_lgetregs): Search all_processes instead of
12011 all_threads.
12012
12013 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
12014
12015 * server.c (start_inferior): Change return type to int.
12016 (attach_inferior): Change sigptr to int *.
12017 (handle_v_cont, handle_v_requests): Change signal to int *.
12018 (main): Change signal to int.
12019
12020 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12021
12022 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12023 * configure.srv: Add m32r*-*-linux*.
12024 * linux-m32r-low.c: New file.
12025
12026 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12027
12028 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12029
12030 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12031
12032 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12033 Take unsigned long arguments for PIDs.
12034 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12035 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12036 (wait_for_sigstop, linux_resume_one_process)
12037 (regsets_fetch_inferior_registers, linux_send_signal)
12038 (linux_read_auxv): Likewise. Update the types of variables holding
12039 PIDs. Update format string specifiers.
12040 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12041 * remote-utils.c (prepare_resume_reply): Likewise.
12042 * server.c (cont_thread, general_thread, step_thread)
12043 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12044 unsigned long.
12045 (handle_query): Update format specifiers.
12046 (handle_v_cont, main): Use strtoul for thread IDs.
12047 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12048 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12049 (general_thread, step_thread, thread_from_wait)
12050 (old_thread_from_wait): Update.
12051 * target.h (struct thread_resume): Use unsigned long for THREAD.
12052 (struct target_ops): Use unsigned long for arguments to attach and
12053 thread_alive.
12054
12055 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12056
12057 * acinclude.m4: Include bfd/bfd.m4 directly.
12058 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12059 <agriffis@toolchain.org>.
12060 * aclocal.m4, configure: Regenerated.
12061
12062 2005-01-07 Andrew Cagney <cagney@gnu.org>
12063
12064 * configure.ac: Rename configure.in, require autoconf 2.59.
12065 * configure: Re-generate.
12066
12067 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12068
12069 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12070 LIBS when finished.
12071 * aclocal.m4: Regenerated.
12072 * configure: Regenerated.
12073
12074 2004-11-21 Andreas Schwab <schwab@suse.de>
12075
12076 * linux-m68k-low.c (m68k_num_gregs): Define.
12077 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12078 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12079 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12080 (m68k_breakpoint_at): New. Add to the_low_target.
12081
12082 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12083 srv_linux_thread_db to yes.
12084
12085 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12086
12087 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12088 (ARCH_SET_FS): Likewise.
12089 (ARCH_GET_FS): Likewise.
12090 (ARCH_GET_GS): Likewise.
12091
12092 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12093
12094 * linux-i386-low.c (ps_get_thread_area): New.
12095 * linux-x86-64-low.c (ps_get_thread_area): New.
12096 * linux-low.c: Include <sys/syscall.h>.
12097 (linux_kill_one_process): Don't kill the first thread here.
12098 (linux_kill): Kill the first thread here.
12099 (kill_lwp): New function.
12100 (send_sigstop, linux_send_signal): Use it.
12101 * proc-service.c: Clean up #ifdefs.
12102 (fpregset_info): Delete.
12103 (ps_lgetregs): Update and enable implementation.
12104 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12105 implementations.
12106 * remote-utils.c (struct sym_cache, symbol_cache): New.
12107 (input_interrupt): Print a clearer message.
12108 (async_io_enabled): New variable.
12109 (enable_async_io, disable_async_io): Use it. Update comments.
12110 (look_up_one_symbol): Use the symbol cache.
12111 * thread-db.c (thread_db_look_up_symbols): New function.
12112 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12113
12114 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12115
12116 * configure.in: Test for -rdynamic.
12117 * configure: Regenerated.
12118 * Makefile (INTERNAL_LDFLAGS): New.
12119 (gdbserver, gdbreplay): Use it.
12120
12121 2004-09-02 Andrew Cagney <cagney@gnu.org>
12122
12123 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12124
12125 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12126
12127 * linux-low.c (linux_wait): Clear all_processes list also.
12128
12129 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12130
12131 * linux-low.c: Include <errno.h>. Remove extern declaration of
12132 errno.
12133
12134 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12135
12136 * gdbreplay.c, server.h, utils.c: Update copyright years.
12137
12138 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12139
12140 * server.c (main): Print child status or termination signal from
12141 variable 'signal', not 'sig'.
12142
12143 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12144
12145 * linux-low.c (linux_read_memory): Change return type to
12146 int. Check for and return error from ptrace().
12147 * target.c (read_inferior_memory): Change return type to int. Pass
12148 back return status from the_target->read_memory().
12149 * target.h (struct target_ops): Adapt *read_memory() prototype.
12150 Update comment.
12151 (read_inferior_memory): Adapt prototype.
12152 * server.c (main): Return an error packet if
12153 read_inferior_memory() returns an error.
12154
12155 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12156
12157 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12158 Unify with other clean targets.
12159
12160 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12161
12162 * server.c (handle_v_cont): Call set_desired_inferior.
12163
12164 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12165
12166 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12167
12168 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12169
12170 * linux-low.c (linux_wait): Unblock async I/O.
12171 (linux_resume): Block and enable async I/O.
12172 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12173 * server.h (block_async_io, unblock_async_io): Add prototypes.
12174
12175 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12176
12177 * remote-utils.c (remote_open): Print a status notice after
12178 opening a TCP port.
12179 * server.c (attach_inferior): Print a status notice after
12180 attaching.
12181
12182 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12183
12184 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12185
12186 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12187
12188 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12189 error packet.
12190 * server.c, target.h: Update copyright years.
12191
12192 2004-02-25 Roland McGrath <roland@redhat.com>
12193
12194 * target.h (struct target_ops): New member `read_auxv'.
12195 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12196 * linux-low.c (linux_read_auxv): New function.
12197 (linux_target_ops): Initialize `read_auxv' member to that.
12198
12199 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12200
12201 Committed by Jim Blandy <jimb@redhat.com>.
12202
12203 * linux-s390-low.c (s390_num_regs): Update.
12204 (s390_regmap): Remove control registers. Use __s390x__ predefine
12205 instead of GPR_SIZE to distiguish s390 and s390x targets.
12206
12207 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12208
12209 * linux-low.c: Update copyright year.
12210 (check_removed_breakpoint): Clear pending_is_breakpoint.
12211 (linux_set_resume_request, linux_queue_one_thread)
12212 (resume_status_pending_p): New functions.
12213 (linux_continue_one_thread): Use process->resume.
12214 (linux_resume): Only resume threads if there are no pending events.
12215 * linux-low.h (struct process_info): Add resume request
12216 pointer.
12217
12218 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12219
12220 * regcache.c (new_register_cache): Clear the allocated register
12221 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12222
12223 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12224
12225 * linux-low.c (linux_resume): Take a struct thread_resume *
12226 argument.
12227 (linux_wait): Update call.
12228 (resume_ptr): New static variable.
12229 (linux_continue_one_thread): Renamed from
12230 linux_continue_one_process. Use resume_ptr.
12231 (linux_resume): Use linux_continue_one_thread.
12232 * server.c (handle_v_cont, handle_v_requests): New functions.
12233 (myresume): New function.
12234 (main): Handle 'v' case.
12235 * target.h (struct thread_resume): New type.
12236 (struct target_ops): Change argument of "resume" to struct
12237 thread_resume *.
12238 (myresume): Delete macro.
12239
12240 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12241
12242 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12243 (uninstall): Support DESTDIR.
12244
12245 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12246
12247 * configure.srv: Add xscale*linux copy of arm*linux entry.
12248
12249 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12250
12251 * linux-arm-low.c (arm_reinsert_addr): New function.
12252 (the_low_target): Add arm_reinsert_addr.
12253
12254 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12255
12256 * mem-break.c: Remove whitespace at end of file.
12257
12258 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12259
12260 * configure.in: Check whether we need to prototype strerror.
12261 * server.h: Optionally prototype strerror.
12262 * gdbreplay.c (perror_with_name): Use strerror.
12263 * linux-low.c (linux_attach_lwp): Use strerror.
12264 * utils.c (perror_with_name): Use strerror.
12265 * config.in, configure: Regenerated.
12266
12267 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12268
12269 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12270 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12271
12272 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12273
12274 * Makefile.in (SFILES): Update.
12275 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12276 low-sun3.c: Remove files.
12277
12278 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12279
12280 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12281 (linux_detach_one_process, linux_detach): New functions.
12282 (linux_target_ops): Add linux_detach.
12283 * server.c (main): Handle 'D' packet.
12284 * target.h (struct target_ops): Add "detach" member.
12285 (detach_inferior): Define.
12286
12287 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12288
12289 From Kelley Cook <kelleycook@wideopenwest.com>:
12290 * configure.srv: Accept i[34567]86 variants.
12291
12292 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12293
12294 * linux-low.c (linux_wait_for_event): Correct comment typos.
12295 (linux_resume_one_process): Call check_removed_breakpoint.
12296 (linux_send_signal): New function.
12297 (linux_target_ops): Add linux_send_signal.
12298 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12299 of kill.
12300 * target.h (struct target_ops): Add send_signal.
12301
12302 2003-05-29 Jim Blandy <jimb@redhat.com>
12303
12304 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12305 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12306 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12307 away part of the register's value.
12308
12309 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12310
12311 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12312 (linux_wait_for_event, linux_init_signals): Likewise.
12313
12314 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12315
12316 * configure.in: Check for stdlib.h.
12317 * configure: Regenerated.
12318 * config.in: Regenerated.
12319
12320 2003-01-04 Andreas Schwab <schwab@suse.de>
12321
12322 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12323
12324 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12325
12326 * Makefile.in: Remove obsolete code.
12327
12328 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12329
12330 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12331 defined(PT_FPR0_HI).
12332
12333 2002-11-17 Stuart Hughes <seh@zee2.com>
12334
12335 * linux-arm-low.c (arm_num_regs): Increase.
12336 (arm_regmap): Include status register.
12337
12338 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12339
12340 * linux-low.c (register_addr): Remove incorrect -1 check.
12341
12342 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12343
12344 * linux-low.c (linux_create_inferior): Call setpgid. Return
12345 the new PID.
12346 (unstopped_p, linux_signal_pid): Remove.
12347 (linux_target_ops): Remove linux_signal_pid.
12348 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12349 global instead of target method.
12350 * target.h (struct target_ops): Remove signal_pid. Update comment
12351 for create_inferior.
12352 * server.c (signal_pid): New variable.
12353 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12354 gdbserver. Set the child to be the foreground process group.
12355 (attach_inferior): Set signal_pid.
12356
12357 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12358
12359 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12360
12361 2002-08-20 Jim Blandy <jimb@redhat.com>
12362
12363 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12364 default for this.
12365
12366 2002-08-01 Andrew Cagney <cagney@redhat.com>
12367
12368 * Makefile.in: Make chill references obsolete.
12369
12370 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12371
12372 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12373 * configure: Regenerate.
12374 * config.in: Regenerate.
12375
12376 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12377
12378 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12379 (perror_with_name, remote_close, remote_open, expect, play): Static.
12380
12381 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12382
12383 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12384 byte offsets instead of an array of indexes.
12385 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12386
12387 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12388
12389 * regcache.c: Add comment.
12390
12391 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12392
12393 * thread-db.c: New file.
12394 * proc-service.c: New file.
12395 * acinclude.m4: New file.
12396 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12397 proc-service.o, and thread-db.o.
12398 (linux-low.o): Add USE_THREAD_DB.
12399 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12400 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12401 * aclocal.m4: Regenerated.
12402 * config.in: Regenerated.
12403 * configure: Regenerated.
12404 * configure.in: Check for proc_service.h, sys/procfs.h,
12405 thread_db.h, and linux/elf.h headrs.
12406 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12407 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12408 Check for -lthread_db and thread support.
12409 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12410 PowerPC, and SuperH.
12411 * i387-fp.c: Constify arguments.
12412 * i387-fp.h: Likewise.
12413 * inferiors.c: (struct thread_info): Renamed from
12414 `struct inferior_info'. Remove PID member. Use generic inferior
12415 list header. All uses updated.
12416 (inferiors, signal_pid): Removed.
12417 (all_threads): New variable.
12418 (get_thread): Define.
12419 (add_inferior_to_list): New function.
12420 (for_each_inferior): New function.
12421 (change_inferior_id): New function.
12422 (add_inferior): Removed.
12423 (remove_inferior): New function.
12424 (add_thread): New function.
12425 (free_one_thread): New function.
12426 (remove_thread): New function.
12427 (clear_inferiors): Use for_each_inferior and free_one_thread.
12428 (find_inferior): New function.
12429 (find_inferior_id): New function.
12430 (inferior_target_data): Update argument type.
12431 (set_inferior_target_data): Likewise.
12432 (inferior_regcache_data): Likewise.
12433 (set_inferior_regcache_data): Likewise.
12434 * linux-low.c (linux_bp_reinsert): Remove.
12435 (all_processes, stopping_threads, using_thrads)
12436 (struct pending_signals, debug_threads, pid_of): New.
12437 (inferior_pid): Replace with macro.
12438 (struct inferior_linux_data): Remove.
12439 (get_stop_pc, add_process): New functions.
12440 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12441 Use add_process and add_thread.
12442 (linux_attach_lwp): New function, based on old linux_attach. Use
12443 add_process and add_thread. Set stop_expected for new threads.
12444 (linux_attach): New function.
12445 (linux_kill_one_process): New function.
12446 (linux_kill): Kill all LWPs.
12447 (linux_thread_alive): Use find_inferior_id.
12448 (check_removed_breakpoints, status_pending_p): New functions.
12449 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12450 Update. Use WNOHANG. Wait for cloned processes also. Update process
12451 struct for the found process.
12452 (linux_wait_for_event): New function.
12453 (linux_wait): Use it. Support LWPs.
12454 (send_sigstop, wait_for_sigstop, stop_all_processes)
12455 (linux_resume_one_process, linux_continue_one_process): New functions.
12456 (linux_resume): Support LWPs.
12457 (REGISTER_RAW_SIZE): Remove.
12458 (fetch_register): Use register_size instead. Call supply_register.
12459 (usr_store_inferior_registers): Likewise. Call collect_register.
12460 Fix recursive case.
12461 (regsets_fetch_inferior_registers): Improve error message.
12462 (regsets_store_inferior_registers): Add debugging.
12463 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12464 (unstopped_p, linux_signal_pid): New functions.
12465 (linux_target_ops): Add linux_signal_pid.
12466 (linux_init_signals): New function.
12467 (initialize_low): Call it. Initialize using_threads.
12468 * regcache.c (inferior_regcache_data): Add valid
12469 flag.
12470 (get_regcache): Fetch registers lazily. Add fetch argument
12471 and update all callers.
12472 (regcache_invalidate_one, regcache_invalidate): New
12473 functions.
12474 (new_register_cache): Renamed from create_register_cache.
12475 Return the new regcache.
12476 (free_register_cache): Change argument to a void *.
12477 (registers_to_string, registers_from_string): Call get_regcache
12478 with fetch flag set.
12479 (register_data): Make static. Pass fetch flag to get_regcache.
12480 (supply_register): Call get_regcache with fetch flag clear.
12481 (collect_register): Call get_regcache with fetch flag set.
12482 (collect_register_as_string): New function.
12483 * regcache.h: Update.
12484 * remote-utils.c (putpkt): Flush after debug output and use
12485 stderr.
12486 Handle input interrupts while waiting for an ACK.
12487 (input_interrupt): Use signal_pid method.
12488 (getpkt): Flush after debug output and use stderr.
12489 (outreg): Use collect_register_as_string.
12490 (new_thread_notify, dead_thread_notify): New functions.
12491 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12492 and general_thread.
12493 (look_up_one_symbol): Flush after debug output.
12494 * server.c (step_thread, server_waiting): New variables.
12495 (start_inferior): Don't use signal_pid. Update call to mywait.
12496 (attach_inferior): Update call to mywait.
12497 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12498 (main): Don't fetch/store registers explicitly. Use
12499 set_desired_inferior. Support proposed ``Hs'' packet. Update
12500 calls to mywait.
12501 * server.h: Update.
12502 (struct inferior_list, struct_inferior_list_entry): New.
12503 * target.c (set_desired_inferior): New.
12504 (write_inferior_memory): Constify.
12505 (mywait): New function.
12506 * target.h: Update.
12507 (struct target_ops): New signal_pid method.
12508 (mywait): Removed macro, added prototype.
12509
12510 * linux-low.h (regset_func): Removed.
12511 (regset_fill_func, regset_store_func): New.
12512 (enum regset_type): New.
12513 (struct regset_info): Add type field. Use new operation types.
12514 (struct linux_target_ops): stop_pc renamed to get_pc.
12515 Add decr_pc_after_break and breakpoint_at.
12516 (get_process, get_thread_proess, get_process_thread)
12517 (strut process_info, all_processes, linux_attach_lwp)
12518 (thread_db_init): New.
12519
12520 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12521 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12522 (the_low_target): Add new members.
12523 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12524 (i386_store_fpxregset): Constify.
12525 (target_regsets): Add new kind identifier.
12526 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12527 (i386_set_pc): Add debugging.
12528 (i386_breakpoint_at): New function.
12529 (the_low_target): Add new members.
12530 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12531 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12532 (mips_breakpoint_at): New.
12533 (the_low_target): Add new members.
12534 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12535 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12536 (the_low_target): Add new members.
12537 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12538 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12539 (the_low_target): Add new members.
12540 * linux-x86-64-low.c (target_regsets): Add new kind
12541 identifier.
12542
12543 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12544
12545 From Martin Pool <mbp@samba.org>:
12546 * server.c (gdbserver_usage): New function.
12547 (main): Call it.
12548
12549 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12550
12551 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12552 stop_at -> stop_pc.
12553
12554 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12555
12556 * Makefile.in: Remove obsolete code.
12557
12558 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12559
12560 * linux-low.c (regsets_fetch_inferior_registers),
12561 (regsets_store_inferior_registers): Removed cast to int from
12562 ptrace() calls.
12563 * regcache.h: Added declaration of struct inferior_info.
12564
12565 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12566
12567 * inferiors.c (struct inferior_info): Add regcache_data.
12568 (add_inferior): Call create_register_cache.
12569 (clear_inferiors): Call free_register_cache.
12570 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12571 * regcache.c (struct inferior_regcache_data): New.
12572 (registers): Remove.
12573 (get_regcache): New function.
12574 (create_register_cache, free_register_cache): New functions.
12575 (set_register_cache): Don't initialize the register cache here.
12576 (registers_to_string, registers_from_string, register_data): Call
12577 get_regcache.
12578 * regcache.h: Add prototypes.
12579 * server.h: Likewise.
12580
12581 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12582
12583 * mem-break.c: New file.
12584 * mem-break.h: New file.
12585 * Makefile.in: Add mem-break.o rule; update server.h
12586 dependencies.
12587 * inferiors.c (struct inferior_info): Add target_data
12588 member.
12589 (clear_inferiors): Free target_data member if set.
12590 (inferior_target_data, set_inferior_target_data): New functions.
12591 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12592 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12593 * linux-low.c (linux_bp_reinsert): New variable.
12594 (struct inferior_linux_data): New.
12595 (linux_create_inferior): Use set_inferior_target_data.
12596 (linux_attach): Likewise. Call add_inferior.
12597 (linux_wait_for_one_inferior): New function.
12598 (linux_wait): Call it.
12599 (linux_write_memory): Add const.
12600 (initialize_low): Call set_breakpoint_data.
12601 * linux-low.h (struct linux_target_ops): Add breakpoint
12602 handling members.
12603 * server.c (attach_inferior): Remove extra add_inferior
12604 call.
12605 * server.h: Include mem-break.h. Update inferior.c
12606 prototypes.
12607 * target.c (read_inferior_memory)
12608 (write_inferior_memory): New functions.
12609 * target.h (read_inferior_memory)
12610 (write_inferior_memory): Change macros to prototypes.
12611 (struct target_ops): Update comments. Add const to write_memory
12612 definition.
12613
12614 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12615
12616 * linux-low.c (usr_store_inferior_registers): Support
12617 registers which are allowed to fail to store.
12618 * linux-low.h (linux_target_ops): Likewise.
12619 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12620 (ppc_cannot_store_register): FPSCR may not be storable.
12621
12622 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12623
12624 * server.h: Include <string.h> if HAVE_STRING_H.
12625 * ChangeLog: Correct paths in last ChangeLog entry.
12626
12627 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12628
12629 * linux-low.h: Remove obsolete prototypes.
12630 (struct linux_target_ops): New.
12631 (extern the_low_target): New.
12632 * linux-low.c (num_regs, regmap): Remove declarations.
12633 (register_addr): Use the_low_target explicitly.
12634 (fetch_register): Likewise.
12635 (usr_fetch_inferior_registers): Likewise.
12636 (usr_store_inferior_registers): Likewise.
12637 * linux-arm-low.c (num_regs): Remove.
12638 (arm_num_regs): Define.
12639 (arm_regmap): Renamed from regmap, made static.
12640 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12641 made static.
12642 (arm_cannot_store_register): Renamed from cannot_store_register,
12643 made static.
12644 (the_low_target): New.
12645 * linux-i386-low.c (num_regs): Remove.
12646 (i386_num_regs): Define.
12647 (i386_regmap): Renamed from regmap, made static.
12648 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12649 made static.
12650 (i386_cannot_store_register): Renamed from cannot_store_register,
12651 made static.
12652 (the_low_target): New.
12653 * linux-ia64-low.c (num_regs): Remove.
12654 (ia64_num_regs): Define.
12655 (ia64_regmap): Renamed from regmap, made static.
12656 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12657 made static.
12658 (ia64_cannot_store_register): Renamed from cannot_store_register,
12659 made static.
12660 (the_low_target): New.
12661 * linux-m68k-low.c (num_regs): Remove.
12662 (m68k_num_regs): Define.
12663 (m68k_regmap): Renamed from regmap, made static.
12664 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12665 made static.
12666 (m68k_cannot_store_register): Renamed from cannot_store_register,
12667 made static.
12668 (the_low_target): New.
12669 * linux-mips-low.c (num_regs): Remove.
12670 (mips_num_regs): Define.
12671 (mips_regmap): Renamed from regmap, made static.
12672 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12673 made static.
12674 (mips_cannot_store_register): Renamed from cannot_store_register,
12675 made static.
12676 (the_low_target): New.
12677 * linux-ppc-low.c (num_regs): Remove.
12678 (ppc_num_regs): Define.
12679 (ppc_regmap): Renamed from regmap, made static.
12680 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12681 made static.
12682 (ppc_cannot_store_register): Renamed from cannot_store_register,
12683 made static.
12684 (the_low_target): New.
12685 * linux-s390-low.c (num_regs): Remove.
12686 (s390_num_regs): Define.
12687 (s390_regmap): Renamed from regmap, made static.
12688 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12689 made static.
12690 (s390_cannot_store_register): Renamed from cannot_store_register,
12691 made static.
12692 (the_low_target): New.
12693 * linux-sh-low.c (num_regs): Remove.
12694 (sh_num_regs): Define.
12695 (sh_regmap): Renamed from regmap, made static.
12696 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12697 made static.
12698 (sh_cannot_store_register): Renamed from cannot_store_register,
12699 made static.
12700 (the_low_target): New.
12701 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12702 (the_low_target): New.
12703
12704 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12705
12706 * Makefile.in: Add stamp-h target.
12707 * configure.in: Create stamp-h.
12708 * configure: Regenerated.
12709
12710 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12711
12712 * inferiors.c: New file.
12713 * target.c: New file.
12714 * target.h: New file.
12715 * Makefile.in: Add target.o and inferiors.o. Update
12716 dependencies.
12717 * linux-low.c (inferior_pid): New static variable,
12718 moved from server.c.
12719 (linux_create_inferior): Renamed from create_inferior.
12720 Call add_inferior. Return 0 on success instead of a PID.
12721 (linux_attach): Renamed from myattach.
12722 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12723 (linux_thread_alive): Renamed from mythread_alive.
12724 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12725 child dies.
12726 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12727 (regsets_store_inferior_registers): Correct error message.
12728 Add missing ``return 0''.
12729 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12730 (linux_store_registers): Renamed from store_inferior_registers.
12731 (linux_read_memory): Renamed from read_inferior_memory.
12732 (linux_write_memory): Renamed from write_inferior_memory.
12733 (linux_target_ops): New structure.
12734 (initialize_low): Call set_target_ops ().
12735 * remote-utils.c (unhexify): New function.
12736 (hexify): New function.
12737 (input_interrupt): Send signals to ``signal_pid''.
12738 * server.c (inferior_pid): Remove.
12739 (start_inferior): Update create_inferior call.
12740 (attach_inferior): Call add_inferior.
12741 (handle_query): New function.
12742 (main): Call handle_query for `q' packets.
12743 * server.h: Include "target.h". Remove obsolete prototypes.
12744 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12745
12746 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12747
12748 * Makefile.in: Add WARN_CFLAGS. Update configury
12749 dependencies.
12750 * configure.in: Check for <string.h>
12751 * configure: Regenerate.
12752 * config.in: Regenerate.
12753 * gdbreplay.c: Include needed system headers.
12754 (remote_open): Remove strchr prototype.
12755 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12756 * regcache.c (supply_register): Change buf argument to const void *.
12757 (supply_register_by_name): Likewise.
12758 (collect_register): Change buf argument to void *.
12759 (collect_register_by_name): Likewise.
12760 * regcache.h: Add missing prototypes.
12761 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12762 * server.c (handle_query): New function.
12763 (attached): New static variable, moved out of main.
12764 (main): Quiet longjmp clobber warnings.
12765 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12766 * utils.c (error): Remove NORETURN.
12767 (fatal): Likewise.
This page took 0.65228 seconds and 4 git commands to generate.