1 2015-10-29 Pedro Alves <palves@redhat.com>
3 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
5 2015-10-29 Pedro Alves <palves@redhat.com>
7 * tracepoint.c (clear_installed_tracepoints): Add casts.
9 2015-10-29 Pedro Alves <palves@redhat.com>
11 * server.c (handle_v_cont, process_serial_event): Add enum
12 gdb_signal casts to signal parsing code.
14 2015-10-29 Pedro Alves <palves@redhat.com>
16 * linux-low.h (NULL_REGSET): Define.
17 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
18 * linux-arm-low.c (arm_regsets): Likewise.
19 * linux-crisv32-low.c (cris_regsets): Likewise.
20 * linux-m68k-low.c (m68k_regsets): Likewise.
21 * linux-mips-low.c (mips_regsets): Likewise.
22 * linux-nios2-low.c (nios2_regsets): Likewise.
23 * linux-ppc-low.c (ppc_regsets): Likewise.
24 * linux-s390-low.c (s390_regsets): Likewise.
25 * linux-sh-low.c (sh_regsets): Likewise.
26 * linux-sparc-low.c (sparc_regsets): Likewise.
27 * linux-tic6x-low.c (tic6x_regsets): Likewise.
28 * linux-tile-low.c (tile_regsets): Likewise.
29 * linux-x86-low.c (x86_regsets): Likewise.
30 * linux-xtensa-low.c (xtensa_regsets): Likewise.
32 2015-10-29 Pedro Alves <palves@redhat.com>
34 * linux-low.h (NULL_REGSET): Define.
35 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
36 * linux-arm-low.c (arm_regsets): Likewise.
37 * linux-crisv32-low.c (cris_regsets): Likewise.
38 * linux-m68k-low.c (m68k_regsets): Likewise.
39 * linux-mips-low.c (mips_regsets): Likewise.
40 * linux-nios2-low.c (nios2_regsets): Likewise.
41 * linux-ppc-low.c (ppc_regsets): Likewise.
42 * linux-s390-low.c (s390_regsets): Likewise.
43 * linux-sh-low.c (sh_regsets): Likewise.
44 * linux-sparc-low.c (sparc_regsets): Likewise.
45 * linux-tic6x-low.c (tic6x_regsets): Likewise.
46 * linux-tile-low.c (tile_regsets): Likewise.
47 * linux-x86-low.c (x86_regsets): Likewise.
48 * linux-xtensa-low.c (xtensa_regsets): Likewise.
50 2015-10-26 Doug Evans <dje@google.com>
52 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
54 2015-10-26 Doug Evans <dje@google.com>
56 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
58 2015-10-26 Doug Evans <dje@google.com>
60 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
62 (attach_thread, find_new_threads_callback): Ditto.
64 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
66 * mem-break.h (set_breakpoint_data): Remove.
68 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
70 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
71 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
72 (initialize_low): Remove set_breakpoint_data call.
73 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
74 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
75 (initialize_low): Remove set_breakpoint_data call.
76 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
77 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
78 (initialize_low): Remove set_breakpoint_data call.
80 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
82 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
83 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
84 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
85 * target.h (target_breakpoint_kind_from_pc): New macro.
87 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
89 * linux-low.c (default_breakpoint_kind_from_pc): New function.
90 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
91 the default breakpoint kind.
93 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
95 * linux-arm-low.c (arm_supports_z_point_type): Add software
98 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
100 * linux-arm-low.c: Refactor breakpoint definitions.
101 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
102 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
104 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
106 * Makefile.in: Add arm.c/o.
107 * configure.srv: Likewise.
108 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
109 (arm_breakpoint_kind_from_pc): New function.
110 (arm_sw_breakpoint_from_kind): Return proper kind.
111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
113 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
115 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
117 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
118 (struct raw_breakpoint) <size>: Remove.
119 (struct raw_breakpoint) <kind>: Add.
120 (bp_size): New function.
121 (bp_opcode): Likewise.
122 (find_raw_breakpoint_at): Adjust for kind.
123 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
124 (remove_memory_breakpoint): Adjust for kind call bp_size.
125 (set_raw_breakpoint_at): Adjust for kind.
126 (set_breakpoint): Likewise.
127 (set_breakpoint_at): Call breakpoint_kind_from_pc.
128 (delete_raw_breakpoint): Adjust for kind.
129 (delete_breakpoint): Likewise.
130 (find_gdb_breakpoint): Likewise.
131 (set_gdb_breakpoint_1): Likewise.
132 (set_gdb_breakpoint): Likewise.
133 (delete_gdb_breakpoint_1): Likewise.
134 (delete_gdb_breakpoint): Likewise.
135 (uninsert_raw_breakpoint): Likewise.
136 (reinsert_raw_breakpoint): Likewise.
137 (set_breakpoint_data): Remove.
138 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
139 (check_mem_read): Adjust for kind call bp_size.
140 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
141 (clone_one_breakpoint): Adjust for kind.
142 * mem-break.h (set_gdb_breakpoint): Likewise.
143 (delete_gdb_breakpoint): Likewise.
144 * server.c (process_serial_event): Likewise.
146 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
148 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
149 (struct linux_target_ops) <breakpoint>: Remove.
150 (struct linux_target_ops) <breakpoint_len>: Remove.
151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
153 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
154 (arm_sw_breakpoint_from_kind): New function.
155 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
156 (struct linux_target_ops) <breakpoint>: Remove.
157 (struct linux_target_ops) <breakpoint_len>: Remove.
158 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
159 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
160 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
161 (struct linux_target_ops) <breakpoint>: Remove.
162 (struct linux_target_ops) <breakpoint_len>: Remove.
163 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
164 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
165 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
166 (struct linux_target_ops) <breakpoint>: Remove.
167 (struct linux_target_ops) <breakpoint_len>: Remove.
168 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
169 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
170 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
171 and sw_breakpoint_from_kind to increment the pc.
172 (linux_breakpoint_kind_from_pc): New function.
173 (linux_sw_breakpoint_from_kind): New function.
174 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
175 (initialize_low): Call breakpoint_kind_from_pc and
176 sw_breakpoint_from_kind to replace breakpoint_data/len.
177 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
179 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
180 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
181 (struct linux_target_ops) <breakpoint>: Remove.
182 (struct linux_target_ops) <breakpoint_len>: Remove.
183 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
184 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
185 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
186 (struct linux_target_ops) <breakpoint>: Remove.
187 (struct linux_target_ops) <breakpoint_len>: Remove.
188 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
189 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
190 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
191 (struct linux_target_ops) <breakpoint>: Remove.
192 (struct linux_target_ops) <breakpoint_len>: Remove.
193 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
194 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
195 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
196 (struct linux_target_ops) <breakpoint>: Remove.
197 (struct linux_target_ops) <breakpoint_len>: Remove.
198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
199 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
200 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
201 (struct linux_target_ops) <breakpoint>: Remove.
202 (struct linux_target_ops) <breakpoint_len>: Remove.
203 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
204 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
205 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
206 (struct linux_target_ops) <breakpoint>: Remove.
207 (struct linux_target_ops) <breakpoint_len>: Remove.
208 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
209 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
210 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
211 (struct linux_target_ops) <breakpoint>: Remove.
212 (struct linux_target_ops) <breakpoint_len>: Remove.
213 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
214 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
215 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
216 (struct linux_target_ops) <breakpoint>: Remove.
217 (struct linux_target_ops) <breakpoint_len>: Remove.
218 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
219 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
220 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
221 (struct linux_target_ops) <breakpoint>: Remove.
222 (struct linux_target_ops) <breakpoint_len>: Remove.
223 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
224 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
225 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
226 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
227 (struct linux_target_ops) <breakpoint>: Remove.
228 (struct linux_target_ops) <breakpoint_len>: Remove.
229 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
230 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
231 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
232 (struct linux_target_ops) <breakpoint>: Remove.
233 (struct linux_target_ops) <breakpoint_len>: Remove.
234 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
235 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
237 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
239 * linux-cris-low.c (cris_get_pc): Remove void arg.
241 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
243 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
246 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
248 * inferiors.c (thread_pid_matches_callback): New function.
249 (find_thread_process): New function.
250 (remove_thread): Reset current_thread.
251 (remove_process): Assert threads have been removed first.
253 2015-10-15 Yao Qi <yao.qi@linaro.org>
255 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
257 (aarch64_remove_point): Likewise.
258 * regcache.c (regcache_register_size): New function.
260 2015-10-12 Yao Qi <yao.qi@linaro.org>
262 * linux-aarch64-low.c: Update all callers as emit_load_store
263 is renamed to aarch64_emit_load_store.
265 2015-10-12 Yao Qi <yao.qi@linaro.org>
267 * linux-aarch64-low.c: Update all callers of function renaming
268 from emit_insn to aarch64_emit_insn.
270 2015-10-12 Yao Qi <yao.qi@linaro.org>
272 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
274 (struct aarch64_memory_operand): Likewise.
276 (emit_insn): Move to arch/aarch64-insn.c.
277 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
278 (emit_load_store): Move to arch/aarch64-insn.c.
279 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
280 (can_encode_int32): Remove.
282 2015-10-12 Yao Qi <yao.qi@linaro.org>
284 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
285 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
286 (aarch64_relocate_instruction): Likewise.
287 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
288 (struct aarch64_insn_visitor): Likewise.
290 2015-10-12 Yao Qi <yao.qi@linaro.org>
292 * linux-aarch64-low.c (struct aarch64_insn_data): New.
293 (struct aarch64_insn_visitor): New.
294 (struct aarch64_insn_relocation_data): New.
295 (aarch64_ftrace_insn_reloc_b): New function.
296 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
297 (aarch64_ftrace_insn_reloc_cb): Likewise.
298 (aarch64_ftrace_insn_reloc_tb): Likewise.
299 (aarch64_ftrace_insn_reloc_adr): Likewise.
300 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
301 (aarch64_ftrace_insn_reloc_others): Likewise.
303 (aarch64_relocate_instruction): Use visitor.
305 2015-10-12 Yao Qi <yao.qi@linaro.org>
307 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
308 int. Add argument buf.
309 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
310 aarch64_relocate_instruction.
312 2015-10-12 Yao Qi <yao.qi@linaro.org>
314 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
315 argument insn. Remove local variable insn. Don't call
317 (aarch64_install_fast_tracepoint_jump_pad): Call
320 2015-09-30 Yao Qi <yao.qi@linaro.org>
322 * linux-aarch64-low.c (emit_movk): Shorten a long line.
323 (emit_load_store_pair): Likewise.
325 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
327 * dll.c (match_dll): Add cast(s).
328 (unloaded_dll): Likewise.
329 * linux-low.c (second_thread_of_pid_p): Likewise.
330 (delete_lwp_callback): Likewise.
331 (count_events_callback): Likewise.
332 (select_event_lwp_callback): Likewise.
333 (linux_set_resume_request): Likewise.
334 * server.c (accumulate_file_name_length): Likewise.
335 (emit_dll_description): Likewise.
336 (handle_qxfer_threads_worker): Likewise.
337 (visit_actioned_threads): Likewise.
338 * thread-db.c (any_thread_of): Likewise.
339 * tracepoint.c (same_process_p): Likewise.
340 (match_blocktype): Likewise.
341 (build_traceframe_info_xml): Likewise.
343 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
345 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
347 (gdb_unparse_agent_expr): Likewise.
348 * hostio.c (require_data): Likewise.
349 (handle_pread): Likewise.
350 * linux-low.c (disable_regset): Likewise.
351 (fetch_register): Likewise.
352 (store_register): Likewise.
353 (get_dynamic): Likewise.
354 (linux_qxfer_libraries_svr4): Likewise.
355 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
356 (set_fast_tracepoint_jump): Likewise.
357 (uninsert_fast_tracepoint_jumps_at): Likewise.
358 (reinsert_fast_tracepoint_jumps_at): Likewise.
359 (validate_inserted_breakpoint): Likewise.
360 (clone_agent_expr): Likewise.
361 * regcache.c (init_register_cache): Likewise.
362 * remote-utils.c (putpkt_binary_1): Likewise.
363 (decode_M_packet): Likewise.
364 (decode_X_packet): Likewise.
365 (look_up_one_symbol): Likewise.
366 (relocate_instruction): Likewise.
367 (monitor_output): Likewise.
368 * server.c (handle_search_memory): Likewise.
369 (handle_qxfer_exec_file): Likewise.
370 (handle_qxfer_libraries): Likewise.
371 (handle_qxfer): Likewise.
372 (handle_query): Likewise.
373 (handle_v_cont): Likewise.
374 (handle_v_run): Likewise.
375 (captured_main): Likewise.
376 * target.c (write_inferior_memory): Likewise.
377 * thread-db.c (try_thread_db_load_from_dir): Likewise.
378 * tracepoint.c (init_trace_buffer): Likewise.
379 (add_tracepoint_action): Likewise.
380 (add_traceframe): Likewise.
381 (add_traceframe_block): Likewise.
382 (cmd_qtdpsrc): Likewise.
383 (cmd_qtdv): Likewise.
384 (cmd_qtstatus): Likewise.
385 (response_source): Likewise.
386 (response_tsv): Likewise.
387 (cmd_qtnotes): Likewise.
388 (gdb_collect): Likewise.
389 (initialize_tracepoint): Likewise.
391 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
393 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
394 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
395 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
397 (enum aarch64_condition_codes): New enum.
398 (w0): New static global.
401 (struct aarch64_memory_operand) <type>: New
402 MEMORY_OPERAND_POSTINDEX type.
403 (postindex_memory_operand): New helper function.
404 (emit_ret): New function.
405 (emit_load_store_pair): New function, factored out of emit_stp
406 with support for MEMORY_OPERAND_POSTINDEX.
407 (emit_stp): Rewrite using emit_load_store_pair.
408 (emit_ldp): New function.
409 (emit_load_store): Likewise.
410 (emit_ldr): Mention post-index instruction in comment.
411 (emit_ldrh): New function.
412 (emit_ldrb): New function.
413 (emit_ldrsw): Mention post-index instruction in comment.
414 (emit_str): Likewise.
415 (emit_subs): New function.
416 (emit_cmp): Likewise.
417 (emit_and): Likewise.
418 (emit_orr): Likewise.
419 (emit_orn): Likewise.
420 (emit_eor): Likewise.
421 (emit_mvn): Likewise.
422 (emit_lslv): Likewise.
423 (emit_lsrv): Likewise.
424 (emit_asrv): Likewise.
425 (emit_mul): Likewise.
426 (emit_sbfm): Likewise.
427 (emit_sbfx): Likewise.
428 (emit_ubfm): Likewise.
429 (emit_ubfx): Likewise.
430 (emit_csinc): Likewise.
431 (emit_cset): Likewise.
432 (emit_nop): Likewise.
433 (emit_ops_insns): New helper function.
434 (emit_pop): Likewise.
435 (emit_push): Likewise.
436 (aarch64_emit_prologue): New function.
437 (aarch64_emit_epilogue): Likewise.
438 (aarch64_emit_add): Likewise.
439 (aarch64_emit_sub): Likewise.
440 (aarch64_emit_mul): Likewise.
441 (aarch64_emit_lsh): Likewise.
442 (aarch64_emit_rsh_signed): Likewise.
443 (aarch64_emit_rsh_unsigned): Likewise.
444 (aarch64_emit_ext): Likewise.
445 (aarch64_emit_log_not): Likewise.
446 (aarch64_emit_bit_and): Likewise.
447 (aarch64_emit_bit_or): Likewise.
448 (aarch64_emit_bit_xor): Likewise.
449 (aarch64_emit_bit_not): Likewise.
450 (aarch64_emit_equal): Likewise.
451 (aarch64_emit_less_signed): Likewise.
452 (aarch64_emit_less_unsigned): Likewise.
453 (aarch64_emit_ref): Likewise.
454 (aarch64_emit_if_goto): Likewise.
455 (aarch64_emit_goto): Likewise.
456 (aarch64_write_goto_address): Likewise.
457 (aarch64_emit_const): Likewise.
458 (aarch64_emit_call): Likewise.
459 (aarch64_emit_reg): Likewise.
460 (aarch64_emit_pop): Likewise.
461 (aarch64_emit_stack_flush): Likewise.
462 (aarch64_emit_zero_ext): Likewise.
463 (aarch64_emit_swap): Likewise.
464 (aarch64_emit_stack_adjust): Likewise.
465 (aarch64_emit_int_call_1): Likewise.
466 (aarch64_emit_void_call_2): Likewise.
467 (aarch64_emit_eq_goto): Likewise.
468 (aarch64_emit_ne_goto): Likewise.
469 (aarch64_emit_lt_goto): Likewise.
470 (aarch64_emit_le_goto): Likewise.
471 (aarch64_emit_gt_goto): Likewise.
472 (aarch64_emit_ge_got): Likewise.
473 (aarch64_emit_ops_impl): New static global variable.
474 (aarch64_emit_ops): New target function, return
475 &aarch64_emit_ops_impl.
476 (struct linux_target_ops): Install it.
478 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
480 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
481 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
483 * linux-aarch64-ipa.c: New file.
484 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
486 (aarch64_get_thread_area): New target method.
487 (extract_signed_bitfield): New helper function.
488 (aarch64_decode_ldr_literal): New function.
489 (enum aarch64_opcodes): New enum.
490 (struct aarch64_register): New struct.
491 (struct aarch64_operand): New struct.
492 (x0): New static global.
501 (aarch64_register): New helper function.
502 (register_operand): Likewise.
503 (immediate_operand): Likewise.
504 (struct aarch64_memory_operand): New struct.
505 (offset_memory_operand): New helper function.
506 (preindex_memory_operand): Likewise.
507 (enum aarch64_system_control_registers): New enum.
509 (emit_insn): New helper function.
510 (emit_b): New function.
511 (emit_bcond): Likewise.
514 (emit_blr): Likewise.
515 (emit_stp): Likewise.
516 (emit_ldp_q_offset): Likewise.
517 (emit_stp_q_offset): Likewise.
518 (emit_load_store): Likewise.
519 (emit_ldr): Likewise.
520 (emit_ldrsw): Likewise.
521 (emit_str): Likewise.
522 (emit_ldaxr): Likewise.
523 (emit_stxr): Likewise.
524 (emit_stlr): Likewise.
525 (emit_data_processing_reg): Likewise.
526 (emit_data_processing): Likewise.
527 (emit_add): Likewise.
528 (emit_sub): Likewise.
529 (emit_mov): Likewise.
530 (emit_movk): Likewise.
531 (emit_mov_addr): Likewise.
532 (emit_mrs): Likewise.
533 (emit_msr): Likewise.
534 (emit_sevl): Likewise.
535 (emit_wfe): Likewise.
536 (append_insns): Likewise.
537 (can_encode_int32_in): New helper function.
538 (aarch64_relocate_instruction): New function.
539 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
540 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
541 (struct linux_target_ops): Install aarch64_get_thread_area,
542 aarch64_install_fast_tracepoint_jump_pad and
543 aarch64_get_min_fast_tracepoint_insn_len.
545 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
547 * Makefile.in (aarch64-insn.o): New rule.
548 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
550 2015-09-21 Yao Qi <yao.qi@linaro.org>
552 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
554 2015-09-21 Yao Qi <yao.qi@linaro.org>
556 * tracepoint.c (max_jump_pad_size): Remove.
558 2015-09-18 Yao Qi <yao.qi@linaro.org>
560 * linux-aarch64-low.c: Don't include sys/uio.h.
561 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
563 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
565 * tracepoint.c (eval_result_type): Change prototype.
566 (condition_true_at_tracepoint): Fix argument to compiled_cond.
568 2015-09-15 Pedro Alves <palves@redhat.com>
570 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
571 Check whether to report exec events instead of checking whether
572 multiprocess is enabled.
574 2015-09-15 Pedro Alves <palves@redhat.com>
577 * remote-utils.c (prepare_resume_reply): Merge
578 TARGET_WAITKIND_VFORK_DONE switch case with the
579 TARGET_WAITKIND_FORKED case.
581 2015-09-15 Yao Qi <yao.qi@linaro.org>
583 * server.c (handle_query): Check string comparison using
584 "else if" instead of "if".
586 2015-09-15 Yao Qi <yao.qi@linaro.org>
588 * server.c (vCont_supported): New global variable.
589 (handle_query): Set vCont_supported to 1 if "vContSupported+"
590 matches. Append ";vContSupported+" to own_buf.
591 (handle_v_requests): Append ";s;S" to own_buf if target supports
592 hardware single step or vCont_supported is false.
593 (capture_main): Set vCont_supported to zero.
595 2015-09-15 Yao Qi <yao.qi@linaro.org>
597 * linux-low.c (linux_supports_conditional_breakpoints): Rename
599 (linux_supports_hardware_single_step): ... New function.
600 (linux_target_ops): Update.
601 * lynx-low.c (lynx_target_ops): Set field
602 supports_hardware_single_step to target_can_do_hardware_single_step.
603 * nto-low.c (nto_target_ops): Likewise.
604 * spu-low.c (spu_target_ops): Likewise.
605 * win32-low.c (win32_target_ops): Likewise.
606 * target.c (target_can_do_hardware_single_step): New function.
607 * target.h (struct target_ops) <supports_conditional_breakpoints>:
608 Remove. <supports_hardware_single_step>: New field.
609 (target_supports_conditional_breakpoints): Remove.
610 (target_supports_hardware_single_step): New macro.
611 (target_can_do_hardware_single_step): Declare.
612 * server.c (handle_query): Use target_supports_hardware_single_step
613 instead of target_supports_conditional_breakpoints.
615 2015-09-15 Yao Qi <yao.qi@linaro.org>
617 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
619 (struct linux_target_ops the_low_target): Install
620 aarch64_linux_siginfo_fixup.
622 2015-09-11 Don Breazeal <donb@codesourcery.com>
623 Luis Machado <lgustavo@codesourcery.com>
625 * linux-low.c (linux_mourn): Static declaration.
626 (linux_arch_setup): Move in front of
627 handle_extended_wait.
628 (linux_arch_setup_thread): New function.
629 (handle_extended_wait): Handle exec events. Call
630 linux_arch_setup_thread. Make event_lwp argument a
631 pointer-to-a-pointer.
632 (check_zombie_leaders): Do not check stopped threads.
633 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
634 (linux_low_filter_event): Add lwp and thread for exec'ing
635 non-leader thread if leader thread has been deleted.
636 Refactor code into linux_arch_setup_thread and call it.
637 Pass child lwp pointer by reference to handle_extended_wait.
638 (linux_wait_for_event_filtered): Update comment.
639 (linux_wait_1): Prevent clobbering exec event status.
640 (linux_supports_exec_events): New function.
641 (linux_target_ops) <supports_exec_events>: Initialize new member.
642 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
644 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
645 * server.c (report_exec_events): New global variable.
646 (handle_query): Handle qSupported query for exec-events feature.
647 (captured_main): Initialize report_exec_events.
648 * server.h (report_exec_events): Declare new global variable.
649 * target.h (struct target_ops) <supports_exec_events>: New
651 (target_supports_exec_events): New macro.
652 * win32-low.c (win32_target_ops) <supports_exec_events>:
653 Initialize new member.
655 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
657 * linux-low.c (linux_low_enable_btrace): Remove.
658 (linux_target_ops): Replace linux_low_enable_btrace with
661 2015-09-03 Yao Qi <yao.qi@linaro.org>
663 * linux-aarch64-low.c (aarch64_insert_point): Call
664 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
667 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
669 * linux-low.c (check_stopped_by_breakpoint): Use
670 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
672 2015-08-27 Pedro Alves <palves@redhat.com>
674 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
676 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
678 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
679 the XNEW-family equivalent.
680 (compile_bytecodes): Likewise.
681 * dll.c (loaded_dll): Likewise.
682 * event-loop.c (append_callback_event): Likewise.
683 (create_file_handler): Likewise.
684 (create_file_event): Likewise.
685 * hostio.c (handle_open): Likewise.
686 * inferiors.c (add_thread): Likewise.
687 (add_process): Likewise.
688 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
689 * linux-arm-low.c (arm_new_process): Likewise.
690 (arm_new_thread): Likewise.
691 * linux-low.c (add_to_pid_list): Likewise.
692 (linux_add_process): Likewise.
693 (handle_extended_wait): Likewise.
695 (enqueue_one_deferred_signal): Likewise.
696 (enqueue_pending_signal): Likewise.
697 (linux_resume_one_lwp_throw): Likewise.
698 (linux_resume_one_thread): Likewise.
699 (linux_read_memory): Likewise.
700 (linux_write_memory): Likewise.
701 * linux-mips-low.c (mips_linux_new_process): Likewise.
702 (mips_linux_new_thread): Likewise.
703 (mips_add_watchpoint): Likewise.
704 * linux-x86-low.c (initialize_low_arch): Likewise.
705 * lynx-low.c (lynx_add_process): Likewise.
706 * mem-break.c (set_raw_breakpoint_at): Likewise.
707 (set_breakpoint): Likewise.
708 (add_condition_to_breakpoint): Likewise.
709 (add_commands_to_breakpoint): Likewise.
710 (clone_agent_expr): Likewise.
711 (clone_one_breakpoint): Likewise.
712 * regcache.c (new_register_cache): Likewise.
713 * remote-utils.c (look_up_one_symbol): Likewise.
714 * server.c (queue_stop_reply): Likewise.
715 (start_inferior): Likewise.
716 (queue_stop_reply_callback): Likewise.
717 (handle_target_event): Likewise.
718 * spu-low.c (fetch_ppc_memory): Likewise.
719 (store_ppc_memory): Likewise.
720 * target.c (set_target_ops): Likewise.
721 * thread-db.c (thread_db_load_search): Likewise.
722 (try_thread_db_load_1): Likewise.
723 * tracepoint.c (add_tracepoint): Likewise.
724 (add_tracepoint_action): Likewise.
725 (create_trace_state_variable): Likewise.
726 (cmd_qtdpsrc): Likewise.
727 (cmd_qtro): Likewise.
728 (add_while_stepping_state): Likewise.
729 * win32-low.c (child_add_thread): Likewise.
730 (get_image_name): Likewise.
732 2015-08-25 Yao Qi <yao.qi@linaro.org>
734 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
736 2015-08-25 Yao Qi <yao.qi@linaro.org>
738 * Makefile.in (aarch64-linux.o): New rule.
739 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
741 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
742 (aarch64_init_debug_reg_state): Make it extern.
743 (aarch64_linux_prepare_to_resume): Remove.
745 2015-08-25 Yao Qi <yao.qi@linaro.org>
747 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
748 lwp_arch_private_info and ptid_of_lwp.
750 2015-08-25 Yao Qi <yao.qi@linaro.org>
752 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
753 Find proc_info by find_process_pid. All callers updated.
755 2015-08-25 Yao Qi <yao.qi@linaro.org>
757 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
759 (debug_reg_change_callback): Remove.
760 (aarch64_notify_debug_reg_change): Remove.
762 2015-08-25 Yao Qi <yao.qi@linaro.org>
764 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
765 Call current_lwp_ptid.
767 2015-08-25 Yao Qi <yao.qi@linaro.org>
769 * linux-aarch64-low.c (debug_reg_change_callback): Use
772 2015-08-25 Yao Qi <yao.qi@linaro.org>
774 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
776 2015-08-25 Yao Qi <yao.qi@linaro.org>
778 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
780 2015-08-25 Yao Qi <yao.qi@linaro.org>
782 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
785 2015-08-25 Yao Qi <yao.qi@linaro.org>
787 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
789 (debug_reg_change_callback): Remove argument entry and add argument
790 lwp. Remove local variable thread. Don't print thread id in the
791 debugging output. Don't check whether pid of thread equals to pid.
792 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
793 iterate_over_lwps instead find_inferior.
795 2015-08-24 Pedro Alves <palves@redhat.com>
797 * inferiors.c (get_first_process): New function.
798 * inferiors.h (get_first_process): New declaration.
799 * remote-utils.c (read_ptid): Default to the first process in the
800 list, instead of to the current thread's process.
802 2015-08-24 Pedro Alves <palves@redhat.com>
804 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
805 * event-loop.c: Likewise.
806 * remote-utils.c: Likewise.
807 * tracepoint.c: Likewise.
809 2015-08-24 Pedro Alves <palves@redhat.com>
811 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
814 2015-08-21 Pedro Alves <palves@redhat.com>
816 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
817 instead of literal 1.
819 2015-08-21 Pedro Alves <palves@redhat.com>
821 * tdesc.c (default_description): Explicitly zero-initialize.
823 2015-08-21 Pedro Alves <palves@redhat.com>
826 * inferiors.c (remove_thread): Discard any pending stop reply for
828 * server.c (remove_all_on_match_pid): Rename to ...
829 (remove_all_on_match_ptid): ... this. Work with a filter ptid
831 (discard_queued_stop_replies): Change parameter to a ptid. Now
833 (handle_v_kill, kill_inferior_callback, captured_main)
834 (process_serial_event): Adjust.
835 * server.h (discard_queued_stop_replies): Declare.
837 2015-08-21 Pedro Alves <palves@redhat.com>
839 * linux-low.c (wait_for_sigstop): Always switch to no thread
840 selected if the previously current thread dies.
841 * lynx-low.c (lynx_request_interrupt): Use the first thread's
842 process instead of the current thread's.
843 * remote-utils.c (input_interrupt): Don't check if there's no
845 * server.c (gdb_read_memory, gdb_write_memory): If setting the
846 current thread to the general thread fails, error out.
847 (handle_qxfer_auxv, handle_qxfer_libraries)
848 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
849 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
850 (handle_query): Check if there's a thread selected instead of
851 checking whether there's any thread in the thread list.
852 (handle_qxfer_threads, handle_qxfer_btrace)
853 (handle_qxfer_btrace_conf): Don't error out early if there's no
854 thread in the thread list.
855 (handle_v_cont, myresume): Don't set the current thread to the
857 (process_serial_event) <Hg handling>: Also set thread_id if the
858 previous general thread is still alive.
859 (process_serial_event) <g/G handling>: If setting the current
860 thread to the general thread fails, error out.
861 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
862 thread's lwp instead of the current thread's.
863 * target.c (set_desired_thread): If the desired thread was not
864 found, leave the current thread pointing to NULL. Return an int
865 (boolean) indicating success.
866 * target.h (set_desired_thread): Change return type to int.
868 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
870 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
871 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
873 (ps_get_thread_area): New function.
875 2015-08-19 Gary Benson <gbenson@redhat.com>
877 * hostio.c (handle_pread): Do not attempt to read more data
878 than hostio_reply_with_data can fit in a packet.
880 2015-08-18 Joel Brobecker <brobecker@adacore.com>
882 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
884 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
886 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
888 2015-08-06 Pedro Alves <palves@redhat.com>
890 * tracepoint.c (expr_eval_result): Now an int.
892 2015-08-06 Pedro Alves <palves@redhat.com>
894 * gdbthread.h (struct regcache): Forward declare.
895 (struct thread_info) <regcache_data>: Now a struct regcache
897 * inferiors.c (inferior_regcache_data)
898 (set_inferior_regcache_data): Now work with struct regcache
900 * inferiors.h (struct regcache): Forward declare.
901 (inferior_regcache_data, set_inferior_regcache_data): Now work
902 with struct regcache pointers.
903 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
904 (free_register_cache_thread): Remove struct regcache pointer
907 2015-08-06 Pedro Alves <palves@redhat.com>
909 * server.c (captured_main): On error, print the exception message
910 to stderr, and if run_once is set, throw a quit.
912 2015-08-06 Pedro Alves <palves@redhat.com>
914 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
917 2015-08-06 Pedro Alves <palves@redhat.com>
919 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
920 reading beyond the passed in buffer length.
922 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
924 * tracepoint.c (symbol_list) <required>: Remove.
926 2015-08-06 Pedro Alves <palves@redhat.com>
928 * linux-low.c (handle_extended_wait): Set the fork child's suspend
929 count if stopping and suspending threads.
930 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
931 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
932 (linux_detach): Complete an ongoing step-over.
933 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
935 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
936 (linux_wait_1): If passing a signal to the inferior after
937 finishing a step-over, unsuspend and re-resume all lwps. If we
938 see a single-step event but the thread should be continuing, don't
939 pass the trap to gdb.
940 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
941 internal_error instead of gdb_assert.
942 (enqueue_pending_signal): New function.
943 (check_ptrace_stopped_lwp_gone): Add debug output.
944 (start_step_over): Use internal_error instead of gdb_assert.
945 (complete_ongoing_step_over): New function.
946 (linux_resume_one_thread): Don't resume a suspended thread.
947 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
950 2015-08-06 Pedro Alves <palves@redhat.com>
952 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
953 (linux_thread_alive): Use lwp_is_marked_dead.
954 (extended_event_reported): Delete.
955 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
956 instead of extended_event_reported.
957 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
959 (lwp_is_marked_dead): New function.
960 (lwp_running): Use lwp_is_marked_dead.
961 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
964 2015-08-06 Pedro Alves <palves@redhat.com>
966 * linux-low.c (linux_wait_1): Move fork event output out of the
967 !report_to_gdb check. Pass event_child->waitstatus to
968 target_waitstatus_to_string instead of ourstatus.
970 2015-08-04 Yao Qi <yao.qi@linaro.org>
972 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
973 if current_thread is 32 bit.
975 2015-08-04 Yao Qi <yao.qi@linaro.org>
977 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
978 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
979 * server.c (extended_protocol): Remove "static".
980 * server.h (extended_protocol): Declare it.
982 2015-08-04 Yao Qi <yao.qi@linaro.org>
984 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
985 both aarch64 and aarch32.
986 (aarch64_set_pc): Likewise.
988 2015-08-04 Yao Qi <yao.qi@linaro.org>
990 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
991 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
992 arm-with-neon.xml to srv_xmlfiles.
993 * linux-aarch64-low.c: Include linux-aarch32-low.h.
994 (is_64bit_tdesc): New function.
995 (aarch64_linux_read_description): New function.
996 (aarch64_arch_setup): Call aarch64_linux_read_description.
997 (regs_info): Rename to regs_info_aarch64.
998 (aarch64_regs_info): Return right regs_info.
999 (initialize_low_arch): Call initialize_low_arch_aarch32.
1001 2015-08-04 Yao Qi <yao.qi@linaro.org>
1003 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1004 * linux-aarch32-low.c: New file.
1005 * linux-aarch32-low.h: New file.
1006 * linux-arm-low.c (arm_fill_gregset): Move it to
1007 linux-aarch32-low.c.
1008 (arm_store_gregset): Likewise.
1009 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1010 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1011 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1012 (regs_info): Rename to regs_info_arm.
1013 (arm_regs_info): Return regs_info_aarch32 if
1014 have_ptrace_getregset is 1 and target description is
1015 arm_with_neon or arm_with_vfpv3.
1016 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1017 Call initialize_low_arch_aarch32 instead.
1019 2015-08-04 Yao Qi <yao.qi@linaro.org>
1021 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1022 * linux-low.c: ... here.
1023 * linux-low.h (have_ptrace_getregset): Declare it.
1025 2015-08-04 Pedro Alves <palves@redhat.com>
1027 * thread-db.c (struct thread_db): Use new typedefs.
1028 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1030 (disable_thread_event_reporting): Cast result of dlsym to
1031 destination function pointer type.
1032 (thread_db_mourn): Use td_ta_delete_ftype.
1034 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1036 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1038 (CDX_BREAKPOINT): Define for R2.
1039 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1040 (the_low_target): Add comments.
1042 2015-07-30 Yao Qi <yao.qi@linaro.org>
1044 * linux-arm-low.c (arm_hwcap): Remove it.
1045 (arm_read_description): New local variable arm_hwcap. Don't
1046 set arm_hwcap to zero.
1048 2015-07-30 Yao Qi <yao.qi@linaro.org>
1050 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1051 Use regcache->tdesc instead.
1052 (arm_store_wmmxregset): Likewise.
1053 (arm_fill_vfpregset): Likewise.
1054 (arm_store_vfpregset): Likewise.
1056 2015-07-30 Yao Qi <yao.qi@linaro.org>
1058 * linux-arm-low.c: Include arch/arm.h.
1059 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1060 (arm_store_gregset): Likewise.
1062 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1064 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1065 ptrace's 4th parameter.
1067 2015-07-27 Yao Qi <yao.qi@linaro.org>
1069 * configure.srv (case aarch64*-*-linux*): Don't set
1072 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1074 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1076 * linux-arm-low.c: Likewise.
1077 * linux-cris-low.c: Likewise.
1078 * linux-crisv32-low.c: Likewise.
1079 * linux-low.c: Likewise.
1080 * linux-m68k-low.c: Likewise.
1081 * linux-mips-low.c: Likewise.
1082 * linux-nios2-low.c: Likewise.
1083 * linux-s390-low.c: Likewise.
1084 * linux-sparc-low.c: Likewise.
1085 * linux-tic6x-low.c: Likewise.
1086 * linux-tile-low.c: Likewise.
1087 * linux-x86-low.c: Likewise.
1089 2015-07-24 Pedro Alves <palves@redhat.com>
1091 * config.in: Regenerate.
1092 * configure: Regenerate.
1094 2015-07-24 Pedro Alves <palves@redhat.com>
1096 * acinclude.m4: Include ../ptrace.m4.
1097 * configure.ac: Call GDB_AC_PTRACE.
1098 * config.in, configure: Regenerate.
1100 2015-07-24 Yao Qi <yao.qi@linaro.org>
1102 * linux-low.c (linux_create_inferior): Remove setting to
1103 proc->priv->new_inferior.
1104 (linux_attach): Likewise.
1105 (linux_low_filter_event): Likewise.
1106 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1108 2015-07-24 Yao Qi <yao.qi@linaro.org>
1110 * linux-low.c (linux_arch_setup): New function.
1111 (linux_low_filter_event): If proc->tdesc is NULL and
1112 proc->attached is true, call the_low_target.arch_setup.
1113 Otherwise, keep status pending, and return.
1114 (linux_resume_one_lwp_throw): Don't call get_pc if
1115 thread->while_stepping isn't NULL. Don't call
1116 get_thread_regcache if proc->tdesc is NULL.
1117 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1118 (linux_target_ops): Install arch_setup.
1119 * server.c (start_inferior): Call the_target->arch_setup.
1120 * target.h (struct target_ops) <arch_setup>: New field.
1121 (target_arch_setup): New marco.
1122 * lynx-low.c (lynx_target_ops): Update.
1123 * nto-low.c (nto_target_ops): Update.
1124 * spu-low.c (spu_target_ops): Update.
1125 * win32-low.c (win32_target_ops): Update.
1127 2015-07-24 Yao Qi <yao.qi@linaro.org>
1129 * linux-low.c (linux_add_process): Don't set
1130 proc->priv->new_inferior.
1131 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1132 (linux_attach): Likewise.
1134 2015-07-24 Yao Qi <yao.qi@linaro.org>
1136 * server.c (start_inferior): Code refactor.
1138 2015-07-24 Yao Qi <yao.qi@linaro.org>
1140 * server.c (process_serial_event): Set general_thread.
1142 2015-07-21 Yao Qi <yao.qi@linaro.org>
1144 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1145 aarch64_linux_get_debug_reg_capacity.
1147 2015-07-17 Yao Qi <yao.qi@linaro.org>
1149 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1150 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1151 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1152 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1153 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1154 (AARCH64_HWP_ALIGNMENT): Likewise.
1155 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1156 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1157 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1158 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1159 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1160 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1161 (struct aarch64_debug_reg_state): Likewise.
1162 (struct arch_lwp_info): Likewise.
1163 (aarch64_align_watchpoint): Likewise.
1164 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1165 (aarch64_watchpoint_length): Likewise.
1166 (aarch64_point_encode_ctrl_reg): Likewise
1167 (aarch64_point_is_aligned): Likewise.
1168 (aarch64_align_watchpoint): Likewise.
1169 (aarch64_linux_set_debug_regs):
1170 (aarch64_dr_state_insert_one_point): Likewise.
1171 (aarch64_dr_state_remove_one_point): Likewise.
1172 (aarch64_handle_breakpoint): Likewise.
1173 (aarch64_handle_aligned_watchpoint): Likewise.
1174 (aarch64_handle_unaligned_watchpoint): Likewise.
1175 (aarch64_handle_watchpoint): Likewise.
1177 2015-07-17 Yao Qi <yao.qi@linaro.org>
1179 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1180 and don't aarch64_get_debug_reg_state. All callers update.
1181 (aarch64_handle_aligned_watchpoint): Likewise.
1182 (aarch64_handle_unaligned_watchpoint): Likewise.
1183 (aarch64_handle_watchpoint): Likewise.
1184 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1185 (aarch64_remove_point): Likewise.
1187 2015-07-17 Yao Qi <yao.qi@linaro.org>
1189 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1191 (aarch64_handle_unaligned_watchpoint): Likewise.
1193 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1195 Revert the previous 3 commits:
1196 Move gdb_regex* to common/
1197 Move linux_find_memory_regions_full & co.
1198 gdbserver build-id attribute generator
1200 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1201 Jan Kratochvil <jan.kratochvil@redhat.com>
1203 gdbserver build-id attribute generator.
1204 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1205 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1206 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1208 (get_dynamic): Use find_pdhr to traverse program headers.
1209 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1210 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1211 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1212 (get_hex_build_id): New.
1213 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1214 to reply XML document.
1216 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1217 Jan Kratochvil <jan.kratochvil@redhat.com>
1219 * target.c: Include target/target-utils.h and fcntl.h.
1220 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1221 (target_fileio_read_stralloc): New functions.
1223 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1225 * Makefile.in (OBS): Add gdb_regex.o.
1227 * config.in: Rebuilt.
1228 * configure: Rebuilt.
1230 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1231 Jan Kratochvil <jan.kratochvil@redhat.com>
1233 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1234 * Makefile.in (OBS): Add target-utils.o.
1235 (linux-maps.o, target-utils.o): New.
1236 * configure.srv (srv_linux_obj): Add linux-maps.o.
1238 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1240 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1242 (the_low_target): Install it.
1244 2015-07-14 Pedro Alves <palves@redhat.com>
1246 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1247 Instead, ignore ECHILD, and throw an error for other errnos.
1249 2015-07-10 Pedro Alves <palves@redhat.com>
1251 * event-loop.c (struct callback_event) <data>: Change type to
1252 gdb_client_data instance instead of gdb_client_data pointer.
1253 (append_callback_event): Adjust.
1255 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1257 * linux-aarch64-low.c: Add comments for each linux_target_ops
1258 method. Remove comments already covered in target_ops and
1259 linux_target_ops definitions.
1260 (the_low_target): Add comments for each unimplemented method.
1262 2015-07-09 Yao Qi <yao.qi@linaro.org>
1264 * linux-aarch64-low.c (aarch64_regmap): Remove.
1265 (aarch64_usrregs_info): Remove.
1266 (regs_info): Set field usrregs to NULL.
1268 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1270 * linux-low.c: Include "rsp-low.h"
1271 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1272 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1273 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1274 (handle_btrace_enable_pt): New.
1275 (handle_btrace_general_set): Support "pt".
1276 (handle_btrace_conf_general_set): Support "pt:size".
1278 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1280 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1283 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1285 * linux-aarch64-low.c: Remove comment about endianness.
1286 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1287 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1290 2015-06-24 Gary Benson <gbenson@redhat.com>
1292 * linux-i386-ipa.c (stdint.h): Do not include.
1293 * lynx-i386-low.c (stdint.h): Likewise.
1294 * lynx-ppc-low.c (stdint.h): Likewise.
1295 * mem-break.c (stdint.h): Likewise.
1296 * thread-db.c (stdint.h): Likewise.
1297 * tracepoint.c (stdint.h): Likewise.
1298 * win32-low.c (stdint.h): Likewise.
1300 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1302 * server.c (write_qxfer_response): Update call to
1303 remote_escape_output.
1305 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1306 Jan Kratochvil <jan.kratochvil@redhat.com>
1308 Merge multiple hex conversions.
1309 * gdbreplay.c (tohex): Rename to 'fromhex'.
1310 (logchar): Use fromhex.
1312 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1314 * server.c (handle_qxfer_libraries): Set `version' attribute for
1317 2015-06-10 Gary Benson <gbenson@redhat.com>
1319 * target.h (struct target_ops) <multifs_open>: New field.
1320 <multifs_unlink>: Likewise.
1321 <multifs_readlink>: Likewise.
1322 * linux-low.c (nat/linux-namespaces.h): New include.
1323 (linux_target_ops): Initialize the_target->multifs_open,
1324 the_target->multifs_unlink and the_target->multifs_readlink.
1325 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1326 * hostio.c (hostio_fs_pid): New static variable.
1327 (hostio_handle_new_gdb_connection): New function.
1328 (handle_setfs): Likewise.
1329 (handle_open): Use the_target->multifs_open as appropriate.
1330 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1331 (handle_readlink): Use the_target->multifs_readlink as
1333 (handle_vFile): Handle vFile:setfs packets.
1334 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1335 after target_handle_new_gdb_connection.
1337 2015-06-10 Gary Benson <gbenson@redhat.com>
1339 * configure.ac (AC_CHECK_FUNCS): Add setns.
1340 * config.in: Regenerate.
1341 * configure: Likewise.
1342 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1343 (linux-namespaces.o): New rule.
1344 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1346 2015-06-09 Gary Benson <gbenson@redhat.com>
1348 * hostio.c (handle_open): Process mode argument with
1349 fileio_to_host_mode.
1351 2015-06-01 Yao Qi <yao.qi@linaro.org>
1353 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1354 * linux-x86-low.c: Likewise.
1356 2015-05-28 Don Breazeal <donb@codesourcery.com>
1358 * linux-low.c (handle_extended_wait): Initialize
1359 thread_info.last_resume_kind for new fork children.
1361 2015-05-15 Pedro Alves <palves@redhat.com>
1363 * target.h (target_handle_new_gdb_connection): Rewrite using if
1364 wrapped in do/while.
1366 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1368 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1369 * configure, config.in: Regenerate.
1370 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1373 2015-05-12 Don Breazeal <donb@codesourcery.com>
1375 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1376 PTRACE_EVENT_VFORK_DONE.
1377 (linux_low_ptrace_options, extended_event_reported): Add vfork
1379 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1380 and "vforkdone" for RSP 'T' Stop Reply Packet.
1381 * server.h (report_vfork_events): Declare
1384 2015-05-12 Don Breazeal <donb@codesourcery.com>
1386 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1387 (the_low_target) <new_fork>: Initialize new member.
1388 * linux-arm-low.c (arm_new_fork): New function.
1389 (the_low_target) <new_fork>: Initialize new member.
1390 * linux-low.c (handle_extended_wait): Call new target function
1392 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1393 * linux-mips-low.c (mips_add_watchpoint): New function
1394 extracted from mips_insert_point.
1395 (the_low_target) <new_fork>: Initialize new member.
1396 (mips_linux_new_fork): New function.
1397 (mips_insert_point): Call mips_add_watchpoint.
1398 * linux-x86-low.c (x86_linux_new_fork): New function.
1399 (the_low_target) <new_fork>: Initialize new member.
1401 2015-05-12 Don Breazeal <donb@codesourcery.com>
1403 * linux-low.c (handle_extended_wait): Implement return value,
1404 rename argument 'event_child' to 'event_lwp', handle
1405 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1406 (linux_low_ptrace_options): New function.
1407 (linux_low_filter_event): Call linux_low_ptrace_options,
1408 use different argument fo linux_enable_event_reporting,
1409 use return value from handle_extended_wait.
1410 (extended_event_reported): New function.
1411 (linux_wait_1): Call extended_event_reported and set
1412 status to report fork events.
1413 (linux_write_memory): Add pid to debug message.
1414 (reset_lwp_ptrace_options_callback): New function.
1415 (linux_handle_new_gdb_connection): New function.
1416 (linux_target_ops): Initialize new structure member.
1417 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1418 * lynx-low.c: Initialize new structure member.
1419 * remote-utils.c (prepare_resume_reply): Implement stop reason
1420 "fork" for "T" stop message.
1421 * server.c (handle_query): Call handle_new_gdb_connection.
1422 * server.h (report_fork_events): Declare global flag.
1423 * target.h (struct target_ops) <handle_new_gdb_connection>:
1425 (target_handle_new_gdb_connection): New macro.
1426 * win32-low.c: Initialize new structure member.
1428 2015-05-12 Don Breazeal <donb@codesourcery.com>
1430 * mem-break.c (APPEND_TO_LIST): Define macro.
1431 (clone_agent_expr): New function.
1432 (clone_one_breakpoint): New function.
1433 (clone_all_breakpoints): New function.
1434 * mem-break.h: Declare new functions.
1436 2015-05-12 Don Breazeal <donb@codesourcery.com>
1438 * linux-low.c (linux_supports_fork_events): New function.
1439 (linux_supports_vfork_events): New function.
1440 (linux_target_ops): Initialize new structure members.
1441 (initialize_low): Call linux_check_ptrace_features.
1442 * lynx-low.c (lynx_target_ops): Initialize new structure
1444 * server.c (report_fork_events, report_vfork_events):
1446 (handle_query): Add new features to qSupported packet and
1448 (captured_main): Initialize new global variables.
1449 * target.h (struct target_ops) <supports_fork_events>:
1451 <supports_vfork_events>: New member.
1452 (target_supports_fork_events): New macro.
1453 (target_supports_vfork_events): New macro.
1454 * win32-low.c (win32_target_ops): Initialize new structure
1457 2015-05-12 Gary Benson <gbenson@redhat.com>
1459 * server.c (handle_qxfer_exec_file): Use current process
1462 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1464 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1465 Remove HAVE_PTRACE_GETREGS conditionals.
1466 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1467 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1469 2015-05-08 Yao Qi <yao.qi@linaro.org>
1471 * linux-low.c (linux_supports_conditional_breakpoints): New
1473 (linux_target_ops): Install new target method.
1474 * lynx-low.c (lynx_target_ops): Install NULL hook for
1475 supports_conditional_breakpoints.
1476 * nto-low.c (nto_target_ops): Likewise.
1477 * spu-low.c (spu_target_ops): Likewise.
1478 * win32-low.c (win32_target_ops): Likewise.
1479 * server.c (handle_query): Check
1480 target_supports_conditional_breakpoints.
1481 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1483 (target_supports_conditional_breakpoints): New macro.
1485 2015-05-06 Pedro Alves <palves@redhat.com>
1488 * server.c (start_inferior): If the process exits, mourn it.
1490 2015-04-21 Gary Benson <gbenson@redhat.com>
1492 * hostio.c (fileio_open_flags_to_host): Factored out to
1493 fileio_to_host_openflags in common/fileio.c. Single use
1496 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1498 * linux-xtensa-low.c (xtensa_fill_gregset)
1499 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1502 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1504 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1505 (regs_info): Replace usrregs pointer with NULL.
1507 2015-04-17 Gary Benson <gbenson@redhat.com>
1509 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1510 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1511 * server.c (handle_qxfer_exec_file): New function.
1512 (qxfer_packets): Add exec-file entry.
1513 (handle_query): Report qXfer:exec-file:read as supported packet.
1515 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1517 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1519 2015-04-09 Gary Benson <gbenson@redhat.com>
1521 * hostio-errno.c (errno_to_fileio_error): Remove function.
1522 Update caller to use remote_fileio_to_fio_error.
1524 2015-04-09 Yao Qi <yao.qi@linaro.org>
1526 * linux-low.c (linux_insert_point): Call
1527 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1528 (linux_remove_point): Call remove_memory_breakpoint if type is
1530 * linux-x86-low.c (x86_insert_point): Don't call
1531 insert_memory_breakpoint.
1532 (x86_remove_point): Don't call remove_memory_breakpoint.
1534 2015-04-01 Pedro Alves <palves@redhat.com>
1535 Cleber Rosa <crosa@redhat.com>
1537 * server.c (gdbserver_usage): Reorganize and extend the usage
1540 2015-03-24 Pedro Alves <palves@redhat.com>
1542 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1543 output. Also dump TRAP_TRACE.
1544 (linux_low_filter_event): In debug output, distinguish a
1545 resume_stop SIGSTOP from a delayed SIGSTOP.
1547 2015-03-24 Gary Benson <gbenson@redhat.com>
1549 * linux-x86-low.c (x86_linux_new_thread): Moved to
1551 (x86_linux_prepare_to_resume): Likewise.
1553 2015-03-24 Gary Benson <gbenson@redhat.com>
1555 * Makefile.in (x86-linux-dregs.o): New rule.
1556 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1557 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1558 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1559 (x86_linux_dr_get): Likewise.
1560 (x86_linux_dr_set): Likewise.
1561 (update_debug_registers_callback): Likewise.
1562 (x86_linux_dr_set_addr): Likewise.
1563 (x86_linux_dr_get_addr): Likewise.
1564 (x86_linux_dr_set_control): Likewise.
1565 (x86_linux_dr_get_control): Likewise.
1566 (x86_linux_dr_get_status): Likewise.
1567 (x86_linux_update_debug_registers): Likewise.
1569 2015-03-24 Gary Benson <gbenson@redhat.com>
1571 * linux-x86-low.c (x86_linux_update_debug_registers):
1572 New function, factored out from...
1573 (x86_linux_prepare_to_resume): ...this.
1575 2015-03-24 Gary Benson <gbenson@redhat.com>
1577 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1578 (x86_linux_dr_set): Likewise.
1579 (update_debug_registers_callback): Likewise.
1580 (x86_linux_dr_set_addr): Likewise.
1581 (x86_linux_dr_get_addr): Likewise.
1582 (x86_linux_dr_set_control): Likewise.
1583 (x86_linux_dr_get_control): Likewise.
1584 (x86_linux_dr_get_status): Likewise.
1585 (x86_linux_prepare_to_resume): Likewise.
1587 2015-03-24 Gary Benson <gbenson@redhat.com>
1589 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1590 Use perror_with_name. Pass string through gettext.
1591 (x86_linux_dr_set): Likewise.
1593 2015-03-24 Gary Benson <gbenson@redhat.com>
1595 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1596 (x86_linux_dr_set_addr): ...this.
1597 (x86_dr_low_get_addr): Rename to...
1598 (x86_linux_dr_get_addr): ...this.
1599 (x86_dr_low_set_control): Rename to...
1600 (x86_linux_dr_set_control): ...this.
1601 (x86_dr_low_get_control): Rename to...
1602 (x86_linux_dr_get_control): ...this.
1603 (x86_dr_low_get_status): Rename to...
1604 (x86_linux_dr_get_status): ...this.
1605 (x86_dr_low): Update with new function names.
1607 2015-03-24 Gary Benson <gbenson@redhat.com>
1609 * Makefile.in (x86-linux.o): New rule.
1610 * configure.srv: Add x86-linux.o to relevant targets.
1611 * linux-low.c (lwp_set_arch_private_info): New function.
1612 (lwp_arch_private_info): Likewise.
1613 * linux-x86-low.c: Include nat/x86-linux.h.
1614 (arch_lwp_info): Removed structure.
1615 (update_debug_registers_callback):
1616 Use lwp_set_debug_registers_changed.
1617 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1618 and lwp_set_debug_registers_changed.
1619 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1621 2015-03-24 Gary Benson <gbenson@redhat.com>
1623 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1624 * linux-arm-low.c (arm_new_thread): Likewise.
1625 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1626 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1627 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1628 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1630 2015-03-24 Gary Benson <gbenson@redhat.com>
1632 * linux-low.c (ptid_of_lwp): New function.
1633 (lwp_is_stopped): Likewise.
1634 (lwp_stop_reason): Likewise.
1635 * linux-x86-low.c (update_debug_registers_callback):
1637 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1640 2015-03-24 Gary Benson <gbenson@redhat.com>
1642 * linux-low.h (linux_stop_lwp): Remove declaration.
1644 2015-03-24 Gary Benson <gbenson@redhat.com>
1646 * linux-low.h: Include nat/linux-nat.h.
1647 * linux-low.c (iterate_over_lwps_args): New structure.
1648 (iterate_over_lwps_filter): New function.
1649 (iterate_over_lwps): Likewise.
1650 * linux-x86-low.c (update_debug_registers_callback):
1651 Update signature to what iterate_over_lwps expects.
1652 Remove PID check that iterate_over_lwps now performs.
1653 (x86_dr_low_set_addr): Use iterate_over_lwps.
1654 (x86_dr_low_set_control): Likewise.
1656 2015-03-24 Gary Benson <gbenson@redhat.com>
1658 * linux-x86-low.c (x86_debug_reg_state): New function.
1659 (x86_linux_prepare_to_resume): Use the above.
1661 2015-03-24 Gary Benson <gbenson@redhat.com>
1663 * linux-low.c (current_lwp_ptid): New function.
1664 * linux-x86-low.c: Include nat/linux-nat.h.
1665 (x86_dr_low_get_addr): Use current_lwp_ptid.
1666 (x86_dr_low_get_control): Likewise.
1667 (x86_dr_low_get_status): Likewise.
1669 2015-03-20 Pedro Alves <palves@redhat.com>
1671 * tracepoint.c (cmd_qtstatus): Make "str" const.
1673 2015-03-20 Pedro Alves <palves@redhat.com>
1675 * server.c (handle_general_set): Make "req_str" const.
1677 2015-03-19 Pedro Alves <palves@redhat.com>
1679 * linux-low.c (linux_resume_one_lwp): Rename to ...
1680 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1681 instead call perror_with_name.
1682 (check_ptrace_stopped_lwp_gone): New function.
1683 (linux_resume_one_lwp): Reimplement as wrapper around
1684 linux_resume_one_lwp_throw that swallows errors if the LWP is
1687 2015-03-19 Pedro Alves <palves@redhat.com>
1689 * linux-low.c (count_events_callback, select_event_lwp_callback):
1690 No longer check whether the thread has resume_stop as last resume
1693 2015-03-19 Pedro Alves <palves@redhat.com>
1695 * linux-low.c (count_events_callback, select_event_lwp_callback):
1696 Use the lwp's status_pending_p field, not the thread's.
1698 2015-03-19 Pedro Alves <palves@redhat.com>
1700 * linux-low.c (select_event_lwp_callback): Update comments to
1701 no longer mention SIGTRAP.
1703 2015-03-18 Gary Benson <gbenson@redhat.com>
1705 * server.c (handle_query): Do not report vFile:fstat as supported.
1707 2015-03-11 Gary Benson <gbenson@redhat.com>
1709 * hostio.c (sys/types.h): New include.
1710 (sys/stat.h): Likewise.
1711 (common-remote-fileio.h): Likewise.
1712 (handle_fstat): New function.
1713 (handle_vFile): Handle vFile:fstat packets.
1715 2015-03-11 Gary Benson <gbenson@redhat.com>
1717 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1718 struct stat.st_blocks and struct stat.st_blksize.
1719 * configure: Regenerate.
1720 * config.in: Likewise.
1721 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1722 (OBS): Add common-remote-fileio.o.
1723 (common-remote-fileio.o): New rule.
1725 2015-03-09 Pedro Alves <palves@redhat.com>
1727 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1728 'struct sockaddr' pointer in 'accept' call.
1730 2015-03-09 Pedro Alves <palves@redhat.com>
1733 2015-03-07 Pedro Alves <palves@redhat.com>
1734 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1735 or <winsock2.h> here. Instead include "gdb_socket.h".
1736 (remote_open): Use union gdb_sockaddr_u.
1737 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1738 or <winsock2.h> here. Instead include "gdb_socket.h".
1739 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1740 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1742 (init_named_socket, gdb_agent_helper_thread): Use union
1745 2015-03-07 Pedro Alves <palves@redhat.com>
1747 * configure.ac (build_warnings): Move
1748 -Wdeclaration-after-statement to the C-specific set.
1749 * configure: Regenerate.
1751 2015-03-07 Pedro Alves <palves@redhat.com>
1753 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1754 or <winsock2.h> here. Instead include "gdb_socket.h".
1755 (remote_open): Use union gdb_sockaddr_u.
1756 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1757 or <winsock2.h> here. Instead include "gdb_socket.h".
1758 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1759 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1761 (init_named_socket, gdb_agent_helper_thread): Use union
1764 2015-03-07 Pedro Alves <palves@redhat.com>
1766 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1769 2015-03-06 Yao Qi <yao.qi@linaro.org>
1771 * linux-aarch64-low.c (aarch64_insert_point): Use
1772 show_debug_regs as a boolean.
1773 (aarch64_remove_point): Likewise.
1775 2015-03-05 Pedro Alves <palves@redhat.com>
1777 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1778 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1779 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1780 * nto-low.c (nto_target_ops): Likewise.
1781 * spu-low.c (spu_target_ops): Likewise.
1782 * win32-low.c (win32_target_ops): Likewise.
1784 2015-03-04 Pedro Alves <palves@redhat.com>
1786 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1787 Decide whether a breakpoint triggered based on the SIGTRAP's
1789 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1790 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1791 (linux_low_filter_event): Check for breakpoints before checking
1793 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1795 (linux_stopped_by_sw_breakpoint)
1796 (linux_supports_stopped_by_sw_breakpoint)
1797 (linux_stopped_by_hw_breakpoint)
1798 (linux_supports_stopped_by_hw_breakpoint): New functions.
1799 (linux_target_ops): Install new target methods.
1801 2015-03-04 Pedro Alves <palves@redhat.com>
1803 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1804 * server.c (swbreak_feature, hwbreak_feature): New globals.
1805 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1806 (captured_main): Clear swbreak_feature and hwbreak_feature.
1807 * server.h (swbreak_feature, hwbreak_feature): Declare.
1808 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1809 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1810 supports_stopped_by_hw_breakpoint>: New fields.
1811 (target_supports_stopped_by_sw_breakpoint)
1812 (target_stopped_by_sw_breakpoint)
1813 (target_supports_stopped_by_hw_breakpoint)
1814 (target_stopped_by_hw_breakpoint): Declare.
1816 2015-03-04 Pedro Alves <palves@redhat.com>
1818 enum lwp_stop_reason -> enum target_stop_reason
1819 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1820 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1821 (linux_wait_1, stuck_in_jump_pad_callback)
1822 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1823 (linux_stopped_by_watchpoint):
1824 * linux-low.h (enum lwp_stop_reason): Delete.
1825 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1826 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1828 2015-03-04 Yao Qi <yao.qi@linaro.org>
1830 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1832 2015-03-03 Gary Benson <gbenson@redhat.com>
1834 * hostio.c (handle_vFile): Fix prefix lengths.
1836 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1838 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1841 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1843 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1844 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1845 (clean): Add "rm -f" for above C files.
1846 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1847 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1848 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1849 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1850 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1851 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1852 (init_registers_s390x_vx_linux64)
1853 (init_registers_s390x_tevx_linux64)
1854 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1855 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1857 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1858 (s390_store_vxrs_high): New functions.
1859 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1861 (s390_arch_setup): Add logic for selecting one of the new target
1862 descriptions. Activate the new vector regsets if applicable.
1863 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1864 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1865 and init_registers_s390x_tevx_linux64.
1867 2015-03-01 Pedro Alves <palves@redhat.com>
1869 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1872 2015-02-27 Pedro Alves <palves@redhat.com>
1874 * linux-x86-low.c (u_debugreg_offset): New function.
1875 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1877 2015-02-27 Pedro Alves <palves@redhat.com>
1879 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1880 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1881 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1882 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1883 (ps_lsetfpregs, ps_getpid)
1884 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1885 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1886 (ps_lsetxregs, ps_plog): Declare.
1888 2015-02-27 Pedro Alves <palves@redhat.com>
1890 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1891 IP_AGENT_EXPORT_FUNC.
1892 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1893 IP_AGENT_EXPORT_FUNC.
1894 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1895 (IP_AGENT_EXPORT): Delete.
1896 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1897 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1898 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1899 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1900 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1901 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1902 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1903 (traceframe_read_count, traceframe_write_count)
1904 (traceframes_created, trace_state_variables, get_raw_reg)
1905 (get_trace_state_variable_value, set_trace_state_variable_value)
1906 (ust_loaded, helper_thread_id, cmd_buf): Use
1907 IPA_SYM_EXPORTED_NAME.
1908 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1909 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1910 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1911 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1912 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1913 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1914 EXTERN_C_PUSH/EXTERN_C_POP.
1915 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1916 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1917 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1918 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1919 (traceframe_write_count, traceframe_read_count)
1920 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1921 (about_to_request_buffer_space, get_trace_state_variable_value)
1922 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1923 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1924 EXTERN_C_PUSH/EXTERN_C_POP.
1925 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1926 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1927 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1928 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1929 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1930 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1931 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1932 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1934 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1935 (IP_AGENT_EXPORT_VAR_DECL): Define.
1937 (gdb_agent_get_raw_reg): Declare.
1939 2015-02-27 Tom Tromey <tromey@redhat.com>
1940 Pedro Alves <palves@redhat.com>
1942 Rename symbols whose names are reserved C++ keywords throughout.
1944 2015-02-27 Pedro Alves <palves@redhat.com>
1946 * Makefile.in (COMPILER): New, get it from autoconf.
1947 (CXX): Get from autoconf instead.
1948 (COMPILE.pre): Use COMPILER.
1949 (CC-LD): Rename to ...
1950 (CC_LD): ... this. Use COMPILER.
1951 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1952 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1953 * acinclude.m4: Include build-with-cxx.m4.
1954 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1955 Disable -Werror by default if building in C++ mode.
1956 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1957 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1958 the C++ compiler. Save/restore CXXFLAGS too.
1959 * configure: Regenerate.
1961 2015-02-27 Pedro Alves <palves@redhat.com>
1963 * acinclude.m4: Include libiberty.m4.
1964 * configure.ac: Call libiberty_INIT.
1965 * config.in, configure: Regenerate.
1967 2015-02-26 Pedro Alves <palves@redhat.com>
1969 * linux-low.c (linux_wait_1): When incrementing the PC past a
1970 program breakpoint always use the_low_target.breakpoint_len as
1971 increment, rather than the maximum between that and
1972 the_low_target.decr_pc_after_break.
1974 2015-02-23 Pedro Alves <palves@redhat.com>
1976 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1977 thread was doing a step-over; always adjust the PC if
1978 we stepped over a permanent breakpoint.
1979 (linux_wait_1): If we stepped over breakpoint that was on top of a
1980 permanent breakpoint, manually advance the PC past it.
1982 2015-02-23 Pedro Alves <palves@redhat.com>
1984 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1986 (x86_fill_gregset, x86_store_gregset): Use it when handling
1989 2015-02-20 Pedro Alves <palves@redhat.com>
1991 * thread-db.c: Include "nat/linux-procfs.h".
1992 (thread_db_init): Skip listing new threads if the kernel supports
1993 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1995 2015-02-20 Pedro Alves <palves@redhat.com>
1997 * linux-low.c (status_pending_p_callback): Use ptid_match.
1999 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2001 PR breakpoints/16812
2002 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2003 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2004 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2006 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2008 PR breakpoints/15956
2009 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2011 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2013 * linux-low.c (linux_low_btrace_conf): Print size.
2014 * server.c (handle_btrace_conf_general_set): New.
2015 (hanle_general_set): Call handle_btrace_conf_general_set.
2016 (handle_query): Report Qbtrace-conf:bts:size as supported.
2018 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2020 * linux-low.c (linux_low_enable_btrace): Update parameters.
2021 (linux_low_btrace_conf): New.
2022 (linux_target_ops)<to_btrace_conf>: Initialize.
2023 * server.c (current_btrace_conf): New.
2024 (handle_btrace_enable): Rename to ...
2025 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2026 to target_enable_btrace. Update comment. Update users.
2027 (handle_qxfer_btrace_conf): New.
2028 (qxfer_packets): Add btrace-conf entry.
2029 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2030 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2031 (target_ops)<read_btrace_conf>: New.
2032 (target_enable_btrace): Update parameters.
2033 (target_read_btrace_conf): New.
2035 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2037 * server.c (handle_btrace_general_set): Remove call to
2038 target_supports_btrace.
2039 (supported_btrace_packets): New.
2040 (handle_query): Call supported_btrace_packets.
2041 * target.h: include btrace-common.h.
2042 (btrace_target_info): Removed.
2043 (supports_btrace, target_supports_btrace): Update parameters.
2045 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2047 * Makefile.in (SFILES): Add common/btrace-common.c.
2048 (OBS): Add common/btrace-common.o.
2049 (btrace-common.o): Add build rules.
2050 * linux-low: Include btrace-common.h.
2051 (linux_low_read_btrace): Use struct btrace_data. Call
2052 btrace_data_init and btrace_data_fini.
2054 2015-02-06 Pedro Alves <palves@redhat.com>
2056 * thread-db.c (find_new_threads_callback): Add debug output.
2058 2015-02-04 Pedro Alves <palves@redhat.com>
2060 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2061 (resume_stopped_resumed_lwps): New function.
2062 (linux_wait_for_event_filtered): Use it.
2064 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2066 * Makefile.in (SFILES): Add linux-personality.c.
2067 (linux-personality.o): New rule.
2068 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2069 list of objects to be built.
2070 * linux-low.c: Include nat/linux-personality.h.
2071 (linux_create_inferior): Remove code to disable address space
2072 randomization (moved to ../nat/linux-personality.c). Create
2073 cleanup to disable address space randomization.
2075 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2077 * Makefile.in (posix-strerror.o): New rule.
2078 (mingw-strerror.o): Likewise.
2079 * configure: Regenerated.
2080 * configure.ac: Source file ../common/common.host. Initialize new
2081 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2083 2015-01-14 Yao Qi <yao@codesourcery.com>
2085 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2086 (ppc-linux.o): New rule.
2087 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2088 * configure.ac: AC_CHECK_FUNCS(getauxval).
2089 * config.in: Re-generated.
2090 * configure: Re-generated.
2091 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2092 ppc64_64bit_inferior_p
2094 2015-01-14 Yao Qi <yao@codesourcery.com>
2096 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2097 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2098 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2099 (PT_ORIG_R3, PT_TRAP): Likewise.
2100 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2101 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2102 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2104 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2106 * i387-fp.c (i387_cache_to_xsave): In look over
2107 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2108 zmmh_low_space field by use of zmmh_high_space.
2110 2015-01-09 Pedro Alves <palves@redhat.com>
2112 * linux-low.c (step_over_bkpt): Move higher up in the file.
2113 (handle_extended_wait): Don't store the stop_pc here.
2114 (get_stop_pc): Adjust comments and rename to ...
2115 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2116 stopped for a software breakpoint or hardware breakpoint.
2117 (thread_still_has_status_pending_p): New function.
2118 (status_pending_p_callback): Use
2119 thread_still_has_status_pending_p. If the event is no longer
2120 interesting, resume the LWP.
2121 (handle_tracepoints): Add assert.
2122 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2123 (wstatus_maybe_breakpoint): New function.
2124 (cancel_breakpoint): Delete function.
2125 (check_stopped_by_watchpoint): New function, factored out from
2126 linux_low_filter_event.
2127 (lp_status_maybe_breakpoint): Delete function.
2128 (linux_low_filter_event): Remove filter_ptid argument.
2129 Leave thread group exits pending here. Store the LWP's stop PC.
2130 Always leave events pending.
2131 (linux_wait_for_event_filtered): Pull all events out of the
2132 kernel, and leave them all pending.
2133 (count_events_callback, select_event_lwp_callback): Consider all
2135 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2136 (select_event_lwp): Only give preference to the stepping LWP in
2137 all-stop mode. Adjust comments.
2138 (ignore_event): New function.
2139 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2140 references to cancel_breakpoints. Adjust to renames. Also give
2141 equal priority to all LWPs that have had events in non-stop mode.
2142 If reporting a software breakpoint event, unadjust the LWP's PC.
2143 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2144 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2146 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2147 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2148 (linux_stopped_by_watchpoint): Adjust.
2149 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2150 * linux-low.h (enum lwp_stop_reason): New.
2151 (struct lwp_info) <stop_pc>: Adjust comment.
2152 <stopped_by_watchpoint>: Delete field.
2153 <stop_reason>: New field.
2154 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2155 * mem-break.c (software_breakpoint_inserted_here)
2156 (hardware_breakpoint_inserted_here): New function.
2157 * mem-break.h (software_breakpoint_inserted_here)
2158 (hardware_breakpoint_inserted_here): Declare.
2159 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2160 (cancel_breakpoints): Delete.
2161 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2162 (upload_fast_traceframes): Remove references to
2165 2015-01-09 Pedro Alves <palves@redhat.com>
2167 * thread-db.c (find_new_threads_callback): Ignore thread if the
2168 kernel thread ID is -1.
2170 2015-01-09 Pedro Alves <palves@redhat.com>
2172 * linux-low.c (linux_attach_fail_reason_string): Move to
2173 nat/linux-ptrace.c, and rename.
2174 (linux_attach_lwp): Update comment.
2175 (attach_proc_task_lwp_callback): New function.
2176 (linux_attach): Adjust to rename and use
2177 linux_proc_attach_tgid_threads.
2178 (linux_attach_fail_reason_string): Delete declaration.
2180 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2182 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2183 * server.c (gdbserver_version): Likewise.
2185 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2187 * remote-utils.c: Include ctype.h.
2188 (input_interrupt): Explicitly handle the case when the char
2189 received is the NUL byte. Improve the printing of non-ASCII
2192 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2194 * linux-low.c (linux_low_filter_event): Update call to
2195 linux_enable_event_reporting following the addition of
2196 a new parameter to that function.
2198 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2201 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2202 (AARCH64_FPCR_REGNO): Likewise.
2203 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2204 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2205 (aarch64_store_fpregset): Likewise.
2207 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2209 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2210 Remove FIXME comment about assumption about N.
2212 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2214 * configure.ac: If large-file support is disabled in GDBserver,
2215 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2216 * configure: Regenerate.
2218 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2220 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2221 warning upon ENODATA from ptrace.
2222 * linux-s390-low.c (s390_store_tdb): New.
2223 (s390_regsets): Add regset for NT_S390_TDB.
2225 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2227 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2228 without a fill_function.
2229 * linux-s390-low.c (s390_fill_last_break): Remove.
2230 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2231 (s390_arch_setup): Use regset's size instead of fill_function for
2234 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2236 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2237 the regset's store function when ptrace returned an error.
2238 * regcache.c (get_thread_regcache): Invalidate register cache
2239 before fetching inferior's registers.
2241 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2243 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2244 while-loop as for-loop.
2245 (regsets_store_inferior_registers): Likewise.
2247 2014-11-28 Yao Qi <yao@codesourcery.com>
2249 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2250 * config.in, configure: Re-generate.
2251 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2254 2014-11-21 Yao Qi <yao@codesourcery.com>
2256 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2257 (AC_CHECK_HEADERS): Remove malloc.h.
2258 * configure: Re-generated.
2259 * config.in: Re-generated.
2260 * server.h: Don't include alloca.h and malloc.h.
2261 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2262 Don't include malloc.h.
2264 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2266 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2267 corresponding ERRNO check in same block.
2269 2014-11-12 Pedro Alves <palves@redhat.com>
2271 * server.c (cont_thread): Update comment.
2272 (start_inferior, attach_inferior): No longer clear cont_thread.
2273 (handle_v_cont): No longer set cont_thread.
2274 (captured_main): Clear cont_thread each time a GDB connects.
2276 2014-11-12 Pedro Alves <palves@redhat.com>
2278 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2279 thread, and don't resume all threads if the Hc thread has exited.
2281 2014-11-12 Pedro Alves <palves@redhat.com>
2283 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2284 the process group instead of to a specific LWP.
2286 2014-10-15 Pedro Alves <palves@redhat.com>
2289 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2291 (arm_set_thread_context): Delete.
2292 (the_low_target): Adjust.
2293 * win32-i386-low.c (debug_registers_changed)
2294 (debug_registers_used): Delete.
2295 (update_debug_registers_callback): New function.
2296 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2297 needing to update their debug registers.
2298 (win32_get_current_dr): New function.
2299 (x86_dr_low_get_addr, x86_dr_low_get_control)
2300 (x86_dr_low_get_status): Fetch the debug register from the thread
2302 (i386_initial_stuff): Adjust.
2303 (i386_get_thread_context): Remove current_event parameter. Don't
2304 clear debug_registers_changed nor copy DR values to
2306 (i386_set_thread_context): Delete.
2307 (i386_prepare_to_resume): New function.
2308 (i386_thread_added): Mark the thread as needing to update irs
2310 (the_low_target): Remove i386_set_thread_context and install
2311 i386_prepare_to_resume.
2312 * win32-low.c (win32_get_thread_context): Adjust.
2313 (win32_set_thread_context): Use SetThreadContext
2315 (win32_prepare_to_resume): New function.
2316 (win32_require_context): New function, factored out from ...
2317 (thread_rec): ... this.
2318 (continue_one_thread): Call win32_prepare_to_resume on each thread
2319 we're about to continue.
2320 (win32_resume): Call win32_prepare_to_resume on the event thread.
2321 * win32-low.h (struct win32_thread_info)
2322 <debug_registers_changed>: New field.
2323 (struct win32_target_ops): Change prototype of set_thread_context,
2324 delete set_thread_context and add prepare_to_resume.
2325 (win32_require_context): New declaration.
2327 2014-10-08 Gary Benson <gbenson@redhat.com>
2329 * server.h: Do not include common-exceptions.h.
2331 2014-10-08 Gary Benson <gbenson@redhat.com>
2333 * server.h: Do not include cleanups.h.
2335 2014-09-30 James Hogan <james.hogan@imgtec.com>
2337 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2340 2014-09-23 Yao Qi <yao@codesourcery.com>
2342 * linux-low.c (lp_status_maybe_breakpoint): New function.
2343 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2344 (count_events_callback): Likewise.
2345 (select_event_lwp_callback): Likewise.
2346 (cancel_breakpoints_callback): Likewise.
2348 2014-09-19 Don Breazeal <donb@codesourcery.com>
2350 * linux-low.c (handle_extended_wait): Call
2351 linux_ptrace_get_extended_event.
2352 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2353 linux_is_extended_waitstatus.
2355 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2357 * Makefile.in (CPPFLAGS): Define.
2358 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2359 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2361 2014-09-16 Gary Benson <gbenson@redhat.com>
2363 * inferiors.h (current_inferior): Renamed as...
2364 (current_thread): New variable. All uses updated.
2365 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2366 (maybe_move_out_of_jump_pad): Likewise.
2367 (cancel_breakpoint): Likewise.
2368 (linux_low_filter_event): Likewise.
2369 (wait_for_sigstop): Likewise.
2370 (linux_resume_one_lwp): Likewise.
2371 (need_step_over_p): Likewise.
2372 (start_step_over): Likewise.
2373 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2374 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2375 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2376 and save_inferior as saved_thread.
2377 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2379 (regcache_invalidate_thread): Likewise.
2380 * remote-utils.c (prepare_resume_reply): Likewise.
2381 * thread-db.c (thread_db_get_tls_address): Likewise.
2382 (disable_thread_event_reporting): Likewise.
2383 (remove_thread_event_breakpoints): Likewise.
2384 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2386 * target.h (set_desired_inferior): Renamed as...
2387 (set_desired_thread): New declaration. All uses updated.
2388 * server.c (myresume): Updated comment to reference thread instead
2390 (handle_serial_event): Likewise.
2391 (handle_target_event): Likewise.
2393 2014-09-12 Tom Tromey <tromey@redhat.com>
2394 Gary Benson <gbenson@redhat.com>
2396 * regcache.h: Include common-regcache.h.
2397 (regcache_read_pc): Don't declare.
2398 * regcache.c (get_thread_regcache_for_ptid): New function.
2400 2014-09-11 Tom Tromey <tromey@redhat.com>
2401 Gary Benson <gbenson@redhat.com>
2403 * symbol.c: New file.
2404 * Makefile.in (SFILES): Add symbol.c.
2405 (OBS): Add symbol.o.
2407 2014-09-11 Gary Benson <gbenson@redhat.com>
2409 * target.c (target_stop_ptid, target_continue_ptid): New
2412 2014-09-11 Tom Tromey <tromey@redhat.com>
2413 Gary Benson <gbenson@redhat.com>
2415 * target.h: Include target/target.h.
2416 * target.c (target_read_memory, target_read_uint32)
2417 (target_write_memory): New functions.
2419 2014-09-11 Gary Benson <gbenson@redhat.com>
2421 * server.h (debug_hw_points): Don't declare.
2422 * server.c (debug_hw_points): Don't define. Replace all uses
2423 with show_debug_regs.
2424 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2425 all uses with show_debug_regs.
2427 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2429 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2430 endianness into account.
2431 (ppc_supply_ptrace_register): Likewise.
2433 2014-09-03 James Hogan <james.hogan@imgtec.com>
2435 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2436 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2438 2014-09-03 Gary Benson <gbenson@redhat.com>
2440 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2441 ALL_DEBUG_ADDRESS_REGISTERS.
2443 2014-09-02 Gary Benson <gbenson@redhat.com>
2445 * i386-low.h: Renamed as...
2446 * x86-low.h: New file. All type, function and variable name
2447 prefixes changed from "i386_" to "x86_". All references updated.
2448 * i386-low.c: Renamed as...
2449 * x86-low.c: New file. All type, function and variable name
2450 prefixes changed from "i386_" to "x86_". All references updated.
2452 2014-09-02 Gary Benson <gbenson@redhat.com>
2454 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2455 (x86_linux_new_thread): Likewise.
2457 2014-08-29 Gary Benson <gbenson@redhat.com>
2459 * server.h (setjmp.h): Do not include.
2460 (toplevel): Do not declare.
2461 (common-exceptions.h): Include.
2462 (cleanups.h): Likewise.
2463 * server.c (toplevel): Do not define.
2464 (exit_code): New static global.
2465 (detach_or_kill_for_exit_cleanup): New function.
2466 (main): New function. Original main renamed to...
2467 (captured_main): New function.
2468 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2470 2014-08-29 Gary Benson <gbenson@redhat.com>
2472 * Makefile.in (SFILES): Add common/common-exceptions.c.
2473 (OBS): Add common-exceptions.o.
2474 (common-exceptions.o): New rule.
2475 * utils.c (prepare_to_throw_exception): New function.
2477 2014-08-29 Gary Benson <gbenson@redhat.com>
2479 * config.in: Regenerate.
2480 * configure: Likewise.
2482 2014-08-29 Gary Benson <gbenson@redhat.com>
2484 * Makefile.in (SFILES): Add common/cleanups.c.
2486 (cleanups.o): New rule.
2488 2014-08-29 Gary Benson <gbenson@redhat.com>
2490 * utils.c (internal_vwarning): New function.
2492 2014-08-28 Gary Benson <gbenson@redhat.com>
2494 * utils.h (fatal): Remove declaration.
2495 * utils.c (fatal): Remove function.
2497 2014-08-28 Gary Benson <gbenson@redhat.com>
2499 * tracepoint.c (gdb_agent_init): Replace fatal with
2501 (initialize_tracepoint): Likewise.
2503 2014-08-28 Gary Benson <gbenson@redhat.com>
2505 * remote-utils.c (remote_prepare): Replace fatal with error.
2507 2014-08-28 Gary Benson <gbenson@redhat.com>
2509 * linux-low.c (linux_async): Replace fatal with warning.
2511 (linux_start_non_stop): Return -1 if linux_async failed.
2513 2014-08-28 Gary Benson <gbenson@redhat.com>
2515 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2517 (i386_dr_low_get_addr): Remove vague comment.
2518 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2521 2014-08-28 Gary Benson <gbenson@redhat.com>
2523 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2524 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2526 (linux_resume_one_lwp): Likewise.
2527 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2529 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2530 with internal_error.
2531 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2532 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2533 (find_register_by_name): Replace fatal with internal_error.
2534 (find_regno): Likewise.
2535 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2536 * thread-db.c (thread_db_create_event): Likewise.
2537 (thread_db_load_search): Likewise.
2538 (try_thread_db_load_1): Likewise.
2539 * tracepoint.c (get_jump_space_head): Replace fatal with
2541 (claim_trampoline_space): Likewise.
2542 (have_fast_tracepoint_trampoline_buffer): Likewise.
2543 (cmd_qtstart): Likewise.
2544 (stop_tracing): Likewise.
2545 (fast_tracepoint_collecting): Likewise.
2546 (target_malloc): Likewise.
2547 (download_tracepoint): Likewise.
2548 (download_trace_state_variables): Replace check with gdb_assert.
2549 (upload_fast_traceframes): Replace fatal with internal_error.
2551 2014-08-19 Tom Tromey <tromey@redhat.com>
2552 Gary Benson <gbenson@redhat.com>
2554 * Makefile.in (SFILES): Add common/common-debug.c.
2555 (OBS): Add common-debug.o.
2556 (common-debug.o): New rule.
2557 * debug.h (debug_printf): Don't declare.
2558 * debug.c (debug_printf): Renamed and rewritten as...
2559 (debug_vprintf): New function.
2561 2014-08-19 Gary Benson <gbenson@redhat.com>
2563 * utils.h: Do not include print-utils.h.
2565 2014-08-19 Tom Tromey <tromey@redhat.com>
2566 Gary Benson <gbenson@redhat.com>
2568 * server.h: Add static assertion.
2569 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2571 2014-08-19 Tom Tromey <tromey@redhat.com>
2572 Gary Benson <gbenson@redhat.com>
2574 * Makefile.in (SFILES): Add common/errors.c.
2575 (OBS): Add errors.o.
2576 (IPA_OBS): Add errors-ipa.o.
2577 (errors.o): New rule.
2578 (errors-ipa.o): Likewise.
2579 * utils.h (perror_with_name, error, warning): Don't declare.
2580 * utils.c (warning): Renamed and rewritten as...
2581 (vwarning): New function.
2582 (error): Renamed and rewritten as...
2583 (verror): New function.
2584 (internal_error): Renamed and rewritten as...
2585 (internal_verror): New function.
2587 2014-08-07 Gary Benson <gbenson@redhat.com>
2589 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2590 * configure: Regenerate.
2591 * config.in: Likewise.
2592 * server.h: Do not include errno.h.
2593 * event-loop.c: Likewise.
2594 * hostio-errno.c: Likewise.
2595 * linux-low.c: Likewise.
2596 * remote-utils.c: Likewise.
2597 * spu-low.c: Likewise.
2598 * utils.c: Likewise.
2599 * gdbreplay.c: Unconditionally include errno.h.
2601 2014-08-07 Gary Benson <gbenson@redhat.com>
2603 * server.h: Do not include string.h.
2604 * event-loop.c: Likewise.
2605 * linux-low.c: Likewise.
2606 * regcache.c: Likewise.
2607 * remote-utils.c: Likewise.
2608 * spu-low.c: Likewise.
2609 * utils.c: Likewise.
2611 2014-08-07 Gary Benson <gbenson@redhat.com>
2613 * server.h: Do not include gdb_assert.h.
2615 2014-08-07 Gary Benson <gbenson@redhat.com>
2617 * server.h: Do not include common-utils.h.
2619 2014-08-07 Gary Benson <gbenson@redhat.com>
2621 * server.h: Do not include ptid.h.
2622 * notif.h: Likewise.
2624 2014-08-07 Gary Benson <gbenson@redhat.com>
2626 * server.h: Do not include gdb_locale.h.
2628 2014-08-07 Gary Benson <gbenson@redhat.com>
2630 * server.h: Do not include gdb/signals.h.
2631 * win32-low.c: Likewise.
2633 2014-08-07 Gary Benson <gbenson@redhat.com>
2635 * server.h: Do not include pathmax.h.
2637 2014-08-07 Gary Benson <gbenson@redhat.com>
2639 * server.h: Do not include libiberty.h.
2640 * linux-bfin-low.c: Likewise.
2642 2014-08-07 Gary Benson <gbenson@redhat.com>
2644 * server.h: Do not include ansidecl.h.
2646 2014-08-07 Gary Benson <gbenson@redhat.com>
2648 * linux-x86-low.c: Do not include stddef.h.
2649 * lynx-ppc-low.c: Likewise.
2650 * tracepoint.c: Likewise.
2652 2014-08-07 Gary Benson <gbenson@redhat.com>
2654 * server.h: Do not include stdarg.h.
2655 * nto-low.c: Likewise.
2657 2014-08-07 Gary Benson <gbenson@redhat.com>
2659 * server.h: Do not include stdlib.h.
2660 * inferiors.c: Likewise.
2661 * linux-low.c: Likewise.
2662 * regcache.c: Likewise.
2663 * spu-low.c: Likewise.
2664 * tracepoint.c: Likewise.
2665 * utils.c: Likewise.
2667 2014-08-07 Gary Benson <gbenson@redhat.com>
2669 * server.h: Do not include stdio.h.
2670 * linux-low.c: Likewise.
2671 * remote-utils.c: Likewise.
2672 * spu-low.c: Likewise.
2673 * utils.c: Likewise.
2674 * wincecompat.c: Likewise.
2676 2014-08-06 Gary Benson <gbenson@redhat.com>
2678 * regcache.c (init_register_cache): Move conditionals inside if.
2680 2014-08-06 Gary Benson <gbenson@redhat.com>
2682 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2684 2014-07-31 Gary Benson <gbenson@redhat.com>
2686 * ax.h: Do not include server.h.
2687 * gdbthread.h: Likewise.
2688 * lynx-low.h: Likewise.
2689 * notif.h: Likewise.
2691 2014-07-30 Gary Benson <gbenson@redhat.com>
2693 * server.h: Include common-defs.h.
2694 Do not include config.h or build-gnulib-gdbserver/config.h.
2696 2014-07-30 Gary Benson <gbenson@redhat.com>
2698 * hostio-errno.c: Move server.h to top of includes list.
2699 * inferiors.c: Likewise.
2700 * linux-x86-low.c: Likewise.
2701 * notif.c: Include server.h.
2703 2014-07-24 Tom Tromey <tromey@redhat.com>
2704 Gary Benson <gbenson@redhat.com>
2706 * server.h (CORE_ADDR): Now unsigned.
2708 2014-07-16 Pedro Alves <palves@redhat.com>
2710 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2712 2014-07-15 Pedro Alves <palves@redhat.com>
2714 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2717 2014-07-11 Pedro Alves <palves@redhat.com>
2719 * linux-low.c (kill_wait_lwp): New function, based on
2720 kill_one_lwp_callback, but use my_waitpid directly.
2721 (kill_one_lwp_callback, linux_kill): Use it.
2723 2014-06-23 Pedro Alves <palves@redhat.com>
2725 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2726 before setting DR0..DR3.
2728 2014-06-20 Gary Benson <gbenson@redhat.com>
2730 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2731 * configure: Regenerated.
2732 * config.in: Likewise.
2734 2014-06-20 Gary Benson <gbenson@redhat.com>
2736 * Makefile.in (SFILES): Update locations for files moved
2738 (object file files): Reordered.
2740 2014-06-20 Gary Benson <gbenson@redhat.com>
2742 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2743 (i386_dr_low_set_addr): Likewise.
2744 (i386_dr_low_get_addr): Likewise.
2745 (i386_dr_low_can_set_control): Likewise.
2746 (i386_dr_low_set_control): Likewise.
2747 (i386_dr_low_get_control): Likewise.
2748 (i386_dr_low_get_status): Likewise.
2749 (i386_get_debug_register_length): Likewise.
2750 * linux-x86-low.c (i386_dr_low_set_addr):
2751 Changed signature. Made static.
2752 (i386_dr_low_get_addr): Likewise.
2753 (i386_dr_low_set_control): Likewise.
2754 (i386_dr_low_get_control): Likewise.
2755 (i386_dr_low_get_status): Likewise.
2756 (i386_dr_low): New global variable.
2757 * win32-i386-low.c (i386_dr_low_set_addr):
2758 Changed signature. Made static.
2759 (i386_dr_low_get_addr): Likewise.
2760 (i386_dr_low_set_control): Likewise.
2761 (i386_dr_low_get_control): Likewise.
2762 (i386_dr_low_get_status): Likewise.
2763 (i386_dr_low): New global variable.
2765 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2767 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2768 * Makefile.in (AR, AR_FLAGS): Define.
2769 * configure: Regenerate.
2771 2014-06-19 Gary Benson <gbenson@redhat.com>
2773 * Makefile.in (i386-dregs.o): New rule.
2774 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2775 * i386-low.c (target.h): Remove include.
2776 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2777 (DR_CONTROL_SHIFT): Likewise.
2778 (DR_CONTROL_SIZE): Likewise.
2779 (DR_RW_EXECUTE): Likewise.
2780 (DR_RW_WRITE): Likewise.
2781 (DR_RW_READ): Likewise.
2782 (DR_RW_IORW): Likewise.
2783 (DR_LEN_1): Likewise.
2784 (DR_LEN_2): Likewise.
2785 (DR_LEN_4): Likewise.
2786 (DR_LEN_8): Likewise.
2787 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2788 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2789 (DR_ENABLE_SIZE): Likewise.
2790 (DR_LOCAL_SLOWDOWN): Likewise.
2791 (DR_GLOBAL_SLOWDOWN): Likewise.
2792 (DR_CONTROL_RESERVED): Likewise.
2793 (I386_DR_CONTROL_MASK): Likewise.
2794 (I386_DR_VACANT): Likewise.
2795 (I386_DR_LOCAL_ENABLE): Likewise.
2796 (I386_DR_GLOBAL_ENABLE): Likewise.
2797 (I386_DR_DISABLE): Likewise.
2798 (I386_DR_SET_RW_LEN): Likewise.
2799 (I386_DR_GET_RW_LEN): Likewise.
2800 (I386_DR_WATCH_HIT): Likewise.
2801 (i386_wp_op_t): Likewise.
2802 (i386_show_dr): Likewise.
2803 (i386_length_and_rw_bits): Likewise.
2804 (i386_insert_aligned_watchpoint): Likewise.
2805 (i386_remove_aligned_watchpoint): Likewise.
2806 (i386_handle_nonaligned_watchpoint): Likewise.
2807 i386_update_inferior_debug_regs(): Likewise.
2808 (i386_dr_insert_watchpoint): Likewise.
2809 (i386_dr_remove_watchpoint): Likewise.
2810 (i386_dr_region_ok_for_watchpoint): Likewise.
2811 (i386_dr_stopped_data_address): Likewise.
2812 (i386_dr_stopped_by_watchpoint): Likewise.
2814 2014-06-19 Gary Benson <gbenson@redhat.com>
2816 * i386-low.c (i386_dr_show): Renamed to
2817 i386_show_dr and made static. All uses updated.
2818 (i386_dr_length_and_rw_bits): Renamed to
2819 i386_length_and_rw_bits and made static.
2821 (i386_dr_insert_aligned_watchpoint): Renamed to
2822 i386_insert_aligned_watchpoint and made static.
2824 (i386_dr_remove_aligned_watchpoint): Renamed to
2825 i386_remove_aligned_watchpoint and made static.
2827 (i386_dr_update_inferior_debug_regs): Renamed to
2828 i386_update_inferior_debug_regs and made static.
2831 2014-06-18 Gary Benson <gbenson@redhat.com>
2833 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2834 (i386_dr_low_can_set_control): Likewise.
2835 (i386_get_debug_register_length): Likewise.
2836 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2837 (i386_dr_low_can_set_control): Likewise.
2838 (i386_get_debug_register_length): Likewise.
2840 2014-06-17 Gary Benson <gbenson@redhat.com>
2842 * i386-low.h (i386-dregs.h): New include.
2843 (DR_FIRSTADDR): Now in i386-dregs.h.
2844 (DR_LASTADDR): Likewise.
2845 (DR_NADDR): Likewise.
2846 (DR_STATUS): Likewise.
2847 (DR_CONTROL): Likewise.
2848 (i386_debug_reg_state): Likewise.
2849 (i386_dr_insert_watchpoint): Likewise.
2850 (i386_dr_remove_watchpoint): Likewise.
2851 (i386_dr_region_ok_for_watchpoint): Likewise.
2852 (i386_dr_stopped_data_address): Likewise.
2853 (i386_dr_stopped_by_watchpoint): Likewise.
2854 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2856 2014-06-18 Gary Benson <gbenson@redhat.com>
2858 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2859 i386_dr_insert_watchpoint.
2860 (i386_low_remove_watchpoint): Renamed to
2861 i386_dr_remove_watchpoint.
2862 (i386_low_region_ok_for_watchpoint): Renamed to
2863 i386_dr_region_ok_for_watchpoint.
2864 (i386_low_stopped_data_address): Renamed to
2865 i386_dr_stopped_data_address.
2866 (i386_low_stopped_by_watchpoint): Renamed to
2867 i386_dr_stopped_by_watchpoint.
2868 * i386-low.c (i386_show_dr): Renamed to
2869 i386_dr_show and made nonstatic. All uses updated.
2870 (i386_length_and_rw_bits): Renamed to
2871 i386_dr_length_and_rw_bits and made nonstatic.
2873 (i386_insert_aligned_watchpoint): Renamed to
2874 i386_dr_insert_aligned_watchpoint and made nonstatic.
2876 (i386_remove_aligned_watchpoint): Renamed to
2877 i386_dr_remove_aligned_watchpoint and made nonstatic.
2879 (i386_update_inferior_debug_regs): Renamed to
2880 i386_dr_update_inferior_debug_regs and made nonstatic.
2882 (i386_low_insert_watchpoint): Renamed to
2883 i386_dr_insert_watchpoint. All uses updated.
2884 (i386_low_remove_watchpoint): Renamed to
2885 i386_dr_remove_watchpoint. All uses updated.
2886 (i386_low_region_ok_for_watchpoint): Renamed to
2887 i386_dr_region_ok_for_watchpoint. All uses updated.
2888 (i386_low_stopped_data_address): Renamed to
2889 i386_dr_stopped_data_address. All uses updated.
2890 (i386_low_stopped_by_watchpoint): Renamed to
2891 i386_dr_stopped_by_watchpoint. All uses updated.
2893 2014-06-18 Gary Benson <gbenson@redhat.com>
2895 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2896 (i386_dr_low_can_set_control): Likewise.
2897 (i386_insert_aligned_watchpoint): New check.
2899 2014-06-18 Gary Benson <gbenson@redhat.com>
2901 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2904 2014-06-18 Gary Benson <gbenson@redhat.com>
2906 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2907 instead of fatal and error.
2908 (i386_handle_nonaligned_watchpoint): Likewise.
2910 2014-06-18 Gary Benson <gbenson@redhat.com>
2912 * i386-low.c (i386_get_debug_register_length): New macro.
2913 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2914 (i386_show_dr): Use debug_printf instead of fprintf. Use
2915 phex to format values.
2917 2014-06-18 Gary Benson <gbenson@redhat.com>
2919 * i386-low.h: Comment changes.
2920 * i386-low.c: Likewise.
2922 2014-06-18 Gary Benson <gbenson@redhat.com>
2924 * i386-low.c: Whitespace changes.
2926 2014-06-12 Tom Tromey <tromey@redhat.com>
2928 * utils.c (freeargv): Remove.
2930 2014-06-12 Tom Tromey <tromey@redhat.com>
2932 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2933 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2934 (parse_debug_format_options): Likewise.
2935 (gdbserver_usage): Likewise.
2936 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2937 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2938 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2940 ($(LIBGNU)): Depend on libiberty.
2941 (all-lib): Recurse into all subdirs.
2942 (install-only): Invoke "install" target in subdirs.
2943 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2945 * configure: Rebuild.
2946 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2947 for vasprintf, vsnprintf, or gettimeofday.
2948 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2951 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2953 * development.sh: Delete.
2954 * Makefile.in (config.status): Adjust dependency on development.sh.
2955 * configure.ac: Adjust development.sh source call.
2956 * configure: Regenerate.
2958 2014-06-02 Pedro Alves <palves@redhat.com>
2960 * ax.c (gdb_free_agent_expr): New function.
2961 * ax.h (gdb_free_agent_expr): New declaration.
2962 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2964 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2966 (clear_breakpoint_conditions_and_commands): New function.
2967 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2968 (clear_breakpoint_conditions_and_commands): New declaration.
2970 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2972 * linux-aarch64-low.c (asm/ptrace.h): Include.
2974 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2976 Fix TLS access for -static -pthread.
2977 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2978 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2979 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2981 2014-05-20 Pedro Alves <palves@redhat.com>
2983 * linux-aarch64-low.c (aarch64_insert_point)
2984 (aarch64_remove_point): No longer check whether the type is
2985 supported here. Adjust to new interface.
2986 (the_low_target): Install aarch64_supports_z_point_type as
2987 supports_z_point_type method.
2988 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2989 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2990 instead of a Z packet char. Adjust.
2991 (arm_supports_z_point_type): New function.
2992 (arm_insert_point, arm_remove_point): Adjust to new interface.
2993 (the_low_target): Install arm_supports_z_point_type.
2994 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2995 (cris_insert_point, cris_remove_point): Adjust to new interface.
2996 Don't check whether the type is supported here.
2997 (the_low_target): Install cris_supports_z_point_type.
2998 * linux-low.c (linux_supports_z_point_type): New function.
2999 (linux_insert_point, linux_remove_point): Adjust to new interface.
3000 * linux-low.h (struct linux_target_ops) <insert_point,
3001 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3002 raw_breakpoint pointer parameter.
3003 <supports_z_point_type>: New method.
3004 * linux-mips-low.c (mips_supports_z_point_type): New function.
3005 (mips_insert_point, mips_remove_point): Adjust to new interface.
3006 Use mips_supports_z_point_type.
3007 (the_low_target): Install mips_supports_z_point_type.
3008 * linux-ppc-low.c (the_low_target): Install NULL as
3009 supports_z_point_type method.
3010 * linux-s390-low.c (the_low_target): Install NULL as
3011 supports_z_point_type method.
3012 * linux-sparc-low.c (the_low_target): Install NULL as
3013 supports_z_point_type method.
3014 * linux-x86-low.c (x86_supports_z_point_type): New function.
3015 (x86_insert_point): Adjust to new insert_point interface. Use
3016 insert_memory_breakpoint. Adjust to new
3017 i386_low_insert_watchpoint interface.
3018 (x86_remove_point): Adjust to remove_point interface. Use
3019 remove_memory_breakpoint. Adjust to new
3020 i386_low_remove_watchpoint interface.
3021 (the_low_target): Install x86_supports_z_point_type.
3022 * lynx-low.c (lynx_target_ops): Install NULL as
3023 supports_z_point_type callback.
3024 * nto-low.c (nto_supports_z_point_type): New.
3025 (nto_insert_point, nto_remove_point): Adjust to new interface.
3026 (nto_target_ops): Install nto_supports_z_point_type.
3027 * mem-break.c: Adjust intro comment.
3028 (struct raw_breakpoint) <raw_type, size>: New fields.
3029 <inserted>: Update comment.
3030 <shlib_disabled>: Delete field.
3031 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3032 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3033 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3034 (raw_bkpt_type_to_target_hw_bp_type): New function.
3035 (find_enabled_raw_code_breakpoint_at): New function.
3036 (find_raw_breakpoint_at): New type and size parameters. Use them.
3037 (insert_memory_breakpoint): New function, based off
3038 set_raw_breakpoint_at.
3039 (remove_memory_breakpoint): New function.
3040 (set_raw_breakpoint_at): Reimplement.
3041 (set_breakpoint): New, based on set_breakpoint_at.
3042 (set_breakpoint_at): Reimplement.
3043 (delete_raw_breakpoint): Go through the_target->remove_point
3044 instead of assuming memory breakpoints.
3045 (find_gdb_breakpoint_at): Delete.
3046 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3047 (find_gdb_breakpoint): New function.
3048 (set_gdb_breakpoint_at): Delete.
3049 (z_type_supported): New function.
3050 (set_gdb_breakpoint_1): New function, loosely based off
3051 set_gdb_breakpoint_at.
3052 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3053 (delete_gdb_breakpoint_at): Delete.
3054 (delete_gdb_breakpoint_1): New function, loosely based off
3055 delete_gdb_breakpoint_at.
3056 (delete_gdb_breakpoint): New function.
3057 (clear_gdb_breakpoint_conditions): Rename to ...
3058 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3060 (add_condition_to_breakpoint): Make static.
3061 (add_breakpoint_condition): Take a struct breakpoint pointer
3062 instead of an address. Adjust.
3063 (gdb_condition_true_at_breakpoint): Rename to ...
3064 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3066 (gdb_condition_true_at_breakpoint): Reimplement.
3067 (add_breakpoint_commands): Take a struct breakpoint pointer
3068 instead of an address. Adjust.
3069 (gdb_no_commands_at_breakpoint): Rename to ...
3070 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3071 parameter. Return true if no breakpoint was found. Change debug
3073 (gdb_no_commands_at_breakpoint): Reimplement.
3074 (run_breakpoint_commands): Rename to ...
3075 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3076 and change return type to boolean.
3077 (run_breakpoint_commands): New function.
3078 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3079 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3080 breakpoint. Go through the_target->remove_point instead of
3081 assuming memory breakpoint.
3082 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3083 software and hardware breakpoints.
3084 (reinsert_raw_breakpoint): Go through the_target->insert_point
3085 instead of assuming memory breakpoint.
3086 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3087 software and hardware breakpoints.
3088 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3089 Check both software and hardware breakpoints.
3090 (validate_inserted_breakpoint): Assert the breakpoint is a
3091 software breakpoint. Set the inserted flag to -1 instead of
3092 setting shlib_disabled.
3093 (delete_disabled_breakpoints): Adjust.
3094 (validate_breakpoints): Only validate software breakpoints.
3095 Adjust to inserted flag change.
3096 (check_mem_read, check_mem_write): Skip breakpoint types other
3097 than software breakpoints. Adjust to inserted flag change.
3098 * mem-break.h (enum raw_bkpt_type): New enum.
3099 (raw_breakpoint, struct process_info): Forward declare.
3100 (Z_packet_to_target_hw_bp_type): Delete declaration.
3101 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3102 (set_gdb_breakpoint, delete_gdb_breakpoint)
3103 (clear_breakpoint_conditions): New declarations.
3104 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3105 (breakpoint_inserted_here): Update comment.
3106 (add_breakpoint_condition, add_breakpoint_commands): Replace
3107 address parameter with a breakpoint pointer parameter.
3108 (gdb_breakpoint_here): Update comment.
3109 (delete_gdb_breakpoint_at): Delete.
3110 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3111 * server.c (process_point_options): Take a struct breakpoint
3112 pointer instead of an address. Adjust.
3113 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3114 delete_gdb_breakpoint.
3115 * spu-low.c (spu_target_ops): Install NULL as
3116 supports_z_point_type method.
3117 * target.h: Include mem-break.h.
3118 (struct target_ops) <prepare_to_access_memory>: Update comment.
3119 <supports_z_point_type>: New field.
3120 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3121 instead of a char. Also take a raw breakpoint pointer.
3122 * win32-arm-low.c (the_low_target): Install NULL as
3123 supports_z_point_type.
3124 * win32-i386-low.c (i386_supports_z_point_type): New function.
3125 (i386_insert_point, i386_remove_point): Adjust to new interface.
3126 (the_low_target): Install i386_supports_z_point_type.
3127 * win32-low.c (win32_supports_z_point_type): New function.
3128 (win32_insert_point, win32_remove_point): Adjust to new interface.
3129 (win32_target_ops): Install win32_supports_z_point_type.
3130 * win32-low.h (struct win32_target_ops):
3131 <supports_z_point_type>: New method.
3132 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3133 instead of a char. Also take a raw breakpoint pointer.
3135 2014-05-20 Pedro Alves <palves@redhat.com>
3137 * mem-break.h: Include break-common.h.
3138 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3139 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3140 (Z_packet_to_target_hw_bp_type): New declaration.
3141 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3142 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3143 (Z_PACKET_ACCESS_WP): Delete macros.
3144 (Z_packet_to_hw_type): Delete function.
3145 * i386-low.h: Don't include break-common.h here.
3146 (Z_packet_to_hw_type): Delete declaration.
3147 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3148 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3149 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3150 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3151 * linux-aarch64-low.c: Don't include break-common.h here.
3152 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3153 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3154 (Z_packet_to_target_hw_bp_type): Delete function.
3155 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3157 (mips_insert_point, mips_remove_point): Use
3158 Z_packet_to_target_hw_bp_type.
3160 2014-05-20 Pedro Alves <palves@redhat.com>
3162 * linux-aarch64-low.c: Include break-common.h.
3163 (enum target_point_type): Delete.
3164 (Z_packet_to_point_type): Rename to ...
3165 (Z_packet_to_target_hw_bp_type): ... this, and return a
3166 target_hw_bp_type instead.
3167 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3168 instead of an enum target_point_type.
3169 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3171 (aarch64_dr_state_insert_one_point)
3172 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3173 (aarch64_handle_aligned_watchpoint)
3174 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3175 Take an enum target_hw_bp_type instead of an enum
3177 (aarch64_supports_z_point_type): New function.
3178 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3179 use Z_packet_to_target_hw_bp_type.
3181 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3183 * configure.ac: Only use -Werror by default when DEVELOPMENT
3185 * configure: Regenerate.
3187 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3189 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3190 * linux-x86-low.c (X86_64_USER_REGS): New.
3191 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3193 2014-04-28 Yao Qi <yao@codesourcery.com>
3195 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3198 2014-04-25 Pedro Alves <palves@redhat.com>
3201 * linux-low.c (linux_attach_fail_reason_string): New function.
3202 (linux_attach_lwp): Delete.
3203 (linux_attach_lwp_1): Rename to ...
3204 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3205 argument. Remove "initial" parameter. Return int instead of
3206 void. Don't error or warn here.
3207 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3208 failure to attach to the tgid. Call warning when failing to
3210 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3211 argument. Remove "initial" parameter. Return int instead of
3212 void. Don't error or warn here.
3213 (linux_attach_fail_reason_string): New declaration.
3214 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3215 interface change. Use linux_attach_fail_reason_string.
3217 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3218 Walfred Tedeschi <walfred.tedeschi@intel.com>
3220 * Makefile.in: Added rules to handle new files
3221 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3222 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3223 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3224 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3225 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3226 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3228 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3229 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3230 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3231 i386/x32-avx512.xml.
3232 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3233 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3234 i386/x32-avx512-linux.xml.
3235 * i387-fp.c (num_avx512_k_registers): New constant for number
3237 (num_avx512_zmmh_low_registers): New constant for number of
3238 lower ZMM registers (0-15).
3239 (num_avx512_zmmh_high_registers): New constant for number of
3240 higher ZMM registers (16-31).
3241 (num_avx512_ymmh_registers): New contant for number of higher
3242 YMM registers (ymm16-31 added by avx521 on x86_64).
3243 (num_avx512_xmm_registers): New constant for number of higher
3244 XMM registers (xmm16-31 added by AVX512 on x86_64).
3245 (struct i387_xsave): Add space for AVX512 registers.
3246 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3247 Add code to handle AVX512 registers.
3248 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3249 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3250 prototypei from generated file.
3251 (tdesc_amd64_avx512_linux): Likewise.
3252 (init_registers_x32_avx512_linux): Likewise.
3253 (tdesc_x32_avx512_linux): Likewise.
3254 (init_registers_i386_avx512_linux): Likewise.
3255 (tdesc_i386_avx512_linux): Likewise.
3256 (x86_64_regmap): Add AVX512 registers.
3257 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3259 (initialize_low_arch): Add code to initialize AVX512 registers.
3261 2014-04-23 Pedro Alves <palves@redhat.com>
3263 * mem-break.c (find_gdb_breakpoint_at): Make static.
3264 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3266 2014-04-23 Pedro Alves <palves@redhat.com>
3268 * i386-low.c: Don't include break-common.h here.
3269 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3270 prototype to take target_hw_bp_type as argument instead of a Z
3272 * i386-low.h: Include break-common.h here.
3273 (Z_packet_to_hw_type): Declare.
3274 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3276 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3277 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3278 (x86_remove_point): Convert the packet number to a
3279 target_hw_bp_type before calling i386_low_remove_watchpoint.
3280 * win32-i386-low.c (i386_insert_point): Convert the packet number
3281 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3282 (i386_remove_point): Convert the packet number to a
3283 target_hw_bp_type before calling i386_low_remove_watchpoint.
3285 2014-04-23 Pedro Alves <palves@redhat.com>
3287 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3289 2014-04-10 Pedro Alves <palves@redhat.com>
3291 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3292 Check if the condition or command is NULL before checking if the
3293 breakpoint is known. On success, return true.
3294 * mem-break.h (add_breakpoint_condition): Document return.
3295 (add_breakpoint_commands): Add describing comment.
3296 * server.c (skip_to_semicolon): New function.
3297 (process_point_options): Use it.
3299 2014-04-09 Pedro Alves <palves@redhat.com>
3301 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3304 2014-02-27 Pedro Alves <palves@redhat.com>
3307 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3309 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3311 (last_thread_of_process_p): Take a PID argument instead of a
3313 (linux_wait_for_lwp): Delete.
3314 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3316 (linux_low_filter_event): New function, party factored out from
3317 linux_wait_for_event.
3318 (linux_wait_for_event): Rename to ...
3319 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3320 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3321 sigsuspend. Check for zombie leaders.
3322 (linux_wait_for_event): Reimplement as wrapper around
3323 linux_wait_for_event_filtered.
3324 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3325 a normal or signal exit is seen, it's the whole process exiting.
3326 (wait_for_sigstop): No longer a for_each_inferior callback.
3327 Rewrite on top of linux_wait_for_event_filtered.
3328 (stop_all_lwps): Call wait_for_sigstop directly.
3329 * server.c (resume, handle_target_event): Handle
3330 TARGET_WAITKIND_NO_RESUMED.
3332 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3334 * win32-low.c (psapi_get_dll_name,
3335 * win32_CreateToolhelp32Snapshot): Delete.
3336 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3337 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3339 (handle_load_dll): Add function description.
3340 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3342 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3344 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3346 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3347 base address when calling win32_add_one_solib.
3348 (handle_load_dll): Delete local variable load_addr.
3349 Remove 0x1000 offset applied to DLL base address when calling
3350 win32_add_one_solib.
3351 (handle_unload_dll): Add comment.
3353 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3355 * win32-low.c (win32_add_all_dlls): Renames
3356 win32_ensure_ntdll_loaded. Rewrite function documentation.
3357 Adjust implementation to always load all DLLs.
3358 Add 0x1000 offset to DLL base address when calling
3359 win32_add_one_solib.
3360 (child_initialization_done): New static global.
3361 (do_initial_child_stuff): Set child_initialization_done to
3362 zero during child initialization, and 1 after. Replace call
3363 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3365 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3366 (handle_unload_dll): Add function documentation.
3367 (get_child_debug_event): Ignore load and unload DLL events
3368 during child initialization.
3370 2014-02-20 Doug Evans <dje@google.com>
3372 Remove global all_lwps.
3373 * inferiors.h (ptid_of): Move here from linux-low.h.
3374 (pid_of, lwpid_of): Ditto.
3375 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3376 parameter is a struct thread_info * now.
3377 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3378 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3379 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3381 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3382 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3383 * linux-arm-low.c (update_registers_callback): Update, "entry"
3384 parameter is a struct thread_info * now.
3385 Fetch lwpid from current_inferior directly.
3386 (arm_insert_point): Pass &all_threads to find_inferior instead of
3388 (arm_remove_point): Ditto.
3389 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3390 (arm_prepare_to_resume): Fetch pid from thread.
3391 (arm_read_description): Fetch lwpid from current_inferior directly.
3392 * linux-low.c (all_lwps): Delete.
3393 (delete_lwp): Delete call to remove_inferior.
3394 (handle_extended_wait): Fetch lwpid from thread.
3395 (add_lwp): Don't set lwp->entry.id. Remove call to
3396 add_inferior_to_list.
3397 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3398 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3399 (kill_one_lwp_callback): Ditto.
3400 (linux_kill): Don't dereference NULL pointer.
3401 Fetch ptid,lwpid from thread.
3402 (get_detach_signal): Fetch ptid from thread.
3403 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3404 Simplify call to regcache_invalidate_thread.
3405 (delete_lwp_callback): Update, "entry" parameter is a
3406 struct thread_info * now. Fetch pid from thread.
3407 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3408 (status_pending_p_callback): Update, "entry" parameter is a
3409 struct thread_info * now. Fetch ptid from thread.
3410 (find_lwp_pid): Update, "entry" parameter is a
3411 struct thread_info * now.
3412 (linux_wait_for_lwp): Fetch pid from thread.
3413 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3414 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3415 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3416 (dequeue_one_deferred_signal): Ditto.
3417 (cancel_breakpoint): Fetch ptid from current_inferior.
3418 (linux_wait_for_event): Pass &all_threads to find_inferior,
3419 not &all_lwps. Fetch ptid, lwpid from thread.
3420 (count_events_callback): Update, "entry" parameter is a
3421 struct thread_info * now.
3422 (select_singlestep_lwp_callback): Ditto.
3423 (select_event_lwp_callback): Ditto.
3424 (cancel_breakpoints_callback): Ditto.
3425 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3427 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3428 (unsuspend_one_lwp): Update, "entry" parameter is a
3429 struct thread_info * now.
3430 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3432 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3433 Fetch lwpid from thread, not lwp.
3434 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3435 Pass &all_threads to find_inferior, not &all_lwps.
3436 (send_sigstop): Fetch lwpid from thread, not lwp.
3437 (send_sigstop_callback): Update, "entry" parameter is a
3438 struct thread_info * now.
3439 (suspend_and_send_sigstop_callback): Ditto.
3440 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3441 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3442 struct thread_info * now.
3443 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3445 (lwp_running): Update, "entry" parameter is a
3446 struct thread_info * now.
3447 (stop_all_lwps): Fetch ptid from thread.
3448 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3449 (linux_resume_one_lwp): Fetch lwpid from thread.
3450 (linux_set_resume_request): Update, "entry" parameter is a
3451 struct thread_info * now. Fetch pid, lwpid from thread.
3452 (resume_status_pending_p): Update, "entry" parameter is a
3453 struct thread_info * now.
3454 (need_step_over_p): Ditto. Fetch lwpid from thread.
3455 (start_step_over): Fetch lwpid from thread.
3456 (linux_resume_one_thread): Update, "entry" parameter is a
3457 struct thread_info * now. Fetch lwpid from thread.
3458 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3459 (proceed_one_lwp): Update, "entry" parameter is a
3460 struct thread_info * now. Fetch lwpid from thread.
3461 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3462 struct thread_info * now.
3463 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3464 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3465 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3467 (regsets_store_inferior_registers): Ditto.
3468 (fetch_register, store_register): Ditto.
3469 (linux_read_memory, linux_write_memory): Ditto.
3470 (linux_request_interrupt): Ditto.
3471 (linux_read_auxv): Ditto.
3472 (linux_xfer_siginfo): Ditto.
3473 (linux_qxfer_spu): Ditto.
3474 (linux_qxfer_libraries_svr4): Ditto.
3475 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3476 moved to inferiors.h.
3478 (get_thread_lwp): Update.
3479 (struct lwp_info): Delete member "entry". Simplify comment for
3482 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3483 current_inferior directly.
3484 (update_watch_registers_callback): Update, "entry" parameter is a
3485 struct thread_info * now. Fetch pid from thread.
3486 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3487 (mips_insert_point): Fetch lwpid from current_inferior.
3488 Pass &all_threads to find_inferior, not &all_lwps.
3489 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3490 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3492 (mips_stopped_data_address): Ditto.
3493 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3495 * linux-tile-low.c (tile_arch_setup): Ditto.
3496 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3497 (update_debug_registers_callback): Update, "entry" parameter is a
3498 struct thread_info * now. Fetch pid from thread.
3499 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3500 Pass &all_threads to find_inferior, not &all_lwps.
3501 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3502 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3503 Pass &all_threads to find_inferior, not &all_lwps.
3504 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3505 (i386_dr_low_get_status): Ditto.
3506 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3507 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3508 (x86_linux_read_description): Ditto.
3509 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3511 2014-02-20 Doug Evans <dje@google.com>
3513 * inferiors.c (get_first_inferior): Fix buglet.
3515 2014-02-19 Doug Evans <dje@google.com>
3517 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3518 * inferiors.c (add_thread): Change result type to struct thread_info *.
3519 All callers updated.
3520 (add_lwp): Call add_thread here instead of in callers.
3521 All callers updated.
3522 * linux-low.h (get_lwp_thread): Rewrite.
3523 (struct lwp_info): New member "thread".
3525 2014-02-19 Doug Evans <dje@google.com>
3527 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3528 All callers updated.
3530 2014-02-19 Doug Evans <dje@google.com>
3532 * inferiors.c (add_thread): Fix whitespace.
3534 2014-02-19 Doug Evans <dje@google.com>
3536 * dll.c (clear_dlls): Replace accessing list implemention details
3538 * gdbthread.h (get_first_thread): Declare.
3539 * inferiors.c (for_each_inferior_with_data): New function.
3540 (get_first_thread): New function.
3541 (find_thread_ptid): Simplify.
3542 (get_first_inferior): New function.
3543 (clear_list): Delete.
3544 (one_inferior_p): New function.
3545 (clear_inferior_list): New function.
3546 (clear_inferiors): Update.
3547 * inferiors.h (for_each_inferior_with_data): Declare.
3548 (clear_inferior_list): Declare.
3549 (one_inferior_p): Declare.
3550 (get_first_inferior): Declare.
3551 * linux-low.c (linux_wait_for_event): Replace accessing list
3552 implemention details with API function.
3553 * server.c (target_running): Ditto.
3554 (accumulate_file_name_length): New function.
3555 (emit_dll_description): New function.
3556 (handle_qxfer_libraries): Replace accessing list implemention
3557 details with API function.
3558 (handle_qxfer_threads_worker): New function.
3559 (handle_qxfer_threads_proper): Replace accessing list implemention
3560 details with API function.
3561 (handle_query): Ditto.
3562 (visit_actioned_threads_callback_ftype): New typedef.
3563 (visit_actioned_threads_data): New struct.
3564 (visit_actioned_threads): Rewrite to be find_inferior callback.
3565 (resume): Call find_inferior.
3566 (handle_status): Replace accessing list implemention
3567 details with API function.
3568 (process_serial_event): Replace accessing list implemention details
3570 * target.c (set_desired_inferior): Replace accessing list implemention
3571 details with API function.
3572 * tracepoint.c (same_process_p): New function.
3573 (gdb_agent_about_to_close): Replace accessing list implemention
3574 details with API function.
3575 * win32-low.c (child_delete_thread): Replace accessing list
3576 implemention details with API function.
3577 (match_dll_by_basename): New function.
3578 (dll_is_loaded_by_basename): New function.
3579 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3580 details call to dll_is_loaded_by_basename.
3582 2014-02-19 Doug Evans <dje@google.com>
3584 * dll.h (struct dll_info): Add comment.
3585 * gdbthread.h (struct thread_info): Add comment.
3586 (current_ptid): Simplify.
3587 * inferiors.c (add_process): Update.
3588 (remove_process): Update.
3589 * inferiors.h (struct process_info): Rename member "head" to "entry".
3590 * linux-low.c (delete_lwp): Update.
3592 (last_thread_of_process_p): Update.
3593 (kill_one_lwp_callback, linux_kill): Update.
3594 (status_pending_p_callback): Update.
3595 (wait_for_sigstop): Update. Simplify read of ptid.
3596 (start_step_over): Update.
3597 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3598 (get_lwp_thread): Update.
3599 (struct lwp_info): Rename member "head" to "entry".
3600 * regcache.h (inferior_list_entry): Delete.
3601 * server.c (kill_inferior_callback): Update.
3602 (detach_or_kill_inferior_callback): Update.
3603 (print_started_pid): Update.
3604 (print_attached_pid): Update.
3605 (process_serial_event): Simplify read of ptid.
3606 * thread-db.c (thread_db_create_event): Update.
3607 (thread_db_get_tls_address): Update.
3608 * win32-low.c (current_inferior_ptid): Simplify.
3610 2014-02-19 Tom Tromey <tromey@redhat.com>
3612 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3614 (target_supports_btrace): Update.
3616 2014-02-14 Yao Qi <yao@codesourcery.com>
3618 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3619 (rsp-low-ipa.o): New target.
3621 2014-02-12 Tom Tromey <tromey@redhat.com>
3623 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3624 convert_ascii_to_int.
3625 * regcache.c (registers_to_string): Likewise.
3626 * remote-utils.c (decode_M_packet): Likewise.
3627 * server.c (process_serial_event): Likewise.
3629 2014-02-12 Tom Tromey <tromey@redhat.com>
3631 * server.c (handle_query, handle_v_run): Use hex2bin, not
3633 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3635 2014-02-12 Tom Tromey <tromey@redhat.com>
3637 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3638 convert_int_to_ascii.
3639 * regcache.c (registers_to_string, collect_register_as_string):
3641 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3643 * server.c (process_serial_event): Likewise.
3644 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3645 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3647 2014-02-12 Tom Tromey <tromey@redhat.com>
3649 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3650 bin2hex, not hexify.
3651 * tracepoint.c (cmd_qtstatus): Likewise.
3653 2014-02-12 Tom Tromey <tromey@redhat.com>
3655 * remote-utils.c (monitor_output): Pass explicit length to
3658 2014-02-12 Tom Tromey <tromey@redhat.com>
3660 * tracepoint.c: Include rsp-low.h.
3661 * server.c: Include rsp-low.h.
3662 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3663 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3665 * remote-utils.c: Include rsp-low.h.
3666 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3667 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3668 (convert_int_to_ascii, convert_ascii_to_int): Move to
3670 * regcache.c: Include rsp-low.h.
3671 * ax.c: Include rsp-low.h.
3672 * Makefile.in (SFILES): Add common/rsp-low.c.
3673 (OBS): Add rsp-low.o.
3674 (rsp-low.o): New target.
3676 2014-02-12 Tom Tromey <tromey@redhat.com>
3678 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3679 Include print-utils.h.
3680 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3681 (plongest, thirty_two, phex_nz): Remove.
3682 * Makefile.in (SFILES): Add common/print-utils.c.
3683 (OBS): Add print-utils.o.
3684 (print-utils-ipa.o): New target.
3685 (print-utils.o): New target.
3686 (IPA_OBJS): Add print-utils-ipa.o.
3688 2014-02-06 Tom Tromey <tromey@redhat.com>
3690 * Makefile.in (SFILES): Fix indentation.
3692 2014-02-05 Doug Evans <dje@google.com>
3694 * linux-low.c (linux_wait_for_event): Improve comment.
3695 (linux_wait_1): Keep current_inferior in sync with event_child.
3697 2014-01-22 Doug Evans <dje@google.com>
3699 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3701 2014-01-22 Doug Evans <dje@google.com>
3703 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3704 * configure: Regenerate.
3705 * config.in: Regenerate.
3706 * Makefile.in (SFILES): Add debug.c.
3708 * debug.c: New file.
3709 * debug.h: New file.
3710 * linux-aarch64-low.c (*): Update all debugging printfs to use
3711 debug_printf instead of fprintf.
3712 * linux-arm-low.c (*): Ditto.
3713 * linux-cris-low.c (*): Ditto.
3714 * linux-crisv32-low.c (*): Ditto.
3715 * linux-m32r-low.c (*): Ditto.
3716 * linux-sparc-low.c (*): Ditto.
3717 * linux-x86.c (*): Ditto.
3718 * linux-low.c (*): Ditto.
3719 (linux_wait_1): Add calls to debug_enter, debug_exit.
3720 (linux_wait): Remove redundant debugging printf.
3721 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3722 (linux_resume, unstop_all_lwps): Ditto.
3723 * mem-break.c (*): Update all debugging printfs to use
3724 debug_printf instead of fprintf.
3725 * remote-utils.c (*): Ditto.
3726 * thread-db.c (*): Ditto.
3727 * server.c #include <ctype.h>, "gdb_vecs.h".
3728 (debug_threads): Moved to debug.c.
3729 (*): Update all debugging printfs to use debug_printf instead of
3731 (start_inferior): Replace call to fflush with call to debug_flush.
3732 (monitor_show_help): Mention set debug-format.
3733 (parse_debug_format_options): New function.
3734 (handle_monitor_command): Handle "monitor set debug-format".
3735 (gdbserver_usage): Mention --debug-format.
3736 (main): Parse --debug-format.
3737 * server.h (debug_threads): Declaration moved to debug.h.
3739 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3740 trace_debug_1 that uses debug_printf.
3741 (tracepoint_look_up_symbols): Update all debugging printfs to use
3742 debug_printf instead of fprintf.
3744 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3746 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3749 2014-01-17 Pedro Alves <palves@redhat.com>
3752 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3753 defined after including gdb_proc_service.h.
3755 2014-01-16 Doug Evans <dje@google.com>
3757 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3758 (match_dll): Use it.
3760 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3762 * target.h (target_ops) <read_btrace>: Change parameters and
3763 return type to allow error reporting.
3764 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3765 trace reading errors on.
3766 * linux-low.c (linux_low_read_btrace): Pass trace reading
3768 (linux_low_disable_btrace): New.
3770 2014-01-15 Doug Evans <dje@google.com>
3772 * inferiors.c (thread_id_to_gdb_id): Delete.
3773 * inferiors.h (thread_id_to_gdb_id): Delete.
3775 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3777 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3778 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3781 2014-01-08 Pedro Alves <palves@redhat.com>
3783 * server.c (handle_status): Don't discard previous queued stop
3784 replies or thread's pending status here.
3785 (main) <disconnection>: Do it here instead.
3787 2014-01-08 Pedro Alves <palves@redhat.com>
3789 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3790 * server.c (visit_actioned_threads, handle_pending_status): New
3792 (handle_v_cont): Factor out parts to ...
3793 (resume): ... this new function. If in all-stop, and a thread
3794 being resumed has a pending status, report it without actually
3796 (myresume): Adjust to use the new 'resume' function.
3797 (clear_pending_status_callback, set_pending_status_callback)
3798 (find_status_pending_thread_callback): New functions.
3799 (handle_status): Handle the case of multiple threads having
3800 interesting statuses to report. Report threads' real last signal
3801 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3802 with an interesting thread to report the status for, instead of
3803 always reporting the status of the first thread.
3805 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3807 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3808 * gdbreplay.c (gdbreplay_version): Likewise.
3810 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3812 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3813 iov.iov_len with the real length in use.
3815 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3817 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3818 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3819 for all targets that use win32-low.c.
3820 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3821 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3823 2013-12-13 Pedro Alves <palves@redhat.com>
3825 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3826 if equal to TARGET_WAITKIND_LOADED.
3827 * win32-low.c (cached_status): New static global.
3828 (win32_wait): Add declaration.
3829 (do_initial_child_stuff): Flush all initial pending debug events
3830 up to the initial breakpoint.
3831 (win32_wait): If CACHED_STATUS was set, return that instead
3832 of doing a real wait. Remove the code resuming the execution
3833 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3834 during the initial phase. Also remove the code changing
3835 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3836 TARGET_WAITKIND_STOPPED.
3838 2013-12-11 Yao Qi <yao@codesourcery.com>
3840 * notif.c (handle_notif_ack): Return 0 if no notification
3843 2013-11-20 Doug Evans <dje@google.com>
3845 * linux-low.c (linux_set_resume_request): Fix comment.
3847 2013-11-20 Doug Evans <dje@google.com>
3849 * linux-low.c (resume_status_pending_p): Tweak comment.
3851 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3853 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3854 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3855 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3856 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3857 (srv_amd64_regobj): Add amd64-mpx.o.
3858 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3859 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3860 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3861 * i387-fp.c (num_pl_bnd_register) Added constant.
3862 (num_pl_bnd_cfg_registers) Added constant.
3863 (struct i387_xsave) Added reserved area and MPX fields.
3864 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3865 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3867 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3868 (init_registers_amd64_mpx_linux): Declare new function.
3869 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3870 (x86_64_regmap): Add MPX registers.
3871 (x86_linux_read_description): Add MPX case.
3872 (initialize_low_arch): Initialize MPX targets.
3874 2013-11-18 Tom Tromey <tromey@redhat.com>
3876 * configure: Rebuild.
3877 * configure.ac: Don't check for stdlib.h.
3878 * gdbreplay.c: Unconditionally include stdlib.h.
3880 2013-11-18 Tom Tromey <tromey@redhat.com>
3882 * config.in: Rebuild.
3883 * configure: Rebuild.
3884 * configure.ac: Don't use AC_HEADER_DIRENT.
3886 2013-11-18 Tom Tromey <tromey@redhat.com>
3888 * server.h: Don't check HAVE_STRING_H.
3889 * gdbreplay.c: Don't check HAVE_STRING_H.
3890 * configure: Rebuild.
3892 2013-11-18 Tom Tromey <tromey@redhat.com>
3894 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3897 2013-11-08 Tom Tromey <tromey@redhat.com>
3899 * configure, config.in: Rebuild.
3900 * configure.ac: Remove unused configury.
3902 2013-11-08 Tom Tromey <tromey@redhat.com>
3904 * acinclude.m4: Include common.m4, codeset.m4.
3905 * configure, config.in: Rebuild.
3906 * configure.ac: Use GDB_AC_COMMON.
3908 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3910 * linux-s390-low.c (HWCAP_S390_TE): New define.
3911 (s390_arch_setup): Consider the TE field in the HWCAP for
3912 determining 'have_regset_tdb'.
3914 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3917 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3920 2013-10-02 Pedro Alves <palves@redhat.com>
3922 * server.c (process_serial_event): Don't output "GDBserver
3923 exiting" if GDB is connected through stdio.
3924 * target.c (mywait): Likewise, be silent if GDB is connected
3927 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3929 * lynx-low.c (lynx_add_threads_after_attach): New function.
3930 (lynx_attach): Remove call to add_thread. Add call to
3931 lynx_add_threads_after_attach instead.
3933 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3935 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3936 * config.in, configure: Regenerated.
3938 2013-09-18 Yao Qi <yao@codesourcery.com>
3941 * server.c (start_inferior): Clear 'resume_info'.
3943 2013-09-16 Jiong Wang <jiwang@tilera.com>
3945 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3948 2013-09-16 Jiong Wang <jiwang@tilera.com>
3950 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3951 linux-tile-low.o to srv_tgtobj.
3953 2013-09-16 Will Newton <will.newton@linaro.org>
3955 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3958 2013-09-06 Pedro Alves <palves@redhat.com>
3960 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3961 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3962 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3963 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3964 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3965 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3967 2013-09-06 Pedro Alves <palves@redhat.com>
3969 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3970 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3972 2013-09-06 Pedro Alves <palves@redhat.com>
3974 * linux-amd64-ipa.c: Include tracepoint.h.
3975 * linux-i386-ipa.c: Include tracepoint.h.
3977 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3979 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3980 (ps_get_thread_area): New function.
3982 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3984 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3985 (initialize_low_arch): Call init_registers_crisv32 rather than
3986 init_register_crisv32.
3988 2013-09-05 Pedro Alves <palves@redhat.com>
3990 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3992 * hostio.h: ... this new file.
3993 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3994 win32-low.c: Include hostio.h.
3996 2013-09-05 Pedro Alves <palves@redhat.com>
3998 * server.h (gdb_client_data, handler_func, callback_handler_func)
3999 (delete_file_handler, add_file_handler, append_callback_event)
4000 (delete_callback_event, start_event_loop, initialize_event_loop):
4001 Move to event-loop.h and include it.
4002 * event-loop.h: New file.
4004 2013-09-05 Pedro Alves <palves@redhat.com>
4006 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4007 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4008 (loaded_dll, unloaded_dll): Move to ...
4009 * dll.h: ... this new file.
4010 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4012 2013-09-05 Pedro Alves <palves@redhat.com>
4014 * server.h (current_process, get_thread_process, all_processes)
4015 (add_inferior_to_list, for_each_inferior, current_inferior)
4016 (remove_inferior, add_process, remove_process, find_process_pid)
4017 (have_started_inferiors_p, have_attached_inferiors_p)
4018 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4019 (clear_inferiors, find_inferior, find_inferior_id)
4020 (inferior_target_data, set_inferior_target_data)
4021 (inferior_regcache_data, set_inferior_regcache_data): Move to
4022 inferiors.h, and include it.
4023 * inferiors.h: New file.
4025 2013-09-05 Pedro Alves <palves@redhat.com>
4027 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4031 2013-09-05 Pedro Alves <palves@redhat.com>
4033 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4035 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4036 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4037 (handle_tracepoint_general_set, handle_tracepoint_query)
4038 (tracepoint_finished_step, tracepoint_was_hit)
4039 (release_while_stepping_state_list, current_traceframe)
4040 (in_readonly_region, traceframe_read_mem)
4041 (fetch_traceframe_registers, traceframe_read_sdata)
4042 (traceframe_read_info, struct fast_tpoint_collect_status)
4043 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4044 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4045 (supply_fast_tracepoint_registers)
4046 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4047 (ipa_tdesc, claim_trampoline_space)
4048 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4049 (agent_mem_read, agent_get_trace_state_variable_value)
4050 (agent_set_trace_state_variable_value, agent_tsv_read)
4051 (agent_mem_read_string, get_raw_reg_func_addr)
4052 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4053 * tracepoint.h: ... this new file.
4055 2013-09-05 Pedro Alves <palves@redhat.com>
4057 * server.h (perror_with_name, error, fatal, warning, paddress)
4058 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4060 * utils.h: New file.
4062 2013-09-05 Pedro Alves <palves@redhat.com>
4064 * server.h (remote_debug, noack_mode, transport_is_reliable)
4065 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4066 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4067 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4068 (write_enn, initialize_async_io, enable_async_io)
4069 (disable_async_io, check_remote_input_interrupt_request)
4070 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4071 (dead_thread_notify, prepare_resume_reply)
4072 (decode_address_to_semicolon, decode_address, decode_m_packet)
4073 (decode_M_packet, decode_X_packet, decode_xfer_write)
4074 (decode_search_memory_packet, unhexify, hexify)
4075 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4076 (look_up_one_symbol, relocate_instruction)
4077 (monitor_output): Move to remote-utils.h, and include it.
4078 * remote-utils.h: New file.
4080 2013-09-05 Pedro Alves <palves@redhat.com>
4082 * server.h (_): Delete.
4084 2013-09-02 Pedro Alves <palves@redhat.com>
4086 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4087 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4089 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4091 2013-09-02 Pierre Muller <muller@sourceware.org>
4093 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4094 or WriteProcessMemory complete successfully and handle
4095 ERROR_PARTIAL_COPY error.
4097 2013-09-02 Pedro Alves <palves@redhat.com>
4099 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4100 error instead of EIO.
4102 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4105 * linux-low.c: Include filestuff.h.
4106 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4107 * lynx-low.c: Include filestuff.h.
4108 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4109 * server.c: Include filestuff.h.
4110 (main): Call notice_open_fds.
4111 * spu-low.c: Include filestuff.h.
4112 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4114 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4116 * Makefile.in: Explain why ../target and ../nat are not
4117 listed as include file search paths.
4118 (linux-waitpid.o): New object file rule.
4119 * configure.srv (srv_native_linux_obj): New variable.
4120 Replace all occurrences of linux native object files with
4121 $srv_native_linux_obj.
4122 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4123 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4124 (linux_enable_event_reporting): Remove declaration.
4125 (my_waitpid): Moved to common/linux-waitpid.c.
4126 (linux_wait_for_event): Pass ptid when calling
4127 linux_enable_event_reporting.
4128 (linux_supports_tracefork_flag): Remove.
4129 (linux_enable_event_reporting): Likewise.
4130 (linux_tracefork_grandchild): Remove.
4131 (STACK_SIZE): Moved to common/linux-ptrace.c.
4132 (linux_tracefork_child): Remove.
4133 (linux_test_for_tracefork): Remove.
4134 (linux_look_up_symbols): Call linux_supports_traceclone.
4135 (initialize_low): Remove call to linux_test_for_tracefork.
4136 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4137 common/linux-ptrace.h.
4138 (PTRACE_TYPE_ARG4): Likewise.
4139 Include linux-ptrace.h.
4141 2013-08-21 Pedro Alves <palves@redhat.com>
4143 * config.in: Renegerate.
4145 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4147 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4148 (SFILES): Remove $(srcdir)/common/target-common.c and
4149 add $(srcdir)/target/waitstatus.c.
4150 (OBS): Remove target-common.o and add waitstatus.o.
4151 (server_h): Remove $(srcdir)/../common/target-common.h and
4152 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4153 and $(srcdir)/../target/waitstatus.h.
4154 (target-common.o): Remove.
4155 (waitstatus.o): New target object file.
4156 * target.h: Do not include target-common.h and
4157 include target/resume.h, target/wait.h and
4158 target/waitstatus.h.
4160 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4162 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4163 to PTRACE_TYPE_ARG3.
4164 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4165 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4167 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4168 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4170 2013-07-27 Jie Zhang <jie@codesourcery.com>
4171 Daniel Jacobowitz <dan@codesourcery.com>
4172 Yao Qi <yao@codesourcery.com>
4174 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4175 (mips-linux-watch.o): New rule.
4176 (mips_linux_watch_h): New variable.
4177 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4179 * linux-mips-low.c: Include mips-linux-watch.h.
4180 (struct arch_process_info, struct arch_lwp_info): New.
4181 (update_watch_registers_callback): New function.
4182 (mips_linux_new_process, mips_linux_new_thread) New functions.
4183 (mips_linux_prepare_to_resume, mips_insert_point): New
4185 (mips_remove_point, mips_stopped_by_watchpoint): New
4187 (rsp_bp_type_to_target_hw_bp_type): New function.
4188 (mips_stopped_data_address): New function.
4189 (the_low_target): Add watchpoint support functions.
4191 2013-07-27 Yao Qi <yao@codesourcery.com>
4193 * i386-low.c: Include break-common.h.
4194 (enum target_hw_bp_type): Remove.
4196 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4198 * Makefile.in (SFILES): /common/target-common.c.
4199 (OBS): Add target-common.o.
4200 (server_h): Add $(srcdir)/../common/target-common.h.
4201 (target-common.o): New target.
4202 * server.c (queue_stop_reply_callback): Free
4203 status string after use.
4204 * target.c (target_waitstatus_to_string): Remove.
4205 * target.h: Include target-common.h.
4206 (resume_kind): Likewise.
4207 (target_waitkind): Likewise.
4208 (target_waitstatus): Likewise.
4209 (TARGET_WNOHANG): Likewise.
4211 2013-07-04 Yao Qi <yao@codesourcery.com>
4213 * Makefile.in (host_alias): Use @host_noncanonical@.
4214 (target_alias): Use @target_noncanonical@.
4215 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4216 ACX_NONCANONICAL_HOST.
4217 * configure: Regenerated.
4220 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4222 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4223 * configure: Rebuild.
4224 * Makefile.in (version_host, version_target): Get from configure.
4225 (version.c): Use $(version_host) and $(version_target).
4227 2013-07-03 Pedro Alves <palves@redhat.com>
4229 * Makefile.in (config.status): Depend on development.sh.
4230 * acinclude.m4: Include libmcheck.m4.
4231 * configure: Regenerate.
4233 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4235 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4236 attribute inside the parentheses.
4237 (winapi_DebugSetProcessKillOnExit): Ditto.
4238 (winapi_DebugBreakProcess): Ditto.
4239 (winapi_GenerateConsoleCtrlEvent): Ditto.
4241 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4243 * notif.h (notif_event): Add a dummy member to avoid compiler
4246 2013-07-01 Pedro Alves <palves@redhat.com>
4248 * hostio.c (HOSTIO_PATH_MAX): Define.
4249 (require_filename, handle_open, handle_unlink, handle_readlink):
4252 2013-07-01 Pedro Alves <palves@redhat.com>
4254 * server.h: Include "pathmax.h".
4255 * linux-low.c: Don't include sys/param.h.
4256 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4258 * win32-low.c: Don't include sys/param.h.
4259 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4261 2013-07-01 Pedro Alves <palves@redhat.com>
4263 * event-loop.c: Don't check HAVE_UNISTD_H before including
4265 * gdbreplay.c: Likewise.
4266 * remote-utils.c: Likewise.
4267 * server.c: Likewise.
4268 * configure.ac: Don't check for unistd.h.
4269 * configure: Regenerate.
4271 2013-06-28 Tom Tromey <tromey@redhat.com>
4273 * Makefile.in (version.c): Use version.in, not
4276 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4278 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4279 * configure: Rebuild.
4280 * Makefile.in (version_host, version_target): Get from configure.
4281 (version.c): Use $(version_host) and $(version_target).
4283 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4285 Fix trace-status to output user name without trailing colon.
4286 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4288 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4290 Fix trace-status to output proper start-time and stop-time.
4291 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4292 output start time and stop time in hex as gdb expects.
4294 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4296 * tracepoint.c (build_traceframe_info_xml): Output trace state
4297 variables present in the trace buffer.
4299 2013-06-24 Tom Tromey <tromey@redhat.com>
4301 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4303 (version.o): Remove.
4304 * gdbreplay.c: Include version.h.
4305 (version, host_name): Don't declare.
4306 * server.h: Include version.h.
4307 (version, host_name): Don't declare.
4309 2013-06-12 Pedro Alves <palves@redhat.com>
4311 * linux-x86-low.c (linux_is_elf64): Delete global.
4312 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4313 with local linux_pid_exe_is_elf_64_file use.
4315 2013-06-11 Pedro Alves <palves@redhat.com>
4317 * linux-low.c (regset_disabled, disable_regset): New functions.
4318 (regsets_fetch_inferior_registers)
4319 (regsets_store_inferior_registers): Use them.
4320 (initialize_regsets_info); Don't allocate the disabled_regsets
4322 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4325 2013-06-11 Pedro Alves <palves@redhat.com>
4327 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4330 2013-06-11 Pedro Alves <palves@redhat.com>
4332 * linux-x86-low.c (initialize_low_arch): Call
4333 init_registers_x32_avx_linux.
4335 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4337 Fix compatibility with Android Bionic.
4338 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4341 2013-06-07 Pedro Alves <palves@redhat.com>
4344 * Makefile.in (OBS): Add tdesc.o.
4345 (IPA_OBJS): Add tdesc-ipa.o.
4346 (tdesc-ipa.o): New rule.
4347 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4349 * linux-low.c (new_inferior): Delete.
4350 (disabled_regsets, num_regsets): Delete.
4351 (linux_add_process): Adjust to set the new per-process
4353 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4354 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4355 was a stop. When calling arch_setup, switch the current inferior
4356 to the thread that got an event.
4357 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4358 (regsets_fetch_inferior_registers)
4359 (regsets_store_inferior_registers): New regsets_info parameter.
4361 (linux_register_in_regsets): New regs_info parameter. Adjust to
4363 (register_addr, fetch_register, store_register): New usrregs_info
4364 parameter. Adjust to use it.
4365 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4366 parameter regs_info. Adjust to use it.
4367 (linux_fetch_registers): Get the current inferior's regs_info, and
4369 (linux_store_registers): Ditto.
4370 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4371 (initialize_low): Don't initialize the target_regsets here. Call
4372 initialize_low_arch.
4373 * linux-low.h (target_regsets): Delete declaration.
4374 (struct regsets_info): New.
4375 (struct usrregs_info): New.
4376 (struct regs_info): New.
4377 (struct process_info_private) <new_inferior>: New field.
4378 (struct linux_target_ops): Delete the num_regs, regmap, and
4379 regset_bitmap fields. New field regs_info.
4380 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4381 * i387-fp.c (num_xmm_registers): Delete.
4382 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4383 calls to new interface.
4384 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4385 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4386 Infer the number of xmm registers from the regcache's target
4388 * i387-fp.h (num_xmm_registers): Delete.
4389 * inferiors.c (add_thread): Don't install the thread's regcache
4391 * proc-service.c (gregset_info): Fetch the current inferior's
4392 regs_info. Adjust to use it.
4393 * regcache.c: Include tdesc.h.
4394 (register_bytes, reg_defs, num_registers)
4395 (gdbserver_expedite_regs): Delete.
4396 (get_thread_regcache): If the thread doesn't have a regcache yet,
4397 create one, instead of aborting gdbserver.
4398 (regcache_invalidate_one): Rename to ...
4399 (regcache_invalidate_thread): ... this.
4400 (regcache_invalidate_one): New.
4401 (regcache_invalidate): Only invalidate registers of the current
4403 (init_register_cache): Add target_desc parameter, and use it.
4404 (new_register_cache): Ditto. Assert the target description has a
4405 non zero registers_size.
4406 (regcache_cpy): Add assertions. Adjust.
4407 (realloc_register_cache, set_register_cache): Delete.
4408 (registers_to_string, registers_from_string): Adjust.
4409 (find_register_by_name, find_regno, find_register_by_number)
4410 (register_cache_size): Add target_desc parameter, and use it.
4411 (free_register_cache_thread, free_register_cache_thread_one)
4412 (regcache_release, register_cache_size): New.
4413 (register_size): Add target_desc parameter, and use it.
4414 (register_data, supply_register, supply_register_zeroed)
4415 (supply_regblock, supply_register_by_name, collect_register)
4416 (collect_register_as_string, collect_register_by_name): Adjust.
4417 * regcache.h (struct target_desc): Forward declare.
4418 (struct regcache) <tdesc>: New field.
4419 (init_register_cache, new_register_cache): Add target_desc
4421 (regcache_invalidate_thread): Declare.
4422 (regcache_invalidate_one): Delete declaration.
4423 (regcache_release): Declare.
4424 (find_register_by_number, register_cache_size, register_size)
4425 (find_regno): Add target_desc parameter.
4426 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4428 * remote-utils.c: Include tdesc.h.
4429 (outreg, prepare_resume_reply): Adjust.
4430 * server.c: Include tdesc.h.
4431 (gdbserver_xmltarget): Delete declaration.
4432 (get_features_xml, process_serial_event): Adjust.
4433 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4435 (struct process_info) <tdesc>: New field.
4436 (ipa_tdesc): Declare.
4437 * tdesc.c: New file.
4438 * tdesc.h: New file.
4439 * tracepoint.c: Include tdesc.h.
4440 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4441 (get_context_regcache): Adjust to pass ipa_tdesc down.
4442 (do_action_at_tracepoint): Adjust to get the register cache size
4443 from the context regcache's description.
4444 (traceframe_walk_blocks): Adjust to get the register cache size
4445 from the current trace frame's description.
4446 (traceframe_get_pc): Adjust to get current trace frame's
4447 description and pass it down.
4448 (gdb_collect): Adjust to get the register cache size from the
4450 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4451 (gdbserver_xmltarget): Delete.
4452 (initialize_low_tracepoint): Set the ipa's target description.
4453 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4454 (initialize_low_tracepoint): Set the ipa's target description.
4455 * linux-x86-low.c: Include tdesc.h.
4456 [__x86_64__] (is_64bit_tdesc): New.
4457 (ps_get_thread_area, x86_get_thread_area): Use it.
4458 (i386_cannot_store_register): Rename to ...
4459 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4460 (i386_cannot_fetch_register): Rename to ...
4461 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4462 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4464 (target_regsets): Rename to ...
4465 (x86_regsets): ... this.
4466 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4468 (x86_siginfo_fixup): Use is_64bit_tdesc.
4469 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4470 (tdesc_x32_avx_linux, tdesc_x32_linux)
4471 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4473 (x86_linux_update_xmltarget): Delete.
4474 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4475 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4476 (AMD64_LINUX_USER64_CS): New.
4477 (x86_linux_read_description): New, based on
4478 x86_linux_update_xmltarget.
4479 (same_process_callback): New.
4480 (x86_arch_setup_process_callback): New.
4481 (x86_linux_update_xmltarget): New.
4482 (x86_regsets_info): New.
4483 (amd64_linux_regs_info): New.
4484 (i386_linux_usrregs_info): New.
4485 (i386_linux_regs_info): New.
4486 (x86_linux_regs_info): New.
4487 (x86_arch_setup): Reimplement.
4488 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4489 (x86_emit_ops): Ditto.
4490 (the_low_target): Adjust. Install x86_linux_regs_info,
4491 x86_cannot_fetch_register, and x86_cannot_store_register.
4492 (initialize_low_arch): New.
4493 * linux-ia64-low.c (tdesc_ia64): Declare.
4494 (ia64_fetch_register): Adjust.
4495 (ia64_usrregs_info, regs_info): New globals.
4496 (ia64_regs_info): New function.
4497 (the_low_target): Adjust.
4498 (initialize_low_arch): New function.
4499 * linux-sparc-low.c (tdesc_sparc64): Declare.
4500 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4502 (sparc_arch_setup): New function.
4503 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4504 (the_low_target): Adjust.
4505 (initialize_low_arch): New function.
4506 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4507 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4508 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4509 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4510 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4511 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4512 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4513 (tdesc_powerpc_isa205_vsx64l): Declare.
4514 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4515 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4516 (ppc_set_pc, ppc_get_hwcap): Adjust.
4517 (ppc_usrregs_info): Forward declare.
4518 (!__powerpc64__) ppc_regmap_adjusted: New global.
4519 (ppc_arch_setup): Adjust to the current process'es target
4521 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4522 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4523 (ppc_store_evrregset): Adjust.
4524 (target_regsets): Rename to ...
4525 (ppc_regsets): ... this, and make static.
4526 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4527 (ppc_regs_info): New function.
4528 (the_low_target): Adjust.
4529 (initialize_low_arch): New function.
4530 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4531 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4532 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4533 (tdesc_s390x_linux64v2): Declare.
4534 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4535 (s390_fill_gregset, s390_store_last_break): Adjust.
4536 (target_regsets): Rename to ...
4537 (s390_regsets): ... this, and make static.
4538 (s390_get_pc, s390_set_pc): Adjust.
4539 (s390_get_hwcap): New target_desc parameter, and use it.
4540 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4541 (s390_arch_setup): Adjust to set the current process'es target
4542 description. Don't adjust the regmap.
4543 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4544 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4545 (regs_info_3264): New globals.
4546 (s390_regs_info): New function.
4547 (the_low_target): Adjust.
4548 (initialize_low_arch): New function.
4549 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4550 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4551 [__mips64] (init_registers_mips_linux)
4552 (init_registers_mips_dsp_linux): Delete defines.
4553 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4554 (have_dsp): New global.
4555 (mips_read_description): New, based on mips_arch_setup.
4556 (mips_arch_setup): Reimplement.
4557 (get_usrregs_info): New function.
4558 (mips_cannot_fetch_register, mips_cannot_store_register)
4559 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4560 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4561 (target_regsets): Rename to ...
4562 (mips_regsets): ... this, and make static.
4563 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4564 (dsp_regs_info, regs_info): New globals.
4565 (mips_regs_info): New function.
4566 (the_low_target): Adjust.
4567 (initialize_low_arch): New function.
4568 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4569 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4571 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4572 (arm_read_description): New, with bits factored from
4574 (arm_arch_setup): Reimplement.
4575 (target_regsets): Rename to ...
4576 (arm_regsets): ... this, and make static.
4577 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4578 (arm_regs_info): New function.
4579 (the_low_target): Adjust.
4580 (initialize_low_arch): New function.
4581 * linux-m68k-low.c (tdesc_m68k): Declare.
4582 (target_regsets): Rename to ...
4583 (m68k_regsets): ... this, and make static.
4584 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4585 (m68k_regs_info): New function.
4586 (m68k_arch_setup): New function.
4587 (the_low_target): Adjust.
4588 (initialize_low_arch): New function.
4589 * linux-sh-low.c (tdesc_sharch): Declare.
4590 (target_regsets): Rename to ...
4591 (sh_regsets): ... this, and make static.
4592 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4593 (sh_regs_info, sh_arch_setup): New functions.
4594 (the_low_target): Adjust.
4595 (initialize_low_arch): New function.
4596 * linux-bfin-low.c (tdesc_bfin): Declare.
4597 (bfin_arch_setup): New function.
4598 (bfin_usrregs_info, regs_info): New globals.
4599 (bfin_regs_info): New function.
4600 (the_low_target): Adjust.
4601 (initialize_low_arch): New function.
4602 * linux-cris-low.c (tdesc_cris): Declare.
4603 (cris_arch_setup): New function.
4604 (cris_usrregs_info, regs_info): New globals.
4605 (cris_regs_info): New function.
4606 (the_low_target): Adjust.
4607 (initialize_low_arch): New function.
4608 * linux-cris-low.c (tdesc_crisv32): Declare.
4609 (cris_arch_setup): New function.
4610 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4611 (cris_regs_info): New function.
4612 (the_low_target): Adjust.
4613 (initialize_low_arch): New function.
4614 * linux-m32r-low.c (tdesc_m32r): Declare.
4615 (m32r_arch_setup): New function.
4616 (m32r_usrregs_info, regs_info): New globals.
4617 (m32r_regs_info): Adjust.
4618 (initialize_low_arch): New function.
4619 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4620 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4621 (tic6x_usrregs_info): Forward declare.
4622 (tic6x_read_description): New function, based on ...
4623 (tic6x_arch_setup): ... this. Reimplement.
4624 (target_regsets): Rename to ...
4625 (tic6x_regsets): ... this, and make static.
4626 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4627 (tic6x_regs_info): New function.
4628 (the_low_target): Adjust.
4629 (initialize_low_arch): New function.
4630 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4631 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4632 (target_regsets): Rename to ...
4633 (xtensa_regsets): ... this, and make static.
4634 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4636 (xtensa_arch_setup, xtensa_regs_info): New functions.
4637 (the_low_target): Adjust.
4638 (initialize_low_arch): New function.
4639 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4640 (nios2_arch_setup): Set the current process'es tdesc.
4641 (target_regsets): Rename to ...
4642 (nios2_regsets): ... this.
4643 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4644 (nios2_regs_info): New function.
4645 (the_low_target): Adjust.
4646 (initialize_low_arch): New function.
4647 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4648 (aarch64_arch_setup): Set the current process'es tdesc.
4649 (target_regsets): Rename to ...
4650 (aarch64_regsets): ... this.
4651 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4652 (aarch64_regs_info): New function.
4653 (the_low_target): Adjust.
4654 (initialize_low_arch): New function.
4655 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4657 (target_regsets): Rename to ...
4658 (tile_regsets): ... this.
4659 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4660 (tile_regs_info): New function.
4661 (tile_arch_setup): Set the current process'es tdesc.
4662 (the_low_target): Adjust.
4663 (initialize_low_arch): New function.
4664 * spu-low.c (tdesc_spu): Declare.
4665 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4666 * win32-arm-low.c (tdesc_arm): Declare.
4667 (arm_arch_setup): New function.
4668 (the_low_target): Install arm_arch_setup instead of
4670 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4671 (init_windows_x86): Rename to ...
4672 (i386_arch_setup): ... this. Set `win32_tdesc'.
4673 (the_low_target): Adjust.
4674 * win32-low.c (win32_tdesc): New global.
4675 (child_add_thread): Don't create the thread cache here.
4676 (do_initial_child_stuff): Set the new process'es tdesc.
4677 * win32-low.h (struct target_desc): Forward declare.
4678 (win32_tdesc): Declare.
4679 * lynx-i386-low.c (tdesc_i386): Declare global.
4680 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4681 * lynx-low.c (lynx_tdesc): New global.
4682 (lynx_add_process): Set the new process'es tdesc.
4683 * lynx-low.h (struct target_desc): Forward declare.
4684 (lynx_tdesc): Declare global.
4685 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4686 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4687 * nto-low.c (nto_tdesc): New global.
4688 (do_attach): Set the new process'es tdesc.
4689 * nto-low.h (struct target_desc): Forward declare.
4690 (nto_tdesc): Declare.
4691 * nto-x86-low.c (tdesc_i386): Declare.
4692 (nto_x86_arch_setup): Set `nto_tdesc'.
4694 2013-06-04 Gary Benson <gbenson@redhat.com>
4696 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4697 to qSupported response when appropriate.
4698 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4699 with nonzero-length annex.
4700 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4701 arguments supplied in annex.
4703 2013-05-31 Doug Evans <dje@google.com>
4706 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4707 64 bits in 64-cross-32 environment.
4709 2013-05-28 Pedro Alves <palves@redhat.com>
4711 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4712 (aarch64-without-fpu.c): Delete rule.
4713 * configure.srv (aarch64*-*-linux*): Remove references to
4714 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4715 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4718 2013-05-24 Pedro Alves <palves@redhat.com>
4720 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4721 instead of strchr/decode_address. Error if the range isn't split
4722 with a ','. Don't assume there's be a ':' in the action.
4724 2013-05-23 Yao Qi <yao@codesourcery.com>
4725 Pedro Alves <palves@redhat.com>
4727 * linux-low.c (lwp_in_step_range): New function.
4728 (linux_wait_1): If the thread was range stepping and stopped
4729 outside the stepping range, report the stop to GDB. Otherwise,
4730 continue stepping. Add range stepping debug output.
4731 (linux_set_resume_request): Copy the step range from the resume
4733 (linux_supports_range_stepping): New.
4734 (linux_target_ops) <supports_range_stepping>: Set to
4735 linux_supports_range_stepping.
4736 * linux-low.h (struct linux_target_ops)
4737 <supports_range_stepping>: New field.
4738 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4739 * linux-x86-low.c (x86_supports_range_stepping): New.
4740 (the_low_target) <supports_range_stepping>: Set to
4741 x86_supports_range_stepping.
4742 * server.c (handle_v_cont): Handle 'r' action.
4743 (handle_v_requests): Append ";r" if the target supports range
4745 * target.h (struct thread_resume) <step_range_start,
4746 step_range_end>: New fields.
4747 (struct target_ops) <supports_range_stepping>:
4749 (target_supports_range_stepping): New macro.
4751 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4753 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4754 confusion in comment.
4756 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4758 * lynx-low.c (struct process_info_private): New type.
4759 (lynx_add_process): New function.
4760 (lynx_create_inferior, lynx_attach): Replace calls to
4761 add_process by calls to lynx_add_process.
4762 (lynx_resume): If PTID is null, then try using
4763 current_process()->private->last_wait_event_ptid.
4765 (lynx_clear_inferiors): Delete. The contents of that function
4766 has been inlined in lynx_mourn;
4767 (lynx_wait_1): Save the ptid in the process's private data.
4768 (lynx_mourn): Free the process' private data. Replace call
4769 to lynx_clear_inferiors by call to clear_inferiors.
4771 2013-05-17 Yao Qi <yao@codesourcery.com>
4773 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4776 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4778 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4779 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4780 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4781 PT_TEXT_END_ADDR guards. Update comments.
4782 (linux_target_op) <read_offsets>: Conditionally define to
4783 linux_read_offsets if the target is UCLIBC and if it defines
4784 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4786 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4787 Andrew Jenner <andrew@codesourcery.com>
4789 * Makefile.in (SFILES): Add linux-nios2-low.c.
4790 (clean): Add action to delete nios2-linux.c.
4791 (nios2-linux.c): New rule.
4792 * configure.srv: Add nios2*-*-linux*.
4793 * linux-nios2-low.c: New.
4795 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4797 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4799 2013-04-25 Hui Zhu <hui@codesourcery.com>
4802 * ax.c (ax_printf): Add fflush.
4804 2013-04-22 Tom Tromey <tromey@redhat.com>
4806 * Makefile.in (SFILES): Add filestuff.c.
4807 (OBS): Add filestuff.o.
4808 (filestuff.o): New target.
4809 * config.in, configure: Rebuild.
4810 * configure.ac: Check for fdwalk, pipe2.
4812 2013-04-17 Pedro Alves <palves@redhat.com>
4814 * configure.ac (USE_THREAD_DB): Delete variable.
4815 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4816 Don't AC_SUBST USE_THREAD_DB.
4817 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4818 * config.in, configure: Regenerate.
4820 2013-04-16 Pedro Alves <palves@redhat.com>
4822 * linux-low.h (struct lwp_info) <thread_known>: Move under
4823 the USE_THREAD_DB #ifdef.
4825 2013-04-16 Pedro Alves <palves@redhat.com>
4827 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4828 (linux-low.o): Delete rule.
4829 * linux-low.h: Always include "gdb_thread_db.h" instead of
4830 conditionally including thread_db.h.
4831 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4834 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4836 * Makefile.in (install-only): Fix make install regression.
4838 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4840 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4841 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4843 * gdbserver.1: Remove.
4845 2013-03-22 Pedro Alves <palves@redhat.com>
4847 * linux-low.c (handle_extended_wait): Don't call
4848 linux_enable_event_reporting.
4850 2013-03-15 Tony Theodore <tonyt@logyst.com>
4853 * Makefile.in (SHELL): Use @SHELL@.
4855 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4857 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4860 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4862 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4863 Remove extraneous NULL element.
4865 2013-03-13 Yao Qi <yao@codesourcery.com>
4867 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4868 'V' block in trace frame.
4870 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4872 * target.h (struct target_ops): Add btrace ops.
4873 (target_supports_btrace): New macro.
4874 (target_enable_btrace): New macro.
4875 (target_disable_btrace): New macro.
4876 (target_read_btrace): New macro.
4877 * gdbthread.h (struct thread_info): Add btrace field.
4878 * server.c: Include btrace-common.h.
4879 (handle_btrace_general_set): New function.
4880 (handle_btrace_enable): New function.
4881 (handle_btrace_disable): New function.
4882 (handle_general_set): Call handle_btrace_general_set.
4883 (handle_qxfer_btrace): New function.
4884 (struct qxfer qxfer_packets[]): Add btrace entry.
4885 * inferiors.c (remove_thread): Disable btrace.
4886 * linux-low: Include linux-btrace.h.
4887 (linux_low_enable_btrace): New function.
4888 (linux_low_read_btrace): New function.
4889 (linux_target_ops): Add btrace ops.
4890 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4891 Add srv_linux_btrace=yes.
4892 (x86_64-*-linux*): Add linux-btrace.o.
4893 Add srv_linux_btrace=yes.
4894 * configure.ac: Define HAVE_LINUX_BTRACE.
4895 * config.in: Regenerated.
4896 * configure: Regenerated.
4898 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4900 * server.c (handle_qxfer): Preserve error message if -3 is
4902 (qxfer): Document the -3 return value.
4904 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4906 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4907 (linux_btrace_h): New variable.
4908 (linux-btrace.o): New rule.
4910 2013-03-08 Stan Shebs <stan@codesourcery.com>
4911 Hafiz Abid Qadeer <abidh@codesourcery.com>
4913 * tracepoint.c (trace_buffer_size): New global.
4914 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4915 (init_trace_buffer): Change to one-argument function. Allocate
4916 trace buffer memory.
4917 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4918 handle QTBuffer:size packet.
4919 (cmd_bigqtbuffer_size): New function.
4920 (initialize_tracepoint): Call init_trace_buffer with
4921 DEFAULT_TRACE_BUFFER_SIZE.
4922 * server.c (handle_query): Add QTBuffer:size in the
4925 2013-03-07 Yao Qi <yao@codesourcery.com>
4927 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4928 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4930 (cmd_qtsp): Adjust condition. Do post increment.
4931 Set cur_action and cur_step_action back to 0.
4933 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4936 * linux-low.c (linux_write_memory): Return early success if LEN is
4939 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4941 * configure.srv: Add x86_64-*-cygwin* as target.
4943 2013-02-28 Tom Tromey <tromey@redhat.com>
4945 * configure.ac: Invoke AC_SYS_LARGEFILE.
4946 * configure, config.in: Rebuild.
4948 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4950 * win32-low.c: Throughout, fix format strings and casts of
4951 printf-like functions to avoid type related warnings on all
4953 (get_child_debug_event): Print dwDebugEventCode as hex since
4954 that's how it's usually documented.
4956 2013-02-28 Yao Qi <yao@codesourcery.com>
4958 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4961 2013-02-27 Jiong Wang <jiwang@tilera.com>
4963 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4964 (reg-tilegx32.c): New rule.
4965 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4966 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4967 different register info initializer according to elf class.
4968 (init_registers_tilgx32): New function. The tilegx32 register info
4970 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4971 (tile_store_gregset): Likewise.
4973 2013-02-27 Yao Qi <yao@codesourcery.com>
4975 * server.c (process_point_options): Print debug message when
4976 debug_threads is true.
4978 2013-02-26 Yao Qi <yao@codesourcery.com>
4980 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4982 2013-02-19 Pedro Alves <palves@redhat.com>
4983 Kai Tietz <ktietz@redhat.com>
4987 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4988 instead of strtoul to extract address from packet.
4989 (process_serial_event) <'z'>: Likewise.
4991 2013-02-18 Yao Qi <yao@codesourcery.com>
4993 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4995 2013-02-14 Pedro Alves <palves@redhat.com>
4999 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5000 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5002 2013-02-14 Pedro Alves <palves@redhat.com>
5004 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5006 2013-02-14 Pedro Alves <palves@redhat.com>
5008 * tracepoint.c (save_string): Delete.
5009 (add_tracepoint_action): Use savestring instead of save_string.
5011 2013-02-12 Pedro Alves <palves@redhat.com>
5013 * linux-xtensa-low.c: Ditto.
5014 * xtensa-xtregs.c: Ditto.
5016 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5018 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5021 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5023 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5024 aarch64_num_wp_regs and aarch64_num_bp_regs to
5025 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5027 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5029 * linux-aarch64-low.c (ps_get_thread_area): Replace
5030 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5032 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5033 Marcus Shawcroft <marcus.shawcroft@arm.com>
5034 Nigel Stephens <nigel.stephens@arm.com>
5035 Yufeng Zhang <yufeng.zhang@arm.com>
5037 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5038 (aarch64.c, aarch64-without-fpu.c): New targets.
5039 * configure.srv (aarch64*-*-linux*): New.
5040 * linux-aarch64-low.c: New file.
5042 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5044 * linux-low.c (handle_extended_wait, linux_create_inferior)
5045 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5046 (dequeue_one_deferred_signal, linux_resume_one_thread)
5047 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5048 (linux_tracefork_grandchild, linux_test_for_tracefork)
5049 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5050 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5051 where the argument is 0.
5053 2013-01-25 Yao Qi <yao@codesourcery.com>
5055 * event-loop.c: Include "queue.h".
5056 (gdb_event_p): New typedef.
5057 (struct gdb_event) <next_event>: Remove.
5058 (event_queue): Change to QUEUE(gdb_event_p).
5059 (async_queue_event): Remove.
5060 (gdb_event_xfree): New.
5061 (initialize_event_loop): New.
5062 (process_event): Use API from QUEUE.
5063 (wait_for_event): Likewise.
5064 * server.c (main): Call initialize_event_loop.
5065 * server.h (initialize_event_loop): Declare.
5067 2013-01-18 Yao Qi <yao@codesourcery.com>
5069 * ax.h (struct eval_agent_expr_context): New.
5070 (gdb_eval_agent_expr): Update declaration.
5071 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5072 TFRAME. Add new argument CTX.
5073 * server.h (struct eval_agent_expr_context): Declare.
5074 (agent_mem_read, agent_tsv_read): Update declaration.
5075 (agent_mem_read_string): Likewise.
5076 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5077 (add_traceframe_block): Add new argument TPOINT.
5078 Increase TPOINT->traceframe_usage.
5079 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5080 eval_tracepoint_agent_expr.
5081 (condition_true_at_tracepoint): Likewise.
5082 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5083 (agent_mem_read_string, agent_tsv_read): Likewise.
5085 2013-01-16 Yao Qi <yao@codesourcery.com>
5087 * linux-low.c (linux_resume_one_lwp): Don't check
5088 'lwp->bp_reinsert != 0'.
5090 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5091 Pedro Alves <palves@redhat.com>
5093 * lynx-low.c (ptrace_request_to_str): Define a temporary
5094 macro and use it to simplify this function's implementation.
5096 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5098 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5101 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5103 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5105 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5107 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5109 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5111 * lynx-low.c (lynx_resume): Use the resume_info parameter
5112 to determine the ptid for the lynx_ptrace call, unless
5113 it is equal to minus_one_ptid, in which case we use the
5114 ptid of the current_inferior.
5115 (lynx_wait_1): After having received a thread create/exit
5116 event, resume the inferior's execution using the signaling
5117 thread's ptid, rather than the old ptid.
5119 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5121 * lynx-low.c (lynx_resume): Delete variable ret.
5123 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5125 * gdbreplay.c (gdbreplay_version): Update copyright year.
5126 * server.c (gdbserver_version): Likewise.
5128 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5130 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5133 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5135 * lynx-low.c (ptrace_request_to_str): Add handling for
5138 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5140 * lynx-low.c (lynx_attach): Delete variable new_process.
5142 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5144 * lynx-low.c (lynx_create_inferior): Delete variable
5147 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5149 * lynx-low.c (ptrace_request_to_str): Do not handle
5150 PTRACE_GETTHREADLIST if this macro does not exist.
5152 2012-12-15 Yao Qi <yao@codesourcery.com>
5154 * Makefile.in (OBS): Add notif.o.
5155 * notif.c, notif.h: New.
5156 * server.c: Include "notif.h".
5157 (struct vstop_notif) <next>: Remove.
5159 (queue_stop_reply): Update.
5160 (push_event, send_next_stop_reply): Remove.
5161 (discard_queued_stop_replies): Update.
5162 (notif_stop): New variable.
5163 (handle_v_stopped): Remove.
5164 (handle_v_requests): Don't call handle_v_stopped. Call
5165 handle_ack_notif instead.
5166 (queue_stop_reply_callback): Call notif_event_enque instead
5167 of queue_stop_reply.
5168 (handle_status): Don't call send_next_stop_reply, call
5169 notif_write_event instead.
5170 (kill_inferior_callback): Likewise.
5171 (detach_or_kill_inferior_callback): Likewise.
5172 (main): Call initialize_notif.
5173 (process_serial_event): Call QUEUE_is_empty.
5174 (handle_target_event): Call notif_push instead of push event.
5175 * server.h (push_event): Remove declaration.
5177 2012-12-10 Tom Tromey <tromey@redhat.com>
5179 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5180 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5183 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5184 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5185 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5186 (amd64-linux-ipa.o, ax.o): Rewrite.
5187 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5188 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5189 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5190 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5191 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5192 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5193 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5194 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5195 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5196 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5197 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5198 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5199 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5200 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5201 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5202 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5203 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5204 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5205 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5206 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5207 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5208 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5209 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5210 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5211 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5212 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5213 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5214 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5215 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5216 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5217 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5218 (reg-tilegx.o): Remove.
5219 (all_object_files): New macro.
5220 Include .deps files.
5221 * aclocal.m4, configure: Rebuild.
5222 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5223 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5224 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5226 2012-12-05 Tom Tromey <tromey@redhat.com>
5229 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5231 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5233 * configure.ac: Check for linux/perf_event.h.
5234 * config.in: Regenerated.
5235 * configure: Regenerated.
5237 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5239 * hostio.c (handle_readlink): Decrease buffer size
5240 parameter passed to readlink by one byte.
5242 2012-11-26 Yao Qi <yao@codesourcery.com>
5244 * configure.ac (build_warnings): Append '-Wempty-body'.
5245 * configure: Regenerated.
5246 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5249 2012-11-15 Pierre Muller <muller@sourceware.org>
5251 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5252 * config.in: Regenerate.
5253 * configure: Regenerate.
5254 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5255 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5256 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5257 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5259 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5260 instead of <sys/wait.h> header.
5261 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5263 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5265 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5266 (various make rules): Remove -DGDBSERVER
5268 2012-11-09 Yao Qi <yao@codesourcery.com>
5270 * spu-low.c (current_ptid): Move it to ..
5271 * gdbthread.h: ... here. New.
5272 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5273 * server.c (myresume, process_serial_event): Likewise.
5274 * thread-db.c (thread_db_find_new_threads): Likewise.
5275 * tracepoint.c (run_inferior_command): Likewise.
5277 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5279 * server.c (handle_search_memory_1): Include access length in
5282 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5284 * linux-crisv32-low.c: Fix compile errors.
5286 2012-09-04 Yao Qi <yao@codesourcery.com>
5288 * tracepoint.c (cmd_qtsv): Adjust debug message.
5289 Don't check CUR_TPOINT.
5291 2012-08-28 Yao Qi <yao@codesourcery.com>
5293 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5294 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5295 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5296 Remove declarations of xmalloc, xreallloc, xstrdup and
5298 * Makefile.in (libiberty_h): New.
5299 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5300 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5302 2012-08-23 Yao Qi <yao@codesourcery.com>
5304 * server.h: Remove declaration of 'xsnprintf'.
5306 2012-08-22 Keith Seitz <keiths@redhat.com>
5308 * server.h: Include build-gnulib-gbserver/config.h.
5309 * gdbreplay.c: Likewise.
5311 2012-08-08 Doug Evans <dje@google.com>
5313 * Makefile.in (SFILES): Add gdb_vecs.c.
5314 (OBS): Add gdb_vecs.o.
5315 (gdb_vecs_h, host_defs_h): New variables.
5316 (thread-db.o): Add $(gdb_vecs_h) dependency.
5317 (gdb_vecs.o): New rule.
5318 * thread-db.c: #include "gdb_vecs.h".
5319 (thread_db_load_search): Use a vector to iterate over path elements.
5320 Handle text appearing after "$pdir".
5322 * configure.ac: Add check for strstr.
5323 * config.in: Regenerate.
5324 * configure: Regenerate.
5326 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5328 * hostio.c (handle_pread): If pread fails, fall back to attempting
5330 (handle_pwrite): Likewise for pwrite.
5332 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5334 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5335 between unsupported TYPE and unimplementable ADDR/LEN combination.
5336 (arm_insert_point): Act on new return value.
5338 2012-07-31 Pedro Alves <palves@redhat.com>
5340 * server.c (process_point_options): Only skip tokens if we find
5341 one that is unrecognized. Don't treat 'X' specially while
5342 skipping unrecognized tokens.
5344 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5346 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5347 to 4-byte-align HW breakpoint addresses for Thumb.
5349 2012-07-27 Yao Qi <yao@codesourcery.com>
5353 * server.h: Declare gdb_agent_about_to_close.
5354 * target.c (kill_inferior): Include "agent.h".
5355 New. Send command 'kill'.
5356 * target.h (kill_inferior): Removed macro.
5357 * tracepoint.c (gdb_agent_about_to_close): New.
5358 (gdb_agent_helper_thread): Handle command 'close'.
5359 Wait endlessly until the inferior stops.
5360 Install gdb_agent_remove_socket to atexit hook.
5361 (agent_socket_name): New static variable.
5362 (gdb_agent_socket_init): Replace local variable 'name' with
5363 'agent_socket_name'.
5364 (gdb_agent_remove_socket): New.
5366 2012-07-27 Yao Qi <yao@codesourcery.com>
5368 * server.c (process_point_options): Stop at 'X' when parsing.
5370 2012-07-19 Michael Eager <eager@eagercon.com>
5372 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5374 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5375 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5376 hardware breakpoint.
5378 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5380 * gdbserver/linux-low.c (initialize_low): Call
5381 linux_ptrace_init_warnings.
5383 2012-07-02 Doug Evans <dje@google.com>
5385 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5388 2012-07-02 Stan Shebs <stan@codesourcery.com>
5390 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5391 (ax.o): Add it to build rule.
5393 (OBS): Add format.o.
5394 (IPA_OBS): Add format.o.
5395 * server.c (handle_query): Claim support for breakpoint commands.
5396 (process_point_options): Add command case.
5397 (process_serial_event): Leave running if there are printfs in
5399 * mem-break.h (any_persistent_commands): Declare.
5400 (add_breakpoint_commands): Declare.
5401 (gdb_no_commands_at_breakpoint): Declare.
5402 (run_breakpoint_commands): Declare.
5403 * mem-break.c (struct point_command_list): New struct.
5404 (struct breakpoint): New field command_list.
5405 (any_persistent_commands): New function.
5406 (add_commands_to_breakpoint): New function.
5407 (add_breakpoint_commands): New function.
5408 (gdb_no_commands_at_breakpoint): New function.
5409 (run_breakpoint_commands): New function.
5410 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5412 * ax.c: Include format.h.
5413 (ax_printf): New function.
5414 (gdb_eval_agent_expr): Add printf opcode.
5416 2012-06-13 Yao Qi <yao@codesourcery.com>
5418 * server.c (start_inferior): Remove duplicated writes to fields
5419 'last_resume_kind' and 'last_status' of 'current_inferior'.
5421 2012-06-12 Yao Qi <yao@codesourcery.com>
5422 Pedro Alves <palves@redhat.com>
5424 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5426 * server.c (handle_v_cont): Extend comment.
5428 2012-06-11 Yao Qi <yao@codesourcery.com>
5430 * linux-low.c (linux_attach): Add 'static'.
5432 2012-06-06 Yao Qi <yao@codesourcery.com>
5434 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5436 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5438 Fix gcc -flto compilation warning.
5439 * server.c (main): Make variable multi_mode and attach volatile.
5441 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5443 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5444 if the platform doesn't know about it.
5446 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5448 * Makefile.in (SFILES): Add linux-tile-low.c.
5449 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5450 * configure.srv: Handle tilegx-*-linux*.
5451 * linux-tile-low.c: New file.
5453 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5455 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5457 2012-05-24 Pedro Alves <palves@redhat.com>
5461 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5463 2012-05-24 Pedro Alves <palves@redhat.com>
5467 Replace target_signal with gdb_signal throughout.
5469 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5471 * linux-low.c (linux_store_registers): Avoid the copying sequence
5472 when no data has been retrieved by ptrace.
5474 2012-05-22 Will Deacon <will.deacon@arm.com>
5476 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5477 Include asm/ptrace.h.
5478 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5481 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5483 * linux-low.c (linux_store_registers): Don't re-retrieve data
5484 with ptrace that has already been obtained from /proc. Always
5485 copy any data retrieved with ptrace to the buffer supplied.
5487 2012-05-11 Yao Qi <yao@codesourcery.com>
5488 Pedro Alves <palves@redhat.com>
5490 * linux-low.c (enum stopping_threads_kind): New.
5491 (stopping_threads): Change type to `enum stopping_threads_kind'.
5492 (handle_extended_wait): If stopping and suspending threads, leave
5493 the new_lwp suspended too.
5494 (linux_wait_for_event): Adjust.
5495 (stop_all_lwps): Set `stopping_threads' to
5496 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5497 whether we're suspending threads or just stopping them. Assert no
5500 2012-04-29 Yao Qi <yao@codesourcery.com>
5502 * server.h: Move some code to ...
5503 * gdbthread.h: ... here. New.
5504 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5505 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5506 (nto-low.o, win32-low.o): Likewise.
5507 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5508 * regcache.c, remote-utils.c, server.c: Likewise.
5509 * target.c, tracepoint.c, win32-low.c: Likewise.
5511 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5513 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5514 (PTRACE_ARG4_TYPE): Likewise.
5515 (PTRACE_XFER_TYPE): Likewise.
5516 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5517 ptrace to PTRACE_ARG3_TYPE.
5518 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5519 (PTRACE_ARG4_TYPE): Likewise.
5520 (PTRACE_XFER_TYPE): Likewise.
5521 (linux_detach_one_lwp): Cast fourth argument of
5522 ptrace to long then PTRACE_ARG4_TYPE.
5523 (regsets_fetch_inferior_registers): Cast third argument of
5524 ptrace to long then PTRACE_ARG3_TYPE.
5525 (regsets_store_inferior_registers): Likewise.
5527 2012-04-20 Pedro Alves <palves@redhat.com>
5529 * configure: Regenerate.
5531 2012-04-19 Pedro Alves <palves@redhat.com>
5533 * Makefile.in (GNULIB_BUILDDIR): New.
5534 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5535 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5536 (all, install-only, uninstall, clean-info, all-lib, clean): No
5537 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5538 (maintainer-clean realclean distclean): Use subdir_do.
5540 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5541 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5542 * acinclude.m4: Include acx_configure_dir.m4.
5543 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5544 calls. Call AC_PROG_RANLIB. Configure gnulib using
5547 (GNULIB_STDINT_H): Adjust.
5548 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5549 * gdbreplay.c: Include build-gnulib/config.h.
5550 * server.h: Likewise.
5551 * aclocal.m4: Regenerate.
5552 * config.in: Regenerate.
5553 * configure: Regenerate.
5555 2012-04-19 Pedro Alves <palves@redhat.com>
5557 * Makefile.in (LIBGNU, INCGNU): Adjust.
5558 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5559 (all, install-only, uninstall, clean-info, all-lib, clean)
5560 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5561 * configure.ac: Adjust AC_OUTPUT output.
5562 * aclocal.m4: Regenerate.
5563 * configure: Regenerate.
5565 2012-04-19 Pedro Alves <palves@redhat.com>
5567 * Makefile.in (generated_files): New.
5568 (server_h): Remove the explicit dependency on config.h, and depend
5569 on $generated_files.
5571 2012-04-19 Pedro Alves <palves@redhat.com>
5573 * Makefile.in (INCGNU): Add -Ignulib.
5575 2012-04-19 Pedro Alves <palves@redhat.com>
5577 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5578 (INCGNU): ... this, and spell out -I here.
5579 (GNULIB_LIB): Rename to ...
5581 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5583 2012-04-19 Pedro Alves <palves@redhat.com>
5585 * config.in: Regenerate.
5587 2012-04-19 Pedro Alves <palves@redhat.com>
5589 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5590 * server.h (memmem): Remove declaration.
5591 * config.in: Regenerate.
5592 * configure: Regenerate.
5594 2012-04-19 Yao Qi <yao@codesourcery.com>
5596 * Makefile.in (SFILES): Add common/vec.c.
5600 2012-04-19 Yao Qi <yao@codesourcery.com>
5602 * remote-utils.c (prepare_resume_reply): Replace with macro
5603 target_core_of_thread.
5604 * server.c (handle_qxfer_threads_proper): Likewise.
5605 * target.h (traget_core_of_thread): New macro.
5607 2012-04-18 Pedro Alves <palves@redhat.com>
5609 * aclocal.m4: Regenerate.
5610 * configure: Regenerate.
5612 2012-04-16 Yao Qi <yao@codesourcery.com>
5614 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5615 duplicated on address.
5617 2012-04-16 Yao Qi <yao@codesourcery.com>
5619 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5620 (struct tracepoint_action_ops) <send>: New field.
5621 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5622 (agent_expr_send, x_tracepoint_action_send): New.
5623 (l_tracepoint_action_send): New.
5624 (cmd_qtdp): Download and install tracepoint
5625 according to `use_agent'.
5626 (run_inferior_command): Add one more parameter `len'.
5628 (tracepoint_send_agent): New.
5629 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5631 2012-04-16 Yao Qi <yao@codesourcery.com>
5633 * tracepoint.c (download_tracepoints): Moved to ...
5634 (cmd_qtstart): ... here.
5636 2012-04-14 Yao Qi <yao@codesourcery.com>
5638 * tracepoint.c: Include inttypes.h.
5639 (struct collect_memory_action): Use sized types.
5640 (struct tracepoint): Likewise.
5641 (cmd_qtdp, stop_tracing): Update print specifiers.
5642 (cmd_qtp, response_tracepoint): Likewise.
5643 (collect_data_at_tracepoint): Likewise.
5644 (collect_data_at_step): Likewise.
5646 2012-04-14 Yao Qi <yao@codesourcery.com>
5648 Import gnulib module inttypes.
5649 * aclocal.m4, config.in, configure: Regenerated.
5651 2012-04-14 Yao Qi <yao@codesourcery.com>
5653 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5654 Makefile and config.status at last.
5656 2012-04-13 Yao Qi <yao@codesourcery.com>
5658 * tracepoint.c: Include stdint.h unconditionally.
5660 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5662 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5663 on BFD_HAVE_SYS_PROCFS_TYPE.
5664 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5665 * configure: Regenerate.
5666 * config.in: Likewise.
5668 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5670 * Makefile.in (clean): Also remove x32.c x32-linux.c
5671 x32-avx.c x32-avx-linux.c.
5672 (x32.o): New target.
5674 (x32-linux.o): Likewise.
5675 (x32-linux.c): Likewise.
5676 (x32-avx.o): Likewise.
5677 (x32-avx.c): Likewise.
5678 (x32-avx-linux.o): Likewise.
5679 (x32-avx-linux.c): Likewise.
5681 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5682 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5683 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5684 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5685 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5686 i386/x32-avx-linux.xml.
5688 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5689 (init_registers_x32_avx_linux): Likwise.
5690 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5691 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5693 2012-04-13 Pedro Alves <palves@redhat.com>
5695 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5696 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5697 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5698 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5701 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5703 * linux-x86-low.c (compat_x32_clock_t): New.
5704 (compat_x32_siginfo_t): Likewise.
5705 (compat_x32_siginfo_from_siginfo): Likewise.
5706 (siginfo_from_compat_x32_siginfo): Likewise.
5707 (linux_is_elf64): Likewise.
5708 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5709 and siginfo_from_compat_x32_siginfo for x32.
5710 (x86_arch_setup): Set linux_is_elf64.
5712 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5715 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5717 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5718 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5719 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5720 compatible with process.
5722 2012-04-12 Yao Qi <yao@codesourcery.com>
5724 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5725 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5726 (install-only, install-info, clean): Handle sub dir gnulib.
5727 (all-lib, am--refresh): New targets.
5728 (memmem.o): Remove target.
5729 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5730 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5731 (AC_REPLACE_FUNCS): Remove memmem.
5732 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5733 (AC_OUTPUT): Generate Makefile in gnulib/.
5734 * aclocal.m4, config.in, configure: Regenerated.
5736 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5738 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5740 2012-04-05 Pedro Alves <palves@redhat.com>
5742 -Werror=strict-aliasing
5744 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5747 2012-04-04 Pedro Alves <palves@redhat.com>
5749 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5750 (sparc_store_gregset_from_stack, sparc_store_gregset)
5751 (sparc_breakpoint_at): Fix formatting.
5753 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5755 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5757 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5758 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5759 * config.in: Regenerate.
5760 * configure: Likewise.
5762 2012-03-29 Pedro Alves <palves@redhat.com>
5764 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5765 Correct ptrace arguments.
5767 2012-03-28 Pedro Alves <palves@redhat.com>
5769 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5770 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5771 (IA64_FR1_REGNUM): New defines.
5772 (ia64_fetch_register): New.
5773 (the_low_target): Install it.
5774 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5776 * linux-low.c (linux_fetch_registers): Try the
5777 the_low_target.fetch_register hook first.
5779 * linux-arm-low.c (the_low_target): Adjust.
5780 * linux-bfin-low.c (the_low_target): Adjust.
5781 * linux-cris-low.c (the_low_target): Adjust.
5782 * linux-crisv32-low.c (the_low_target): Adjust.
5783 * linux-m32r-low.c (the_low_target): Adjust.
5784 * linux-m68k-low.c (the_low_target): Adjust.
5785 * linux-mips-low.c (the_low_target): Adjust.
5786 * linux-ppc-low.c (the_low_target): Adjust.
5787 * linux-s390-low.c (the_low_target): Adjust.
5788 * linux-sh-low.c (the_low_target): Adjust.
5789 * linux-sparc-low.c (the_low_target): Adjust.
5790 * linux-tic6x-low.c (the_low_target): Adjust.
5791 * linux-x86-low.c (the_low_target): Adjust.
5792 * linux-xtensa-low.c (the_low_target): Adjust.
5794 2012-03-26 Pedro Alves <palves@redhat.com>
5796 * server.c (handle_qxfer_libraries): Don't bail early if
5797 the_target->qxfer_libraries_svr4 is not NULL.
5799 2012-03-26 Pedro Alves <palves@redhat.com>
5801 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5803 2012-03-23 Pedro Alves <palves@redhat.com>
5805 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5806 "library-list-svr4" element's start tag when the the DSO list is
5809 2012-03-23 Pedro Alves <palves@redhat.com>
5811 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5812 a variable whose type size is the same as the inferior's pointer
5815 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5817 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5819 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5820 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5821 * linux-low.h: Include <signal.h>.
5822 (struct siginfo): Remove forward declaration.
5823 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5826 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5828 * .gitignore: Ignore more files.
5830 2012-03-19 Pedro Alves <palves@redhat.com>
5831 Jan Kratochvil <jan.kratochvil@redhat.com>
5833 * server.c (cont_thread, general_thread): Add describing comments.
5834 (start_inferior): Clear `cont_thread'.
5835 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5838 2012-03-15 Yao Qi <yao@codesourcery.com>
5840 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5842 (cmd_qtdp): ... here.
5844 2012-03-15 Yao Qi <yao@codesourcery.com>
5846 * tracepoint.c (struct tracepoint_action_ops): New.
5847 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5848 (m_tracepoint_action_download): New.
5849 (r_tracepoint_action_download): New.
5850 (x_tracepoint_action_download): New.
5851 (l_tracepoint_action_download): New.
5852 (add_tracepoint_action): Install `action->ops' according type.
5853 (download_tracepoint_1): Move code `download' function pointer
5854 of various tracepoint_action_ops.
5856 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5858 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5859 linux_ptrace_attach_warnings.
5861 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5863 * Makefile.in (linux-ptrace.o): New.
5864 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5865 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5866 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5867 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5868 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5870 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5872 2012-03-08 Yao Qi <yao@codesourcery.com>
5873 Pedro Alves <palves@redhat.com>
5875 Fix PR server/13392.
5876 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5878 * tracepoint.c (remove_tracepoint): New.
5879 (cmd_qtdp): Call remove_tracepoint when failed to install.
5881 2012-03-07 Pedro Alves <palves@redhat.com>
5883 * linux-low.c (get_detach_signal): New.
5884 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5885 Pass on pending signals to PTRACE_DETACH. Check the result of the
5887 * server.c (program_signals, program_signals_p): New.
5888 (handle_general_set): Handle QProgramSignals.
5889 * server.h (program_signals, program_signals_p): Declare.
5891 2012-03-05 Pedro Alves <palves@redhat.com>
5892 Jan Kratochvil <jan.kratochvil@redhat.com>
5894 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5897 2012-03-03 Yao Qi <yao@codesourcery.com>
5899 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5900 agent_look_up_symbols.
5902 2012-03-03 Yao Qi <yao@codesourcery.com>
5904 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5905 (linux-x86-low.o): Likewise.
5906 * server.h: Remove in_process_agent_loaded.
5907 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5911 2012-03-03 Yao Qi <yao@codesourcery.com>
5913 * tracepoint.c (gdb_agent_capability): New global.
5914 (in_process_agent_loaded_ust): Renamed to
5915 `in_process_agent_supports_ust'.
5917 (in_process_agent_supports_ust): Call agent_capability_check.
5918 (clear_installed_tracepoints): Assert that agent supports
5921 2012-03-03 Yao Qi <yao@codesourcery.com>
5923 * linux-low.c (linux_supports_agent): New.
5924 (linux_target_ops): Initialize field `supports_agent' with
5925 linux_supports_agent.
5926 * target.h (struct target_ops) <supports_agent>: New.
5927 (target_supports_agent): New macro.
5928 * server.c (handle_general_set): Handle packet 'QAgent'.
5929 (handle_query): Send `QAgent+'.
5930 * Makefile.in (server.o): Depends on agent.h.
5932 2012-03-03 Yao Qi <yao@codesourcery.com>
5934 * Makefile.in (OBS): Add agent.o.
5935 Add new rule for agent.o.
5936 Track dependence of tracepoint.c on agent.h.
5937 * tracepoint.c (run_inferior_command_1):
5938 (run_inferior_command): Call agent_run_command.
5939 (gdb_ust_connect_sync_socket): Deleted. Move it to
5941 (resume_thread, stop_thread): Likewise.
5942 (gdb_ust_socket_init): Renamed to ...
5943 (gdb_agent_socket_init): ... New.
5944 (gdb_ust_thread): Renamed to ...
5945 (gdb_agent_helper_thread): ... New.
5946 (gdb_ust_init): Move some code to ...
5947 (gdb_agent_init): ... here. New.
5948 [HAVE_UST]: Call gdb_ust_init.
5949 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5950 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5951 * config.in, configure: Regenerated.
5953 2012-03-02 Pedro Alves <palves@redhat.com>
5955 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5956 * linux-low.c (struct simple_pid_list): New.
5957 (stopped_pids): New a struct simple_pid_list pointer.
5958 (add_to_pid_list, pull_pid_from_list): New.
5959 (handle_extended_wait): Don't assume the first signal new children
5960 report is SIGSTOP. Adjust call to pull_pid_from_list.
5961 (linux_wait_for_lwp): Adjust.
5963 2012-03-02 Yao Qi <yao@codesourcery.com>
5965 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5968 2012-03-02 Yao Qi <yao@codesourcery.com>
5970 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5971 `stop_pc' and `tpoint'. Update caller.
5973 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5975 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5976 * linux-low.c (use_linux_regsets): New macro.
5977 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5978 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5979 (linux_register_in_regsets): New function.
5980 (usr_fetch_inferior_registers): Skip registers covered by
5982 (usr_store_inferior_registers): Likewise.
5983 (usr_fetch_inferior_registers): New macro.
5984 (usr_store_inferior_registers): Likewise.
5985 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5986 (linux_store_registers): Likewise.
5987 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5989 (init_registers_mips64_dsp_linux): Likewise.
5990 (init_registers_mips_linux): New macro.
5991 (init_registers_mips_dsp_linux): Likewise.
5992 (mips_dsp_num_regs): Likewise.
5993 (DSP_BASE, DSP_CONTROL): New fallback macros.
5994 (mips_base_regs): New macro.
5995 (mips_regmap): Use it. Fix the size.
5996 (mips_dsp_regmap): New variable.
5997 (mips_dsp_regset_bitmap): Likewise.
5998 (mips_arch_setup): New function.
5999 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6001 (mips_cannot_store_register): Likewise.
6002 (the_low_target): Update .arch_setup, .num_regs and .regmap
6003 initializers. Add .regset_bitmap initializer.
6004 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6006 * linux-bfin-low.c (the_low_target): Likewise.
6007 * linux-cris-low.c (the_low_target): Likewise.
6008 * linux-crisv32-low.c (the_low_target): Likewise.
6009 * linux-ia64-low.c (the_low_target): Likewise.
6010 * linux-m32r-low.c (the_low_target): Likewise.
6011 * linux-m68k-low.c (the_low_target): Likewise.
6012 * linux-ppc-low.c (the_low_target): Likewise.
6013 * linux-s390-low.c (the_low_target): Likewise.
6014 * linux-sh-low.c (the_low_target): Likewise.
6015 * linux-sparc-low.c (the_low_target): Likewise.
6016 * linux-tic6x-low.c (the_low_target): Likewise.
6017 * linux-x86-low.c (the_low_target): Likewise.
6018 * linux-xtensa-low.c (the_low_target): Likewise.
6019 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6020 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6021 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6023 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6024 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6026 2012-02-29 Yao Qi <yao@codesourcery.com>
6027 Pedro Alves <palves@redhat.com>
6029 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6030 `step_over_finished' is true.
6032 2012-02-27 Pedro Alves <palves@redhat.com>
6034 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6035 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6037 2012-02-27 Pedro Alves <palves@redhat.com>
6040 * linux-low.c (pid_is_stopped): New.
6041 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6043 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6045 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6048 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6050 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6052 2012-02-24 Luis Machado <lgustavo@codesourcery>
6054 * server.c (handle_query): Advertise support for target-side
6055 breakpoint condition evaluation.
6056 (process_point_options): New function.
6057 (process_serial_event): When inserting a breakpoint, check for
6058 a target-side condition that should be evaluated.
6060 * mem-break.c: Include regcache.h and ax.h.
6061 (point_cond_list_t): New data structure.
6062 (breakpoint) <cond_list>: New field.
6063 (find_gdb_breakpoint_at): Make non-static.
6064 (delete_gdb_breakpoint_at): Clear any target-side
6066 (clear_gdb_breakpoint_conditions): New function.
6067 (add_condition_to_breakpoint): Likewise.
6068 (add_breakpoint_condition): Likewise.
6069 (gdb_condition_true_at_breakpoint): Likewise.
6070 (gdb_breakpoint_here): Return result directly instead
6071 of going through a local variable.
6073 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6074 (clear_gdb_breakpoint_conditions): Likewise.
6075 (add_breakpoint_condition): Likewise.
6076 (gdb_condition_true_at_breakpoint): Likewise.
6078 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6079 (need_step_over_p): Take target-side breakpoint condition into
6082 2012-02-24 Luis Machado <lgustavo@codesourcery>
6084 * server.h: Include tracepoint.h.
6085 (agent_mem_read, agent_get_trace_state_variable_value,
6086 agent_set_trace_state_variable_value,
6087 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6088 get_set_tsv_func_addr): New prototypes.
6090 * ax.h: New include file.
6091 * ax.c: New source file.
6093 * tracepoint.c: Include ax.h.
6094 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6095 agent_expr, eval_result_type): Move to ax.h.
6096 (parse_agent_expr): Rename to ...
6097 (gdb_parse_agent_expr): ... this, make it non-static and move
6099 (unparse_agent_expr) Rename to ...
6100 (gdb_unparse_agent_expr): ... this, make it non-static and move
6102 (eval_agent_expr): Rename to ...
6103 (eval_tracepoint_agent_expr): ... this.
6104 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6105 forward declarations.
6106 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6107 (agent_get_trace_state_variable_value): New function.
6108 (agent_set_trace_state_variable_value): New function.
6109 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6110 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6111 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6112 (condition_true_at_tracepoint): Likewise.
6113 (parse_agent_expr): Rename to ...
6114 (gdb_parse_agent_expr): ... this and move to ax.c.
6115 (unparse_agent_expr): Rename to ...
6116 (gdb_unparse_agent_expr): ... this and move to ax.c.
6117 (gdb_agent_op_name): Move to ax.c.
6118 (eval_agent_expr): Rename to ...
6119 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6121 (eval_tracepoint_agent_expr): New function.
6122 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6124 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6126 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6127 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6128 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6129 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6130 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6131 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6132 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6133 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6134 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6135 (compile_bytecodes): Remove forward declaration.
6136 (is_goto_target): Move to ax.c.
6137 (compile_bytecodes): Move to ax.c and call
6138 agent_get_trace_state_variable_value (...) and
6139 agent_set_trace_state_variable_value (...).
6141 * Makefile.in: Update ax.c and IPA dependencies.
6143 2012-02-24 Pedro Alves <palves@redhat.com>
6145 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6146 (cmd_bigqtbuffer_circular): ... this. Only handle
6147 'QTBuffer:circular:'.
6148 (handle_tracepoint_general_set): Adjust.
6150 2012-02-16 Yao Qi <yao@codesourcery.com>
6152 * inferiors.c: Move code to ...
6153 * dll.c: .... here. New.
6154 * server.h: Declare clear_dlls.
6155 * Makefile.in (SFILES): Add dll.c.
6159 2012-02-11 Yao Qi <yao@codesourcery.com>
6161 * server.c: (handle_monitor_command): Add a new parameter
6163 (handle_query): Update caller.
6165 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6167 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6168 * configure, config.in: Regenerate.
6169 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6172 2012-02-02 Pedro Alves <palves@redhat.com>
6174 Try SIGKILL first, then PTRACE_KILL.
6175 * linux-low.c (linux_kill_one_lwp): New.
6176 (linux_kill_one_lwp): Rename to ...
6177 (kill_one_lwp_callback): ... this. Use the new
6180 2012-02-02 Pedro Alves <palves@redhat.com>
6182 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6185 2012-01-27 Pedro Alves <palves@redhat.com>
6187 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6188 (elf_64_file_p): Make static.
6189 (linux_pid_exe_is_elf_64_file): New.
6190 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6191 Delete declarations.
6192 (linux_pid_exe_is_elf_64_file): Declare.
6193 * linux-x86-low.c (x86_arch_setup): Use
6194 linux_pid_exe_is_elf_64_file.
6196 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6198 * linux-low.c (linux_wait_for_event_1): Rename to ...
6199 (linux_wait_for_event): ... here and merge it with former
6200 linux_wait_for_event - new variable wait_ptid, use it.
6201 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6203 2012-01-23 Pedro Alves <palves@redhat.com>
6205 * server.c (main): Avoid yet another case of infinite loop while
6206 detaching/killing after a longjmp.
6208 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6211 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6213 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6215 * hostio.c (handle_readlink): New function.
6216 (handle_vFile): Call it to handle "vFile:readlink" packets.
6218 2012-01-20 Pedro Alves <palves@redhat.com>
6219 Ulrich Weigand <ulrich.weigand@linaro.org>
6221 * server.c (handle_v_requests): Only support vAttach and vRun to
6222 start multiple processes when in extended protocol mode.
6224 2012-01-17 Pedro Alves <palves@redhat.com>
6226 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6227 memalign plus mprotect to allocate the scratch buffer.
6229 2012-01-13 Pedro Alves <palves@redhat.com>
6231 * server.c (attach_inferior): Clear `cont_thread'.
6233 2012-01-13 Pedro Alves <palves@redhat.com>
6235 * server.c (main): Avoid infinite loop while detaching/killing
6238 2012-01-09 Doug Evans <dje@google.com>
6240 * server.c (start_inferior): Set last_ptid in --wrapper case.
6242 2012-01-06 Yao Qi <yao@codesourcery.com>
6244 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6246 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6248 2012-01-04 Yao Qi <yao@codesourcery.com>
6250 * tracepoint.c (cmd_qtdp): Print debug message
6251 for static tracepoint.
6253 2012-01-04 Yao Qi <yao@codesourcery.com>
6255 * tracepoint.c (trace_vdebug): Differentiate debug message
6256 between gdbserver and IPA.
6258 2012-01-03 Yao Qi <yao@codesourcery.com>
6260 * tracepoint.c (tracepoint_was_hit): Don't collect for
6263 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6265 * terminal.h: Reformat copyright header.
6267 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6269 * server.c (gdbserver_version): Update copyright year.
6270 * gdbreplay.c (gdbreplay_version): Likewise.
6272 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6274 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6277 2011-12-18 Hui Zhu <teawater@gmail.com>
6278 * linux-low.c (linux_create_inferior): Save return value to ret.
6280 2011-12-18 Hui Zhu <teawater@gmail.com>
6282 * linux-low.c (linux_create_inferior): Save return value to ret.
6284 2011-12-16 Doug Evans <dje@google.com>
6286 * linux-low.c (linux_create_inferior): If stdio connection,
6287 redirect stdin from /dev/null, stdout to stderr.
6288 * remote-utils.c (remote_is_stdio): New static global.
6289 (remote_connection_is_stdio): New function.
6290 (remote_prepare): Handle stdio connection.
6291 (remote_open): Ditto.
6292 (remote_close): Don't close stdin for stdio connections.
6293 (read_prim,write_prim): New functions. Replace all calls to
6294 read/write to these.
6295 * server.c (main): Watch for "-" argument. Move call to
6296 remote_prepare before start_inferior.
6297 * server.h (STDIO_CONNECTION_NAME): New macro.
6298 (remote_connection_is_stdio): Declare.
6300 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6301 in debugging output.
6303 2011-12-15 Yao Qi <yao@codesourcery.com>
6305 * tracepoint.c: Include sys/syscall.h.
6306 (gdb_ust_thread): Remove preprocessor conditional.
6308 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6310 * linux-low.c (linux_detach_one_lwp): Call
6311 the_low_target.prepare_to_resume before detaching.
6313 2011-12-14 Yao Qi <yao@codesourcery.com>
6315 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6318 2011-12-14 Yao Qi <yao@codesourcery.com>
6320 * i386-low.c (i386_low_stopped_data_address): Initialize local
6323 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6327 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6328 DR_CONTROL unless necessary. Extend comments.
6329 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6330 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6332 2011-12-13 Yao Qi <yao@codesourcery.com>
6334 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6336 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6338 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6340 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6341 Print new debug message for such case.
6343 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6345 Fix overlapping memcpy.
6346 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6347 the read_inferior_memory transfer.
6348 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6349 write_inferior_memory transfer.
6350 (set_fast_tracepoint_jump): New variable buf. Use it for the
6351 read_inferior_memory and write_inferior_memory transfers.
6352 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6353 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6354 Use it for the write_inferior_memory transfer.
6355 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6358 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6360 * linux-low.c (fetch_register, store_register): Make code
6361 consistent, fix formatting.
6363 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6365 * linux-low.c (usr_store_inferior_registers): Factor out code
6366 to handle individual registers into...
6367 (store_register): ... this new function.
6369 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6371 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6372 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6373 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6374 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6375 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6376 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6377 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6378 (srv_xmlfiles): Add new XML files.
6380 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6382 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6383 (init_registers_s390_linux32v1): Add prototype.
6384 (init_registers_s390_linux32v2): Likewise.
6385 (init_registers_s390_linux64v1): Likewise.
6386 (init_registers_s390_linux64v2): Likewise.
6387 (init_registers_s390x_linux64v1): Likewise.
6388 (init_registers_s390x_linux64v2): Likewise.
6389 (s390_num_regs): Increment to 52.
6390 (s390_regmap): Add orig_r2 register.
6391 (s390_num_regs_3264): Increment to 68.
6392 (s390_regmap_3264): Add orig_r2 register.
6393 (s390_collect_ptrace_register): Handle orig_r2 register.
6394 (s390_supply_ptrace_register): Likewise.
6395 (s390_fill_last_break): New function.
6396 (s390_store_last_break): Likewise.
6397 (s390_fill_system_call): New function.
6398 (s390_store_system_call): Likewise.
6399 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6401 (s390_check_regset): New function.
6402 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6403 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6404 Update target_regsets for available register sets.
6406 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6407 Jan Kratochvil <jan.kratochvil@redhat.com>
6409 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6410 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6412 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6413 * linux-low.h (struct process_info_private): New member r_debug.
6414 * server.c (handle_qxfer_libraries): Call
6415 the_target->qxfer_libraries_svr4.
6416 (handle_qxfer_libraries_svr4): New function.
6417 (qxfer_packets): New entry "libraries-svr4".
6418 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6419 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6420 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6421 PACKET_qXfer_libraries_svr4.
6423 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6425 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6426 PSW address/mask between 8-byte and 16-byte formats.
6427 (s390_supply_ptrace_register): Likewise.
6428 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6429 basic addressing mode bit.
6431 2011-11-24 Stan Shebs <stan@codesourcery.com>
6433 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6435 2011-11-17 Stan Shebs <stan@codesourcery.com>
6437 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6438 (tracing_start_time): New global.
6439 (tracing_stop_time): New global.
6440 (tracing_user_name): New global.
6441 (tracing_notes): New global.
6442 (tracing_stop_note): New global.
6443 (cmd_qtstart): Set traceframe_usage, start_time.
6444 (stop_tracing): Set stop_time.
6445 (cmd_qtstatus): Report additional status.
6446 (cmd_qtp): New function.
6447 (handle_tracepoint_query): Call it.
6448 (cmd_qtnotes): New function.
6449 (handle_tracepoint_general_set): Call it.
6450 (get_timestamp): Rename from tsv_get_timestamp.
6452 2011-11-14 Stan Shebs <stan@codesourcery.com>
6453 Kwok Cheung Yeung <kcy@codesourcery.com>
6455 * linux-x86-low.c (small_jump_insn): New.
6456 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6457 trampoline and error message, build a trampoline and issue a small
6458 jump instruction to it.
6459 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6460 trampoline and error message.
6461 (x86_get_min_fast_tracepoint_insn_len): New.
6462 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6463 * linux-low.h (struct linux_target_ops): Add arguments to
6464 install_fast_tracepoint_jump_pad operation, add new operation.
6465 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6467 (linux_get_min_fast_tracepoint_insn_len): New function.
6468 (linux_target_op): Add new operation.
6469 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6470 (gdb_trampoline_buffer_end): Ditto.
6471 (gdb_trampoline_buffer_error): Ditto.
6472 (struct ipa_sym_addresses): Add fields for new IPA variables.
6473 (symbol_list): Add entries for new IPA variables.
6474 (struct tracepoint): Add fields to hold the address range of the
6475 trampoline used by the tracepoint.
6476 (trampoline_buffer_head): New static variable.
6477 (trampoline_buffer_tail): Ditto.
6478 (claim_trampoline_space): New function.
6479 (have_fast_tracepoint_trampoline_buffer): New function.
6480 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6482 (install_fast_tracepoint): Ditto, also add error buffer argument.
6483 (cmd_qtminftpilen): New function.
6484 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6485 (fast_tracepoint_from_trampoline_address): New function.
6486 (fast_tracepoint_collecting): Handle trampoline as part of jump
6488 (set_trampoline_buffer_space): New function.
6489 (initialize_tracepoint): Initialize new IPA variables.
6490 * target.h (struct target_ops): Add arguments to
6491 install_fast_tracepoint_jump_pad operation, add new
6492 get_min_fast_tracepoint_insn_len operation.
6493 (target_get_min_fast_tracepoint_insn_len): New.
6494 (install_fast_tracepoint_jump_pad): Add arguments.
6495 * server.h (IPA_BUFSIZ): Define.
6496 * linux-i386-ipa.c: Include extra header files.
6497 (initialize_fast_tracepoint_trampoline_buffer): New function.
6498 (initialize_low_tracepoint): Call it.
6499 * server.h (set_trampoline_buffer_space): Declare.
6500 (claim_trampoline_space): Ditto.
6501 (have_fast_tracepoint_trampoline_buffer): Ditto.
6503 2011-11-14 Yao Qi <yao@codesourcery.com>
6505 * server.c (handle_query): Handle InstallInTrace for qSupported.
6506 * tracepoint.c (add_tracepoint): Sort list.
6507 (install_tracepoint, download_tracepoint): New.
6508 (cmd_qtdp): Call them to install and download tracepoints.
6509 (sort_tracepoints): Removed.
6510 (cmd_qtstart): Update.
6512 2011-11-14 Yao Qi <yao@codesourcery.com>
6514 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6515 * mem-break.h: Declare.
6516 * tracepoint.c (cmd_qtstart): Move some code to ...
6517 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6519 (download_tracepoints): Move some code to ...
6520 (download_tracepoint_1): ... here. New.
6522 2011-11-08 Yao Qi <yao@codesourcery.com>
6524 * remote-utils.c (relocate_instruction): A comment fix.
6526 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6528 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6529 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6530 dr_status_mirror and dr_control_mirror from debug_reg_state.
6531 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6532 (i386_initial_stuff): Remove use of deleted globals.
6533 (i386_get_thread_context, i386_set_thread_context,
6534 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6535 from debug_reg_state.
6537 2011-11-05 Yao Qi <yao@codesourcery.com>
6539 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6540 address as TPOINT's.
6542 2011-11-02 Stan Shebs <stan@codesourcery.com>
6544 * tracepoint.c (agent_mem_read_string): New function.
6545 (eval_agent_expr): Call it for tracenz.
6546 * server.c (handle_query): Report support for tracenz.
6548 2011-11-02 Yao Qi <yao@codesourcery.com>
6550 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6552 2011-11-02 Yao Qi <yao@codesourcery.com>
6554 * target.h: Fix a typo in comment.
6556 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6558 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6559 clobber the breakpoints' shadows with fast tracepoint jumps.
6560 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6561 * target.c (write_inferior_memory): Also pass MYADDR down to
6564 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6566 * configure.ac: Check support for personality routine.
6567 * configure: Regenerate.
6568 * config.in: Likewise.
6569 * linux-low.c: Include <sys/personality.h>.
6570 Define ADDR_NO_RANDOMIZE if necessary.
6571 (linux_create_inferior): Disable address space randomization when
6572 forking inferior, if requested.
6573 (linux_supports_disable_randomization): New function.
6574 (linux_target_ops): Install it.
6575 * server.h (disable_randomization): Declare.
6576 * server.c (disable_randomization): New global variable.
6577 (handle_general_set): Handle QDisableRandomization.
6578 (handle_query): Likewise for qSupported.
6579 (main): Support --disable-randomization and --no-disable-randomization
6580 command line arguments.
6581 * target.h (struct target_ops): Add supports_disable_randomization.
6582 (target_supports_disable_randomization): New macro.
6584 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6586 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6588 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6589 [!PT_GETDSBT] (target_loadmap): New definition.
6590 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6591 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6592 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6593 and PT_GETDSBT to LINUX_LOADMAP.
6594 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6595 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6597 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6599 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6600 (arm_linux_hwbp_cap): New static variable.
6601 (arm_linux_get_hwbp_cap): Replace by ...
6602 (arm_linux_init_hwbp_cap): ... this new function.
6603 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6604 (arm_linux_get_hw_watchpoint_count): Likewise.
6605 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6606 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6607 (arm_prepare_to_resume): Use perror_with_name instead of error.
6609 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6611 * linux-arm-low.c: Include <signal.h>.
6612 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6613 (struct arm_linux_hwbp_cap): New data type.
6614 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6615 (struct arm_linux_hw_breakpoint): New data type.
6616 (MAX_BPTS, MAX_WPTS): Define.
6617 (struct arch_process_info, struct arch_lwp_info): New data types.
6618 (arm_linux_get_hwbp_cap): New function.
6619 (arm_linux_get_hw_breakpoint_count): Likewise.
6620 (arm_linux_get_hw_watchpoint_count): Likewise.
6621 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6622 (arm_hwbp_control_initialize): Likewise.
6623 (arm_hwbp_control_is_enabled): Likewise.
6624 (arm_hwbp_control_is_initialized): Likewise.
6625 (arm_hwbp_control_disable): Likewise.
6626 (arm_linux_hw_breakpoint_equal): Likewise.
6627 (arm_linux_hw_point_initialize): Likewise.
6628 (struct update_registers_data): New data structure.
6629 (update_registers_callback: New function.
6630 (arm_insert_point): Likewise.
6631 (arm_remove_point): Likewise.
6632 (arm_stopped_by_watchpoint): Likewise.
6633 (arm_stopped_data_address): Likewise.
6634 (arm_new_process): Likewise.
6635 (arm_new_thread): Likewise.
6636 (arm_prepare_to_resume): Likewise.
6637 (the_low_target): Register arm_insert_point, arm_remove_point,
6638 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6639 arm_new_thread, and arm_prepare_to_resume.
6641 2011-09-15 Stan Shebs <stan@codesourcery.com>
6643 * server.h (struct emit_ops): Add compare-goto fields.
6644 * tracepoint.c (gdb_agent_op_sizes): New table.
6645 (emit_eq_goto): New function.
6646 (emit_ne_goto): New function.
6647 (emit_lt_goto): New function.
6648 (emit_le_goto): New function.
6649 (emit_gt_goto): New function.
6650 (emit_ge_goto): New function.
6651 (is_goto_target): New function.
6652 (compile_bytecodes): Recognize special cases of compare-goto
6653 combinations and call specialized emitters for them.
6654 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6655 (amd64_emit_ne_goto): New function.
6656 (amd64_emit_lt_goto): New function.
6657 (amd64_emit_le_goto): New function.
6658 (amd64_emit_gt_goto): New function.
6659 (amd64_emit_ge_goto): New function.
6660 (amd64_emit_ops): Add the new functions.
6661 (i386_emit_eq_goto): New function.
6662 (i386_emit_ne_goto): New function.
6663 (i386_emit_lt_goto): New function.
6664 (i386_emit_le_goto): New function.
6665 (i386_emit_gt_goto): New function.
6666 (i386_emit_ge_goto): New function.
6667 (i386_emit_ops): Add the new functions.
6669 2011-09-08 Stan Shebs <stan@codesourcery.com>
6671 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6672 (i386_emit_epilogue): Restore %ebx.
6674 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6676 * server.c (step_thread): Remove definition.
6677 (process_serial_event): Don't handle Hs.
6678 * server.h (step_thread): Remove declaration.
6679 * target.c (set_desired_inferior): Remove use of step_thread.
6681 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6683 * linux-low.c: Include linux-procfs.h.
6684 (linux_attach_lwp_1): Update comments.
6685 (linux_attach): Scan for existing threads when attaching to a
6686 process that is the tgid.
6687 * Makefile.in: Update dependencies.
6689 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6691 * configure.srv: Add linux-procfs.o dependencies.
6693 2011-08-14 Yao Qi <yao@codesourcery.com>
6695 * target.h (struct target_ops): Fix indent.
6696 * win32-low.c (win32_target_ops): Fix comment.
6698 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6699 Yao Qi <yao@codesourcery.com>
6701 * Makefile.in (clean): Remove tic6x-*.c files.
6702 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6703 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6704 (tic6x-c64xp-linux.c): Likewise.
6705 * configure.srv: Add support for tic6x-*-uclinux.
6706 * linux-tic6x-low.c: New.
6707 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6709 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6710 Yao Qi <yao@codesourcery.com>
6712 * target.h (struct target_ops): Add read_loadmap.
6713 * linux-low.c (struct target_loadseg): New type.
6714 (struct target_loadmap): New type.
6715 (linux_read_loadmap): New function.
6716 (linux_target_ops): Add linux_read_loadmap.
6717 * server.c (handle_query): Support qXfer:fdpic:read packet.
6718 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6721 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6723 * win32-low.c: Include <stdint.h>.
6725 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6727 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6728 to the inferior here.
6729 (i386_remove_aligned_watchpoint): Ditto.
6730 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6731 fit part of the watchpoint in the debug registers.
6732 (i386_update_inferior_debug_regs): New.
6733 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6734 registers, and only update the inferior on success.
6735 (i386_low_remove_watchpoint): Ditto.
6737 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6739 * linux-low.c (compare_ints, unique, list_threads, show_process,
6740 linux_core_of_thread): Delete.
6741 (linux_target_ops): Change linux_core_of_thread to
6742 linux_common_core_of_thread.
6743 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6744 * utils.c (malloc_failure): Change type of argument.
6745 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6746 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6747 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6748 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6749 (IPA_OBJS): Add common-utils-ipa.o.
6750 (ptid_h, linux_osdata_h): New macros.
6751 (server_h): Add common/common-utils.h, common/xml-utils.h,
6752 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6754 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6755 ptid.o, buffer.o): New rules.
6756 (linux-low.o): Add common/linux-osdata.h as a dependency.
6757 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6758 * configure.ac: Add AC_HEADER_DIRENT check.
6759 * config.in: Regenerate.
6760 * configure: Regenerate.
6761 * remote-utils.c (xml_escape_text): Delete.
6762 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6763 buffer_xml_printf): Move to common/buffer.c.
6764 * server.c (main): Remove call to initialize_inferiors.
6765 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6766 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6767 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6768 internal_error, gdb_assert, gdb_assert_fail): Delete.
6769 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6770 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6772 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6773 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6774 initialize_inferiors): Delete.
6776 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6778 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6781 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6783 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6785 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6787 2011-05-26 Yao Qi <yao@codesourcery.com>
6789 * Makefile.in (thread-db.o): Track dependence to
6790 common/gdb_thread_db.h.
6791 * thread-db.c: include gdb_thread_db.h from right place.
6793 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6795 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6796 __FILE__ and __LINE__ to internal_error.
6798 2011-05-13 Doug Evans <dje@google.com>
6800 * thread-db.c (try_thread_db_load_from_sdir): New function.
6801 (try_thread_db_load_from_dir): New function.
6802 (thread_db_load_search): Handle $sdir, ignore $pdir.
6803 Remove trying of system directories if search of
6804 libthread-db-search-path fails, that is now done via $sdir.
6806 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6808 * server.c (handle_query): Add EnableDisableTracepoints to the list
6809 of supported features.
6810 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6812 (cmd_qtenable_disable): New.
6813 (cmd_qtstart): Install tracepoints even if disabled.
6814 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6815 receiving a QTEnable or QTDisable packet.
6816 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6817 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6819 (gdb_probe): Skip data collection if static tracepoint is disabled.
6821 2011-05-10 Doug Evans <dje@google.com>
6823 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6825 2011-05-04 Doug Evans <dje@google.com>
6827 * linux-low.c (linux_join): Skip process lookup.
6828 * spu-low.c (spu_join): Ditto.
6829 * server.c (join_inferiors_callback): Delete.
6830 (process_serial_event): For 'D' packet (detach) call join_inferior
6833 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6835 * README: Don't mention xscale*-*-linux*.
6836 * configure.srv (xscale*-*-linux*): Don't handle target.
6838 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6840 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6842 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6843 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6844 (i386_emit_void_call_2): Likewise.
6846 2011-04-26 Yao Qi <yao@codesourcery.com>
6848 * linux-low.c: Move common macros to linux-ptrace.h.
6849 Include linux-ptrace.h.
6850 * Makefile.in (linux_ptrace_h): New.
6851 (linux-low.o): Depends on linux-ptrace.h.
6853 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6855 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6856 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6857 (remote_prepare): New function with most of the TCP code from ...
6858 (remote_open): ... here. Detect PORT here unconditionally. Move also
6859 setting transport_is_reliable.
6860 * server.c (run_once): New variable.
6861 (gdbserver_usage): Document it.
6862 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6863 the first run if RUN_ONCE.
6864 * server.h (run_once, remote_prepare): New declarations.
6866 2011-04-19 Tom Tromey <tromey@redhat.com>
6868 * win32-low.c (handle_load_dll): Remove duplicate "the".
6870 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6872 Remove support for old Cygwin 1.5 versions.
6873 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6874 function to avoid warning.
6875 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6878 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6880 * gdbserver/server.h (Macro _): Define it if not available.
6882 2011-03-14 Michael Snyder <msnyder@vmware.com>
6884 * hostio.c (handle_close): Remove unnecessary null test.
6886 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6888 * Makefile.in (maintainer-clean realclean distclean): Remove
6889 "make ... subdir_do" command.
6891 2011-03-10 Michael Snyder <msnyder@vmware.com>
6893 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6895 * server.c (handle_v_run): Free alloced buffer on early return.
6897 2011-03-09 Yao Qi <yao@codesourcery.com>
6900 2011-03-04 Yao Qi <yao@codesourcery.com>
6902 * Makefile.in: Remove GNU make feature --directory.
6904 2011-03-05 Yao Qi <yao@codesourcery.com>
6906 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6907 (subdir_do): New make target. Copied from gdb/Makefile.
6908 (maintainer-clean, realclean, distclean, clean): Call corresponding
6909 make targets in common/Makefile.
6911 2011-02-11 Yao Qi <yao@codesourcery.com>
6913 * configure.ac: Call AC_PROG_RANLIB.
6914 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6915 * configure: Regenerate.
6917 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6919 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6921 2011-03-06 Yao Qi <yao@codesourcery.com>
6923 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6925 2011-03-05 Yao Qi <yao@codesourcery.com>
6927 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6928 (subdir_do): New make target. Copied from gdb/Makefile.
6929 (maintainer-clean, realclean, distclean, clean): Call corresponding
6930 make targets in common/Makefile.
6932 2011-03-04 Yao Qi <yao@codesourcery.com>
6934 * Makefile.in: Remove GNU make feature --directory.
6936 2011-03-04 Michael Snyder <msnyder@vmware.com>
6938 * server.c (queue_stop_reply): Call xmalloc not malloc.
6940 2011-03-02 Michael Snyder <msnyder@vmware.com>
6942 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6944 2011-02-28 Michael Snyder <msnyder@vmware.com>
6946 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6947 (cmd_qtframe): Ditto.
6948 (cmd_qtbuffer): Ditto.
6949 (cmd_bigqtbuffer): Ditto.
6951 * utils.c (decimal2str): Initialize 'width' to nine, then
6954 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6956 * hostio.c (require_data): Free *data, not data.
6958 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6960 * hostio.c (require_data): Use free, not xfree.
6962 2011-02-27 Michael Snyder <msnyder@vmware.com>
6964 * server.c (handle_query): Discard unused value.
6966 * hostio.c (require_data): Free malloc memory before returning
6969 2011-02-26 Michael Snyder <msnyder@vmware.com>
6971 * linux-low.c (list_threads): Call closedir for dirent.
6973 2011-02-27 Michael Snyder <msnyder@vmware.com>
6975 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6976 a case statement falls through.
6978 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6980 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6983 2011-02-26 Michael Snyder <msnyder@vmware.com>
6985 * utils.c (decimal2str): Eliminate dead code and dead param.
6986 (pulongest): Drop dead param from call to decimal2str.
6989 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6991 Revert the following patch (not approved yet):
6992 2011-02-21 Hui Zhu <teawater@gmail.com>
6993 * tracepoint.c (tp_printf): New function.
6994 (eval_agent_expr): Handle gdb_agent_op_printf.
6996 2011-02-21 Hui Zhu <teawater@gmail.com>
6998 * tracepoint.c (tp_printf): New function.
6999 (eval_agent_expr): Handle gdb_agent_op_printf.
7001 2011-02-18 Tom Tromey <tromey@redhat.com>
7003 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7004 (tracepoint.o): Likewise.
7005 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7006 (gdb_agent_op_names): Likewise.
7008 2011-02-18 Tom Tromey <tromey@redhat.com>
7010 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7011 gdb_agent_op_rot>: New constants.
7012 (gdb_agent_op_names): Add pick and roll.
7013 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7016 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7018 * aclocal.m4: Regenerated with aclocal-1.11.1.
7020 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7022 * server.c (handle_qxfer_traceframe_info): New.
7023 (qxfer_packets): Register "traceframe-info".
7024 (handle_query): Report support for qXfer:traceframe-info:read+.
7025 * tracepoint.c (match_blocktype): New.
7026 (traceframe_find_block_type): Rename to ...
7027 (traceframe_walk_blocks): ... this. Add callback filter argument,
7029 (traceframe_find_block_type): New, reimplemented on top of
7030 traceframe_walk_blocks.
7031 (build_traceframe_info_xml): New.
7032 (traceframe_read_info): New.
7033 * server.h (traceframe_read_info): Declare.
7035 2011-02-11 Yao Qi <yao@codesourcery.com>
7037 * configure.ac: Call AC_PROG_RANLIB.
7038 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7039 * configure: Regenerate.
7041 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7043 * server.c (gdb_read_memory): Change return semantics to allow
7045 (handle_search_memory_1): Adjust.
7046 (process_serial_event) <'m' packet>: Handle partial transfers.
7047 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7049 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7051 * regcache.c (init_register_cache): Initialize
7052 regcache->register_status.
7053 (free_register_cache): Release regcache->register_status.
7054 (regcache_cpy): Copy register_status.
7055 (registers_to_string): Print 'x's for unavailable registers.
7056 (supply_register): Mark the register's status valid or
7057 unavailable, depending on whether a buffer was passed in or not.
7058 (supply_register_zeroed): New.
7059 (supply_regblock): Mark the registers' status valid or
7060 unavailable, depending on whether a buffer was passed in or not.
7061 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7062 (struct regcache): New `register_status' field.
7063 (supply_register_zeroed): Declare.
7064 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7065 supply_register_zeroed, rather than passing a NULL buffer to
7067 * tracepoint.c (fetch_traceframe_registers): Update comment.
7069 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7071 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7074 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7076 * server.h (decode_xfer_write): Change prototype.
7077 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7078 and don't extract the annex here.
7079 * server.c (decode_xfer_read): Remove `annex' parameter,
7080 and don't extract the annex here.
7082 (struct qxfer): New.
7083 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7084 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7085 (handle_qxfer_statictrace): New functions, abstracted out from
7086 handle_query, and made to use the struct qxfer interface.
7087 (handle_threads_qxfer_proper): Rename to ...
7088 (handle_qxfer_threads_proper): ... this.
7089 (handle_threads_qxfer): Rename to ...
7090 (handle_qxfer_threads): ... this. Adjust.
7091 (qxfer_packets): New array.
7092 (handle_qxfer): New function.
7093 (handle_query): Use handle_qxfer.
7095 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7097 * gdbreplay.c: Shorten lines of >= 80 columns.
7098 * linux-low.c: Ditto.
7099 * linux-ppc-low.c: Ditto.
7100 * linux-s390-low.c: Ditto.
7101 * linux-sparc-low.c: Ditto.
7102 * linux-x86-low.c: Ditto.
7103 * linux-xtensa-low.c: Ditto.
7104 * mem-break.c: Ditto.
7106 * regcache.h: Ditto.
7107 * remote-utils.c: Ditto.
7110 * thread-db.c: Ditto.
7111 * tracepoint.c: Ditto.
7113 * win32-low.h: Ditto.
7115 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7117 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7120 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7122 * server.c (gdbserver_version): Update copyright year in version
7124 * gdbreplay.c (gdbreplay_version): Ditto.
7126 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7128 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7129 * linux-bfin-low.c: New file.
7130 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7131 PT_DATA_ADDR for BFIN targets.
7132 * Makefile.in (SFILES): Add linux-bfin-low.c.
7133 (clean): Remove reg-bfin.c.
7134 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7135 * README: Mention supported Blackfin targets.
7137 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7139 * .gitignore: New file.
7141 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7143 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7145 2010-10-22 Jie Zhang <jie@codesourcery.com>
7147 * Makefile.in: Add FLAGS_TO_PASS variable.
7148 (install): Remove dependency of install-only and recursively
7149 invoke make for install-only.
7151 2010-10-04 Doug Evans <dje@google.com>
7153 * Makefile.in (uninstall): Use $(DESTDIR).
7155 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7159 * linux-x86-low.c (compat_siginfo_from_siginfo)
7160 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7161 si_code is < 0. Check for si_code == SI_TIMER before checking for
7164 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7166 * lynx-i386-low.c: New file.
7167 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7169 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7171 * lynx-low.c (ptrace_request_to_str): Remove handling for
7172 request values that have been removed in LynxOS 5.x.
7174 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7176 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7179 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7181 * configure.ac: Add --enable-inprocess-agent option.
7182 * configure: Rebuilt.
7184 2010-09-06 Yao Qi <yao@codesourcery.com>
7186 * linux-low.c (linux_kill): Remove unused variable.
7187 (linux_stabilize_threads): Likewise.
7188 * server.c (start_inferior): Likewise.
7189 (queue_stop_reply_callback): Likewise.
7190 * tracepoint.c (do_action_at_tracepoint): Likewise.
7192 2010-09-06 Yao Qi <yao@codesourcery.com>
7194 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7197 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7199 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7201 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7203 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7206 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7208 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7209 gdbserver/lynx-ppc-low.c: New files.
7210 * Makefile.in (lynx_low_h): New variable.
7211 (lynx-low.o, lynx-ppc-low.o): New rules.
7212 * configure.ac: On LynxOS, link with -lnetinet.
7213 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7214 * configure: regenerate.
7216 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7218 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7219 * configure.ac: Add check for vasprintf and vsnprintf.
7220 * configure, config.in: Regenerate.
7221 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7223 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7225 * gdbreplay.c: Move include of alloca.h up, next to include of
7227 * server.h: Add include of malloc.h.
7228 * mem-break.c: Remove include of malloc.h.
7229 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7231 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7233 * Makefile.in (memmem.o): Build with -Wno-error.
7235 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7237 * utils.c (xsnprintf): Make non-static.
7238 * server.h: Add xsnprintf declaration.
7239 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7240 replace calls to snprintf by calls to xsnprintf throughout.
7242 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7244 * configure.ac: Add configure check for alloca.
7245 * configure, config.in: Regenerate.
7246 * server.h: Include alloca.h if it exists.
7247 * gdbreplay.c: Include alloca.h if it exists.
7249 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7251 * linux-low.c (__SIGRTMIN): Define if not already defined.
7252 (linux_create_inferior): Check for __ANDROID__ rather than
7254 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7255 are already deferred.
7256 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7257 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7258 stopped and already has a pending signal to report.
7259 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7260 a pending signal to report or is moving out of a jump pad.
7261 (linux_init_signals): Check for __ANDROID__ rather than
7264 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7266 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7267 debug_threads check. Avoid a linear search when not doing debug
7270 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7272 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7273 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7274 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7275 (process_event): Change local fd's type to gdb_fildes_t.
7276 (create_file_handler): Adjust prototype.
7277 (delete_file_handler): Adjust prototype.
7278 (handle_file_event): Adjust prototype. Use pfildes.
7279 (create_file_event): Adjsut prototype.
7280 * remote-utils.c (remote_desc, listen_desc): Change type to
7282 * server.h: New gdb_fildes_t typedef.
7283 [USE_WIN32API]: Include winsock2.h.
7284 (delete_file_handler, add_file_handler): Adjust prototypes.
7286 * utils.c (pfildes): New.
7288 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7290 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7291 * configure: Regenerate.
7293 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7295 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7296 (linux_done_accessing_memory): ... this.
7297 (linux_target_ops): Adjust.
7298 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7299 * nto-low.c (nto_target_ops): Adjust comment.
7300 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7301 * spu-low.c (spu_target_ops): Adjust comment.
7302 * target.h (target_ops): Rename unprepare_to_access_memory field
7303 to done_accessing_memory.
7304 (unprepare_to_access_memory): Rename to ...
7305 (done_accessing_memory): ... this.
7307 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7309 * linux-low.c (linux_prepare_to_access_memory): New.
7310 (linux_unprepare_to_access_memory): New.
7311 (linux_target_ops): Install them.
7312 * server.c (read_memory): Rename to ...
7313 (gdb_read_memory): ... this. Use
7314 prepare_to_access_memory/prepare_to_access_memory.
7315 (write_memory): Rename to ...
7316 (gdb_write_memory): ... this. Use
7317 prepare_to_access_memory/prepare_to_access_memory.
7318 (handle_search_memory_1): Adjust.
7319 (process_serial_event): Adjust.
7320 * target.h (struct target_ops): New fields
7321 prepare_to_access_memory and unprepare_to_access_memory.
7322 (prepare_to_access_memory, unprepare_to_access_memory): New.
7323 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7324 prepare_to_access_memory/prepare_to_access_memory.
7325 * nto-low.c (nto_target_ops): Adjust.
7326 * spu-low.c (spu_target_ops): Adjust.
7327 * win32-low.c (win32_target_ops): Adjust.
7329 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7331 * Makefile.in (WARN_CFLAGS): Get it from configure.
7332 (WERROR_CFLAGS): New.
7333 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7334 * configure.ac: Introduce --enable-werror, which adds -Werror to
7335 the compiler command line. Enabled by default. Disable with
7336 --disable-werror. Add -Wdeclaration-after-statement
7337 Wpointer-arith and -Wformat-nonliteral to warning flags.
7338 * configure: Regenerate.
7340 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7342 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7344 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7346 * gdbreplay.c (remote_error): New.
7348 (expect): Use gdbchar. Check for error reading from GDB.
7349 Clarify sync error output.
7350 (play): Check for errors writing to GDB.
7351 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7352 * remote-utils.c (getpkt): Check for errors writing to the remote
7355 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7357 * linux-low.c (linux_wait_1): Move non-debugging code out of
7358 `debug_threads' control.
7360 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7362 * linux-low.c (linux_wait_1): Don't set last_status here.
7363 * server.c (push_event, queue_stop_reply_callback): Assert we're
7364 not pushing a TARGET_WAITKIND_IGNORE event.
7365 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7366 (myresume, handle_target_event): Set the thread's last_resume_kind
7367 and last_status from the target returned status.
7369 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7373 * linux-x86-low.c (update_debug_registers_callback): New.
7374 (i386_dr_low_set_addr): Use it.
7375 (i386_dr_low_get_addr): New.
7376 (i386_dr_low_set_control): Use update_debug_registers_callback.
7377 (i386_dr_low_get_control): New.
7378 (i386_dr_low_get_status): Adjust.
7379 * linux-low.c (linux_stop_lwp): New.
7380 * linux-low.h (linux_stop_lwp): Declare.
7382 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7383 argument instead of a i386_debug_reg_state.
7384 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7385 a i386_debug_reg_state.
7386 (i386_insert_aligned_watchpoint): Adjust.
7387 (i386_remove_aligned_watchpoint): Adjust.
7388 (i386_low_stopped_data_address): Read the debug registers from the
7389 inferior instead of from the mirrors.
7390 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7391 (i386_dr_low_get_addr): Declare.
7392 (i386_dr_low_get_control): Declare.
7393 (i386_dr_low_get_status): Change prototype.
7395 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7396 (i386_dr_low_get_addr): New.
7397 (i386_dr_low_get_control): New.
7398 (i386_dr_low_get_status): Adjust prototype. Return
7400 (i386_initial_stuff): Clear dr_status_mirror and
7402 (i386_get_thread_context): Adjust.
7403 (i386_set_thread_context): Adjust.
7404 (i386_thread_added): Adjust.
7406 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7408 * linux-low.h (linux_thread_area): Delete declaration.
7410 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7412 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7413 after its termination.
7415 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7417 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7418 (gdb_wants_all_stopped): Delete.
7419 (linux_wait_1): Don't call them.
7420 * server.c (handle_v_cont): Tag all threads as want-stopped.
7421 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7422 stopped as "client-wants-stopped".
7424 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7426 * Makefile.in (signals_h): New.
7427 (server_h): Depend on it.
7428 (server.o): Don't depend on $(signals_def).
7429 (signals.o): Depend on $(signals_def).
7431 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7433 * Makefile.in (signals_def): New.
7434 (server_h): Append include/gdb/signals.h and signals_def.
7435 (server.o): Append signals_def.
7437 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7439 * server.c (handle_target_event): Use target_signal_to_host for
7440 resume_info.sig initialization.
7441 * target.h (struct thread_resume) <sig>: New comment.
7443 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7445 * server.c (handle_query): strcpy() the returned string from paddress()
7446 instead of sprintf().
7447 * utils.c (paddress): Return phex_nz().
7449 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7451 * server.c (handle_v_cont): Call mourn_inferior if process
7453 (myresume): Likewise.
7455 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7457 Static tracepoints, and integration with UST.
7459 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7460 * mem-break.c (uninsert_all_breakpoints)
7461 (reinsert_all_breakpoints): New.
7462 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7463 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7464 (gdb_agent_ust_loaded, helper_thread_id)
7465 (gdb_agent_helper_thread_id): New macros.
7466 (struct ipa_sym_addresses): Add addr_ust_loaded,
7467 addr_helper_thread_id, addr_cmd_buf.
7468 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7469 (in_process_agent_loaded_ust): New.
7470 (write_e_ust_not_loaded): New.
7471 (maybe_write_ipa_ust_not_loaded): New.
7472 (struct collect_static_trace_data_action): New.
7473 (enum tracepoint_type) <static_tracepoint>: New.
7474 (struct tracepoint) <handle>: Mention static tracepoints.
7475 (struct static_tracepoint_ctx): New.
7476 (CMD_BUF_SIZE): New.
7477 (add_tracepoint_action): Handle static tracepoint actions.
7478 (unprobe_marker_at): New.
7479 (clear_installed_tracepoints): Handle static tracepoints.
7480 (cmd_qtdp): Handle static tracepoints.
7481 (probe_marker_at): New.
7482 (cmd_qtstart): Handle static tracepoints.
7483 (response_tracepoint): Handle static tracepoints.
7484 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7485 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7486 (get_context_regcache): Handle static tracepoints.
7487 (do_action_at_tracepoint): Handle static tracepoint actions.
7488 (traceframe_find_block_type): Handle static trace data blocks.
7489 (traceframe_read_sdata): New.
7490 (download_tracepoints): Download static tracepoint actions.
7491 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7492 (GDB_PROBE_NAME): New.
7497 (ust_marker_to_static_tracepoint): New.
7499 (collect_ust_data_at_tracepoint): New.
7500 (gdb_ust_probe): New.
7501 (UNIX_PATH_MAX, SOCK_DIR): New.
7502 (gdb_ust_connect_sync_socket): New.
7503 (resume_thread, stop_thread): New.
7504 (run_inferior_command): New.
7505 (init_named_socket): New.
7506 (gdb_ust_socket_init): New.
7507 (cstr_to_hexstr): New.
7509 (first_marker, next_marker): New.
7510 (response_ust_marker): New.
7511 (cmd_qtfstm, cmd_qtsstm): New.
7512 (unprobe_marker_at, probe_marker_at): New.
7513 (cmd_qtstmat, gdb_ust_thread): New.
7514 (gdb_ust_init): New.
7515 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7516 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7518 (x86_64_st_collect_regmap): New.
7519 (X86_64_NUM_ST_COLLECT_GREGS): New.
7520 (AMD64_RIP_REGNUM): New.
7521 (supply_static_tracepoint_registers): New.
7522 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7524 (i386_st_collect_regmap): New.
7525 (i386_NUM_ST_COLLECT_GREGS): New.
7526 (supply_static_tracepoint_registers): New.
7527 * server.c (handle_query): Handle qXfer:statictrace:read.
7528 <qSupported>: Report support for StaticTracepoints, and
7529 qXfer:statictrace:read features.
7530 * server.h (traceframe_read_sdata)
7531 (supply_static_tracepoint_registers): Declare.
7532 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7533 (unpack_varlen_hex): Include in IPA build.
7534 * Makefile.in (ustlibs, ustinc): New.
7535 (IPA_OBJS): Add remote-utils-ipa.o.
7536 ($(IPA_LIB)): Link -ldl and -lpthread.
7538 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7539 * config.in, configure: Regenerate.
7541 2010-06-20 Ian Lance Taylor <iant@google.com>
7542 Pedro Alves <pedro@codesourcery.com>
7544 * linux-x86-low.c (always_true): Delete.
7545 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7546 trying to fool the compiler with always_true.
7548 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7550 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7551 conditions in gdbserver.
7553 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7555 * spu-low.c (spu_read_memory): Wrap around local store limit.
7556 (spu_write_memory): Likewise.
7558 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7560 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7561 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7563 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7565 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7566 uses with LONGEST uses.
7568 2010-06-14 Stan Shebs <stan@codesourcery.com>
7569 Pedro Alves <pedro@codesourcery.com>
7573 * linux-x86-low.c: Include limits.h.
7578 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7579 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7580 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7581 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7582 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7583 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7584 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7585 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7586 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7587 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7588 (amd64_emit_void_call_2): New.
7589 (amd64_emit_ops): New.
7590 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7591 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7592 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7593 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7594 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7595 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7596 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7597 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7598 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7599 (i386_emit_stack_adjust, i386_emit_int_call_1)
7600 (i386_emit_void_call_2): New.
7601 (i386_emit_ops): New.
7602 (x86_emit_ops): New.
7603 (the_low_target): Install x86_emit_ops.
7604 * server.h (struct emit_ops): New.
7605 (get_raw_reg_func_addr): Declare.
7606 (current_insn_ptr, emit_error): Declare.
7607 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7608 (set_trace_state_variable_value): New defines.
7609 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7610 addr_get_trace_state_variable_value and
7611 addr_set_trace_state_variable_value.
7612 (symbol_list): New fields for get_raw_reg,
7613 get_trace_state_variable_value and set_trace_state_variable_value.
7614 (condfn): New typedef.
7615 (struct tracepoint): New field `compiled_cond'.
7616 (do_action_at_tracepoint): Clear compiled_cond.
7617 (get_trace_state_variable_value, set_trace_state_variable_value):
7619 (condition_true_at_tracepoint): If there's a compiled condition,
7621 (current_insn_ptr, emit_error): New globals.
7622 (struct bytecode_address): New.
7623 (get_raw_reg_func_addr): New.
7624 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7625 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7626 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7627 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7628 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7629 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7630 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7631 (compile_tracepoint_condition, compile_bytecodes): New.
7632 * target.h (emit_ops): Forward declare.
7633 (struct target_ops): New field emit_ops.
7634 (target_emit_ops): New.
7635 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7636 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7637 * linux-low.c (linux_emit_ops): New.
7638 (linux_target_ops): Install it.
7639 * linux-low.h (struct linux_target_ops): New field emit_ops.
7641 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7643 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7644 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7646 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7647 Stan Shebs <stan@codesourcery.com>
7649 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7650 (all): Depend on $(extra_libraries).
7651 (install-only): Install the IPA.
7652 (IPA_OBJS, IPA_LIB): New.
7653 (clean): Remove the IPA lib.
7654 (IPAGENT_CFLAGS): New.
7655 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7656 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7657 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7658 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7659 * configure.ac: Check for atomic builtins support in the compiler.
7660 (IPA_DEPFILES, extra_libraries): Define.
7661 * configure.srv (ipa_obj): Add description.
7662 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7663 (i[34567]86-*-linux*): Set ipa_obj.
7664 (x86_64-*-linux*): Set ipa_obj.
7665 * linux-low.c (stabilizing_threads): New.
7666 (supports_fast_tracepoints): New.
7667 (linux_detach): Stabilize threads before detaching.
7668 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7669 the lwp is either not stabilizing, or is moving out of a jump pad.
7670 (linux_fast_tracepoint_collecting): New.
7671 (maybe_move_out_of_jump_pad): New.
7672 (enqueue_one_deferred_signal): New.
7673 (dequeue_one_deferred_signal): New.
7674 (linux_wait_for_event_1): If moving out of a jump pad, defer
7675 pending signals to later.
7676 (linux_stabilize_threads): New.
7677 (linux_wait_1): Check if threads need moving out of jump pads, and
7679 (stuck_in_jump_pad_callback): New.
7680 (move_out_of_jump_pad_callback): New.
7682 (linux_resume_one_lwp): Handle moving out of jump pads.
7683 (linux_set_resume_request): Dequeue deferred signals.
7684 (need_step_over_p): Also step over fast tracepoint jumps.
7685 (start_step_over): Also uninsert fast tracepoint jumps.
7686 (finish_step_over): Also reinsert fast tracepoint jumps.
7687 (linux_install_fast_tracepoint_jump): New.
7688 (linux_target_ops): Install linux_stabilize_threads and
7689 linux_install_fast_tracepoint_jump_pad.
7690 * linux-low.h (linux_target_ops) <get_thread_area,
7691 install_fast_tracepoint_jump_pad>: New fields.
7692 (struct lwp_info) <collecting_fast_tracepoint,
7693 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7694 (linux_get_thread_area): Declare.
7695 * linux-x86-low.c (jump_insn): New.
7696 (x86_get_thread_area): New.
7697 (append_insns): New.
7699 (amd64_install_fast_tracepoint_jump_pad): New.
7700 (i386_install_fast_tracepoint_jump_pad): New.
7701 (x86_install_fast_tracepoint_jump_pad): New.
7702 (the_low_target): Install x86_get_thread_area and
7703 x86_install_fast_tracepoint_jump_pad.
7704 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7705 (struct fast_tracepoint_jump): New.
7706 (fast_tracepoint_jump_insn): New.
7707 (fast_tracepoint_jump_shadow): New.
7708 (find_fast_tracepoint_jump_at): New.
7709 (fast_tracepoint_jump_here): New.
7710 (delete_fast_tracepoint_jump): New.
7711 (set_fast_tracepoint_jump): New.
7712 (uninsert_fast_tracepoint_jumps_at): New.
7713 (reinsert_fast_tracepoint_jumps_at): New.
7714 (set_breakpoint_at): Use write_inferior_memory.
7715 (uninsert_raw_breakpoint): Use write_inferior_memory.
7716 (check_mem_read): Mask out fast tracepoint jumps.
7717 (check_mem_write): Mask out fast tracepoint jumps.
7718 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7719 (set_fast_tracepoint_jump): Declare.
7720 (delete_fast_tracepoint_jump)
7721 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7722 (reinsert_fast_tracepoint_jumps_at): Declare.
7723 * regcache.c: Don't compile many functions when building the
7724 in-process agent library.
7725 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7726 the register buffer in the heap.
7727 (free_register_cache): If the register buffer isn't owned by the
7728 regcache, don't free it.
7729 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7730 pre-existing register caches.
7731 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7733 (convert_ascii_to_int): : Constify `from' parameter type.
7734 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7735 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7736 the needed buffer in-place.
7737 (relocate_instruction): New.
7738 * server.c (handle_query) <qSymbols>: If the target supports
7739 tracepoints, give it a chance of looking up symbols. Report
7740 support for fast tracepoints.
7741 (handle_status): Stabilize threads.
7742 (process_serial_event): Adjust.
7743 * server.h (struct fast_tracepoint_jump): Forward declare.
7744 (struct process_info) <fast_tracepoint_jumps>: New field.
7745 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7746 (decode_X_packet, decode_M_packet): Adjust.
7747 (relocate_instruction): Declare.
7748 (in_process_agent_loaded): Declare.
7749 (tracepoint_look_up_symbols): Declare.
7750 (struct fast_tpoint_collect_status): Declare.
7751 (fast_tracepoint_collecting): Declare.
7752 (force_unlock_trace_buffer): Declare.
7753 (handle_tracepoint_bkpts): Declare.
7754 (initialize_low_tracepoint)
7755 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7756 * target.h (struct target_ops) <stabilize_threads,
7757 install_fast_tracepoint_jump_pad>: New fields.
7758 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7759 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7760 [HAVE_STDINT_H]: Include stdint.h.
7761 (trace_debug_1): Rename to ...
7762 (trace_vdebug): ... this.
7763 (trace_debug): Rename to ...
7764 (trace_debug_1): ... this. Add `level' parameter.
7766 (ATTR_USED, ATTR_NOINLINE): New.
7767 (IP_AGENT_EXPORT): New.
7768 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7769 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7770 (about_to_request_buffer_space, trace_buffer_is_full)
7771 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7772 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7773 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7774 (traceframe_write_count, traceframes_created)
7775 (trace_state_variables)
7776 New renaming defines.
7777 (struct ipa_sym_addresses): New.
7778 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7780 (ipa_sym_addrs): New.
7781 (all_tracepoint_symbols_looked_up): New.
7782 (in_process_agent_loaded): New.
7783 (write_e_ipa_not_loaded): New.
7784 (maybe_write_ipa_not_loaded): New.
7785 (tracepoint_look_up_symbols): New.
7786 (debug_threads) [IN_PROCESS_AGENT]: New.
7787 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7788 (UNKNOWN_SIDE_EFFECTS): New.
7789 (stop_tracing): New.
7790 (flush_trace_buffer): New.
7791 (stop_tracing_bkpt): New.
7792 (flush_trace_buffer_bkpt): New.
7793 (read_inferior_integer): New.
7794 (read_inferior_uinteger): New.
7795 (read_inferior_data_pointer): New.
7796 (write_inferior_data_pointer): New.
7797 (write_inferior_integer): New.
7798 (write_inferior_uinteger): New.
7799 (struct collect_static_trace_data_action): Delete.
7800 (enum tracepoint_type): New.
7801 (struct tracepoint) <type>: New field `type'.
7802 <actions_str, step_actions, step_actions_str>: Only include in
7804 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7805 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7806 (tracepoints): Use IP_AGENT_EXPORT.
7807 (last_tracepoint): Don't include in the IPA.
7808 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7809 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7810 (alloced_trace_state_variables): New.
7811 (trace_state_variables): Use IP_AGENT_EXPORT.
7812 (traceframe_t): Delete unused variable.
7813 (circular_trace_buffer): Don't include in the IPA.
7814 (trace_buffer_start): Delete.
7815 (struct trace_buffer_control): New.
7816 (trace_buffer_free): Delete.
7817 (struct ipa_trace_buffer_control): New.
7818 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7819 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7821 (trace_buffer_ctrl): New.
7822 (TRACE_BUFFER_CTRL_CURR): New.
7823 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7824 Reimplement as macros.
7825 (trace_buffer_wrap): Delete.
7826 (traceframe_write_count, traceframe_read_count)
7827 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7828 (struct tracepoint_hit_ctx) <type>: New field.
7829 (struct fast_tracepoint_ctx): New.
7830 (memory_barrier): New.
7832 (record_tracepoint_error): Update atomically in the IPA.
7833 (clear_inferior_trace_buffer): New.
7834 (about_to_request_buffer_space): New.
7835 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7836 updating the same buffer.
7837 (add_tracepoint): Default the tracepoint's type to trap
7838 tracepoint, and orig_size to -1.
7839 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7841 (create_trace_state_variable): New parameter `gdb'. Handle it.
7842 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7843 (cmd_qtdp): Handle fast tracepoints.
7845 (max_jump_pad_size): New.
7846 (gdb_jump_pad_head): New.
7847 (get_jump_space_head): New.
7848 (claim_jump_space): New.
7849 (sort_tracepoints): New.
7850 (MAX_JUMP_SIZE): New.
7851 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7853 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7854 support. Upload fast traceframes, and delete internal IPA
7856 (stop_tracing_handler): New.
7857 (flush_trace_buffer_handler): New.
7858 (cmd_qtstop): Upload fast tracepoints.
7859 (response_tracepoint): Handle fast tracepoints.
7860 (tracepoint_finished_step): Upload fast traceframes. Set the
7861 tracepoint hit context's tracepoint type.
7862 (handle_tracepoint_bkpts): New.
7863 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7864 type. Add comment about fast tracepoints.
7865 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7866 non-existing action_str field.
7867 (get_context_regcache): Handle fast tracepoints.
7868 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7870 (fast_tracepoint_from_jump_pad_address): New.
7871 (fast_tracepoint_from_ipa_tpoint_address): New.
7872 (collecting_t): New.
7873 (force_unlock_trace_buffer): New.
7874 (fast_tracepoint_collecting): New.
7877 (write_inferior_data_ptr): New.
7878 (target_tp_heap): New.
7879 (target_malloc): New.
7880 (download_agent_expr): New.
7882 (download_tracepoints): New.
7883 (download_trace_state_variables): New.
7884 (upload_fast_traceframes): New.
7885 (IPA_FIRST_TRACEFRAME): New.
7886 (IPA_NEXT_TRACEFRAME_1): New.
7887 (IPA_NEXT_TRACEFRAME): New.
7888 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7889 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7890 (gdb_jump_pad_buffer_end): New.
7891 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7892 (initialize_tracepoint): Adjust.
7893 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7894 buffer. Initialize the low module.
7895 * utils.c (PREFIX, TOOLNAME): New.
7896 (malloc_failure): Use PREFIX.
7897 (error): In the IPA, an error causes an exit.
7898 (fatal, warning): Use PREFIX.
7899 (internal_error): Use TOOLNAME.
7900 (NUMCELLS): Increase to 10.
7901 * configure, config.in: Regenerate.
7903 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7905 * server.c (handle_query) <qSupported>: Do two passes over the
7906 qSupported string to avoid nesting strtok.
7908 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7910 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7912 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7914 * configure: Regenerate.
7915 * proc-service.list: New.
7917 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7919 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7922 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7924 * gdbreplay.c (remote_open): Check error return from socket() call by
7925 its equality to -1 not by it being negative.
7926 * remote-utils.c (remote_open): Likewise.
7928 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7930 * config.h: Regenerate.
7932 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7934 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7935 doesn't provide PTRACE_GET_THREAD_AREA.
7937 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7939 * linux-m68k-low.c: Include <asm/ptrace.h>
7940 (ps_get_thread_area): Implement.
7942 2010-05-03 Doug Evans <dje@google.com>
7944 * event-loop.c (struct callback_event): New struct.
7945 (callback_list): New global.
7946 (append_callback_event, delete_callback_event): New functions.
7947 (process_callback): New function.
7948 (start_event_loop): Call it.
7949 * remote-utils.c (NOT_SCHEDULED): Define.
7950 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7951 moved out of readchar.
7952 (readchar): Rewrite. Call reschedule before returning.
7953 (reset_readchar): New function.
7954 (remote_close): Call it.
7955 (process_remaining, reschedule): New functions.
7956 * server.h (callback_handler_func): New typedef.
7957 (append_callback_event, delete_callback_event): Declare.
7959 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7961 * proc-service.c (ps_pglobal_lookup): Use
7962 thread_db_look_up_one_symbol.
7963 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7964 parameter. Use it instead of all_symbols_looked_up.
7965 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7967 (all_symbols_looked_up): Don't declare.
7968 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7969 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7971 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7972 Set all_symbols_looked_up here.
7973 (thread_db_look_up_one_symbol): New.
7974 (thread_db_get_tls_address): Adjust.
7975 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7976 thread_db object on the heap, and tentatively set it in the
7978 (thread_db_init): Don't set all_symbols_looked_up here.
7979 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7981 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7983 * linux-low.c (linux_kill, linux_detach): Adjust.
7984 (status_pending_p_callback): Remove redundant statement. Check
7985 for !TARGET_WAITIKIND_IGNORE, instead of
7986 TARGET_WAITKIND_STOPPED.
7987 (handle_tracepoints): Make sure LWP is locked. Adjust.
7988 (linux_wait_for_event_1): Adjust.
7989 (linux_cancel_breakpoints): New.
7990 (unsuspend_one_lwp): New.
7991 (unsuspend_all_lwps): New.
7992 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7993 (send_sigstop_callback): Change return type to int, add new
7994 `except' parameter and handle it.
7995 (suspend_and_send_sigstop_callback): New.
7996 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7997 pass them down. If SUSPEND, also increment the lwp's suspend
7999 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8000 (need_step_over_p): Don't consider suspended LWPs.
8001 (start_step_over): Adjust.
8002 (proceed_one_lwp): Change return type to int, add new `except'
8003 parameter and handle it.
8004 (unsuspend_and_proceed_one_lwp): New.
8005 (proceed_all_lwps): Use find_inferior instead of
8007 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8008 also decrement the suspend count of LWPs. Pass `except' down,
8009 instead of hacking its suspend count.
8010 (linux_pause_all): Add `freeze' parameter. Adjust.
8011 (linux_unpause_all): New.
8012 (linux_target_ops): Install linux_unpause_all.
8013 * server.c (handle_status): Adjust.
8014 * target.h (struct target_ops): New fields `unpause_all' and
8015 `cancel_breakpoints'. Add new parameter to `pause_all'.
8016 (pause_all): Add new `freeze' parameter.
8018 (cancel_breakpoints): New.
8019 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8021 (cmd_qtstart): Pause threads.
8022 (stop_tracing): Pause threads, and cancel breakpoints.
8023 * win32-low.c (win32_target_ops): Adjust.
8025 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8027 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8028 the inferior right away from here...
8029 (linux_wait_1): ... to here, and adjust to check the thread's
8030 last_resume_kind instead of the lwp's step or stop_expected flags.
8032 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8034 * README: Use consistent `GDB' and `GDBserver' spellings.
8036 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8038 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8039 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8040 (linux_detach_one_lwp): Assume the lwp is stopped.
8041 (any_thread_of): Delete.
8042 (linux_detach): Stop all lwps here. Don't blindly delete all
8044 (delete_lwp_callback): New.
8045 (linux_mourn): Delete all lwps of the process that is gone.
8046 (linux_wait_1): Don't delete the last lwp of the process here.
8047 * mem-break.h (mark_breakpoints_out): Declare.
8048 * mem-break.c (mark_breakpoints_out): New.
8049 (free_all_breakpoints): Use it.
8050 * server.c (handle_target_event): If the process is gone, mark
8052 * thread-db.c (struct thread_db) <create_bp>: New field.
8053 (thread_db_enable_reporting): Fix prototype. Store a thread event
8054 breakpoint reference in the thread_db struct.
8055 (thread_db_load_search): Clear the thread_db object.
8056 (try_thread_db_load_1): Ditto.
8057 (switch_to_process): New.
8058 (disable_thread_event_reporting): Use it.
8059 (remove_thread_event_breakpoints): New.
8060 (thread_db_detach, thread_db_mourn): Use it.
8062 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8064 * linux-low.c (linux_enable_event_reporting): New.
8065 (linux_wait_for_event_1, handle_extended_wait): Use it.
8067 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8069 * linux-low.c (linux_kill_one_lwp, linux_kill)
8070 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8071 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8072 SIGSTOP even if the LWP is stopped.
8073 (send_sigstop_callback): New.
8074 (stop_all_lwps): Use send_sigstop_callback instead.
8075 (linux_resume_one_thread): Adjust.
8076 (proceed_one_lwp): Still proceed an LWP that the client has
8077 requested to stop, if we haven't reported it as stopped yet. Make
8078 sure that LWPs the client want stopped, have a pending SIGSTOP.
8080 2010-04-26 Doug Evans <dje@google.com>
8082 * server.c (handle_general_set): Make static.
8084 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8085 Print received char after testing for error/eof instead of before.
8086 (input_interrupt): Tweak comment.
8088 2010-04-23 Doug Evans <dje@google.com>
8090 * server.c (start_inferior): Print inferior argv if --debug.
8092 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8094 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8095 * nto-x86-low.c: Include server.h
8097 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8099 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8100 be consistent with other sources of this directory.
8101 (init_registers_amd64): Correct name of source file of this function
8104 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8106 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8109 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8111 * win32-i386-low.c: Add 64-bit support.
8112 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8113 (init_registers_amd64): Declare.
8114 (mappings): Add 64-bit version of array.
8115 (init_windows_x86): New function.
8116 (the_low_target): Change init_arch field to init_windows_x86.
8118 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8120 * win32-low.c: Adapt to support also 64-bit architecture.
8121 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8122 (get_image_name): Use SIZE_T type for local variable `done'.
8123 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8124 (toolhelp_get_dll_name): Idem.
8125 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8126 Use uintptr_t typecast to avoid warning.
8127 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8128 (handle_exception): Use phex_nz to avoid warning.
8129 (win32_wait): Remove unused local variable `process'.
8131 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8133 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8136 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8138 * configure.ac: Use `ws2_32' library for srv_mingw.
8139 * configure: Regenerate.
8140 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8141 * remote-utils.c: Likewise.
8143 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8145 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8146 if __x86_64__ is defined.
8148 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8150 * configure: Regenerate.
8152 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8154 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8155 * target.h (target_ops): New get_tib_address field.
8156 * win32-low.h (win32_thread_info): Add thread_local_base field.
8157 * win32-low.c (child_add_thread): Add tlb argument.
8158 Set thread_local_base field to TLB.
8159 (get_child_debug_event): Adapt to child_add_thread change.
8160 (win32_get_tib_address): New function.
8161 (win32_target_ops): Set get_tib_address field to
8162 win32_get_tib_address.
8163 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8165 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8167 * linux-low.c (linux_mourn): Also remove the process.
8168 * server.c (handle_target_event): Don't remove the process here.
8169 * nto-low.c (nto_mourn): New.
8170 (nto_target_ops): Install it.
8171 * spu-low.c (spu_mourn): New.
8172 (spu_target_ops): Install it.
8173 * win32-low.c (win32_mourn): New.
8174 (win32_target_ops): Install it.
8176 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8178 * server.h (buffer_xml_printf): Remove redundant `;'.
8180 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8182 * regcache.c (set_register_cache): Invalidate regcaches before
8183 changing the register cache layout.
8184 (regcache_invalidate_one): Allow a NULL regcache.
8185 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8186 regcaches before changing the register cache layout or the target
8189 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8191 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8192 variable warning on Linux/x86-64.
8194 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8196 GDBserver disconnected tracing support.
8198 * linux-low.c (linux_remove_process): Delete.
8199 (add_lwp): Don't set last_resume_kind here.
8200 (linux_kill): Use `mourn'.
8201 (linux_detach): Use `thread_db_detach', and `mourn'.
8203 (linux_attach_lwp_1): Adjust comment.
8204 (linux_attach): last_resume_kind moved the thread_info; adjust.
8205 (status_pending_p_callback): Adjust.
8206 (linux_wait_for_event_1): Adjust.
8207 (count_events_callback, select_singlestep_lwp_callback)
8208 (select_event_lwp_callback, cancel_breakpoints_callback)
8209 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8210 (proceed_one_lwp): Adjust.
8211 (linux_async): Add debug output.
8212 (linux_thread_stopped): New.
8213 (linux_pause_all): New.
8214 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8216 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8217 (thread_db_free): Delete declaration.
8218 (thread_db_detach, thread_db_mourn): Declare.
8219 * thread-db.c (thread_db_init): Use thread_db_mourn.
8220 (thread_db_free): Delete, split in two.
8221 (disable_thread_event_reporting): New.
8222 (thread_db_detach): New.
8223 (thread_db_mourn): New.
8225 * server.h (struct thread_info) <last_resume_kind>: New field.
8226 <attached>: Add comment.
8227 <gdb_detached>: New field.
8228 (handler_func): Change return type to int.
8229 (handle_serial_event, handle_target_event): Ditto.
8230 (gdb_connected): Declare.
8232 (disconnected_tracing): Declare.
8233 (stop_tracing): Declare.
8235 * server.c (handle_query) <qSupported>: Report support for
8236 disconnected tracing.
8237 (queue_stop_reply_callback): Account for running threads.
8238 (gdb_wants_thread_stopped): New.
8239 (gdb_wants_all_threads_stopped): New.
8240 (gdb_reattached_process): New.
8241 (handle_status): Clear the `gdb_detached' flag of all processes.
8242 In all-stop, stop all threads.
8243 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8244 (process_serial_event): If the remote connection breaks, or if an
8245 exit was forced with "monitor exit", force an event loop exit.
8246 Handle disconnected tracing on detach.
8247 (handle_serial_event): Adjust.
8248 (handle_target_event): If GDB isn't connected, forward events back
8249 to the inferior, unless the last process exited, in which case,
8250 exit gdbserver. Adjust interface.
8252 * remote-utils.c (remote_open): Don't block in accept. Instead
8253 register an event loop source on the listen socket file
8254 descriptor. Refactor bits into ...
8255 (listen_desc): ... this new global.
8256 (gdb_connected): ... this new function.
8257 (enable_async_notification): ... this new function.
8258 (handle_accept_event): ... this new function.
8259 (remote_close): Clear remote_desc.
8261 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8263 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8265 (mourn_inferior): Define.
8266 (target_process_qsupported): Avoid the dangling else problem.
8267 (thread_stopped): Define.
8268 (pause_all): Define.
8269 (target_waitstatus_to_string): Declare.
8270 * target.c (target_waitstatus_to_string): New.
8272 * tracepoint.c (tracing): Make extern.
8273 (disconnected_tracing): New.
8274 (stop_tracing): Make extern. Handle tracing stops due to GDB
8276 (cmd_qtdisconnected): New.
8277 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8278 (handle_tracepoint_general_set): Handle QTDisconnected.
8280 * event-loop.c (event_handler_func): Change return type to int.
8281 (process_event): Bail out if the event handler wants the event
8283 (handle_file_event): Ditto.
8284 (start_event_loop): Bail out if the event handler wants the event
8287 * nto-low.c (nto_target_ops): Adjust.
8288 * spu-low.c (spu_wait): Don't remove the process here.
8289 (spu_target_ops): Adjust.
8290 * win32-low.c (win32_wait): Don't remove the process here.
8291 (win32_target_ops): Adjust.
8293 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8295 * regcache.c (realloc_register_cache): Invalidate inferior's
8296 regcache before recreating it.
8298 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8300 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8302 2010-04-09 Stan Shebs <stan@codesourcery.com>
8303 Pedro Alves <pedro@codesourcery.com>
8305 * server.h (LONGEST): New.
8306 (struct thread_info) <while_stepping>: New field.
8307 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8309 (initialize_tracepoint, handle_tracepoint_general_set)
8310 (handle_tracepoint_query, tracepoint_finished_step)
8311 (tracepoint_was_hit, release_while_stepping_state_list):
8312 (current_traceframe): Declare.
8313 * server.c (handle_general_set): Handle tracepoint packets.
8315 (write_memory): New.
8316 (handle_search_memory_1): Use read_memory.
8317 (handle_query): Report support for conditional tracepoints, trace
8318 state variables, and tracepoint sources. Handle tracepoint
8320 (main): Initialize the tracepoints module.
8321 (process_serial_event): Handle traceframe reads/writes.
8323 * linux-low.c (handle_tracepoints): New.
8324 (linux_wait_1): Call it.
8325 (linux_resume_one_lwp): Handle while-stepping.
8326 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8327 (linux_target_ops): Install them.
8328 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8330 * linux-x86-low.c (x86_supports_tracepoints): New.
8331 (the_low_target). Install it.
8333 * mem-break.h (delete_breakpoint): Declare.
8334 * mem-break.c (delete_breakpoint): Make external.
8336 * target.h (struct target_ops): Add `supports_tracepoints',
8337 `read_pc', and `write_pc' fields.
8338 (target_supports_tracepoints): Define.
8339 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8342 * regcache.h (struct regcache) <registers_owned>: New field.
8343 (init_register_cache, regcache_cpy): Declare.
8344 (regcache_read_pc, regcache_write_pc): Declare.
8345 (register_cache_size): Declare.
8346 (supply_regblock): Declare.
8347 * regcache.c (init_register_cache): New.
8348 (new_register_cache): Use it.
8349 (regcache_cpy): New.
8350 (register_cache_size): New.
8351 (supply_regblock): New.
8352 (regcache_read_pc, regcache_write_pc): New.
8354 * tracepoint.c: New.
8356 * Makefile.in (OBS): Add tracepoint.o.
8357 (tracepoint.o): New rule.
8359 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8361 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8363 (i386-mmx.c): Likewise.
8364 (i386-mmx-linux.o): Likewise.
8365 (i386-mmx-linux.c): Likewise.
8367 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8368 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8369 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8370 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8372 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8373 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8374 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8376 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8378 * Makefile.in (clean): Updated.
8380 (i386-avx.c): Likewise.
8381 (i386-avx-linux.o): Likewise.
8382 (i386-avx-linux.c): Likewise.
8383 (amd64-avx.o): Likewise.
8384 (amd64-avx.c): Likewise.
8385 (amd64-avx-linux.o): Likewise.
8386 (amd64-avx-linux.c): Likewise.
8388 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8389 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8390 (srv_amd64_regobj): Add amd64-avx.o.
8391 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8392 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8393 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8394 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8395 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8396 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8397 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8399 * i387-fp.c: Include "i386-xstate.h".
8401 (i387_cache_to_xsave): Likewise.
8402 (i387_xsave_to_cache): Likewise.
8403 (x86_xcr0): Likewise.
8405 * i387-fp.h (i387_cache_to_xsave): Likewise.
8406 (i387_xsave_to_cache): Likewise.
8407 (x86_xcr0): Likewise.
8409 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8410 * linux-crisv32-low.c (target_regsets): Likewise.
8411 * linux-m68k-low.c (target_regsets): Likewise.
8412 * linux-mips-low.c (target_regsets): Likewise.
8413 * linux-ppc-low.c (target_regsets): Likewise.
8414 * linux-s390-low.c (target_regsets): Likewise.
8415 * linux-sh-low.c (target_regsets): Likewise.
8416 * linux-sparc-low.c (target_regsets): Likewise.
8417 * linux-xtensa-low.c (target_regsets): Likewise.
8419 * linux-low.c: Include <sys/uio.h>.
8420 (regsets_fetch_inferior_registers): Support nt_type.
8421 (regsets_store_inferior_registers): Likewise.
8422 (linux_process_qsupported): New.
8423 (linux_target_ops): Add linux_process_qsupported.
8425 * linux-low.h (regset_info): Add nt_type.
8426 (linux_target_ops): Add process_qsupported.
8428 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8430 (init_registers_i386_avx_linux): New.
8431 (init_registers_amd64_avx_linux): Likewise.
8432 (xmltarget_i386_linux_no_xml): Likewise.
8433 (xmltarget_amd64_linux_no_xml): Likewise.
8434 (PTRACE_GETREGSET): Likewise.
8435 (PTRACE_SETREGSET): Likewise.
8436 (x86_fill_xstateregset): Likewise.
8437 (x86_store_xstateregset): Likewise.
8438 (use_xml): Likewise.
8439 (x86_linux_update_xmltarget): Likewise.
8440 (x86_linux_process_qsupported): Likewise.
8441 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8442 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8443 init_registers_i386_linux here. Call
8444 x86_linux_update_xmltarget.
8445 (the_low_target): Add x86_linux_process_qsupported.
8447 * server.c (handle_query): Call target_process_qsupported.
8449 * target.h (target_ops): Add process_qsupported.
8450 (target_process_qsupported): New.
8452 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8454 * inferiors.c (add_thread): Set last_status kind to
8455 TARGET_WAITKIND_IGNORE.
8456 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8457 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8458 (linux_wait_1): Move `thread' local definition to block that uses
8459 it. Don't NULL initialize `event_child'.
8460 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8461 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8462 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8464 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8466 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8467 an extended waitstatus, or by a watchpoint.
8468 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8469 thread was stepping or has been stopped by a watchpoint.
8471 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8473 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8474 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8475 of another, then delete the previous, and validate all
8477 (validate_inserted_breakpoint): New.
8478 (delete_disabled_breakpoints): New.
8479 (validate_breakpoints): New.
8480 (check_mem_read): Validate breakpoints before trusting their
8481 shadow. Delete disabled breakpoints.
8482 (check_mem_write): Validate breakpoints before trusting they
8483 should be inserted. Delete disabled breakpoints.
8484 * mem-break.h (validate_breakpoints):
8485 * server.c (handle_query): Validate breakpoints when we see a
8488 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8490 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8491 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8492 if we could tell there's a GDB breakpoint at stop_pc.
8493 (need_step_over_p): Don't do a step over if we find a GDB
8494 breakpoint at the resume PC.
8496 * mem-break.c (struct raw_breakpoint): New.
8497 (enum bkpt_type): New type `gdb_breakpoint'.
8498 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8499 fields. New field `raw'.
8500 (find_raw_breakpoint_at): New.
8501 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8503 (set_breakpoint_at): Adjust.
8504 (delete_raw_breakpoint): New.
8505 (release_breakpoint): New.
8506 (delete_breakpoint): Rename to...
8507 (delete_breakpoint_1): ... this. Add proc parameter. Use
8508 release_breakpoint. Return ENOENT.
8509 (delete_breakpoint): Reimplement.
8510 (find_breakpoint_at): Delete.
8511 (find_gdb_breakpoint_at): New.
8512 (delete_breakpoint_at): Delete.
8513 (set_gdb_breakpoint_at): New.
8514 (delete_gdb_breakpoint_at): New.
8515 (gdb_breakpoint_here): New.
8516 (set_reinsert_breakpoint): Use release_breakpoint.
8517 (uninsert_breakpoint): Rename to ...
8518 (uninsert_raw_breakpoint): ... this.
8519 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8520 (reinsert_raw_breakpoint): Change parameter type to
8522 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8524 (check_breakpoints): Adjust. Use release_breakpoint.
8525 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8526 (breakpoint_inserted_here): Ditto.
8527 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8528 Don't trust the breakpoint's shadow if it is not inserted.
8529 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8530 (delete_all_breakpoints): Adjust.
8531 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8532 use delete_breakpoint_1.
8534 * mem-break.h (breakpoints_supported): Delete declaration.
8535 (set_gdb_breakpoint_at): Declare.
8536 (gdb_breakpoint_here): Declare.
8537 (delete_breakpoint_at): Delete.
8538 (delete_gdb_breakpoint_at): Declare.
8540 * server.h (struct raw_breakpoint): Forward declare.
8541 (struct process_info): New field `raw_breakpoints'.
8543 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8546 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8548 * linux-low.c (status_pending_p_callback): Fix comment.
8549 (linux_wait_for_event_1): Move most of the internal breakpoint
8550 handling from here...
8551 (linux_wait_1): ... to here.
8552 (count_events_callback): New.
8553 (select_singlestep_lwp_callback): New.
8554 (select_event_lwp_callback): New.
8555 (cancel_breakpoints_callback): New.
8556 (select_event_lwp): New.
8557 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8558 priority to all LWPs that have had events that should be reported
8559 to the client. Cancel breakpoints when about to reporting the
8560 event to the client, not while stopping lwps. No longer cancel
8561 finished single-steps here.
8562 (cancel_finished_single_step): Delete.
8563 (cancel_finished_single_steps): Delete.
8565 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8567 * mem-break.c (enum bkpt_type): New.
8568 (struct breakpoint): New field `type'.
8569 (set_breakpoint_at): Change return type to struct breakpoint
8570 pointer. Set type to `other_breakpoint' by default.
8571 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8572 in the breakpoint list.
8573 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8574 (reinsert_breakpoint): Rename to ...
8575 (reinsert_raw_breakpoint): ... this.
8576 (reinsert_breakpoints_at): Adjust.
8577 * mem-break.h (struct breakpoint): Declare.
8578 (set_breakpoint_at): Change return type to struct breakpoint
8581 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8583 * server.c (handle_query): Assign, not compare.
8585 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8587 Teach linux gdbserver to step-over-breakpoints.
8589 * linux-low.c (can_hardware_single_step): New.
8590 (supports_breakpoints): New.
8591 (handle_extended_wait): If stopping threads, read the stop pc of
8594 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8595 low target doesn't support retrieving the PC.
8596 (add_lwp): Set last_resume_kind to resume_continue.
8597 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8598 (linux_attach): Don't clear stop_expected. Set the lwp's
8599 last_resume_kind to resume_stop.
8600 (linux_detach_one_lwp): Don't check for removed breakpoints.
8601 (check_removed_breakpoint): Delete.
8602 (status_pending_p): Rename to ...
8603 (status_pending_p_callback): ... this. Don't check for removed
8604 breakpoints. Don't consider threads that are stopped from GDB's
8606 (linux_wait_for_lwp): Always read the stop_pc here.
8607 (cancel_breakpoint): New.
8608 (step_over_bkpt): New global.
8609 (linux_wait_for_event_1): Implement stepping over breakpoints.
8610 (gdb_wants_lwp_stopped): New.
8611 (gdb_wants_all_stopped): New.
8612 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8613 single-step traps here. Store the thread's last reported target
8615 (send_sigstop): Don't clear stop_expected. Always set it,
8617 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8618 (cancel_finished_single_step): New.
8619 (cancel_finished_single_steps): New.
8620 (wait_for_sigstop): Don't cancel finished single-step traps here.
8621 (linux_resume_one_lwp): Don't check for removed breakpoints.
8622 Don't set `step' on non-hardware step archs.
8623 (linux_set_resume_request): Ignore resume_stop requests if already
8624 stopping or stopped. Set the lwp's last_resume_kind.
8625 (resume_status_pending_p): Don't check for removed breakpoints.
8626 (need_step_over_p): New.
8627 (start_step_over): New.
8628 (finish_step_over): New.
8629 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8630 requests. Clear the thread's last reported target waitstatus.
8631 Don't use the `suspended' flag. Don't consider pending breakpoints.
8632 (linux_resume): Start a step-over if necessary.
8633 (proceed_one_lwp): New.
8634 (proceed_all_lwps): New.
8635 (unstop_all_lwps): New.
8636 * linux-low.h (struct lwp_info): Rewrite comment for the
8637 `suspended' flag. Add the `stop_pc' field. Delete the
8638 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8639 Add `'last_resume_kind' and `need_step_over' fields.
8640 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8641 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8642 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8643 (set_raw_breakpoint_at): New.
8644 (set_breakpoint_at): Rewrite to use it.
8645 (reinsert_breakpoint_handler): Delete.
8646 (set_reinsert_breakpoint): New.
8647 (reinsert_breakpoint_by_bp): Delete.
8648 (delete_reinsert_breakpoints): New.
8649 (uninsert_breakpoint): Rewrite.
8650 (uninsert_breakpoints_at): New.
8651 (reinsert_breakpoint): Rewrite.
8652 (reinsert_breakpoints_at): New.
8653 (check_breakpoints): Rewrite.
8654 (breakpoint_here): New.
8655 (breakpoint_inserted_here): New.
8656 (check_mem_read): Adjust.
8657 * mem-break.h (breakpoints_supported, breakpoint_here)
8658 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8659 (reinsert_breakpoint_by_bp): Delete declaration.
8660 (delete_reinsert_breakpoints): Declare.
8661 (reinsert_breakpoint): Delete declaration.
8662 (reinsert_breakpoints_at): Declare.
8663 (uninsert_breakpoint): Delete declaration.
8664 (uninsert_breakpoints_at): Declare.
8665 (check_breakpoints): Adjust prototype.
8666 * server.h: Adjust include order.
8667 (struct thread_info): Declare here. Add a `last_status' field.
8669 2010-03-23 Michael Snyder <msnyder@vmware.com>
8671 * server.c (crc32): New function.
8672 (handle_query): Add handling for 'qCRC:' request.
8674 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8676 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8677 lwp had been stopped by a watchpoint.
8679 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8681 * server.h (internal_error): Declare.
8682 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8683 * utils.c (internal_error): New function.
8685 2010-03-15 Andreas Schwab <schwab@redhat.com>
8687 * configure.srv: Fix typo setting srv_regobj.
8689 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8691 * linux-low.c (fetch_register): Avoid passing a non string literal
8693 (usr_store_inferior_registers): Ditto.
8695 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8697 * linux-low.c (linux_write_memory): Bail out early if peeking
8700 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8702 * linux-low.h (struct lwp_info): New fields
8703 `stopped_by_watchpoint' and `stopped_data_address'.
8704 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8705 here, and cache them in the lwp object.
8706 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8708 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8710 (linux_stopped_by_watchpoint): Rewrite.
8711 (linux_stopped_data_address): Rewrite.
8713 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8715 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8716 switching the current inferior, not before.
8718 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8720 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8721 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8722 i386-linux.c and amd64-linux.c.
8723 (reg-i386.o): Removed.
8724 (reg-i386.c): Likewise.
8725 (reg-i386-linux.o): Likewise.
8726 (reg-i386-linux.c): Likewise.
8727 (reg-x86-64.o): Likewise.
8728 (reg-x86-64.c): Likewise.
8729 (reg-x86-64-linux.o): Likewise.
8730 (reg-x86-64-linux.c): Likewise.
8733 (i386-linux.o): Likewise.
8734 (i386-linux.c): Likewise.
8735 (amd64.o): Likewise.
8736 (amd64.c): Likewise.
8737 (amd64-linux.o): Likewise.
8738 (amd64-linux.c): Likewise.
8740 * configure.srv (srv_i386_regobj): New.
8741 (srv_i386_linux_regobj): Likewise.
8742 (srv_amd64_regobj): Likewise.
8743 (srv_amd64_linux_regobj): Likewise.
8744 (srv_i386_32bit_xmlfiles): Likewise.
8745 (srv_i386_64bit_xmlfiles): Likewise.
8746 (srv_i386_xmlfiles): Likewise.
8747 (srv_amd64_xmlfiles): Likewise.
8748 (srv_i386_linux_xmlfiles): Likewise.
8749 (srv_amd64_linux_xmlfiles): Likewise.
8750 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8751 srv_xmlfiles to $srv_i386_xmlfiles.
8752 (i[34567]86-*-mingw32ce*): Likewise.
8753 (i[34567]86-*-mingw*): Likewise.
8754 (i[34567]86-*-nto*): Likewise.
8755 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8756 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8757 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8758 (x86_64-*-linux*): Likewise.
8760 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8761 (init_registers_amd64_linux): New.
8762 (x86_arch_setup): Replace init_registers_x86_64_linux with
8763 init_registers_amd64_linux.
8765 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8767 * configure.ac: Check for libdl. If it is not available link against
8768 static libthread_db.
8769 * configure: Regenerate.
8771 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8775 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8776 handing a read watchpoint.
8777 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8779 2010-02-12 Doug Evans <dje@google.com>
8781 * linux-low.c (linux_supports_tracefork_flag): Document.
8782 (linux_look_up_symbols): Add comment.
8784 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8786 * regcache.c (supply_register): Clear regcache if buf is NULL.
8788 2010-02-02 Nicolas Roche <roche@sourceware.org>
8789 Joel Brobecker <brobecker@adacore.com>
8791 * inferiors.c (find_inferior): Add function documentation.
8792 (unloaded_dll): Handle the case where the unloaded dll has not
8793 been previously registered in the dll list.
8795 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8797 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8798 (thumb2_breakpoint): New.
8799 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8801 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8803 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8804 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8807 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8809 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8811 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8813 * linux-s390-low.c (s390_collect_ptrace_register)
8814 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8816 2010-01-21 Doug Evans <dje@google.com>
8818 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8819 (PTRACE_ARG4_TYPE): New macro.
8820 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8821 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8822 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8823 (usr_store_inferior_registers): Ditto.
8824 (linux_read_memory, linux_write_memory): Ditto.
8825 (linux_test_for_tracefork): Ditto.
8827 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8828 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8830 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8832 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8835 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8837 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8838 prototype to take a regcache. Adjust.
8840 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8842 * regcache.h (struct thread_info): Forward declare.
8843 (struct regcache): New.
8844 (new_register_cache): Adjust prototype.
8845 (get_thread_regcache): Declare.
8846 (free_register_cache): Adjust prototype.
8847 (registers_to_string, registers_from_string): Ditto.
8848 (supply_register, supply_register_by_name, collect_register)
8849 (collect_register_as_string, collect_register_by_name): Ditto.
8850 * regcache.c (struct inferior_regcache_data): Delete.
8851 (get_regcache): Rename to ...
8852 (get_thread_regcache): ... this. Adjust. Switch inferior before
8854 (regcache_invalidate_one): Adjust.
8855 (regcache_invalidate): Fix prototype.
8856 (new_register_cache): Return the new register cache.
8857 (free_register_cache): Change prototype.
8858 (realloc_register_cache): Adjust.
8859 (registers_to_string): Change prototype to take a regcache. Adjust.
8860 (registers_from_string): Ditto.
8861 (register_data): Ditto.
8862 (supply_register): Ditto.
8863 (supply_register_by_name): Ditto.
8864 (collect_register): Ditto.
8865 (collect_register_as_string): Ditto.
8866 (collect_register_by_name): Ditto.
8867 * server.c (process_serial_event): Adjust.
8868 * linux-low.h (regset_fill_func, regset_store_func): Change
8870 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8872 * linux-low.c (get_stop_pc): Adjust.
8873 (check_removed_breakpoint): Adjust.
8874 (linux_wait_for_event): Adjust.
8875 (linux_resume_one_lwp): Adjust.
8876 (fetch_register): Add regcache parameter. Adjust.
8877 (usr_store_inferior_registers): Ditto.
8878 (regsets_fetch_inferior_registers): Ditto.
8879 (regsets_store_inferior_registers): Ditto.
8880 (linux_fetch_registers, linux_store_registers): Ditto.
8881 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8883 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8885 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8886 prototype to take a regcache.
8887 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8888 * remote-utils.c (convert_ascii_to_int, outreg)
8889 (prepare_resume_reply): Change prototype to take a regcache.
8891 * target.h (struct target_ops) <fetch_registers, store_registers>:
8892 Change prototype to take a regcache.
8893 (fetch_inferior_registers, store_inferior_registers): Change
8894 prototype to take a regcache. Adjust.
8895 * proc-service.c (ps_lgetregs): Adjust.
8896 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8897 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8898 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8899 take a regcache. Adjust.
8900 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8901 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8902 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8903 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8904 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8905 (cris_cannot_fetch_register):
8906 (cris_breakpoint_at): Change prototype to take a regcache.
8908 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8909 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8910 to take a regcache. Adjust.
8911 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8913 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8914 take a regcache. Adjust.
8915 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8916 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8917 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8918 * linux-mips-low.c (mips_get_pc):
8919 (mips_set_pc): Change prototype to take a regcache. Adjust.
8920 (mips_reinsert_addr): Adjust.
8921 (mips_collect_register): Change prototype to take a regcache.
8923 (mips_supply_register):
8924 (mips_collect_register_32bit, mips_supply_register_32bit)
8925 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8926 (mips_store_fpregset): Ditto.
8927 * linux-ppc-low.c (ppc_supply_ptrace_register)
8928 (ppc_supply_ptrace_register): Ditto.
8929 (parse_spufs_run): Adjust.
8930 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8931 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8932 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8933 take a regcache. Adjust.
8934 * linux-s390-low.c (s390_collect_ptrace_register)
8935 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8936 (s390_set_pc): Change prototype to take a regcache. Adjust.
8937 (s390_arch_setup): Adjust.
8938 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8939 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8940 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8941 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8942 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8944 (sparc_breakpoint_at): Adjust.
8945 * linux-xtensa-low.c (xtensa_fill_gregset):
8946 (xtensa_store_gregset):
8947 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8948 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8949 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8950 prototype to take a regcache. Adjust.
8951 * win32-arm-low.c (arm_fetch_inferior_register)
8952 (arm_store_inferior_register): Change prototype to take a
8954 * win32-i386-low.c (i386_fetch_inferior_register)
8955 (i386_store_inferior_register): Change prototype to take a
8957 * win32-low.c (child_fetch_inferior_registers)
8958 (child_store_inferior_registers): Change prototype to take a
8960 (win32_wait): Adjust.
8961 (win32_fetch_inferior_registers): Change prototype to take a
8963 (win32_store_inferior_registers): Adjust.
8964 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8965 store_inferior_register>: Change prototype to take a regcache.
8967 2010-01-20 Doug Evans <dje@google.com>
8969 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8971 (linux_wait_for_event1, linux_init_signals): Ditto.
8972 (W_STOPCODE): Provide definition if missing.
8974 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8976 * linux-low.c (linux_core_of_thread): New.
8977 (compare_ints, show_process, list_threads): New.
8978 (linux_qxfer_osdata): Report threads and cores.
8979 (linux_target_op): Register linux_core_of_thread.
8980 * remote-utils.c (prepare_resume_reply): Report the core.
8981 (buffer_xml_printf): Support %d specifier.
8982 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8984 (handle_query): Handle qXfer:threads. Announce availability
8986 * target.h (struct target_ops): New field core_of_thread.
8988 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8990 * Makefile.in (clean): Remove new generated files.
8991 (reg-s390.o, reg-s390.c): Remove rules.
8992 (reg-s390x.o, reg-s390x.c): Likewise.
8993 (s390-linux32.o, s390-linux32.c): Add rules.
8994 (s390-linux64.o, s390-linux64.c): Likewise.
8995 (s390x-linux64.o, s390x-linux64.c): Likewise.
8996 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8997 * linux-s390-low.c: Include <elf.h>.
8998 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8999 (init_registers_s390): Remove prototype.
9000 (init_registers_s390x): Likewise.
9001 (init_registers_s390_linux32): Add prototype.
9002 (init_registers_s390_linux64): Likewise.
9003 (init_registers_s390x_linux64): Likewise.
9004 (s390_num_regs_3264): New define.
9005 (s390_regmap_3264): New global variable.
9006 (s390_cannot_fetch_register): Remove obsolete check.
9007 (s390_cannot_store_register): Likewise.
9008 (s390_collect_ptrace_register): Handle upper/lower register halves.
9009 (s390_supply_ptrace_register): Likewise.
9010 (s390_fill_gregset): Update to register number changes.
9011 (s390_get_hwcap): New routine.
9012 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9013 Install appropriate regmap and register set.
9015 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9017 * server.c (gdbserver_version): Update copyright year to 2010.
9018 * gdbreplay.c (gdbreplay_version): Likewise.
9020 2009-12-28 Doug Evans <dje@google.com>
9022 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9023 elf/external.h. Include <elf.h> instead but only if necessary.
9025 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9027 * linux-low.c (linux_remove_process): Remove `detaching'
9028 parameter. Don't release/detach from thread_db here.
9029 (linux_kill): Release/detach from thread_db here, ...
9030 (linux_detach): ... and here, before actually detaching.
9031 (linux_wait_1): ... and here, when a process exits.
9032 * thread-db.c (any_thread_of): New.
9033 (thread_db_free): Switch the current inferior to a thread of the
9036 2009-12-21 Doug Evans <dje@google.com>
9038 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9040 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9041 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9042 warning ifndef __NR_tkill. Move setting of errno there too.
9043 Delete unnecessary resetting of errno after syscall.
9044 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9046 * configure.ac: Check for dladdr.
9047 * config.in: Regenerate.
9048 * configure: Regenerate.
9049 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9050 (try_thread_db_load): Update.
9052 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9054 2009-12-18 Doug Evans <dje@google.com>
9056 * event-loop.c: Include unistd.h if it exists.
9058 * linux-low.c (my_waitpid): Move definition away from being in
9059 between linux_tracefork_child/linux_test_for_tracefork.
9061 * gdb_proc_service.h (psaddr_t): Fix type.
9062 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9063 signature to match glibc.
9065 2009-12-16 Doug Evans <dje@google.com>
9067 * linux-low.c (linux_read_memory): Fix argument to read.
9069 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9071 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9072 events, don't leave current_inferior pointing at null.
9074 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9076 * win32-low.c (LOG): Delete.
9077 (OUTMSG): Output to stderr.
9078 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9079 on compile time LOG macro.
9080 (win32_wait): Fix debug output.
9082 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9084 * win32-low.c (win32_add_one_solib): If the dll name is
9085 "ntdll.dll", prepend the system directory to the dll path.
9087 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9089 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9091 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9092 Vladimir Prus <vladimir@codesourcery.com>
9094 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9095 * configure.ac: Check for __mcoldfire__ and set
9096 gdb_cv_m68k_is_coldfire.
9097 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9098 reg-cf.o and reg-m68k.o.
9099 * configure: Regenerated.
9101 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9103 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9104 Pass it to thread_db_free.
9105 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9106 proper `detaching' argument to linux_remove_process.
9107 * linux-low.h (thread_db_free): Add `detaching' parameter.
9108 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9110 (thread_db_free): Add `detaching' parameter. Only
9111 call td_ta_clear_event if detaching from process.
9113 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9115 * thread-db.c (thread_db_free): Fix typo.
9117 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9120 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9122 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9124 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9125 with an i686 compiler.
9126 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9128 * configure: Rebuilt.
9130 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9134 * server.c (handle_search_memory_1): Correct read_addr initialization
9135 in loop for searching subsequent chunks.
9137 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9139 * configure.ac: New --with-libthread-db option.
9140 * thread-db.c: Allow direct dependence on libthread_db.
9141 (thread_db_free): Adjust.
9142 * config.in: Regenerate.
9143 * configure: Likewise.
9145 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9148 * thread-db.c (attach_thread): New function.
9149 (maybe_attach_thread): Return success/failure.
9150 (find_new_threads_callback): Adjust.
9151 (thread_db_find_new_threads): Loop until no new threads.
9153 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9155 * proc-service.c (ps_lgetregs): Formatting.
9157 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9159 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9160 * configure.ac: Adjust.
9161 * linux-low.h (struct process_info_private): Move members to struct
9163 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9164 * linux-low.c (linux_remove_process): Adjust.
9165 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9166 * server.c (handle_query): Move code ...
9167 (handle_monitor_command): ... here. New function.
9168 * target.h (struct target_ops): New member.
9169 * thread-db.c (struct thread_db): New.
9170 (libthread_db_search_path): New variable.
9171 (thread_db_create_event, thread_db_enable_reporting)
9172 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9173 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9174 (try_thread_db_load_1, dladdr_to_soname): New functions.
9175 (try_thread_db_load, thread_db_load_search): New functions.
9176 (thread_db_init): Search for libthread_db.
9177 (thread_db_free): New function.
9178 (thread_db_handle_monitor_command): Likewise.
9179 * config.in: Regenerate.
9180 * configure: Regenerate.
9182 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9184 * spu-low.c (spu_kill): Wait for inferior to terminate.
9185 Call clear_inferiors.
9186 (spu_detach): Call clear_inferiors.
9188 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9190 * aclocal.m4: Regenerate.
9191 * config.in: Likewise.
9192 * configure: Likewise.
9194 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9196 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9197 (parse_spufs_run): New function.
9198 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9199 (ppc_breakpoint_at): Handle SPU breakpoints.
9201 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9203 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9204 (SPUFS_MAGIC): Define.
9205 (spu_enumerate_spu_ids): New function.
9206 (linux_qxfer_spu): New function.
9207 (linux_target_ops): Install linux_qxfer_spu.
9209 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9211 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9212 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9213 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9214 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9215 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9216 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9217 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9218 (init_registers_powerpc_cell32l): Add prototype.
9219 (init_registers_powerpc_cell64l): Likewise.
9220 (ppc_arch_setup): Detect Cell/B.E. architecture.
9222 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9224 * Makefile.in (datarootdir): New variable.
9226 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9228 * linux-low.c (linux_write_memory): Update debugging output.
9229 * Makefile.in (clean): Add new descriptions.
9230 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9231 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9232 * configure.srv: Add new files for arm*-*-linux*.
9233 * linux-arm-low.c: Add new declarations.
9234 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9235 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9236 (HWCAP_VFPv3D16): New.
9237 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9238 instead of __IWMMXT__.
9239 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9240 (arm_arch_setup): New.
9241 (target_regsets): Remove #ifdef. Add VFP regset.
9242 (the_low_target): Use arm_arch_setup.
9244 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9246 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9247 the main thread again.
9249 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9251 Adding Neutrino gdbserver.
9252 * configure: Regenerated.
9253 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9254 * configure.srv (i[34567]86-*-nto*): New target.
9255 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9256 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9257 (nto_comctrl) [__QNX__]: New function.
9258 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9260 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9262 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9265 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9266 Pedro Alves <pedro@codesourcery.com>
9268 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9269 don't support CONTEXT_EXTENDED_REGISTERS.
9270 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9271 (the_low_target): Install them.
9272 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9273 failing with ERROR_PIPE_NOT_CONNECTED.
9275 2009-06-30 Doug Evans <dje@google.com>
9276 Pierre Muller <muller@ics.u-strasbg.fr>
9278 Add h/w watchpoint support to x86-linux, win32-i386.
9279 * Makefile.in (SFILES): Add i386-low.c
9280 (i386_low_h): Define.
9281 (i386-low.o): Add dependencies.
9282 (linux-x86-low.o): Add i386-low.h dependency.
9283 (win32-i386-low.o): Ditto.
9284 * i386-low.c: New file.
9285 * i386-low.h: New file.
9286 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9287 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9288 * linux-low.c (linux_add_process): Initialize arch_private.
9289 (linux_remove_process): Free arch_private.
9290 (add_lwp): Initialize arch_private.
9291 (delete_lwp): Free arch_private.
9292 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9294 * linux-low.h (process_info_private): New member arch_private.
9295 (lwp_info): New member arch_private.
9296 (linux_target_ops): New members new_process, new_thread,
9298 (ptid_of): New macro.
9299 * linux-x86-low.c: Include stddef.h, i386-low.h.
9300 (arch_process_info): New struct.
9301 (arch_lwp_info): New struct.
9302 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9303 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9304 (i386_dr_low_get_status): New function.
9305 (x86_insert_point, x86_remove_point): New functions.
9306 (x86_stopped_by_watchpoint): New function.
9307 (x86_stopped_data_address): New function.
9308 (x86_linux_new_process, x86_linux_new_thread): New functions.
9309 (x86_linux_prepare_to_resume): New function.
9310 (the_low_target): Add entries for insert_point, remove_point,
9311 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9313 * server.c (debug_hw_points): New global.
9314 (monitor_show_help): Document set debug-hw-points.
9315 (handle_query): Process "set debug-hw-points".
9316 * server.h (debug_hw_points): Declare.
9317 (paddress): Declare.
9318 * utils.c (NUMCELLS, CELLSIZE): New macros.
9319 (get_sell, xsnprintf, paddress): New functions.
9320 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9321 remove_point, stopped_by_watchpoint, stopped_data_address.
9322 * win32-i386-low.c: Include i386-low.h.
9323 (debug_reg_state): Replaces dr.
9324 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9325 (i386_dr_low_get_status): New function.
9326 (i386_insert_point, i386_remove_point): New functions.
9327 (i386_stopped_by_watchpoint): New function.
9328 (i386_stopped_data_address): New function.
9329 (i386_initial_stuff): Update.
9330 (get_thread_context,set_thread_context,i386_thread_added): Update.
9331 (the_low_target): Add entries for insert_point,
9332 remove_point, stopped_by_watchpoint, stopped_data_address.
9333 * win32-low.c (win32_insert_watchpoint): New function.
9334 (win32_remove_watchpoint): New function.
9335 (win32_stopped_by_watchpoint): New function.
9336 (win32_stopped_data_address): New function.
9337 (win32_target_ops): Add entries for insert_watchpoint,
9338 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9339 * win32-low.h (win32_target_ops): New members insert_point,
9340 remove_point, stopped_by_watchpoint, stopped_data_address.
9342 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9344 * server.c (process_serial_event): Re-return unsupported, not
9345 error, if the type isn't recognized. Re-allow supporting only
9346 insert or remove packets. Also call require_running for
9347 breakpoints. Add missing break statement to default case. Tidy.
9348 * target.h (struct target_ops): Rename insert_watchpoint to
9349 insert_point, and remove_watchpoint to remove_point.
9351 * linux-low.h (struct linux_target_ops): Likewise.
9352 * linux-low.c (linux_insert_watchpoint): Rename to ...
9353 (linux_insert_point): ... this. Adjust.
9354 (linux_remove_watchpoint): Rename to ...
9355 (linux_remove_point): ... this. Adjust.
9356 (linux_target_ops): Adjust.
9357 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9358 (cris_insert_point): ... this.
9359 (cris_remove_watchpoint): Rename to ...
9360 (cris_remove_point): ... this.
9361 (the_low_target): Adjust.
9363 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9365 * server.c (handle_v_kill): Pass signal_pid to
9366 kill_inferior if multi_process is zero.
9368 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9370 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9371 * target.h (target_ops): Comment for *_watchpoint to make it clear
9372 the functions can get types '0' and '1'.
9374 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9376 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9377 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9378 * regcache.c (get_regcache): Likewise.
9379 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9380 * win32-low.c (child_fetch_inferior_registers): Remove check for
9383 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9384 Pedro Alves <pedro@codesourcery.com>
9386 * target.h (struct target_ops) <supports_multi_process>: New
9388 (target_supports_multi_process): New.
9389 * server.c (handle_query): Even if GDB reports support, only
9390 enable multi-process if the target also supports it. Report
9391 multi-process support only if the target backend supports it.
9392 * linux-low.c (linux_supports_multi_process): New function.
9393 (linux_target_ops): Install it as target_supports_multi_process
9396 2009-05-24 Doug Evans <dje@google.com>
9398 Global renaming of find_thread_pid to find_thread_ptid.
9399 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9400 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9401 All callers updated.
9403 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9404 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9407 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9408 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9409 (linux_resume_one_lwp): Ditto.
9411 2009-05-23 Doug Evans <dje@google.com>
9413 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9414 from struct inferior_list_entry * to struct lwp_info *.
9415 All callers updated.
9417 2009-05-13 Doug Evans <dje@google.com>
9419 * linux-x86-low.c: Don't include assert.h.
9420 (x86_siginfo_fixup): Use fatal, not assert.
9421 (x86_arch_setup): Fix comment.
9423 2009-05-12 Doug Evans <dje@google.com>
9425 Biarch support for i386/amd64 gdbserver.
9426 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9427 Add linux-x86-low.c.
9428 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9429 (linux-x86-low.o): Add.
9430 * linux-x86-64-low.c: Delete.
9431 * linux-i386-low.c: Delete.
9432 * linux-x86-low.c: New file.
9433 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9435 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9437 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9438 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9439 (linux_child_pid_to_exec_file): New function.
9440 (elf_64_header_p, elf_64_file_p): New functions.
9441 (siginfo_fixup): New function.
9442 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9443 give target a chance to convert layout.
9444 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9445 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9447 2009-05-07 Doug Evans <dje@google.com>
9449 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9450 (regsets_store_inferior_registers): Ditto.
9452 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9456 * linux-low.c (must_set_ptrace_flags): Delete.
9457 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9459 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9460 `lwp->must_set_ptrace_flags' instead.
9461 (linux_wait_for_event_1): Set ptrace options here.
9462 (linux_wait_1): ... not here.
9464 2009-04-30 Doug Evans <dje@google.com>
9466 * inferiors.c (started_inferior_callback): New function.
9467 (attached_inferior_callback): New function.
9468 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9469 * server.c (print_started_pid, print_attached_pid): New functions.
9470 (detach_or_kill_for_exit): New function.
9471 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9472 * server.h (have_started_inferiors_p): Declare.
9473 (have_attached_inferiors_p): Declare.
9475 * inferiors.c (remove_process): Fix memory leak, free process.
9476 * linux-low.c (linux_remove_process): New function.
9477 (linux_kill): Call it instead of remove_process.
9478 (linux_detach, linux_wait_1): Ditto.
9480 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9482 * configure.srv: Add x86 Windows CE target.
9484 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9486 * inferiors.c (get_thread_process): Make global.
9487 * server.h (get_thread_process): Add prototype.
9488 * thread-db.c (find_one_thread): Use get_thread_process
9489 instead of current_process.
9490 (thread_db_get_tls_address): Do not crash if called when
9491 thread layer is not yet initialized.
9493 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9495 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9496 * spu-low.c (current_tid): Rename to ...
9497 (current_ptid): ... this.
9498 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9499 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9500 ptid_get_lwp (current_ptid) instead of current_tid.
9501 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9502 instead of current_tid. Use find_process_pid to verify pid
9503 argument is valid. Pass proper argument to remove_process.
9504 (spu_thread_alive): Compare current_ptid instead of current_tid.
9505 (spu_resume): Likewise.
9507 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9509 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9512 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9514 Implement the multiprocess extensions, and add linux multiprocess
9517 * server.h (ULONGEST): Declare.
9518 (struct ptid, ptid_t): New.
9519 (minus_one_ptid, null_ptid): Declare.
9520 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9521 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9522 (struct inferior_list_entry): Change `id' type from unsigned from
9524 (struct sym_cache, struct breakpoint, struct
9525 process_info_private): Forward declare.
9526 (struct process_info): Declare.
9527 (current_process): Declare.
9528 (all_processes): Declare.
9529 (initialize_inferiors): Declare.
9530 (add_thread): Adjust to use ptid_t.
9531 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9532 (add_process, remove_process, find_thread_pid): Declare.
9533 (find_inferior_id): Adjust to use ptid_t.
9534 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9535 (multi_process): Declare.
9536 (push_event): Adjust to use ptid_t.
9537 (read_ptid, write_ptid): Declare.
9538 (prepare_resume_reply): Adjust to use ptid_t.
9539 (clear_symbol_cache): Declare.
9540 * inferiors.c (all_processes): New.
9541 (null_ptid, minus_one_ptid): New.
9542 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9543 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9544 (add_thread): Change unsigned long to ptid. Remove gdb_id
9546 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9547 (gdb_id_to_thread): Rename to ...
9548 (find_thread_pid): ... this. Change unsigned long to ptid.
9549 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9550 (loaded_dll, pull_pid_from_list): Adjust.
9551 (add_process, remove_process, find_process_pid)
9552 (get_thread_process, current_process, initialize_inferiors): New.
9553 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9554 (struct target_waitstatus) <related_pid>: Ditto.
9555 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9557 (struct target_ops) <join>: Add `pid' argument.
9558 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9559 (struct target_ops) <wait>: Add `ptid' field. Change return type
9561 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9562 (mywait): Add `ptid' argument. Change return type to ptid_t.
9563 (target_pid_to_str): Declare.
9564 * target.c (set_desired_inferior): Adjust to use ptids.
9565 (mywait): Add new `ptid' argument. Adjust.
9566 (target_pid_to_str): New.
9567 * mem-break.h (free_all_breakpoints): Declare.
9568 * mem-break.c (breakpoints): Delelete.
9569 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9570 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9571 to use per-process breakpoint list.
9572 (free_all_breakpoints): New.
9573 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9574 (symbol_cache, all_symbols_looked_up): Delete.
9576 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9578 (prepare_resume_reply): Change ptid argument's type from unsigned
9579 long to ptid_t. Adjust. Implement W;process and X;process.
9580 (free_sym_cache, clear_symbol_cache): New.
9581 (look_up_one_symbol): Adjust to per-process symbol cache. *
9582 * server.c (cont_thread, general_thread, step_thread): Change type
9585 (multi_process): New.
9586 (last_ptid): Change type to ptid_t.
9587 (struct vstop_notif) <ptid>: Change type to ptid_t.
9588 (queue_stop_reply, push_event): Change `ptid' argument's type to
9590 (discard_queued_stop_replies): Add `pid' argument.
9591 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9592 changes. Don't reference the `attached' global.
9593 (attach_inferior): Adjust to mywait interface changes.
9594 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9595 features. Handle and report "multiprocess+". Handle
9597 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9599 (handle_v_kill): New.
9600 (handle_v_stopped): Adjust to use target_pid_to_str.
9601 (handle_v_requests): Allow multiple attaches and runs when
9602 multiprocess extensions are in effect. Handle "vKill".
9603 (myresume): Adjust to use ptids.
9604 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9605 (handle_status): Adjust to discard_queued_stop_replies interface
9607 (first_thread_of, kill_inferior_callback)
9608 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9609 (main): Call initialize_inferiors. Adjust to use ptids, killing
9610 and detaching from all inferiors. Handle multiprocess packet
9612 * linux-low.h: Include gdb_proc_service.h.
9613 (struct process_info_private): New.
9614 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9615 <lwpid_of>: Use ptid_get_lwp.
9616 (get_lwp_thread): Adjust.
9617 (struct lwp_info): Add `dead' member.
9618 (find_lwp_pid): Declare.
9619 * linux-low.c (thread_db_active): Delete.
9620 (new_inferior): Adjust comment.
9621 (inferior_pid): Delete.
9622 (linux_add_process): New.
9623 (handle_extended_wait): Adjust.
9624 (add_lwp): Change unsigned long to ptid.
9625 (linux_create_inferior): Add process to processes table. Adjust
9626 to use ptids. Don't set new_inferior here.
9627 (linux_attach_lwp): Rename to ...
9628 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9629 it. Adjust to use ptids.
9630 (linux_attach_lwp): New.
9631 (linux_attach): Add process to processes table. Don't set
9633 (struct counter): New.
9634 (second_thread_of_pid_p, last_thread_of_process_p): New.
9635 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9637 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9638 processes. Remove process from process table.
9639 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9640 to multiple processes.
9641 (any_thread_of): New.
9642 (linux_detach): Add `pid' argument, and handle it. Remove process
9643 from processes table.
9644 (linux_join): Add `pid' argument. Handle it.
9645 (linux_thread_alive): Change unsighed long argument to ptid_t.
9646 Consider dead lwps as not being alive.
9647 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9648 threads we're not interested in.
9649 (same_lwp, find_lwp_pid): New.
9650 (linux_wait_for_lwp): Change `pid' argument's type from int to
9652 (linux_wait_for_event): Rename to ...
9653 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9654 from int to ptid_t. Adjust.
9655 (linux_wait_for_event): New.
9656 (linux_wait_1): Add `ptid' argument. Change return type to
9657 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9658 that exit from the process table.
9659 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9661 (mark_lwp_dead): New.
9662 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9663 stopping all threads, mark its main lwp as dead.
9664 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9666 (fetch_register, usr_store_inferior_registers)
9667 (regsets_fetch_inferior_registers)
9668 (regsets_store_inferior_registers, linux_read_memory)
9669 (linux_write_memory): Inline `inferior_pid'.
9670 (linux_look_up_symbols): Adjust to use per-process
9672 (linux_request_interrupt): Adjust to use ptids.
9673 (linux_read_auxv): Inline `inferior_pid'.
9674 (initialize_low): Don't reference thread_db_active.
9675 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9676 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9677 (ps_getpid): Return the pid of the current inferior.
9678 * thread-db.c (proc_handle, thread_agent): Delete.
9679 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9681 (find_one_thread): Change argument type to ptid_t. Adjust to
9683 (maybe_attach_thread): Adjust to per-process data and ptids.
9684 (thread_db_find_new_threads): Ditto.
9685 (thread_db_init): Ditto.
9686 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9687 processes table. Adjust to use ptids.
9688 (spu_kill, spu_detach): Adjust interface. Remove process from
9690 (spu_join, spu_thread_alive): Adjust interface.
9691 (spu_wait): Adjust interface. Remove process from processes
9692 table. Adjust to use ptids.
9693 * win32-low.c (current_inferior_tid): Delete.
9694 (current_inferior_ptid): New.
9695 (debug_event_ptid): New.
9696 (thread_rec): Take a ptid. Adjust.
9697 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9698 (child_delete_thread): Ditto.
9699 (do_initial_child_stuff): Add `attached' argument. Add process to
9701 (child_fetch_inferior_registers, child_store_inferior_registers):
9703 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9704 (win32_attach): Pass 1 to do_initial_child_stuff.
9705 (win32_kill): Adjust interface. Remove process from processes
9707 (win32_detach): Ditto.
9708 (win32_join): Adjust interface.
9709 (win32_thread_alive): Take a ptid.
9710 (win32_resume): Adjust to use ptids.
9711 (get_child_debug_event): Ditto.
9712 (win32_wait): Adjust interface. Remove exiting process from
9715 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9717 Non-stop mode support.
9719 * server.h (non_stop): Declare.
9720 (gdb_client_data, handler_func): Declare.
9721 (delete_file_handler, add_file_handler, start_event_loop):
9723 (handle_serial_event, handle_target_event, push_event)
9724 (putpkt_notif): Declare.
9725 * target.h (enum resume_kind): New.
9726 (struct thread_resume): Replace `step' field by `kind' field.
9727 (TARGET_WNOHANG): Define.
9728 (struct target_ops) <wait>: Add `options' argument.
9729 <supports_non_stop, async, start_non_stop>: New fields.
9730 (target_supports_non_stop, target_async): New.
9731 (start_non_stop): Declare.
9732 (mywait): Add `options' argument.
9733 * target.c (mywait): Add `options' argument. Print child exit
9735 (start_non_stop): New.
9736 * server.c (non_stop, own_buf, mem_buf): New globals.
9737 (struct vstop_notif): New.
9738 (notif_queue): New global.
9739 (queue_stop_reply, push_event, discard_queued_stop_replies)
9740 (send_next_stop_reply): New.
9741 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9743 (attach_inferior): In non-stop mode, don't wait for the target
9745 (handle_general_set): Handle QNonStop.
9746 (handle_query): When handling qC, return the current general
9747 thread, instead of the first thread of the list.
9748 (handle_query): If the backend supports non-stop mode, include
9749 QNonStop+ in the qSupported query response.
9750 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9752 (handle_v_attach, handle_v_run): Handle non-stop mode.
9753 (handle_v_stopped): New.
9754 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9755 (myresume): Adjust to use resume_kind. Handle non-stop.
9756 (queue_stop_reply_callback): New.
9757 (handle_status): Handle non-stop mode.
9758 (main): Clear non_stop flag on reconnection. Use the event-loop.
9759 Refactor serial protocol handling from here ...
9760 (process_serial_event): ... to this new function. When GDB
9761 selects any thread, select one here. In non-stop mode, wait until
9762 GDB acks all pending events before exiting.
9763 (handle_serial_event, handle_target_event): New.
9764 * remote-utils.c (remote_open): Install remote_desc in the event
9766 (remote_close): Remove remote_desc from the event loop.
9767 (putpkt_binary): Rename to...
9768 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9769 (putpkt_binary): New as wrapper around putpkt_binary_1.
9770 (putpkt_notif): New.
9771 (prepare_resume_reply): In non-stop mode, don't change the
9773 * event-loop.c: New.
9774 * Makefile.in (OBJ): Add event-loop.o.
9775 (event-loop.o): New rule.
9777 * linux-low.h (pid_of): Moved here.
9779 (get_lwp_thread): Use lwpid_of.
9780 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9781 * linux-low.c (pid_of): Delete.
9782 (inferior_pid): Use lwpid_of.
9783 (linux_event_pipe): New.
9784 (target_is_async_p): New.
9786 (handle_extended_wait): Use lwpid_of.
9787 (add_lwp): Don't set lwpid field.
9788 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9789 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9790 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9791 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9792 first. Adjust to linux_wait_for_event interface changes. Use
9794 (linux_detach): Don't delete the main lwp here.
9795 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9796 (status_pending_p): Don't consider explicitly suspended lwps.
9797 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9798 pointer. Add OPTIONS argument. Change return type to int. Use
9799 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9800 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9801 pointer. Add status pointer argument. Return a pid instead of a
9802 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9803 changes. In non-stop mode, don't switch to a random thread.
9804 (linux_wait): Rename to...
9805 (linux_wait_1): ... this. Add target_options argument, and handle
9806 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9807 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9808 clean exit and signal exit code. Don't stop all threads in
9809 non-stop mode. In all-stop mode, only stop all threads when
9810 reporting a stop to GDB. Handle explicit thread stop requests.
9811 (async_file_flush, async_file_mark): New.
9813 (send_sigstop): Use lwpid_of.
9814 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9815 interface changes. In non-stop mode, don't switch to a random
9817 (linux_resume_one_lwp): Use lwpid_of.
9818 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9819 (linux_resume_one_thread): ... this. Handle resume_stop. In
9820 non-stop mode, don't look for pending flag in all threads.
9821 (resume_status_pending_p): Don't consider explicitly suspended
9823 (my_waitpid): Reimplement. Emulate __WALL.
9824 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9826 (sigchld_handler, linux_supports_non_stop, linux_async)
9827 (linux_start_non_stop): New.
9828 (linux_target_ops): Register linux_supports_non_stop, linux_async
9829 and linux_start_non_stop.
9830 (initialize_low): Install SIGCHLD handler.
9831 * thread-db.c (thread_db_create_event, find_one_thread)
9832 (thread_db_get_tls_address): Use lwpid_of.
9833 * win32-low.c (win32_detach): Adjust to use resume_kind.
9834 (win32_wait): Add `options' argument.
9835 * spu-low.c (spu_resume): Adjust to use resume_kind.
9836 (spu_wait): Add `options' argument.
9838 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9840 Decouple target code from remote protocol.
9842 * target.h (enum target_waitkind): New.
9843 (struct target_waitstatus): New.
9844 (struct target_ops) <wait>: Return an unsigned long. Take a
9845 target_waitstatus pointer instead of a char pointer.
9847 * target.c (mywait): Change prototype to return an unsigned long.
9848 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9849 * server.h (thread_from_wait, old_thread_from_wait): Delete
9851 (prepare_resume_reply): Change prototype to take a
9853 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9854 (last_status, last_ptid): New.
9855 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9856 pid instead of a signal.
9857 (attach_inferior): Remove "status" and "signal" parameters.
9859 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9861 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9862 (handle_v_requests, myresume): Remove "status" and "signal"
9864 (handle_status): New.
9865 (main): Delete local `status'. Adjust.
9866 * remote-utils.c: Include target.h.
9867 (prepare_resume_reply): Change prototype to take a
9868 target_waitstatus. Adjust.
9870 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9872 * spu-low.c (spu_wait): Adjust.
9873 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9875 (win32_wait): Adjust.
9877 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9879 * target.h (struct thread_resume): Delete leave_stopped member.
9880 (struct target_ops): Add a `n' argument to the `resume' callback.
9881 * server.c (start_inferior): Adjust.
9882 (handle_v_cont, myresume): Adjust.
9883 * linux-low.c (check_removed_breakpoint): Adjust to resume
9884 interface change, and to removed leave_stopped field.
9885 (resume_ptr): Delete.
9886 (struct thread_resume_array): New.
9887 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9888 resume interface change.
9889 (linux_continue_one_thread, linux_queue_one_thread)
9890 (resume_status_pending_p): Check if the resume field is NULL
9891 instead of checking the leave_stopped member.
9892 (linux_resume): Adjust to the target resume interface change.
9893 * spu-low.c (spu_resume): Adjust to the target resume interface
9895 * win32-low.c (win32_detach, win32_resume): Ditto.
9897 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9899 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9901 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9903 (linux_continue_one_thread): Only preserve the stepping flag if
9904 there's a pending breakpoint.
9906 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9908 * server.c (main): After the inferior having exited, call
9909 remote_close before exiting gdbserver.
9911 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9913 Fix size of FPSCR in Power 7 processors.
9914 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9915 (PPC_FEATURE_HAS_DFP): New #define.
9916 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9919 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9921 * server.c (handle_query) Whitespace and formatting.
9923 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9925 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9926 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9927 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9928 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9929 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9930 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9931 Makefile.in, configure.ac: Fix whitespace throughout.
9932 * configure: Regenerate.
9934 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9936 * inferiors.c (find_inferior): Make it safe for the callback
9937 function to delete the currently iterated inferior.
9939 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9941 * Makefile.in (linuw_low_h): Move higher.
9942 (thread-db.o): Depend on $(linux_low_h).
9944 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9946 Rename "process" to "lwp" throughout.
9948 * linux-low.c (all_processes): Rename to...
9949 (all_lwps): ... this.
9950 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9951 (add_process): Rename to ...
9952 (add_lwp): ... this. Adjust.
9953 (linux_create_inferior): Adjust.
9954 (linux_attach_lwp): Adjust.
9955 (linux_attach): Adjust.
9956 (linux_kill_one_process): Rename to ...
9957 (linux_kill_one_lwp): ... this. Adjust.
9958 (linux_kill): Adjust.
9959 (linux_detach_one_process): Rename to ...
9960 (linux_detach_one_lwp): ... this. Adjust.
9961 (linux_detach): Adjust.
9962 (check_removed_breakpoint): Adjust.
9963 (status_pending_p): Adjust.
9964 (linux_wait_for_process): Rename to ...
9965 (linux_wait_for_lwp): ... this. Adjust.
9966 (linux_wait_for_event): Adjust.
9967 (send_sigstop): Adjust.
9968 (wait_for_sigstop): Adjust.
9969 (stop_all_processes): Rename to ...
9970 (stop_all_lwps): ... this.
9971 (linux_resume_one_process): Rename to ...
9972 (linux_resume_one_lwp): ... this. Adjust.
9973 (linux_set_resume_request, linux_continue_one_thread)
9974 (linux_queue_one_thread, resume_status_pending_p)
9975 (usr_store_inferior_registers, regsets_store_inferior_registers)
9976 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9978 * linux-low.h (get_process): Rename to ...
9979 (get_lwp): ... this. Adjust.
9980 (get_thread_process): Rename to ...
9981 (get_thread_lwp): ... this. Adjust.
9982 (get_process_thread): Rename to ...
9983 (get_lwp_thread): ... this. Adjust.
9984 (struct process_info): Rename to ...
9985 (struct lwp_info): ... this.
9986 (all_processes): Rename to ...
9987 (all_lwps): ... this.
9988 * proc-service.c (ps_lgetregs): Adjust.
9989 * thread-db.c (thread_db_create_event, find_one_thread)
9990 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9992 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9994 * server.c (handle_query): Handle "qAttached".
9996 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9998 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9999 GPLv3, update license URL.
10001 2009-03-01 Doug Evans <dje@google.com>
10003 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10004 (server_h): Add gdb_signals.h.
10005 (signals.o): Update.
10006 * server.h (target_signal_from_host,target_signal_to_host_p)
10007 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10009 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10011 * remote-utils.c (getpkt): Also generate remote-debug
10012 information if noack_mode is set.
10014 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10016 * server.c (handle_query): Report qXfer:siginfo:read and
10017 qXfer:siginfo:write as supported and handle them.
10018 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10019 * linux-low.c (linux_xfer_siginfo): New.
10020 (linux_target_ops): Set it.
10022 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10024 * server.c (gdbserver_usage): Mention --remote-debug.
10025 (main): Accept '--remote-debug' switch.
10027 2009-01-18 Doug Evans <dje@google.com>
10029 * regcache.c (new_register_cache): No need to check result of xcalloc.
10030 * server.c (handle_search_memory): Back out calls to xmalloc,
10031 result is checked and error is returned to user upon failure.
10032 (handle_query): Ditto. Add more checks for result of malloc.
10033 (handle_v_cont): Check result of malloc, report error back to
10035 (handle_v_run): Ditto. Call freeargv.
10036 * server.h (freeargv): Declare.
10037 * utils.c (freeargv): New fn.
10039 2009-01-15 Doug Evans <dje@google.com>
10041 * gdbreplay.c (perror_with_name): Make arg const char *.
10042 * server.h (target_signal_to_name): Make return type const char *.
10043 * thread-db.c (thread_db_err_str): Make return type const char *.
10044 * utils.c (perror_with_name): Make arg const char *.
10046 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10048 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10049 when handling a EXIT_PROCESS_DEBUG_EVENT.
10051 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10053 * gdbreplay.c (gdbreplay_version): Update copyright year.
10054 * server.c (gdbserver_version): Likewise.
10056 2009-01-05 Doug Evans <dje@google.com>
10058 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10059 (handle_extended_wait): Improve comment.
10061 2008-12-13 Doug Evans <dje@google.com>
10063 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10064 * server.h (ATTR_MALLOC): New macro.
10065 (xmalloc,xcalloc,xstrdup): Declare.
10066 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10067 * inferiors.c: Ditto.
10068 * linux-low.c: Ditto.
10069 * mem-break.c: Ditto.
10070 * regcache.c: Ditto.
10071 * remote-utils.c: Ditto.
10074 * win32-low.c: Ditto.
10076 2008-12-12 Doug Evans <dje@google.com>
10078 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10079 in debugging printf.
10081 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10083 2008-12-09 Doug Evans <dje@google.com>
10085 * linux-low.h (struct process_info): Delete member tid, unused.
10086 * thread-db.c (find_one_thread): Update.
10087 (maybe_attach_thread): Update.
10089 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10091 * target.h (struct target_ops): Add qxfer_osdata member.
10092 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10094 (linux_qxfer_osdata): New functions.
10095 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10097 * server.c (handle_query): Handle "qXfer:osdata:read:".
10098 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10099 (buffer_xml_printf): New functions.
10100 * server.h (struct buffer): New.
10101 (buffer_grow_str, buffer_grow_str0): New macros.
10102 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10103 (buffer_xml_printf): Declare.
10105 2008-11-24 Doug Evans <dje@google.com>
10107 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10109 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10111 * server.c (handle_v_run): Always use the supplied argument list.
10113 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10115 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10116 (xtensa_regmap_table): Add entry for scompare1.
10118 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10120 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10121 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10122 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10123 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10124 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10125 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10126 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10127 XML target descriptions.
10128 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10129 when inferior is running on an ISA 2.05 or later processor. Add
10130 special case to return offset for full 64-bit slot of FPSCR when
10133 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10135 * Makefile.in (SFILES, clean): Added sparc64 files.
10136 (reg-sparc64.o, reg-sparc64.c): New.
10137 * configure.srv (sparc*-*-linux*): New configuration.
10138 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10139 syscall arguments for SPARC.
10140 (regsets_store_inferior_registers): Likewise.
10141 * linux-sparc-low.c: New file.
10143 2008-10-21 Doug Evans <dje@google.com>
10145 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10146 (READLINE_DIR,READLINE_DEP): Delete.
10147 (INTERNAL_CFLAGS): Update.
10148 (LINTFLAGS): Update.
10150 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10152 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10153 whole argv from the last run, not just argv[0].
10155 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10157 * regcache.c (new_register_cache): Return NULL if the register
10158 cache size isn't known yet.
10159 (free_register_cache): Avoid dereferencing a NULL regcache.
10161 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10163 * configure.srv: Merge MIPS and MIPS64.
10165 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10167 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10169 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10171 * Makefile.in: Add required vsx dependencies.
10173 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10174 Declare init_registers_powerpc_vsx32l.
10175 Declare init_registers_powerpc_vsx64l.
10176 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10177 (ppc_arch_setup): Check for VSX in hwcap.
10178 (ppc_fill_vsxregset): New function.
10179 (ppc_store_vsxregset): New function.
10180 Add new VSX entry in regset_info target_regsets.
10182 * configure.srv: Add new VSX dependencies.
10184 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10186 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10187 (remote_open): Set or clear transport_is_reliable.
10188 (putpkt_binary): Don't expect acks in noack mode.
10189 (getpkt): Don't send ack/nac in noack mode.
10190 * server.c (handle_general_set): Handle QStartNoAckMode.
10191 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10193 (main): Reset noack_mode on every connection.
10194 * server.h (noack_mode): Declare.
10196 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10198 * Makefile.in (GDBREPLAY_OBS): New variable.
10199 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10201 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10202 Daniel Jacobowitz <dan@codesourcery.com>
10204 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10205 (usr_store_inferior_registers): Likewise.
10206 (regsets_store_inferior_registers): Likewise.
10208 2008-07-31 Rolf Jansen <rj@surtec.com>
10209 Pedro Alves <pedro@codesourcery.com>
10211 * configure.ac: Check for memmem declaration.
10212 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10213 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10214 (disable_packet_qfThreadInfo): Unconditionally compile.
10215 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10216 * configure, config.in: Regenerate.
10218 2008-07-28 Doug Kwan <dougkwan@google.com>
10220 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10221 (linux_write_memory): Remove declaration of errno.
10223 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10225 * linux-low.c (handle_extended_wait): Do not use "status"
10226 variable uninitialized.
10228 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10230 * server.c (handle_v_attach): Inhibit reporting dll changes.
10232 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10234 * remote-utils.c (prepare_resume_reply): If requested, don't
10235 output "thread:TID" in the T stop reply.
10237 * server.c (disable_packet_vCont, disable_packet_Tthread)
10238 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10239 (handle_query): If requested, disable support for qC, qfThreadInfo
10241 (handle_v_requests): If requested, disable support for vCont.
10242 (gdbserver_show_disableable): New.
10243 (main): Handle --disable-packet and --disable-packet=LIST.
10245 * server.h (disable_packet_vCont, disable_packet_Tthread)
10246 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10248 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10250 * server.c (gdbserver_usage): Mention --version.
10252 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10254 * Makefile.in (gdbreplay.o): New rule.
10256 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10258 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10259 message, not gdbserver.
10261 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10262 Nathan Sidwell <nathan@codesourcery.com>
10263 Joseph Myers <joseph@codesourcery.com>
10265 * acinclude.m4: Include ../../config/acx.m4.
10266 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10267 * configure, config.in: Regenerate.
10268 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10269 * server.c (gdbserver_version): Print PKGVERSION.
10270 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10271 (main): Adjust gdbserver_usage calls.
10272 * gdbreplay.c (version, host_name): Add declarations.
10273 (gdbreplay_version, gdbreplay_usage): New.
10274 (main): Accept --version and --help options.
10276 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10278 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10279 (arm_breakpoint_at): Handle Thumb.
10280 (the_low_target): Add comment.
10282 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10284 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10286 2008-05-09 Doug Evans <dje@google.com>
10288 * server.h (decode_search_memory_packet): Declare.
10289 * remote-utils.c (decode_search_memory_packet): New fn.
10290 * server.c (handle_search_memory_1): New fn.
10291 (handle_search_memory): New fn.
10292 (handle_query): Process qSearch:memory packets.
10294 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10296 * regcache.c (registers_length): Remove.
10297 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10298 full register packet.
10299 * regcache.h (registers_length): Remove prototype.
10300 * server.h (PBUFSIZ): Define to 16384.
10302 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10304 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10305 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10306 powerpc-64l.o, and powerpc-altivec64l.o.
10307 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10308 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10309 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10310 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10311 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10314 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10315 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10316 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10317 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10318 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10319 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10320 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10321 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10322 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10323 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10326 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10327 (init_registers_powerpc_32l): ... this new prototype.
10328 (init_registers_powerpc_32): Remove, replace by ...
10329 (init_registers_powerpc_altivec32l): ... this new prototype.
10330 (init_registers_powerpc_e500): Remove, replace by ...
10331 (init_registers_powerpc_e500l): ... this new prototype.
10332 (init_registers_ppc64): Remove, replace by ...
10333 (init_registers_powerpc_64l): ... this new prototype.
10334 (init_registers_powerpc_64): Remove, replace by ...
10335 (init_registers_powerpc_altivec64l): ... this new prototype.
10336 (ppc_num_regs): Set to 73.
10337 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10338 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10339 (ppc_cannot_store_register): Handle orig_r3 and trap.
10340 (ppc_arch_setup): Update init_registers_... calls.
10341 (ppc_fill_gregset): Handle orig_r3 and trap.
10343 * inferiors.c (clear_inferiors): Reset current_inferior.
10345 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10347 * acinclude.m4: Add override.m4.
10348 * configure: Regenerate.
10350 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10352 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10353 initial call to init_register_ppc64.
10355 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10357 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10358 single powerpc*-*-linux* case.
10359 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10361 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10363 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10364 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10366 * linux-ppc-low.c: Include <elf.h>.
10367 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10368 (ppc_hwcap): New global variable.
10369 (ppc_regmap): Remove __SPE__ #ifdef sections.
10370 (ppc_regmap_e500): New global variable.
10371 (ppc_cannot_store_register): Update __SPE__ special case.
10372 (ppc_get_hwcap): New function.
10373 (ppc_arch_setup): Use it to determine whether inferior supports
10374 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10375 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10376 Do not access registers if target does not support AltiVec.
10377 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10378 Do not access registers if target does not support SPE.
10379 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10381 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10383 * linux-low.c (disabled_regsets, num_regsets): New.
10384 (use_regsets_p): Delete.
10385 (linux_wait_for_process): Clear disabled_regsets.
10386 (regsets_fetch_inferior_registers): Check and set it.
10387 (regsets_store_inferior_registers): Likewise.
10388 (linux_fetch_registers, linux_store_registers): Do not use
10390 (initialize_low): Allocate disabled_regsets.
10392 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10394 * Makefile.in (LIBOBJS): New.
10395 (OBS): Use LIBOBJS.
10396 (memmem.o): New rule.
10397 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10398 * configure: Regenerated.
10400 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10402 * server.c (handle_query): Never return "unsupported" for
10403 qXfer:features:read queries.
10405 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10407 * server.c (get_features_xml): Fix inverted condition.
10408 (handle_query): Always support qXfer:feature:read.
10410 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10412 * server.c (wrapper_argv): New.
10413 (start_inferior): Handle wrapper_argv. If set, expect an extra
10415 (gdbserver_usage): Document --wrapper.
10416 (main): Parse --wrapper.
10418 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10420 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10421 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10422 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10423 (ppc_set_pc): Likewise.
10424 (ppc_arch_setup): New function.
10425 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10426 of collect_register.
10427 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10429 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10431 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10432 instead of linux-ppc64-low.o.
10433 * linux-ppc64-low.c: Remove file.
10434 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10435 (linux-ppc64-low.o): Remove rule.
10437 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10438 (init_registers_powerpc_64): Likewise.
10439 (ppc_regmap): Conditionally define depending on __powerpc64__.
10440 (ppc_cannot_store_register): Do not special-case "fpscr" when
10441 compiled on __powerpc64__.
10442 (ppc_collect_ptrace_register): New function.
10443 (ppc_supply_ptrace_register): New function.
10444 (ppc_breakpoint): Change type to "unsigned int".
10445 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10446 (the_low_target): Conditionally provide initializers for the
10447 arch_setup member depending on __powerpc64__. Install
10448 collect_ptrace_register and supply_ptrace_register members.
10450 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10452 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10453 * server.c (gdbserver_xmltarget): Define.
10454 (get_features_xml): Use it to replace "target.xml" and arch_string.
10456 * configure.srv: Remove srv_xmltarget. Add XML files that were
10457 mentioned there to srv_xmlfiles instead. Remove conditional tests
10458 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10459 srv_xmlfiles and srv_regobj to include all possible choices.
10460 * configure.ac (srv_xmltarget): Remove.
10461 (srv_xmlfiles): Do not add "target.xml".
10462 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10463 checks for supplementary target information.
10464 * configure: Regenerate.
10465 * Makefile.in (XML_TARGET): Remove.
10466 (target.xml): Remove rule.
10467 (clean): Do not clean up target.xml.
10468 (.PRECIOUS): Do not mention target.xml.
10470 * target.h (struct target_ops): Remove arch_string member.
10471 * linux-low.c (linux_arch_string): Remove.
10472 (linux_target_ops): Remove arch_string initializer.
10473 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10474 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10475 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10476 * spu-low.c (spu_arch_string): Remove.
10477 (spu_target_ops): Remove arch_string initializer.
10478 * win32-low.c (win32_arch_string): Remove.
10479 (win32_target_ops): Remove arch_string initializer.
10480 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10481 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10482 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10484 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10486 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10487 by collect_ptrace_register and supply_ptrace_register hooks.
10488 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10489 instead of checking for the_low_target.left_pad_xfer.
10490 (usr_store_inferior_registers): Use collect_ptrace_register callback
10491 instead of checking for the_low_target.left_pad_xfer.
10493 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10494 (s390_supply_ptrace_register): Likewise.
10495 (s390_fill_gregset): Call s390_collect_ptrace_register.
10496 (the_low_target): Update.
10498 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10499 (ppc_supply_ptrace_register): Likewise.
10500 (the_low_target): Update.
10502 * linux-i386-low.c (the_low_target): Update.
10503 * linux-x86-64-low.c (the_low_target): Update.
10505 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10507 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10508 reg-s390.o and reg-s390x.o.
10510 * linux-low.c (new_inferior): New global variable.
10511 (linux_create_inferior, linux_attach): Set it.
10512 (linux_wait_for_process): Call the_low_target.arch_setup after the
10513 target has stopped for the first time.
10514 (initialize_low): Do not call the_low_target.arch_setup.
10516 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10517 (s390_set_pc): Likewise.
10518 (s390_arch_setup): New function.
10519 (the_low_target): Use s390_arch_setup as arch_setup routine.
10521 * regcache.c (realloc_register_cache): New function.
10522 (set_register_cache): Call it for each existing regcache.
10524 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10526 * server.h (init_registers): Remove prototype.
10528 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10529 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10530 instead of init_registers ().
10531 * linux-arm-low.c (init_registers_arm): Add prototype.
10532 (init_registers_arm_with_iwmmxt): Likewise.
10533 (the_low_target): Add initializer for arch_setup field.
10534 * linux-cris-low.c (init_registers_cris): Add prototype.
10535 (the_low_target): Add initializer for arch_setup field.
10536 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10537 (the_low_target): Add initializer for arch_setup field.
10538 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10539 (the_low_target): Add initializer for arch_setup field.
10540 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10541 (the_low_target): Add initializer for arch_setup field.
10542 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10543 (the_low_target): Add initializer for arch_setup field.
10544 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10545 (the_low_target): Add initializer for arch_setup field.
10546 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10547 (init_registers_mips64_linux): Likewise.
10548 (the_low_target): Add initializer for arch_setup field.
10549 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10550 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10551 (the_low_target): Add initializer for arch_setup field.
10552 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10553 (init_registers_powerpc_64): Likewise.
10554 (the_low_target): Add initializer for arch_setup field.
10555 * linux-s390-low.c (init_registers_s390): Add prototype.
10556 (init_registers_s390x): Likewise.
10557 (the_low_target): Add initializer for arch_setup field.
10558 * linux-sh-low.c (init_registers_sh): Add prototype.
10559 (the_low_target): Add initializer for arch_setup field.
10560 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10561 (the_low_target): Add initializer for arch_setup field.
10562 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10563 (the_low_target): Add initializer for arch_setup field.
10565 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10566 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10567 instead of init_registers ().
10568 * win32-arm-low.c (init_registers_arm): Add prototype.
10569 (the_low_target): Add initializer for arch_setup field.
10570 * win32-i386-low.c (init_registers_i386): Add prototype.
10571 (the_low_target): Add initializer for arch_setup field.
10573 * spu-low.c (init_registers_spu): Add prototype.
10574 (initialize_low): Call initialie_registers_spu () instead of
10575 initialize_registers ().
10577 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10579 * server.c (handle_v_requests): When handling the vRun and vAttach
10580 packets, if already debugging a process, don't kill it. Return an
10583 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10585 * server.c (handle_query): Correct length check.
10587 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10589 * win32-low.c (do_initial_child_stuff): Add process handle
10590 parameter. Set current_process_handle and current_process_id from the
10591 parameters. Clear globals.
10592 (win32_create_inferior): Don't set current_process_handle and
10593 current_process_id here. Instead pass them on the call to
10594 do_initial_child_stuff.
10595 (win32_attach): Likewise.
10596 (win32_clear_inferiors): New.
10597 (win32_kill): Don't close the current process handle or the
10598 current thread handle here. Instead call win32_clear_inferiors.
10599 (win32_detach): Don't open a new handle to the process. Call
10600 win32_clear_inferiors.
10601 (win32_join): Don't rely on current_process_handle; open a new
10602 handle using the process id.
10603 (win32_wait): Call win32_clear_inferiors when the inferior process
10606 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10608 * server.c (monitor_show_help): Add "exit".
10610 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10612 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10613 (clean): Add reg-xtensa.c.
10614 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10615 * configure.srv (xtensa*-*-linux*) New target.
10616 * linux-xtensa-low.c: New.
10617 * xtensa-xtregs.c: New.
10619 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10621 * hostio.c: Don't include errno.h.
10622 (errno_to_fileio_errno): Move to hostio-errno.
10623 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10624 error number outputting to the target->hostio_last_error callback.
10625 (hostio_packet_error): Use FILEIO_EINVAL directly.
10626 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10627 calls to hostio_error.
10628 * hostio-errno.c: New.
10629 * server.h (hostio_last_error_from_errno): Declare.
10630 * target.h (target_ops): Add hostio_last_error member.
10631 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10632 as hostio_last_error handler.
10633 * spu-low.c (spu_target_ops): Likewise.
10634 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10635 (wince_hostio_last_error): New functions.
10636 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10637 as hostio_last_error handler.
10638 (win32_target_ops) [!_WIN32_WCE]: Register
10639 hostio_last_error_from_errno as hostio_last_error handler.
10640 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10641 (hostio-errno.o): New rule.
10642 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10643 * configure.srv (srv_hostio_err_objs): New variable. Default to
10645 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10646 * configure: Regenerate.
10648 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10650 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10651 (linux_kill, linux_detach): Clean up the process list.
10652 * remote-utils.c (remote_open): Improve port number parsing.
10653 (putpkt_binary, input_interrupt): Only send interrupts if the target
10655 * server.c (extended_protocol): Make static.
10656 (attached): Define earlier.
10657 (exit_requested, response_needed, program_argv): New variables.
10658 (target_running): New.
10659 (start_inferior): Clear attached here.
10660 (attach_inferior): Set attached here.
10661 (require_running): Define.
10662 (handle_query): Use require_running and target_running. Implement
10664 (handle_v_attach, handle_v_run): New.
10665 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10666 (gdbserver_usage): Update.
10667 (main): Redo argument parsing. Handle --debug and --multi. Handle
10668 --attach along with other options or after the port. Save
10669 program_argv. Support no initial program. Resynchronize
10670 communication with GDB after an error. Handle "monitor exit".
10671 Use require_running and target_running. Always allow the extended
10672 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10673 restart in extended mode.
10674 * README: Refer to the GDB manual. Update --attach usage.
10676 2007-12-20 Andreas Schwab <schwab@suse.de>
10678 * linux-low.c (STACK_SIZE): Define.
10679 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10680 (linux_test_for_tracefork): Likewise.
10682 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10684 * linux-low.c (linux_wait_for_event): Update messages. Do not
10685 reinsert auto-delete breakpoints.
10686 * mem-break.c (struct breakpoint): Change return type of handler to
10688 (set_breakpoint_at): Update handler type.
10689 (reinsert_breakpoint_handler): Return 1 instead of calling
10691 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10693 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10694 * mem-break.h (set_breakpoint_at): Update handler type.
10695 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10696 * win32-low.c (auto_delete_breakpoint): New.
10697 (get_child_debug_event): Use it.
10699 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10701 * configure.ac: Check for pread and pwrite.
10702 * hostio.c (handle_pread): Fall back to lseek and read.
10703 (handle_pwrite): Fall back to lseek and write.
10704 * config.in, configure: Regenerated.
10706 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10708 * server.c (myresume): Add own_buf argument.
10709 (main): Update calls.
10711 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10713 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10714 * remote-utils.c (remote_open): Do not call disable_async_io.
10715 (block_async_io): Delete.
10716 (unblock_async_io): Make static.
10717 (initialize_async_io): New.
10718 * server.c (handle_v_cont): Handle async I/O here.
10719 (myresume): Likewise. Move other common resume tasks here...
10720 (main): ... from here. Call initialize_async_io. Disable async
10721 I/O before the main loop.
10722 * server.h (initialize_async_io): Declare.
10723 (block_async_io, unblock_async_io): Delete prototypes.
10724 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10726 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10728 * remote-utils.c (readchar): Allow binary data in received messages.
10730 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10732 * win32-low.c (attaching): New global.
10733 (win32_create_inferior): Clear the `attaching' global.
10734 (win32_attach): Set the `attaching' global.
10735 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10736 attaching. Only set a breakpoint at the entry point if not
10739 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10741 * server.c (main): Don't report dll events on the initial
10742 connection on attaches.
10744 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10746 * server.c (main): Relax numerical bases supported for the pid of
10747 the --attach command line argument.
10749 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10751 * win32-low.c (win32_attach): Call OpenProcess before
10752 DebugActiveProcess, not after. Add last error output to error
10755 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10757 * win32-low.c (win32_get_thread_context)
10758 (win32_set_thread_context): New functions.
10759 (thread_rec): Use win32_get_thread_context.
10760 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10761 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10764 2007-12-03 Leo Zayas
10765 Pedro Alves <pedro_alves@portugalmail.pt>
10767 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10769 (child_add_thread): Minor cleanup.
10770 (child_continue): Resume artificially suspended threads before
10771 calling ContinueDebugEvent.
10772 (suspend_one_thread): New.
10773 (fake_breakpoint_event): New.
10774 (get_child_debug_event): Change return type to int. Check here if
10775 gdb sent an interrupt request. If a soft interrupt was requested,
10776 fake a breakpoint event. Return 0 if there is no event to handle,
10778 (win32_wait): Don't check here if gdb sent an interrupt request.
10779 Ensure there is a valid event to handle.
10780 (win32_request_interrupt): Add soft interruption method as last
10783 2007-12-03 Leo Zayas
10784 Pedro Alves <pedro_alves@portugalmail.pt>
10786 * win32-low.h (win32_thread_info): Add descriptions to the
10787 structure members. Replace `suspend_count' counter by a
10789 * win32-low.c (thread_rec): Update condition of when to get the
10790 context from the inferior. Rely on ContextFlags being set if it
10791 has already been retrieved. Only suspend the inferior thread if
10792 we haven't already. Warn if that fails.
10793 (continue_one_thread): s/suspend_count/suspended/. Only call
10794 ResumeThread once. Warn if that fails.
10796 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10798 * win32-low.c (win32_wait): Don't read from the inferior when it
10799 has already exited.
10801 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10803 * Makefile.in (win32_low_h): New variable.
10804 (win32-low.o): Add dependency on $(win32_low_h).
10805 (win32-arm-low.o, win32-i386-low.o): New rules.
10807 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10809 * hostio.c: Correct copyright year.
10811 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10813 * Makefile.in (OBS): Add hostio.o.
10814 (hostio.o): New rule.
10815 * server.h (handle_vFile): Declare.
10816 * hostio.c: New file.
10817 * server.c (handle_v_requests): Take packet_len and new_packet_len
10818 for binary packets. Call handle_vFile.
10819 (main): Update call to handle_v_requests.
10821 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10823 * linux-low.c: Include <sched.h>.
10825 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10827 * linux-low.c (linux_tracefork_grandchild): New.
10828 (linux_tracefork_child): Use clone.
10829 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10831 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10833 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10835 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10837 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10839 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10841 * inferiors.c (change_inferior_id): Delete.
10842 (add_pid_to_list, pull_pid_from_list): New.
10843 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10844 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10845 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10846 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10847 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10848 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10849 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10850 (using_threads): Always set to 1.
10851 (handle_extended_wait): New.
10852 (add_process): Do not set TID.
10853 (linux_create_inferior): Set must_set_ptrace_flags.
10854 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10855 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10856 (linux_thread_alive): Rename TID argument to LWPID.
10857 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10858 (linux_wait_for_event): Do not use TID or check using_threads. Update
10859 call to dead_thread_notify. Call handle_extended_wait.
10860 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10861 (send_sigstop): Delete sigstop_sent.
10862 (wait_for_sigstop): Avoid TID.
10863 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10864 (linux_test_for_tracefork): New.
10865 (linux_lookup_signals): Use thread_db_active and
10866 linux_supports_tracefork_flag.
10867 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10868 * linux-low.h (get_process_thread): Avoid TID.
10869 (struct process_ifo): Move thread_known and tid to the end. Remove
10871 (linux_attach_lwp, thread_db_init): Update prototypes.
10872 * server.h (change_inferior_id): Delete prototype.
10873 (add_pid_to_list, pull_pid_from_list): New prototypes.
10874 * thread-db.c (thread_db_use_events): New.
10875 (find_first_thread): Rename to...
10876 (find_one_thread): ...this. Update callers and messages. Do not
10877 call fatal. Check thread_db_use_events. Do not call
10878 change_inferior_id or new_thread_notify.
10879 (maybe_attach_thread): Update. Do not call new_thread_notify.
10880 (thread_db_init): Set thread_db_use_events. Check use_events.
10881 * utils.c (fatal, warning): Correct message prefix.
10883 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10885 * Makefile.in (clean): Remove new files.
10886 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10887 (powerpc-64.o, powerpc-64.c): New rules.
10888 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10889 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10891 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10893 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10894 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10895 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10896 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10897 (target_regsets): Add AltiVec and SPE register sets.
10898 * configure.ac: Check for AltiVec and SPE.
10899 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10900 (ppc_fill_vrregset, ppc_store_vrregset): New.
10901 (target_regsets): Add AltiVec register set.
10902 * configure: Regenerated.
10904 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10906 * linux-low.c (O_LARGEFILE): Define.
10907 (linux_read_memory): Use /proc/PID/mem.
10908 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10909 * configure, config.in: Regenerated.
10911 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10913 * linux-low.c (linux_wait_for_event): Do not pass signals while
10916 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10918 * win32-low.c (create_process): New.
10919 (win32_create_inferior): Use create_process instead of
10920 CreateProcess. If create_process failed retry appending an ".exe"
10921 suffix. Store the GetLastError result immediatelly after
10922 create_process calls and use it on the call to error.
10924 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10926 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10928 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10930 * configure.ac: Switch license to GPLv3.
10932 2007-08-01 Michael Snyder <msnyder@access-company.com>
10934 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10936 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10938 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10940 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10941 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10942 CloseToolhelp32Snapshot.
10943 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10944 CloseToolhelp32Snapshot.
10946 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10948 * server.c (main): Check for inferior exit before main loop.
10950 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10952 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10953 instead of on tmp_desc.
10955 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10956 Daniel Jacobowitz <dan@codesourcery.com>
10958 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10959 (add_thread): Minor cleanups.
10960 (clear_inferiors): Move lower in the file. Clear the DLL
10962 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10963 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10964 (xml_escape_text): New.
10965 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10967 (handle_v_cont): Report errors.
10968 (gdbserver_version): Update.
10969 (main): Correct size of own_buf. Do not report initial DLL events.
10970 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10971 (unloaded_dll, xml_escape_text): New.
10972 * win32-low.c (enum target_waitkind): Update comments.
10973 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10974 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10975 (win32_EnumProcessModules, win32_GetModuleInformation)
10976 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10977 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10978 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10979 (win32_Module32First, win32_Module32Next, load_toolhelp)
10980 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10981 (get_child_debug_event): Handle DLL events.
10982 (win32_wait): Likewise.
10984 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10986 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10987 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10989 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10991 * win32-low.c (handle_output_debug_string): Ignore event if not
10994 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10996 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10998 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11000 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11002 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11004 * inferiors.c (change_inferior_id): Add comment.
11005 * linux-low.c (check_removed_breakpoint): Add an early
11006 prototype. Improve debug output.
11007 (linux_attach): Doc update.
11008 (linux_detach_one_process, linux_detach): Clean up before releasing
11010 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11011 * linux-low.h (struct process_info): Doc improvement.
11012 * mem-break.c (delete_all_breakpoints): New.
11013 * mem-break.h (delete_all_breakpoints): New prototype.
11014 * thread-db.c (find_first_thread): New.
11015 (thread_db_create_event): Call it instead of
11016 thread_db_find_new_threads. Clean up unused variables.
11017 (maybe_attach_thread): Remove first thread handling.
11018 (thread_db_find_new_threads): Use find_first_thread.
11019 (thread_db_get_tls_address): Likewise.
11021 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11023 * thread-db.c (thread_db_find_new_threads): Add prototype.
11024 (thread_db_create_event): Check for the main thread before adding
11026 (maybe_attach_thread): Only enable event reporting if TID == 0.
11027 (thread_db_get_tls_address): Check for new threads.
11029 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11031 * linux-low.c (linux_create_inferior): Try execv before execvp.
11032 * spu-low.c (spu_create_inferior): Likewise.
11034 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11036 * linux-low.c (linux_create_inferior): Change execv to execvp.
11037 * spu-low.c (spu_create_inferior): Likewies.
11039 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11041 * Makefile.in (clean): Clean new files instead of deleted ones.
11042 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11043 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11045 * configure.srv: Specify XML files and new regformats for MIPS and
11047 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11048 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11049 an entry for the restart register.
11050 (mips_cannot_fetch_register, mips_cannot_store_register)
11051 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11052 register names to match the XML descriptions.
11053 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11054 restart register instead of $0.
11056 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11057 Markus Deuling <deuling@de.ibm.com>
11059 * remote-utils.c (decode_xfer_write): New function.
11060 * server.h (decode_xfer_write): Add prototype.
11061 * server.c (handle_query): Add PACKET_LEN argument. Support
11062 qXfer:spu:read and qXfer:spu:write packets.
11063 (main): Pass packet_len to handle_query.
11064 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11065 * target.h (target_ops): Add qxfer_spu.
11067 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11069 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11070 accessing non-seekable spufs files.
11072 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11074 * server.c (handle_query): Add reply for qC packet.
11076 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11077 Leo Zayas <lerele@champenstudios@com>
11079 * server.h (check_remote_input_interrupt_request): New function.
11080 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11081 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11082 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11083 (check_remote_input_interrupt_request): New function.
11084 * server.h (check_remote_input_interrupt_request): Declare.
11085 * win32-low.c (winapi_DebugBreakProcess,
11086 winapi_GenerateConsoleCtrlEvent): New typedefs.
11087 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11089 (win32_wait): Check for remote interrupt request
11090 with check_remote_input_interrupt_request.
11091 (win32_request_interrupt): New function.
11092 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11094 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11096 * win32-low.c (debug_registers_changed,
11097 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11098 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11099 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11100 (thread_rec): Get context using the low target.
11101 (child_add_thread): Call thread_added on the low target,
11102 which does the same thing.
11104 (do_initial_child_stuff): Remove debug registers references.
11105 Set context using the low target. Resume threads after
11106 setting the contexts.
11107 (child_continue): Remove dead variable. Remove debug
11108 registers references.
11109 (child_fetch_inferior_registers): Go through the low target.
11110 (do_child_store_inferior_registers): Remove.
11111 (child_store_inferior_registers): Go through the low target.
11112 (win32_resume): Remove debug registers references.
11113 Set context using the low target.
11114 (handle_exception): Change return type to void. Don't record
11115 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11116 first chance exception.
11117 (get_child_debug_event): Change return type to void. Remove
11118 goto loop. Always return after waiting for debug event.
11119 (win32_wait): Convert to switch statement. Handle spurious
11122 * win32-i386-low.c (debug_registers_changed,
11123 debug_registers_used): New.
11124 (initial_stuff): Rename to ...
11125 (i386_initial_stuff): ... this. Clear debug registers
11127 (store_debug_registers): Delete.
11128 (i386_get_thread_context): New.
11129 (load_debug_registers): Delete.
11130 (i386_set_thread_context): New.
11131 (i386_thread_added): New.
11132 (single_step): Rename to ...
11133 (i386_single_step): ... this.
11134 (do_fetch_inferior_registers): Rename to ...
11135 (i386_fetch_inferior_register): ... this.
11136 (i386_store_inferior_register): New.
11137 (the_low_target): Adapt to new interface.
11139 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11140 (arm_get_thread_context): New.
11141 (arm_set_thread_context): New.
11143 (do_fetch_inferior_registers): Rename to ...
11144 (arm_fetch_inferior_register): ... this.
11145 (arm_store_inferior_register): New.
11146 (arm_wince_breakpoint): Reimplement as unsigned long.
11147 (arm_wince_breakpoint_len): Define.
11148 (the_low_target): Adapt to new interface.
11150 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11151 load_debug_registers. Add get_thread_context, set_thread_context,
11152 thread_added and store_inferior_register. Rename
11153 fetch_inferior_registers to fetch_inferior_register.
11154 (regptr): Remove declaration.
11156 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11158 * linux-low.c (linux_detach): Change return type to int. Return 0.
11159 * spu-low.c (spu_detach): Likewise.
11161 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11163 * target.h (target_ops): Change return type of detach to int.
11165 (join_inferior): New.
11166 * server.c (main): Don't skip detach support on mingw32.
11167 If the inferior doesn't support detaching return error.
11168 Call join_inferior instead of using waitpid.
11169 * linux-low.c (linux_join): New.
11170 (linux_target_op): Add linux_join.
11171 * spu-low.c (spu_join): New.
11172 (spu_target_ops): Add spu_join.
11173 * win32-low.c (win32_detach): Adapt to new interface.
11174 Reopen current_process_handle before detaching. Issue a child
11175 resume before detaching.
11177 (win32_target_op): Add win32_join.
11179 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11181 * win32-low.c (win32-attach): Fix return value.
11182 * target.h (target_ops): Describe ATTACH return values.
11184 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11186 * win32-low.c (GETPROCADDRESS): Define.
11187 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11188 (winapi_DebugSetProcessKillOnExit): Likewise.
11189 (win32_create_inferior): Force usage of ansi CreateProcessA.
11190 (win32_attach): Use GETPROCADDRESS.
11191 (win32_detach): Likewise.
11193 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11195 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11197 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11199 * win32-low.c: Commit leftover changes from 2007-03-29.
11201 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11203 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11204 fields short instead of int. Add explicit padding.
11205 (i387_cache_to_fsave): Remove unnecessary casts.
11206 (i387_fsave_to_cache): Doc fix.
11207 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11209 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11211 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11212 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11214 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11216 * configure.srv (arm*-*-mingw32ce*): Move near the other
11219 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11221 * configure.ac: Add errno checking.
11222 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11223 sys/file.h and malloc.h.
11224 (AC_CHECK_DECLS): Add perror.
11225 (srv_mingwce): Handle.
11226 * configure.srv (i[34567]86-*-cygwin*): Add
11227 win32-i386-low.o to srv_tgtobj.
11228 (i[34567]86-*-mingw*): Likewise.
11229 (arm*-*-mingw32ce*): Add case.
11230 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11231 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11232 [__MINGW32CE__] (strerror): New function.
11233 [__MINGW32CE__] (errno): Define to GetLastError.
11234 [__MINGW32CE__] (COUNTOF): New macro.
11235 (remote_open): Remove extra close call.
11236 * mem-break.c (delete_breakpoint_at): New function.
11237 * mem-break.h (delete_breakpoint_at): Declare.
11238 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11239 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11240 [USE_WIN32API] (read, write): Add char* casts.
11241 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11242 * server.h: Include wincecompat.h on Windows CE.
11243 [HAVE_ERRNO_H]: Check.
11244 (perror): Declare if not declared.
11245 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11246 (perror_with_name): Remove errno declaration.
11247 * wincecompat.h: New.
11248 * wincecompat.c: New.
11249 * win32-low.h: New.
11250 * win32-arm-low.c: New.
11251 * win32-i386-low.c: New.
11252 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11253 (OUTMSG2): Make it safe.
11255 (COUNTOF): New macro.
11256 (NUM_REGS): Get it from the low target.
11257 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11258 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11259 (thread_rec): Let low target handle debug registers.
11260 (child_add_thread): Likewise.
11261 (child_init_thread_list): Likewise.
11262 (continue_one_thread): Likewise.
11264 (do_child_fetch_inferior_registers): Move to ...
11265 * win32-i386-low.c: ... here, and rename to ...
11266 (do_fetch_inferior_registers): ... this.
11267 * win32-low.c (child_fetch_inferior_registers):
11268 Go through the low target.
11269 (do_child_store_inferior_registers): Use regptr.
11270 (strwinerror): New function.
11271 (win32_create_inferior): Handle Windows CE.
11272 Use strwinerror instead of strerror on Windows error
11273 codes. Add program to the error output.
11274 Don't close the main thread handle on Windows CE.
11275 (win32_attach): Use coredll.dll on Windows CE.
11276 (win32_kill): Close current process and current
11278 (win32_detach): Use coredll.dll on Windows CE.
11279 (win32_resume): Let low target handle debug registers, and
11281 (handle_exception): Add/Remove initial breakpoint. Avoid
11282 non-existant WSTOPSIG on Windows CE.
11283 (win32_read_inferior_memory): Cast to remove warning.
11284 (win32_arch_string): Go through the low target.
11285 (initialize_low): Call set_breakpoint_data with the low
11286 target's breakpoint.
11287 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11288 FOP_REGNUM, mappings): Move to ...
11289 * win32-i386-low.c: ... here.
11290 * win32-low.c (win32_thread_info): Move to ...
11291 * win32-low.h: ... here.
11292 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11293 win32-arm-low.c and wincecompat.c.
11294 (all:): Add $EXEEXT.
11295 (install-only:): Likewise.
11296 (gdbserver:): Likewise.
11297 (gdbreplay:): Likewise.
11298 * config.in: Regenerate.
11299 * configure: Regenerate.
11301 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11303 * win32-low.c: Rename typedef thread_info to
11304 win32_thread_info throughout.
11306 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11308 * win32-i386-low.c: Rename to ...
11309 * win32-low.c: ... this.
11310 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11311 * Makefile.in: Likewise.
11313 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11315 * remote-utils.c (monitor_output): Constify msg parameter.
11316 * server.h (monitor_output): Likewise.
11317 * win32-i386-low.c (handle_output_debug_string): New.
11318 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11319 handle_output_debug_string.
11320 (get_child_debug_event): Likewise.
11322 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11324 * server.c (main): Correct strtoul check.
11326 2007-03-27 Jon Ringle <jon@ringle.org>
11328 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11330 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11332 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11334 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11336 * terminal.h: Check HAVE_SGTTY_H.
11338 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11340 * remote-utils.c (remote_open): Print out the assigned port number.
11342 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11344 * remote-utils.c (monitor_output): New function.
11345 * server.c (debug_threads): Define here.
11346 (monitor_show_help): New function.
11347 (handle_query): Handle qRcmd.
11348 (main): Do not handle 'd' packet.
11349 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11350 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11353 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11355 * Makefile.in (EXEEXT): New.
11356 (clean): Use $(EXEEXT).
11358 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11360 * target.h (target_ops): Rename send_signal to request_interrupt,
11361 and remove enum target_signal parameter.
11362 * linux-low.c (linux_request_interrupt): Rename from
11363 linux_send_signal, and always send SIGINT.
11364 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11365 and always send SIGINT.
11366 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11368 (input_interrupt): Likewise.
11370 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11372 * server.c (get_features_xml): Check if target implemented
11374 * win32-i386-low.c (win32_arch_string): New.
11375 (win32_target_ops): Add win32_arch_string as arch_string member.
11377 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11379 * spu-low.c (spu_arch_string): New.
11380 (spu_target_ops): Add spu_arch_string.
11382 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11384 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11385 * configure.ac: Do not check for terminal.h.
11386 * configure, config.in: Regenerated.
11388 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11390 * Makefile.in (OBS): Add $(XML_BUILTIN).
11391 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11393 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11394 (arm-with-iwmmxt.c): New.
11395 * config.in, configure: Regenerate.
11396 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11397 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11398 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11399 (arm*-*-linux*): Add iWMMXt and regset support.
11400 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11401 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11402 (arm_store_wmmxregset, target_regsets): New.
11403 * server.c (get_features_xml): Take annex argument. Check builtin
11405 (handle_query): Handle multiple annexes.
11407 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11409 * remote-utils.c [USE_WIN32API] (read, write): Define.
11410 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11413 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11415 * linux-i386-low.c (the_low_target): Set arch_string.
11416 * linux-x86-64-low.c (the_low_target): Likewise.
11417 * linux-low.c (linux_arch_string): New.
11418 (linux_target_ops): Add it.
11419 * linux-low.h (struct linux_target_ops): Add arch_string.
11420 * server.c (write_qxfer_response): Use const void * for DATA.
11421 (get_features_xml): New.
11422 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11423 * target.h (struct target_ops): Add arch_string method.
11425 2007-01-03 Denis Pilat <denis.pilat@st.com>
11426 Daniel Jacobowitz <dan@codesourcery.com>
11428 * linux-low.c (linux_kill): Handle being called with no threads.
11429 * win32-i386-low.c (win32_kill): Likewise.
11430 (get_child_debug_event): Clear current_process_handle.
11432 2006-12-30 Denis PILAT <denis.pilat@st.com>
11433 Daniel Jacobowitz <dan@codesourcery.com>
11435 * remote-utils.c (remote_open): Check the type of specified
11436 serial port devices before opening them.
11437 * server.c (main): Kill the inferior if an error occurs during
11438 the first remote_open.
11440 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11442 * README: Update supported targets.
11444 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11446 * Makefile.in (clean): Remove reg-mips64.c.
11447 (reg-mips64.c, reg-mips64.o): New rules.
11448 * configure.srv: Handle mips64. Include regset support for mips.
11449 * linux-mips-low.c (union mips_register): New.
11450 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11451 (mips_breakpoint, mips_breakpoint_at): Use int.
11452 (mips_collect_register, mips_supply_register)
11453 (mips_collect_register_32bit, mips_supply_register_32bit)
11454 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11455 (mips_store_fpregset, target_regsets): New.
11456 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11458 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11460 * configure.srv: Add target "spu*-*-*".
11461 * Makefile.in (clean): Remove reg-spu.c.
11462 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11463 * spu-low.c: New file.
11465 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11467 * configure.ac: Correct td_thr_tls_get_addr test.
11468 * configure: Regenerated.
11470 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11472 * linux-low.c (linux_wait_for_event): Reformat. Use the
11473 pass_signals array.
11474 * remote-utils.c (decode_address_to_semicolon): New.
11475 * server.c (pass_signals, handle_general_set): New.
11476 (handle_query): Mention QPassSignals for qSupported.
11477 (main): Call handle_general_set.
11478 * server.h (pass_signals, decode_address_to_semicolon): New.
11480 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11482 * server.c (handle_query): Correct error handling for read_auxv.
11484 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11486 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11487 and srv_linux_thread_db to yes.
11488 * linux-s390-low.c (s390_fill_gregset): New function.
11489 (target_regsets): Define data structure.
11491 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11493 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11494 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11495 * config.in, configure: Regenerated.
11496 * inferiors.c (gdb_id_to_thread): New function.
11497 (gdb_id_to_thread_id): Use it.
11498 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11499 * linux-low.h (struct process_info): Add th member.
11500 (thread_db_get_tls_address): New prototype.
11501 * remote-utils.c (decode_address): Make non-static.
11502 * server.c (handle_query): Handle qGetTLSAddr.
11503 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11504 * target.h (struct target_ops): Add get_tls_address.
11505 * thread-db.c (maybe_attach_thread): Save the thread handle.
11506 (thread_db_get_tls_address): New.
11508 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11510 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11511 (linux_resume_one_process): Take a siginfo_t *. Update all
11512 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11513 (struct pending_signals): Add a siginfo_t.
11514 (linux_wait_for_process): Always set last_status.
11515 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11516 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11517 * linux-low.h (struct process_info): Add last_status.
11519 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11521 * remote-utils.c (try_rle): New function.
11522 (putpkt_binary): Use it.
11524 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11526 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11527 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11528 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11529 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11530 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11533 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11535 * server.c (terminal_fd): New variable.
11536 (old_foreground_pgrp): Likewise.
11537 (restore_old_foreground_pgrp): New function.
11538 (start_inferior): Record the terminal file descriptor in terminal_fd
11539 and its original foreground group in old_foreground_pgrp. Register
11540 restore_old_foreground_pgrp with atexit().
11542 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11544 * server.c (handle_query): Correct qPart to qXfer.
11546 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11548 * configure.ac: Check for more headers which are missing on
11549 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11550 * configure.srv: Add Cygwin and mingw32.
11551 * remote-utils.c: Don't include headers unconditionally which
11552 are missing on mingw32. Include <winsock.h> for mingw32.
11553 (remote_open): Adjust for mingw32 support. Flush
11554 standard error after writing to it.
11555 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11556 (unblock_async_io, enable_async_io, disable_async_io)
11557 (readchar, getpkt): Update for Winsock support.
11558 (prepare_resume_reply): Expect a protocol signal number.
11559 * server.c: Disable <sys/wait.h> on mingw32.
11560 (start_inferior): Adjust for mingw32 support. Flush
11561 standard error after writing to it.
11562 (attach_inferior): Likewise. Use protocol signal
11564 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11566 * win32-i386-low.c: New file.
11567 * Makefile.in (XM_CLIBS): Set.
11568 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11569 (win32-i386-low.o): New dependency rule.
11570 * linux-low.c (linux_wait): Use target signal numbers.
11571 * target.h (struct target_ops): Doc fix.
11572 * server.h (target_signal_to_name): New prototype.
11573 * gdbreplay.c: Don't include headers unconditionally which
11574 are missing on mingw32. Include <winsock.h> for mingw32.
11575 (remote_close, remote_open): Adjust for Winsock support.
11576 * configure, config.in: Regenerated.
11578 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11580 * server.c (decode_xfer_read, write_qxfer_response): New.
11581 (handle_query): Take a packet length argument. Handle
11582 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11583 the qSupported response.
11584 (main): Update call to handle_query.
11586 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11588 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11589 (putpkt_binary): Renamed from putpkt and adjusted for binary
11591 (putpkt): New wrapper for putpkt_binary.
11592 (readchar): Don't mask off the high bit.
11593 (decode_X_packet): New function.
11594 * server.c (main): Call putpkt_binary if a handler sets the packet
11595 length. Save the length of the incoming packet. Handle 'X'.
11596 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11598 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11600 * server.c (handle_query): Handle qSupported.
11602 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11604 * remote-utils.c (all_symbols_looked_up): New variable.
11605 (look_up_one_symbol): Check it.
11606 * server.h (look_up_one_symbol): New declaration.
11607 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11609 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11611 * Makefile.in (linux-arm-low.o): Update dependencies.
11612 * linux-arm-low.c: Include "gdb_proc_service.h".
11613 (PTRACE_GET_THREAD_AREA): Define.
11614 (ps_get_thread_area): New function.
11616 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11618 * configure.srv (m68k*-*-uclinux*): New target.
11619 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11620 (linux_resume_one_process): Remove extraneous cast.
11621 (linux_read_offsets): New.
11622 (linux_target_op): Add linux_read_offsets on mmuless systems.
11623 * server.c (handle_query): Add qOffsets logic.
11624 * target.h (struct target_ops): Add read_offsets.
11626 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11628 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11629 (PTRACE_GET_THREAD_AREA): Define.
11630 (ps_get_thread_area): New function.
11631 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11632 (linux-x86-64-low.o): Update.
11634 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11636 * configure.ac: Remove checks for prfpregset_t.
11637 * gdb_proc_service.h: New file.
11638 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11639 new "gdb_proc_service.h".
11640 * proc-service.c: Likewise.
11641 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11642 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11643 * Makefile.in (gdb_proc_service_h): Updated.
11644 * configure, config.in: Regenerated.
11646 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11648 * remote-utils.c (prepare_resume_reply): Move declaration
11649 of gdb_id_from_wait to the top of the block.
11651 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11653 * linux-low.c (regsets_store_inferior_registers): Read the regset
11654 from the target before filling it.
11656 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11658 * server.c (attach_inferior): Return SIGTRAP for a successful
11661 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11663 * Makefile.in (OBS): Add version.o.
11664 (STAGESTUFF): Delete.
11665 (version.o): Add dependencies.
11666 (version.c): Replace rule.
11667 (clean): Remove version.c.
11668 * server.c (gdbserver_version): New.
11669 (gdbserver_usage): Use printf.
11670 (main): Handle --version and --help.
11671 * server.h (version, host_name): Add declarations.
11673 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11685 * linux-x86-64-low.c:
11687 * linux-s390-low.c:
11688 * linux-ppc64-low.c:
11690 * linux-mips-low.c:
11691 * linux-m68k-low.c:
11692 * linux-m32r-low.c:
11695 * linux-ia64-low.c:
11696 * linux-i386-low.c:
11697 * linux-crisv32-low.c:
11709 * gdbserver.1: Add (C) after Copyright. Update the FSF
11712 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11714 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11715 (arm_breakpoint_at): Recognize both breakpoints.
11716 (the_low_target): Use the correct breakpoint instruction.
11718 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11720 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11721 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11722 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11723 (the_low_target): Update.
11725 2005-10-25 Andreas Schwab <schwab@suse.de>
11727 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11729 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11730 (ia64_num_regs): Reduce to 462.
11732 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11734 * acinclude.m4: Correct quoting.
11735 * aclocal.m4: Regenerated.
11737 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11738 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11739 (thread_db_init): Call thread_db_err_str.
11740 * configure.ac: Check for TD_VERSION.
11741 * config.in, configure: Regenerated.
11743 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11745 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11747 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11749 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11750 is not available. Define HAVE_PTRACE_GETREGS if it is.
11751 * config.in, configure: Regenerated.
11752 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11753 * linux-i386-low.c, linux-m68k-low.c: Update to use
11754 HAVE_PTRACE_GETREGS.
11755 * linux-low.c (regsets_fetch_inferior_registers)
11756 (regsets_store_inferior_registers): Only return 0 if we processed
11758 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11759 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11761 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11763 * inferiors.c (struct thread_info): Add gdb_id.
11764 (add_thread): Add gdb_id argument.
11765 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11766 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11767 calls to add_thread.
11768 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11769 * server.c (handle_query): Use thread_to_gdb_id.
11770 (handle_v_cont, main): Use gdb_id_to_thread_id.
11771 * server.h (add_thread): Update prototype.
11772 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11775 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11777 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11778 left-padded registers.
11779 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11780 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11782 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11784 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11785 * configure: Regenerate.
11786 * config.in: Regenerate.
11787 * server.h (NEED_DECLARATION_STRERROR):
11788 Replace with !HAVE_DECL_STRERROR.
11790 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11792 * linux-low.c (linux_wait, linux_send_signal): Don't test
11793 an unsigned long variable for > 0 if it could be MAX_ULONG.
11794 * server.c (myresume): Likewise.
11795 * target.c (set_desired_inferior): Likewise.
11797 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11799 * configure.ac: Simplify and improve check for socklen_t.
11800 * configure, config.in: Regenerate.
11802 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11804 * acconfig.h: Remove.
11805 * configure.ac: Add a test for socklen_t. Use three-argument
11806 AC_DEFINE throughout.
11807 * config.in: Regenerated using autoheader 2.59.
11808 * configure: Regenerated.
11810 * gdbreplay.c (socklen_t): Provide a default.
11811 (remote_open): Use socklen_t.
11812 * remote-utils.c (socklen_t): Provide a default.
11813 (remote_open): Use socklen_t.
11814 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11817 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11819 * linux-low.c (linux_read_memory, linux_write_memory)
11820 (linux_read_auxv): Likewise.
11821 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11822 (check_mem_write): Likewise.
11823 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11825 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11826 (registers_from_string, register_data): Likewise.
11827 * server.c (handle_query, main): Likewise.
11828 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11829 (decode_M_packet): Likewise.
11830 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11831 * target.h (struct target_ops): Update read_memory, write_memory,
11833 (read_inferior_memory, write_inferior_memory): Update.
11834 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11835 to unsigned char *.
11836 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11837 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11838 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11839 linux-s390-low.c, linux-sh-low.c: Update for changes in
11840 read_inferior_memory and the_low_target->breakpoint.
11842 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11844 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11845 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11846 * configure.srv: Add powerpc64-*-linux*.
11847 * linux-ppc64-low.c: New file.
11849 2005-05-23 Orjan Friberg <orjanf@axis.com>
11851 * linux-cris-low.c: New file with support for CRIS.
11852 * linux-crisv32-low.c: Ditto for CRISv32.
11853 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11854 (clean): Add reg-cris.c and reg-crisv32.c.
11855 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11856 reg-crisv32.o, and reg-crisv32.c to make rules.
11857 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11858 recognized targets.
11860 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11862 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11863 of sizeof (PTRACE_XFER_TYPE).
11864 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11866 2005-05-12 Orjan Friberg <orjanf@axis.com>
11868 * target.h (struct target_ops): Add insert_watchpoint,
11869 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11870 pointers for hardware watchpoint support.
11871 * linux-low.h (struct linux_target_ops): Ditto.
11872 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11873 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11874 to linux_target_ops.
11875 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11877 * server.c (main): Recognize 'Z' and 'z' packets.
11879 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11881 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11882 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11883 (the_low_target): Add new members.
11885 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11887 * proc-service.c (ps_lgetregs): Search all_processes instead of
11890 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11892 * server.c (start_inferior): Change return type to int.
11893 (attach_inferior): Change sigptr to int *.
11894 (handle_v_cont, handle_v_requests): Change signal to int *.
11895 (main): Change signal to int.
11897 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11899 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11900 * configure.srv: Add m32r*-*-linux*.
11901 * linux-m32r-low.c: New file.
11903 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11905 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11907 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11909 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11910 Take unsigned long arguments for PIDs.
11911 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11912 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11913 (wait_for_sigstop, linux_resume_one_process)
11914 (regsets_fetch_inferior_registers, linux_send_signal)
11915 (linux_read_auxv): Likewise. Update the types of variables holding
11916 PIDs. Update format string specifiers.
11917 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11918 * remote-utils.c (prepare_resume_reply): Likewise.
11919 * server.c (cont_thread, general_thread, step_thread)
11920 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11922 (handle_query): Update format specifiers.
11923 (handle_v_cont, main): Use strtoul for thread IDs.
11924 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11925 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11926 (general_thread, step_thread, thread_from_wait)
11927 (old_thread_from_wait): Update.
11928 * target.h (struct thread_resume): Use unsigned long for THREAD.
11929 (struct target_ops): Use unsigned long for arguments to attach and
11932 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11934 * acinclude.m4: Include bfd/bfd.m4 directly.
11935 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11936 <agriffis@toolchain.org>.
11937 * aclocal.m4, configure: Regenerated.
11939 2005-01-07 Andrew Cagney <cagney@gnu.org>
11941 * configure.ac: Rename configure.in, require autoconf 2.59.
11942 * configure: Re-generate.
11944 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11946 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11947 LIBS when finished.
11948 * aclocal.m4: Regenerated.
11949 * configure: Regenerated.
11951 2004-11-21 Andreas Schwab <schwab@suse.de>
11953 * linux-m68k-low.c (m68k_num_gregs): Define.
11954 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11955 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11956 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11957 (m68k_breakpoint_at): New. Add to the_low_target.
11959 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11960 srv_linux_thread_db to yes.
11962 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11964 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11965 (ARCH_SET_FS): Likewise.
11966 (ARCH_GET_FS): Likewise.
11967 (ARCH_GET_GS): Likewise.
11969 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11971 * linux-i386-low.c (ps_get_thread_area): New.
11972 * linux-x86-64-low.c (ps_get_thread_area): New.
11973 * linux-low.c: Include <sys/syscall.h>.
11974 (linux_kill_one_process): Don't kill the first thread here.
11975 (linux_kill): Kill the first thread here.
11976 (kill_lwp): New function.
11977 (send_sigstop, linux_send_signal): Use it.
11978 * proc-service.c: Clean up #ifdefs.
11979 (fpregset_info): Delete.
11980 (ps_lgetregs): Update and enable implementation.
11981 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11983 * remote-utils.c (struct sym_cache, symbol_cache): New.
11984 (input_interrupt): Print a clearer message.
11985 (async_io_enabled): New variable.
11986 (enable_async_io, disable_async_io): Use it. Update comments.
11987 (look_up_one_symbol): Use the symbol cache.
11988 * thread-db.c (thread_db_look_up_symbols): New function.
11989 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11991 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11993 * configure.in: Test for -rdynamic.
11994 * configure: Regenerated.
11995 * Makefile (INTERNAL_LDFLAGS): New.
11996 (gdbserver, gdbreplay): Use it.
11998 2004-09-02 Andrew Cagney <cagney@gnu.org>
12000 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12002 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12004 * linux-low.c (linux_wait): Clear all_processes list also.
12006 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12008 * linux-low.c: Include <errno.h>. Remove extern declaration of
12011 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12013 * gdbreplay.c, server.h, utils.c: Update copyright years.
12015 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12017 * server.c (main): Print child status or termination signal from
12018 variable 'signal', not 'sig'.
12020 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12022 * linux-low.c (linux_read_memory): Change return type to
12023 int. Check for and return error from ptrace().
12024 * target.c (read_inferior_memory): Change return type to int. Pass
12025 back return status from the_target->read_memory().
12026 * target.h (struct target_ops): Adapt *read_memory() prototype.
12028 (read_inferior_memory): Adapt prototype.
12029 * server.c (main): Return an error packet if
12030 read_inferior_memory() returns an error.
12032 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12034 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12035 Unify with other clean targets.
12037 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12039 * server.c (handle_v_cont): Call set_desired_inferior.
12041 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12043 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12045 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12047 * linux-low.c (linux_wait): Unblock async I/O.
12048 (linux_resume): Block and enable async I/O.
12049 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12050 * server.h (block_async_io, unblock_async_io): Add prototypes.
12052 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12054 * remote-utils.c (remote_open): Print a status notice after
12055 opening a TCP port.
12056 * server.c (attach_inferior): Print a status notice after
12059 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12061 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12063 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12065 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12067 * server.c, target.h: Update copyright years.
12069 2004-02-25 Roland McGrath <roland@redhat.com>
12071 * target.h (struct target_ops): New member `read_auxv'.
12072 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12073 * linux-low.c (linux_read_auxv): New function.
12074 (linux_target_ops): Initialize `read_auxv' member to that.
12076 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12078 Committed by Jim Blandy <jimb@redhat.com>.
12080 * linux-s390-low.c (s390_num_regs): Update.
12081 (s390_regmap): Remove control registers. Use __s390x__ predefine
12082 instead of GPR_SIZE to distiguish s390 and s390x targets.
12084 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12086 * linux-low.c: Update copyright year.
12087 (check_removed_breakpoint): Clear pending_is_breakpoint.
12088 (linux_set_resume_request, linux_queue_one_thread)
12089 (resume_status_pending_p): New functions.
12090 (linux_continue_one_thread): Use process->resume.
12091 (linux_resume): Only resume threads if there are no pending events.
12092 * linux-low.h (struct process_info): Add resume request
12095 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12097 * regcache.c (new_register_cache): Clear the allocated register
12098 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12100 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12102 * linux-low.c (linux_resume): Take a struct thread_resume *
12104 (linux_wait): Update call.
12105 (resume_ptr): New static variable.
12106 (linux_continue_one_thread): Renamed from
12107 linux_continue_one_process. Use resume_ptr.
12108 (linux_resume): Use linux_continue_one_thread.
12109 * server.c (handle_v_cont, handle_v_requests): New functions.
12110 (myresume): New function.
12111 (main): Handle 'v' case.
12112 * target.h (struct thread_resume): New type.
12113 (struct target_ops): Change argument of "resume" to struct
12115 (myresume): Delete macro.
12117 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12119 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12120 (uninstall): Support DESTDIR.
12122 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12124 * configure.srv: Add xscale*linux copy of arm*linux entry.
12126 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12128 * linux-arm-low.c (arm_reinsert_addr): New function.
12129 (the_low_target): Add arm_reinsert_addr.
12131 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12133 * mem-break.c: Remove whitespace at end of file.
12135 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12137 * configure.in: Check whether we need to prototype strerror.
12138 * server.h: Optionally prototype strerror.
12139 * gdbreplay.c (perror_with_name): Use strerror.
12140 * linux-low.c (linux_attach_lwp): Use strerror.
12141 * utils.c (perror_with_name): Use strerror.
12142 * config.in, configure: Regenerated.
12144 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12146 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12147 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12149 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12151 * Makefile.in (SFILES): Update.
12152 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12153 low-sun3.c: Remove files.
12155 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12157 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12158 (linux_detach_one_process, linux_detach): New functions.
12159 (linux_target_ops): Add linux_detach.
12160 * server.c (main): Handle 'D' packet.
12161 * target.h (struct target_ops): Add "detach" member.
12162 (detach_inferior): Define.
12164 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12166 From Kelley Cook <kelleycook@wideopenwest.com>:
12167 * configure.srv: Accept i[34567]86 variants.
12169 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12171 * linux-low.c (linux_wait_for_event): Correct comment typos.
12172 (linux_resume_one_process): Call check_removed_breakpoint.
12173 (linux_send_signal): New function.
12174 (linux_target_ops): Add linux_send_signal.
12175 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12177 * target.h (struct target_ops): Add send_signal.
12179 2003-05-29 Jim Blandy <jimb@redhat.com>
12181 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12182 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12183 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12184 away part of the register's value.
12186 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12188 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12189 (linux_wait_for_event, linux_init_signals): Likewise.
12191 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12193 * configure.in: Check for stdlib.h.
12194 * configure: Regenerated.
12195 * config.in: Regenerated.
12197 2003-01-04 Andreas Schwab <schwab@suse.de>
12199 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12201 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12203 * Makefile.in: Remove obsolete code.
12205 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12207 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12208 defined(PT_FPR0_HI).
12210 2002-11-17 Stuart Hughes <seh@zee2.com>
12212 * linux-arm-low.c (arm_num_regs): Increase.
12213 (arm_regmap): Include status register.
12215 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12217 * linux-low.c (register_addr): Remove incorrect -1 check.
12219 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12221 * linux-low.c (linux_create_inferior): Call setpgid. Return
12223 (unstopped_p, linux_signal_pid): Remove.
12224 (linux_target_ops): Remove linux_signal_pid.
12225 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12226 global instead of target method.
12227 * target.h (struct target_ops): Remove signal_pid. Update comment
12228 for create_inferior.
12229 * server.c (signal_pid): New variable.
12230 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12231 gdbserver. Set the child to be the foreground process group.
12232 (attach_inferior): Set signal_pid.
12234 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12236 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12238 2002-08-20 Jim Blandy <jimb@redhat.com>
12240 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12243 2002-08-01 Andrew Cagney <cagney@redhat.com>
12245 * Makefile.in: Make chill references obsolete.
12247 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12249 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12250 * configure: Regenerate.
12251 * config.in: Regenerate.
12253 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12255 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12256 (perror_with_name, remote_close, remote_open, expect, play): Static.
12258 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12260 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12261 byte offsets instead of an array of indexes.
12262 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12264 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12266 * regcache.c: Add comment.
12268 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12270 * thread-db.c: New file.
12271 * proc-service.c: New file.
12272 * acinclude.m4: New file.
12273 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12274 proc-service.o, and thread-db.o.
12275 (linux-low.o): Add USE_THREAD_DB.
12276 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12277 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12278 * aclocal.m4: Regenerated.
12279 * config.in: Regenerated.
12280 * configure: Regenerated.
12281 * configure.in: Check for proc_service.h, sys/procfs.h,
12282 thread_db.h, and linux/elf.h headrs.
12283 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12284 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12285 Check for -lthread_db and thread support.
12286 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12287 PowerPC, and SuperH.
12288 * i387-fp.c: Constify arguments.
12289 * i387-fp.h: Likewise.
12290 * inferiors.c: (struct thread_info): Renamed from
12291 `struct inferior_info'. Remove PID member. Use generic inferior
12292 list header. All uses updated.
12293 (inferiors, signal_pid): Removed.
12294 (all_threads): New variable.
12295 (get_thread): Define.
12296 (add_inferior_to_list): New function.
12297 (for_each_inferior): New function.
12298 (change_inferior_id): New function.
12299 (add_inferior): Removed.
12300 (remove_inferior): New function.
12301 (add_thread): New function.
12302 (free_one_thread): New function.
12303 (remove_thread): New function.
12304 (clear_inferiors): Use for_each_inferior and free_one_thread.
12305 (find_inferior): New function.
12306 (find_inferior_id): New function.
12307 (inferior_target_data): Update argument type.
12308 (set_inferior_target_data): Likewise.
12309 (inferior_regcache_data): Likewise.
12310 (set_inferior_regcache_data): Likewise.
12311 * linux-low.c (linux_bp_reinsert): Remove.
12312 (all_processes, stopping_threads, using_thrads)
12313 (struct pending_signals, debug_threads, pid_of): New.
12314 (inferior_pid): Replace with macro.
12315 (struct inferior_linux_data): Remove.
12316 (get_stop_pc, add_process): New functions.
12317 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12318 Use add_process and add_thread.
12319 (linux_attach_lwp): New function, based on old linux_attach. Use
12320 add_process and add_thread. Set stop_expected for new threads.
12321 (linux_attach): New function.
12322 (linux_kill_one_process): New function.
12323 (linux_kill): Kill all LWPs.
12324 (linux_thread_alive): Use find_inferior_id.
12325 (check_removed_breakpoints, status_pending_p): New functions.
12326 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12327 Update. Use WNOHANG. Wait for cloned processes also. Update process
12328 struct for the found process.
12329 (linux_wait_for_event): New function.
12330 (linux_wait): Use it. Support LWPs.
12331 (send_sigstop, wait_for_sigstop, stop_all_processes)
12332 (linux_resume_one_process, linux_continue_one_process): New functions.
12333 (linux_resume): Support LWPs.
12334 (REGISTER_RAW_SIZE): Remove.
12335 (fetch_register): Use register_size instead. Call supply_register.
12336 (usr_store_inferior_registers): Likewise. Call collect_register.
12337 Fix recursive case.
12338 (regsets_fetch_inferior_registers): Improve error message.
12339 (regsets_store_inferior_registers): Add debugging.
12340 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12341 (unstopped_p, linux_signal_pid): New functions.
12342 (linux_target_ops): Add linux_signal_pid.
12343 (linux_init_signals): New function.
12344 (initialize_low): Call it. Initialize using_threads.
12345 * regcache.c (inferior_regcache_data): Add valid
12347 (get_regcache): Fetch registers lazily. Add fetch argument
12348 and update all callers.
12349 (regcache_invalidate_one, regcache_invalidate): New
12351 (new_register_cache): Renamed from create_register_cache.
12352 Return the new regcache.
12353 (free_register_cache): Change argument to a void *.
12354 (registers_to_string, registers_from_string): Call get_regcache
12355 with fetch flag set.
12356 (register_data): Make static. Pass fetch flag to get_regcache.
12357 (supply_register): Call get_regcache with fetch flag clear.
12358 (collect_register): Call get_regcache with fetch flag set.
12359 (collect_register_as_string): New function.
12360 * regcache.h: Update.
12361 * remote-utils.c (putpkt): Flush after debug output and use
12363 Handle input interrupts while waiting for an ACK.
12364 (input_interrupt): Use signal_pid method.
12365 (getpkt): Flush after debug output and use stderr.
12366 (outreg): Use collect_register_as_string.
12367 (new_thread_notify, dead_thread_notify): New functions.
12368 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12369 and general_thread.
12370 (look_up_one_symbol): Flush after debug output.
12371 * server.c (step_thread, server_waiting): New variables.
12372 (start_inferior): Don't use signal_pid. Update call to mywait.
12373 (attach_inferior): Update call to mywait.
12374 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12375 (main): Don't fetch/store registers explicitly. Use
12376 set_desired_inferior. Support proposed ``Hs'' packet. Update
12378 * server.h: Update.
12379 (struct inferior_list, struct_inferior_list_entry): New.
12380 * target.c (set_desired_inferior): New.
12381 (write_inferior_memory): Constify.
12382 (mywait): New function.
12383 * target.h: Update.
12384 (struct target_ops): New signal_pid method.
12385 (mywait): Removed macro, added prototype.
12387 * linux-low.h (regset_func): Removed.
12388 (regset_fill_func, regset_store_func): New.
12389 (enum regset_type): New.
12390 (struct regset_info): Add type field. Use new operation types.
12391 (struct linux_target_ops): stop_pc renamed to get_pc.
12392 Add decr_pc_after_break and breakpoint_at.
12393 (get_process, get_thread_proess, get_process_thread)
12394 (strut process_info, all_processes, linux_attach_lwp)
12395 (thread_db_init): New.
12397 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12398 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12399 (the_low_target): Add new members.
12400 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12401 (i386_store_fpxregset): Constify.
12402 (target_regsets): Add new kind identifier.
12403 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12404 (i386_set_pc): Add debugging.
12405 (i386_breakpoint_at): New function.
12406 (the_low_target): Add new members.
12407 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12408 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12409 (mips_breakpoint_at): New.
12410 (the_low_target): Add new members.
12411 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12412 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12413 (the_low_target): Add new members.
12414 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12415 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12416 (the_low_target): Add new members.
12417 * linux-x86-64-low.c (target_regsets): Add new kind
12420 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12422 From Martin Pool <mbp@samba.org>:
12423 * server.c (gdbserver_usage): New function.
12426 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12428 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12429 stop_at -> stop_pc.
12431 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12433 * Makefile.in: Remove obsolete code.
12435 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12437 * linux-low.c (regsets_fetch_inferior_registers),
12438 (regsets_store_inferior_registers): Removed cast to int from
12440 * regcache.h: Added declaration of struct inferior_info.
12442 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12444 * inferiors.c (struct inferior_info): Add regcache_data.
12445 (add_inferior): Call create_register_cache.
12446 (clear_inferiors): Call free_register_cache.
12447 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12448 * regcache.c (struct inferior_regcache_data): New.
12449 (registers): Remove.
12450 (get_regcache): New function.
12451 (create_register_cache, free_register_cache): New functions.
12452 (set_register_cache): Don't initialize the register cache here.
12453 (registers_to_string, registers_from_string, register_data): Call
12455 * regcache.h: Add prototypes.
12456 * server.h: Likewise.
12458 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12460 * mem-break.c: New file.
12461 * mem-break.h: New file.
12462 * Makefile.in: Add mem-break.o rule; update server.h
12464 * inferiors.c (struct inferior_info): Add target_data
12466 (clear_inferiors): Free target_data member if set.
12467 (inferior_target_data, set_inferior_target_data): New functions.
12468 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12469 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12470 * linux-low.c (linux_bp_reinsert): New variable.
12471 (struct inferior_linux_data): New.
12472 (linux_create_inferior): Use set_inferior_target_data.
12473 (linux_attach): Likewise. Call add_inferior.
12474 (linux_wait_for_one_inferior): New function.
12475 (linux_wait): Call it.
12476 (linux_write_memory): Add const.
12477 (initialize_low): Call set_breakpoint_data.
12478 * linux-low.h (struct linux_target_ops): Add breakpoint
12480 * server.c (attach_inferior): Remove extra add_inferior
12482 * server.h: Include mem-break.h. Update inferior.c
12484 * target.c (read_inferior_memory)
12485 (write_inferior_memory): New functions.
12486 * target.h (read_inferior_memory)
12487 (write_inferior_memory): Change macros to prototypes.
12488 (struct target_ops): Update comments. Add const to write_memory
12491 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12493 * linux-low.c (usr_store_inferior_registers): Support
12494 registers which are allowed to fail to store.
12495 * linux-low.h (linux_target_ops): Likewise.
12496 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12497 (ppc_cannot_store_register): FPSCR may not be storable.
12499 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12501 * server.h: Include <string.h> if HAVE_STRING_H.
12502 * ChangeLog: Correct paths in last ChangeLog entry.
12504 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12506 * linux-low.h: Remove obsolete prototypes.
12507 (struct linux_target_ops): New.
12508 (extern the_low_target): New.
12509 * linux-low.c (num_regs, regmap): Remove declarations.
12510 (register_addr): Use the_low_target explicitly.
12511 (fetch_register): Likewise.
12512 (usr_fetch_inferior_registers): Likewise.
12513 (usr_store_inferior_registers): Likewise.
12514 * linux-arm-low.c (num_regs): Remove.
12515 (arm_num_regs): Define.
12516 (arm_regmap): Renamed from regmap, made static.
12517 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12519 (arm_cannot_store_register): Renamed from cannot_store_register,
12521 (the_low_target): New.
12522 * linux-i386-low.c (num_regs): Remove.
12523 (i386_num_regs): Define.
12524 (i386_regmap): Renamed from regmap, made static.
12525 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12527 (i386_cannot_store_register): Renamed from cannot_store_register,
12529 (the_low_target): New.
12530 * linux-ia64-low.c (num_regs): Remove.
12531 (ia64_num_regs): Define.
12532 (ia64_regmap): Renamed from regmap, made static.
12533 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12535 (ia64_cannot_store_register): Renamed from cannot_store_register,
12537 (the_low_target): New.
12538 * linux-m68k-low.c (num_regs): Remove.
12539 (m68k_num_regs): Define.
12540 (m68k_regmap): Renamed from regmap, made static.
12541 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12543 (m68k_cannot_store_register): Renamed from cannot_store_register,
12545 (the_low_target): New.
12546 * linux-mips-low.c (num_regs): Remove.
12547 (mips_num_regs): Define.
12548 (mips_regmap): Renamed from regmap, made static.
12549 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12551 (mips_cannot_store_register): Renamed from cannot_store_register,
12553 (the_low_target): New.
12554 * linux-ppc-low.c (num_regs): Remove.
12555 (ppc_num_regs): Define.
12556 (ppc_regmap): Renamed from regmap, made static.
12557 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12559 (ppc_cannot_store_register): Renamed from cannot_store_register,
12561 (the_low_target): New.
12562 * linux-s390-low.c (num_regs): Remove.
12563 (s390_num_regs): Define.
12564 (s390_regmap): Renamed from regmap, made static.
12565 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12567 (s390_cannot_store_register): Renamed from cannot_store_register,
12569 (the_low_target): New.
12570 * linux-sh-low.c (num_regs): Remove.
12571 (sh_num_regs): Define.
12572 (sh_regmap): Renamed from regmap, made static.
12573 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12575 (sh_cannot_store_register): Renamed from cannot_store_register,
12577 (the_low_target): New.
12578 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12579 (the_low_target): New.
12581 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12583 * Makefile.in: Add stamp-h target.
12584 * configure.in: Create stamp-h.
12585 * configure: Regenerated.
12587 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12589 * inferiors.c: New file.
12590 * target.c: New file.
12591 * target.h: New file.
12592 * Makefile.in: Add target.o and inferiors.o. Update
12594 * linux-low.c (inferior_pid): New static variable,
12595 moved from server.c.
12596 (linux_create_inferior): Renamed from create_inferior.
12597 Call add_inferior. Return 0 on success instead of a PID.
12598 (linux_attach): Renamed from myattach.
12599 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12600 (linux_thread_alive): Renamed from mythread_alive.
12601 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12603 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12604 (regsets_store_inferior_registers): Correct error message.
12605 Add missing ``return 0''.
12606 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12607 (linux_store_registers): Renamed from store_inferior_registers.
12608 (linux_read_memory): Renamed from read_inferior_memory.
12609 (linux_write_memory): Renamed from write_inferior_memory.
12610 (linux_target_ops): New structure.
12611 (initialize_low): Call set_target_ops ().
12612 * remote-utils.c (unhexify): New function.
12613 (hexify): New function.
12614 (input_interrupt): Send signals to ``signal_pid''.
12615 * server.c (inferior_pid): Remove.
12616 (start_inferior): Update create_inferior call.
12617 (attach_inferior): Call add_inferior.
12618 (handle_query): New function.
12619 (main): Call handle_query for `q' packets.
12620 * server.h: Include "target.h". Remove obsolete prototypes.
12621 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12623 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12625 * Makefile.in: Add WARN_CFLAGS. Update configury
12627 * configure.in: Check for <string.h>
12628 * configure: Regenerate.
12629 * config.in: Regenerate.
12630 * gdbreplay.c: Include needed system headers.
12631 (remote_open): Remove strchr prototype.
12632 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12633 * regcache.c (supply_register): Change buf argument to const void *.
12634 (supply_register_by_name): Likewise.
12635 (collect_register): Change buf argument to void *.
12636 (collect_register_by_name): Likewise.
12637 * regcache.h: Add missing prototypes.
12638 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12639 * server.c (handle_query): New function.
12640 (attached): New static variable, moved out of main.
12641 (main): Quiet longjmp clobber warnings.
12642 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12643 * utils.c (error): Remove NORETURN.