1 2015-11-17 Pedro Alves <palves@redhat.com>
3 * win32-low.c (win32_resume): Use gdb_signal_from_host,
4 GDB_SIGNAL_0 and gdb_signal_to_string.
6 2015-11-17 Pedro Alves <palves@redhat.com>
8 * win32-low.c (handle_output_debug_string): Remove parameter.
9 (win32_kill): Remove our_status local and adjust call to
10 handle_output_debug_string.
11 (get_child_debug_event): Adjust call to
12 handle_output_debug_string.
14 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
16 * linux-mips-low.c (mips_fill_gregset): Add cast.
17 (mips_store_gregset): Likewise.
18 (mips_fill_fpregset): Likewise.
19 (mips_store_fpregset): Likewise.
21 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
23 * linux-mips-low.c (mips_add_watchpoint): Rename private to
26 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
28 * linux-mips-low.c (mips_linux_new_thread): Change type of
29 watch_type to enum target_hw_bp_type.
31 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
33 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
34 Change return type to arm_hwbp_type.
36 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
38 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
39 (arm_store_gregset): Likewise.
40 * linux-arm-low.c (arm_get_hwcap): Likewise.
41 (arm_read_description): Likewise.
43 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
45 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
47 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
49 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
50 (ppc_fill_vsxregset): Likewise.
51 (ppc_store_vsxregset): Likewise.
52 (ppc_fill_vrregset): Likewise.
53 (ppc_store_vrregset): Likewise.
54 (ppc_fill_evrregset): Likewise.
55 (ppc_store_evrregset): Likewise.
57 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
59 * linux-ppc-low.c (ppc_usrregs_info): Remove
61 (ppc_arch_setup): Move lower in file.
63 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
65 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
66 (ps_pdwrite): Likewise.
68 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
70 * linux-arm-low.c (arm_new_thread): Move pointer dereference
71 to after assert checks.
73 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
75 * proc-service.c (ps_pdread): Add/adjust casts.
76 (ps_pdwrite): Add/adjust casts.
78 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
80 * server.c (handle_search_memory_1): Cast return value of
83 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
85 * server.c (write_qxfer_response): Change type of data to
88 2015-10-29 Pedro Alves <palves@redhat.com>
90 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
92 2015-10-29 Pedro Alves <palves@redhat.com>
94 * tracepoint.c (clear_installed_tracepoints): Add casts.
96 2015-10-29 Pedro Alves <palves@redhat.com>
98 * server.c (handle_v_cont, process_serial_event): Add enum
99 gdb_signal casts to signal parsing code.
101 2015-10-29 Pedro Alves <palves@redhat.com>
103 * linux-low.h (NULL_REGSET): Define.
104 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
105 * linux-arm-low.c (arm_regsets): Likewise.
106 * linux-crisv32-low.c (cris_regsets): Likewise.
107 * linux-m68k-low.c (m68k_regsets): Likewise.
108 * linux-mips-low.c (mips_regsets): Likewise.
109 * linux-nios2-low.c (nios2_regsets): Likewise.
110 * linux-ppc-low.c (ppc_regsets): Likewise.
111 * linux-s390-low.c (s390_regsets): Likewise.
112 * linux-sh-low.c (sh_regsets): Likewise.
113 * linux-sparc-low.c (sparc_regsets): Likewise.
114 * linux-tic6x-low.c (tic6x_regsets): Likewise.
115 * linux-tile-low.c (tile_regsets): Likewise.
116 * linux-x86-low.c (x86_regsets): Likewise.
117 * linux-xtensa-low.c (xtensa_regsets): Likewise.
119 2015-10-29 Pedro Alves <palves@redhat.com>
121 * linux-low.h (NULL_REGSET): Define.
122 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
123 * linux-arm-low.c (arm_regsets): Likewise.
124 * linux-crisv32-low.c (cris_regsets): Likewise.
125 * linux-m68k-low.c (m68k_regsets): Likewise.
126 * linux-mips-low.c (mips_regsets): Likewise.
127 * linux-nios2-low.c (nios2_regsets): Likewise.
128 * linux-ppc-low.c (ppc_regsets): Likewise.
129 * linux-s390-low.c (s390_regsets): Likewise.
130 * linux-sh-low.c (sh_regsets): Likewise.
131 * linux-sparc-low.c (sparc_regsets): Likewise.
132 * linux-tic6x-low.c (tic6x_regsets): Likewise.
133 * linux-tile-low.c (tile_regsets): Likewise.
134 * linux-x86-low.c (x86_regsets): Likewise.
135 * linux-xtensa-low.c (xtensa_regsets): Likewise.
137 2015-10-26 Doug Evans <dje@google.com>
139 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
141 2015-10-26 Doug Evans <dje@google.com>
143 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
145 2015-10-26 Doug Evans <dje@google.com>
147 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
149 (attach_thread, find_new_threads_callback): Ditto.
151 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
153 * mem-break.h (set_breakpoint_data): Remove.
155 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
157 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
158 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
159 (initialize_low): Remove set_breakpoint_data call.
160 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
161 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
162 (initialize_low): Remove set_breakpoint_data call.
163 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
164 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
165 (initialize_low): Remove set_breakpoint_data call.
167 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
169 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
170 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
171 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
172 * target.h (target_breakpoint_kind_from_pc): New macro.
174 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
176 * linux-low.c (default_breakpoint_kind_from_pc): New function.
177 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
178 the default breakpoint kind.
180 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
182 * linux-arm-low.c (arm_supports_z_point_type): Add software
185 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
187 * linux-arm-low.c: Refactor breakpoint definitions.
188 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
189 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
191 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
193 * Makefile.in: Add arm.c/o.
194 * configure.srv: Likewise.
195 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
196 (arm_breakpoint_kind_from_pc): New function.
197 (arm_sw_breakpoint_from_kind): Return proper kind.
198 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
200 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
202 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
204 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
205 (struct raw_breakpoint) <size>: Remove.
206 (struct raw_breakpoint) <kind>: Add.
207 (bp_size): New function.
208 (bp_opcode): Likewise.
209 (find_raw_breakpoint_at): Adjust for kind.
210 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
211 (remove_memory_breakpoint): Adjust for kind call bp_size.
212 (set_raw_breakpoint_at): Adjust for kind.
213 (set_breakpoint): Likewise.
214 (set_breakpoint_at): Call breakpoint_kind_from_pc.
215 (delete_raw_breakpoint): Adjust for kind.
216 (delete_breakpoint): Likewise.
217 (find_gdb_breakpoint): Likewise.
218 (set_gdb_breakpoint_1): Likewise.
219 (set_gdb_breakpoint): Likewise.
220 (delete_gdb_breakpoint_1): Likewise.
221 (delete_gdb_breakpoint): Likewise.
222 (uninsert_raw_breakpoint): Likewise.
223 (reinsert_raw_breakpoint): Likewise.
224 (set_breakpoint_data): Remove.
225 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
226 (check_mem_read): Adjust for kind call bp_size.
227 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
228 (clone_one_breakpoint): Adjust for kind.
229 * mem-break.h (set_gdb_breakpoint): Likewise.
230 (delete_gdb_breakpoint): Likewise.
231 * server.c (process_serial_event): Likewise.
233 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
235 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
236 (struct linux_target_ops) <breakpoint>: Remove.
237 (struct linux_target_ops) <breakpoint_len>: Remove.
238 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
239 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
240 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
241 (arm_sw_breakpoint_from_kind): New function.
242 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
243 (struct linux_target_ops) <breakpoint>: Remove.
244 (struct linux_target_ops) <breakpoint_len>: Remove.
245 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
246 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
247 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
248 (struct linux_target_ops) <breakpoint>: Remove.
249 (struct linux_target_ops) <breakpoint_len>: Remove.
250 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
251 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
252 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
253 (struct linux_target_ops) <breakpoint>: Remove.
254 (struct linux_target_ops) <breakpoint_len>: Remove.
255 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
256 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
257 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
258 and sw_breakpoint_from_kind to increment the pc.
259 (linux_breakpoint_kind_from_pc): New function.
260 (linux_sw_breakpoint_from_kind): New function.
261 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
262 (initialize_low): Call breakpoint_kind_from_pc and
263 sw_breakpoint_from_kind to replace breakpoint_data/len.
264 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
266 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
267 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
268 (struct linux_target_ops) <breakpoint>: Remove.
269 (struct linux_target_ops) <breakpoint_len>: Remove.
270 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
271 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
272 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
273 (struct linux_target_ops) <breakpoint>: Remove.
274 (struct linux_target_ops) <breakpoint_len>: Remove.
275 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
276 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
277 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
278 (struct linux_target_ops) <breakpoint>: Remove.
279 (struct linux_target_ops) <breakpoint_len>: Remove.
280 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
281 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
282 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
283 (struct linux_target_ops) <breakpoint>: Remove.
284 (struct linux_target_ops) <breakpoint_len>: Remove.
285 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
286 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
287 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
288 (struct linux_target_ops) <breakpoint>: Remove.
289 (struct linux_target_ops) <breakpoint_len>: Remove.
290 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
291 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
292 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
293 (struct linux_target_ops) <breakpoint>: Remove.
294 (struct linux_target_ops) <breakpoint_len>: Remove.
295 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
296 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
297 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
298 (struct linux_target_ops) <breakpoint>: Remove.
299 (struct linux_target_ops) <breakpoint_len>: Remove.
300 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
301 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
302 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
303 (struct linux_target_ops) <breakpoint>: Remove.
304 (struct linux_target_ops) <breakpoint_len>: Remove.
305 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
306 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
307 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
308 (struct linux_target_ops) <breakpoint>: Remove.
309 (struct linux_target_ops) <breakpoint_len>: Remove.
310 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
311 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
312 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
313 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
314 (struct linux_target_ops) <breakpoint>: Remove.
315 (struct linux_target_ops) <breakpoint_len>: Remove.
316 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
317 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
318 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
319 (struct linux_target_ops) <breakpoint>: Remove.
320 (struct linux_target_ops) <breakpoint_len>: Remove.
321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
324 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
326 * linux-cris-low.c (cris_get_pc): Remove void arg.
328 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
330 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
333 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
335 * inferiors.c (thread_pid_matches_callback): New function.
336 (find_thread_process): New function.
337 (remove_thread): Reset current_thread.
338 (remove_process): Assert threads have been removed first.
340 2015-10-15 Yao Qi <yao.qi@linaro.org>
342 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
344 (aarch64_remove_point): Likewise.
345 * regcache.c (regcache_register_size): New function.
347 2015-10-12 Yao Qi <yao.qi@linaro.org>
349 * linux-aarch64-low.c: Update all callers as emit_load_store
350 is renamed to aarch64_emit_load_store.
352 2015-10-12 Yao Qi <yao.qi@linaro.org>
354 * linux-aarch64-low.c: Update all callers of function renaming
355 from emit_insn to aarch64_emit_insn.
357 2015-10-12 Yao Qi <yao.qi@linaro.org>
359 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
361 (struct aarch64_memory_operand): Likewise.
363 (emit_insn): Move to arch/aarch64-insn.c.
364 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
365 (emit_load_store): Move to arch/aarch64-insn.c.
366 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
367 (can_encode_int32): Remove.
369 2015-10-12 Yao Qi <yao.qi@linaro.org>
371 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
372 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
373 (aarch64_relocate_instruction): Likewise.
374 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
375 (struct aarch64_insn_visitor): Likewise.
377 2015-10-12 Yao Qi <yao.qi@linaro.org>
379 * linux-aarch64-low.c (struct aarch64_insn_data): New.
380 (struct aarch64_insn_visitor): New.
381 (struct aarch64_insn_relocation_data): New.
382 (aarch64_ftrace_insn_reloc_b): New function.
383 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
384 (aarch64_ftrace_insn_reloc_cb): Likewise.
385 (aarch64_ftrace_insn_reloc_tb): Likewise.
386 (aarch64_ftrace_insn_reloc_adr): Likewise.
387 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
388 (aarch64_ftrace_insn_reloc_others): Likewise.
390 (aarch64_relocate_instruction): Use visitor.
392 2015-10-12 Yao Qi <yao.qi@linaro.org>
394 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
395 int. Add argument buf.
396 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
397 aarch64_relocate_instruction.
399 2015-10-12 Yao Qi <yao.qi@linaro.org>
401 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
402 argument insn. Remove local variable insn. Don't call
404 (aarch64_install_fast_tracepoint_jump_pad): Call
407 2015-09-30 Yao Qi <yao.qi@linaro.org>
409 * linux-aarch64-low.c (emit_movk): Shorten a long line.
410 (emit_load_store_pair): Likewise.
412 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
414 * dll.c (match_dll): Add cast(s).
415 (unloaded_dll): Likewise.
416 * linux-low.c (second_thread_of_pid_p): Likewise.
417 (delete_lwp_callback): Likewise.
418 (count_events_callback): Likewise.
419 (select_event_lwp_callback): Likewise.
420 (linux_set_resume_request): Likewise.
421 * server.c (accumulate_file_name_length): Likewise.
422 (emit_dll_description): Likewise.
423 (handle_qxfer_threads_worker): Likewise.
424 (visit_actioned_threads): Likewise.
425 * thread-db.c (any_thread_of): Likewise.
426 * tracepoint.c (same_process_p): Likewise.
427 (match_blocktype): Likewise.
428 (build_traceframe_info_xml): Likewise.
430 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
432 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
434 (gdb_unparse_agent_expr): Likewise.
435 * hostio.c (require_data): Likewise.
436 (handle_pread): Likewise.
437 * linux-low.c (disable_regset): Likewise.
438 (fetch_register): Likewise.
439 (store_register): Likewise.
440 (get_dynamic): Likewise.
441 (linux_qxfer_libraries_svr4): Likewise.
442 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
443 (set_fast_tracepoint_jump): Likewise.
444 (uninsert_fast_tracepoint_jumps_at): Likewise.
445 (reinsert_fast_tracepoint_jumps_at): Likewise.
446 (validate_inserted_breakpoint): Likewise.
447 (clone_agent_expr): Likewise.
448 * regcache.c (init_register_cache): Likewise.
449 * remote-utils.c (putpkt_binary_1): Likewise.
450 (decode_M_packet): Likewise.
451 (decode_X_packet): Likewise.
452 (look_up_one_symbol): Likewise.
453 (relocate_instruction): Likewise.
454 (monitor_output): Likewise.
455 * server.c (handle_search_memory): Likewise.
456 (handle_qxfer_exec_file): Likewise.
457 (handle_qxfer_libraries): Likewise.
458 (handle_qxfer): Likewise.
459 (handle_query): Likewise.
460 (handle_v_cont): Likewise.
461 (handle_v_run): Likewise.
462 (captured_main): Likewise.
463 * target.c (write_inferior_memory): Likewise.
464 * thread-db.c (try_thread_db_load_from_dir): Likewise.
465 * tracepoint.c (init_trace_buffer): Likewise.
466 (add_tracepoint_action): Likewise.
467 (add_traceframe): Likewise.
468 (add_traceframe_block): Likewise.
469 (cmd_qtdpsrc): Likewise.
470 (cmd_qtdv): Likewise.
471 (cmd_qtstatus): Likewise.
472 (response_source): Likewise.
473 (response_tsv): Likewise.
474 (cmd_qtnotes): Likewise.
475 (gdb_collect): Likewise.
476 (initialize_tracepoint): Likewise.
478 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
480 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
481 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
482 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
484 (enum aarch64_condition_codes): New enum.
485 (w0): New static global.
488 (struct aarch64_memory_operand) <type>: New
489 MEMORY_OPERAND_POSTINDEX type.
490 (postindex_memory_operand): New helper function.
491 (emit_ret): New function.
492 (emit_load_store_pair): New function, factored out of emit_stp
493 with support for MEMORY_OPERAND_POSTINDEX.
494 (emit_stp): Rewrite using emit_load_store_pair.
495 (emit_ldp): New function.
496 (emit_load_store): Likewise.
497 (emit_ldr): Mention post-index instruction in comment.
498 (emit_ldrh): New function.
499 (emit_ldrb): New function.
500 (emit_ldrsw): Mention post-index instruction in comment.
501 (emit_str): Likewise.
502 (emit_subs): New function.
503 (emit_cmp): Likewise.
504 (emit_and): Likewise.
505 (emit_orr): Likewise.
506 (emit_orn): Likewise.
507 (emit_eor): Likewise.
508 (emit_mvn): Likewise.
509 (emit_lslv): Likewise.
510 (emit_lsrv): Likewise.
511 (emit_asrv): Likewise.
512 (emit_mul): Likewise.
513 (emit_sbfm): Likewise.
514 (emit_sbfx): Likewise.
515 (emit_ubfm): Likewise.
516 (emit_ubfx): Likewise.
517 (emit_csinc): Likewise.
518 (emit_cset): Likewise.
519 (emit_nop): Likewise.
520 (emit_ops_insns): New helper function.
521 (emit_pop): Likewise.
522 (emit_push): Likewise.
523 (aarch64_emit_prologue): New function.
524 (aarch64_emit_epilogue): Likewise.
525 (aarch64_emit_add): Likewise.
526 (aarch64_emit_sub): Likewise.
527 (aarch64_emit_mul): Likewise.
528 (aarch64_emit_lsh): Likewise.
529 (aarch64_emit_rsh_signed): Likewise.
530 (aarch64_emit_rsh_unsigned): Likewise.
531 (aarch64_emit_ext): Likewise.
532 (aarch64_emit_log_not): Likewise.
533 (aarch64_emit_bit_and): Likewise.
534 (aarch64_emit_bit_or): Likewise.
535 (aarch64_emit_bit_xor): Likewise.
536 (aarch64_emit_bit_not): Likewise.
537 (aarch64_emit_equal): Likewise.
538 (aarch64_emit_less_signed): Likewise.
539 (aarch64_emit_less_unsigned): Likewise.
540 (aarch64_emit_ref): Likewise.
541 (aarch64_emit_if_goto): Likewise.
542 (aarch64_emit_goto): Likewise.
543 (aarch64_write_goto_address): Likewise.
544 (aarch64_emit_const): Likewise.
545 (aarch64_emit_call): Likewise.
546 (aarch64_emit_reg): Likewise.
547 (aarch64_emit_pop): Likewise.
548 (aarch64_emit_stack_flush): Likewise.
549 (aarch64_emit_zero_ext): Likewise.
550 (aarch64_emit_swap): Likewise.
551 (aarch64_emit_stack_adjust): Likewise.
552 (aarch64_emit_int_call_1): Likewise.
553 (aarch64_emit_void_call_2): Likewise.
554 (aarch64_emit_eq_goto): Likewise.
555 (aarch64_emit_ne_goto): Likewise.
556 (aarch64_emit_lt_goto): Likewise.
557 (aarch64_emit_le_goto): Likewise.
558 (aarch64_emit_gt_goto): Likewise.
559 (aarch64_emit_ge_got): Likewise.
560 (aarch64_emit_ops_impl): New static global variable.
561 (aarch64_emit_ops): New target function, return
562 &aarch64_emit_ops_impl.
563 (struct linux_target_ops): Install it.
565 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
567 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
568 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
570 * linux-aarch64-ipa.c: New file.
571 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
573 (aarch64_get_thread_area): New target method.
574 (extract_signed_bitfield): New helper function.
575 (aarch64_decode_ldr_literal): New function.
576 (enum aarch64_opcodes): New enum.
577 (struct aarch64_register): New struct.
578 (struct aarch64_operand): New struct.
579 (x0): New static global.
588 (aarch64_register): New helper function.
589 (register_operand): Likewise.
590 (immediate_operand): Likewise.
591 (struct aarch64_memory_operand): New struct.
592 (offset_memory_operand): New helper function.
593 (preindex_memory_operand): Likewise.
594 (enum aarch64_system_control_registers): New enum.
596 (emit_insn): New helper function.
597 (emit_b): New function.
598 (emit_bcond): Likewise.
601 (emit_blr): Likewise.
602 (emit_stp): Likewise.
603 (emit_ldp_q_offset): Likewise.
604 (emit_stp_q_offset): Likewise.
605 (emit_load_store): Likewise.
606 (emit_ldr): Likewise.
607 (emit_ldrsw): Likewise.
608 (emit_str): Likewise.
609 (emit_ldaxr): Likewise.
610 (emit_stxr): Likewise.
611 (emit_stlr): Likewise.
612 (emit_data_processing_reg): Likewise.
613 (emit_data_processing): Likewise.
614 (emit_add): Likewise.
615 (emit_sub): Likewise.
616 (emit_mov): Likewise.
617 (emit_movk): Likewise.
618 (emit_mov_addr): Likewise.
619 (emit_mrs): Likewise.
620 (emit_msr): Likewise.
621 (emit_sevl): Likewise.
622 (emit_wfe): Likewise.
623 (append_insns): Likewise.
624 (can_encode_int32_in): New helper function.
625 (aarch64_relocate_instruction): New function.
626 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
627 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
628 (struct linux_target_ops): Install aarch64_get_thread_area,
629 aarch64_install_fast_tracepoint_jump_pad and
630 aarch64_get_min_fast_tracepoint_insn_len.
632 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
634 * Makefile.in (aarch64-insn.o): New rule.
635 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
637 2015-09-21 Yao Qi <yao.qi@linaro.org>
639 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
641 2015-09-21 Yao Qi <yao.qi@linaro.org>
643 * tracepoint.c (max_jump_pad_size): Remove.
645 2015-09-18 Yao Qi <yao.qi@linaro.org>
647 * linux-aarch64-low.c: Don't include sys/uio.h.
648 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
650 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
652 * tracepoint.c (eval_result_type): Change prototype.
653 (condition_true_at_tracepoint): Fix argument to compiled_cond.
655 2015-09-15 Pedro Alves <palves@redhat.com>
657 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
658 Check whether to report exec events instead of checking whether
659 multiprocess is enabled.
661 2015-09-15 Pedro Alves <palves@redhat.com>
664 * remote-utils.c (prepare_resume_reply): Merge
665 TARGET_WAITKIND_VFORK_DONE switch case with the
666 TARGET_WAITKIND_FORKED case.
668 2015-09-15 Yao Qi <yao.qi@linaro.org>
670 * server.c (handle_query): Check string comparison using
671 "else if" instead of "if".
673 2015-09-15 Yao Qi <yao.qi@linaro.org>
675 * server.c (vCont_supported): New global variable.
676 (handle_query): Set vCont_supported to 1 if "vContSupported+"
677 matches. Append ";vContSupported+" to own_buf.
678 (handle_v_requests): Append ";s;S" to own_buf if target supports
679 hardware single step or vCont_supported is false.
680 (capture_main): Set vCont_supported to zero.
682 2015-09-15 Yao Qi <yao.qi@linaro.org>
684 * linux-low.c (linux_supports_conditional_breakpoints): Rename
686 (linux_supports_hardware_single_step): ... New function.
687 (linux_target_ops): Update.
688 * lynx-low.c (lynx_target_ops): Set field
689 supports_hardware_single_step to target_can_do_hardware_single_step.
690 * nto-low.c (nto_target_ops): Likewise.
691 * spu-low.c (spu_target_ops): Likewise.
692 * win32-low.c (win32_target_ops): Likewise.
693 * target.c (target_can_do_hardware_single_step): New function.
694 * target.h (struct target_ops) <supports_conditional_breakpoints>:
695 Remove. <supports_hardware_single_step>: New field.
696 (target_supports_conditional_breakpoints): Remove.
697 (target_supports_hardware_single_step): New macro.
698 (target_can_do_hardware_single_step): Declare.
699 * server.c (handle_query): Use target_supports_hardware_single_step
700 instead of target_supports_conditional_breakpoints.
702 2015-09-15 Yao Qi <yao.qi@linaro.org>
704 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
706 (struct linux_target_ops the_low_target): Install
707 aarch64_linux_siginfo_fixup.
709 2015-09-11 Don Breazeal <donb@codesourcery.com>
710 Luis Machado <lgustavo@codesourcery.com>
712 * linux-low.c (linux_mourn): Static declaration.
713 (linux_arch_setup): Move in front of
714 handle_extended_wait.
715 (linux_arch_setup_thread): New function.
716 (handle_extended_wait): Handle exec events. Call
717 linux_arch_setup_thread. Make event_lwp argument a
718 pointer-to-a-pointer.
719 (check_zombie_leaders): Do not check stopped threads.
720 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
721 (linux_low_filter_event): Add lwp and thread for exec'ing
722 non-leader thread if leader thread has been deleted.
723 Refactor code into linux_arch_setup_thread and call it.
724 Pass child lwp pointer by reference to handle_extended_wait.
725 (linux_wait_for_event_filtered): Update comment.
726 (linux_wait_1): Prevent clobbering exec event status.
727 (linux_supports_exec_events): New function.
728 (linux_target_ops) <supports_exec_events>: Initialize new member.
729 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
731 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
732 * server.c (report_exec_events): New global variable.
733 (handle_query): Handle qSupported query for exec-events feature.
734 (captured_main): Initialize report_exec_events.
735 * server.h (report_exec_events): Declare new global variable.
736 * target.h (struct target_ops) <supports_exec_events>: New
738 (target_supports_exec_events): New macro.
739 * win32-low.c (win32_target_ops) <supports_exec_events>:
740 Initialize new member.
742 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
744 * linux-low.c (linux_low_enable_btrace): Remove.
745 (linux_target_ops): Replace linux_low_enable_btrace with
748 2015-09-03 Yao Qi <yao.qi@linaro.org>
750 * linux-aarch64-low.c (aarch64_insert_point): Call
751 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
754 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
756 * linux-low.c (check_stopped_by_breakpoint): Use
757 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
759 2015-08-27 Pedro Alves <palves@redhat.com>
761 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
763 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
765 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
766 the XNEW-family equivalent.
767 (compile_bytecodes): Likewise.
768 * dll.c (loaded_dll): Likewise.
769 * event-loop.c (append_callback_event): Likewise.
770 (create_file_handler): Likewise.
771 (create_file_event): Likewise.
772 * hostio.c (handle_open): Likewise.
773 * inferiors.c (add_thread): Likewise.
774 (add_process): Likewise.
775 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
776 * linux-arm-low.c (arm_new_process): Likewise.
777 (arm_new_thread): Likewise.
778 * linux-low.c (add_to_pid_list): Likewise.
779 (linux_add_process): Likewise.
780 (handle_extended_wait): Likewise.
782 (enqueue_one_deferred_signal): Likewise.
783 (enqueue_pending_signal): Likewise.
784 (linux_resume_one_lwp_throw): Likewise.
785 (linux_resume_one_thread): Likewise.
786 (linux_read_memory): Likewise.
787 (linux_write_memory): Likewise.
788 * linux-mips-low.c (mips_linux_new_process): Likewise.
789 (mips_linux_new_thread): Likewise.
790 (mips_add_watchpoint): Likewise.
791 * linux-x86-low.c (initialize_low_arch): Likewise.
792 * lynx-low.c (lynx_add_process): Likewise.
793 * mem-break.c (set_raw_breakpoint_at): Likewise.
794 (set_breakpoint): Likewise.
795 (add_condition_to_breakpoint): Likewise.
796 (add_commands_to_breakpoint): Likewise.
797 (clone_agent_expr): Likewise.
798 (clone_one_breakpoint): Likewise.
799 * regcache.c (new_register_cache): Likewise.
800 * remote-utils.c (look_up_one_symbol): Likewise.
801 * server.c (queue_stop_reply): Likewise.
802 (start_inferior): Likewise.
803 (queue_stop_reply_callback): Likewise.
804 (handle_target_event): Likewise.
805 * spu-low.c (fetch_ppc_memory): Likewise.
806 (store_ppc_memory): Likewise.
807 * target.c (set_target_ops): Likewise.
808 * thread-db.c (thread_db_load_search): Likewise.
809 (try_thread_db_load_1): Likewise.
810 * tracepoint.c (add_tracepoint): Likewise.
811 (add_tracepoint_action): Likewise.
812 (create_trace_state_variable): Likewise.
813 (cmd_qtdpsrc): Likewise.
814 (cmd_qtro): Likewise.
815 (add_while_stepping_state): Likewise.
816 * win32-low.c (child_add_thread): Likewise.
817 (get_image_name): Likewise.
819 2015-08-25 Yao Qi <yao.qi@linaro.org>
821 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
823 2015-08-25 Yao Qi <yao.qi@linaro.org>
825 * Makefile.in (aarch64-linux.o): New rule.
826 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
828 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
829 (aarch64_init_debug_reg_state): Make it extern.
830 (aarch64_linux_prepare_to_resume): Remove.
832 2015-08-25 Yao Qi <yao.qi@linaro.org>
834 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
835 lwp_arch_private_info and ptid_of_lwp.
837 2015-08-25 Yao Qi <yao.qi@linaro.org>
839 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
840 Find proc_info by find_process_pid. All callers updated.
842 2015-08-25 Yao Qi <yao.qi@linaro.org>
844 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
846 (debug_reg_change_callback): Remove.
847 (aarch64_notify_debug_reg_change): Remove.
849 2015-08-25 Yao Qi <yao.qi@linaro.org>
851 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
852 Call current_lwp_ptid.
854 2015-08-25 Yao Qi <yao.qi@linaro.org>
856 * linux-aarch64-low.c (debug_reg_change_callback): Use
859 2015-08-25 Yao Qi <yao.qi@linaro.org>
861 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
863 2015-08-25 Yao Qi <yao.qi@linaro.org>
865 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
867 2015-08-25 Yao Qi <yao.qi@linaro.org>
869 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
872 2015-08-25 Yao Qi <yao.qi@linaro.org>
874 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
876 (debug_reg_change_callback): Remove argument entry and add argument
877 lwp. Remove local variable thread. Don't print thread id in the
878 debugging output. Don't check whether pid of thread equals to pid.
879 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
880 iterate_over_lwps instead find_inferior.
882 2015-08-24 Pedro Alves <palves@redhat.com>
884 * inferiors.c (get_first_process): New function.
885 * inferiors.h (get_first_process): New declaration.
886 * remote-utils.c (read_ptid): Default to the first process in the
887 list, instead of to the current thread's process.
889 2015-08-24 Pedro Alves <palves@redhat.com>
891 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
892 * event-loop.c: Likewise.
893 * remote-utils.c: Likewise.
894 * tracepoint.c: Likewise.
896 2015-08-24 Pedro Alves <palves@redhat.com>
898 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
901 2015-08-21 Pedro Alves <palves@redhat.com>
903 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
904 instead of literal 1.
906 2015-08-21 Pedro Alves <palves@redhat.com>
908 * tdesc.c (default_description): Explicitly zero-initialize.
910 2015-08-21 Pedro Alves <palves@redhat.com>
913 * inferiors.c (remove_thread): Discard any pending stop reply for
915 * server.c (remove_all_on_match_pid): Rename to ...
916 (remove_all_on_match_ptid): ... this. Work with a filter ptid
918 (discard_queued_stop_replies): Change parameter to a ptid. Now
920 (handle_v_kill, kill_inferior_callback, captured_main)
921 (process_serial_event): Adjust.
922 * server.h (discard_queued_stop_replies): Declare.
924 2015-08-21 Pedro Alves <palves@redhat.com>
926 * linux-low.c (wait_for_sigstop): Always switch to no thread
927 selected if the previously current thread dies.
928 * lynx-low.c (lynx_request_interrupt): Use the first thread's
929 process instead of the current thread's.
930 * remote-utils.c (input_interrupt): Don't check if there's no
932 * server.c (gdb_read_memory, gdb_write_memory): If setting the
933 current thread to the general thread fails, error out.
934 (handle_qxfer_auxv, handle_qxfer_libraries)
935 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
936 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
937 (handle_query): Check if there's a thread selected instead of
938 checking whether there's any thread in the thread list.
939 (handle_qxfer_threads, handle_qxfer_btrace)
940 (handle_qxfer_btrace_conf): Don't error out early if there's no
941 thread in the thread list.
942 (handle_v_cont, myresume): Don't set the current thread to the
944 (process_serial_event) <Hg handling>: Also set thread_id if the
945 previous general thread is still alive.
946 (process_serial_event) <g/G handling>: If setting the current
947 thread to the general thread fails, error out.
948 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
949 thread's lwp instead of the current thread's.
950 * target.c (set_desired_thread): If the desired thread was not
951 found, leave the current thread pointing to NULL. Return an int
952 (boolean) indicating success.
953 * target.h (set_desired_thread): Change return type to int.
955 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
957 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
958 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
960 (ps_get_thread_area): New function.
962 2015-08-19 Gary Benson <gbenson@redhat.com>
964 * hostio.c (handle_pread): Do not attempt to read more data
965 than hostio_reply_with_data can fit in a packet.
967 2015-08-18 Joel Brobecker <brobecker@adacore.com>
969 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
971 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
973 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
975 2015-08-06 Pedro Alves <palves@redhat.com>
977 * tracepoint.c (expr_eval_result): Now an int.
979 2015-08-06 Pedro Alves <palves@redhat.com>
981 * gdbthread.h (struct regcache): Forward declare.
982 (struct thread_info) <regcache_data>: Now a struct regcache
984 * inferiors.c (inferior_regcache_data)
985 (set_inferior_regcache_data): Now work with struct regcache
987 * inferiors.h (struct regcache): Forward declare.
988 (inferior_regcache_data, set_inferior_regcache_data): Now work
989 with struct regcache pointers.
990 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
991 (free_register_cache_thread): Remove struct regcache pointer
994 2015-08-06 Pedro Alves <palves@redhat.com>
996 * server.c (captured_main): On error, print the exception message
997 to stderr, and if run_once is set, throw a quit.
999 2015-08-06 Pedro Alves <palves@redhat.com>
1001 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1004 2015-08-06 Pedro Alves <palves@redhat.com>
1006 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1007 reading beyond the passed in buffer length.
1009 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1011 * tracepoint.c (symbol_list) <required>: Remove.
1013 2015-08-06 Pedro Alves <palves@redhat.com>
1015 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1016 count if stopping and suspending threads.
1017 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1018 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1019 (linux_detach): Complete an ongoing step-over.
1020 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1022 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1023 (linux_wait_1): If passing a signal to the inferior after
1024 finishing a step-over, unsuspend and re-resume all lwps. If we
1025 see a single-step event but the thread should be continuing, don't
1026 pass the trap to gdb.
1027 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1028 internal_error instead of gdb_assert.
1029 (enqueue_pending_signal): New function.
1030 (check_ptrace_stopped_lwp_gone): Add debug output.
1031 (start_step_over): Use internal_error instead of gdb_assert.
1032 (complete_ongoing_step_over): New function.
1033 (linux_resume_one_thread): Don't resume a suspended thread.
1034 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1037 2015-08-06 Pedro Alves <palves@redhat.com>
1039 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1040 (linux_thread_alive): Use lwp_is_marked_dead.
1041 (extended_event_reported): Delete.
1042 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1043 instead of extended_event_reported.
1044 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1046 (lwp_is_marked_dead): New function.
1047 (lwp_running): Use lwp_is_marked_dead.
1048 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1051 2015-08-06 Pedro Alves <palves@redhat.com>
1053 * linux-low.c (linux_wait_1): Move fork event output out of the
1054 !report_to_gdb check. Pass event_child->waitstatus to
1055 target_waitstatus_to_string instead of ourstatus.
1057 2015-08-04 Yao Qi <yao.qi@linaro.org>
1059 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1060 if current_thread is 32 bit.
1062 2015-08-04 Yao Qi <yao.qi@linaro.org>
1064 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1065 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1066 * server.c (extended_protocol): Remove "static".
1067 * server.h (extended_protocol): Declare it.
1069 2015-08-04 Yao Qi <yao.qi@linaro.org>
1071 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1072 both aarch64 and aarch32.
1073 (aarch64_set_pc): Likewise.
1075 2015-08-04 Yao Qi <yao.qi@linaro.org>
1077 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1078 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1079 arm-with-neon.xml to srv_xmlfiles.
1080 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1081 (is_64bit_tdesc): New function.
1082 (aarch64_linux_read_description): New function.
1083 (aarch64_arch_setup): Call aarch64_linux_read_description.
1084 (regs_info): Rename to regs_info_aarch64.
1085 (aarch64_regs_info): Return right regs_info.
1086 (initialize_low_arch): Call initialize_low_arch_aarch32.
1088 2015-08-04 Yao Qi <yao.qi@linaro.org>
1090 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1091 * linux-aarch32-low.c: New file.
1092 * linux-aarch32-low.h: New file.
1093 * linux-arm-low.c (arm_fill_gregset): Move it to
1094 linux-aarch32-low.c.
1095 (arm_store_gregset): Likewise.
1096 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1097 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1098 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1099 (regs_info): Rename to regs_info_arm.
1100 (arm_regs_info): Return regs_info_aarch32 if
1101 have_ptrace_getregset is 1 and target description is
1102 arm_with_neon or arm_with_vfpv3.
1103 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1104 Call initialize_low_arch_aarch32 instead.
1106 2015-08-04 Yao Qi <yao.qi@linaro.org>
1108 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1109 * linux-low.c: ... here.
1110 * linux-low.h (have_ptrace_getregset): Declare it.
1112 2015-08-04 Pedro Alves <palves@redhat.com>
1114 * thread-db.c (struct thread_db): Use new typedefs.
1115 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1117 (disable_thread_event_reporting): Cast result of dlsym to
1118 destination function pointer type.
1119 (thread_db_mourn): Use td_ta_delete_ftype.
1121 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1123 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1125 (CDX_BREAKPOINT): Define for R2.
1126 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1127 (the_low_target): Add comments.
1129 2015-07-30 Yao Qi <yao.qi@linaro.org>
1131 * linux-arm-low.c (arm_hwcap): Remove it.
1132 (arm_read_description): New local variable arm_hwcap. Don't
1133 set arm_hwcap to zero.
1135 2015-07-30 Yao Qi <yao.qi@linaro.org>
1137 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1138 Use regcache->tdesc instead.
1139 (arm_store_wmmxregset): Likewise.
1140 (arm_fill_vfpregset): Likewise.
1141 (arm_store_vfpregset): Likewise.
1143 2015-07-30 Yao Qi <yao.qi@linaro.org>
1145 * linux-arm-low.c: Include arch/arm.h.
1146 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1147 (arm_store_gregset): Likewise.
1149 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1151 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1152 ptrace's 4th parameter.
1154 2015-07-27 Yao Qi <yao.qi@linaro.org>
1156 * configure.srv (case aarch64*-*-linux*): Don't set
1159 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1161 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1163 * linux-arm-low.c: Likewise.
1164 * linux-cris-low.c: Likewise.
1165 * linux-crisv32-low.c: Likewise.
1166 * linux-low.c: Likewise.
1167 * linux-m68k-low.c: Likewise.
1168 * linux-mips-low.c: Likewise.
1169 * linux-nios2-low.c: Likewise.
1170 * linux-s390-low.c: Likewise.
1171 * linux-sparc-low.c: Likewise.
1172 * linux-tic6x-low.c: Likewise.
1173 * linux-tile-low.c: Likewise.
1174 * linux-x86-low.c: Likewise.
1176 2015-07-24 Pedro Alves <palves@redhat.com>
1178 * config.in: Regenerate.
1179 * configure: Regenerate.
1181 2015-07-24 Pedro Alves <palves@redhat.com>
1183 * acinclude.m4: Include ../ptrace.m4.
1184 * configure.ac: Call GDB_AC_PTRACE.
1185 * config.in, configure: Regenerate.
1187 2015-07-24 Yao Qi <yao.qi@linaro.org>
1189 * linux-low.c (linux_create_inferior): Remove setting to
1190 proc->priv->new_inferior.
1191 (linux_attach): Likewise.
1192 (linux_low_filter_event): Likewise.
1193 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1195 2015-07-24 Yao Qi <yao.qi@linaro.org>
1197 * linux-low.c (linux_arch_setup): New function.
1198 (linux_low_filter_event): If proc->tdesc is NULL and
1199 proc->attached is true, call the_low_target.arch_setup.
1200 Otherwise, keep status pending, and return.
1201 (linux_resume_one_lwp_throw): Don't call get_pc if
1202 thread->while_stepping isn't NULL. Don't call
1203 get_thread_regcache if proc->tdesc is NULL.
1204 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1205 (linux_target_ops): Install arch_setup.
1206 * server.c (start_inferior): Call the_target->arch_setup.
1207 * target.h (struct target_ops) <arch_setup>: New field.
1208 (target_arch_setup): New marco.
1209 * lynx-low.c (lynx_target_ops): Update.
1210 * nto-low.c (nto_target_ops): Update.
1211 * spu-low.c (spu_target_ops): Update.
1212 * win32-low.c (win32_target_ops): Update.
1214 2015-07-24 Yao Qi <yao.qi@linaro.org>
1216 * linux-low.c (linux_add_process): Don't set
1217 proc->priv->new_inferior.
1218 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1219 (linux_attach): Likewise.
1221 2015-07-24 Yao Qi <yao.qi@linaro.org>
1223 * server.c (start_inferior): Code refactor.
1225 2015-07-24 Yao Qi <yao.qi@linaro.org>
1227 * server.c (process_serial_event): Set general_thread.
1229 2015-07-21 Yao Qi <yao.qi@linaro.org>
1231 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1232 aarch64_linux_get_debug_reg_capacity.
1234 2015-07-17 Yao Qi <yao.qi@linaro.org>
1236 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1237 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1238 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1239 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1240 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1241 (AARCH64_HWP_ALIGNMENT): Likewise.
1242 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1243 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1244 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1245 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1246 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1247 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1248 (struct aarch64_debug_reg_state): Likewise.
1249 (struct arch_lwp_info): Likewise.
1250 (aarch64_align_watchpoint): Likewise.
1251 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1252 (aarch64_watchpoint_length): Likewise.
1253 (aarch64_point_encode_ctrl_reg): Likewise
1254 (aarch64_point_is_aligned): Likewise.
1255 (aarch64_align_watchpoint): Likewise.
1256 (aarch64_linux_set_debug_regs):
1257 (aarch64_dr_state_insert_one_point): Likewise.
1258 (aarch64_dr_state_remove_one_point): Likewise.
1259 (aarch64_handle_breakpoint): Likewise.
1260 (aarch64_handle_aligned_watchpoint): Likewise.
1261 (aarch64_handle_unaligned_watchpoint): Likewise.
1262 (aarch64_handle_watchpoint): Likewise.
1264 2015-07-17 Yao Qi <yao.qi@linaro.org>
1266 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1267 and don't aarch64_get_debug_reg_state. All callers update.
1268 (aarch64_handle_aligned_watchpoint): Likewise.
1269 (aarch64_handle_unaligned_watchpoint): Likewise.
1270 (aarch64_handle_watchpoint): Likewise.
1271 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1272 (aarch64_remove_point): Likewise.
1274 2015-07-17 Yao Qi <yao.qi@linaro.org>
1276 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1278 (aarch64_handle_unaligned_watchpoint): Likewise.
1280 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1282 Revert the previous 3 commits:
1283 Move gdb_regex* to common/
1284 Move linux_find_memory_regions_full & co.
1285 gdbserver build-id attribute generator
1287 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1288 Jan Kratochvil <jan.kratochvil@redhat.com>
1290 gdbserver build-id attribute generator.
1291 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1292 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1293 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1295 (get_dynamic): Use find_pdhr to traverse program headers.
1296 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1297 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1298 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1299 (get_hex_build_id): New.
1300 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1301 to reply XML document.
1303 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1304 Jan Kratochvil <jan.kratochvil@redhat.com>
1306 * target.c: Include target/target-utils.h and fcntl.h.
1307 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1308 (target_fileio_read_stralloc): New functions.
1310 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1312 * Makefile.in (OBS): Add gdb_regex.o.
1314 * config.in: Rebuilt.
1315 * configure: Rebuilt.
1317 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1318 Jan Kratochvil <jan.kratochvil@redhat.com>
1320 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1321 * Makefile.in (OBS): Add target-utils.o.
1322 (linux-maps.o, target-utils.o): New.
1323 * configure.srv (srv_linux_obj): Add linux-maps.o.
1325 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1327 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1329 (the_low_target): Install it.
1331 2015-07-14 Pedro Alves <palves@redhat.com>
1333 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1334 Instead, ignore ECHILD, and throw an error for other errnos.
1336 2015-07-10 Pedro Alves <palves@redhat.com>
1338 * event-loop.c (struct callback_event) <data>: Change type to
1339 gdb_client_data instance instead of gdb_client_data pointer.
1340 (append_callback_event): Adjust.
1342 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1344 * linux-aarch64-low.c: Add comments for each linux_target_ops
1345 method. Remove comments already covered in target_ops and
1346 linux_target_ops definitions.
1347 (the_low_target): Add comments for each unimplemented method.
1349 2015-07-09 Yao Qi <yao.qi@linaro.org>
1351 * linux-aarch64-low.c (aarch64_regmap): Remove.
1352 (aarch64_usrregs_info): Remove.
1353 (regs_info): Set field usrregs to NULL.
1355 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1357 * linux-low.c: Include "rsp-low.h"
1358 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1359 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1360 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1361 (handle_btrace_enable_pt): New.
1362 (handle_btrace_general_set): Support "pt".
1363 (handle_btrace_conf_general_set): Support "pt:size".
1365 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1367 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1370 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1372 * linux-aarch64-low.c: Remove comment about endianness.
1373 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1374 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1377 2015-06-24 Gary Benson <gbenson@redhat.com>
1379 * linux-i386-ipa.c (stdint.h): Do not include.
1380 * lynx-i386-low.c (stdint.h): Likewise.
1381 * lynx-ppc-low.c (stdint.h): Likewise.
1382 * mem-break.c (stdint.h): Likewise.
1383 * thread-db.c (stdint.h): Likewise.
1384 * tracepoint.c (stdint.h): Likewise.
1385 * win32-low.c (stdint.h): Likewise.
1387 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1389 * server.c (write_qxfer_response): Update call to
1390 remote_escape_output.
1392 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1393 Jan Kratochvil <jan.kratochvil@redhat.com>
1395 Merge multiple hex conversions.
1396 * gdbreplay.c (tohex): Rename to 'fromhex'.
1397 (logchar): Use fromhex.
1399 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1401 * server.c (handle_qxfer_libraries): Set `version' attribute for
1404 2015-06-10 Gary Benson <gbenson@redhat.com>
1406 * target.h (struct target_ops) <multifs_open>: New field.
1407 <multifs_unlink>: Likewise.
1408 <multifs_readlink>: Likewise.
1409 * linux-low.c (nat/linux-namespaces.h): New include.
1410 (linux_target_ops): Initialize the_target->multifs_open,
1411 the_target->multifs_unlink and the_target->multifs_readlink.
1412 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1413 * hostio.c (hostio_fs_pid): New static variable.
1414 (hostio_handle_new_gdb_connection): New function.
1415 (handle_setfs): Likewise.
1416 (handle_open): Use the_target->multifs_open as appropriate.
1417 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1418 (handle_readlink): Use the_target->multifs_readlink as
1420 (handle_vFile): Handle vFile:setfs packets.
1421 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1422 after target_handle_new_gdb_connection.
1424 2015-06-10 Gary Benson <gbenson@redhat.com>
1426 * configure.ac (AC_CHECK_FUNCS): Add setns.
1427 * config.in: Regenerate.
1428 * configure: Likewise.
1429 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1430 (linux-namespaces.o): New rule.
1431 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1433 2015-06-09 Gary Benson <gbenson@redhat.com>
1435 * hostio.c (handle_open): Process mode argument with
1436 fileio_to_host_mode.
1438 2015-06-01 Yao Qi <yao.qi@linaro.org>
1440 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1441 * linux-x86-low.c: Likewise.
1443 2015-05-28 Don Breazeal <donb@codesourcery.com>
1445 * linux-low.c (handle_extended_wait): Initialize
1446 thread_info.last_resume_kind for new fork children.
1448 2015-05-15 Pedro Alves <palves@redhat.com>
1450 * target.h (target_handle_new_gdb_connection): Rewrite using if
1451 wrapped in do/while.
1453 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1455 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1456 * configure, config.in: Regenerate.
1457 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1460 2015-05-12 Don Breazeal <donb@codesourcery.com>
1462 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1463 PTRACE_EVENT_VFORK_DONE.
1464 (linux_low_ptrace_options, extended_event_reported): Add vfork
1466 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1467 and "vforkdone" for RSP 'T' Stop Reply Packet.
1468 * server.h (report_vfork_events): Declare
1471 2015-05-12 Don Breazeal <donb@codesourcery.com>
1473 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1474 (the_low_target) <new_fork>: Initialize new member.
1475 * linux-arm-low.c (arm_new_fork): New function.
1476 (the_low_target) <new_fork>: Initialize new member.
1477 * linux-low.c (handle_extended_wait): Call new target function
1479 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1480 * linux-mips-low.c (mips_add_watchpoint): New function
1481 extracted from mips_insert_point.
1482 (the_low_target) <new_fork>: Initialize new member.
1483 (mips_linux_new_fork): New function.
1484 (mips_insert_point): Call mips_add_watchpoint.
1485 * linux-x86-low.c (x86_linux_new_fork): New function.
1486 (the_low_target) <new_fork>: Initialize new member.
1488 2015-05-12 Don Breazeal <donb@codesourcery.com>
1490 * linux-low.c (handle_extended_wait): Implement return value,
1491 rename argument 'event_child' to 'event_lwp', handle
1492 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1493 (linux_low_ptrace_options): New function.
1494 (linux_low_filter_event): Call linux_low_ptrace_options,
1495 use different argument fo linux_enable_event_reporting,
1496 use return value from handle_extended_wait.
1497 (extended_event_reported): New function.
1498 (linux_wait_1): Call extended_event_reported and set
1499 status to report fork events.
1500 (linux_write_memory): Add pid to debug message.
1501 (reset_lwp_ptrace_options_callback): New function.
1502 (linux_handle_new_gdb_connection): New function.
1503 (linux_target_ops): Initialize new structure member.
1504 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1505 * lynx-low.c: Initialize new structure member.
1506 * remote-utils.c (prepare_resume_reply): Implement stop reason
1507 "fork" for "T" stop message.
1508 * server.c (handle_query): Call handle_new_gdb_connection.
1509 * server.h (report_fork_events): Declare global flag.
1510 * target.h (struct target_ops) <handle_new_gdb_connection>:
1512 (target_handle_new_gdb_connection): New macro.
1513 * win32-low.c: Initialize new structure member.
1515 2015-05-12 Don Breazeal <donb@codesourcery.com>
1517 * mem-break.c (APPEND_TO_LIST): Define macro.
1518 (clone_agent_expr): New function.
1519 (clone_one_breakpoint): New function.
1520 (clone_all_breakpoints): New function.
1521 * mem-break.h: Declare new functions.
1523 2015-05-12 Don Breazeal <donb@codesourcery.com>
1525 * linux-low.c (linux_supports_fork_events): New function.
1526 (linux_supports_vfork_events): New function.
1527 (linux_target_ops): Initialize new structure members.
1528 (initialize_low): Call linux_check_ptrace_features.
1529 * lynx-low.c (lynx_target_ops): Initialize new structure
1531 * server.c (report_fork_events, report_vfork_events):
1533 (handle_query): Add new features to qSupported packet and
1535 (captured_main): Initialize new global variables.
1536 * target.h (struct target_ops) <supports_fork_events>:
1538 <supports_vfork_events>: New member.
1539 (target_supports_fork_events): New macro.
1540 (target_supports_vfork_events): New macro.
1541 * win32-low.c (win32_target_ops): Initialize new structure
1544 2015-05-12 Gary Benson <gbenson@redhat.com>
1546 * server.c (handle_qxfer_exec_file): Use current process
1549 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1551 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1552 Remove HAVE_PTRACE_GETREGS conditionals.
1553 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1554 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1556 2015-05-08 Yao Qi <yao.qi@linaro.org>
1558 * linux-low.c (linux_supports_conditional_breakpoints): New
1560 (linux_target_ops): Install new target method.
1561 * lynx-low.c (lynx_target_ops): Install NULL hook for
1562 supports_conditional_breakpoints.
1563 * nto-low.c (nto_target_ops): Likewise.
1564 * spu-low.c (spu_target_ops): Likewise.
1565 * win32-low.c (win32_target_ops): Likewise.
1566 * server.c (handle_query): Check
1567 target_supports_conditional_breakpoints.
1568 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1570 (target_supports_conditional_breakpoints): New macro.
1572 2015-05-06 Pedro Alves <palves@redhat.com>
1575 * server.c (start_inferior): If the process exits, mourn it.
1577 2015-04-21 Gary Benson <gbenson@redhat.com>
1579 * hostio.c (fileio_open_flags_to_host): Factored out to
1580 fileio_to_host_openflags in common/fileio.c. Single use
1583 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1585 * linux-xtensa-low.c (xtensa_fill_gregset)
1586 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1589 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1591 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1592 (regs_info): Replace usrregs pointer with NULL.
1594 2015-04-17 Gary Benson <gbenson@redhat.com>
1596 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1597 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1598 * server.c (handle_qxfer_exec_file): New function.
1599 (qxfer_packets): Add exec-file entry.
1600 (handle_query): Report qXfer:exec-file:read as supported packet.
1602 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1604 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1606 2015-04-09 Gary Benson <gbenson@redhat.com>
1608 * hostio-errno.c (errno_to_fileio_error): Remove function.
1609 Update caller to use remote_fileio_to_fio_error.
1611 2015-04-09 Yao Qi <yao.qi@linaro.org>
1613 * linux-low.c (linux_insert_point): Call
1614 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1615 (linux_remove_point): Call remove_memory_breakpoint if type is
1617 * linux-x86-low.c (x86_insert_point): Don't call
1618 insert_memory_breakpoint.
1619 (x86_remove_point): Don't call remove_memory_breakpoint.
1621 2015-04-01 Pedro Alves <palves@redhat.com>
1622 Cleber Rosa <crosa@redhat.com>
1624 * server.c (gdbserver_usage): Reorganize and extend the usage
1627 2015-03-24 Pedro Alves <palves@redhat.com>
1629 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1630 output. Also dump TRAP_TRACE.
1631 (linux_low_filter_event): In debug output, distinguish a
1632 resume_stop SIGSTOP from a delayed SIGSTOP.
1634 2015-03-24 Gary Benson <gbenson@redhat.com>
1636 * linux-x86-low.c (x86_linux_new_thread): Moved to
1638 (x86_linux_prepare_to_resume): Likewise.
1640 2015-03-24 Gary Benson <gbenson@redhat.com>
1642 * Makefile.in (x86-linux-dregs.o): New rule.
1643 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1644 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1645 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1646 (x86_linux_dr_get): Likewise.
1647 (x86_linux_dr_set): Likewise.
1648 (update_debug_registers_callback): Likewise.
1649 (x86_linux_dr_set_addr): Likewise.
1650 (x86_linux_dr_get_addr): Likewise.
1651 (x86_linux_dr_set_control): Likewise.
1652 (x86_linux_dr_get_control): Likewise.
1653 (x86_linux_dr_get_status): Likewise.
1654 (x86_linux_update_debug_registers): Likewise.
1656 2015-03-24 Gary Benson <gbenson@redhat.com>
1658 * linux-x86-low.c (x86_linux_update_debug_registers):
1659 New function, factored out from...
1660 (x86_linux_prepare_to_resume): ...this.
1662 2015-03-24 Gary Benson <gbenson@redhat.com>
1664 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1665 (x86_linux_dr_set): Likewise.
1666 (update_debug_registers_callback): Likewise.
1667 (x86_linux_dr_set_addr): Likewise.
1668 (x86_linux_dr_get_addr): Likewise.
1669 (x86_linux_dr_set_control): Likewise.
1670 (x86_linux_dr_get_control): Likewise.
1671 (x86_linux_dr_get_status): Likewise.
1672 (x86_linux_prepare_to_resume): Likewise.
1674 2015-03-24 Gary Benson <gbenson@redhat.com>
1676 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1677 Use perror_with_name. Pass string through gettext.
1678 (x86_linux_dr_set): Likewise.
1680 2015-03-24 Gary Benson <gbenson@redhat.com>
1682 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1683 (x86_linux_dr_set_addr): ...this.
1684 (x86_dr_low_get_addr): Rename to...
1685 (x86_linux_dr_get_addr): ...this.
1686 (x86_dr_low_set_control): Rename to...
1687 (x86_linux_dr_set_control): ...this.
1688 (x86_dr_low_get_control): Rename to...
1689 (x86_linux_dr_get_control): ...this.
1690 (x86_dr_low_get_status): Rename to...
1691 (x86_linux_dr_get_status): ...this.
1692 (x86_dr_low): Update with new function names.
1694 2015-03-24 Gary Benson <gbenson@redhat.com>
1696 * Makefile.in (x86-linux.o): New rule.
1697 * configure.srv: Add x86-linux.o to relevant targets.
1698 * linux-low.c (lwp_set_arch_private_info): New function.
1699 (lwp_arch_private_info): Likewise.
1700 * linux-x86-low.c: Include nat/x86-linux.h.
1701 (arch_lwp_info): Removed structure.
1702 (update_debug_registers_callback):
1703 Use lwp_set_debug_registers_changed.
1704 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1705 and lwp_set_debug_registers_changed.
1706 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1708 2015-03-24 Gary Benson <gbenson@redhat.com>
1710 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1711 * linux-arm-low.c (arm_new_thread): Likewise.
1712 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1713 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1714 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1715 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1717 2015-03-24 Gary Benson <gbenson@redhat.com>
1719 * linux-low.c (ptid_of_lwp): New function.
1720 (lwp_is_stopped): Likewise.
1721 (lwp_stop_reason): Likewise.
1722 * linux-x86-low.c (update_debug_registers_callback):
1724 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1727 2015-03-24 Gary Benson <gbenson@redhat.com>
1729 * linux-low.h (linux_stop_lwp): Remove declaration.
1731 2015-03-24 Gary Benson <gbenson@redhat.com>
1733 * linux-low.h: Include nat/linux-nat.h.
1734 * linux-low.c (iterate_over_lwps_args): New structure.
1735 (iterate_over_lwps_filter): New function.
1736 (iterate_over_lwps): Likewise.
1737 * linux-x86-low.c (update_debug_registers_callback):
1738 Update signature to what iterate_over_lwps expects.
1739 Remove PID check that iterate_over_lwps now performs.
1740 (x86_dr_low_set_addr): Use iterate_over_lwps.
1741 (x86_dr_low_set_control): Likewise.
1743 2015-03-24 Gary Benson <gbenson@redhat.com>
1745 * linux-x86-low.c (x86_debug_reg_state): New function.
1746 (x86_linux_prepare_to_resume): Use the above.
1748 2015-03-24 Gary Benson <gbenson@redhat.com>
1750 * linux-low.c (current_lwp_ptid): New function.
1751 * linux-x86-low.c: Include nat/linux-nat.h.
1752 (x86_dr_low_get_addr): Use current_lwp_ptid.
1753 (x86_dr_low_get_control): Likewise.
1754 (x86_dr_low_get_status): Likewise.
1756 2015-03-20 Pedro Alves <palves@redhat.com>
1758 * tracepoint.c (cmd_qtstatus): Make "str" const.
1760 2015-03-20 Pedro Alves <palves@redhat.com>
1762 * server.c (handle_general_set): Make "req_str" const.
1764 2015-03-19 Pedro Alves <palves@redhat.com>
1766 * linux-low.c (linux_resume_one_lwp): Rename to ...
1767 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1768 instead call perror_with_name.
1769 (check_ptrace_stopped_lwp_gone): New function.
1770 (linux_resume_one_lwp): Reimplement as wrapper around
1771 linux_resume_one_lwp_throw that swallows errors if the LWP is
1774 2015-03-19 Pedro Alves <palves@redhat.com>
1776 * linux-low.c (count_events_callback, select_event_lwp_callback):
1777 No longer check whether the thread has resume_stop as last resume
1780 2015-03-19 Pedro Alves <palves@redhat.com>
1782 * linux-low.c (count_events_callback, select_event_lwp_callback):
1783 Use the lwp's status_pending_p field, not the thread's.
1785 2015-03-19 Pedro Alves <palves@redhat.com>
1787 * linux-low.c (select_event_lwp_callback): Update comments to
1788 no longer mention SIGTRAP.
1790 2015-03-18 Gary Benson <gbenson@redhat.com>
1792 * server.c (handle_query): Do not report vFile:fstat as supported.
1794 2015-03-11 Gary Benson <gbenson@redhat.com>
1796 * hostio.c (sys/types.h): New include.
1797 (sys/stat.h): Likewise.
1798 (common-remote-fileio.h): Likewise.
1799 (handle_fstat): New function.
1800 (handle_vFile): Handle vFile:fstat packets.
1802 2015-03-11 Gary Benson <gbenson@redhat.com>
1804 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1805 struct stat.st_blocks and struct stat.st_blksize.
1806 * configure: Regenerate.
1807 * config.in: Likewise.
1808 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1809 (OBS): Add common-remote-fileio.o.
1810 (common-remote-fileio.o): New rule.
1812 2015-03-09 Pedro Alves <palves@redhat.com>
1814 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1815 'struct sockaddr' pointer in 'accept' call.
1817 2015-03-09 Pedro Alves <palves@redhat.com>
1820 2015-03-07 Pedro Alves <palves@redhat.com>
1821 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1822 or <winsock2.h> here. Instead include "gdb_socket.h".
1823 (remote_open): Use union gdb_sockaddr_u.
1824 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1825 or <winsock2.h> here. Instead include "gdb_socket.h".
1826 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1827 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1829 (init_named_socket, gdb_agent_helper_thread): Use union
1832 2015-03-07 Pedro Alves <palves@redhat.com>
1834 * configure.ac (build_warnings): Move
1835 -Wdeclaration-after-statement to the C-specific set.
1836 * configure: Regenerate.
1838 2015-03-07 Pedro Alves <palves@redhat.com>
1840 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1841 or <winsock2.h> here. Instead include "gdb_socket.h".
1842 (remote_open): Use union gdb_sockaddr_u.
1843 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1844 or <winsock2.h> here. Instead include "gdb_socket.h".
1845 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1846 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1848 (init_named_socket, gdb_agent_helper_thread): Use union
1851 2015-03-07 Pedro Alves <palves@redhat.com>
1853 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1856 2015-03-06 Yao Qi <yao.qi@linaro.org>
1858 * linux-aarch64-low.c (aarch64_insert_point): Use
1859 show_debug_regs as a boolean.
1860 (aarch64_remove_point): Likewise.
1862 2015-03-05 Pedro Alves <palves@redhat.com>
1864 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1865 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1866 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1867 * nto-low.c (nto_target_ops): Likewise.
1868 * spu-low.c (spu_target_ops): Likewise.
1869 * win32-low.c (win32_target_ops): Likewise.
1871 2015-03-04 Pedro Alves <palves@redhat.com>
1873 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1874 Decide whether a breakpoint triggered based on the SIGTRAP's
1876 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1877 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1878 (linux_low_filter_event): Check for breakpoints before checking
1880 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1882 (linux_stopped_by_sw_breakpoint)
1883 (linux_supports_stopped_by_sw_breakpoint)
1884 (linux_stopped_by_hw_breakpoint)
1885 (linux_supports_stopped_by_hw_breakpoint): New functions.
1886 (linux_target_ops): Install new target methods.
1888 2015-03-04 Pedro Alves <palves@redhat.com>
1890 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1891 * server.c (swbreak_feature, hwbreak_feature): New globals.
1892 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1893 (captured_main): Clear swbreak_feature and hwbreak_feature.
1894 * server.h (swbreak_feature, hwbreak_feature): Declare.
1895 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1896 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1897 supports_stopped_by_hw_breakpoint>: New fields.
1898 (target_supports_stopped_by_sw_breakpoint)
1899 (target_stopped_by_sw_breakpoint)
1900 (target_supports_stopped_by_hw_breakpoint)
1901 (target_stopped_by_hw_breakpoint): Declare.
1903 2015-03-04 Pedro Alves <palves@redhat.com>
1905 enum lwp_stop_reason -> enum target_stop_reason
1906 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1907 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1908 (linux_wait_1, stuck_in_jump_pad_callback)
1909 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1910 (linux_stopped_by_watchpoint):
1911 * linux-low.h (enum lwp_stop_reason): Delete.
1912 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1913 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1915 2015-03-04 Yao Qi <yao.qi@linaro.org>
1917 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1919 2015-03-03 Gary Benson <gbenson@redhat.com>
1921 * hostio.c (handle_vFile): Fix prefix lengths.
1923 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1925 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1928 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1930 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1931 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1932 (clean): Add "rm -f" for above C files.
1933 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1934 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1935 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1936 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1937 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1938 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1939 (init_registers_s390x_vx_linux64)
1940 (init_registers_s390x_tevx_linux64)
1941 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1942 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1944 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1945 (s390_store_vxrs_high): New functions.
1946 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1948 (s390_arch_setup): Add logic for selecting one of the new target
1949 descriptions. Activate the new vector regsets if applicable.
1950 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1951 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1952 and init_registers_s390x_tevx_linux64.
1954 2015-03-01 Pedro Alves <palves@redhat.com>
1956 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1959 2015-02-27 Pedro Alves <palves@redhat.com>
1961 * linux-x86-low.c (u_debugreg_offset): New function.
1962 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1964 2015-02-27 Pedro Alves <palves@redhat.com>
1966 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1967 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1968 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1969 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1970 (ps_lsetfpregs, ps_getpid)
1971 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1972 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1973 (ps_lsetxregs, ps_plog): Declare.
1975 2015-02-27 Pedro Alves <palves@redhat.com>
1977 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1978 IP_AGENT_EXPORT_FUNC.
1979 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1980 IP_AGENT_EXPORT_FUNC.
1981 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1982 (IP_AGENT_EXPORT): Delete.
1983 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1984 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1985 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1986 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1987 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1988 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1989 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1990 (traceframe_read_count, traceframe_write_count)
1991 (traceframes_created, trace_state_variables, get_raw_reg)
1992 (get_trace_state_variable_value, set_trace_state_variable_value)
1993 (ust_loaded, helper_thread_id, cmd_buf): Use
1994 IPA_SYM_EXPORTED_NAME.
1995 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1996 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1997 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1998 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1999 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2000 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2001 EXTERN_C_PUSH/EXTERN_C_POP.
2002 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2003 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2004 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2005 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2006 (traceframe_write_count, traceframe_read_count)
2007 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2008 (about_to_request_buffer_space, get_trace_state_variable_value)
2009 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2010 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2011 EXTERN_C_PUSH/EXTERN_C_POP.
2012 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2013 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2014 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2015 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2016 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2017 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2018 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2019 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2021 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2022 (IP_AGENT_EXPORT_VAR_DECL): Define.
2024 (gdb_agent_get_raw_reg): Declare.
2026 2015-02-27 Tom Tromey <tromey@redhat.com>
2027 Pedro Alves <palves@redhat.com>
2029 Rename symbols whose names are reserved C++ keywords throughout.
2031 2015-02-27 Pedro Alves <palves@redhat.com>
2033 * Makefile.in (COMPILER): New, get it from autoconf.
2034 (CXX): Get from autoconf instead.
2035 (COMPILE.pre): Use COMPILER.
2036 (CC-LD): Rename to ...
2037 (CC_LD): ... this. Use COMPILER.
2038 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2039 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2040 * acinclude.m4: Include build-with-cxx.m4.
2041 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2042 Disable -Werror by default if building in C++ mode.
2043 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2044 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2045 the C++ compiler. Save/restore CXXFLAGS too.
2046 * configure: Regenerate.
2048 2015-02-27 Pedro Alves <palves@redhat.com>
2050 * acinclude.m4: Include libiberty.m4.
2051 * configure.ac: Call libiberty_INIT.
2052 * config.in, configure: Regenerate.
2054 2015-02-26 Pedro Alves <palves@redhat.com>
2056 * linux-low.c (linux_wait_1): When incrementing the PC past a
2057 program breakpoint always use the_low_target.breakpoint_len as
2058 increment, rather than the maximum between that and
2059 the_low_target.decr_pc_after_break.
2061 2015-02-23 Pedro Alves <palves@redhat.com>
2063 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2064 thread was doing a step-over; always adjust the PC if
2065 we stepped over a permanent breakpoint.
2066 (linux_wait_1): If we stepped over breakpoint that was on top of a
2067 permanent breakpoint, manually advance the PC past it.
2069 2015-02-23 Pedro Alves <palves@redhat.com>
2071 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2073 (x86_fill_gregset, x86_store_gregset): Use it when handling
2076 2015-02-20 Pedro Alves <palves@redhat.com>
2078 * thread-db.c: Include "nat/linux-procfs.h".
2079 (thread_db_init): Skip listing new threads if the kernel supports
2080 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2082 2015-02-20 Pedro Alves <palves@redhat.com>
2084 * linux-low.c (status_pending_p_callback): Use ptid_match.
2086 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2088 PR breakpoints/16812
2089 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2090 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2091 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2093 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2095 PR breakpoints/15956
2096 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2098 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2100 * linux-low.c (linux_low_btrace_conf): Print size.
2101 * server.c (handle_btrace_conf_general_set): New.
2102 (hanle_general_set): Call handle_btrace_conf_general_set.
2103 (handle_query): Report Qbtrace-conf:bts:size as supported.
2105 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2107 * linux-low.c (linux_low_enable_btrace): Update parameters.
2108 (linux_low_btrace_conf): New.
2109 (linux_target_ops)<to_btrace_conf>: Initialize.
2110 * server.c (current_btrace_conf): New.
2111 (handle_btrace_enable): Rename to ...
2112 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2113 to target_enable_btrace. Update comment. Update users.
2114 (handle_qxfer_btrace_conf): New.
2115 (qxfer_packets): Add btrace-conf entry.
2116 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2117 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2118 (target_ops)<read_btrace_conf>: New.
2119 (target_enable_btrace): Update parameters.
2120 (target_read_btrace_conf): New.
2122 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2124 * server.c (handle_btrace_general_set): Remove call to
2125 target_supports_btrace.
2126 (supported_btrace_packets): New.
2127 (handle_query): Call supported_btrace_packets.
2128 * target.h: include btrace-common.h.
2129 (btrace_target_info): Removed.
2130 (supports_btrace, target_supports_btrace): Update parameters.
2132 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2134 * Makefile.in (SFILES): Add common/btrace-common.c.
2135 (OBS): Add common/btrace-common.o.
2136 (btrace-common.o): Add build rules.
2137 * linux-low: Include btrace-common.h.
2138 (linux_low_read_btrace): Use struct btrace_data. Call
2139 btrace_data_init and btrace_data_fini.
2141 2015-02-06 Pedro Alves <palves@redhat.com>
2143 * thread-db.c (find_new_threads_callback): Add debug output.
2145 2015-02-04 Pedro Alves <palves@redhat.com>
2147 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2148 (resume_stopped_resumed_lwps): New function.
2149 (linux_wait_for_event_filtered): Use it.
2151 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2153 * Makefile.in (SFILES): Add linux-personality.c.
2154 (linux-personality.o): New rule.
2155 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2156 list of objects to be built.
2157 * linux-low.c: Include nat/linux-personality.h.
2158 (linux_create_inferior): Remove code to disable address space
2159 randomization (moved to ../nat/linux-personality.c). Create
2160 cleanup to disable address space randomization.
2162 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2164 * Makefile.in (posix-strerror.o): New rule.
2165 (mingw-strerror.o): Likewise.
2166 * configure: Regenerated.
2167 * configure.ac: Source file ../common/common.host. Initialize new
2168 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2170 2015-01-14 Yao Qi <yao@codesourcery.com>
2172 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2173 (ppc-linux.o): New rule.
2174 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2175 * configure.ac: AC_CHECK_FUNCS(getauxval).
2176 * config.in: Re-generated.
2177 * configure: Re-generated.
2178 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2179 ppc64_64bit_inferior_p
2181 2015-01-14 Yao Qi <yao@codesourcery.com>
2183 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2184 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2185 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2186 (PT_ORIG_R3, PT_TRAP): Likewise.
2187 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2188 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2189 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2191 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2193 * i387-fp.c (i387_cache_to_xsave): In look over
2194 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2195 zmmh_low_space field by use of zmmh_high_space.
2197 2015-01-09 Pedro Alves <palves@redhat.com>
2199 * linux-low.c (step_over_bkpt): Move higher up in the file.
2200 (handle_extended_wait): Don't store the stop_pc here.
2201 (get_stop_pc): Adjust comments and rename to ...
2202 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2203 stopped for a software breakpoint or hardware breakpoint.
2204 (thread_still_has_status_pending_p): New function.
2205 (status_pending_p_callback): Use
2206 thread_still_has_status_pending_p. If the event is no longer
2207 interesting, resume the LWP.
2208 (handle_tracepoints): Add assert.
2209 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2210 (wstatus_maybe_breakpoint): New function.
2211 (cancel_breakpoint): Delete function.
2212 (check_stopped_by_watchpoint): New function, factored out from
2213 linux_low_filter_event.
2214 (lp_status_maybe_breakpoint): Delete function.
2215 (linux_low_filter_event): Remove filter_ptid argument.
2216 Leave thread group exits pending here. Store the LWP's stop PC.
2217 Always leave events pending.
2218 (linux_wait_for_event_filtered): Pull all events out of the
2219 kernel, and leave them all pending.
2220 (count_events_callback, select_event_lwp_callback): Consider all
2222 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2223 (select_event_lwp): Only give preference to the stepping LWP in
2224 all-stop mode. Adjust comments.
2225 (ignore_event): New function.
2226 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2227 references to cancel_breakpoints. Adjust to renames. Also give
2228 equal priority to all LWPs that have had events in non-stop mode.
2229 If reporting a software breakpoint event, unadjust the LWP's PC.
2230 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2231 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2233 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2234 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2235 (linux_stopped_by_watchpoint): Adjust.
2236 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2237 * linux-low.h (enum lwp_stop_reason): New.
2238 (struct lwp_info) <stop_pc>: Adjust comment.
2239 <stopped_by_watchpoint>: Delete field.
2240 <stop_reason>: New field.
2241 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2242 * mem-break.c (software_breakpoint_inserted_here)
2243 (hardware_breakpoint_inserted_here): New function.
2244 * mem-break.h (software_breakpoint_inserted_here)
2245 (hardware_breakpoint_inserted_here): Declare.
2246 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2247 (cancel_breakpoints): Delete.
2248 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2249 (upload_fast_traceframes): Remove references to
2252 2015-01-09 Pedro Alves <palves@redhat.com>
2254 * thread-db.c (find_new_threads_callback): Ignore thread if the
2255 kernel thread ID is -1.
2257 2015-01-09 Pedro Alves <palves@redhat.com>
2259 * linux-low.c (linux_attach_fail_reason_string): Move to
2260 nat/linux-ptrace.c, and rename.
2261 (linux_attach_lwp): Update comment.
2262 (attach_proc_task_lwp_callback): New function.
2263 (linux_attach): Adjust to rename and use
2264 linux_proc_attach_tgid_threads.
2265 (linux_attach_fail_reason_string): Delete declaration.
2267 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2269 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2270 * server.c (gdbserver_version): Likewise.
2272 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2274 * remote-utils.c: Include ctype.h.
2275 (input_interrupt): Explicitly handle the case when the char
2276 received is the NUL byte. Improve the printing of non-ASCII
2279 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2281 * linux-low.c (linux_low_filter_event): Update call to
2282 linux_enable_event_reporting following the addition of
2283 a new parameter to that function.
2285 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2288 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2289 (AARCH64_FPCR_REGNO): Likewise.
2290 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2291 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2292 (aarch64_store_fpregset): Likewise.
2294 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2296 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2297 Remove FIXME comment about assumption about N.
2299 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2301 * configure.ac: If large-file support is disabled in GDBserver,
2302 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2303 * configure: Regenerate.
2305 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2307 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2308 warning upon ENODATA from ptrace.
2309 * linux-s390-low.c (s390_store_tdb): New.
2310 (s390_regsets): Add regset for NT_S390_TDB.
2312 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2314 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2315 without a fill_function.
2316 * linux-s390-low.c (s390_fill_last_break): Remove.
2317 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2318 (s390_arch_setup): Use regset's size instead of fill_function for
2321 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2323 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2324 the regset's store function when ptrace returned an error.
2325 * regcache.c (get_thread_regcache): Invalidate register cache
2326 before fetching inferior's registers.
2328 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2330 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2331 while-loop as for-loop.
2332 (regsets_store_inferior_registers): Likewise.
2334 2014-11-28 Yao Qi <yao@codesourcery.com>
2336 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2337 * config.in, configure: Re-generate.
2338 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2341 2014-11-21 Yao Qi <yao@codesourcery.com>
2343 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2344 (AC_CHECK_HEADERS): Remove malloc.h.
2345 * configure: Re-generated.
2346 * config.in: Re-generated.
2347 * server.h: Don't include alloca.h and malloc.h.
2348 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2349 Don't include malloc.h.
2351 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2353 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2354 corresponding ERRNO check in same block.
2356 2014-11-12 Pedro Alves <palves@redhat.com>
2358 * server.c (cont_thread): Update comment.
2359 (start_inferior, attach_inferior): No longer clear cont_thread.
2360 (handle_v_cont): No longer set cont_thread.
2361 (captured_main): Clear cont_thread each time a GDB connects.
2363 2014-11-12 Pedro Alves <palves@redhat.com>
2365 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2366 thread, and don't resume all threads if the Hc thread has exited.
2368 2014-11-12 Pedro Alves <palves@redhat.com>
2370 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2371 the process group instead of to a specific LWP.
2373 2014-10-15 Pedro Alves <palves@redhat.com>
2376 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2378 (arm_set_thread_context): Delete.
2379 (the_low_target): Adjust.
2380 * win32-i386-low.c (debug_registers_changed)
2381 (debug_registers_used): Delete.
2382 (update_debug_registers_callback): New function.
2383 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2384 needing to update their debug registers.
2385 (win32_get_current_dr): New function.
2386 (x86_dr_low_get_addr, x86_dr_low_get_control)
2387 (x86_dr_low_get_status): Fetch the debug register from the thread
2389 (i386_initial_stuff): Adjust.
2390 (i386_get_thread_context): Remove current_event parameter. Don't
2391 clear debug_registers_changed nor copy DR values to
2393 (i386_set_thread_context): Delete.
2394 (i386_prepare_to_resume): New function.
2395 (i386_thread_added): Mark the thread as needing to update irs
2397 (the_low_target): Remove i386_set_thread_context and install
2398 i386_prepare_to_resume.
2399 * win32-low.c (win32_get_thread_context): Adjust.
2400 (win32_set_thread_context): Use SetThreadContext
2402 (win32_prepare_to_resume): New function.
2403 (win32_require_context): New function, factored out from ...
2404 (thread_rec): ... this.
2405 (continue_one_thread): Call win32_prepare_to_resume on each thread
2406 we're about to continue.
2407 (win32_resume): Call win32_prepare_to_resume on the event thread.
2408 * win32-low.h (struct win32_thread_info)
2409 <debug_registers_changed>: New field.
2410 (struct win32_target_ops): Change prototype of set_thread_context,
2411 delete set_thread_context and add prepare_to_resume.
2412 (win32_require_context): New declaration.
2414 2014-10-08 Gary Benson <gbenson@redhat.com>
2416 * server.h: Do not include common-exceptions.h.
2418 2014-10-08 Gary Benson <gbenson@redhat.com>
2420 * server.h: Do not include cleanups.h.
2422 2014-09-30 James Hogan <james.hogan@imgtec.com>
2424 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2427 2014-09-23 Yao Qi <yao@codesourcery.com>
2429 * linux-low.c (lp_status_maybe_breakpoint): New function.
2430 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2431 (count_events_callback): Likewise.
2432 (select_event_lwp_callback): Likewise.
2433 (cancel_breakpoints_callback): Likewise.
2435 2014-09-19 Don Breazeal <donb@codesourcery.com>
2437 * linux-low.c (handle_extended_wait): Call
2438 linux_ptrace_get_extended_event.
2439 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2440 linux_is_extended_waitstatus.
2442 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2444 * Makefile.in (CPPFLAGS): Define.
2445 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2446 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2448 2014-09-16 Gary Benson <gbenson@redhat.com>
2450 * inferiors.h (current_inferior): Renamed as...
2451 (current_thread): New variable. All uses updated.
2452 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2453 (maybe_move_out_of_jump_pad): Likewise.
2454 (cancel_breakpoint): Likewise.
2455 (linux_low_filter_event): Likewise.
2456 (wait_for_sigstop): Likewise.
2457 (linux_resume_one_lwp): Likewise.
2458 (need_step_over_p): Likewise.
2459 (start_step_over): Likewise.
2460 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2461 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2462 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2463 and save_inferior as saved_thread.
2464 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2466 (regcache_invalidate_thread): Likewise.
2467 * remote-utils.c (prepare_resume_reply): Likewise.
2468 * thread-db.c (thread_db_get_tls_address): Likewise.
2469 (disable_thread_event_reporting): Likewise.
2470 (remove_thread_event_breakpoints): Likewise.
2471 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2473 * target.h (set_desired_inferior): Renamed as...
2474 (set_desired_thread): New declaration. All uses updated.
2475 * server.c (myresume): Updated comment to reference thread instead
2477 (handle_serial_event): Likewise.
2478 (handle_target_event): Likewise.
2480 2014-09-12 Tom Tromey <tromey@redhat.com>
2481 Gary Benson <gbenson@redhat.com>
2483 * regcache.h: Include common-regcache.h.
2484 (regcache_read_pc): Don't declare.
2485 * regcache.c (get_thread_regcache_for_ptid): New function.
2487 2014-09-11 Tom Tromey <tromey@redhat.com>
2488 Gary Benson <gbenson@redhat.com>
2490 * symbol.c: New file.
2491 * Makefile.in (SFILES): Add symbol.c.
2492 (OBS): Add symbol.o.
2494 2014-09-11 Gary Benson <gbenson@redhat.com>
2496 * target.c (target_stop_ptid, target_continue_ptid): New
2499 2014-09-11 Tom Tromey <tromey@redhat.com>
2500 Gary Benson <gbenson@redhat.com>
2502 * target.h: Include target/target.h.
2503 * target.c (target_read_memory, target_read_uint32)
2504 (target_write_memory): New functions.
2506 2014-09-11 Gary Benson <gbenson@redhat.com>
2508 * server.h (debug_hw_points): Don't declare.
2509 * server.c (debug_hw_points): Don't define. Replace all uses
2510 with show_debug_regs.
2511 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2512 all uses with show_debug_regs.
2514 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2516 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2517 endianness into account.
2518 (ppc_supply_ptrace_register): Likewise.
2520 2014-09-03 James Hogan <james.hogan@imgtec.com>
2522 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2523 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2525 2014-09-03 Gary Benson <gbenson@redhat.com>
2527 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2528 ALL_DEBUG_ADDRESS_REGISTERS.
2530 2014-09-02 Gary Benson <gbenson@redhat.com>
2532 * i386-low.h: Renamed as...
2533 * x86-low.h: New file. All type, function and variable name
2534 prefixes changed from "i386_" to "x86_". All references updated.
2535 * i386-low.c: Renamed as...
2536 * x86-low.c: New file. All type, function and variable name
2537 prefixes changed from "i386_" to "x86_". All references updated.
2539 2014-09-02 Gary Benson <gbenson@redhat.com>
2541 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2542 (x86_linux_new_thread): Likewise.
2544 2014-08-29 Gary Benson <gbenson@redhat.com>
2546 * server.h (setjmp.h): Do not include.
2547 (toplevel): Do not declare.
2548 (common-exceptions.h): Include.
2549 (cleanups.h): Likewise.
2550 * server.c (toplevel): Do not define.
2551 (exit_code): New static global.
2552 (detach_or_kill_for_exit_cleanup): New function.
2553 (main): New function. Original main renamed to...
2554 (captured_main): New function.
2555 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2557 2014-08-29 Gary Benson <gbenson@redhat.com>
2559 * Makefile.in (SFILES): Add common/common-exceptions.c.
2560 (OBS): Add common-exceptions.o.
2561 (common-exceptions.o): New rule.
2562 * utils.c (prepare_to_throw_exception): New function.
2564 2014-08-29 Gary Benson <gbenson@redhat.com>
2566 * config.in: Regenerate.
2567 * configure: Likewise.
2569 2014-08-29 Gary Benson <gbenson@redhat.com>
2571 * Makefile.in (SFILES): Add common/cleanups.c.
2573 (cleanups.o): New rule.
2575 2014-08-29 Gary Benson <gbenson@redhat.com>
2577 * utils.c (internal_vwarning): New function.
2579 2014-08-28 Gary Benson <gbenson@redhat.com>
2581 * utils.h (fatal): Remove declaration.
2582 * utils.c (fatal): Remove function.
2584 2014-08-28 Gary Benson <gbenson@redhat.com>
2586 * tracepoint.c (gdb_agent_init): Replace fatal with
2588 (initialize_tracepoint): Likewise.
2590 2014-08-28 Gary Benson <gbenson@redhat.com>
2592 * remote-utils.c (remote_prepare): Replace fatal with error.
2594 2014-08-28 Gary Benson <gbenson@redhat.com>
2596 * linux-low.c (linux_async): Replace fatal with warning.
2598 (linux_start_non_stop): Return -1 if linux_async failed.
2600 2014-08-28 Gary Benson <gbenson@redhat.com>
2602 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2604 (i386_dr_low_get_addr): Remove vague comment.
2605 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2608 2014-08-28 Gary Benson <gbenson@redhat.com>
2610 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2611 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2613 (linux_resume_one_lwp): Likewise.
2614 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2616 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2617 with internal_error.
2618 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2619 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2620 (find_register_by_name): Replace fatal with internal_error.
2621 (find_regno): Likewise.
2622 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2623 * thread-db.c (thread_db_create_event): Likewise.
2624 (thread_db_load_search): Likewise.
2625 (try_thread_db_load_1): Likewise.
2626 * tracepoint.c (get_jump_space_head): Replace fatal with
2628 (claim_trampoline_space): Likewise.
2629 (have_fast_tracepoint_trampoline_buffer): Likewise.
2630 (cmd_qtstart): Likewise.
2631 (stop_tracing): Likewise.
2632 (fast_tracepoint_collecting): Likewise.
2633 (target_malloc): Likewise.
2634 (download_tracepoint): Likewise.
2635 (download_trace_state_variables): Replace check with gdb_assert.
2636 (upload_fast_traceframes): Replace fatal with internal_error.
2638 2014-08-19 Tom Tromey <tromey@redhat.com>
2639 Gary Benson <gbenson@redhat.com>
2641 * Makefile.in (SFILES): Add common/common-debug.c.
2642 (OBS): Add common-debug.o.
2643 (common-debug.o): New rule.
2644 * debug.h (debug_printf): Don't declare.
2645 * debug.c (debug_printf): Renamed and rewritten as...
2646 (debug_vprintf): New function.
2648 2014-08-19 Gary Benson <gbenson@redhat.com>
2650 * utils.h: Do not include print-utils.h.
2652 2014-08-19 Tom Tromey <tromey@redhat.com>
2653 Gary Benson <gbenson@redhat.com>
2655 * server.h: Add static assertion.
2656 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2658 2014-08-19 Tom Tromey <tromey@redhat.com>
2659 Gary Benson <gbenson@redhat.com>
2661 * Makefile.in (SFILES): Add common/errors.c.
2662 (OBS): Add errors.o.
2663 (IPA_OBS): Add errors-ipa.o.
2664 (errors.o): New rule.
2665 (errors-ipa.o): Likewise.
2666 * utils.h (perror_with_name, error, warning): Don't declare.
2667 * utils.c (warning): Renamed and rewritten as...
2668 (vwarning): New function.
2669 (error): Renamed and rewritten as...
2670 (verror): New function.
2671 (internal_error): Renamed and rewritten as...
2672 (internal_verror): New function.
2674 2014-08-07 Gary Benson <gbenson@redhat.com>
2676 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2677 * configure: Regenerate.
2678 * config.in: Likewise.
2679 * server.h: Do not include errno.h.
2680 * event-loop.c: Likewise.
2681 * hostio-errno.c: Likewise.
2682 * linux-low.c: Likewise.
2683 * remote-utils.c: Likewise.
2684 * spu-low.c: Likewise.
2685 * utils.c: Likewise.
2686 * gdbreplay.c: Unconditionally include errno.h.
2688 2014-08-07 Gary Benson <gbenson@redhat.com>
2690 * server.h: Do not include string.h.
2691 * event-loop.c: Likewise.
2692 * linux-low.c: Likewise.
2693 * regcache.c: Likewise.
2694 * remote-utils.c: Likewise.
2695 * spu-low.c: Likewise.
2696 * utils.c: Likewise.
2698 2014-08-07 Gary Benson <gbenson@redhat.com>
2700 * server.h: Do not include gdb_assert.h.
2702 2014-08-07 Gary Benson <gbenson@redhat.com>
2704 * server.h: Do not include common-utils.h.
2706 2014-08-07 Gary Benson <gbenson@redhat.com>
2708 * server.h: Do not include ptid.h.
2709 * notif.h: Likewise.
2711 2014-08-07 Gary Benson <gbenson@redhat.com>
2713 * server.h: Do not include gdb_locale.h.
2715 2014-08-07 Gary Benson <gbenson@redhat.com>
2717 * server.h: Do not include gdb/signals.h.
2718 * win32-low.c: Likewise.
2720 2014-08-07 Gary Benson <gbenson@redhat.com>
2722 * server.h: Do not include pathmax.h.
2724 2014-08-07 Gary Benson <gbenson@redhat.com>
2726 * server.h: Do not include libiberty.h.
2727 * linux-bfin-low.c: Likewise.
2729 2014-08-07 Gary Benson <gbenson@redhat.com>
2731 * server.h: Do not include ansidecl.h.
2733 2014-08-07 Gary Benson <gbenson@redhat.com>
2735 * linux-x86-low.c: Do not include stddef.h.
2736 * lynx-ppc-low.c: Likewise.
2737 * tracepoint.c: Likewise.
2739 2014-08-07 Gary Benson <gbenson@redhat.com>
2741 * server.h: Do not include stdarg.h.
2742 * nto-low.c: Likewise.
2744 2014-08-07 Gary Benson <gbenson@redhat.com>
2746 * server.h: Do not include stdlib.h.
2747 * inferiors.c: Likewise.
2748 * linux-low.c: Likewise.
2749 * regcache.c: Likewise.
2750 * spu-low.c: Likewise.
2751 * tracepoint.c: Likewise.
2752 * utils.c: Likewise.
2754 2014-08-07 Gary Benson <gbenson@redhat.com>
2756 * server.h: Do not include stdio.h.
2757 * linux-low.c: Likewise.
2758 * remote-utils.c: Likewise.
2759 * spu-low.c: Likewise.
2760 * utils.c: Likewise.
2761 * wincecompat.c: Likewise.
2763 2014-08-06 Gary Benson <gbenson@redhat.com>
2765 * regcache.c (init_register_cache): Move conditionals inside if.
2767 2014-08-06 Gary Benson <gbenson@redhat.com>
2769 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2771 2014-07-31 Gary Benson <gbenson@redhat.com>
2773 * ax.h: Do not include server.h.
2774 * gdbthread.h: Likewise.
2775 * lynx-low.h: Likewise.
2776 * notif.h: Likewise.
2778 2014-07-30 Gary Benson <gbenson@redhat.com>
2780 * server.h: Include common-defs.h.
2781 Do not include config.h or build-gnulib-gdbserver/config.h.
2783 2014-07-30 Gary Benson <gbenson@redhat.com>
2785 * hostio-errno.c: Move server.h to top of includes list.
2786 * inferiors.c: Likewise.
2787 * linux-x86-low.c: Likewise.
2788 * notif.c: Include server.h.
2790 2014-07-24 Tom Tromey <tromey@redhat.com>
2791 Gary Benson <gbenson@redhat.com>
2793 * server.h (CORE_ADDR): Now unsigned.
2795 2014-07-16 Pedro Alves <palves@redhat.com>
2797 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2799 2014-07-15 Pedro Alves <palves@redhat.com>
2801 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2804 2014-07-11 Pedro Alves <palves@redhat.com>
2806 * linux-low.c (kill_wait_lwp): New function, based on
2807 kill_one_lwp_callback, but use my_waitpid directly.
2808 (kill_one_lwp_callback, linux_kill): Use it.
2810 2014-06-23 Pedro Alves <palves@redhat.com>
2812 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2813 before setting DR0..DR3.
2815 2014-06-20 Gary Benson <gbenson@redhat.com>
2817 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2818 * configure: Regenerated.
2819 * config.in: Likewise.
2821 2014-06-20 Gary Benson <gbenson@redhat.com>
2823 * Makefile.in (SFILES): Update locations for files moved
2825 (object file files): Reordered.
2827 2014-06-20 Gary Benson <gbenson@redhat.com>
2829 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2830 (i386_dr_low_set_addr): Likewise.
2831 (i386_dr_low_get_addr): Likewise.
2832 (i386_dr_low_can_set_control): Likewise.
2833 (i386_dr_low_set_control): Likewise.
2834 (i386_dr_low_get_control): Likewise.
2835 (i386_dr_low_get_status): Likewise.
2836 (i386_get_debug_register_length): Likewise.
2837 * linux-x86-low.c (i386_dr_low_set_addr):
2838 Changed signature. Made static.
2839 (i386_dr_low_get_addr): Likewise.
2840 (i386_dr_low_set_control): Likewise.
2841 (i386_dr_low_get_control): Likewise.
2842 (i386_dr_low_get_status): Likewise.
2843 (i386_dr_low): New global variable.
2844 * win32-i386-low.c (i386_dr_low_set_addr):
2845 Changed signature. Made static.
2846 (i386_dr_low_get_addr): Likewise.
2847 (i386_dr_low_set_control): Likewise.
2848 (i386_dr_low_get_control): Likewise.
2849 (i386_dr_low_get_status): Likewise.
2850 (i386_dr_low): New global variable.
2852 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2854 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2855 * Makefile.in (AR, AR_FLAGS): Define.
2856 * configure: Regenerate.
2858 2014-06-19 Gary Benson <gbenson@redhat.com>
2860 * Makefile.in (i386-dregs.o): New rule.
2861 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2862 * i386-low.c (target.h): Remove include.
2863 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2864 (DR_CONTROL_SHIFT): Likewise.
2865 (DR_CONTROL_SIZE): Likewise.
2866 (DR_RW_EXECUTE): Likewise.
2867 (DR_RW_WRITE): Likewise.
2868 (DR_RW_READ): Likewise.
2869 (DR_RW_IORW): Likewise.
2870 (DR_LEN_1): Likewise.
2871 (DR_LEN_2): Likewise.
2872 (DR_LEN_4): Likewise.
2873 (DR_LEN_8): Likewise.
2874 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2875 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2876 (DR_ENABLE_SIZE): Likewise.
2877 (DR_LOCAL_SLOWDOWN): Likewise.
2878 (DR_GLOBAL_SLOWDOWN): Likewise.
2879 (DR_CONTROL_RESERVED): Likewise.
2880 (I386_DR_CONTROL_MASK): Likewise.
2881 (I386_DR_VACANT): Likewise.
2882 (I386_DR_LOCAL_ENABLE): Likewise.
2883 (I386_DR_GLOBAL_ENABLE): Likewise.
2884 (I386_DR_DISABLE): Likewise.
2885 (I386_DR_SET_RW_LEN): Likewise.
2886 (I386_DR_GET_RW_LEN): Likewise.
2887 (I386_DR_WATCH_HIT): Likewise.
2888 (i386_wp_op_t): Likewise.
2889 (i386_show_dr): Likewise.
2890 (i386_length_and_rw_bits): Likewise.
2891 (i386_insert_aligned_watchpoint): Likewise.
2892 (i386_remove_aligned_watchpoint): Likewise.
2893 (i386_handle_nonaligned_watchpoint): Likewise.
2894 i386_update_inferior_debug_regs(): Likewise.
2895 (i386_dr_insert_watchpoint): Likewise.
2896 (i386_dr_remove_watchpoint): Likewise.
2897 (i386_dr_region_ok_for_watchpoint): Likewise.
2898 (i386_dr_stopped_data_address): Likewise.
2899 (i386_dr_stopped_by_watchpoint): Likewise.
2901 2014-06-19 Gary Benson <gbenson@redhat.com>
2903 * i386-low.c (i386_dr_show): Renamed to
2904 i386_show_dr and made static. All uses updated.
2905 (i386_dr_length_and_rw_bits): Renamed to
2906 i386_length_and_rw_bits and made static.
2908 (i386_dr_insert_aligned_watchpoint): Renamed to
2909 i386_insert_aligned_watchpoint and made static.
2911 (i386_dr_remove_aligned_watchpoint): Renamed to
2912 i386_remove_aligned_watchpoint and made static.
2914 (i386_dr_update_inferior_debug_regs): Renamed to
2915 i386_update_inferior_debug_regs and made static.
2918 2014-06-18 Gary Benson <gbenson@redhat.com>
2920 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2921 (i386_dr_low_can_set_control): Likewise.
2922 (i386_get_debug_register_length): Likewise.
2923 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2924 (i386_dr_low_can_set_control): Likewise.
2925 (i386_get_debug_register_length): Likewise.
2927 2014-06-17 Gary Benson <gbenson@redhat.com>
2929 * i386-low.h (i386-dregs.h): New include.
2930 (DR_FIRSTADDR): Now in i386-dregs.h.
2931 (DR_LASTADDR): Likewise.
2932 (DR_NADDR): Likewise.
2933 (DR_STATUS): Likewise.
2934 (DR_CONTROL): Likewise.
2935 (i386_debug_reg_state): Likewise.
2936 (i386_dr_insert_watchpoint): Likewise.
2937 (i386_dr_remove_watchpoint): Likewise.
2938 (i386_dr_region_ok_for_watchpoint): Likewise.
2939 (i386_dr_stopped_data_address): Likewise.
2940 (i386_dr_stopped_by_watchpoint): Likewise.
2941 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2943 2014-06-18 Gary Benson <gbenson@redhat.com>
2945 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2946 i386_dr_insert_watchpoint.
2947 (i386_low_remove_watchpoint): Renamed to
2948 i386_dr_remove_watchpoint.
2949 (i386_low_region_ok_for_watchpoint): Renamed to
2950 i386_dr_region_ok_for_watchpoint.
2951 (i386_low_stopped_data_address): Renamed to
2952 i386_dr_stopped_data_address.
2953 (i386_low_stopped_by_watchpoint): Renamed to
2954 i386_dr_stopped_by_watchpoint.
2955 * i386-low.c (i386_show_dr): Renamed to
2956 i386_dr_show and made nonstatic. All uses updated.
2957 (i386_length_and_rw_bits): Renamed to
2958 i386_dr_length_and_rw_bits and made nonstatic.
2960 (i386_insert_aligned_watchpoint): Renamed to
2961 i386_dr_insert_aligned_watchpoint and made nonstatic.
2963 (i386_remove_aligned_watchpoint): Renamed to
2964 i386_dr_remove_aligned_watchpoint and made nonstatic.
2966 (i386_update_inferior_debug_regs): Renamed to
2967 i386_dr_update_inferior_debug_regs and made nonstatic.
2969 (i386_low_insert_watchpoint): Renamed to
2970 i386_dr_insert_watchpoint. All uses updated.
2971 (i386_low_remove_watchpoint): Renamed to
2972 i386_dr_remove_watchpoint. All uses updated.
2973 (i386_low_region_ok_for_watchpoint): Renamed to
2974 i386_dr_region_ok_for_watchpoint. All uses updated.
2975 (i386_low_stopped_data_address): Renamed to
2976 i386_dr_stopped_data_address. All uses updated.
2977 (i386_low_stopped_by_watchpoint): Renamed to
2978 i386_dr_stopped_by_watchpoint. All uses updated.
2980 2014-06-18 Gary Benson <gbenson@redhat.com>
2982 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2983 (i386_dr_low_can_set_control): Likewise.
2984 (i386_insert_aligned_watchpoint): New check.
2986 2014-06-18 Gary Benson <gbenson@redhat.com>
2988 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2991 2014-06-18 Gary Benson <gbenson@redhat.com>
2993 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2994 instead of fatal and error.
2995 (i386_handle_nonaligned_watchpoint): Likewise.
2997 2014-06-18 Gary Benson <gbenson@redhat.com>
2999 * i386-low.c (i386_get_debug_register_length): New macro.
3000 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3001 (i386_show_dr): Use debug_printf instead of fprintf. Use
3002 phex to format values.
3004 2014-06-18 Gary Benson <gbenson@redhat.com>
3006 * i386-low.h: Comment changes.
3007 * i386-low.c: Likewise.
3009 2014-06-18 Gary Benson <gbenson@redhat.com>
3011 * i386-low.c: Whitespace changes.
3013 2014-06-12 Tom Tromey <tromey@redhat.com>
3015 * utils.c (freeargv): Remove.
3017 2014-06-12 Tom Tromey <tromey@redhat.com>
3019 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3020 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3021 (parse_debug_format_options): Likewise.
3022 (gdbserver_usage): Likewise.
3023 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3024 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3025 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3027 ($(LIBGNU)): Depend on libiberty.
3028 (all-lib): Recurse into all subdirs.
3029 (install-only): Invoke "install" target in subdirs.
3030 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3032 * configure: Rebuild.
3033 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3034 for vasprintf, vsnprintf, or gettimeofday.
3035 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3038 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3040 * development.sh: Delete.
3041 * Makefile.in (config.status): Adjust dependency on development.sh.
3042 * configure.ac: Adjust development.sh source call.
3043 * configure: Regenerate.
3045 2014-06-02 Pedro Alves <palves@redhat.com>
3047 * ax.c (gdb_free_agent_expr): New function.
3048 * ax.h (gdb_free_agent_expr): New declaration.
3049 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3051 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3053 (clear_breakpoint_conditions_and_commands): New function.
3054 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3055 (clear_breakpoint_conditions_and_commands): New declaration.
3057 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3059 * linux-aarch64-low.c (asm/ptrace.h): Include.
3061 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3063 Fix TLS access for -static -pthread.
3064 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3065 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3066 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3068 2014-05-20 Pedro Alves <palves@redhat.com>
3070 * linux-aarch64-low.c (aarch64_insert_point)
3071 (aarch64_remove_point): No longer check whether the type is
3072 supported here. Adjust to new interface.
3073 (the_low_target): Install aarch64_supports_z_point_type as
3074 supports_z_point_type method.
3075 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3076 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3077 instead of a Z packet char. Adjust.
3078 (arm_supports_z_point_type): New function.
3079 (arm_insert_point, arm_remove_point): Adjust to new interface.
3080 (the_low_target): Install arm_supports_z_point_type.
3081 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3082 (cris_insert_point, cris_remove_point): Adjust to new interface.
3083 Don't check whether the type is supported here.
3084 (the_low_target): Install cris_supports_z_point_type.
3085 * linux-low.c (linux_supports_z_point_type): New function.
3086 (linux_insert_point, linux_remove_point): Adjust to new interface.
3087 * linux-low.h (struct linux_target_ops) <insert_point,
3088 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3089 raw_breakpoint pointer parameter.
3090 <supports_z_point_type>: New method.
3091 * linux-mips-low.c (mips_supports_z_point_type): New function.
3092 (mips_insert_point, mips_remove_point): Adjust to new interface.
3093 Use mips_supports_z_point_type.
3094 (the_low_target): Install mips_supports_z_point_type.
3095 * linux-ppc-low.c (the_low_target): Install NULL as
3096 supports_z_point_type method.
3097 * linux-s390-low.c (the_low_target): Install NULL as
3098 supports_z_point_type method.
3099 * linux-sparc-low.c (the_low_target): Install NULL as
3100 supports_z_point_type method.
3101 * linux-x86-low.c (x86_supports_z_point_type): New function.
3102 (x86_insert_point): Adjust to new insert_point interface. Use
3103 insert_memory_breakpoint. Adjust to new
3104 i386_low_insert_watchpoint interface.
3105 (x86_remove_point): Adjust to remove_point interface. Use
3106 remove_memory_breakpoint. Adjust to new
3107 i386_low_remove_watchpoint interface.
3108 (the_low_target): Install x86_supports_z_point_type.
3109 * lynx-low.c (lynx_target_ops): Install NULL as
3110 supports_z_point_type callback.
3111 * nto-low.c (nto_supports_z_point_type): New.
3112 (nto_insert_point, nto_remove_point): Adjust to new interface.
3113 (nto_target_ops): Install nto_supports_z_point_type.
3114 * mem-break.c: Adjust intro comment.
3115 (struct raw_breakpoint) <raw_type, size>: New fields.
3116 <inserted>: Update comment.
3117 <shlib_disabled>: Delete field.
3118 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3119 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3120 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3121 (raw_bkpt_type_to_target_hw_bp_type): New function.
3122 (find_enabled_raw_code_breakpoint_at): New function.
3123 (find_raw_breakpoint_at): New type and size parameters. Use them.
3124 (insert_memory_breakpoint): New function, based off
3125 set_raw_breakpoint_at.
3126 (remove_memory_breakpoint): New function.
3127 (set_raw_breakpoint_at): Reimplement.
3128 (set_breakpoint): New, based on set_breakpoint_at.
3129 (set_breakpoint_at): Reimplement.
3130 (delete_raw_breakpoint): Go through the_target->remove_point
3131 instead of assuming memory breakpoints.
3132 (find_gdb_breakpoint_at): Delete.
3133 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3134 (find_gdb_breakpoint): New function.
3135 (set_gdb_breakpoint_at): Delete.
3136 (z_type_supported): New function.
3137 (set_gdb_breakpoint_1): New function, loosely based off
3138 set_gdb_breakpoint_at.
3139 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3140 (delete_gdb_breakpoint_at): Delete.
3141 (delete_gdb_breakpoint_1): New function, loosely based off
3142 delete_gdb_breakpoint_at.
3143 (delete_gdb_breakpoint): New function.
3144 (clear_gdb_breakpoint_conditions): Rename to ...
3145 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3147 (add_condition_to_breakpoint): Make static.
3148 (add_breakpoint_condition): Take a struct breakpoint pointer
3149 instead of an address. Adjust.
3150 (gdb_condition_true_at_breakpoint): Rename to ...
3151 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3153 (gdb_condition_true_at_breakpoint): Reimplement.
3154 (add_breakpoint_commands): Take a struct breakpoint pointer
3155 instead of an address. Adjust.
3156 (gdb_no_commands_at_breakpoint): Rename to ...
3157 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3158 parameter. Return true if no breakpoint was found. Change debug
3160 (gdb_no_commands_at_breakpoint): Reimplement.
3161 (run_breakpoint_commands): Rename to ...
3162 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3163 and change return type to boolean.
3164 (run_breakpoint_commands): New function.
3165 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3166 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3167 breakpoint. Go through the_target->remove_point instead of
3168 assuming memory breakpoint.
3169 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3170 software and hardware breakpoints.
3171 (reinsert_raw_breakpoint): Go through the_target->insert_point
3172 instead of assuming memory breakpoint.
3173 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3174 software and hardware breakpoints.
3175 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3176 Check both software and hardware breakpoints.
3177 (validate_inserted_breakpoint): Assert the breakpoint is a
3178 software breakpoint. Set the inserted flag to -1 instead of
3179 setting shlib_disabled.
3180 (delete_disabled_breakpoints): Adjust.
3181 (validate_breakpoints): Only validate software breakpoints.
3182 Adjust to inserted flag change.
3183 (check_mem_read, check_mem_write): Skip breakpoint types other
3184 than software breakpoints. Adjust to inserted flag change.
3185 * mem-break.h (enum raw_bkpt_type): New enum.
3186 (raw_breakpoint, struct process_info): Forward declare.
3187 (Z_packet_to_target_hw_bp_type): Delete declaration.
3188 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3189 (set_gdb_breakpoint, delete_gdb_breakpoint)
3190 (clear_breakpoint_conditions): New declarations.
3191 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3192 (breakpoint_inserted_here): Update comment.
3193 (add_breakpoint_condition, add_breakpoint_commands): Replace
3194 address parameter with a breakpoint pointer parameter.
3195 (gdb_breakpoint_here): Update comment.
3196 (delete_gdb_breakpoint_at): Delete.
3197 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3198 * server.c (process_point_options): Take a struct breakpoint
3199 pointer instead of an address. Adjust.
3200 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3201 delete_gdb_breakpoint.
3202 * spu-low.c (spu_target_ops): Install NULL as
3203 supports_z_point_type method.
3204 * target.h: Include mem-break.h.
3205 (struct target_ops) <prepare_to_access_memory>: Update comment.
3206 <supports_z_point_type>: New field.
3207 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3208 instead of a char. Also take a raw breakpoint pointer.
3209 * win32-arm-low.c (the_low_target): Install NULL as
3210 supports_z_point_type.
3211 * win32-i386-low.c (i386_supports_z_point_type): New function.
3212 (i386_insert_point, i386_remove_point): Adjust to new interface.
3213 (the_low_target): Install i386_supports_z_point_type.
3214 * win32-low.c (win32_supports_z_point_type): New function.
3215 (win32_insert_point, win32_remove_point): Adjust to new interface.
3216 (win32_target_ops): Install win32_supports_z_point_type.
3217 * win32-low.h (struct win32_target_ops):
3218 <supports_z_point_type>: New method.
3219 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3220 instead of a char. Also take a raw breakpoint pointer.
3222 2014-05-20 Pedro Alves <palves@redhat.com>
3224 * mem-break.h: Include break-common.h.
3225 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3226 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3227 (Z_packet_to_target_hw_bp_type): New declaration.
3228 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3229 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3230 (Z_PACKET_ACCESS_WP): Delete macros.
3231 (Z_packet_to_hw_type): Delete function.
3232 * i386-low.h: Don't include break-common.h here.
3233 (Z_packet_to_hw_type): Delete declaration.
3234 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3235 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3236 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3237 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3238 * linux-aarch64-low.c: Don't include break-common.h here.
3239 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3240 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3241 (Z_packet_to_target_hw_bp_type): Delete function.
3242 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3244 (mips_insert_point, mips_remove_point): Use
3245 Z_packet_to_target_hw_bp_type.
3247 2014-05-20 Pedro Alves <palves@redhat.com>
3249 * linux-aarch64-low.c: Include break-common.h.
3250 (enum target_point_type): Delete.
3251 (Z_packet_to_point_type): Rename to ...
3252 (Z_packet_to_target_hw_bp_type): ... this, and return a
3253 target_hw_bp_type instead.
3254 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3255 instead of an enum target_point_type.
3256 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3258 (aarch64_dr_state_insert_one_point)
3259 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3260 (aarch64_handle_aligned_watchpoint)
3261 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3262 Take an enum target_hw_bp_type instead of an enum
3264 (aarch64_supports_z_point_type): New function.
3265 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3266 use Z_packet_to_target_hw_bp_type.
3268 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3270 * configure.ac: Only use -Werror by default when DEVELOPMENT
3272 * configure: Regenerate.
3274 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3276 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3277 * linux-x86-low.c (X86_64_USER_REGS): New.
3278 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3280 2014-04-28 Yao Qi <yao@codesourcery.com>
3282 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3285 2014-04-25 Pedro Alves <palves@redhat.com>
3288 * linux-low.c (linux_attach_fail_reason_string): New function.
3289 (linux_attach_lwp): Delete.
3290 (linux_attach_lwp_1): Rename to ...
3291 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3292 argument. Remove "initial" parameter. Return int instead of
3293 void. Don't error or warn here.
3294 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3295 failure to attach to the tgid. Call warning when failing to
3297 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3298 argument. Remove "initial" parameter. Return int instead of
3299 void. Don't error or warn here.
3300 (linux_attach_fail_reason_string): New declaration.
3301 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3302 interface change. Use linux_attach_fail_reason_string.
3304 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3305 Walfred Tedeschi <walfred.tedeschi@intel.com>
3307 * Makefile.in: Added rules to handle new files
3308 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3309 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3310 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3311 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3312 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3313 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3315 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3316 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3317 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3318 i386/x32-avx512.xml.
3319 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3320 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3321 i386/x32-avx512-linux.xml.
3322 * i387-fp.c (num_avx512_k_registers): New constant for number
3324 (num_avx512_zmmh_low_registers): New constant for number of
3325 lower ZMM registers (0-15).
3326 (num_avx512_zmmh_high_registers): New constant for number of
3327 higher ZMM registers (16-31).
3328 (num_avx512_ymmh_registers): New contant for number of higher
3329 YMM registers (ymm16-31 added by avx521 on x86_64).
3330 (num_avx512_xmm_registers): New constant for number of higher
3331 XMM registers (xmm16-31 added by AVX512 on x86_64).
3332 (struct i387_xsave): Add space for AVX512 registers.
3333 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3334 Add code to handle AVX512 registers.
3335 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3336 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3337 prototypei from generated file.
3338 (tdesc_amd64_avx512_linux): Likewise.
3339 (init_registers_x32_avx512_linux): Likewise.
3340 (tdesc_x32_avx512_linux): Likewise.
3341 (init_registers_i386_avx512_linux): Likewise.
3342 (tdesc_i386_avx512_linux): Likewise.
3343 (x86_64_regmap): Add AVX512 registers.
3344 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3346 (initialize_low_arch): Add code to initialize AVX512 registers.
3348 2014-04-23 Pedro Alves <palves@redhat.com>
3350 * mem-break.c (find_gdb_breakpoint_at): Make static.
3351 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3353 2014-04-23 Pedro Alves <palves@redhat.com>
3355 * i386-low.c: Don't include break-common.h here.
3356 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3357 prototype to take target_hw_bp_type as argument instead of a Z
3359 * i386-low.h: Include break-common.h here.
3360 (Z_packet_to_hw_type): Declare.
3361 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3363 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3364 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3365 (x86_remove_point): Convert the packet number to a
3366 target_hw_bp_type before calling i386_low_remove_watchpoint.
3367 * win32-i386-low.c (i386_insert_point): Convert the packet number
3368 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3369 (i386_remove_point): Convert the packet number to a
3370 target_hw_bp_type before calling i386_low_remove_watchpoint.
3372 2014-04-23 Pedro Alves <palves@redhat.com>
3374 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3376 2014-04-10 Pedro Alves <palves@redhat.com>
3378 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3379 Check if the condition or command is NULL before checking if the
3380 breakpoint is known. On success, return true.
3381 * mem-break.h (add_breakpoint_condition): Document return.
3382 (add_breakpoint_commands): Add describing comment.
3383 * server.c (skip_to_semicolon): New function.
3384 (process_point_options): Use it.
3386 2014-04-09 Pedro Alves <palves@redhat.com>
3388 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3391 2014-02-27 Pedro Alves <palves@redhat.com>
3394 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3396 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3398 (last_thread_of_process_p): Take a PID argument instead of a
3400 (linux_wait_for_lwp): Delete.
3401 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3403 (linux_low_filter_event): New function, party factored out from
3404 linux_wait_for_event.
3405 (linux_wait_for_event): Rename to ...
3406 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3407 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3408 sigsuspend. Check for zombie leaders.
3409 (linux_wait_for_event): Reimplement as wrapper around
3410 linux_wait_for_event_filtered.
3411 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3412 a normal or signal exit is seen, it's the whole process exiting.
3413 (wait_for_sigstop): No longer a for_each_inferior callback.
3414 Rewrite on top of linux_wait_for_event_filtered.
3415 (stop_all_lwps): Call wait_for_sigstop directly.
3416 * server.c (resume, handle_target_event): Handle
3417 TARGET_WAITKIND_NO_RESUMED.
3419 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3421 * win32-low.c (psapi_get_dll_name,
3422 * win32_CreateToolhelp32Snapshot): Delete.
3423 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3424 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3426 (handle_load_dll): Add function description.
3427 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3429 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3431 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3433 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3434 base address when calling win32_add_one_solib.
3435 (handle_load_dll): Delete local variable load_addr.
3436 Remove 0x1000 offset applied to DLL base address when calling
3437 win32_add_one_solib.
3438 (handle_unload_dll): Add comment.
3440 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3442 * win32-low.c (win32_add_all_dlls): Renames
3443 win32_ensure_ntdll_loaded. Rewrite function documentation.
3444 Adjust implementation to always load all DLLs.
3445 Add 0x1000 offset to DLL base address when calling
3446 win32_add_one_solib.
3447 (child_initialization_done): New static global.
3448 (do_initial_child_stuff): Set child_initialization_done to
3449 zero during child initialization, and 1 after. Replace call
3450 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3452 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3453 (handle_unload_dll): Add function documentation.
3454 (get_child_debug_event): Ignore load and unload DLL events
3455 during child initialization.
3457 2014-02-20 Doug Evans <dje@google.com>
3459 Remove global all_lwps.
3460 * inferiors.h (ptid_of): Move here from linux-low.h.
3461 (pid_of, lwpid_of): Ditto.
3462 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3463 parameter is a struct thread_info * now.
3464 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3465 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3466 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3468 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3469 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3470 * linux-arm-low.c (update_registers_callback): Update, "entry"
3471 parameter is a struct thread_info * now.
3472 Fetch lwpid from current_inferior directly.
3473 (arm_insert_point): Pass &all_threads to find_inferior instead of
3475 (arm_remove_point): Ditto.
3476 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3477 (arm_prepare_to_resume): Fetch pid from thread.
3478 (arm_read_description): Fetch lwpid from current_inferior directly.
3479 * linux-low.c (all_lwps): Delete.
3480 (delete_lwp): Delete call to remove_inferior.
3481 (handle_extended_wait): Fetch lwpid from thread.
3482 (add_lwp): Don't set lwp->entry.id. Remove call to
3483 add_inferior_to_list.
3484 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3485 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3486 (kill_one_lwp_callback): Ditto.
3487 (linux_kill): Don't dereference NULL pointer.
3488 Fetch ptid,lwpid from thread.
3489 (get_detach_signal): Fetch ptid from thread.
3490 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3491 Simplify call to regcache_invalidate_thread.
3492 (delete_lwp_callback): Update, "entry" parameter is a
3493 struct thread_info * now. Fetch pid from thread.
3494 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3495 (status_pending_p_callback): Update, "entry" parameter is a
3496 struct thread_info * now. Fetch ptid from thread.
3497 (find_lwp_pid): Update, "entry" parameter is a
3498 struct thread_info * now.
3499 (linux_wait_for_lwp): Fetch pid from thread.
3500 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3501 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3502 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3503 (dequeue_one_deferred_signal): Ditto.
3504 (cancel_breakpoint): Fetch ptid from current_inferior.
3505 (linux_wait_for_event): Pass &all_threads to find_inferior,
3506 not &all_lwps. Fetch ptid, lwpid from thread.
3507 (count_events_callback): Update, "entry" parameter is a
3508 struct thread_info * now.
3509 (select_singlestep_lwp_callback): Ditto.
3510 (select_event_lwp_callback): Ditto.
3511 (cancel_breakpoints_callback): Ditto.
3512 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3514 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3515 (unsuspend_one_lwp): Update, "entry" parameter is a
3516 struct thread_info * now.
3517 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3519 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3520 Fetch lwpid from thread, not lwp.
3521 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3522 Pass &all_threads to find_inferior, not &all_lwps.
3523 (send_sigstop): Fetch lwpid from thread, not lwp.
3524 (send_sigstop_callback): Update, "entry" parameter is a
3525 struct thread_info * now.
3526 (suspend_and_send_sigstop_callback): Ditto.
3527 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3528 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3529 struct thread_info * now.
3530 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3532 (lwp_running): Update, "entry" parameter is a
3533 struct thread_info * now.
3534 (stop_all_lwps): Fetch ptid from thread.
3535 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3536 (linux_resume_one_lwp): Fetch lwpid from thread.
3537 (linux_set_resume_request): Update, "entry" parameter is a
3538 struct thread_info * now. Fetch pid, lwpid from thread.
3539 (resume_status_pending_p): Update, "entry" parameter is a
3540 struct thread_info * now.
3541 (need_step_over_p): Ditto. Fetch lwpid from thread.
3542 (start_step_over): Fetch lwpid from thread.
3543 (linux_resume_one_thread): Update, "entry" parameter is a
3544 struct thread_info * now. Fetch lwpid from thread.
3545 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3546 (proceed_one_lwp): Update, "entry" parameter is a
3547 struct thread_info * now. Fetch lwpid from thread.
3548 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3549 struct thread_info * now.
3550 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3551 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3552 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3554 (regsets_store_inferior_registers): Ditto.
3555 (fetch_register, store_register): Ditto.
3556 (linux_read_memory, linux_write_memory): Ditto.
3557 (linux_request_interrupt): Ditto.
3558 (linux_read_auxv): Ditto.
3559 (linux_xfer_siginfo): Ditto.
3560 (linux_qxfer_spu): Ditto.
3561 (linux_qxfer_libraries_svr4): Ditto.
3562 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3563 moved to inferiors.h.
3565 (get_thread_lwp): Update.
3566 (struct lwp_info): Delete member "entry". Simplify comment for
3569 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3570 current_inferior directly.
3571 (update_watch_registers_callback): Update, "entry" parameter is a
3572 struct thread_info * now. Fetch pid from thread.
3573 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3574 (mips_insert_point): Fetch lwpid from current_inferior.
3575 Pass &all_threads to find_inferior, not &all_lwps.
3576 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3577 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3579 (mips_stopped_data_address): Ditto.
3580 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3582 * linux-tile-low.c (tile_arch_setup): Ditto.
3583 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3584 (update_debug_registers_callback): Update, "entry" parameter is a
3585 struct thread_info * now. Fetch pid from thread.
3586 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3587 Pass &all_threads to find_inferior, not &all_lwps.
3588 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3589 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3590 Pass &all_threads to find_inferior, not &all_lwps.
3591 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3592 (i386_dr_low_get_status): Ditto.
3593 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3594 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3595 (x86_linux_read_description): Ditto.
3596 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3598 2014-02-20 Doug Evans <dje@google.com>
3600 * inferiors.c (get_first_inferior): Fix buglet.
3602 2014-02-19 Doug Evans <dje@google.com>
3604 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3605 * inferiors.c (add_thread): Change result type to struct thread_info *.
3606 All callers updated.
3607 (add_lwp): Call add_thread here instead of in callers.
3608 All callers updated.
3609 * linux-low.h (get_lwp_thread): Rewrite.
3610 (struct lwp_info): New member "thread".
3612 2014-02-19 Doug Evans <dje@google.com>
3614 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3615 All callers updated.
3617 2014-02-19 Doug Evans <dje@google.com>
3619 * inferiors.c (add_thread): Fix whitespace.
3621 2014-02-19 Doug Evans <dje@google.com>
3623 * dll.c (clear_dlls): Replace accessing list implemention details
3625 * gdbthread.h (get_first_thread): Declare.
3626 * inferiors.c (for_each_inferior_with_data): New function.
3627 (get_first_thread): New function.
3628 (find_thread_ptid): Simplify.
3629 (get_first_inferior): New function.
3630 (clear_list): Delete.
3631 (one_inferior_p): New function.
3632 (clear_inferior_list): New function.
3633 (clear_inferiors): Update.
3634 * inferiors.h (for_each_inferior_with_data): Declare.
3635 (clear_inferior_list): Declare.
3636 (one_inferior_p): Declare.
3637 (get_first_inferior): Declare.
3638 * linux-low.c (linux_wait_for_event): Replace accessing list
3639 implemention details with API function.
3640 * server.c (target_running): Ditto.
3641 (accumulate_file_name_length): New function.
3642 (emit_dll_description): New function.
3643 (handle_qxfer_libraries): Replace accessing list implemention
3644 details with API function.
3645 (handle_qxfer_threads_worker): New function.
3646 (handle_qxfer_threads_proper): Replace accessing list implemention
3647 details with API function.
3648 (handle_query): Ditto.
3649 (visit_actioned_threads_callback_ftype): New typedef.
3650 (visit_actioned_threads_data): New struct.
3651 (visit_actioned_threads): Rewrite to be find_inferior callback.
3652 (resume): Call find_inferior.
3653 (handle_status): Replace accessing list implemention
3654 details with API function.
3655 (process_serial_event): Replace accessing list implemention details
3657 * target.c (set_desired_inferior): Replace accessing list implemention
3658 details with API function.
3659 * tracepoint.c (same_process_p): New function.
3660 (gdb_agent_about_to_close): Replace accessing list implemention
3661 details with API function.
3662 * win32-low.c (child_delete_thread): Replace accessing list
3663 implemention details with API function.
3664 (match_dll_by_basename): New function.
3665 (dll_is_loaded_by_basename): New function.
3666 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3667 details call to dll_is_loaded_by_basename.
3669 2014-02-19 Doug Evans <dje@google.com>
3671 * dll.h (struct dll_info): Add comment.
3672 * gdbthread.h (struct thread_info): Add comment.
3673 (current_ptid): Simplify.
3674 * inferiors.c (add_process): Update.
3675 (remove_process): Update.
3676 * inferiors.h (struct process_info): Rename member "head" to "entry".
3677 * linux-low.c (delete_lwp): Update.
3679 (last_thread_of_process_p): Update.
3680 (kill_one_lwp_callback, linux_kill): Update.
3681 (status_pending_p_callback): Update.
3682 (wait_for_sigstop): Update. Simplify read of ptid.
3683 (start_step_over): Update.
3684 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3685 (get_lwp_thread): Update.
3686 (struct lwp_info): Rename member "head" to "entry".
3687 * regcache.h (inferior_list_entry): Delete.
3688 * server.c (kill_inferior_callback): Update.
3689 (detach_or_kill_inferior_callback): Update.
3690 (print_started_pid): Update.
3691 (print_attached_pid): Update.
3692 (process_serial_event): Simplify read of ptid.
3693 * thread-db.c (thread_db_create_event): Update.
3694 (thread_db_get_tls_address): Update.
3695 * win32-low.c (current_inferior_ptid): Simplify.
3697 2014-02-19 Tom Tromey <tromey@redhat.com>
3699 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3701 (target_supports_btrace): Update.
3703 2014-02-14 Yao Qi <yao@codesourcery.com>
3705 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3706 (rsp-low-ipa.o): New target.
3708 2014-02-12 Tom Tromey <tromey@redhat.com>
3710 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3711 convert_ascii_to_int.
3712 * regcache.c (registers_to_string): Likewise.
3713 * remote-utils.c (decode_M_packet): Likewise.
3714 * server.c (process_serial_event): Likewise.
3716 2014-02-12 Tom Tromey <tromey@redhat.com>
3718 * server.c (handle_query, handle_v_run): Use hex2bin, not
3720 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3722 2014-02-12 Tom Tromey <tromey@redhat.com>
3724 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3725 convert_int_to_ascii.
3726 * regcache.c (registers_to_string, collect_register_as_string):
3728 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3730 * server.c (process_serial_event): Likewise.
3731 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3732 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3734 2014-02-12 Tom Tromey <tromey@redhat.com>
3736 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3737 bin2hex, not hexify.
3738 * tracepoint.c (cmd_qtstatus): Likewise.
3740 2014-02-12 Tom Tromey <tromey@redhat.com>
3742 * remote-utils.c (monitor_output): Pass explicit length to
3745 2014-02-12 Tom Tromey <tromey@redhat.com>
3747 * tracepoint.c: Include rsp-low.h.
3748 * server.c: Include rsp-low.h.
3749 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3750 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3752 * remote-utils.c: Include rsp-low.h.
3753 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3754 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3755 (convert_int_to_ascii, convert_ascii_to_int): Move to
3757 * regcache.c: Include rsp-low.h.
3758 * ax.c: Include rsp-low.h.
3759 * Makefile.in (SFILES): Add common/rsp-low.c.
3760 (OBS): Add rsp-low.o.
3761 (rsp-low.o): New target.
3763 2014-02-12 Tom Tromey <tromey@redhat.com>
3765 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3766 Include print-utils.h.
3767 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3768 (plongest, thirty_two, phex_nz): Remove.
3769 * Makefile.in (SFILES): Add common/print-utils.c.
3770 (OBS): Add print-utils.o.
3771 (print-utils-ipa.o): New target.
3772 (print-utils.o): New target.
3773 (IPA_OBJS): Add print-utils-ipa.o.
3775 2014-02-06 Tom Tromey <tromey@redhat.com>
3777 * Makefile.in (SFILES): Fix indentation.
3779 2014-02-05 Doug Evans <dje@google.com>
3781 * linux-low.c (linux_wait_for_event): Improve comment.
3782 (linux_wait_1): Keep current_inferior in sync with event_child.
3784 2014-01-22 Doug Evans <dje@google.com>
3786 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3788 2014-01-22 Doug Evans <dje@google.com>
3790 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3791 * configure: Regenerate.
3792 * config.in: Regenerate.
3793 * Makefile.in (SFILES): Add debug.c.
3795 * debug.c: New file.
3796 * debug.h: New file.
3797 * linux-aarch64-low.c (*): Update all debugging printfs to use
3798 debug_printf instead of fprintf.
3799 * linux-arm-low.c (*): Ditto.
3800 * linux-cris-low.c (*): Ditto.
3801 * linux-crisv32-low.c (*): Ditto.
3802 * linux-m32r-low.c (*): Ditto.
3803 * linux-sparc-low.c (*): Ditto.
3804 * linux-x86.c (*): Ditto.
3805 * linux-low.c (*): Ditto.
3806 (linux_wait_1): Add calls to debug_enter, debug_exit.
3807 (linux_wait): Remove redundant debugging printf.
3808 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3809 (linux_resume, unstop_all_lwps): Ditto.
3810 * mem-break.c (*): Update all debugging printfs to use
3811 debug_printf instead of fprintf.
3812 * remote-utils.c (*): Ditto.
3813 * thread-db.c (*): Ditto.
3814 * server.c #include <ctype.h>, "gdb_vecs.h".
3815 (debug_threads): Moved to debug.c.
3816 (*): Update all debugging printfs to use debug_printf instead of
3818 (start_inferior): Replace call to fflush with call to debug_flush.
3819 (monitor_show_help): Mention set debug-format.
3820 (parse_debug_format_options): New function.
3821 (handle_monitor_command): Handle "monitor set debug-format".
3822 (gdbserver_usage): Mention --debug-format.
3823 (main): Parse --debug-format.
3824 * server.h (debug_threads): Declaration moved to debug.h.
3826 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3827 trace_debug_1 that uses debug_printf.
3828 (tracepoint_look_up_symbols): Update all debugging printfs to use
3829 debug_printf instead of fprintf.
3831 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3833 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3836 2014-01-17 Pedro Alves <palves@redhat.com>
3839 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3840 defined after including gdb_proc_service.h.
3842 2014-01-16 Doug Evans <dje@google.com>
3844 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3845 (match_dll): Use it.
3847 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3849 * target.h (target_ops) <read_btrace>: Change parameters and
3850 return type to allow error reporting.
3851 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3852 trace reading errors on.
3853 * linux-low.c (linux_low_read_btrace): Pass trace reading
3855 (linux_low_disable_btrace): New.
3857 2014-01-15 Doug Evans <dje@google.com>
3859 * inferiors.c (thread_id_to_gdb_id): Delete.
3860 * inferiors.h (thread_id_to_gdb_id): Delete.
3862 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3864 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3865 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3868 2014-01-08 Pedro Alves <palves@redhat.com>
3870 * server.c (handle_status): Don't discard previous queued stop
3871 replies or thread's pending status here.
3872 (main) <disconnection>: Do it here instead.
3874 2014-01-08 Pedro Alves <palves@redhat.com>
3876 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3877 * server.c (visit_actioned_threads, handle_pending_status): New
3879 (handle_v_cont): Factor out parts to ...
3880 (resume): ... this new function. If in all-stop, and a thread
3881 being resumed has a pending status, report it without actually
3883 (myresume): Adjust to use the new 'resume' function.
3884 (clear_pending_status_callback, set_pending_status_callback)
3885 (find_status_pending_thread_callback): New functions.
3886 (handle_status): Handle the case of multiple threads having
3887 interesting statuses to report. Report threads' real last signal
3888 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3889 with an interesting thread to report the status for, instead of
3890 always reporting the status of the first thread.
3892 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3894 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3895 * gdbreplay.c (gdbreplay_version): Likewise.
3897 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3899 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3900 iov.iov_len with the real length in use.
3902 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3904 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3905 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3906 for all targets that use win32-low.c.
3907 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3908 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3910 2013-12-13 Pedro Alves <palves@redhat.com>
3912 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3913 if equal to TARGET_WAITKIND_LOADED.
3914 * win32-low.c (cached_status): New static global.
3915 (win32_wait): Add declaration.
3916 (do_initial_child_stuff): Flush all initial pending debug events
3917 up to the initial breakpoint.
3918 (win32_wait): If CACHED_STATUS was set, return that instead
3919 of doing a real wait. Remove the code resuming the execution
3920 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3921 during the initial phase. Also remove the code changing
3922 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3923 TARGET_WAITKIND_STOPPED.
3925 2013-12-11 Yao Qi <yao@codesourcery.com>
3927 * notif.c (handle_notif_ack): Return 0 if no notification
3930 2013-11-20 Doug Evans <dje@google.com>
3932 * linux-low.c (linux_set_resume_request): Fix comment.
3934 2013-11-20 Doug Evans <dje@google.com>
3936 * linux-low.c (resume_status_pending_p): Tweak comment.
3938 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3940 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3941 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3942 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3943 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3944 (srv_amd64_regobj): Add amd64-mpx.o.
3945 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3946 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3947 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3948 * i387-fp.c (num_pl_bnd_register) Added constant.
3949 (num_pl_bnd_cfg_registers) Added constant.
3950 (struct i387_xsave) Added reserved area and MPX fields.
3951 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3952 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3954 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3955 (init_registers_amd64_mpx_linux): Declare new function.
3956 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3957 (x86_64_regmap): Add MPX registers.
3958 (x86_linux_read_description): Add MPX case.
3959 (initialize_low_arch): Initialize MPX targets.
3961 2013-11-18 Tom Tromey <tromey@redhat.com>
3963 * configure: Rebuild.
3964 * configure.ac: Don't check for stdlib.h.
3965 * gdbreplay.c: Unconditionally include stdlib.h.
3967 2013-11-18 Tom Tromey <tromey@redhat.com>
3969 * config.in: Rebuild.
3970 * configure: Rebuild.
3971 * configure.ac: Don't use AC_HEADER_DIRENT.
3973 2013-11-18 Tom Tromey <tromey@redhat.com>
3975 * server.h: Don't check HAVE_STRING_H.
3976 * gdbreplay.c: Don't check HAVE_STRING_H.
3977 * configure: Rebuild.
3979 2013-11-18 Tom Tromey <tromey@redhat.com>
3981 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3984 2013-11-08 Tom Tromey <tromey@redhat.com>
3986 * configure, config.in: Rebuild.
3987 * configure.ac: Remove unused configury.
3989 2013-11-08 Tom Tromey <tromey@redhat.com>
3991 * acinclude.m4: Include common.m4, codeset.m4.
3992 * configure, config.in: Rebuild.
3993 * configure.ac: Use GDB_AC_COMMON.
3995 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3997 * linux-s390-low.c (HWCAP_S390_TE): New define.
3998 (s390_arch_setup): Consider the TE field in the HWCAP for
3999 determining 'have_regset_tdb'.
4001 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4004 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4007 2013-10-02 Pedro Alves <palves@redhat.com>
4009 * server.c (process_serial_event): Don't output "GDBserver
4010 exiting" if GDB is connected through stdio.
4011 * target.c (mywait): Likewise, be silent if GDB is connected
4014 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4016 * lynx-low.c (lynx_add_threads_after_attach): New function.
4017 (lynx_attach): Remove call to add_thread. Add call to
4018 lynx_add_threads_after_attach instead.
4020 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4022 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4023 * config.in, configure: Regenerated.
4025 2013-09-18 Yao Qi <yao@codesourcery.com>
4028 * server.c (start_inferior): Clear 'resume_info'.
4030 2013-09-16 Jiong Wang <jiwang@tilera.com>
4032 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4035 2013-09-16 Jiong Wang <jiwang@tilera.com>
4037 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4038 linux-tile-low.o to srv_tgtobj.
4040 2013-09-16 Will Newton <will.newton@linaro.org>
4042 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4045 2013-09-06 Pedro Alves <palves@redhat.com>
4047 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4048 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4049 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4050 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4051 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4052 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4054 2013-09-06 Pedro Alves <palves@redhat.com>
4056 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4057 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4059 2013-09-06 Pedro Alves <palves@redhat.com>
4061 * linux-amd64-ipa.c: Include tracepoint.h.
4062 * linux-i386-ipa.c: Include tracepoint.h.
4064 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4066 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4067 (ps_get_thread_area): New function.
4069 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4071 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4072 (initialize_low_arch): Call init_registers_crisv32 rather than
4073 init_register_crisv32.
4075 2013-09-05 Pedro Alves <palves@redhat.com>
4077 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4079 * hostio.h: ... this new file.
4080 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4081 win32-low.c: Include hostio.h.
4083 2013-09-05 Pedro Alves <palves@redhat.com>
4085 * server.h (gdb_client_data, handler_func, callback_handler_func)
4086 (delete_file_handler, add_file_handler, append_callback_event)
4087 (delete_callback_event, start_event_loop, initialize_event_loop):
4088 Move to event-loop.h and include it.
4089 * event-loop.h: New file.
4091 2013-09-05 Pedro Alves <palves@redhat.com>
4093 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4094 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4095 (loaded_dll, unloaded_dll): Move to ...
4096 * dll.h: ... this new file.
4097 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4099 2013-09-05 Pedro Alves <palves@redhat.com>
4101 * server.h (current_process, get_thread_process, all_processes)
4102 (add_inferior_to_list, for_each_inferior, current_inferior)
4103 (remove_inferior, add_process, remove_process, find_process_pid)
4104 (have_started_inferiors_p, have_attached_inferiors_p)
4105 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4106 (clear_inferiors, find_inferior, find_inferior_id)
4107 (inferior_target_data, set_inferior_target_data)
4108 (inferior_regcache_data, set_inferior_regcache_data): Move to
4109 inferiors.h, and include it.
4110 * inferiors.h: New file.
4112 2013-09-05 Pedro Alves <palves@redhat.com>
4114 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4118 2013-09-05 Pedro Alves <palves@redhat.com>
4120 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4122 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4123 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4124 (handle_tracepoint_general_set, handle_tracepoint_query)
4125 (tracepoint_finished_step, tracepoint_was_hit)
4126 (release_while_stepping_state_list, current_traceframe)
4127 (in_readonly_region, traceframe_read_mem)
4128 (fetch_traceframe_registers, traceframe_read_sdata)
4129 (traceframe_read_info, struct fast_tpoint_collect_status)
4130 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4131 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4132 (supply_fast_tracepoint_registers)
4133 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4134 (ipa_tdesc, claim_trampoline_space)
4135 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4136 (agent_mem_read, agent_get_trace_state_variable_value)
4137 (agent_set_trace_state_variable_value, agent_tsv_read)
4138 (agent_mem_read_string, get_raw_reg_func_addr)
4139 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4140 * tracepoint.h: ... this new file.
4142 2013-09-05 Pedro Alves <palves@redhat.com>
4144 * server.h (perror_with_name, error, fatal, warning, paddress)
4145 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4147 * utils.h: New file.
4149 2013-09-05 Pedro Alves <palves@redhat.com>
4151 * server.h (remote_debug, noack_mode, transport_is_reliable)
4152 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4153 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4154 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4155 (write_enn, initialize_async_io, enable_async_io)
4156 (disable_async_io, check_remote_input_interrupt_request)
4157 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4158 (dead_thread_notify, prepare_resume_reply)
4159 (decode_address_to_semicolon, decode_address, decode_m_packet)
4160 (decode_M_packet, decode_X_packet, decode_xfer_write)
4161 (decode_search_memory_packet, unhexify, hexify)
4162 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4163 (look_up_one_symbol, relocate_instruction)
4164 (monitor_output): Move to remote-utils.h, and include it.
4165 * remote-utils.h: New file.
4167 2013-09-05 Pedro Alves <palves@redhat.com>
4169 * server.h (_): Delete.
4171 2013-09-02 Pedro Alves <palves@redhat.com>
4173 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4174 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4176 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4178 2013-09-02 Pierre Muller <muller@sourceware.org>
4180 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4181 or WriteProcessMemory complete successfully and handle
4182 ERROR_PARTIAL_COPY error.
4184 2013-09-02 Pedro Alves <palves@redhat.com>
4186 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4187 error instead of EIO.
4189 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4192 * linux-low.c: Include filestuff.h.
4193 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4194 * lynx-low.c: Include filestuff.h.
4195 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4196 * server.c: Include filestuff.h.
4197 (main): Call notice_open_fds.
4198 * spu-low.c: Include filestuff.h.
4199 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4201 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4203 * Makefile.in: Explain why ../target and ../nat are not
4204 listed as include file search paths.
4205 (linux-waitpid.o): New object file rule.
4206 * configure.srv (srv_native_linux_obj): New variable.
4207 Replace all occurrences of linux native object files with
4208 $srv_native_linux_obj.
4209 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4210 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4211 (linux_enable_event_reporting): Remove declaration.
4212 (my_waitpid): Moved to common/linux-waitpid.c.
4213 (linux_wait_for_event): Pass ptid when calling
4214 linux_enable_event_reporting.
4215 (linux_supports_tracefork_flag): Remove.
4216 (linux_enable_event_reporting): Likewise.
4217 (linux_tracefork_grandchild): Remove.
4218 (STACK_SIZE): Moved to common/linux-ptrace.c.
4219 (linux_tracefork_child): Remove.
4220 (linux_test_for_tracefork): Remove.
4221 (linux_look_up_symbols): Call linux_supports_traceclone.
4222 (initialize_low): Remove call to linux_test_for_tracefork.
4223 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4224 common/linux-ptrace.h.
4225 (PTRACE_TYPE_ARG4): Likewise.
4226 Include linux-ptrace.h.
4228 2013-08-21 Pedro Alves <palves@redhat.com>
4230 * config.in: Renegerate.
4232 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4234 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4235 (SFILES): Remove $(srcdir)/common/target-common.c and
4236 add $(srcdir)/target/waitstatus.c.
4237 (OBS): Remove target-common.o and add waitstatus.o.
4238 (server_h): Remove $(srcdir)/../common/target-common.h and
4239 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4240 and $(srcdir)/../target/waitstatus.h.
4241 (target-common.o): Remove.
4242 (waitstatus.o): New target object file.
4243 * target.h: Do not include target-common.h and
4244 include target/resume.h, target/wait.h and
4245 target/waitstatus.h.
4247 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4249 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4250 to PTRACE_TYPE_ARG3.
4251 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4252 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4254 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4255 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4257 2013-07-27 Jie Zhang <jie@codesourcery.com>
4258 Daniel Jacobowitz <dan@codesourcery.com>
4259 Yao Qi <yao@codesourcery.com>
4261 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4262 (mips-linux-watch.o): New rule.
4263 (mips_linux_watch_h): New variable.
4264 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4266 * linux-mips-low.c: Include mips-linux-watch.h.
4267 (struct arch_process_info, struct arch_lwp_info): New.
4268 (update_watch_registers_callback): New function.
4269 (mips_linux_new_process, mips_linux_new_thread) New functions.
4270 (mips_linux_prepare_to_resume, mips_insert_point): New
4272 (mips_remove_point, mips_stopped_by_watchpoint): New
4274 (rsp_bp_type_to_target_hw_bp_type): New function.
4275 (mips_stopped_data_address): New function.
4276 (the_low_target): Add watchpoint support functions.
4278 2013-07-27 Yao Qi <yao@codesourcery.com>
4280 * i386-low.c: Include break-common.h.
4281 (enum target_hw_bp_type): Remove.
4283 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4285 * Makefile.in (SFILES): /common/target-common.c.
4286 (OBS): Add target-common.o.
4287 (server_h): Add $(srcdir)/../common/target-common.h.
4288 (target-common.o): New target.
4289 * server.c (queue_stop_reply_callback): Free
4290 status string after use.
4291 * target.c (target_waitstatus_to_string): Remove.
4292 * target.h: Include target-common.h.
4293 (resume_kind): Likewise.
4294 (target_waitkind): Likewise.
4295 (target_waitstatus): Likewise.
4296 (TARGET_WNOHANG): Likewise.
4298 2013-07-04 Yao Qi <yao@codesourcery.com>
4300 * Makefile.in (host_alias): Use @host_noncanonical@.
4301 (target_alias): Use @target_noncanonical@.
4302 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4303 ACX_NONCANONICAL_HOST.
4304 * configure: Regenerated.
4307 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4309 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4310 * configure: Rebuild.
4311 * Makefile.in (version_host, version_target): Get from configure.
4312 (version.c): Use $(version_host) and $(version_target).
4314 2013-07-03 Pedro Alves <palves@redhat.com>
4316 * Makefile.in (config.status): Depend on development.sh.
4317 * acinclude.m4: Include libmcheck.m4.
4318 * configure: Regenerate.
4320 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4322 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4323 attribute inside the parentheses.
4324 (winapi_DebugSetProcessKillOnExit): Ditto.
4325 (winapi_DebugBreakProcess): Ditto.
4326 (winapi_GenerateConsoleCtrlEvent): Ditto.
4328 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4330 * notif.h (notif_event): Add a dummy member to avoid compiler
4333 2013-07-01 Pedro Alves <palves@redhat.com>
4335 * hostio.c (HOSTIO_PATH_MAX): Define.
4336 (require_filename, handle_open, handle_unlink, handle_readlink):
4339 2013-07-01 Pedro Alves <palves@redhat.com>
4341 * server.h: Include "pathmax.h".
4342 * linux-low.c: Don't include sys/param.h.
4343 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4345 * win32-low.c: Don't include sys/param.h.
4346 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4348 2013-07-01 Pedro Alves <palves@redhat.com>
4350 * event-loop.c: Don't check HAVE_UNISTD_H before including
4352 * gdbreplay.c: Likewise.
4353 * remote-utils.c: Likewise.
4354 * server.c: Likewise.
4355 * configure.ac: Don't check for unistd.h.
4356 * configure: Regenerate.
4358 2013-06-28 Tom Tromey <tromey@redhat.com>
4360 * Makefile.in (version.c): Use version.in, not
4363 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4365 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4366 * configure: Rebuild.
4367 * Makefile.in (version_host, version_target): Get from configure.
4368 (version.c): Use $(version_host) and $(version_target).
4370 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4372 Fix trace-status to output user name without trailing colon.
4373 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4375 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4377 Fix trace-status to output proper start-time and stop-time.
4378 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4379 output start time and stop time in hex as gdb expects.
4381 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4383 * tracepoint.c (build_traceframe_info_xml): Output trace state
4384 variables present in the trace buffer.
4386 2013-06-24 Tom Tromey <tromey@redhat.com>
4388 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4390 (version.o): Remove.
4391 * gdbreplay.c: Include version.h.
4392 (version, host_name): Don't declare.
4393 * server.h: Include version.h.
4394 (version, host_name): Don't declare.
4396 2013-06-12 Pedro Alves <palves@redhat.com>
4398 * linux-x86-low.c (linux_is_elf64): Delete global.
4399 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4400 with local linux_pid_exe_is_elf_64_file use.
4402 2013-06-11 Pedro Alves <palves@redhat.com>
4404 * linux-low.c (regset_disabled, disable_regset): New functions.
4405 (regsets_fetch_inferior_registers)
4406 (regsets_store_inferior_registers): Use them.
4407 (initialize_regsets_info); Don't allocate the disabled_regsets
4409 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4412 2013-06-11 Pedro Alves <palves@redhat.com>
4414 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4417 2013-06-11 Pedro Alves <palves@redhat.com>
4419 * linux-x86-low.c (initialize_low_arch): Call
4420 init_registers_x32_avx_linux.
4422 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4424 Fix compatibility with Android Bionic.
4425 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4428 2013-06-07 Pedro Alves <palves@redhat.com>
4431 * Makefile.in (OBS): Add tdesc.o.
4432 (IPA_OBJS): Add tdesc-ipa.o.
4433 (tdesc-ipa.o): New rule.
4434 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4436 * linux-low.c (new_inferior): Delete.
4437 (disabled_regsets, num_regsets): Delete.
4438 (linux_add_process): Adjust to set the new per-process
4440 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4441 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4442 was a stop. When calling arch_setup, switch the current inferior
4443 to the thread that got an event.
4444 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4445 (regsets_fetch_inferior_registers)
4446 (regsets_store_inferior_registers): New regsets_info parameter.
4448 (linux_register_in_regsets): New regs_info parameter. Adjust to
4450 (register_addr, fetch_register, store_register): New usrregs_info
4451 parameter. Adjust to use it.
4452 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4453 parameter regs_info. Adjust to use it.
4454 (linux_fetch_registers): Get the current inferior's regs_info, and
4456 (linux_store_registers): Ditto.
4457 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4458 (initialize_low): Don't initialize the target_regsets here. Call
4459 initialize_low_arch.
4460 * linux-low.h (target_regsets): Delete declaration.
4461 (struct regsets_info): New.
4462 (struct usrregs_info): New.
4463 (struct regs_info): New.
4464 (struct process_info_private) <new_inferior>: New field.
4465 (struct linux_target_ops): Delete the num_regs, regmap, and
4466 regset_bitmap fields. New field regs_info.
4467 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4468 * i387-fp.c (num_xmm_registers): Delete.
4469 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4470 calls to new interface.
4471 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4472 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4473 Infer the number of xmm registers from the regcache's target
4475 * i387-fp.h (num_xmm_registers): Delete.
4476 * inferiors.c (add_thread): Don't install the thread's regcache
4478 * proc-service.c (gregset_info): Fetch the current inferior's
4479 regs_info. Adjust to use it.
4480 * regcache.c: Include tdesc.h.
4481 (register_bytes, reg_defs, num_registers)
4482 (gdbserver_expedite_regs): Delete.
4483 (get_thread_regcache): If the thread doesn't have a regcache yet,
4484 create one, instead of aborting gdbserver.
4485 (regcache_invalidate_one): Rename to ...
4486 (regcache_invalidate_thread): ... this.
4487 (regcache_invalidate_one): New.
4488 (regcache_invalidate): Only invalidate registers of the current
4490 (init_register_cache): Add target_desc parameter, and use it.
4491 (new_register_cache): Ditto. Assert the target description has a
4492 non zero registers_size.
4493 (regcache_cpy): Add assertions. Adjust.
4494 (realloc_register_cache, set_register_cache): Delete.
4495 (registers_to_string, registers_from_string): Adjust.
4496 (find_register_by_name, find_regno, find_register_by_number)
4497 (register_cache_size): Add target_desc parameter, and use it.
4498 (free_register_cache_thread, free_register_cache_thread_one)
4499 (regcache_release, register_cache_size): New.
4500 (register_size): Add target_desc parameter, and use it.
4501 (register_data, supply_register, supply_register_zeroed)
4502 (supply_regblock, supply_register_by_name, collect_register)
4503 (collect_register_as_string, collect_register_by_name): Adjust.
4504 * regcache.h (struct target_desc): Forward declare.
4505 (struct regcache) <tdesc>: New field.
4506 (init_register_cache, new_register_cache): Add target_desc
4508 (regcache_invalidate_thread): Declare.
4509 (regcache_invalidate_one): Delete declaration.
4510 (regcache_release): Declare.
4511 (find_register_by_number, register_cache_size, register_size)
4512 (find_regno): Add target_desc parameter.
4513 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4515 * remote-utils.c: Include tdesc.h.
4516 (outreg, prepare_resume_reply): Adjust.
4517 * server.c: Include tdesc.h.
4518 (gdbserver_xmltarget): Delete declaration.
4519 (get_features_xml, process_serial_event): Adjust.
4520 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4522 (struct process_info) <tdesc>: New field.
4523 (ipa_tdesc): Declare.
4524 * tdesc.c: New file.
4525 * tdesc.h: New file.
4526 * tracepoint.c: Include tdesc.h.
4527 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4528 (get_context_regcache): Adjust to pass ipa_tdesc down.
4529 (do_action_at_tracepoint): Adjust to get the register cache size
4530 from the context regcache's description.
4531 (traceframe_walk_blocks): Adjust to get the register cache size
4532 from the current trace frame's description.
4533 (traceframe_get_pc): Adjust to get current trace frame's
4534 description and pass it down.
4535 (gdb_collect): Adjust to get the register cache size from the
4537 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4538 (gdbserver_xmltarget): Delete.
4539 (initialize_low_tracepoint): Set the ipa's target description.
4540 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4541 (initialize_low_tracepoint): Set the ipa's target description.
4542 * linux-x86-low.c: Include tdesc.h.
4543 [__x86_64__] (is_64bit_tdesc): New.
4544 (ps_get_thread_area, x86_get_thread_area): Use it.
4545 (i386_cannot_store_register): Rename to ...
4546 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4547 (i386_cannot_fetch_register): Rename to ...
4548 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4549 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4551 (target_regsets): Rename to ...
4552 (x86_regsets): ... this.
4553 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4555 (x86_siginfo_fixup): Use is_64bit_tdesc.
4556 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4557 (tdesc_x32_avx_linux, tdesc_x32_linux)
4558 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4560 (x86_linux_update_xmltarget): Delete.
4561 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4562 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4563 (AMD64_LINUX_USER64_CS): New.
4564 (x86_linux_read_description): New, based on
4565 x86_linux_update_xmltarget.
4566 (same_process_callback): New.
4567 (x86_arch_setup_process_callback): New.
4568 (x86_linux_update_xmltarget): New.
4569 (x86_regsets_info): New.
4570 (amd64_linux_regs_info): New.
4571 (i386_linux_usrregs_info): New.
4572 (i386_linux_regs_info): New.
4573 (x86_linux_regs_info): New.
4574 (x86_arch_setup): Reimplement.
4575 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4576 (x86_emit_ops): Ditto.
4577 (the_low_target): Adjust. Install x86_linux_regs_info,
4578 x86_cannot_fetch_register, and x86_cannot_store_register.
4579 (initialize_low_arch): New.
4580 * linux-ia64-low.c (tdesc_ia64): Declare.
4581 (ia64_fetch_register): Adjust.
4582 (ia64_usrregs_info, regs_info): New globals.
4583 (ia64_regs_info): New function.
4584 (the_low_target): Adjust.
4585 (initialize_low_arch): New function.
4586 * linux-sparc-low.c (tdesc_sparc64): Declare.
4587 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4589 (sparc_arch_setup): New function.
4590 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4591 (the_low_target): Adjust.
4592 (initialize_low_arch): New function.
4593 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4594 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4595 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4596 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4597 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4598 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4599 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4600 (tdesc_powerpc_isa205_vsx64l): Declare.
4601 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4602 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4603 (ppc_set_pc, ppc_get_hwcap): Adjust.
4604 (ppc_usrregs_info): Forward declare.
4605 (!__powerpc64__) ppc_regmap_adjusted: New global.
4606 (ppc_arch_setup): Adjust to the current process'es target
4608 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4609 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4610 (ppc_store_evrregset): Adjust.
4611 (target_regsets): Rename to ...
4612 (ppc_regsets): ... this, and make static.
4613 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4614 (ppc_regs_info): New function.
4615 (the_low_target): Adjust.
4616 (initialize_low_arch): New function.
4617 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4618 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4619 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4620 (tdesc_s390x_linux64v2): Declare.
4621 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4622 (s390_fill_gregset, s390_store_last_break): Adjust.
4623 (target_regsets): Rename to ...
4624 (s390_regsets): ... this, and make static.
4625 (s390_get_pc, s390_set_pc): Adjust.
4626 (s390_get_hwcap): New target_desc parameter, and use it.
4627 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4628 (s390_arch_setup): Adjust to set the current process'es target
4629 description. Don't adjust the regmap.
4630 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4631 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4632 (regs_info_3264): New globals.
4633 (s390_regs_info): New function.
4634 (the_low_target): Adjust.
4635 (initialize_low_arch): New function.
4636 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4637 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4638 [__mips64] (init_registers_mips_linux)
4639 (init_registers_mips_dsp_linux): Delete defines.
4640 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4641 (have_dsp): New global.
4642 (mips_read_description): New, based on mips_arch_setup.
4643 (mips_arch_setup): Reimplement.
4644 (get_usrregs_info): New function.
4645 (mips_cannot_fetch_register, mips_cannot_store_register)
4646 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4647 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4648 (target_regsets): Rename to ...
4649 (mips_regsets): ... this, and make static.
4650 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4651 (dsp_regs_info, regs_info): New globals.
4652 (mips_regs_info): New function.
4653 (the_low_target): Adjust.
4654 (initialize_low_arch): New function.
4655 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4656 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4658 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4659 (arm_read_description): New, with bits factored from
4661 (arm_arch_setup): Reimplement.
4662 (target_regsets): Rename to ...
4663 (arm_regsets): ... this, and make static.
4664 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4665 (arm_regs_info): New function.
4666 (the_low_target): Adjust.
4667 (initialize_low_arch): New function.
4668 * linux-m68k-low.c (tdesc_m68k): Declare.
4669 (target_regsets): Rename to ...
4670 (m68k_regsets): ... this, and make static.
4671 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4672 (m68k_regs_info): New function.
4673 (m68k_arch_setup): New function.
4674 (the_low_target): Adjust.
4675 (initialize_low_arch): New function.
4676 * linux-sh-low.c (tdesc_sharch): Declare.
4677 (target_regsets): Rename to ...
4678 (sh_regsets): ... this, and make static.
4679 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4680 (sh_regs_info, sh_arch_setup): New functions.
4681 (the_low_target): Adjust.
4682 (initialize_low_arch): New function.
4683 * linux-bfin-low.c (tdesc_bfin): Declare.
4684 (bfin_arch_setup): New function.
4685 (bfin_usrregs_info, regs_info): New globals.
4686 (bfin_regs_info): New function.
4687 (the_low_target): Adjust.
4688 (initialize_low_arch): New function.
4689 * linux-cris-low.c (tdesc_cris): Declare.
4690 (cris_arch_setup): New function.
4691 (cris_usrregs_info, regs_info): New globals.
4692 (cris_regs_info): New function.
4693 (the_low_target): Adjust.
4694 (initialize_low_arch): New function.
4695 * linux-cris-low.c (tdesc_crisv32): Declare.
4696 (cris_arch_setup): New function.
4697 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4698 (cris_regs_info): New function.
4699 (the_low_target): Adjust.
4700 (initialize_low_arch): New function.
4701 * linux-m32r-low.c (tdesc_m32r): Declare.
4702 (m32r_arch_setup): New function.
4703 (m32r_usrregs_info, regs_info): New globals.
4704 (m32r_regs_info): Adjust.
4705 (initialize_low_arch): New function.
4706 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4707 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4708 (tic6x_usrregs_info): Forward declare.
4709 (tic6x_read_description): New function, based on ...
4710 (tic6x_arch_setup): ... this. Reimplement.
4711 (target_regsets): Rename to ...
4712 (tic6x_regsets): ... this, and make static.
4713 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4714 (tic6x_regs_info): New function.
4715 (the_low_target): Adjust.
4716 (initialize_low_arch): New function.
4717 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4718 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4719 (target_regsets): Rename to ...
4720 (xtensa_regsets): ... this, and make static.
4721 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4723 (xtensa_arch_setup, xtensa_regs_info): New functions.
4724 (the_low_target): Adjust.
4725 (initialize_low_arch): New function.
4726 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4727 (nios2_arch_setup): Set the current process'es tdesc.
4728 (target_regsets): Rename to ...
4729 (nios2_regsets): ... this.
4730 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4731 (nios2_regs_info): New function.
4732 (the_low_target): Adjust.
4733 (initialize_low_arch): New function.
4734 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4735 (aarch64_arch_setup): Set the current process'es tdesc.
4736 (target_regsets): Rename to ...
4737 (aarch64_regsets): ... this.
4738 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4739 (aarch64_regs_info): New function.
4740 (the_low_target): Adjust.
4741 (initialize_low_arch): New function.
4742 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4744 (target_regsets): Rename to ...
4745 (tile_regsets): ... this.
4746 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4747 (tile_regs_info): New function.
4748 (tile_arch_setup): Set the current process'es tdesc.
4749 (the_low_target): Adjust.
4750 (initialize_low_arch): New function.
4751 * spu-low.c (tdesc_spu): Declare.
4752 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4753 * win32-arm-low.c (tdesc_arm): Declare.
4754 (arm_arch_setup): New function.
4755 (the_low_target): Install arm_arch_setup instead of
4757 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4758 (init_windows_x86): Rename to ...
4759 (i386_arch_setup): ... this. Set `win32_tdesc'.
4760 (the_low_target): Adjust.
4761 * win32-low.c (win32_tdesc): New global.
4762 (child_add_thread): Don't create the thread cache here.
4763 (do_initial_child_stuff): Set the new process'es tdesc.
4764 * win32-low.h (struct target_desc): Forward declare.
4765 (win32_tdesc): Declare.
4766 * lynx-i386-low.c (tdesc_i386): Declare global.
4767 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4768 * lynx-low.c (lynx_tdesc): New global.
4769 (lynx_add_process): Set the new process'es tdesc.
4770 * lynx-low.h (struct target_desc): Forward declare.
4771 (lynx_tdesc): Declare global.
4772 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4773 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4774 * nto-low.c (nto_tdesc): New global.
4775 (do_attach): Set the new process'es tdesc.
4776 * nto-low.h (struct target_desc): Forward declare.
4777 (nto_tdesc): Declare.
4778 * nto-x86-low.c (tdesc_i386): Declare.
4779 (nto_x86_arch_setup): Set `nto_tdesc'.
4781 2013-06-04 Gary Benson <gbenson@redhat.com>
4783 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4784 to qSupported response when appropriate.
4785 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4786 with nonzero-length annex.
4787 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4788 arguments supplied in annex.
4790 2013-05-31 Doug Evans <dje@google.com>
4793 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4794 64 bits in 64-cross-32 environment.
4796 2013-05-28 Pedro Alves <palves@redhat.com>
4798 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4799 (aarch64-without-fpu.c): Delete rule.
4800 * configure.srv (aarch64*-*-linux*): Remove references to
4801 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4802 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4805 2013-05-24 Pedro Alves <palves@redhat.com>
4807 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4808 instead of strchr/decode_address. Error if the range isn't split
4809 with a ','. Don't assume there's be a ':' in the action.
4811 2013-05-23 Yao Qi <yao@codesourcery.com>
4812 Pedro Alves <palves@redhat.com>
4814 * linux-low.c (lwp_in_step_range): New function.
4815 (linux_wait_1): If the thread was range stepping and stopped
4816 outside the stepping range, report the stop to GDB. Otherwise,
4817 continue stepping. Add range stepping debug output.
4818 (linux_set_resume_request): Copy the step range from the resume
4820 (linux_supports_range_stepping): New.
4821 (linux_target_ops) <supports_range_stepping>: Set to
4822 linux_supports_range_stepping.
4823 * linux-low.h (struct linux_target_ops)
4824 <supports_range_stepping>: New field.
4825 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4826 * linux-x86-low.c (x86_supports_range_stepping): New.
4827 (the_low_target) <supports_range_stepping>: Set to
4828 x86_supports_range_stepping.
4829 * server.c (handle_v_cont): Handle 'r' action.
4830 (handle_v_requests): Append ";r" if the target supports range
4832 * target.h (struct thread_resume) <step_range_start,
4833 step_range_end>: New fields.
4834 (struct target_ops) <supports_range_stepping>:
4836 (target_supports_range_stepping): New macro.
4838 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4840 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4841 confusion in comment.
4843 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4845 * lynx-low.c (struct process_info_private): New type.
4846 (lynx_add_process): New function.
4847 (lynx_create_inferior, lynx_attach): Replace calls to
4848 add_process by calls to lynx_add_process.
4849 (lynx_resume): If PTID is null, then try using
4850 current_process()->private->last_wait_event_ptid.
4852 (lynx_clear_inferiors): Delete. The contents of that function
4853 has been inlined in lynx_mourn;
4854 (lynx_wait_1): Save the ptid in the process's private data.
4855 (lynx_mourn): Free the process' private data. Replace call
4856 to lynx_clear_inferiors by call to clear_inferiors.
4858 2013-05-17 Yao Qi <yao@codesourcery.com>
4860 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4863 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4865 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4866 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4867 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4868 PT_TEXT_END_ADDR guards. Update comments.
4869 (linux_target_op) <read_offsets>: Conditionally define to
4870 linux_read_offsets if the target is UCLIBC and if it defines
4871 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4873 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4874 Andrew Jenner <andrew@codesourcery.com>
4876 * Makefile.in (SFILES): Add linux-nios2-low.c.
4877 (clean): Add action to delete nios2-linux.c.
4878 (nios2-linux.c): New rule.
4879 * configure.srv: Add nios2*-*-linux*.
4880 * linux-nios2-low.c: New.
4882 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4884 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4886 2013-04-25 Hui Zhu <hui@codesourcery.com>
4889 * ax.c (ax_printf): Add fflush.
4891 2013-04-22 Tom Tromey <tromey@redhat.com>
4893 * Makefile.in (SFILES): Add filestuff.c.
4894 (OBS): Add filestuff.o.
4895 (filestuff.o): New target.
4896 * config.in, configure: Rebuild.
4897 * configure.ac: Check for fdwalk, pipe2.
4899 2013-04-17 Pedro Alves <palves@redhat.com>
4901 * configure.ac (USE_THREAD_DB): Delete variable.
4902 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4903 Don't AC_SUBST USE_THREAD_DB.
4904 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4905 * config.in, configure: Regenerate.
4907 2013-04-16 Pedro Alves <palves@redhat.com>
4909 * linux-low.h (struct lwp_info) <thread_known>: Move under
4910 the USE_THREAD_DB #ifdef.
4912 2013-04-16 Pedro Alves <palves@redhat.com>
4914 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4915 (linux-low.o): Delete rule.
4916 * linux-low.h: Always include "gdb_thread_db.h" instead of
4917 conditionally including thread_db.h.
4918 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4921 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4923 * Makefile.in (install-only): Fix make install regression.
4925 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4927 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4928 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4930 * gdbserver.1: Remove.
4932 2013-03-22 Pedro Alves <palves@redhat.com>
4934 * linux-low.c (handle_extended_wait): Don't call
4935 linux_enable_event_reporting.
4937 2013-03-15 Tony Theodore <tonyt@logyst.com>
4940 * Makefile.in (SHELL): Use @SHELL@.
4942 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4944 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4947 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4949 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4950 Remove extraneous NULL element.
4952 2013-03-13 Yao Qi <yao@codesourcery.com>
4954 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4955 'V' block in trace frame.
4957 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4959 * target.h (struct target_ops): Add btrace ops.
4960 (target_supports_btrace): New macro.
4961 (target_enable_btrace): New macro.
4962 (target_disable_btrace): New macro.
4963 (target_read_btrace): New macro.
4964 * gdbthread.h (struct thread_info): Add btrace field.
4965 * server.c: Include btrace-common.h.
4966 (handle_btrace_general_set): New function.
4967 (handle_btrace_enable): New function.
4968 (handle_btrace_disable): New function.
4969 (handle_general_set): Call handle_btrace_general_set.
4970 (handle_qxfer_btrace): New function.
4971 (struct qxfer qxfer_packets[]): Add btrace entry.
4972 * inferiors.c (remove_thread): Disable btrace.
4973 * linux-low: Include linux-btrace.h.
4974 (linux_low_enable_btrace): New function.
4975 (linux_low_read_btrace): New function.
4976 (linux_target_ops): Add btrace ops.
4977 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4978 Add srv_linux_btrace=yes.
4979 (x86_64-*-linux*): Add linux-btrace.o.
4980 Add srv_linux_btrace=yes.
4981 * configure.ac: Define HAVE_LINUX_BTRACE.
4982 * config.in: Regenerated.
4983 * configure: Regenerated.
4985 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4987 * server.c (handle_qxfer): Preserve error message if -3 is
4989 (qxfer): Document the -3 return value.
4991 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4993 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4994 (linux_btrace_h): New variable.
4995 (linux-btrace.o): New rule.
4997 2013-03-08 Stan Shebs <stan@codesourcery.com>
4998 Hafiz Abid Qadeer <abidh@codesourcery.com>
5000 * tracepoint.c (trace_buffer_size): New global.
5001 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5002 (init_trace_buffer): Change to one-argument function. Allocate
5003 trace buffer memory.
5004 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5005 handle QTBuffer:size packet.
5006 (cmd_bigqtbuffer_size): New function.
5007 (initialize_tracepoint): Call init_trace_buffer with
5008 DEFAULT_TRACE_BUFFER_SIZE.
5009 * server.c (handle_query): Add QTBuffer:size in the
5012 2013-03-07 Yao Qi <yao@codesourcery.com>
5014 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5015 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5017 (cmd_qtsp): Adjust condition. Do post increment.
5018 Set cur_action and cur_step_action back to 0.
5020 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5023 * linux-low.c (linux_write_memory): Return early success if LEN is
5026 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5028 * configure.srv: Add x86_64-*-cygwin* as target.
5030 2013-02-28 Tom Tromey <tromey@redhat.com>
5032 * configure.ac: Invoke AC_SYS_LARGEFILE.
5033 * configure, config.in: Rebuild.
5035 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5037 * win32-low.c: Throughout, fix format strings and casts of
5038 printf-like functions to avoid type related warnings on all
5040 (get_child_debug_event): Print dwDebugEventCode as hex since
5041 that's how it's usually documented.
5043 2013-02-28 Yao Qi <yao@codesourcery.com>
5045 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5048 2013-02-27 Jiong Wang <jiwang@tilera.com>
5050 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5051 (reg-tilegx32.c): New rule.
5052 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5053 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5054 different register info initializer according to elf class.
5055 (init_registers_tilgx32): New function. The tilegx32 register info
5057 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5058 (tile_store_gregset): Likewise.
5060 2013-02-27 Yao Qi <yao@codesourcery.com>
5062 * server.c (process_point_options): Print debug message when
5063 debug_threads is true.
5065 2013-02-26 Yao Qi <yao@codesourcery.com>
5067 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5069 2013-02-19 Pedro Alves <palves@redhat.com>
5070 Kai Tietz <ktietz@redhat.com>
5074 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5075 instead of strtoul to extract address from packet.
5076 (process_serial_event) <'z'>: Likewise.
5078 2013-02-18 Yao Qi <yao@codesourcery.com>
5080 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5082 2013-02-14 Pedro Alves <palves@redhat.com>
5086 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5087 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5089 2013-02-14 Pedro Alves <palves@redhat.com>
5091 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5093 2013-02-14 Pedro Alves <palves@redhat.com>
5095 * tracepoint.c (save_string): Delete.
5096 (add_tracepoint_action): Use savestring instead of save_string.
5098 2013-02-12 Pedro Alves <palves@redhat.com>
5100 * linux-xtensa-low.c: Ditto.
5101 * xtensa-xtregs.c: Ditto.
5103 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5105 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5108 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5110 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5111 aarch64_num_wp_regs and aarch64_num_bp_regs to
5112 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5114 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5116 * linux-aarch64-low.c (ps_get_thread_area): Replace
5117 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5119 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5120 Marcus Shawcroft <marcus.shawcroft@arm.com>
5121 Nigel Stephens <nigel.stephens@arm.com>
5122 Yufeng Zhang <yufeng.zhang@arm.com>
5124 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5125 (aarch64.c, aarch64-without-fpu.c): New targets.
5126 * configure.srv (aarch64*-*-linux*): New.
5127 * linux-aarch64-low.c: New file.
5129 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5131 * linux-low.c (handle_extended_wait, linux_create_inferior)
5132 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5133 (dequeue_one_deferred_signal, linux_resume_one_thread)
5134 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5135 (linux_tracefork_grandchild, linux_test_for_tracefork)
5136 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5137 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5138 where the argument is 0.
5140 2013-01-25 Yao Qi <yao@codesourcery.com>
5142 * event-loop.c: Include "queue.h".
5143 (gdb_event_p): New typedef.
5144 (struct gdb_event) <next_event>: Remove.
5145 (event_queue): Change to QUEUE(gdb_event_p).
5146 (async_queue_event): Remove.
5147 (gdb_event_xfree): New.
5148 (initialize_event_loop): New.
5149 (process_event): Use API from QUEUE.
5150 (wait_for_event): Likewise.
5151 * server.c (main): Call initialize_event_loop.
5152 * server.h (initialize_event_loop): Declare.
5154 2013-01-18 Yao Qi <yao@codesourcery.com>
5156 * ax.h (struct eval_agent_expr_context): New.
5157 (gdb_eval_agent_expr): Update declaration.
5158 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5159 TFRAME. Add new argument CTX.
5160 * server.h (struct eval_agent_expr_context): Declare.
5161 (agent_mem_read, agent_tsv_read): Update declaration.
5162 (agent_mem_read_string): Likewise.
5163 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5164 (add_traceframe_block): Add new argument TPOINT.
5165 Increase TPOINT->traceframe_usage.
5166 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5167 eval_tracepoint_agent_expr.
5168 (condition_true_at_tracepoint): Likewise.
5169 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5170 (agent_mem_read_string, agent_tsv_read): Likewise.
5172 2013-01-16 Yao Qi <yao@codesourcery.com>
5174 * linux-low.c (linux_resume_one_lwp): Don't check
5175 'lwp->bp_reinsert != 0'.
5177 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5178 Pedro Alves <palves@redhat.com>
5180 * lynx-low.c (ptrace_request_to_str): Define a temporary
5181 macro and use it to simplify this function's implementation.
5183 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5185 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5188 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5190 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5192 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5194 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5196 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5198 * lynx-low.c (lynx_resume): Use the resume_info parameter
5199 to determine the ptid for the lynx_ptrace call, unless
5200 it is equal to minus_one_ptid, in which case we use the
5201 ptid of the current_inferior.
5202 (lynx_wait_1): After having received a thread create/exit
5203 event, resume the inferior's execution using the signaling
5204 thread's ptid, rather than the old ptid.
5206 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5208 * lynx-low.c (lynx_resume): Delete variable ret.
5210 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5212 * gdbreplay.c (gdbreplay_version): Update copyright year.
5213 * server.c (gdbserver_version): Likewise.
5215 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5217 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5220 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5222 * lynx-low.c (ptrace_request_to_str): Add handling for
5225 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5227 * lynx-low.c (lynx_attach): Delete variable new_process.
5229 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5231 * lynx-low.c (lynx_create_inferior): Delete variable
5234 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5236 * lynx-low.c (ptrace_request_to_str): Do not handle
5237 PTRACE_GETTHREADLIST if this macro does not exist.
5239 2012-12-15 Yao Qi <yao@codesourcery.com>
5241 * Makefile.in (OBS): Add notif.o.
5242 * notif.c, notif.h: New.
5243 * server.c: Include "notif.h".
5244 (struct vstop_notif) <next>: Remove.
5246 (queue_stop_reply): Update.
5247 (push_event, send_next_stop_reply): Remove.
5248 (discard_queued_stop_replies): Update.
5249 (notif_stop): New variable.
5250 (handle_v_stopped): Remove.
5251 (handle_v_requests): Don't call handle_v_stopped. Call
5252 handle_ack_notif instead.
5253 (queue_stop_reply_callback): Call notif_event_enque instead
5254 of queue_stop_reply.
5255 (handle_status): Don't call send_next_stop_reply, call
5256 notif_write_event instead.
5257 (kill_inferior_callback): Likewise.
5258 (detach_or_kill_inferior_callback): Likewise.
5259 (main): Call initialize_notif.
5260 (process_serial_event): Call QUEUE_is_empty.
5261 (handle_target_event): Call notif_push instead of push event.
5262 * server.h (push_event): Remove declaration.
5264 2012-12-10 Tom Tromey <tromey@redhat.com>
5266 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5267 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5270 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5271 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5272 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5273 (amd64-linux-ipa.o, ax.o): Rewrite.
5274 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5275 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5276 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5277 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5278 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5279 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5280 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5281 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5282 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5283 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5284 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5285 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5286 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5287 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5288 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5289 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5290 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5291 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5292 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5293 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5294 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5295 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5296 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5297 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5298 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5299 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5300 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5301 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5302 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5303 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5304 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5305 (reg-tilegx.o): Remove.
5306 (all_object_files): New macro.
5307 Include .deps files.
5308 * aclocal.m4, configure: Rebuild.
5309 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5310 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5311 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5313 2012-12-05 Tom Tromey <tromey@redhat.com>
5316 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5318 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5320 * configure.ac: Check for linux/perf_event.h.
5321 * config.in: Regenerated.
5322 * configure: Regenerated.
5324 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5326 * hostio.c (handle_readlink): Decrease buffer size
5327 parameter passed to readlink by one byte.
5329 2012-11-26 Yao Qi <yao@codesourcery.com>
5331 * configure.ac (build_warnings): Append '-Wempty-body'.
5332 * configure: Regenerated.
5333 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5336 2012-11-15 Pierre Muller <muller@sourceware.org>
5338 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5339 * config.in: Regenerate.
5340 * configure: Regenerate.
5341 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5342 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5343 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5344 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5346 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5347 instead of <sys/wait.h> header.
5348 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5350 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5352 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5353 (various make rules): Remove -DGDBSERVER
5355 2012-11-09 Yao Qi <yao@codesourcery.com>
5357 * spu-low.c (current_ptid): Move it to ..
5358 * gdbthread.h: ... here. New.
5359 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5360 * server.c (myresume, process_serial_event): Likewise.
5361 * thread-db.c (thread_db_find_new_threads): Likewise.
5362 * tracepoint.c (run_inferior_command): Likewise.
5364 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5366 * server.c (handle_search_memory_1): Include access length in
5369 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5371 * linux-crisv32-low.c: Fix compile errors.
5373 2012-09-04 Yao Qi <yao@codesourcery.com>
5375 * tracepoint.c (cmd_qtsv): Adjust debug message.
5376 Don't check CUR_TPOINT.
5378 2012-08-28 Yao Qi <yao@codesourcery.com>
5380 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5381 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5382 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5383 Remove declarations of xmalloc, xreallloc, xstrdup and
5385 * Makefile.in (libiberty_h): New.
5386 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5387 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5389 2012-08-23 Yao Qi <yao@codesourcery.com>
5391 * server.h: Remove declaration of 'xsnprintf'.
5393 2012-08-22 Keith Seitz <keiths@redhat.com>
5395 * server.h: Include build-gnulib-gbserver/config.h.
5396 * gdbreplay.c: Likewise.
5398 2012-08-08 Doug Evans <dje@google.com>
5400 * Makefile.in (SFILES): Add gdb_vecs.c.
5401 (OBS): Add gdb_vecs.o.
5402 (gdb_vecs_h, host_defs_h): New variables.
5403 (thread-db.o): Add $(gdb_vecs_h) dependency.
5404 (gdb_vecs.o): New rule.
5405 * thread-db.c: #include "gdb_vecs.h".
5406 (thread_db_load_search): Use a vector to iterate over path elements.
5407 Handle text appearing after "$pdir".
5409 * configure.ac: Add check for strstr.
5410 * config.in: Regenerate.
5411 * configure: Regenerate.
5413 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5415 * hostio.c (handle_pread): If pread fails, fall back to attempting
5417 (handle_pwrite): Likewise for pwrite.
5419 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5421 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5422 between unsupported TYPE and unimplementable ADDR/LEN combination.
5423 (arm_insert_point): Act on new return value.
5425 2012-07-31 Pedro Alves <palves@redhat.com>
5427 * server.c (process_point_options): Only skip tokens if we find
5428 one that is unrecognized. Don't treat 'X' specially while
5429 skipping unrecognized tokens.
5431 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5433 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5434 to 4-byte-align HW breakpoint addresses for Thumb.
5436 2012-07-27 Yao Qi <yao@codesourcery.com>
5440 * server.h: Declare gdb_agent_about_to_close.
5441 * target.c (kill_inferior): Include "agent.h".
5442 New. Send command 'kill'.
5443 * target.h (kill_inferior): Removed macro.
5444 * tracepoint.c (gdb_agent_about_to_close): New.
5445 (gdb_agent_helper_thread): Handle command 'close'.
5446 Wait endlessly until the inferior stops.
5447 Install gdb_agent_remove_socket to atexit hook.
5448 (agent_socket_name): New static variable.
5449 (gdb_agent_socket_init): Replace local variable 'name' with
5450 'agent_socket_name'.
5451 (gdb_agent_remove_socket): New.
5453 2012-07-27 Yao Qi <yao@codesourcery.com>
5455 * server.c (process_point_options): Stop at 'X' when parsing.
5457 2012-07-19 Michael Eager <eager@eagercon.com>
5459 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5461 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5462 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5463 hardware breakpoint.
5465 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5467 * gdbserver/linux-low.c (initialize_low): Call
5468 linux_ptrace_init_warnings.
5470 2012-07-02 Doug Evans <dje@google.com>
5472 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5475 2012-07-02 Stan Shebs <stan@codesourcery.com>
5477 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5478 (ax.o): Add it to build rule.
5480 (OBS): Add format.o.
5481 (IPA_OBS): Add format.o.
5482 * server.c (handle_query): Claim support for breakpoint commands.
5483 (process_point_options): Add command case.
5484 (process_serial_event): Leave running if there are printfs in
5486 * mem-break.h (any_persistent_commands): Declare.
5487 (add_breakpoint_commands): Declare.
5488 (gdb_no_commands_at_breakpoint): Declare.
5489 (run_breakpoint_commands): Declare.
5490 * mem-break.c (struct point_command_list): New struct.
5491 (struct breakpoint): New field command_list.
5492 (any_persistent_commands): New function.
5493 (add_commands_to_breakpoint): New function.
5494 (add_breakpoint_commands): New function.
5495 (gdb_no_commands_at_breakpoint): New function.
5496 (run_breakpoint_commands): New function.
5497 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5499 * ax.c: Include format.h.
5500 (ax_printf): New function.
5501 (gdb_eval_agent_expr): Add printf opcode.
5503 2012-06-13 Yao Qi <yao@codesourcery.com>
5505 * server.c (start_inferior): Remove duplicated writes to fields
5506 'last_resume_kind' and 'last_status' of 'current_inferior'.
5508 2012-06-12 Yao Qi <yao@codesourcery.com>
5509 Pedro Alves <palves@redhat.com>
5511 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5513 * server.c (handle_v_cont): Extend comment.
5515 2012-06-11 Yao Qi <yao@codesourcery.com>
5517 * linux-low.c (linux_attach): Add 'static'.
5519 2012-06-06 Yao Qi <yao@codesourcery.com>
5521 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5523 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5525 Fix gcc -flto compilation warning.
5526 * server.c (main): Make variable multi_mode and attach volatile.
5528 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5530 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5531 if the platform doesn't know about it.
5533 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5535 * Makefile.in (SFILES): Add linux-tile-low.c.
5536 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5537 * configure.srv: Handle tilegx-*-linux*.
5538 * linux-tile-low.c: New file.
5540 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5542 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5544 2012-05-24 Pedro Alves <palves@redhat.com>
5548 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5550 2012-05-24 Pedro Alves <palves@redhat.com>
5554 Replace target_signal with gdb_signal throughout.
5556 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5558 * linux-low.c (linux_store_registers): Avoid the copying sequence
5559 when no data has been retrieved by ptrace.
5561 2012-05-22 Will Deacon <will.deacon@arm.com>
5563 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5564 Include asm/ptrace.h.
5565 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5568 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5570 * linux-low.c (linux_store_registers): Don't re-retrieve data
5571 with ptrace that has already been obtained from /proc. Always
5572 copy any data retrieved with ptrace to the buffer supplied.
5574 2012-05-11 Yao Qi <yao@codesourcery.com>
5575 Pedro Alves <palves@redhat.com>
5577 * linux-low.c (enum stopping_threads_kind): New.
5578 (stopping_threads): Change type to `enum stopping_threads_kind'.
5579 (handle_extended_wait): If stopping and suspending threads, leave
5580 the new_lwp suspended too.
5581 (linux_wait_for_event): Adjust.
5582 (stop_all_lwps): Set `stopping_threads' to
5583 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5584 whether we're suspending threads or just stopping them. Assert no
5587 2012-04-29 Yao Qi <yao@codesourcery.com>
5589 * server.h: Move some code to ...
5590 * gdbthread.h: ... here. New.
5591 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5592 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5593 (nto-low.o, win32-low.o): Likewise.
5594 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5595 * regcache.c, remote-utils.c, server.c: Likewise.
5596 * target.c, tracepoint.c, win32-low.c: Likewise.
5598 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5600 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5601 (PTRACE_ARG4_TYPE): Likewise.
5602 (PTRACE_XFER_TYPE): Likewise.
5603 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5604 ptrace to PTRACE_ARG3_TYPE.
5605 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5606 (PTRACE_ARG4_TYPE): Likewise.
5607 (PTRACE_XFER_TYPE): Likewise.
5608 (linux_detach_one_lwp): Cast fourth argument of
5609 ptrace to long then PTRACE_ARG4_TYPE.
5610 (regsets_fetch_inferior_registers): Cast third argument of
5611 ptrace to long then PTRACE_ARG3_TYPE.
5612 (regsets_store_inferior_registers): Likewise.
5614 2012-04-20 Pedro Alves <palves@redhat.com>
5616 * configure: Regenerate.
5618 2012-04-19 Pedro Alves <palves@redhat.com>
5620 * Makefile.in (GNULIB_BUILDDIR): New.
5621 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5622 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5623 (all, install-only, uninstall, clean-info, all-lib, clean): No
5624 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5625 (maintainer-clean realclean distclean): Use subdir_do.
5627 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5628 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5629 * acinclude.m4: Include acx_configure_dir.m4.
5630 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5631 calls. Call AC_PROG_RANLIB. Configure gnulib using
5634 (GNULIB_STDINT_H): Adjust.
5635 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5636 * gdbreplay.c: Include build-gnulib/config.h.
5637 * server.h: Likewise.
5638 * aclocal.m4: Regenerate.
5639 * config.in: Regenerate.
5640 * configure: Regenerate.
5642 2012-04-19 Pedro Alves <palves@redhat.com>
5644 * Makefile.in (LIBGNU, INCGNU): Adjust.
5645 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5646 (all, install-only, uninstall, clean-info, all-lib, clean)
5647 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5648 * configure.ac: Adjust AC_OUTPUT output.
5649 * aclocal.m4: Regenerate.
5650 * configure: Regenerate.
5652 2012-04-19 Pedro Alves <palves@redhat.com>
5654 * Makefile.in (generated_files): New.
5655 (server_h): Remove the explicit dependency on config.h, and depend
5656 on $generated_files.
5658 2012-04-19 Pedro Alves <palves@redhat.com>
5660 * Makefile.in (INCGNU): Add -Ignulib.
5662 2012-04-19 Pedro Alves <palves@redhat.com>
5664 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5665 (INCGNU): ... this, and spell out -I here.
5666 (GNULIB_LIB): Rename to ...
5668 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5670 2012-04-19 Pedro Alves <palves@redhat.com>
5672 * config.in: Regenerate.
5674 2012-04-19 Pedro Alves <palves@redhat.com>
5676 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5677 * server.h (memmem): Remove declaration.
5678 * config.in: Regenerate.
5679 * configure: Regenerate.
5681 2012-04-19 Yao Qi <yao@codesourcery.com>
5683 * Makefile.in (SFILES): Add common/vec.c.
5687 2012-04-19 Yao Qi <yao@codesourcery.com>
5689 * remote-utils.c (prepare_resume_reply): Replace with macro
5690 target_core_of_thread.
5691 * server.c (handle_qxfer_threads_proper): Likewise.
5692 * target.h (traget_core_of_thread): New macro.
5694 2012-04-18 Pedro Alves <palves@redhat.com>
5696 * aclocal.m4: Regenerate.
5697 * configure: Regenerate.
5699 2012-04-16 Yao Qi <yao@codesourcery.com>
5701 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5702 duplicated on address.
5704 2012-04-16 Yao Qi <yao@codesourcery.com>
5706 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5707 (struct tracepoint_action_ops) <send>: New field.
5708 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5709 (agent_expr_send, x_tracepoint_action_send): New.
5710 (l_tracepoint_action_send): New.
5711 (cmd_qtdp): Download and install tracepoint
5712 according to `use_agent'.
5713 (run_inferior_command): Add one more parameter `len'.
5715 (tracepoint_send_agent): New.
5716 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5718 2012-04-16 Yao Qi <yao@codesourcery.com>
5720 * tracepoint.c (download_tracepoints): Moved to ...
5721 (cmd_qtstart): ... here.
5723 2012-04-14 Yao Qi <yao@codesourcery.com>
5725 * tracepoint.c: Include inttypes.h.
5726 (struct collect_memory_action): Use sized types.
5727 (struct tracepoint): Likewise.
5728 (cmd_qtdp, stop_tracing): Update print specifiers.
5729 (cmd_qtp, response_tracepoint): Likewise.
5730 (collect_data_at_tracepoint): Likewise.
5731 (collect_data_at_step): Likewise.
5733 2012-04-14 Yao Qi <yao@codesourcery.com>
5735 Import gnulib module inttypes.
5736 * aclocal.m4, config.in, configure: Regenerated.
5738 2012-04-14 Yao Qi <yao@codesourcery.com>
5740 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5741 Makefile and config.status at last.
5743 2012-04-13 Yao Qi <yao@codesourcery.com>
5745 * tracepoint.c: Include stdint.h unconditionally.
5747 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5749 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5750 on BFD_HAVE_SYS_PROCFS_TYPE.
5751 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5752 * configure: Regenerate.
5753 * config.in: Likewise.
5755 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5757 * Makefile.in (clean): Also remove x32.c x32-linux.c
5758 x32-avx.c x32-avx-linux.c.
5759 (x32.o): New target.
5761 (x32-linux.o): Likewise.
5762 (x32-linux.c): Likewise.
5763 (x32-avx.o): Likewise.
5764 (x32-avx.c): Likewise.
5765 (x32-avx-linux.o): Likewise.
5766 (x32-avx-linux.c): Likewise.
5768 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5769 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5770 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5771 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5772 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5773 i386/x32-avx-linux.xml.
5775 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5776 (init_registers_x32_avx_linux): Likwise.
5777 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5778 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5780 2012-04-13 Pedro Alves <palves@redhat.com>
5782 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5783 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5784 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5785 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5788 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5790 * linux-x86-low.c (compat_x32_clock_t): New.
5791 (compat_x32_siginfo_t): Likewise.
5792 (compat_x32_siginfo_from_siginfo): Likewise.
5793 (siginfo_from_compat_x32_siginfo): Likewise.
5794 (linux_is_elf64): Likewise.
5795 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5796 and siginfo_from_compat_x32_siginfo for x32.
5797 (x86_arch_setup): Set linux_is_elf64.
5799 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5802 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5804 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5805 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5806 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5807 compatible with process.
5809 2012-04-12 Yao Qi <yao@codesourcery.com>
5811 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5812 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5813 (install-only, install-info, clean): Handle sub dir gnulib.
5814 (all-lib, am--refresh): New targets.
5815 (memmem.o): Remove target.
5816 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5817 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5818 (AC_REPLACE_FUNCS): Remove memmem.
5819 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5820 (AC_OUTPUT): Generate Makefile in gnulib/.
5821 * aclocal.m4, config.in, configure: Regenerated.
5823 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5825 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5827 2012-04-05 Pedro Alves <palves@redhat.com>
5829 -Werror=strict-aliasing
5831 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5834 2012-04-04 Pedro Alves <palves@redhat.com>
5836 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5837 (sparc_store_gregset_from_stack, sparc_store_gregset)
5838 (sparc_breakpoint_at): Fix formatting.
5840 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5842 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5844 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5845 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5846 * config.in: Regenerate.
5847 * configure: Likewise.
5849 2012-03-29 Pedro Alves <palves@redhat.com>
5851 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5852 Correct ptrace arguments.
5854 2012-03-28 Pedro Alves <palves@redhat.com>
5856 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5857 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5858 (IA64_FR1_REGNUM): New defines.
5859 (ia64_fetch_register): New.
5860 (the_low_target): Install it.
5861 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5863 * linux-low.c (linux_fetch_registers): Try the
5864 the_low_target.fetch_register hook first.
5866 * linux-arm-low.c (the_low_target): Adjust.
5867 * linux-bfin-low.c (the_low_target): Adjust.
5868 * linux-cris-low.c (the_low_target): Adjust.
5869 * linux-crisv32-low.c (the_low_target): Adjust.
5870 * linux-m32r-low.c (the_low_target): Adjust.
5871 * linux-m68k-low.c (the_low_target): Adjust.
5872 * linux-mips-low.c (the_low_target): Adjust.
5873 * linux-ppc-low.c (the_low_target): Adjust.
5874 * linux-s390-low.c (the_low_target): Adjust.
5875 * linux-sh-low.c (the_low_target): Adjust.
5876 * linux-sparc-low.c (the_low_target): Adjust.
5877 * linux-tic6x-low.c (the_low_target): Adjust.
5878 * linux-x86-low.c (the_low_target): Adjust.
5879 * linux-xtensa-low.c (the_low_target): Adjust.
5881 2012-03-26 Pedro Alves <palves@redhat.com>
5883 * server.c (handle_qxfer_libraries): Don't bail early if
5884 the_target->qxfer_libraries_svr4 is not NULL.
5886 2012-03-26 Pedro Alves <palves@redhat.com>
5888 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5890 2012-03-23 Pedro Alves <palves@redhat.com>
5892 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5893 "library-list-svr4" element's start tag when the the DSO list is
5896 2012-03-23 Pedro Alves <palves@redhat.com>
5898 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5899 a variable whose type size is the same as the inferior's pointer
5902 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5904 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5906 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5907 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5908 * linux-low.h: Include <signal.h>.
5909 (struct siginfo): Remove forward declaration.
5910 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5913 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5915 * .gitignore: Ignore more files.
5917 2012-03-19 Pedro Alves <palves@redhat.com>
5918 Jan Kratochvil <jan.kratochvil@redhat.com>
5920 * server.c (cont_thread, general_thread): Add describing comments.
5921 (start_inferior): Clear `cont_thread'.
5922 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5925 2012-03-15 Yao Qi <yao@codesourcery.com>
5927 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5929 (cmd_qtdp): ... here.
5931 2012-03-15 Yao Qi <yao@codesourcery.com>
5933 * tracepoint.c (struct tracepoint_action_ops): New.
5934 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5935 (m_tracepoint_action_download): New.
5936 (r_tracepoint_action_download): New.
5937 (x_tracepoint_action_download): New.
5938 (l_tracepoint_action_download): New.
5939 (add_tracepoint_action): Install `action->ops' according type.
5940 (download_tracepoint_1): Move code `download' function pointer
5941 of various tracepoint_action_ops.
5943 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5945 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5946 linux_ptrace_attach_warnings.
5948 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5950 * Makefile.in (linux-ptrace.o): New.
5951 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5952 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5953 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5954 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5955 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5957 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5959 2012-03-08 Yao Qi <yao@codesourcery.com>
5960 Pedro Alves <palves@redhat.com>
5962 Fix PR server/13392.
5963 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5965 * tracepoint.c (remove_tracepoint): New.
5966 (cmd_qtdp): Call remove_tracepoint when failed to install.
5968 2012-03-07 Pedro Alves <palves@redhat.com>
5970 * linux-low.c (get_detach_signal): New.
5971 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5972 Pass on pending signals to PTRACE_DETACH. Check the result of the
5974 * server.c (program_signals, program_signals_p): New.
5975 (handle_general_set): Handle QProgramSignals.
5976 * server.h (program_signals, program_signals_p): Declare.
5978 2012-03-05 Pedro Alves <palves@redhat.com>
5979 Jan Kratochvil <jan.kratochvil@redhat.com>
5981 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5984 2012-03-03 Yao Qi <yao@codesourcery.com>
5986 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5987 agent_look_up_symbols.
5989 2012-03-03 Yao Qi <yao@codesourcery.com>
5991 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5992 (linux-x86-low.o): Likewise.
5993 * server.h: Remove in_process_agent_loaded.
5994 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5998 2012-03-03 Yao Qi <yao@codesourcery.com>
6000 * tracepoint.c (gdb_agent_capability): New global.
6001 (in_process_agent_loaded_ust): Renamed to
6002 `in_process_agent_supports_ust'.
6004 (in_process_agent_supports_ust): Call agent_capability_check.
6005 (clear_installed_tracepoints): Assert that agent supports
6008 2012-03-03 Yao Qi <yao@codesourcery.com>
6010 * linux-low.c (linux_supports_agent): New.
6011 (linux_target_ops): Initialize field `supports_agent' with
6012 linux_supports_agent.
6013 * target.h (struct target_ops) <supports_agent>: New.
6014 (target_supports_agent): New macro.
6015 * server.c (handle_general_set): Handle packet 'QAgent'.
6016 (handle_query): Send `QAgent+'.
6017 * Makefile.in (server.o): Depends on agent.h.
6019 2012-03-03 Yao Qi <yao@codesourcery.com>
6021 * Makefile.in (OBS): Add agent.o.
6022 Add new rule for agent.o.
6023 Track dependence of tracepoint.c on agent.h.
6024 * tracepoint.c (run_inferior_command_1):
6025 (run_inferior_command): Call agent_run_command.
6026 (gdb_ust_connect_sync_socket): Deleted. Move it to
6028 (resume_thread, stop_thread): Likewise.
6029 (gdb_ust_socket_init): Renamed to ...
6030 (gdb_agent_socket_init): ... New.
6031 (gdb_ust_thread): Renamed to ...
6032 (gdb_agent_helper_thread): ... New.
6033 (gdb_ust_init): Move some code to ...
6034 (gdb_agent_init): ... here. New.
6035 [HAVE_UST]: Call gdb_ust_init.
6036 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6037 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6038 * config.in, configure: Regenerated.
6040 2012-03-02 Pedro Alves <palves@redhat.com>
6042 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6043 * linux-low.c (struct simple_pid_list): New.
6044 (stopped_pids): New a struct simple_pid_list pointer.
6045 (add_to_pid_list, pull_pid_from_list): New.
6046 (handle_extended_wait): Don't assume the first signal new children
6047 report is SIGSTOP. Adjust call to pull_pid_from_list.
6048 (linux_wait_for_lwp): Adjust.
6050 2012-03-02 Yao Qi <yao@codesourcery.com>
6052 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6055 2012-03-02 Yao Qi <yao@codesourcery.com>
6057 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6058 `stop_pc' and `tpoint'. Update caller.
6060 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6062 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6063 * linux-low.c (use_linux_regsets): New macro.
6064 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6065 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6066 (linux_register_in_regsets): New function.
6067 (usr_fetch_inferior_registers): Skip registers covered by
6069 (usr_store_inferior_registers): Likewise.
6070 (usr_fetch_inferior_registers): New macro.
6071 (usr_store_inferior_registers): Likewise.
6072 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6073 (linux_store_registers): Likewise.
6074 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6076 (init_registers_mips64_dsp_linux): Likewise.
6077 (init_registers_mips_linux): New macro.
6078 (init_registers_mips_dsp_linux): Likewise.
6079 (mips_dsp_num_regs): Likewise.
6080 (DSP_BASE, DSP_CONTROL): New fallback macros.
6081 (mips_base_regs): New macro.
6082 (mips_regmap): Use it. Fix the size.
6083 (mips_dsp_regmap): New variable.
6084 (mips_dsp_regset_bitmap): Likewise.
6085 (mips_arch_setup): New function.
6086 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6088 (mips_cannot_store_register): Likewise.
6089 (the_low_target): Update .arch_setup, .num_regs and .regmap
6090 initializers. Add .regset_bitmap initializer.
6091 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6093 * linux-bfin-low.c (the_low_target): Likewise.
6094 * linux-cris-low.c (the_low_target): Likewise.
6095 * linux-crisv32-low.c (the_low_target): Likewise.
6096 * linux-ia64-low.c (the_low_target): Likewise.
6097 * linux-m32r-low.c (the_low_target): Likewise.
6098 * linux-m68k-low.c (the_low_target): Likewise.
6099 * linux-ppc-low.c (the_low_target): Likewise.
6100 * linux-s390-low.c (the_low_target): Likewise.
6101 * linux-sh-low.c (the_low_target): Likewise.
6102 * linux-sparc-low.c (the_low_target): Likewise.
6103 * linux-tic6x-low.c (the_low_target): Likewise.
6104 * linux-x86-low.c (the_low_target): Likewise.
6105 * linux-xtensa-low.c (the_low_target): Likewise.
6106 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6107 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6108 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6110 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6111 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6113 2012-02-29 Yao Qi <yao@codesourcery.com>
6114 Pedro Alves <palves@redhat.com>
6116 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6117 `step_over_finished' is true.
6119 2012-02-27 Pedro Alves <palves@redhat.com>
6121 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6122 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6124 2012-02-27 Pedro Alves <palves@redhat.com>
6127 * linux-low.c (pid_is_stopped): New.
6128 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6130 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6132 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6135 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6137 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6139 2012-02-24 Luis Machado <lgustavo@codesourcery>
6141 * server.c (handle_query): Advertise support for target-side
6142 breakpoint condition evaluation.
6143 (process_point_options): New function.
6144 (process_serial_event): When inserting a breakpoint, check for
6145 a target-side condition that should be evaluated.
6147 * mem-break.c: Include regcache.h and ax.h.
6148 (point_cond_list_t): New data structure.
6149 (breakpoint) <cond_list>: New field.
6150 (find_gdb_breakpoint_at): Make non-static.
6151 (delete_gdb_breakpoint_at): Clear any target-side
6153 (clear_gdb_breakpoint_conditions): New function.
6154 (add_condition_to_breakpoint): Likewise.
6155 (add_breakpoint_condition): Likewise.
6156 (gdb_condition_true_at_breakpoint): Likewise.
6157 (gdb_breakpoint_here): Return result directly instead
6158 of going through a local variable.
6160 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6161 (clear_gdb_breakpoint_conditions): Likewise.
6162 (add_breakpoint_condition): Likewise.
6163 (gdb_condition_true_at_breakpoint): Likewise.
6165 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6166 (need_step_over_p): Take target-side breakpoint condition into
6169 2012-02-24 Luis Machado <lgustavo@codesourcery>
6171 * server.h: Include tracepoint.h.
6172 (agent_mem_read, agent_get_trace_state_variable_value,
6173 agent_set_trace_state_variable_value,
6174 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6175 get_set_tsv_func_addr): New prototypes.
6177 * ax.h: New include file.
6178 * ax.c: New source file.
6180 * tracepoint.c: Include ax.h.
6181 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6182 agent_expr, eval_result_type): Move to ax.h.
6183 (parse_agent_expr): Rename to ...
6184 (gdb_parse_agent_expr): ... this, make it non-static and move
6186 (unparse_agent_expr) Rename to ...
6187 (gdb_unparse_agent_expr): ... this, make it non-static and move
6189 (eval_agent_expr): Rename to ...
6190 (eval_tracepoint_agent_expr): ... this.
6191 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6192 forward declarations.
6193 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6194 (agent_get_trace_state_variable_value): New function.
6195 (agent_set_trace_state_variable_value): New function.
6196 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6197 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6198 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6199 (condition_true_at_tracepoint): Likewise.
6200 (parse_agent_expr): Rename to ...
6201 (gdb_parse_agent_expr): ... this and move to ax.c.
6202 (unparse_agent_expr): Rename to ...
6203 (gdb_unparse_agent_expr): ... this and move to ax.c.
6204 (gdb_agent_op_name): Move to ax.c.
6205 (eval_agent_expr): Rename to ...
6206 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6208 (eval_tracepoint_agent_expr): New function.
6209 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6211 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6213 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6214 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6215 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6216 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6217 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6218 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6219 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6220 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6221 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6222 (compile_bytecodes): Remove forward declaration.
6223 (is_goto_target): Move to ax.c.
6224 (compile_bytecodes): Move to ax.c and call
6225 agent_get_trace_state_variable_value (...) and
6226 agent_set_trace_state_variable_value (...).
6228 * Makefile.in: Update ax.c and IPA dependencies.
6230 2012-02-24 Pedro Alves <palves@redhat.com>
6232 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6233 (cmd_bigqtbuffer_circular): ... this. Only handle
6234 'QTBuffer:circular:'.
6235 (handle_tracepoint_general_set): Adjust.
6237 2012-02-16 Yao Qi <yao@codesourcery.com>
6239 * inferiors.c: Move code to ...
6240 * dll.c: .... here. New.
6241 * server.h: Declare clear_dlls.
6242 * Makefile.in (SFILES): Add dll.c.
6246 2012-02-11 Yao Qi <yao@codesourcery.com>
6248 * server.c: (handle_monitor_command): Add a new parameter
6250 (handle_query): Update caller.
6252 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6254 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6255 * configure, config.in: Regenerate.
6256 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6259 2012-02-02 Pedro Alves <palves@redhat.com>
6261 Try SIGKILL first, then PTRACE_KILL.
6262 * linux-low.c (linux_kill_one_lwp): New.
6263 (linux_kill_one_lwp): Rename to ...
6264 (kill_one_lwp_callback): ... this. Use the new
6267 2012-02-02 Pedro Alves <palves@redhat.com>
6269 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6272 2012-01-27 Pedro Alves <palves@redhat.com>
6274 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6275 (elf_64_file_p): Make static.
6276 (linux_pid_exe_is_elf_64_file): New.
6277 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6278 Delete declarations.
6279 (linux_pid_exe_is_elf_64_file): Declare.
6280 * linux-x86-low.c (x86_arch_setup): Use
6281 linux_pid_exe_is_elf_64_file.
6283 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6285 * linux-low.c (linux_wait_for_event_1): Rename to ...
6286 (linux_wait_for_event): ... here and merge it with former
6287 linux_wait_for_event - new variable wait_ptid, use it.
6288 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6290 2012-01-23 Pedro Alves <palves@redhat.com>
6292 * server.c (main): Avoid yet another case of infinite loop while
6293 detaching/killing after a longjmp.
6295 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6298 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6300 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6302 * hostio.c (handle_readlink): New function.
6303 (handle_vFile): Call it to handle "vFile:readlink" packets.
6305 2012-01-20 Pedro Alves <palves@redhat.com>
6306 Ulrich Weigand <ulrich.weigand@linaro.org>
6308 * server.c (handle_v_requests): Only support vAttach and vRun to
6309 start multiple processes when in extended protocol mode.
6311 2012-01-17 Pedro Alves <palves@redhat.com>
6313 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6314 memalign plus mprotect to allocate the scratch buffer.
6316 2012-01-13 Pedro Alves <palves@redhat.com>
6318 * server.c (attach_inferior): Clear `cont_thread'.
6320 2012-01-13 Pedro Alves <palves@redhat.com>
6322 * server.c (main): Avoid infinite loop while detaching/killing
6325 2012-01-09 Doug Evans <dje@google.com>
6327 * server.c (start_inferior): Set last_ptid in --wrapper case.
6329 2012-01-06 Yao Qi <yao@codesourcery.com>
6331 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6333 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6335 2012-01-04 Yao Qi <yao@codesourcery.com>
6337 * tracepoint.c (cmd_qtdp): Print debug message
6338 for static tracepoint.
6340 2012-01-04 Yao Qi <yao@codesourcery.com>
6342 * tracepoint.c (trace_vdebug): Differentiate debug message
6343 between gdbserver and IPA.
6345 2012-01-03 Yao Qi <yao@codesourcery.com>
6347 * tracepoint.c (tracepoint_was_hit): Don't collect for
6350 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6352 * terminal.h: Reformat copyright header.
6354 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6356 * server.c (gdbserver_version): Update copyright year.
6357 * gdbreplay.c (gdbreplay_version): Likewise.
6359 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6361 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6364 2011-12-18 Hui Zhu <teawater@gmail.com>
6365 * linux-low.c (linux_create_inferior): Save return value to ret.
6367 2011-12-18 Hui Zhu <teawater@gmail.com>
6369 * linux-low.c (linux_create_inferior): Save return value to ret.
6371 2011-12-16 Doug Evans <dje@google.com>
6373 * linux-low.c (linux_create_inferior): If stdio connection,
6374 redirect stdin from /dev/null, stdout to stderr.
6375 * remote-utils.c (remote_is_stdio): New static global.
6376 (remote_connection_is_stdio): New function.
6377 (remote_prepare): Handle stdio connection.
6378 (remote_open): Ditto.
6379 (remote_close): Don't close stdin for stdio connections.
6380 (read_prim,write_prim): New functions. Replace all calls to
6381 read/write to these.
6382 * server.c (main): Watch for "-" argument. Move call to
6383 remote_prepare before start_inferior.
6384 * server.h (STDIO_CONNECTION_NAME): New macro.
6385 (remote_connection_is_stdio): Declare.
6387 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6388 in debugging output.
6390 2011-12-15 Yao Qi <yao@codesourcery.com>
6392 * tracepoint.c: Include sys/syscall.h.
6393 (gdb_ust_thread): Remove preprocessor conditional.
6395 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6397 * linux-low.c (linux_detach_one_lwp): Call
6398 the_low_target.prepare_to_resume before detaching.
6400 2011-12-14 Yao Qi <yao@codesourcery.com>
6402 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6405 2011-12-14 Yao Qi <yao@codesourcery.com>
6407 * i386-low.c (i386_low_stopped_data_address): Initialize local
6410 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6414 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6415 DR_CONTROL unless necessary. Extend comments.
6416 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6417 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6419 2011-12-13 Yao Qi <yao@codesourcery.com>
6421 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6423 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6425 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6427 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6428 Print new debug message for such case.
6430 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6432 Fix overlapping memcpy.
6433 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6434 the read_inferior_memory transfer.
6435 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6436 write_inferior_memory transfer.
6437 (set_fast_tracepoint_jump): New variable buf. Use it for the
6438 read_inferior_memory and write_inferior_memory transfers.
6439 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6440 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6441 Use it for the write_inferior_memory transfer.
6442 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6445 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6447 * linux-low.c (fetch_register, store_register): Make code
6448 consistent, fix formatting.
6450 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6452 * linux-low.c (usr_store_inferior_registers): Factor out code
6453 to handle individual registers into...
6454 (store_register): ... this new function.
6456 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6458 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6459 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6460 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6461 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6462 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6463 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6464 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6465 (srv_xmlfiles): Add new XML files.
6467 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6469 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6470 (init_registers_s390_linux32v1): Add prototype.
6471 (init_registers_s390_linux32v2): Likewise.
6472 (init_registers_s390_linux64v1): Likewise.
6473 (init_registers_s390_linux64v2): Likewise.
6474 (init_registers_s390x_linux64v1): Likewise.
6475 (init_registers_s390x_linux64v2): Likewise.
6476 (s390_num_regs): Increment to 52.
6477 (s390_regmap): Add orig_r2 register.
6478 (s390_num_regs_3264): Increment to 68.
6479 (s390_regmap_3264): Add orig_r2 register.
6480 (s390_collect_ptrace_register): Handle orig_r2 register.
6481 (s390_supply_ptrace_register): Likewise.
6482 (s390_fill_last_break): New function.
6483 (s390_store_last_break): Likewise.
6484 (s390_fill_system_call): New function.
6485 (s390_store_system_call): Likewise.
6486 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6488 (s390_check_regset): New function.
6489 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6490 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6491 Update target_regsets for available register sets.
6493 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6494 Jan Kratochvil <jan.kratochvil@redhat.com>
6496 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6497 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6499 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6500 * linux-low.h (struct process_info_private): New member r_debug.
6501 * server.c (handle_qxfer_libraries): Call
6502 the_target->qxfer_libraries_svr4.
6503 (handle_qxfer_libraries_svr4): New function.
6504 (qxfer_packets): New entry "libraries-svr4".
6505 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6506 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6507 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6508 PACKET_qXfer_libraries_svr4.
6510 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6512 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6513 PSW address/mask between 8-byte and 16-byte formats.
6514 (s390_supply_ptrace_register): Likewise.
6515 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6516 basic addressing mode bit.
6518 2011-11-24 Stan Shebs <stan@codesourcery.com>
6520 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6522 2011-11-17 Stan Shebs <stan@codesourcery.com>
6524 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6525 (tracing_start_time): New global.
6526 (tracing_stop_time): New global.
6527 (tracing_user_name): New global.
6528 (tracing_notes): New global.
6529 (tracing_stop_note): New global.
6530 (cmd_qtstart): Set traceframe_usage, start_time.
6531 (stop_tracing): Set stop_time.
6532 (cmd_qtstatus): Report additional status.
6533 (cmd_qtp): New function.
6534 (handle_tracepoint_query): Call it.
6535 (cmd_qtnotes): New function.
6536 (handle_tracepoint_general_set): Call it.
6537 (get_timestamp): Rename from tsv_get_timestamp.
6539 2011-11-14 Stan Shebs <stan@codesourcery.com>
6540 Kwok Cheung Yeung <kcy@codesourcery.com>
6542 * linux-x86-low.c (small_jump_insn): New.
6543 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6544 trampoline and error message, build a trampoline and issue a small
6545 jump instruction to it.
6546 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6547 trampoline and error message.
6548 (x86_get_min_fast_tracepoint_insn_len): New.
6549 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6550 * linux-low.h (struct linux_target_ops): Add arguments to
6551 install_fast_tracepoint_jump_pad operation, add new operation.
6552 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6554 (linux_get_min_fast_tracepoint_insn_len): New function.
6555 (linux_target_op): Add new operation.
6556 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6557 (gdb_trampoline_buffer_end): Ditto.
6558 (gdb_trampoline_buffer_error): Ditto.
6559 (struct ipa_sym_addresses): Add fields for new IPA variables.
6560 (symbol_list): Add entries for new IPA variables.
6561 (struct tracepoint): Add fields to hold the address range of the
6562 trampoline used by the tracepoint.
6563 (trampoline_buffer_head): New static variable.
6564 (trampoline_buffer_tail): Ditto.
6565 (claim_trampoline_space): New function.
6566 (have_fast_tracepoint_trampoline_buffer): New function.
6567 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6569 (install_fast_tracepoint): Ditto, also add error buffer argument.
6570 (cmd_qtminftpilen): New function.
6571 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6572 (fast_tracepoint_from_trampoline_address): New function.
6573 (fast_tracepoint_collecting): Handle trampoline as part of jump
6575 (set_trampoline_buffer_space): New function.
6576 (initialize_tracepoint): Initialize new IPA variables.
6577 * target.h (struct target_ops): Add arguments to
6578 install_fast_tracepoint_jump_pad operation, add new
6579 get_min_fast_tracepoint_insn_len operation.
6580 (target_get_min_fast_tracepoint_insn_len): New.
6581 (install_fast_tracepoint_jump_pad): Add arguments.
6582 * server.h (IPA_BUFSIZ): Define.
6583 * linux-i386-ipa.c: Include extra header files.
6584 (initialize_fast_tracepoint_trampoline_buffer): New function.
6585 (initialize_low_tracepoint): Call it.
6586 * server.h (set_trampoline_buffer_space): Declare.
6587 (claim_trampoline_space): Ditto.
6588 (have_fast_tracepoint_trampoline_buffer): Ditto.
6590 2011-11-14 Yao Qi <yao@codesourcery.com>
6592 * server.c (handle_query): Handle InstallInTrace for qSupported.
6593 * tracepoint.c (add_tracepoint): Sort list.
6594 (install_tracepoint, download_tracepoint): New.
6595 (cmd_qtdp): Call them to install and download tracepoints.
6596 (sort_tracepoints): Removed.
6597 (cmd_qtstart): Update.
6599 2011-11-14 Yao Qi <yao@codesourcery.com>
6601 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6602 * mem-break.h: Declare.
6603 * tracepoint.c (cmd_qtstart): Move some code to ...
6604 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6606 (download_tracepoints): Move some code to ...
6607 (download_tracepoint_1): ... here. New.
6609 2011-11-08 Yao Qi <yao@codesourcery.com>
6611 * remote-utils.c (relocate_instruction): A comment fix.
6613 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6615 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6616 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6617 dr_status_mirror and dr_control_mirror from debug_reg_state.
6618 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6619 (i386_initial_stuff): Remove use of deleted globals.
6620 (i386_get_thread_context, i386_set_thread_context,
6621 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6622 from debug_reg_state.
6624 2011-11-05 Yao Qi <yao@codesourcery.com>
6626 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6627 address as TPOINT's.
6629 2011-11-02 Stan Shebs <stan@codesourcery.com>
6631 * tracepoint.c (agent_mem_read_string): New function.
6632 (eval_agent_expr): Call it for tracenz.
6633 * server.c (handle_query): Report support for tracenz.
6635 2011-11-02 Yao Qi <yao@codesourcery.com>
6637 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6639 2011-11-02 Yao Qi <yao@codesourcery.com>
6641 * target.h: Fix a typo in comment.
6643 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6645 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6646 clobber the breakpoints' shadows with fast tracepoint jumps.
6647 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6648 * target.c (write_inferior_memory): Also pass MYADDR down to
6651 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6653 * configure.ac: Check support for personality routine.
6654 * configure: Regenerate.
6655 * config.in: Likewise.
6656 * linux-low.c: Include <sys/personality.h>.
6657 Define ADDR_NO_RANDOMIZE if necessary.
6658 (linux_create_inferior): Disable address space randomization when
6659 forking inferior, if requested.
6660 (linux_supports_disable_randomization): New function.
6661 (linux_target_ops): Install it.
6662 * server.h (disable_randomization): Declare.
6663 * server.c (disable_randomization): New global variable.
6664 (handle_general_set): Handle QDisableRandomization.
6665 (handle_query): Likewise for qSupported.
6666 (main): Support --disable-randomization and --no-disable-randomization
6667 command line arguments.
6668 * target.h (struct target_ops): Add supports_disable_randomization.
6669 (target_supports_disable_randomization): New macro.
6671 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6673 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6675 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6676 [!PT_GETDSBT] (target_loadmap): New definition.
6677 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6678 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6679 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6680 and PT_GETDSBT to LINUX_LOADMAP.
6681 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6682 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6684 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6686 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6687 (arm_linux_hwbp_cap): New static variable.
6688 (arm_linux_get_hwbp_cap): Replace by ...
6689 (arm_linux_init_hwbp_cap): ... this new function.
6690 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6691 (arm_linux_get_hw_watchpoint_count): Likewise.
6692 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6693 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6694 (arm_prepare_to_resume): Use perror_with_name instead of error.
6696 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6698 * linux-arm-low.c: Include <signal.h>.
6699 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6700 (struct arm_linux_hwbp_cap): New data type.
6701 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6702 (struct arm_linux_hw_breakpoint): New data type.
6703 (MAX_BPTS, MAX_WPTS): Define.
6704 (struct arch_process_info, struct arch_lwp_info): New data types.
6705 (arm_linux_get_hwbp_cap): New function.
6706 (arm_linux_get_hw_breakpoint_count): Likewise.
6707 (arm_linux_get_hw_watchpoint_count): Likewise.
6708 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6709 (arm_hwbp_control_initialize): Likewise.
6710 (arm_hwbp_control_is_enabled): Likewise.
6711 (arm_hwbp_control_is_initialized): Likewise.
6712 (arm_hwbp_control_disable): Likewise.
6713 (arm_linux_hw_breakpoint_equal): Likewise.
6714 (arm_linux_hw_point_initialize): Likewise.
6715 (struct update_registers_data): New data structure.
6716 (update_registers_callback: New function.
6717 (arm_insert_point): Likewise.
6718 (arm_remove_point): Likewise.
6719 (arm_stopped_by_watchpoint): Likewise.
6720 (arm_stopped_data_address): Likewise.
6721 (arm_new_process): Likewise.
6722 (arm_new_thread): Likewise.
6723 (arm_prepare_to_resume): Likewise.
6724 (the_low_target): Register arm_insert_point, arm_remove_point,
6725 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6726 arm_new_thread, and arm_prepare_to_resume.
6728 2011-09-15 Stan Shebs <stan@codesourcery.com>
6730 * server.h (struct emit_ops): Add compare-goto fields.
6731 * tracepoint.c (gdb_agent_op_sizes): New table.
6732 (emit_eq_goto): New function.
6733 (emit_ne_goto): New function.
6734 (emit_lt_goto): New function.
6735 (emit_le_goto): New function.
6736 (emit_gt_goto): New function.
6737 (emit_ge_goto): New function.
6738 (is_goto_target): New function.
6739 (compile_bytecodes): Recognize special cases of compare-goto
6740 combinations and call specialized emitters for them.
6741 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6742 (amd64_emit_ne_goto): New function.
6743 (amd64_emit_lt_goto): New function.
6744 (amd64_emit_le_goto): New function.
6745 (amd64_emit_gt_goto): New function.
6746 (amd64_emit_ge_goto): New function.
6747 (amd64_emit_ops): Add the new functions.
6748 (i386_emit_eq_goto): New function.
6749 (i386_emit_ne_goto): New function.
6750 (i386_emit_lt_goto): New function.
6751 (i386_emit_le_goto): New function.
6752 (i386_emit_gt_goto): New function.
6753 (i386_emit_ge_goto): New function.
6754 (i386_emit_ops): Add the new functions.
6756 2011-09-08 Stan Shebs <stan@codesourcery.com>
6758 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6759 (i386_emit_epilogue): Restore %ebx.
6761 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6763 * server.c (step_thread): Remove definition.
6764 (process_serial_event): Don't handle Hs.
6765 * server.h (step_thread): Remove declaration.
6766 * target.c (set_desired_inferior): Remove use of step_thread.
6768 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6770 * linux-low.c: Include linux-procfs.h.
6771 (linux_attach_lwp_1): Update comments.
6772 (linux_attach): Scan for existing threads when attaching to a
6773 process that is the tgid.
6774 * Makefile.in: Update dependencies.
6776 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6778 * configure.srv: Add linux-procfs.o dependencies.
6780 2011-08-14 Yao Qi <yao@codesourcery.com>
6782 * target.h (struct target_ops): Fix indent.
6783 * win32-low.c (win32_target_ops): Fix comment.
6785 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6786 Yao Qi <yao@codesourcery.com>
6788 * Makefile.in (clean): Remove tic6x-*.c files.
6789 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6790 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6791 (tic6x-c64xp-linux.c): Likewise.
6792 * configure.srv: Add support for tic6x-*-uclinux.
6793 * linux-tic6x-low.c: New.
6794 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6796 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6797 Yao Qi <yao@codesourcery.com>
6799 * target.h (struct target_ops): Add read_loadmap.
6800 * linux-low.c (struct target_loadseg): New type.
6801 (struct target_loadmap): New type.
6802 (linux_read_loadmap): New function.
6803 (linux_target_ops): Add linux_read_loadmap.
6804 * server.c (handle_query): Support qXfer:fdpic:read packet.
6805 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6808 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6810 * win32-low.c: Include <stdint.h>.
6812 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6814 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6815 to the inferior here.
6816 (i386_remove_aligned_watchpoint): Ditto.
6817 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6818 fit part of the watchpoint in the debug registers.
6819 (i386_update_inferior_debug_regs): New.
6820 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6821 registers, and only update the inferior on success.
6822 (i386_low_remove_watchpoint): Ditto.
6824 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6826 * linux-low.c (compare_ints, unique, list_threads, show_process,
6827 linux_core_of_thread): Delete.
6828 (linux_target_ops): Change linux_core_of_thread to
6829 linux_common_core_of_thread.
6830 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6831 * utils.c (malloc_failure): Change type of argument.
6832 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6833 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6834 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6835 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6836 (IPA_OBJS): Add common-utils-ipa.o.
6837 (ptid_h, linux_osdata_h): New macros.
6838 (server_h): Add common/common-utils.h, common/xml-utils.h,
6839 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6841 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6842 ptid.o, buffer.o): New rules.
6843 (linux-low.o): Add common/linux-osdata.h as a dependency.
6844 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6845 * configure.ac: Add AC_HEADER_DIRENT check.
6846 * config.in: Regenerate.
6847 * configure: Regenerate.
6848 * remote-utils.c (xml_escape_text): Delete.
6849 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6850 buffer_xml_printf): Move to common/buffer.c.
6851 * server.c (main): Remove call to initialize_inferiors.
6852 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6853 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6854 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6855 internal_error, gdb_assert, gdb_assert_fail): Delete.
6856 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6857 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6859 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6860 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6861 initialize_inferiors): Delete.
6863 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6865 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6868 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6870 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6872 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6874 2011-05-26 Yao Qi <yao@codesourcery.com>
6876 * Makefile.in (thread-db.o): Track dependence to
6877 common/gdb_thread_db.h.
6878 * thread-db.c: include gdb_thread_db.h from right place.
6880 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6882 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6883 __FILE__ and __LINE__ to internal_error.
6885 2011-05-13 Doug Evans <dje@google.com>
6887 * thread-db.c (try_thread_db_load_from_sdir): New function.
6888 (try_thread_db_load_from_dir): New function.
6889 (thread_db_load_search): Handle $sdir, ignore $pdir.
6890 Remove trying of system directories if search of
6891 libthread-db-search-path fails, that is now done via $sdir.
6893 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6895 * server.c (handle_query): Add EnableDisableTracepoints to the list
6896 of supported features.
6897 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6899 (cmd_qtenable_disable): New.
6900 (cmd_qtstart): Install tracepoints even if disabled.
6901 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6902 receiving a QTEnable or QTDisable packet.
6903 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6904 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6906 (gdb_probe): Skip data collection if static tracepoint is disabled.
6908 2011-05-10 Doug Evans <dje@google.com>
6910 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6912 2011-05-04 Doug Evans <dje@google.com>
6914 * linux-low.c (linux_join): Skip process lookup.
6915 * spu-low.c (spu_join): Ditto.
6916 * server.c (join_inferiors_callback): Delete.
6917 (process_serial_event): For 'D' packet (detach) call join_inferior
6920 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6922 * README: Don't mention xscale*-*-linux*.
6923 * configure.srv (xscale*-*-linux*): Don't handle target.
6925 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6927 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6929 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6930 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6931 (i386_emit_void_call_2): Likewise.
6933 2011-04-26 Yao Qi <yao@codesourcery.com>
6935 * linux-low.c: Move common macros to linux-ptrace.h.
6936 Include linux-ptrace.h.
6937 * Makefile.in (linux_ptrace_h): New.
6938 (linux-low.o): Depends on linux-ptrace.h.
6940 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6942 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6943 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6944 (remote_prepare): New function with most of the TCP code from ...
6945 (remote_open): ... here. Detect PORT here unconditionally. Move also
6946 setting transport_is_reliable.
6947 * server.c (run_once): New variable.
6948 (gdbserver_usage): Document it.
6949 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6950 the first run if RUN_ONCE.
6951 * server.h (run_once, remote_prepare): New declarations.
6953 2011-04-19 Tom Tromey <tromey@redhat.com>
6955 * win32-low.c (handle_load_dll): Remove duplicate "the".
6957 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6959 Remove support for old Cygwin 1.5 versions.
6960 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6961 function to avoid warning.
6962 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6965 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6967 * gdbserver/server.h (Macro _): Define it if not available.
6969 2011-03-14 Michael Snyder <msnyder@vmware.com>
6971 * hostio.c (handle_close): Remove unnecessary null test.
6973 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6975 * Makefile.in (maintainer-clean realclean distclean): Remove
6976 "make ... subdir_do" command.
6978 2011-03-10 Michael Snyder <msnyder@vmware.com>
6980 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6982 * server.c (handle_v_run): Free alloced buffer on early return.
6984 2011-03-09 Yao Qi <yao@codesourcery.com>
6987 2011-03-04 Yao Qi <yao@codesourcery.com>
6989 * Makefile.in: Remove GNU make feature --directory.
6991 2011-03-05 Yao Qi <yao@codesourcery.com>
6993 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6994 (subdir_do): New make target. Copied from gdb/Makefile.
6995 (maintainer-clean, realclean, distclean, clean): Call corresponding
6996 make targets in common/Makefile.
6998 2011-02-11 Yao Qi <yao@codesourcery.com>
7000 * configure.ac: Call AC_PROG_RANLIB.
7001 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7002 * configure: Regenerate.
7004 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7006 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7008 2011-03-06 Yao Qi <yao@codesourcery.com>
7010 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7012 2011-03-05 Yao Qi <yao@codesourcery.com>
7014 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7015 (subdir_do): New make target. Copied from gdb/Makefile.
7016 (maintainer-clean, realclean, distclean, clean): Call corresponding
7017 make targets in common/Makefile.
7019 2011-03-04 Yao Qi <yao@codesourcery.com>
7021 * Makefile.in: Remove GNU make feature --directory.
7023 2011-03-04 Michael Snyder <msnyder@vmware.com>
7025 * server.c (queue_stop_reply): Call xmalloc not malloc.
7027 2011-03-02 Michael Snyder <msnyder@vmware.com>
7029 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7031 2011-02-28 Michael Snyder <msnyder@vmware.com>
7033 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7034 (cmd_qtframe): Ditto.
7035 (cmd_qtbuffer): Ditto.
7036 (cmd_bigqtbuffer): Ditto.
7038 * utils.c (decimal2str): Initialize 'width' to nine, then
7041 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7043 * hostio.c (require_data): Free *data, not data.
7045 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7047 * hostio.c (require_data): Use free, not xfree.
7049 2011-02-27 Michael Snyder <msnyder@vmware.com>
7051 * server.c (handle_query): Discard unused value.
7053 * hostio.c (require_data): Free malloc memory before returning
7056 2011-02-26 Michael Snyder <msnyder@vmware.com>
7058 * linux-low.c (list_threads): Call closedir for dirent.
7060 2011-02-27 Michael Snyder <msnyder@vmware.com>
7062 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7063 a case statement falls through.
7065 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7067 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7070 2011-02-26 Michael Snyder <msnyder@vmware.com>
7072 * utils.c (decimal2str): Eliminate dead code and dead param.
7073 (pulongest): Drop dead param from call to decimal2str.
7076 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7078 Revert the following patch (not approved yet):
7079 2011-02-21 Hui Zhu <teawater@gmail.com>
7080 * tracepoint.c (tp_printf): New function.
7081 (eval_agent_expr): Handle gdb_agent_op_printf.
7083 2011-02-21 Hui Zhu <teawater@gmail.com>
7085 * tracepoint.c (tp_printf): New function.
7086 (eval_agent_expr): Handle gdb_agent_op_printf.
7088 2011-02-18 Tom Tromey <tromey@redhat.com>
7090 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7091 (tracepoint.o): Likewise.
7092 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7093 (gdb_agent_op_names): Likewise.
7095 2011-02-18 Tom Tromey <tromey@redhat.com>
7097 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7098 gdb_agent_op_rot>: New constants.
7099 (gdb_agent_op_names): Add pick and roll.
7100 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7103 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7105 * aclocal.m4: Regenerated with aclocal-1.11.1.
7107 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7109 * server.c (handle_qxfer_traceframe_info): New.
7110 (qxfer_packets): Register "traceframe-info".
7111 (handle_query): Report support for qXfer:traceframe-info:read+.
7112 * tracepoint.c (match_blocktype): New.
7113 (traceframe_find_block_type): Rename to ...
7114 (traceframe_walk_blocks): ... this. Add callback filter argument,
7116 (traceframe_find_block_type): New, reimplemented on top of
7117 traceframe_walk_blocks.
7118 (build_traceframe_info_xml): New.
7119 (traceframe_read_info): New.
7120 * server.h (traceframe_read_info): Declare.
7122 2011-02-11 Yao Qi <yao@codesourcery.com>
7124 * configure.ac: Call AC_PROG_RANLIB.
7125 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7126 * configure: Regenerate.
7128 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7130 * server.c (gdb_read_memory): Change return semantics to allow
7132 (handle_search_memory_1): Adjust.
7133 (process_serial_event) <'m' packet>: Handle partial transfers.
7134 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7136 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7138 * regcache.c (init_register_cache): Initialize
7139 regcache->register_status.
7140 (free_register_cache): Release regcache->register_status.
7141 (regcache_cpy): Copy register_status.
7142 (registers_to_string): Print 'x's for unavailable registers.
7143 (supply_register): Mark the register's status valid or
7144 unavailable, depending on whether a buffer was passed in or not.
7145 (supply_register_zeroed): New.
7146 (supply_regblock): Mark the registers' status valid or
7147 unavailable, depending on whether a buffer was passed in or not.
7148 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7149 (struct regcache): New `register_status' field.
7150 (supply_register_zeroed): Declare.
7151 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7152 supply_register_zeroed, rather than passing a NULL buffer to
7154 * tracepoint.c (fetch_traceframe_registers): Update comment.
7156 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7158 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7161 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7163 * server.h (decode_xfer_write): Change prototype.
7164 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7165 and don't extract the annex here.
7166 * server.c (decode_xfer_read): Remove `annex' parameter,
7167 and don't extract the annex here.
7169 (struct qxfer): New.
7170 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7171 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7172 (handle_qxfer_statictrace): New functions, abstracted out from
7173 handle_query, and made to use the struct qxfer interface.
7174 (handle_threads_qxfer_proper): Rename to ...
7175 (handle_qxfer_threads_proper): ... this.
7176 (handle_threads_qxfer): Rename to ...
7177 (handle_qxfer_threads): ... this. Adjust.
7178 (qxfer_packets): New array.
7179 (handle_qxfer): New function.
7180 (handle_query): Use handle_qxfer.
7182 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7184 * gdbreplay.c: Shorten lines of >= 80 columns.
7185 * linux-low.c: Ditto.
7186 * linux-ppc-low.c: Ditto.
7187 * linux-s390-low.c: Ditto.
7188 * linux-sparc-low.c: Ditto.
7189 * linux-x86-low.c: Ditto.
7190 * linux-xtensa-low.c: Ditto.
7191 * mem-break.c: Ditto.
7193 * regcache.h: Ditto.
7194 * remote-utils.c: Ditto.
7197 * thread-db.c: Ditto.
7198 * tracepoint.c: Ditto.
7200 * win32-low.h: Ditto.
7202 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7204 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7207 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7209 * server.c (gdbserver_version): Update copyright year in version
7211 * gdbreplay.c (gdbreplay_version): Ditto.
7213 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7215 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7216 * linux-bfin-low.c: New file.
7217 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7218 PT_DATA_ADDR for BFIN targets.
7219 * Makefile.in (SFILES): Add linux-bfin-low.c.
7220 (clean): Remove reg-bfin.c.
7221 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7222 * README: Mention supported Blackfin targets.
7224 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7226 * .gitignore: New file.
7228 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7230 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7232 2010-10-22 Jie Zhang <jie@codesourcery.com>
7234 * Makefile.in: Add FLAGS_TO_PASS variable.
7235 (install): Remove dependency of install-only and recursively
7236 invoke make for install-only.
7238 2010-10-04 Doug Evans <dje@google.com>
7240 * Makefile.in (uninstall): Use $(DESTDIR).
7242 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7246 * linux-x86-low.c (compat_siginfo_from_siginfo)
7247 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7248 si_code is < 0. Check for si_code == SI_TIMER before checking for
7251 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7253 * lynx-i386-low.c: New file.
7254 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7256 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7258 * lynx-low.c (ptrace_request_to_str): Remove handling for
7259 request values that have been removed in LynxOS 5.x.
7261 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7263 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7266 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7268 * configure.ac: Add --enable-inprocess-agent option.
7269 * configure: Rebuilt.
7271 2010-09-06 Yao Qi <yao@codesourcery.com>
7273 * linux-low.c (linux_kill): Remove unused variable.
7274 (linux_stabilize_threads): Likewise.
7275 * server.c (start_inferior): Likewise.
7276 (queue_stop_reply_callback): Likewise.
7277 * tracepoint.c (do_action_at_tracepoint): Likewise.
7279 2010-09-06 Yao Qi <yao@codesourcery.com>
7281 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7284 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7286 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7288 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7290 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7293 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7295 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7296 gdbserver/lynx-ppc-low.c: New files.
7297 * Makefile.in (lynx_low_h): New variable.
7298 (lynx-low.o, lynx-ppc-low.o): New rules.
7299 * configure.ac: On LynxOS, link with -lnetinet.
7300 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7301 * configure: regenerate.
7303 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7305 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7306 * configure.ac: Add check for vasprintf and vsnprintf.
7307 * configure, config.in: Regenerate.
7308 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7310 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7312 * gdbreplay.c: Move include of alloca.h up, next to include of
7314 * server.h: Add include of malloc.h.
7315 * mem-break.c: Remove include of malloc.h.
7316 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7318 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7320 * Makefile.in (memmem.o): Build with -Wno-error.
7322 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7324 * utils.c (xsnprintf): Make non-static.
7325 * server.h: Add xsnprintf declaration.
7326 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7327 replace calls to snprintf by calls to xsnprintf throughout.
7329 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7331 * configure.ac: Add configure check for alloca.
7332 * configure, config.in: Regenerate.
7333 * server.h: Include alloca.h if it exists.
7334 * gdbreplay.c: Include alloca.h if it exists.
7336 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7338 * linux-low.c (__SIGRTMIN): Define if not already defined.
7339 (linux_create_inferior): Check for __ANDROID__ rather than
7341 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7342 are already deferred.
7343 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7344 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7345 stopped and already has a pending signal to report.
7346 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7347 a pending signal to report or is moving out of a jump pad.
7348 (linux_init_signals): Check for __ANDROID__ rather than
7351 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7353 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7354 debug_threads check. Avoid a linear search when not doing debug
7357 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7359 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7360 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7361 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7362 (process_event): Change local fd's type to gdb_fildes_t.
7363 (create_file_handler): Adjust prototype.
7364 (delete_file_handler): Adjust prototype.
7365 (handle_file_event): Adjust prototype. Use pfildes.
7366 (create_file_event): Adjsut prototype.
7367 * remote-utils.c (remote_desc, listen_desc): Change type to
7369 * server.h: New gdb_fildes_t typedef.
7370 [USE_WIN32API]: Include winsock2.h.
7371 (delete_file_handler, add_file_handler): Adjust prototypes.
7373 * utils.c (pfildes): New.
7375 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7377 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7378 * configure: Regenerate.
7380 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7382 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7383 (linux_done_accessing_memory): ... this.
7384 (linux_target_ops): Adjust.
7385 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7386 * nto-low.c (nto_target_ops): Adjust comment.
7387 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7388 * spu-low.c (spu_target_ops): Adjust comment.
7389 * target.h (target_ops): Rename unprepare_to_access_memory field
7390 to done_accessing_memory.
7391 (unprepare_to_access_memory): Rename to ...
7392 (done_accessing_memory): ... this.
7394 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7396 * linux-low.c (linux_prepare_to_access_memory): New.
7397 (linux_unprepare_to_access_memory): New.
7398 (linux_target_ops): Install them.
7399 * server.c (read_memory): Rename to ...
7400 (gdb_read_memory): ... this. Use
7401 prepare_to_access_memory/prepare_to_access_memory.
7402 (write_memory): Rename to ...
7403 (gdb_write_memory): ... this. Use
7404 prepare_to_access_memory/prepare_to_access_memory.
7405 (handle_search_memory_1): Adjust.
7406 (process_serial_event): Adjust.
7407 * target.h (struct target_ops): New fields
7408 prepare_to_access_memory and unprepare_to_access_memory.
7409 (prepare_to_access_memory, unprepare_to_access_memory): New.
7410 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7411 prepare_to_access_memory/prepare_to_access_memory.
7412 * nto-low.c (nto_target_ops): Adjust.
7413 * spu-low.c (spu_target_ops): Adjust.
7414 * win32-low.c (win32_target_ops): Adjust.
7416 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7418 * Makefile.in (WARN_CFLAGS): Get it from configure.
7419 (WERROR_CFLAGS): New.
7420 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7421 * configure.ac: Introduce --enable-werror, which adds -Werror to
7422 the compiler command line. Enabled by default. Disable with
7423 --disable-werror. Add -Wdeclaration-after-statement
7424 Wpointer-arith and -Wformat-nonliteral to warning flags.
7425 * configure: Regenerate.
7427 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7429 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7431 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7433 * gdbreplay.c (remote_error): New.
7435 (expect): Use gdbchar. Check for error reading from GDB.
7436 Clarify sync error output.
7437 (play): Check for errors writing to GDB.
7438 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7439 * remote-utils.c (getpkt): Check for errors writing to the remote
7442 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7444 * linux-low.c (linux_wait_1): Move non-debugging code out of
7445 `debug_threads' control.
7447 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7449 * linux-low.c (linux_wait_1): Don't set last_status here.
7450 * server.c (push_event, queue_stop_reply_callback): Assert we're
7451 not pushing a TARGET_WAITKIND_IGNORE event.
7452 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7453 (myresume, handle_target_event): Set the thread's last_resume_kind
7454 and last_status from the target returned status.
7456 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7460 * linux-x86-low.c (update_debug_registers_callback): New.
7461 (i386_dr_low_set_addr): Use it.
7462 (i386_dr_low_get_addr): New.
7463 (i386_dr_low_set_control): Use update_debug_registers_callback.
7464 (i386_dr_low_get_control): New.
7465 (i386_dr_low_get_status): Adjust.
7466 * linux-low.c (linux_stop_lwp): New.
7467 * linux-low.h (linux_stop_lwp): Declare.
7469 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7470 argument instead of a i386_debug_reg_state.
7471 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7472 a i386_debug_reg_state.
7473 (i386_insert_aligned_watchpoint): Adjust.
7474 (i386_remove_aligned_watchpoint): Adjust.
7475 (i386_low_stopped_data_address): Read the debug registers from the
7476 inferior instead of from the mirrors.
7477 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7478 (i386_dr_low_get_addr): Declare.
7479 (i386_dr_low_get_control): Declare.
7480 (i386_dr_low_get_status): Change prototype.
7482 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7483 (i386_dr_low_get_addr): New.
7484 (i386_dr_low_get_control): New.
7485 (i386_dr_low_get_status): Adjust prototype. Return
7487 (i386_initial_stuff): Clear dr_status_mirror and
7489 (i386_get_thread_context): Adjust.
7490 (i386_set_thread_context): Adjust.
7491 (i386_thread_added): Adjust.
7493 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7495 * linux-low.h (linux_thread_area): Delete declaration.
7497 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7499 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7500 after its termination.
7502 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7504 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7505 (gdb_wants_all_stopped): Delete.
7506 (linux_wait_1): Don't call them.
7507 * server.c (handle_v_cont): Tag all threads as want-stopped.
7508 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7509 stopped as "client-wants-stopped".
7511 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7513 * Makefile.in (signals_h): New.
7514 (server_h): Depend on it.
7515 (server.o): Don't depend on $(signals_def).
7516 (signals.o): Depend on $(signals_def).
7518 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7520 * Makefile.in (signals_def): New.
7521 (server_h): Append include/gdb/signals.h and signals_def.
7522 (server.o): Append signals_def.
7524 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7526 * server.c (handle_target_event): Use target_signal_to_host for
7527 resume_info.sig initialization.
7528 * target.h (struct thread_resume) <sig>: New comment.
7530 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7532 * server.c (handle_query): strcpy() the returned string from paddress()
7533 instead of sprintf().
7534 * utils.c (paddress): Return phex_nz().
7536 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7538 * server.c (handle_v_cont): Call mourn_inferior if process
7540 (myresume): Likewise.
7542 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7544 Static tracepoints, and integration with UST.
7546 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7547 * mem-break.c (uninsert_all_breakpoints)
7548 (reinsert_all_breakpoints): New.
7549 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7550 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7551 (gdb_agent_ust_loaded, helper_thread_id)
7552 (gdb_agent_helper_thread_id): New macros.
7553 (struct ipa_sym_addresses): Add addr_ust_loaded,
7554 addr_helper_thread_id, addr_cmd_buf.
7555 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7556 (in_process_agent_loaded_ust): New.
7557 (write_e_ust_not_loaded): New.
7558 (maybe_write_ipa_ust_not_loaded): New.
7559 (struct collect_static_trace_data_action): New.
7560 (enum tracepoint_type) <static_tracepoint>: New.
7561 (struct tracepoint) <handle>: Mention static tracepoints.
7562 (struct static_tracepoint_ctx): New.
7563 (CMD_BUF_SIZE): New.
7564 (add_tracepoint_action): Handle static tracepoint actions.
7565 (unprobe_marker_at): New.
7566 (clear_installed_tracepoints): Handle static tracepoints.
7567 (cmd_qtdp): Handle static tracepoints.
7568 (probe_marker_at): New.
7569 (cmd_qtstart): Handle static tracepoints.
7570 (response_tracepoint): Handle static tracepoints.
7571 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7572 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7573 (get_context_regcache): Handle static tracepoints.
7574 (do_action_at_tracepoint): Handle static tracepoint actions.
7575 (traceframe_find_block_type): Handle static trace data blocks.
7576 (traceframe_read_sdata): New.
7577 (download_tracepoints): Download static tracepoint actions.
7578 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7579 (GDB_PROBE_NAME): New.
7584 (ust_marker_to_static_tracepoint): New.
7586 (collect_ust_data_at_tracepoint): New.
7587 (gdb_ust_probe): New.
7588 (UNIX_PATH_MAX, SOCK_DIR): New.
7589 (gdb_ust_connect_sync_socket): New.
7590 (resume_thread, stop_thread): New.
7591 (run_inferior_command): New.
7592 (init_named_socket): New.
7593 (gdb_ust_socket_init): New.
7594 (cstr_to_hexstr): New.
7596 (first_marker, next_marker): New.
7597 (response_ust_marker): New.
7598 (cmd_qtfstm, cmd_qtsstm): New.
7599 (unprobe_marker_at, probe_marker_at): New.
7600 (cmd_qtstmat, gdb_ust_thread): New.
7601 (gdb_ust_init): New.
7602 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7603 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7605 (x86_64_st_collect_regmap): New.
7606 (X86_64_NUM_ST_COLLECT_GREGS): New.
7607 (AMD64_RIP_REGNUM): New.
7608 (supply_static_tracepoint_registers): New.
7609 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7611 (i386_st_collect_regmap): New.
7612 (i386_NUM_ST_COLLECT_GREGS): New.
7613 (supply_static_tracepoint_registers): New.
7614 * server.c (handle_query): Handle qXfer:statictrace:read.
7615 <qSupported>: Report support for StaticTracepoints, and
7616 qXfer:statictrace:read features.
7617 * server.h (traceframe_read_sdata)
7618 (supply_static_tracepoint_registers): Declare.
7619 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7620 (unpack_varlen_hex): Include in IPA build.
7621 * Makefile.in (ustlibs, ustinc): New.
7622 (IPA_OBJS): Add remote-utils-ipa.o.
7623 ($(IPA_LIB)): Link -ldl and -lpthread.
7625 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7626 * config.in, configure: Regenerate.
7628 2010-06-20 Ian Lance Taylor <iant@google.com>
7629 Pedro Alves <pedro@codesourcery.com>
7631 * linux-x86-low.c (always_true): Delete.
7632 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7633 trying to fool the compiler with always_true.
7635 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7637 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7638 conditions in gdbserver.
7640 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7642 * spu-low.c (spu_read_memory): Wrap around local store limit.
7643 (spu_write_memory): Likewise.
7645 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7647 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7648 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7650 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7652 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7653 uses with LONGEST uses.
7655 2010-06-14 Stan Shebs <stan@codesourcery.com>
7656 Pedro Alves <pedro@codesourcery.com>
7660 * linux-x86-low.c: Include limits.h.
7665 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7666 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7667 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7668 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7669 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7670 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7671 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7672 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7673 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7674 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7675 (amd64_emit_void_call_2): New.
7676 (amd64_emit_ops): New.
7677 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7678 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7679 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7680 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7681 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7682 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7683 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7684 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7685 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7686 (i386_emit_stack_adjust, i386_emit_int_call_1)
7687 (i386_emit_void_call_2): New.
7688 (i386_emit_ops): New.
7689 (x86_emit_ops): New.
7690 (the_low_target): Install x86_emit_ops.
7691 * server.h (struct emit_ops): New.
7692 (get_raw_reg_func_addr): Declare.
7693 (current_insn_ptr, emit_error): Declare.
7694 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7695 (set_trace_state_variable_value): New defines.
7696 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7697 addr_get_trace_state_variable_value and
7698 addr_set_trace_state_variable_value.
7699 (symbol_list): New fields for get_raw_reg,
7700 get_trace_state_variable_value and set_trace_state_variable_value.
7701 (condfn): New typedef.
7702 (struct tracepoint): New field `compiled_cond'.
7703 (do_action_at_tracepoint): Clear compiled_cond.
7704 (get_trace_state_variable_value, set_trace_state_variable_value):
7706 (condition_true_at_tracepoint): If there's a compiled condition,
7708 (current_insn_ptr, emit_error): New globals.
7709 (struct bytecode_address): New.
7710 (get_raw_reg_func_addr): New.
7711 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7712 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7713 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7714 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7715 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7716 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7717 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7718 (compile_tracepoint_condition, compile_bytecodes): New.
7719 * target.h (emit_ops): Forward declare.
7720 (struct target_ops): New field emit_ops.
7721 (target_emit_ops): New.
7722 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7723 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7724 * linux-low.c (linux_emit_ops): New.
7725 (linux_target_ops): Install it.
7726 * linux-low.h (struct linux_target_ops): New field emit_ops.
7728 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7730 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7731 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7733 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7734 Stan Shebs <stan@codesourcery.com>
7736 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7737 (all): Depend on $(extra_libraries).
7738 (install-only): Install the IPA.
7739 (IPA_OBJS, IPA_LIB): New.
7740 (clean): Remove the IPA lib.
7741 (IPAGENT_CFLAGS): New.
7742 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7743 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7744 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7745 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7746 * configure.ac: Check for atomic builtins support in the compiler.
7747 (IPA_DEPFILES, extra_libraries): Define.
7748 * configure.srv (ipa_obj): Add description.
7749 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7750 (i[34567]86-*-linux*): Set ipa_obj.
7751 (x86_64-*-linux*): Set ipa_obj.
7752 * linux-low.c (stabilizing_threads): New.
7753 (supports_fast_tracepoints): New.
7754 (linux_detach): Stabilize threads before detaching.
7755 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7756 the lwp is either not stabilizing, or is moving out of a jump pad.
7757 (linux_fast_tracepoint_collecting): New.
7758 (maybe_move_out_of_jump_pad): New.
7759 (enqueue_one_deferred_signal): New.
7760 (dequeue_one_deferred_signal): New.
7761 (linux_wait_for_event_1): If moving out of a jump pad, defer
7762 pending signals to later.
7763 (linux_stabilize_threads): New.
7764 (linux_wait_1): Check if threads need moving out of jump pads, and
7766 (stuck_in_jump_pad_callback): New.
7767 (move_out_of_jump_pad_callback): New.
7769 (linux_resume_one_lwp): Handle moving out of jump pads.
7770 (linux_set_resume_request): Dequeue deferred signals.
7771 (need_step_over_p): Also step over fast tracepoint jumps.
7772 (start_step_over): Also uninsert fast tracepoint jumps.
7773 (finish_step_over): Also reinsert fast tracepoint jumps.
7774 (linux_install_fast_tracepoint_jump): New.
7775 (linux_target_ops): Install linux_stabilize_threads and
7776 linux_install_fast_tracepoint_jump_pad.
7777 * linux-low.h (linux_target_ops) <get_thread_area,
7778 install_fast_tracepoint_jump_pad>: New fields.
7779 (struct lwp_info) <collecting_fast_tracepoint,
7780 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7781 (linux_get_thread_area): Declare.
7782 * linux-x86-low.c (jump_insn): New.
7783 (x86_get_thread_area): New.
7784 (append_insns): New.
7786 (amd64_install_fast_tracepoint_jump_pad): New.
7787 (i386_install_fast_tracepoint_jump_pad): New.
7788 (x86_install_fast_tracepoint_jump_pad): New.
7789 (the_low_target): Install x86_get_thread_area and
7790 x86_install_fast_tracepoint_jump_pad.
7791 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7792 (struct fast_tracepoint_jump): New.
7793 (fast_tracepoint_jump_insn): New.
7794 (fast_tracepoint_jump_shadow): New.
7795 (find_fast_tracepoint_jump_at): New.
7796 (fast_tracepoint_jump_here): New.
7797 (delete_fast_tracepoint_jump): New.
7798 (set_fast_tracepoint_jump): New.
7799 (uninsert_fast_tracepoint_jumps_at): New.
7800 (reinsert_fast_tracepoint_jumps_at): New.
7801 (set_breakpoint_at): Use write_inferior_memory.
7802 (uninsert_raw_breakpoint): Use write_inferior_memory.
7803 (check_mem_read): Mask out fast tracepoint jumps.
7804 (check_mem_write): Mask out fast tracepoint jumps.
7805 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7806 (set_fast_tracepoint_jump): Declare.
7807 (delete_fast_tracepoint_jump)
7808 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7809 (reinsert_fast_tracepoint_jumps_at): Declare.
7810 * regcache.c: Don't compile many functions when building the
7811 in-process agent library.
7812 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7813 the register buffer in the heap.
7814 (free_register_cache): If the register buffer isn't owned by the
7815 regcache, don't free it.
7816 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7817 pre-existing register caches.
7818 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7820 (convert_ascii_to_int): : Constify `from' parameter type.
7821 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7822 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7823 the needed buffer in-place.
7824 (relocate_instruction): New.
7825 * server.c (handle_query) <qSymbols>: If the target supports
7826 tracepoints, give it a chance of looking up symbols. Report
7827 support for fast tracepoints.
7828 (handle_status): Stabilize threads.
7829 (process_serial_event): Adjust.
7830 * server.h (struct fast_tracepoint_jump): Forward declare.
7831 (struct process_info) <fast_tracepoint_jumps>: New field.
7832 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7833 (decode_X_packet, decode_M_packet): Adjust.
7834 (relocate_instruction): Declare.
7835 (in_process_agent_loaded): Declare.
7836 (tracepoint_look_up_symbols): Declare.
7837 (struct fast_tpoint_collect_status): Declare.
7838 (fast_tracepoint_collecting): Declare.
7839 (force_unlock_trace_buffer): Declare.
7840 (handle_tracepoint_bkpts): Declare.
7841 (initialize_low_tracepoint)
7842 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7843 * target.h (struct target_ops) <stabilize_threads,
7844 install_fast_tracepoint_jump_pad>: New fields.
7845 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7846 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7847 [HAVE_STDINT_H]: Include stdint.h.
7848 (trace_debug_1): Rename to ...
7849 (trace_vdebug): ... this.
7850 (trace_debug): Rename to ...
7851 (trace_debug_1): ... this. Add `level' parameter.
7853 (ATTR_USED, ATTR_NOINLINE): New.
7854 (IP_AGENT_EXPORT): New.
7855 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7856 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7857 (about_to_request_buffer_space, trace_buffer_is_full)
7858 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7859 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7860 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7861 (traceframe_write_count, traceframes_created)
7862 (trace_state_variables)
7863 New renaming defines.
7864 (struct ipa_sym_addresses): New.
7865 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7867 (ipa_sym_addrs): New.
7868 (all_tracepoint_symbols_looked_up): New.
7869 (in_process_agent_loaded): New.
7870 (write_e_ipa_not_loaded): New.
7871 (maybe_write_ipa_not_loaded): New.
7872 (tracepoint_look_up_symbols): New.
7873 (debug_threads) [IN_PROCESS_AGENT]: New.
7874 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7875 (UNKNOWN_SIDE_EFFECTS): New.
7876 (stop_tracing): New.
7877 (flush_trace_buffer): New.
7878 (stop_tracing_bkpt): New.
7879 (flush_trace_buffer_bkpt): New.
7880 (read_inferior_integer): New.
7881 (read_inferior_uinteger): New.
7882 (read_inferior_data_pointer): New.
7883 (write_inferior_data_pointer): New.
7884 (write_inferior_integer): New.
7885 (write_inferior_uinteger): New.
7886 (struct collect_static_trace_data_action): Delete.
7887 (enum tracepoint_type): New.
7888 (struct tracepoint) <type>: New field `type'.
7889 <actions_str, step_actions, step_actions_str>: Only include in
7891 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7892 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7893 (tracepoints): Use IP_AGENT_EXPORT.
7894 (last_tracepoint): Don't include in the IPA.
7895 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7896 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7897 (alloced_trace_state_variables): New.
7898 (trace_state_variables): Use IP_AGENT_EXPORT.
7899 (traceframe_t): Delete unused variable.
7900 (circular_trace_buffer): Don't include in the IPA.
7901 (trace_buffer_start): Delete.
7902 (struct trace_buffer_control): New.
7903 (trace_buffer_free): Delete.
7904 (struct ipa_trace_buffer_control): New.
7905 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7906 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7908 (trace_buffer_ctrl): New.
7909 (TRACE_BUFFER_CTRL_CURR): New.
7910 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7911 Reimplement as macros.
7912 (trace_buffer_wrap): Delete.
7913 (traceframe_write_count, traceframe_read_count)
7914 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7915 (struct tracepoint_hit_ctx) <type>: New field.
7916 (struct fast_tracepoint_ctx): New.
7917 (memory_barrier): New.
7919 (record_tracepoint_error): Update atomically in the IPA.
7920 (clear_inferior_trace_buffer): New.
7921 (about_to_request_buffer_space): New.
7922 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7923 updating the same buffer.
7924 (add_tracepoint): Default the tracepoint's type to trap
7925 tracepoint, and orig_size to -1.
7926 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7928 (create_trace_state_variable): New parameter `gdb'. Handle it.
7929 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7930 (cmd_qtdp): Handle fast tracepoints.
7932 (max_jump_pad_size): New.
7933 (gdb_jump_pad_head): New.
7934 (get_jump_space_head): New.
7935 (claim_jump_space): New.
7936 (sort_tracepoints): New.
7937 (MAX_JUMP_SIZE): New.
7938 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7940 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7941 support. Upload fast traceframes, and delete internal IPA
7943 (stop_tracing_handler): New.
7944 (flush_trace_buffer_handler): New.
7945 (cmd_qtstop): Upload fast tracepoints.
7946 (response_tracepoint): Handle fast tracepoints.
7947 (tracepoint_finished_step): Upload fast traceframes. Set the
7948 tracepoint hit context's tracepoint type.
7949 (handle_tracepoint_bkpts): New.
7950 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7951 type. Add comment about fast tracepoints.
7952 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7953 non-existing action_str field.
7954 (get_context_regcache): Handle fast tracepoints.
7955 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7957 (fast_tracepoint_from_jump_pad_address): New.
7958 (fast_tracepoint_from_ipa_tpoint_address): New.
7959 (collecting_t): New.
7960 (force_unlock_trace_buffer): New.
7961 (fast_tracepoint_collecting): New.
7964 (write_inferior_data_ptr): New.
7965 (target_tp_heap): New.
7966 (target_malloc): New.
7967 (download_agent_expr): New.
7969 (download_tracepoints): New.
7970 (download_trace_state_variables): New.
7971 (upload_fast_traceframes): New.
7972 (IPA_FIRST_TRACEFRAME): New.
7973 (IPA_NEXT_TRACEFRAME_1): New.
7974 (IPA_NEXT_TRACEFRAME): New.
7975 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7976 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7977 (gdb_jump_pad_buffer_end): New.
7978 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7979 (initialize_tracepoint): Adjust.
7980 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7981 buffer. Initialize the low module.
7982 * utils.c (PREFIX, TOOLNAME): New.
7983 (malloc_failure): Use PREFIX.
7984 (error): In the IPA, an error causes an exit.
7985 (fatal, warning): Use PREFIX.
7986 (internal_error): Use TOOLNAME.
7987 (NUMCELLS): Increase to 10.
7988 * configure, config.in: Regenerate.
7990 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7992 * server.c (handle_query) <qSupported>: Do two passes over the
7993 qSupported string to avoid nesting strtok.
7995 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7997 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7999 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8001 * configure: Regenerate.
8002 * proc-service.list: New.
8004 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8006 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8009 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8011 * gdbreplay.c (remote_open): Check error return from socket() call by
8012 its equality to -1 not by it being negative.
8013 * remote-utils.c (remote_open): Likewise.
8015 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8017 * config.h: Regenerate.
8019 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8021 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8022 doesn't provide PTRACE_GET_THREAD_AREA.
8024 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8026 * linux-m68k-low.c: Include <asm/ptrace.h>
8027 (ps_get_thread_area): Implement.
8029 2010-05-03 Doug Evans <dje@google.com>
8031 * event-loop.c (struct callback_event): New struct.
8032 (callback_list): New global.
8033 (append_callback_event, delete_callback_event): New functions.
8034 (process_callback): New function.
8035 (start_event_loop): Call it.
8036 * remote-utils.c (NOT_SCHEDULED): Define.
8037 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8038 moved out of readchar.
8039 (readchar): Rewrite. Call reschedule before returning.
8040 (reset_readchar): New function.
8041 (remote_close): Call it.
8042 (process_remaining, reschedule): New functions.
8043 * server.h (callback_handler_func): New typedef.
8044 (append_callback_event, delete_callback_event): Declare.
8046 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8048 * proc-service.c (ps_pglobal_lookup): Use
8049 thread_db_look_up_one_symbol.
8050 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8051 parameter. Use it instead of all_symbols_looked_up.
8052 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8054 (all_symbols_looked_up): Don't declare.
8055 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8056 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8058 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8059 Set all_symbols_looked_up here.
8060 (thread_db_look_up_one_symbol): New.
8061 (thread_db_get_tls_address): Adjust.
8062 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8063 thread_db object on the heap, and tentatively set it in the
8065 (thread_db_init): Don't set all_symbols_looked_up here.
8066 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8068 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8070 * linux-low.c (linux_kill, linux_detach): Adjust.
8071 (status_pending_p_callback): Remove redundant statement. Check
8072 for !TARGET_WAITIKIND_IGNORE, instead of
8073 TARGET_WAITKIND_STOPPED.
8074 (handle_tracepoints): Make sure LWP is locked. Adjust.
8075 (linux_wait_for_event_1): Adjust.
8076 (linux_cancel_breakpoints): New.
8077 (unsuspend_one_lwp): New.
8078 (unsuspend_all_lwps): New.
8079 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8080 (send_sigstop_callback): Change return type to int, add new
8081 `except' parameter and handle it.
8082 (suspend_and_send_sigstop_callback): New.
8083 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8084 pass them down. If SUSPEND, also increment the lwp's suspend
8086 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8087 (need_step_over_p): Don't consider suspended LWPs.
8088 (start_step_over): Adjust.
8089 (proceed_one_lwp): Change return type to int, add new `except'
8090 parameter and handle it.
8091 (unsuspend_and_proceed_one_lwp): New.
8092 (proceed_all_lwps): Use find_inferior instead of
8094 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8095 also decrement the suspend count of LWPs. Pass `except' down,
8096 instead of hacking its suspend count.
8097 (linux_pause_all): Add `freeze' parameter. Adjust.
8098 (linux_unpause_all): New.
8099 (linux_target_ops): Install linux_unpause_all.
8100 * server.c (handle_status): Adjust.
8101 * target.h (struct target_ops): New fields `unpause_all' and
8102 `cancel_breakpoints'. Add new parameter to `pause_all'.
8103 (pause_all): Add new `freeze' parameter.
8105 (cancel_breakpoints): New.
8106 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8108 (cmd_qtstart): Pause threads.
8109 (stop_tracing): Pause threads, and cancel breakpoints.
8110 * win32-low.c (win32_target_ops): Adjust.
8112 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8114 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8115 the inferior right away from here...
8116 (linux_wait_1): ... to here, and adjust to check the thread's
8117 last_resume_kind instead of the lwp's step or stop_expected flags.
8119 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8121 * README: Use consistent `GDB' and `GDBserver' spellings.
8123 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8125 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8126 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8127 (linux_detach_one_lwp): Assume the lwp is stopped.
8128 (any_thread_of): Delete.
8129 (linux_detach): Stop all lwps here. Don't blindly delete all
8131 (delete_lwp_callback): New.
8132 (linux_mourn): Delete all lwps of the process that is gone.
8133 (linux_wait_1): Don't delete the last lwp of the process here.
8134 * mem-break.h (mark_breakpoints_out): Declare.
8135 * mem-break.c (mark_breakpoints_out): New.
8136 (free_all_breakpoints): Use it.
8137 * server.c (handle_target_event): If the process is gone, mark
8139 * thread-db.c (struct thread_db) <create_bp>: New field.
8140 (thread_db_enable_reporting): Fix prototype. Store a thread event
8141 breakpoint reference in the thread_db struct.
8142 (thread_db_load_search): Clear the thread_db object.
8143 (try_thread_db_load_1): Ditto.
8144 (switch_to_process): New.
8145 (disable_thread_event_reporting): Use it.
8146 (remove_thread_event_breakpoints): New.
8147 (thread_db_detach, thread_db_mourn): Use it.
8149 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8151 * linux-low.c (linux_enable_event_reporting): New.
8152 (linux_wait_for_event_1, handle_extended_wait): Use it.
8154 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8156 * linux-low.c (linux_kill_one_lwp, linux_kill)
8157 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8158 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8159 SIGSTOP even if the LWP is stopped.
8160 (send_sigstop_callback): New.
8161 (stop_all_lwps): Use send_sigstop_callback instead.
8162 (linux_resume_one_thread): Adjust.
8163 (proceed_one_lwp): Still proceed an LWP that the client has
8164 requested to stop, if we haven't reported it as stopped yet. Make
8165 sure that LWPs the client want stopped, have a pending SIGSTOP.
8167 2010-04-26 Doug Evans <dje@google.com>
8169 * server.c (handle_general_set): Make static.
8171 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8172 Print received char after testing for error/eof instead of before.
8173 (input_interrupt): Tweak comment.
8175 2010-04-23 Doug Evans <dje@google.com>
8177 * server.c (start_inferior): Print inferior argv if --debug.
8179 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8181 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8182 * nto-x86-low.c: Include server.h
8184 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8186 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8187 be consistent with other sources of this directory.
8188 (init_registers_amd64): Correct name of source file of this function
8191 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8193 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8196 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8198 * win32-i386-low.c: Add 64-bit support.
8199 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8200 (init_registers_amd64): Declare.
8201 (mappings): Add 64-bit version of array.
8202 (init_windows_x86): New function.
8203 (the_low_target): Change init_arch field to init_windows_x86.
8205 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8207 * win32-low.c: Adapt to support also 64-bit architecture.
8208 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8209 (get_image_name): Use SIZE_T type for local variable `done'.
8210 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8211 (toolhelp_get_dll_name): Idem.
8212 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8213 Use uintptr_t typecast to avoid warning.
8214 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8215 (handle_exception): Use phex_nz to avoid warning.
8216 (win32_wait): Remove unused local variable `process'.
8218 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8220 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8223 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8225 * configure.ac: Use `ws2_32' library for srv_mingw.
8226 * configure: Regenerate.
8227 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8228 * remote-utils.c: Likewise.
8230 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8232 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8233 if __x86_64__ is defined.
8235 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8237 * configure: Regenerate.
8239 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8241 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8242 * target.h (target_ops): New get_tib_address field.
8243 * win32-low.h (win32_thread_info): Add thread_local_base field.
8244 * win32-low.c (child_add_thread): Add tlb argument.
8245 Set thread_local_base field to TLB.
8246 (get_child_debug_event): Adapt to child_add_thread change.
8247 (win32_get_tib_address): New function.
8248 (win32_target_ops): Set get_tib_address field to
8249 win32_get_tib_address.
8250 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8252 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8254 * linux-low.c (linux_mourn): Also remove the process.
8255 * server.c (handle_target_event): Don't remove the process here.
8256 * nto-low.c (nto_mourn): New.
8257 (nto_target_ops): Install it.
8258 * spu-low.c (spu_mourn): New.
8259 (spu_target_ops): Install it.
8260 * win32-low.c (win32_mourn): New.
8261 (win32_target_ops): Install it.
8263 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8265 * server.h (buffer_xml_printf): Remove redundant `;'.
8267 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8269 * regcache.c (set_register_cache): Invalidate regcaches before
8270 changing the register cache layout.
8271 (regcache_invalidate_one): Allow a NULL regcache.
8272 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8273 regcaches before changing the register cache layout or the target
8276 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8278 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8279 variable warning on Linux/x86-64.
8281 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8283 GDBserver disconnected tracing support.
8285 * linux-low.c (linux_remove_process): Delete.
8286 (add_lwp): Don't set last_resume_kind here.
8287 (linux_kill): Use `mourn'.
8288 (linux_detach): Use `thread_db_detach', and `mourn'.
8290 (linux_attach_lwp_1): Adjust comment.
8291 (linux_attach): last_resume_kind moved the thread_info; adjust.
8292 (status_pending_p_callback): Adjust.
8293 (linux_wait_for_event_1): Adjust.
8294 (count_events_callback, select_singlestep_lwp_callback)
8295 (select_event_lwp_callback, cancel_breakpoints_callback)
8296 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8297 (proceed_one_lwp): Adjust.
8298 (linux_async): Add debug output.
8299 (linux_thread_stopped): New.
8300 (linux_pause_all): New.
8301 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8303 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8304 (thread_db_free): Delete declaration.
8305 (thread_db_detach, thread_db_mourn): Declare.
8306 * thread-db.c (thread_db_init): Use thread_db_mourn.
8307 (thread_db_free): Delete, split in two.
8308 (disable_thread_event_reporting): New.
8309 (thread_db_detach): New.
8310 (thread_db_mourn): New.
8312 * server.h (struct thread_info) <last_resume_kind>: New field.
8313 <attached>: Add comment.
8314 <gdb_detached>: New field.
8315 (handler_func): Change return type to int.
8316 (handle_serial_event, handle_target_event): Ditto.
8317 (gdb_connected): Declare.
8319 (disconnected_tracing): Declare.
8320 (stop_tracing): Declare.
8322 * server.c (handle_query) <qSupported>: Report support for
8323 disconnected tracing.
8324 (queue_stop_reply_callback): Account for running threads.
8325 (gdb_wants_thread_stopped): New.
8326 (gdb_wants_all_threads_stopped): New.
8327 (gdb_reattached_process): New.
8328 (handle_status): Clear the `gdb_detached' flag of all processes.
8329 In all-stop, stop all threads.
8330 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8331 (process_serial_event): If the remote connection breaks, or if an
8332 exit was forced with "monitor exit", force an event loop exit.
8333 Handle disconnected tracing on detach.
8334 (handle_serial_event): Adjust.
8335 (handle_target_event): If GDB isn't connected, forward events back
8336 to the inferior, unless the last process exited, in which case,
8337 exit gdbserver. Adjust interface.
8339 * remote-utils.c (remote_open): Don't block in accept. Instead
8340 register an event loop source on the listen socket file
8341 descriptor. Refactor bits into ...
8342 (listen_desc): ... this new global.
8343 (gdb_connected): ... this new function.
8344 (enable_async_notification): ... this new function.
8345 (handle_accept_event): ... this new function.
8346 (remote_close): Clear remote_desc.
8348 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8350 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8352 (mourn_inferior): Define.
8353 (target_process_qsupported): Avoid the dangling else problem.
8354 (thread_stopped): Define.
8355 (pause_all): Define.
8356 (target_waitstatus_to_string): Declare.
8357 * target.c (target_waitstatus_to_string): New.
8359 * tracepoint.c (tracing): Make extern.
8360 (disconnected_tracing): New.
8361 (stop_tracing): Make extern. Handle tracing stops due to GDB
8363 (cmd_qtdisconnected): New.
8364 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8365 (handle_tracepoint_general_set): Handle QTDisconnected.
8367 * event-loop.c (event_handler_func): Change return type to int.
8368 (process_event): Bail out if the event handler wants the event
8370 (handle_file_event): Ditto.
8371 (start_event_loop): Bail out if the event handler wants the event
8374 * nto-low.c (nto_target_ops): Adjust.
8375 * spu-low.c (spu_wait): Don't remove the process here.
8376 (spu_target_ops): Adjust.
8377 * win32-low.c (win32_wait): Don't remove the process here.
8378 (win32_target_ops): Adjust.
8380 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8382 * regcache.c (realloc_register_cache): Invalidate inferior's
8383 regcache before recreating it.
8385 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8387 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8389 2010-04-09 Stan Shebs <stan@codesourcery.com>
8390 Pedro Alves <pedro@codesourcery.com>
8392 * server.h (LONGEST): New.
8393 (struct thread_info) <while_stepping>: New field.
8394 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8396 (initialize_tracepoint, handle_tracepoint_general_set)
8397 (handle_tracepoint_query, tracepoint_finished_step)
8398 (tracepoint_was_hit, release_while_stepping_state_list):
8399 (current_traceframe): Declare.
8400 * server.c (handle_general_set): Handle tracepoint packets.
8402 (write_memory): New.
8403 (handle_search_memory_1): Use read_memory.
8404 (handle_query): Report support for conditional tracepoints, trace
8405 state variables, and tracepoint sources. Handle tracepoint
8407 (main): Initialize the tracepoints module.
8408 (process_serial_event): Handle traceframe reads/writes.
8410 * linux-low.c (handle_tracepoints): New.
8411 (linux_wait_1): Call it.
8412 (linux_resume_one_lwp): Handle while-stepping.
8413 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8414 (linux_target_ops): Install them.
8415 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8417 * linux-x86-low.c (x86_supports_tracepoints): New.
8418 (the_low_target). Install it.
8420 * mem-break.h (delete_breakpoint): Declare.
8421 * mem-break.c (delete_breakpoint): Make external.
8423 * target.h (struct target_ops): Add `supports_tracepoints',
8424 `read_pc', and `write_pc' fields.
8425 (target_supports_tracepoints): Define.
8426 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8429 * regcache.h (struct regcache) <registers_owned>: New field.
8430 (init_register_cache, regcache_cpy): Declare.
8431 (regcache_read_pc, regcache_write_pc): Declare.
8432 (register_cache_size): Declare.
8433 (supply_regblock): Declare.
8434 * regcache.c (init_register_cache): New.
8435 (new_register_cache): Use it.
8436 (regcache_cpy): New.
8437 (register_cache_size): New.
8438 (supply_regblock): New.
8439 (regcache_read_pc, regcache_write_pc): New.
8441 * tracepoint.c: New.
8443 * Makefile.in (OBS): Add tracepoint.o.
8444 (tracepoint.o): New rule.
8446 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8448 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8450 (i386-mmx.c): Likewise.
8451 (i386-mmx-linux.o): Likewise.
8452 (i386-mmx-linux.c): Likewise.
8454 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8455 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8456 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8457 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8459 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8460 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8461 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8463 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8465 * Makefile.in (clean): Updated.
8467 (i386-avx.c): Likewise.
8468 (i386-avx-linux.o): Likewise.
8469 (i386-avx-linux.c): Likewise.
8470 (amd64-avx.o): Likewise.
8471 (amd64-avx.c): Likewise.
8472 (amd64-avx-linux.o): Likewise.
8473 (amd64-avx-linux.c): Likewise.
8475 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8476 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8477 (srv_amd64_regobj): Add amd64-avx.o.
8478 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8479 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8480 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8481 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8482 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8483 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8484 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8486 * i387-fp.c: Include "i386-xstate.h".
8488 (i387_cache_to_xsave): Likewise.
8489 (i387_xsave_to_cache): Likewise.
8490 (x86_xcr0): Likewise.
8492 * i387-fp.h (i387_cache_to_xsave): Likewise.
8493 (i387_xsave_to_cache): Likewise.
8494 (x86_xcr0): Likewise.
8496 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8497 * linux-crisv32-low.c (target_regsets): Likewise.
8498 * linux-m68k-low.c (target_regsets): Likewise.
8499 * linux-mips-low.c (target_regsets): Likewise.
8500 * linux-ppc-low.c (target_regsets): Likewise.
8501 * linux-s390-low.c (target_regsets): Likewise.
8502 * linux-sh-low.c (target_regsets): Likewise.
8503 * linux-sparc-low.c (target_regsets): Likewise.
8504 * linux-xtensa-low.c (target_regsets): Likewise.
8506 * linux-low.c: Include <sys/uio.h>.
8507 (regsets_fetch_inferior_registers): Support nt_type.
8508 (regsets_store_inferior_registers): Likewise.
8509 (linux_process_qsupported): New.
8510 (linux_target_ops): Add linux_process_qsupported.
8512 * linux-low.h (regset_info): Add nt_type.
8513 (linux_target_ops): Add process_qsupported.
8515 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8517 (init_registers_i386_avx_linux): New.
8518 (init_registers_amd64_avx_linux): Likewise.
8519 (xmltarget_i386_linux_no_xml): Likewise.
8520 (xmltarget_amd64_linux_no_xml): Likewise.
8521 (PTRACE_GETREGSET): Likewise.
8522 (PTRACE_SETREGSET): Likewise.
8523 (x86_fill_xstateregset): Likewise.
8524 (x86_store_xstateregset): Likewise.
8525 (use_xml): Likewise.
8526 (x86_linux_update_xmltarget): Likewise.
8527 (x86_linux_process_qsupported): Likewise.
8528 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8529 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8530 init_registers_i386_linux here. Call
8531 x86_linux_update_xmltarget.
8532 (the_low_target): Add x86_linux_process_qsupported.
8534 * server.c (handle_query): Call target_process_qsupported.
8536 * target.h (target_ops): Add process_qsupported.
8537 (target_process_qsupported): New.
8539 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8541 * inferiors.c (add_thread): Set last_status kind to
8542 TARGET_WAITKIND_IGNORE.
8543 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8544 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8545 (linux_wait_1): Move `thread' local definition to block that uses
8546 it. Don't NULL initialize `event_child'.
8547 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8548 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8549 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8551 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8553 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8554 an extended waitstatus, or by a watchpoint.
8555 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8556 thread was stepping or has been stopped by a watchpoint.
8558 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8560 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8561 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8562 of another, then delete the previous, and validate all
8564 (validate_inserted_breakpoint): New.
8565 (delete_disabled_breakpoints): New.
8566 (validate_breakpoints): New.
8567 (check_mem_read): Validate breakpoints before trusting their
8568 shadow. Delete disabled breakpoints.
8569 (check_mem_write): Validate breakpoints before trusting they
8570 should be inserted. Delete disabled breakpoints.
8571 * mem-break.h (validate_breakpoints):
8572 * server.c (handle_query): Validate breakpoints when we see a
8575 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8577 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8578 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8579 if we could tell there's a GDB breakpoint at stop_pc.
8580 (need_step_over_p): Don't do a step over if we find a GDB
8581 breakpoint at the resume PC.
8583 * mem-break.c (struct raw_breakpoint): New.
8584 (enum bkpt_type): New type `gdb_breakpoint'.
8585 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8586 fields. New field `raw'.
8587 (find_raw_breakpoint_at): New.
8588 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8590 (set_breakpoint_at): Adjust.
8591 (delete_raw_breakpoint): New.
8592 (release_breakpoint): New.
8593 (delete_breakpoint): Rename to...
8594 (delete_breakpoint_1): ... this. Add proc parameter. Use
8595 release_breakpoint. Return ENOENT.
8596 (delete_breakpoint): Reimplement.
8597 (find_breakpoint_at): Delete.
8598 (find_gdb_breakpoint_at): New.
8599 (delete_breakpoint_at): Delete.
8600 (set_gdb_breakpoint_at): New.
8601 (delete_gdb_breakpoint_at): New.
8602 (gdb_breakpoint_here): New.
8603 (set_reinsert_breakpoint): Use release_breakpoint.
8604 (uninsert_breakpoint): Rename to ...
8605 (uninsert_raw_breakpoint): ... this.
8606 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8607 (reinsert_raw_breakpoint): Change parameter type to
8609 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8611 (check_breakpoints): Adjust. Use release_breakpoint.
8612 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8613 (breakpoint_inserted_here): Ditto.
8614 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8615 Don't trust the breakpoint's shadow if it is not inserted.
8616 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8617 (delete_all_breakpoints): Adjust.
8618 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8619 use delete_breakpoint_1.
8621 * mem-break.h (breakpoints_supported): Delete declaration.
8622 (set_gdb_breakpoint_at): Declare.
8623 (gdb_breakpoint_here): Declare.
8624 (delete_breakpoint_at): Delete.
8625 (delete_gdb_breakpoint_at): Declare.
8627 * server.h (struct raw_breakpoint): Forward declare.
8628 (struct process_info): New field `raw_breakpoints'.
8630 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8633 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8635 * linux-low.c (status_pending_p_callback): Fix comment.
8636 (linux_wait_for_event_1): Move most of the internal breakpoint
8637 handling from here...
8638 (linux_wait_1): ... to here.
8639 (count_events_callback): New.
8640 (select_singlestep_lwp_callback): New.
8641 (select_event_lwp_callback): New.
8642 (cancel_breakpoints_callback): New.
8643 (select_event_lwp): New.
8644 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8645 priority to all LWPs that have had events that should be reported
8646 to the client. Cancel breakpoints when about to reporting the
8647 event to the client, not while stopping lwps. No longer cancel
8648 finished single-steps here.
8649 (cancel_finished_single_step): Delete.
8650 (cancel_finished_single_steps): Delete.
8652 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8654 * mem-break.c (enum bkpt_type): New.
8655 (struct breakpoint): New field `type'.
8656 (set_breakpoint_at): Change return type to struct breakpoint
8657 pointer. Set type to `other_breakpoint' by default.
8658 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8659 in the breakpoint list.
8660 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8661 (reinsert_breakpoint): Rename to ...
8662 (reinsert_raw_breakpoint): ... this.
8663 (reinsert_breakpoints_at): Adjust.
8664 * mem-break.h (struct breakpoint): Declare.
8665 (set_breakpoint_at): Change return type to struct breakpoint
8668 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8670 * server.c (handle_query): Assign, not compare.
8672 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8674 Teach linux gdbserver to step-over-breakpoints.
8676 * linux-low.c (can_hardware_single_step): New.
8677 (supports_breakpoints): New.
8678 (handle_extended_wait): If stopping threads, read the stop pc of
8681 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8682 low target doesn't support retrieving the PC.
8683 (add_lwp): Set last_resume_kind to resume_continue.
8684 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8685 (linux_attach): Don't clear stop_expected. Set the lwp's
8686 last_resume_kind to resume_stop.
8687 (linux_detach_one_lwp): Don't check for removed breakpoints.
8688 (check_removed_breakpoint): Delete.
8689 (status_pending_p): Rename to ...
8690 (status_pending_p_callback): ... this. Don't check for removed
8691 breakpoints. Don't consider threads that are stopped from GDB's
8693 (linux_wait_for_lwp): Always read the stop_pc here.
8694 (cancel_breakpoint): New.
8695 (step_over_bkpt): New global.
8696 (linux_wait_for_event_1): Implement stepping over breakpoints.
8697 (gdb_wants_lwp_stopped): New.
8698 (gdb_wants_all_stopped): New.
8699 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8700 single-step traps here. Store the thread's last reported target
8702 (send_sigstop): Don't clear stop_expected. Always set it,
8704 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8705 (cancel_finished_single_step): New.
8706 (cancel_finished_single_steps): New.
8707 (wait_for_sigstop): Don't cancel finished single-step traps here.
8708 (linux_resume_one_lwp): Don't check for removed breakpoints.
8709 Don't set `step' on non-hardware step archs.
8710 (linux_set_resume_request): Ignore resume_stop requests if already
8711 stopping or stopped. Set the lwp's last_resume_kind.
8712 (resume_status_pending_p): Don't check for removed breakpoints.
8713 (need_step_over_p): New.
8714 (start_step_over): New.
8715 (finish_step_over): New.
8716 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8717 requests. Clear the thread's last reported target waitstatus.
8718 Don't use the `suspended' flag. Don't consider pending breakpoints.
8719 (linux_resume): Start a step-over if necessary.
8720 (proceed_one_lwp): New.
8721 (proceed_all_lwps): New.
8722 (unstop_all_lwps): New.
8723 * linux-low.h (struct lwp_info): Rewrite comment for the
8724 `suspended' flag. Add the `stop_pc' field. Delete the
8725 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8726 Add `'last_resume_kind' and `need_step_over' fields.
8727 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8728 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8729 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8730 (set_raw_breakpoint_at): New.
8731 (set_breakpoint_at): Rewrite to use it.
8732 (reinsert_breakpoint_handler): Delete.
8733 (set_reinsert_breakpoint): New.
8734 (reinsert_breakpoint_by_bp): Delete.
8735 (delete_reinsert_breakpoints): New.
8736 (uninsert_breakpoint): Rewrite.
8737 (uninsert_breakpoints_at): New.
8738 (reinsert_breakpoint): Rewrite.
8739 (reinsert_breakpoints_at): New.
8740 (check_breakpoints): Rewrite.
8741 (breakpoint_here): New.
8742 (breakpoint_inserted_here): New.
8743 (check_mem_read): Adjust.
8744 * mem-break.h (breakpoints_supported, breakpoint_here)
8745 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8746 (reinsert_breakpoint_by_bp): Delete declaration.
8747 (delete_reinsert_breakpoints): Declare.
8748 (reinsert_breakpoint): Delete declaration.
8749 (reinsert_breakpoints_at): Declare.
8750 (uninsert_breakpoint): Delete declaration.
8751 (uninsert_breakpoints_at): Declare.
8752 (check_breakpoints): Adjust prototype.
8753 * server.h: Adjust include order.
8754 (struct thread_info): Declare here. Add a `last_status' field.
8756 2010-03-23 Michael Snyder <msnyder@vmware.com>
8758 * server.c (crc32): New function.
8759 (handle_query): Add handling for 'qCRC:' request.
8761 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8763 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8764 lwp had been stopped by a watchpoint.
8766 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8768 * server.h (internal_error): Declare.
8769 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8770 * utils.c (internal_error): New function.
8772 2010-03-15 Andreas Schwab <schwab@redhat.com>
8774 * configure.srv: Fix typo setting srv_regobj.
8776 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8778 * linux-low.c (fetch_register): Avoid passing a non string literal
8780 (usr_store_inferior_registers): Ditto.
8782 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8784 * linux-low.c (linux_write_memory): Bail out early if peeking
8787 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8789 * linux-low.h (struct lwp_info): New fields
8790 `stopped_by_watchpoint' and `stopped_data_address'.
8791 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8792 here, and cache them in the lwp object.
8793 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8795 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8797 (linux_stopped_by_watchpoint): Rewrite.
8798 (linux_stopped_data_address): Rewrite.
8800 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8802 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8803 switching the current inferior, not before.
8805 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8807 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8808 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8809 i386-linux.c and amd64-linux.c.
8810 (reg-i386.o): Removed.
8811 (reg-i386.c): Likewise.
8812 (reg-i386-linux.o): Likewise.
8813 (reg-i386-linux.c): Likewise.
8814 (reg-x86-64.o): Likewise.
8815 (reg-x86-64.c): Likewise.
8816 (reg-x86-64-linux.o): Likewise.
8817 (reg-x86-64-linux.c): Likewise.
8820 (i386-linux.o): Likewise.
8821 (i386-linux.c): Likewise.
8822 (amd64.o): Likewise.
8823 (amd64.c): Likewise.
8824 (amd64-linux.o): Likewise.
8825 (amd64-linux.c): Likewise.
8827 * configure.srv (srv_i386_regobj): New.
8828 (srv_i386_linux_regobj): Likewise.
8829 (srv_amd64_regobj): Likewise.
8830 (srv_amd64_linux_regobj): Likewise.
8831 (srv_i386_32bit_xmlfiles): Likewise.
8832 (srv_i386_64bit_xmlfiles): Likewise.
8833 (srv_i386_xmlfiles): Likewise.
8834 (srv_amd64_xmlfiles): Likewise.
8835 (srv_i386_linux_xmlfiles): Likewise.
8836 (srv_amd64_linux_xmlfiles): Likewise.
8837 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8838 srv_xmlfiles to $srv_i386_xmlfiles.
8839 (i[34567]86-*-mingw32ce*): Likewise.
8840 (i[34567]86-*-mingw*): Likewise.
8841 (i[34567]86-*-nto*): Likewise.
8842 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8843 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8844 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8845 (x86_64-*-linux*): Likewise.
8847 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8848 (init_registers_amd64_linux): New.
8849 (x86_arch_setup): Replace init_registers_x86_64_linux with
8850 init_registers_amd64_linux.
8852 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8854 * configure.ac: Check for libdl. If it is not available link against
8855 static libthread_db.
8856 * configure: Regenerate.
8858 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8862 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8863 handing a read watchpoint.
8864 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8866 2010-02-12 Doug Evans <dje@google.com>
8868 * linux-low.c (linux_supports_tracefork_flag): Document.
8869 (linux_look_up_symbols): Add comment.
8871 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8873 * regcache.c (supply_register): Clear regcache if buf is NULL.
8875 2010-02-02 Nicolas Roche <roche@sourceware.org>
8876 Joel Brobecker <brobecker@adacore.com>
8878 * inferiors.c (find_inferior): Add function documentation.
8879 (unloaded_dll): Handle the case where the unloaded dll has not
8880 been previously registered in the dll list.
8882 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8884 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8885 (thumb2_breakpoint): New.
8886 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8888 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8890 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8891 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8894 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8896 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8898 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8900 * linux-s390-low.c (s390_collect_ptrace_register)
8901 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8903 2010-01-21 Doug Evans <dje@google.com>
8905 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8906 (PTRACE_ARG4_TYPE): New macro.
8907 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8908 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8909 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8910 (usr_store_inferior_registers): Ditto.
8911 (linux_read_memory, linux_write_memory): Ditto.
8912 (linux_test_for_tracefork): Ditto.
8914 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8915 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8917 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8919 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8922 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8924 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8925 prototype to take a regcache. Adjust.
8927 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8929 * regcache.h (struct thread_info): Forward declare.
8930 (struct regcache): New.
8931 (new_register_cache): Adjust prototype.
8932 (get_thread_regcache): Declare.
8933 (free_register_cache): Adjust prototype.
8934 (registers_to_string, registers_from_string): Ditto.
8935 (supply_register, supply_register_by_name, collect_register)
8936 (collect_register_as_string, collect_register_by_name): Ditto.
8937 * regcache.c (struct inferior_regcache_data): Delete.
8938 (get_regcache): Rename to ...
8939 (get_thread_regcache): ... this. Adjust. Switch inferior before
8941 (regcache_invalidate_one): Adjust.
8942 (regcache_invalidate): Fix prototype.
8943 (new_register_cache): Return the new register cache.
8944 (free_register_cache): Change prototype.
8945 (realloc_register_cache): Adjust.
8946 (registers_to_string): Change prototype to take a regcache. Adjust.
8947 (registers_from_string): Ditto.
8948 (register_data): Ditto.
8949 (supply_register): Ditto.
8950 (supply_register_by_name): Ditto.
8951 (collect_register): Ditto.
8952 (collect_register_as_string): Ditto.
8953 (collect_register_by_name): Ditto.
8954 * server.c (process_serial_event): Adjust.
8955 * linux-low.h (regset_fill_func, regset_store_func): Change
8957 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8959 * linux-low.c (get_stop_pc): Adjust.
8960 (check_removed_breakpoint): Adjust.
8961 (linux_wait_for_event): Adjust.
8962 (linux_resume_one_lwp): Adjust.
8963 (fetch_register): Add regcache parameter. Adjust.
8964 (usr_store_inferior_registers): Ditto.
8965 (regsets_fetch_inferior_registers): Ditto.
8966 (regsets_store_inferior_registers): Ditto.
8967 (linux_fetch_registers, linux_store_registers): Ditto.
8968 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8970 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8972 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8973 prototype to take a regcache.
8974 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8975 * remote-utils.c (convert_ascii_to_int, outreg)
8976 (prepare_resume_reply): Change prototype to take a regcache.
8978 * target.h (struct target_ops) <fetch_registers, store_registers>:
8979 Change prototype to take a regcache.
8980 (fetch_inferior_registers, store_inferior_registers): Change
8981 prototype to take a regcache. Adjust.
8982 * proc-service.c (ps_lgetregs): Adjust.
8983 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8984 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8985 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8986 take a regcache. Adjust.
8987 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8988 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8989 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8990 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8991 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8992 (cris_cannot_fetch_register):
8993 (cris_breakpoint_at): Change prototype to take a regcache.
8995 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8996 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8997 to take a regcache. Adjust.
8998 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9000 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9001 take a regcache. Adjust.
9002 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9003 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9004 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9005 * linux-mips-low.c (mips_get_pc):
9006 (mips_set_pc): Change prototype to take a regcache. Adjust.
9007 (mips_reinsert_addr): Adjust.
9008 (mips_collect_register): Change prototype to take a regcache.
9010 (mips_supply_register):
9011 (mips_collect_register_32bit, mips_supply_register_32bit)
9012 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9013 (mips_store_fpregset): Ditto.
9014 * linux-ppc-low.c (ppc_supply_ptrace_register)
9015 (ppc_supply_ptrace_register): Ditto.
9016 (parse_spufs_run): Adjust.
9017 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9018 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9019 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9020 take a regcache. Adjust.
9021 * linux-s390-low.c (s390_collect_ptrace_register)
9022 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9023 (s390_set_pc): Change prototype to take a regcache. Adjust.
9024 (s390_arch_setup): Adjust.
9025 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9026 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9027 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9028 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9029 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9031 (sparc_breakpoint_at): Adjust.
9032 * linux-xtensa-low.c (xtensa_fill_gregset):
9033 (xtensa_store_gregset):
9034 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9035 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9036 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9037 prototype to take a regcache. Adjust.
9038 * win32-arm-low.c (arm_fetch_inferior_register)
9039 (arm_store_inferior_register): Change prototype to take a
9041 * win32-i386-low.c (i386_fetch_inferior_register)
9042 (i386_store_inferior_register): Change prototype to take a
9044 * win32-low.c (child_fetch_inferior_registers)
9045 (child_store_inferior_registers): Change prototype to take a
9047 (win32_wait): Adjust.
9048 (win32_fetch_inferior_registers): Change prototype to take a
9050 (win32_store_inferior_registers): Adjust.
9051 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9052 store_inferior_register>: Change prototype to take a regcache.
9054 2010-01-20 Doug Evans <dje@google.com>
9056 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9058 (linux_wait_for_event1, linux_init_signals): Ditto.
9059 (W_STOPCODE): Provide definition if missing.
9061 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9063 * linux-low.c (linux_core_of_thread): New.
9064 (compare_ints, show_process, list_threads): New.
9065 (linux_qxfer_osdata): Report threads and cores.
9066 (linux_target_op): Register linux_core_of_thread.
9067 * remote-utils.c (prepare_resume_reply): Report the core.
9068 (buffer_xml_printf): Support %d specifier.
9069 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9071 (handle_query): Handle qXfer:threads. Announce availability
9073 * target.h (struct target_ops): New field core_of_thread.
9075 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9077 * Makefile.in (clean): Remove new generated files.
9078 (reg-s390.o, reg-s390.c): Remove rules.
9079 (reg-s390x.o, reg-s390x.c): Likewise.
9080 (s390-linux32.o, s390-linux32.c): Add rules.
9081 (s390-linux64.o, s390-linux64.c): Likewise.
9082 (s390x-linux64.o, s390x-linux64.c): Likewise.
9083 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9084 * linux-s390-low.c: Include <elf.h>.
9085 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9086 (init_registers_s390): Remove prototype.
9087 (init_registers_s390x): Likewise.
9088 (init_registers_s390_linux32): Add prototype.
9089 (init_registers_s390_linux64): Likewise.
9090 (init_registers_s390x_linux64): Likewise.
9091 (s390_num_regs_3264): New define.
9092 (s390_regmap_3264): New global variable.
9093 (s390_cannot_fetch_register): Remove obsolete check.
9094 (s390_cannot_store_register): Likewise.
9095 (s390_collect_ptrace_register): Handle upper/lower register halves.
9096 (s390_supply_ptrace_register): Likewise.
9097 (s390_fill_gregset): Update to register number changes.
9098 (s390_get_hwcap): New routine.
9099 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9100 Install appropriate regmap and register set.
9102 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9104 * server.c (gdbserver_version): Update copyright year to 2010.
9105 * gdbreplay.c (gdbreplay_version): Likewise.
9107 2009-12-28 Doug Evans <dje@google.com>
9109 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9110 elf/external.h. Include <elf.h> instead but only if necessary.
9112 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9114 * linux-low.c (linux_remove_process): Remove `detaching'
9115 parameter. Don't release/detach from thread_db here.
9116 (linux_kill): Release/detach from thread_db here, ...
9117 (linux_detach): ... and here, before actually detaching.
9118 (linux_wait_1): ... and here, when a process exits.
9119 * thread-db.c (any_thread_of): New.
9120 (thread_db_free): Switch the current inferior to a thread of the
9123 2009-12-21 Doug Evans <dje@google.com>
9125 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9127 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9128 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9129 warning ifndef __NR_tkill. Move setting of errno there too.
9130 Delete unnecessary resetting of errno after syscall.
9131 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9133 * configure.ac: Check for dladdr.
9134 * config.in: Regenerate.
9135 * configure: Regenerate.
9136 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9137 (try_thread_db_load): Update.
9139 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9141 2009-12-18 Doug Evans <dje@google.com>
9143 * event-loop.c: Include unistd.h if it exists.
9145 * linux-low.c (my_waitpid): Move definition away from being in
9146 between linux_tracefork_child/linux_test_for_tracefork.
9148 * gdb_proc_service.h (psaddr_t): Fix type.
9149 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9150 signature to match glibc.
9152 2009-12-16 Doug Evans <dje@google.com>
9154 * linux-low.c (linux_read_memory): Fix argument to read.
9156 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9158 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9159 events, don't leave current_inferior pointing at null.
9161 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9163 * win32-low.c (LOG): Delete.
9164 (OUTMSG): Output to stderr.
9165 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9166 on compile time LOG macro.
9167 (win32_wait): Fix debug output.
9169 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9171 * win32-low.c (win32_add_one_solib): If the dll name is
9172 "ntdll.dll", prepend the system directory to the dll path.
9174 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9176 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9178 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9179 Vladimir Prus <vladimir@codesourcery.com>
9181 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9182 * configure.ac: Check for __mcoldfire__ and set
9183 gdb_cv_m68k_is_coldfire.
9184 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9185 reg-cf.o and reg-m68k.o.
9186 * configure: Regenerated.
9188 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9190 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9191 Pass it to thread_db_free.
9192 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9193 proper `detaching' argument to linux_remove_process.
9194 * linux-low.h (thread_db_free): Add `detaching' parameter.
9195 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9197 (thread_db_free): Add `detaching' parameter. Only
9198 call td_ta_clear_event if detaching from process.
9200 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9202 * thread-db.c (thread_db_free): Fix typo.
9204 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9207 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9209 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9211 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9212 with an i686 compiler.
9213 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9215 * configure: Rebuilt.
9217 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9221 * server.c (handle_search_memory_1): Correct read_addr initialization
9222 in loop for searching subsequent chunks.
9224 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9226 * configure.ac: New --with-libthread-db option.
9227 * thread-db.c: Allow direct dependence on libthread_db.
9228 (thread_db_free): Adjust.
9229 * config.in: Regenerate.
9230 * configure: Likewise.
9232 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9235 * thread-db.c (attach_thread): New function.
9236 (maybe_attach_thread): Return success/failure.
9237 (find_new_threads_callback): Adjust.
9238 (thread_db_find_new_threads): Loop until no new threads.
9240 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9242 * proc-service.c (ps_lgetregs): Formatting.
9244 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9246 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9247 * configure.ac: Adjust.
9248 * linux-low.h (struct process_info_private): Move members to struct
9250 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9251 * linux-low.c (linux_remove_process): Adjust.
9252 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9253 * server.c (handle_query): Move code ...
9254 (handle_monitor_command): ... here. New function.
9255 * target.h (struct target_ops): New member.
9256 * thread-db.c (struct thread_db): New.
9257 (libthread_db_search_path): New variable.
9258 (thread_db_create_event, thread_db_enable_reporting)
9259 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9260 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9261 (try_thread_db_load_1, dladdr_to_soname): New functions.
9262 (try_thread_db_load, thread_db_load_search): New functions.
9263 (thread_db_init): Search for libthread_db.
9264 (thread_db_free): New function.
9265 (thread_db_handle_monitor_command): Likewise.
9266 * config.in: Regenerate.
9267 * configure: Regenerate.
9269 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9271 * spu-low.c (spu_kill): Wait for inferior to terminate.
9272 Call clear_inferiors.
9273 (spu_detach): Call clear_inferiors.
9275 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9277 * aclocal.m4: Regenerate.
9278 * config.in: Likewise.
9279 * configure: Likewise.
9281 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9283 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9284 (parse_spufs_run): New function.
9285 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9286 (ppc_breakpoint_at): Handle SPU breakpoints.
9288 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9290 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9291 (SPUFS_MAGIC): Define.
9292 (spu_enumerate_spu_ids): New function.
9293 (linux_qxfer_spu): New function.
9294 (linux_target_ops): Install linux_qxfer_spu.
9296 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9298 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9299 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9300 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9301 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9302 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9303 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9304 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9305 (init_registers_powerpc_cell32l): Add prototype.
9306 (init_registers_powerpc_cell64l): Likewise.
9307 (ppc_arch_setup): Detect Cell/B.E. architecture.
9309 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9311 * Makefile.in (datarootdir): New variable.
9313 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9315 * linux-low.c (linux_write_memory): Update debugging output.
9316 * Makefile.in (clean): Add new descriptions.
9317 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9318 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9319 * configure.srv: Add new files for arm*-*-linux*.
9320 * linux-arm-low.c: Add new declarations.
9321 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9322 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9323 (HWCAP_VFPv3D16): New.
9324 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9325 instead of __IWMMXT__.
9326 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9327 (arm_arch_setup): New.
9328 (target_regsets): Remove #ifdef. Add VFP regset.
9329 (the_low_target): Use arm_arch_setup.
9331 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9333 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9334 the main thread again.
9336 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9338 Adding Neutrino gdbserver.
9339 * configure: Regenerated.
9340 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9341 * configure.srv (i[34567]86-*-nto*): New target.
9342 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9343 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9344 (nto_comctrl) [__QNX__]: New function.
9345 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9347 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9349 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9352 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9353 Pedro Alves <pedro@codesourcery.com>
9355 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9356 don't support CONTEXT_EXTENDED_REGISTERS.
9357 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9358 (the_low_target): Install them.
9359 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9360 failing with ERROR_PIPE_NOT_CONNECTED.
9362 2009-06-30 Doug Evans <dje@google.com>
9363 Pierre Muller <muller@ics.u-strasbg.fr>
9365 Add h/w watchpoint support to x86-linux, win32-i386.
9366 * Makefile.in (SFILES): Add i386-low.c
9367 (i386_low_h): Define.
9368 (i386-low.o): Add dependencies.
9369 (linux-x86-low.o): Add i386-low.h dependency.
9370 (win32-i386-low.o): Ditto.
9371 * i386-low.c: New file.
9372 * i386-low.h: New file.
9373 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9374 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9375 * linux-low.c (linux_add_process): Initialize arch_private.
9376 (linux_remove_process): Free arch_private.
9377 (add_lwp): Initialize arch_private.
9378 (delete_lwp): Free arch_private.
9379 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9381 * linux-low.h (process_info_private): New member arch_private.
9382 (lwp_info): New member arch_private.
9383 (linux_target_ops): New members new_process, new_thread,
9385 (ptid_of): New macro.
9386 * linux-x86-low.c: Include stddef.h, i386-low.h.
9387 (arch_process_info): New struct.
9388 (arch_lwp_info): New struct.
9389 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9390 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9391 (i386_dr_low_get_status): New function.
9392 (x86_insert_point, x86_remove_point): New functions.
9393 (x86_stopped_by_watchpoint): New function.
9394 (x86_stopped_data_address): New function.
9395 (x86_linux_new_process, x86_linux_new_thread): New functions.
9396 (x86_linux_prepare_to_resume): New function.
9397 (the_low_target): Add entries for insert_point, remove_point,
9398 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9400 * server.c (debug_hw_points): New global.
9401 (monitor_show_help): Document set debug-hw-points.
9402 (handle_query): Process "set debug-hw-points".
9403 * server.h (debug_hw_points): Declare.
9404 (paddress): Declare.
9405 * utils.c (NUMCELLS, CELLSIZE): New macros.
9406 (get_sell, xsnprintf, paddress): New functions.
9407 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9408 remove_point, stopped_by_watchpoint, stopped_data_address.
9409 * win32-i386-low.c: Include i386-low.h.
9410 (debug_reg_state): Replaces dr.
9411 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9412 (i386_dr_low_get_status): New function.
9413 (i386_insert_point, i386_remove_point): New functions.
9414 (i386_stopped_by_watchpoint): New function.
9415 (i386_stopped_data_address): New function.
9416 (i386_initial_stuff): Update.
9417 (get_thread_context,set_thread_context,i386_thread_added): Update.
9418 (the_low_target): Add entries for insert_point,
9419 remove_point, stopped_by_watchpoint, stopped_data_address.
9420 * win32-low.c (win32_insert_watchpoint): New function.
9421 (win32_remove_watchpoint): New function.
9422 (win32_stopped_by_watchpoint): New function.
9423 (win32_stopped_data_address): New function.
9424 (win32_target_ops): Add entries for insert_watchpoint,
9425 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9426 * win32-low.h (win32_target_ops): New members insert_point,
9427 remove_point, stopped_by_watchpoint, stopped_data_address.
9429 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9431 * server.c (process_serial_event): Re-return unsupported, not
9432 error, if the type isn't recognized. Re-allow supporting only
9433 insert or remove packets. Also call require_running for
9434 breakpoints. Add missing break statement to default case. Tidy.
9435 * target.h (struct target_ops): Rename insert_watchpoint to
9436 insert_point, and remove_watchpoint to remove_point.
9438 * linux-low.h (struct linux_target_ops): Likewise.
9439 * linux-low.c (linux_insert_watchpoint): Rename to ...
9440 (linux_insert_point): ... this. Adjust.
9441 (linux_remove_watchpoint): Rename to ...
9442 (linux_remove_point): ... this. Adjust.
9443 (linux_target_ops): Adjust.
9444 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9445 (cris_insert_point): ... this.
9446 (cris_remove_watchpoint): Rename to ...
9447 (cris_remove_point): ... this.
9448 (the_low_target): Adjust.
9450 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9452 * server.c (handle_v_kill): Pass signal_pid to
9453 kill_inferior if multi_process is zero.
9455 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9457 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9458 * target.h (target_ops): Comment for *_watchpoint to make it clear
9459 the functions can get types '0' and '1'.
9461 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9463 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9464 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9465 * regcache.c (get_regcache): Likewise.
9466 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9467 * win32-low.c (child_fetch_inferior_registers): Remove check for
9470 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9471 Pedro Alves <pedro@codesourcery.com>
9473 * target.h (struct target_ops) <supports_multi_process>: New
9475 (target_supports_multi_process): New.
9476 * server.c (handle_query): Even if GDB reports support, only
9477 enable multi-process if the target also supports it. Report
9478 multi-process support only if the target backend supports it.
9479 * linux-low.c (linux_supports_multi_process): New function.
9480 (linux_target_ops): Install it as target_supports_multi_process
9483 2009-05-24 Doug Evans <dje@google.com>
9485 Global renaming of find_thread_pid to find_thread_ptid.
9486 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9487 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9488 All callers updated.
9490 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9491 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9494 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9495 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9496 (linux_resume_one_lwp): Ditto.
9498 2009-05-23 Doug Evans <dje@google.com>
9500 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9501 from struct inferior_list_entry * to struct lwp_info *.
9502 All callers updated.
9504 2009-05-13 Doug Evans <dje@google.com>
9506 * linux-x86-low.c: Don't include assert.h.
9507 (x86_siginfo_fixup): Use fatal, not assert.
9508 (x86_arch_setup): Fix comment.
9510 2009-05-12 Doug Evans <dje@google.com>
9512 Biarch support for i386/amd64 gdbserver.
9513 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9514 Add linux-x86-low.c.
9515 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9516 (linux-x86-low.o): Add.
9517 * linux-x86-64-low.c: Delete.
9518 * linux-i386-low.c: Delete.
9519 * linux-x86-low.c: New file.
9520 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9522 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9524 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9525 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9526 (linux_child_pid_to_exec_file): New function.
9527 (elf_64_header_p, elf_64_file_p): New functions.
9528 (siginfo_fixup): New function.
9529 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9530 give target a chance to convert layout.
9531 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9532 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9534 2009-05-07 Doug Evans <dje@google.com>
9536 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9537 (regsets_store_inferior_registers): Ditto.
9539 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9543 * linux-low.c (must_set_ptrace_flags): Delete.
9544 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9546 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9547 `lwp->must_set_ptrace_flags' instead.
9548 (linux_wait_for_event_1): Set ptrace options here.
9549 (linux_wait_1): ... not here.
9551 2009-04-30 Doug Evans <dje@google.com>
9553 * inferiors.c (started_inferior_callback): New function.
9554 (attached_inferior_callback): New function.
9555 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9556 * server.c (print_started_pid, print_attached_pid): New functions.
9557 (detach_or_kill_for_exit): New function.
9558 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9559 * server.h (have_started_inferiors_p): Declare.
9560 (have_attached_inferiors_p): Declare.
9562 * inferiors.c (remove_process): Fix memory leak, free process.
9563 * linux-low.c (linux_remove_process): New function.
9564 (linux_kill): Call it instead of remove_process.
9565 (linux_detach, linux_wait_1): Ditto.
9567 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9569 * configure.srv: Add x86 Windows CE target.
9571 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9573 * inferiors.c (get_thread_process): Make global.
9574 * server.h (get_thread_process): Add prototype.
9575 * thread-db.c (find_one_thread): Use get_thread_process
9576 instead of current_process.
9577 (thread_db_get_tls_address): Do not crash if called when
9578 thread layer is not yet initialized.
9580 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9582 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9583 * spu-low.c (current_tid): Rename to ...
9584 (current_ptid): ... this.
9585 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9586 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9587 ptid_get_lwp (current_ptid) instead of current_tid.
9588 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9589 instead of current_tid. Use find_process_pid to verify pid
9590 argument is valid. Pass proper argument to remove_process.
9591 (spu_thread_alive): Compare current_ptid instead of current_tid.
9592 (spu_resume): Likewise.
9594 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9596 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9599 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9601 Implement the multiprocess extensions, and add linux multiprocess
9604 * server.h (ULONGEST): Declare.
9605 (struct ptid, ptid_t): New.
9606 (minus_one_ptid, null_ptid): Declare.
9607 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9608 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9609 (struct inferior_list_entry): Change `id' type from unsigned from
9611 (struct sym_cache, struct breakpoint, struct
9612 process_info_private): Forward declare.
9613 (struct process_info): Declare.
9614 (current_process): Declare.
9615 (all_processes): Declare.
9616 (initialize_inferiors): Declare.
9617 (add_thread): Adjust to use ptid_t.
9618 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9619 (add_process, remove_process, find_thread_pid): Declare.
9620 (find_inferior_id): Adjust to use ptid_t.
9621 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9622 (multi_process): Declare.
9623 (push_event): Adjust to use ptid_t.
9624 (read_ptid, write_ptid): Declare.
9625 (prepare_resume_reply): Adjust to use ptid_t.
9626 (clear_symbol_cache): Declare.
9627 * inferiors.c (all_processes): New.
9628 (null_ptid, minus_one_ptid): New.
9629 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9630 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9631 (add_thread): Change unsigned long to ptid. Remove gdb_id
9633 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9634 (gdb_id_to_thread): Rename to ...
9635 (find_thread_pid): ... this. Change unsigned long to ptid.
9636 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9637 (loaded_dll, pull_pid_from_list): Adjust.
9638 (add_process, remove_process, find_process_pid)
9639 (get_thread_process, current_process, initialize_inferiors): New.
9640 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9641 (struct target_waitstatus) <related_pid>: Ditto.
9642 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9644 (struct target_ops) <join>: Add `pid' argument.
9645 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9646 (struct target_ops) <wait>: Add `ptid' field. Change return type
9648 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9649 (mywait): Add `ptid' argument. Change return type to ptid_t.
9650 (target_pid_to_str): Declare.
9651 * target.c (set_desired_inferior): Adjust to use ptids.
9652 (mywait): Add new `ptid' argument. Adjust.
9653 (target_pid_to_str): New.
9654 * mem-break.h (free_all_breakpoints): Declare.
9655 * mem-break.c (breakpoints): Delelete.
9656 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9657 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9658 to use per-process breakpoint list.
9659 (free_all_breakpoints): New.
9660 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9661 (symbol_cache, all_symbols_looked_up): Delete.
9663 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9665 (prepare_resume_reply): Change ptid argument's type from unsigned
9666 long to ptid_t. Adjust. Implement W;process and X;process.
9667 (free_sym_cache, clear_symbol_cache): New.
9668 (look_up_one_symbol): Adjust to per-process symbol cache. *
9669 * server.c (cont_thread, general_thread, step_thread): Change type
9672 (multi_process): New.
9673 (last_ptid): Change type to ptid_t.
9674 (struct vstop_notif) <ptid>: Change type to ptid_t.
9675 (queue_stop_reply, push_event): Change `ptid' argument's type to
9677 (discard_queued_stop_replies): Add `pid' argument.
9678 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9679 changes. Don't reference the `attached' global.
9680 (attach_inferior): Adjust to mywait interface changes.
9681 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9682 features. Handle and report "multiprocess+". Handle
9684 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9686 (handle_v_kill): New.
9687 (handle_v_stopped): Adjust to use target_pid_to_str.
9688 (handle_v_requests): Allow multiple attaches and runs when
9689 multiprocess extensions are in effect. Handle "vKill".
9690 (myresume): Adjust to use ptids.
9691 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9692 (handle_status): Adjust to discard_queued_stop_replies interface
9694 (first_thread_of, kill_inferior_callback)
9695 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9696 (main): Call initialize_inferiors. Adjust to use ptids, killing
9697 and detaching from all inferiors. Handle multiprocess packet
9699 * linux-low.h: Include gdb_proc_service.h.
9700 (struct process_info_private): New.
9701 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9702 <lwpid_of>: Use ptid_get_lwp.
9703 (get_lwp_thread): Adjust.
9704 (struct lwp_info): Add `dead' member.
9705 (find_lwp_pid): Declare.
9706 * linux-low.c (thread_db_active): Delete.
9707 (new_inferior): Adjust comment.
9708 (inferior_pid): Delete.
9709 (linux_add_process): New.
9710 (handle_extended_wait): Adjust.
9711 (add_lwp): Change unsigned long to ptid.
9712 (linux_create_inferior): Add process to processes table. Adjust
9713 to use ptids. Don't set new_inferior here.
9714 (linux_attach_lwp): Rename to ...
9715 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9716 it. Adjust to use ptids.
9717 (linux_attach_lwp): New.
9718 (linux_attach): Add process to processes table. Don't set
9720 (struct counter): New.
9721 (second_thread_of_pid_p, last_thread_of_process_p): New.
9722 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9724 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9725 processes. Remove process from process table.
9726 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9727 to multiple processes.
9728 (any_thread_of): New.
9729 (linux_detach): Add `pid' argument, and handle it. Remove process
9730 from processes table.
9731 (linux_join): Add `pid' argument. Handle it.
9732 (linux_thread_alive): Change unsighed long argument to ptid_t.
9733 Consider dead lwps as not being alive.
9734 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9735 threads we're not interested in.
9736 (same_lwp, find_lwp_pid): New.
9737 (linux_wait_for_lwp): Change `pid' argument's type from int to
9739 (linux_wait_for_event): Rename to ...
9740 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9741 from int to ptid_t. Adjust.
9742 (linux_wait_for_event): New.
9743 (linux_wait_1): Add `ptid' argument. Change return type to
9744 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9745 that exit from the process table.
9746 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9748 (mark_lwp_dead): New.
9749 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9750 stopping all threads, mark its main lwp as dead.
9751 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9753 (fetch_register, usr_store_inferior_registers)
9754 (regsets_fetch_inferior_registers)
9755 (regsets_store_inferior_registers, linux_read_memory)
9756 (linux_write_memory): Inline `inferior_pid'.
9757 (linux_look_up_symbols): Adjust to use per-process
9759 (linux_request_interrupt): Adjust to use ptids.
9760 (linux_read_auxv): Inline `inferior_pid'.
9761 (initialize_low): Don't reference thread_db_active.
9762 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9763 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9764 (ps_getpid): Return the pid of the current inferior.
9765 * thread-db.c (proc_handle, thread_agent): Delete.
9766 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9768 (find_one_thread): Change argument type to ptid_t. Adjust to
9770 (maybe_attach_thread): Adjust to per-process data and ptids.
9771 (thread_db_find_new_threads): Ditto.
9772 (thread_db_init): Ditto.
9773 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9774 processes table. Adjust to use ptids.
9775 (spu_kill, spu_detach): Adjust interface. Remove process from
9777 (spu_join, spu_thread_alive): Adjust interface.
9778 (spu_wait): Adjust interface. Remove process from processes
9779 table. Adjust to use ptids.
9780 * win32-low.c (current_inferior_tid): Delete.
9781 (current_inferior_ptid): New.
9782 (debug_event_ptid): New.
9783 (thread_rec): Take a ptid. Adjust.
9784 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9785 (child_delete_thread): Ditto.
9786 (do_initial_child_stuff): Add `attached' argument. Add process to
9788 (child_fetch_inferior_registers, child_store_inferior_registers):
9790 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9791 (win32_attach): Pass 1 to do_initial_child_stuff.
9792 (win32_kill): Adjust interface. Remove process from processes
9794 (win32_detach): Ditto.
9795 (win32_join): Adjust interface.
9796 (win32_thread_alive): Take a ptid.
9797 (win32_resume): Adjust to use ptids.
9798 (get_child_debug_event): Ditto.
9799 (win32_wait): Adjust interface. Remove exiting process from
9802 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9804 Non-stop mode support.
9806 * server.h (non_stop): Declare.
9807 (gdb_client_data, handler_func): Declare.
9808 (delete_file_handler, add_file_handler, start_event_loop):
9810 (handle_serial_event, handle_target_event, push_event)
9811 (putpkt_notif): Declare.
9812 * target.h (enum resume_kind): New.
9813 (struct thread_resume): Replace `step' field by `kind' field.
9814 (TARGET_WNOHANG): Define.
9815 (struct target_ops) <wait>: Add `options' argument.
9816 <supports_non_stop, async, start_non_stop>: New fields.
9817 (target_supports_non_stop, target_async): New.
9818 (start_non_stop): Declare.
9819 (mywait): Add `options' argument.
9820 * target.c (mywait): Add `options' argument. Print child exit
9822 (start_non_stop): New.
9823 * server.c (non_stop, own_buf, mem_buf): New globals.
9824 (struct vstop_notif): New.
9825 (notif_queue): New global.
9826 (queue_stop_reply, push_event, discard_queued_stop_replies)
9827 (send_next_stop_reply): New.
9828 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9830 (attach_inferior): In non-stop mode, don't wait for the target
9832 (handle_general_set): Handle QNonStop.
9833 (handle_query): When handling qC, return the current general
9834 thread, instead of the first thread of the list.
9835 (handle_query): If the backend supports non-stop mode, include
9836 QNonStop+ in the qSupported query response.
9837 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9839 (handle_v_attach, handle_v_run): Handle non-stop mode.
9840 (handle_v_stopped): New.
9841 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9842 (myresume): Adjust to use resume_kind. Handle non-stop.
9843 (queue_stop_reply_callback): New.
9844 (handle_status): Handle non-stop mode.
9845 (main): Clear non_stop flag on reconnection. Use the event-loop.
9846 Refactor serial protocol handling from here ...
9847 (process_serial_event): ... to this new function. When GDB
9848 selects any thread, select one here. In non-stop mode, wait until
9849 GDB acks all pending events before exiting.
9850 (handle_serial_event, handle_target_event): New.
9851 * remote-utils.c (remote_open): Install remote_desc in the event
9853 (remote_close): Remove remote_desc from the event loop.
9854 (putpkt_binary): Rename to...
9855 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9856 (putpkt_binary): New as wrapper around putpkt_binary_1.
9857 (putpkt_notif): New.
9858 (prepare_resume_reply): In non-stop mode, don't change the
9860 * event-loop.c: New.
9861 * Makefile.in (OBJ): Add event-loop.o.
9862 (event-loop.o): New rule.
9864 * linux-low.h (pid_of): Moved here.
9866 (get_lwp_thread): Use lwpid_of.
9867 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9868 * linux-low.c (pid_of): Delete.
9869 (inferior_pid): Use lwpid_of.
9870 (linux_event_pipe): New.
9871 (target_is_async_p): New.
9873 (handle_extended_wait): Use lwpid_of.
9874 (add_lwp): Don't set lwpid field.
9875 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9876 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9877 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9878 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9879 first. Adjust to linux_wait_for_event interface changes. Use
9881 (linux_detach): Don't delete the main lwp here.
9882 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9883 (status_pending_p): Don't consider explicitly suspended lwps.
9884 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9885 pointer. Add OPTIONS argument. Change return type to int. Use
9886 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9887 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9888 pointer. Add status pointer argument. Return a pid instead of a
9889 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9890 changes. In non-stop mode, don't switch to a random thread.
9891 (linux_wait): Rename to...
9892 (linux_wait_1): ... this. Add target_options argument, and handle
9893 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9894 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9895 clean exit and signal exit code. Don't stop all threads in
9896 non-stop mode. In all-stop mode, only stop all threads when
9897 reporting a stop to GDB. Handle explicit thread stop requests.
9898 (async_file_flush, async_file_mark): New.
9900 (send_sigstop): Use lwpid_of.
9901 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9902 interface changes. In non-stop mode, don't switch to a random
9904 (linux_resume_one_lwp): Use lwpid_of.
9905 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9906 (linux_resume_one_thread): ... this. Handle resume_stop. In
9907 non-stop mode, don't look for pending flag in all threads.
9908 (resume_status_pending_p): Don't consider explicitly suspended
9910 (my_waitpid): Reimplement. Emulate __WALL.
9911 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9913 (sigchld_handler, linux_supports_non_stop, linux_async)
9914 (linux_start_non_stop): New.
9915 (linux_target_ops): Register linux_supports_non_stop, linux_async
9916 and linux_start_non_stop.
9917 (initialize_low): Install SIGCHLD handler.
9918 * thread-db.c (thread_db_create_event, find_one_thread)
9919 (thread_db_get_tls_address): Use lwpid_of.
9920 * win32-low.c (win32_detach): Adjust to use resume_kind.
9921 (win32_wait): Add `options' argument.
9922 * spu-low.c (spu_resume): Adjust to use resume_kind.
9923 (spu_wait): Add `options' argument.
9925 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9927 Decouple target code from remote protocol.
9929 * target.h (enum target_waitkind): New.
9930 (struct target_waitstatus): New.
9931 (struct target_ops) <wait>: Return an unsigned long. Take a
9932 target_waitstatus pointer instead of a char pointer.
9934 * target.c (mywait): Change prototype to return an unsigned long.
9935 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9936 * server.h (thread_from_wait, old_thread_from_wait): Delete
9938 (prepare_resume_reply): Change prototype to take a
9940 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9941 (last_status, last_ptid): New.
9942 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9943 pid instead of a signal.
9944 (attach_inferior): Remove "status" and "signal" parameters.
9946 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9948 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9949 (handle_v_requests, myresume): Remove "status" and "signal"
9951 (handle_status): New.
9952 (main): Delete local `status'. Adjust.
9953 * remote-utils.c: Include target.h.
9954 (prepare_resume_reply): Change prototype to take a
9955 target_waitstatus. Adjust.
9957 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9959 * spu-low.c (spu_wait): Adjust.
9960 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9962 (win32_wait): Adjust.
9964 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9966 * target.h (struct thread_resume): Delete leave_stopped member.
9967 (struct target_ops): Add a `n' argument to the `resume' callback.
9968 * server.c (start_inferior): Adjust.
9969 (handle_v_cont, myresume): Adjust.
9970 * linux-low.c (check_removed_breakpoint): Adjust to resume
9971 interface change, and to removed leave_stopped field.
9972 (resume_ptr): Delete.
9973 (struct thread_resume_array): New.
9974 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9975 resume interface change.
9976 (linux_continue_one_thread, linux_queue_one_thread)
9977 (resume_status_pending_p): Check if the resume field is NULL
9978 instead of checking the leave_stopped member.
9979 (linux_resume): Adjust to the target resume interface change.
9980 * spu-low.c (spu_resume): Adjust to the target resume interface
9982 * win32-low.c (win32_detach, win32_resume): Ditto.
9984 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9986 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9988 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9990 (linux_continue_one_thread): Only preserve the stepping flag if
9991 there's a pending breakpoint.
9993 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9995 * server.c (main): After the inferior having exited, call
9996 remote_close before exiting gdbserver.
9998 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10000 Fix size of FPSCR in Power 7 processors.
10001 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10002 (PPC_FEATURE_HAS_DFP): New #define.
10003 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10006 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10008 * server.c (handle_query) Whitespace and formatting.
10010 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10012 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10013 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10014 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10015 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10016 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10017 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10018 Makefile.in, configure.ac: Fix whitespace throughout.
10019 * configure: Regenerate.
10021 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10023 * inferiors.c (find_inferior): Make it safe for the callback
10024 function to delete the currently iterated inferior.
10026 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10028 * Makefile.in (linuw_low_h): Move higher.
10029 (thread-db.o): Depend on $(linux_low_h).
10031 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10033 Rename "process" to "lwp" throughout.
10035 * linux-low.c (all_processes): Rename to...
10036 (all_lwps): ... this.
10037 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10038 (add_process): Rename to ...
10039 (add_lwp): ... this. Adjust.
10040 (linux_create_inferior): Adjust.
10041 (linux_attach_lwp): Adjust.
10042 (linux_attach): Adjust.
10043 (linux_kill_one_process): Rename to ...
10044 (linux_kill_one_lwp): ... this. Adjust.
10045 (linux_kill): Adjust.
10046 (linux_detach_one_process): Rename to ...
10047 (linux_detach_one_lwp): ... this. Adjust.
10048 (linux_detach): Adjust.
10049 (check_removed_breakpoint): Adjust.
10050 (status_pending_p): Adjust.
10051 (linux_wait_for_process): Rename to ...
10052 (linux_wait_for_lwp): ... this. Adjust.
10053 (linux_wait_for_event): Adjust.
10054 (send_sigstop): Adjust.
10055 (wait_for_sigstop): Adjust.
10056 (stop_all_processes): Rename to ...
10057 (stop_all_lwps): ... this.
10058 (linux_resume_one_process): Rename to ...
10059 (linux_resume_one_lwp): ... this. Adjust.
10060 (linux_set_resume_request, linux_continue_one_thread)
10061 (linux_queue_one_thread, resume_status_pending_p)
10062 (usr_store_inferior_registers, regsets_store_inferior_registers)
10063 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10065 * linux-low.h (get_process): Rename to ...
10066 (get_lwp): ... this. Adjust.
10067 (get_thread_process): Rename to ...
10068 (get_thread_lwp): ... this. Adjust.
10069 (get_process_thread): Rename to ...
10070 (get_lwp_thread): ... this. Adjust.
10071 (struct process_info): Rename to ...
10072 (struct lwp_info): ... this.
10073 (all_processes): Rename to ...
10074 (all_lwps): ... this.
10075 * proc-service.c (ps_lgetregs): Adjust.
10076 * thread-db.c (thread_db_create_event, find_one_thread)
10077 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10079 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10081 * server.c (handle_query): Handle "qAttached".
10083 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10085 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10086 GPLv3, update license URL.
10088 2009-03-01 Doug Evans <dje@google.com>
10090 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10091 (server_h): Add gdb_signals.h.
10092 (signals.o): Update.
10093 * server.h (target_signal_from_host,target_signal_to_host_p)
10094 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10096 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10098 * remote-utils.c (getpkt): Also generate remote-debug
10099 information if noack_mode is set.
10101 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10103 * server.c (handle_query): Report qXfer:siginfo:read and
10104 qXfer:siginfo:write as supported and handle them.
10105 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10106 * linux-low.c (linux_xfer_siginfo): New.
10107 (linux_target_ops): Set it.
10109 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10111 * server.c (gdbserver_usage): Mention --remote-debug.
10112 (main): Accept '--remote-debug' switch.
10114 2009-01-18 Doug Evans <dje@google.com>
10116 * regcache.c (new_register_cache): No need to check result of xcalloc.
10117 * server.c (handle_search_memory): Back out calls to xmalloc,
10118 result is checked and error is returned to user upon failure.
10119 (handle_query): Ditto. Add more checks for result of malloc.
10120 (handle_v_cont): Check result of malloc, report error back to
10122 (handle_v_run): Ditto. Call freeargv.
10123 * server.h (freeargv): Declare.
10124 * utils.c (freeargv): New fn.
10126 2009-01-15 Doug Evans <dje@google.com>
10128 * gdbreplay.c (perror_with_name): Make arg const char *.
10129 * server.h (target_signal_to_name): Make return type const char *.
10130 * thread-db.c (thread_db_err_str): Make return type const char *.
10131 * utils.c (perror_with_name): Make arg const char *.
10133 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10135 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10136 when handling a EXIT_PROCESS_DEBUG_EVENT.
10138 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10140 * gdbreplay.c (gdbreplay_version): Update copyright year.
10141 * server.c (gdbserver_version): Likewise.
10143 2009-01-05 Doug Evans <dje@google.com>
10145 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10146 (handle_extended_wait): Improve comment.
10148 2008-12-13 Doug Evans <dje@google.com>
10150 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10151 * server.h (ATTR_MALLOC): New macro.
10152 (xmalloc,xcalloc,xstrdup): Declare.
10153 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10154 * inferiors.c: Ditto.
10155 * linux-low.c: Ditto.
10156 * mem-break.c: Ditto.
10157 * regcache.c: Ditto.
10158 * remote-utils.c: Ditto.
10161 * win32-low.c: Ditto.
10163 2008-12-12 Doug Evans <dje@google.com>
10165 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10166 in debugging printf.
10168 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10170 2008-12-09 Doug Evans <dje@google.com>
10172 * linux-low.h (struct process_info): Delete member tid, unused.
10173 * thread-db.c (find_one_thread): Update.
10174 (maybe_attach_thread): Update.
10176 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10178 * target.h (struct target_ops): Add qxfer_osdata member.
10179 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10181 (linux_qxfer_osdata): New functions.
10182 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10184 * server.c (handle_query): Handle "qXfer:osdata:read:".
10185 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10186 (buffer_xml_printf): New functions.
10187 * server.h (struct buffer): New.
10188 (buffer_grow_str, buffer_grow_str0): New macros.
10189 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10190 (buffer_xml_printf): Declare.
10192 2008-11-24 Doug Evans <dje@google.com>
10194 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10196 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10198 * server.c (handle_v_run): Always use the supplied argument list.
10200 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10202 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10203 (xtensa_regmap_table): Add entry for scompare1.
10205 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10207 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10208 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10209 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10210 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10211 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10212 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10213 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10214 XML target descriptions.
10215 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10216 when inferior is running on an ISA 2.05 or later processor. Add
10217 special case to return offset for full 64-bit slot of FPSCR when
10220 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10222 * Makefile.in (SFILES, clean): Added sparc64 files.
10223 (reg-sparc64.o, reg-sparc64.c): New.
10224 * configure.srv (sparc*-*-linux*): New configuration.
10225 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10226 syscall arguments for SPARC.
10227 (regsets_store_inferior_registers): Likewise.
10228 * linux-sparc-low.c: New file.
10230 2008-10-21 Doug Evans <dje@google.com>
10232 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10233 (READLINE_DIR,READLINE_DEP): Delete.
10234 (INTERNAL_CFLAGS): Update.
10235 (LINTFLAGS): Update.
10237 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10239 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10240 whole argv from the last run, not just argv[0].
10242 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10244 * regcache.c (new_register_cache): Return NULL if the register
10245 cache size isn't known yet.
10246 (free_register_cache): Avoid dereferencing a NULL regcache.
10248 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10250 * configure.srv: Merge MIPS and MIPS64.
10252 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10254 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10256 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10258 * Makefile.in: Add required vsx dependencies.
10260 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10261 Declare init_registers_powerpc_vsx32l.
10262 Declare init_registers_powerpc_vsx64l.
10263 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10264 (ppc_arch_setup): Check for VSX in hwcap.
10265 (ppc_fill_vsxregset): New function.
10266 (ppc_store_vsxregset): New function.
10267 Add new VSX entry in regset_info target_regsets.
10269 * configure.srv: Add new VSX dependencies.
10271 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10273 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10274 (remote_open): Set or clear transport_is_reliable.
10275 (putpkt_binary): Don't expect acks in noack mode.
10276 (getpkt): Don't send ack/nac in noack mode.
10277 * server.c (handle_general_set): Handle QStartNoAckMode.
10278 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10280 (main): Reset noack_mode on every connection.
10281 * server.h (noack_mode): Declare.
10283 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10285 * Makefile.in (GDBREPLAY_OBS): New variable.
10286 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10288 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10289 Daniel Jacobowitz <dan@codesourcery.com>
10291 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10292 (usr_store_inferior_registers): Likewise.
10293 (regsets_store_inferior_registers): Likewise.
10295 2008-07-31 Rolf Jansen <rj@surtec.com>
10296 Pedro Alves <pedro@codesourcery.com>
10298 * configure.ac: Check for memmem declaration.
10299 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10300 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10301 (disable_packet_qfThreadInfo): Unconditionally compile.
10302 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10303 * configure, config.in: Regenerate.
10305 2008-07-28 Doug Kwan <dougkwan@google.com>
10307 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10308 (linux_write_memory): Remove declaration of errno.
10310 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10312 * linux-low.c (handle_extended_wait): Do not use "status"
10313 variable uninitialized.
10315 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10317 * server.c (handle_v_attach): Inhibit reporting dll changes.
10319 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10321 * remote-utils.c (prepare_resume_reply): If requested, don't
10322 output "thread:TID" in the T stop reply.
10324 * server.c (disable_packet_vCont, disable_packet_Tthread)
10325 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10326 (handle_query): If requested, disable support for qC, qfThreadInfo
10328 (handle_v_requests): If requested, disable support for vCont.
10329 (gdbserver_show_disableable): New.
10330 (main): Handle --disable-packet and --disable-packet=LIST.
10332 * server.h (disable_packet_vCont, disable_packet_Tthread)
10333 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10335 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10337 * server.c (gdbserver_usage): Mention --version.
10339 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10341 * Makefile.in (gdbreplay.o): New rule.
10343 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10345 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10346 message, not gdbserver.
10348 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10349 Nathan Sidwell <nathan@codesourcery.com>
10350 Joseph Myers <joseph@codesourcery.com>
10352 * acinclude.m4: Include ../../config/acx.m4.
10353 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10354 * configure, config.in: Regenerate.
10355 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10356 * server.c (gdbserver_version): Print PKGVERSION.
10357 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10358 (main): Adjust gdbserver_usage calls.
10359 * gdbreplay.c (version, host_name): Add declarations.
10360 (gdbreplay_version, gdbreplay_usage): New.
10361 (main): Accept --version and --help options.
10363 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10365 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10366 (arm_breakpoint_at): Handle Thumb.
10367 (the_low_target): Add comment.
10369 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10371 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10373 2008-05-09 Doug Evans <dje@google.com>
10375 * server.h (decode_search_memory_packet): Declare.
10376 * remote-utils.c (decode_search_memory_packet): New fn.
10377 * server.c (handle_search_memory_1): New fn.
10378 (handle_search_memory): New fn.
10379 (handle_query): Process qSearch:memory packets.
10381 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10383 * regcache.c (registers_length): Remove.
10384 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10385 full register packet.
10386 * regcache.h (registers_length): Remove prototype.
10387 * server.h (PBUFSIZ): Define to 16384.
10389 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10391 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10392 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10393 powerpc-64l.o, and powerpc-altivec64l.o.
10394 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10395 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10396 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10397 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10398 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10401 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10402 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10403 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10404 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10405 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10406 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10407 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10408 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10409 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10410 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10413 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10414 (init_registers_powerpc_32l): ... this new prototype.
10415 (init_registers_powerpc_32): Remove, replace by ...
10416 (init_registers_powerpc_altivec32l): ... this new prototype.
10417 (init_registers_powerpc_e500): Remove, replace by ...
10418 (init_registers_powerpc_e500l): ... this new prototype.
10419 (init_registers_ppc64): Remove, replace by ...
10420 (init_registers_powerpc_64l): ... this new prototype.
10421 (init_registers_powerpc_64): Remove, replace by ...
10422 (init_registers_powerpc_altivec64l): ... this new prototype.
10423 (ppc_num_regs): Set to 73.
10424 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10425 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10426 (ppc_cannot_store_register): Handle orig_r3 and trap.
10427 (ppc_arch_setup): Update init_registers_... calls.
10428 (ppc_fill_gregset): Handle orig_r3 and trap.
10430 * inferiors.c (clear_inferiors): Reset current_inferior.
10432 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10434 * acinclude.m4: Add override.m4.
10435 * configure: Regenerate.
10437 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10439 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10440 initial call to init_register_ppc64.
10442 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10444 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10445 single powerpc*-*-linux* case.
10446 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10448 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10450 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10451 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10453 * linux-ppc-low.c: Include <elf.h>.
10454 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10455 (ppc_hwcap): New global variable.
10456 (ppc_regmap): Remove __SPE__ #ifdef sections.
10457 (ppc_regmap_e500): New global variable.
10458 (ppc_cannot_store_register): Update __SPE__ special case.
10459 (ppc_get_hwcap): New function.
10460 (ppc_arch_setup): Use it to determine whether inferior supports
10461 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10462 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10463 Do not access registers if target does not support AltiVec.
10464 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10465 Do not access registers if target does not support SPE.
10466 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10468 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10470 * linux-low.c (disabled_regsets, num_regsets): New.
10471 (use_regsets_p): Delete.
10472 (linux_wait_for_process): Clear disabled_regsets.
10473 (regsets_fetch_inferior_registers): Check and set it.
10474 (regsets_store_inferior_registers): Likewise.
10475 (linux_fetch_registers, linux_store_registers): Do not use
10477 (initialize_low): Allocate disabled_regsets.
10479 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10481 * Makefile.in (LIBOBJS): New.
10482 (OBS): Use LIBOBJS.
10483 (memmem.o): New rule.
10484 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10485 * configure: Regenerated.
10487 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10489 * server.c (handle_query): Never return "unsupported" for
10490 qXfer:features:read queries.
10492 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10494 * server.c (get_features_xml): Fix inverted condition.
10495 (handle_query): Always support qXfer:feature:read.
10497 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10499 * server.c (wrapper_argv): New.
10500 (start_inferior): Handle wrapper_argv. If set, expect an extra
10502 (gdbserver_usage): Document --wrapper.
10503 (main): Parse --wrapper.
10505 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10507 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10508 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10509 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10510 (ppc_set_pc): Likewise.
10511 (ppc_arch_setup): New function.
10512 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10513 of collect_register.
10514 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10516 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10518 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10519 instead of linux-ppc64-low.o.
10520 * linux-ppc64-low.c: Remove file.
10521 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10522 (linux-ppc64-low.o): Remove rule.
10524 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10525 (init_registers_powerpc_64): Likewise.
10526 (ppc_regmap): Conditionally define depending on __powerpc64__.
10527 (ppc_cannot_store_register): Do not special-case "fpscr" when
10528 compiled on __powerpc64__.
10529 (ppc_collect_ptrace_register): New function.
10530 (ppc_supply_ptrace_register): New function.
10531 (ppc_breakpoint): Change type to "unsigned int".
10532 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10533 (the_low_target): Conditionally provide initializers for the
10534 arch_setup member depending on __powerpc64__. Install
10535 collect_ptrace_register and supply_ptrace_register members.
10537 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10539 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10540 * server.c (gdbserver_xmltarget): Define.
10541 (get_features_xml): Use it to replace "target.xml" and arch_string.
10543 * configure.srv: Remove srv_xmltarget. Add XML files that were
10544 mentioned there to srv_xmlfiles instead. Remove conditional tests
10545 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10546 srv_xmlfiles and srv_regobj to include all possible choices.
10547 * configure.ac (srv_xmltarget): Remove.
10548 (srv_xmlfiles): Do not add "target.xml".
10549 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10550 checks for supplementary target information.
10551 * configure: Regenerate.
10552 * Makefile.in (XML_TARGET): Remove.
10553 (target.xml): Remove rule.
10554 (clean): Do not clean up target.xml.
10555 (.PRECIOUS): Do not mention target.xml.
10557 * target.h (struct target_ops): Remove arch_string member.
10558 * linux-low.c (linux_arch_string): Remove.
10559 (linux_target_ops): Remove arch_string initializer.
10560 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10561 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10562 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10563 * spu-low.c (spu_arch_string): Remove.
10564 (spu_target_ops): Remove arch_string initializer.
10565 * win32-low.c (win32_arch_string): Remove.
10566 (win32_target_ops): Remove arch_string initializer.
10567 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10568 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10569 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10571 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10573 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10574 by collect_ptrace_register and supply_ptrace_register hooks.
10575 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10576 instead of checking for the_low_target.left_pad_xfer.
10577 (usr_store_inferior_registers): Use collect_ptrace_register callback
10578 instead of checking for the_low_target.left_pad_xfer.
10580 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10581 (s390_supply_ptrace_register): Likewise.
10582 (s390_fill_gregset): Call s390_collect_ptrace_register.
10583 (the_low_target): Update.
10585 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10586 (ppc_supply_ptrace_register): Likewise.
10587 (the_low_target): Update.
10589 * linux-i386-low.c (the_low_target): Update.
10590 * linux-x86-64-low.c (the_low_target): Update.
10592 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10594 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10595 reg-s390.o and reg-s390x.o.
10597 * linux-low.c (new_inferior): New global variable.
10598 (linux_create_inferior, linux_attach): Set it.
10599 (linux_wait_for_process): Call the_low_target.arch_setup after the
10600 target has stopped for the first time.
10601 (initialize_low): Do not call the_low_target.arch_setup.
10603 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10604 (s390_set_pc): Likewise.
10605 (s390_arch_setup): New function.
10606 (the_low_target): Use s390_arch_setup as arch_setup routine.
10608 * regcache.c (realloc_register_cache): New function.
10609 (set_register_cache): Call it for each existing regcache.
10611 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10613 * server.h (init_registers): Remove prototype.
10615 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10616 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10617 instead of init_registers ().
10618 * linux-arm-low.c (init_registers_arm): Add prototype.
10619 (init_registers_arm_with_iwmmxt): Likewise.
10620 (the_low_target): Add initializer for arch_setup field.
10621 * linux-cris-low.c (init_registers_cris): Add prototype.
10622 (the_low_target): Add initializer for arch_setup field.
10623 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10624 (the_low_target): Add initializer for arch_setup field.
10625 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10626 (the_low_target): Add initializer for arch_setup field.
10627 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10628 (the_low_target): Add initializer for arch_setup field.
10629 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10630 (the_low_target): Add initializer for arch_setup field.
10631 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10632 (the_low_target): Add initializer for arch_setup field.
10633 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10634 (init_registers_mips64_linux): Likewise.
10635 (the_low_target): Add initializer for arch_setup field.
10636 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10637 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10638 (the_low_target): Add initializer for arch_setup field.
10639 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10640 (init_registers_powerpc_64): Likewise.
10641 (the_low_target): Add initializer for arch_setup field.
10642 * linux-s390-low.c (init_registers_s390): Add prototype.
10643 (init_registers_s390x): Likewise.
10644 (the_low_target): Add initializer for arch_setup field.
10645 * linux-sh-low.c (init_registers_sh): Add prototype.
10646 (the_low_target): Add initializer for arch_setup field.
10647 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10648 (the_low_target): Add initializer for arch_setup field.
10649 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10650 (the_low_target): Add initializer for arch_setup field.
10652 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10653 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10654 instead of init_registers ().
10655 * win32-arm-low.c (init_registers_arm): Add prototype.
10656 (the_low_target): Add initializer for arch_setup field.
10657 * win32-i386-low.c (init_registers_i386): Add prototype.
10658 (the_low_target): Add initializer for arch_setup field.
10660 * spu-low.c (init_registers_spu): Add prototype.
10661 (initialize_low): Call initialie_registers_spu () instead of
10662 initialize_registers ().
10664 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10666 * server.c (handle_v_requests): When handling the vRun and vAttach
10667 packets, if already debugging a process, don't kill it. Return an
10670 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10672 * server.c (handle_query): Correct length check.
10674 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10676 * win32-low.c (do_initial_child_stuff): Add process handle
10677 parameter. Set current_process_handle and current_process_id from the
10678 parameters. Clear globals.
10679 (win32_create_inferior): Don't set current_process_handle and
10680 current_process_id here. Instead pass them on the call to
10681 do_initial_child_stuff.
10682 (win32_attach): Likewise.
10683 (win32_clear_inferiors): New.
10684 (win32_kill): Don't close the current process handle or the
10685 current thread handle here. Instead call win32_clear_inferiors.
10686 (win32_detach): Don't open a new handle to the process. Call
10687 win32_clear_inferiors.
10688 (win32_join): Don't rely on current_process_handle; open a new
10689 handle using the process id.
10690 (win32_wait): Call win32_clear_inferiors when the inferior process
10693 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10695 * server.c (monitor_show_help): Add "exit".
10697 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10699 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10700 (clean): Add reg-xtensa.c.
10701 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10702 * configure.srv (xtensa*-*-linux*) New target.
10703 * linux-xtensa-low.c: New.
10704 * xtensa-xtregs.c: New.
10706 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10708 * hostio.c: Don't include errno.h.
10709 (errno_to_fileio_errno): Move to hostio-errno.
10710 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10711 error number outputting to the target->hostio_last_error callback.
10712 (hostio_packet_error): Use FILEIO_EINVAL directly.
10713 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10714 calls to hostio_error.
10715 * hostio-errno.c: New.
10716 * server.h (hostio_last_error_from_errno): Declare.
10717 * target.h (target_ops): Add hostio_last_error member.
10718 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10719 as hostio_last_error handler.
10720 * spu-low.c (spu_target_ops): Likewise.
10721 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10722 (wince_hostio_last_error): New functions.
10723 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10724 as hostio_last_error handler.
10725 (win32_target_ops) [!_WIN32_WCE]: Register
10726 hostio_last_error_from_errno as hostio_last_error handler.
10727 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10728 (hostio-errno.o): New rule.
10729 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10730 * configure.srv (srv_hostio_err_objs): New variable. Default to
10732 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10733 * configure: Regenerate.
10735 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10737 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10738 (linux_kill, linux_detach): Clean up the process list.
10739 * remote-utils.c (remote_open): Improve port number parsing.
10740 (putpkt_binary, input_interrupt): Only send interrupts if the target
10742 * server.c (extended_protocol): Make static.
10743 (attached): Define earlier.
10744 (exit_requested, response_needed, program_argv): New variables.
10745 (target_running): New.
10746 (start_inferior): Clear attached here.
10747 (attach_inferior): Set attached here.
10748 (require_running): Define.
10749 (handle_query): Use require_running and target_running. Implement
10751 (handle_v_attach, handle_v_run): New.
10752 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10753 (gdbserver_usage): Update.
10754 (main): Redo argument parsing. Handle --debug and --multi. Handle
10755 --attach along with other options or after the port. Save
10756 program_argv. Support no initial program. Resynchronize
10757 communication with GDB after an error. Handle "monitor exit".
10758 Use require_running and target_running. Always allow the extended
10759 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10760 restart in extended mode.
10761 * README: Refer to the GDB manual. Update --attach usage.
10763 2007-12-20 Andreas Schwab <schwab@suse.de>
10765 * linux-low.c (STACK_SIZE): Define.
10766 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10767 (linux_test_for_tracefork): Likewise.
10769 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10771 * linux-low.c (linux_wait_for_event): Update messages. Do not
10772 reinsert auto-delete breakpoints.
10773 * mem-break.c (struct breakpoint): Change return type of handler to
10775 (set_breakpoint_at): Update handler type.
10776 (reinsert_breakpoint_handler): Return 1 instead of calling
10778 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10780 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10781 * mem-break.h (set_breakpoint_at): Update handler type.
10782 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10783 * win32-low.c (auto_delete_breakpoint): New.
10784 (get_child_debug_event): Use it.
10786 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10788 * configure.ac: Check for pread and pwrite.
10789 * hostio.c (handle_pread): Fall back to lseek and read.
10790 (handle_pwrite): Fall back to lseek and write.
10791 * config.in, configure: Regenerated.
10793 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10795 * server.c (myresume): Add own_buf argument.
10796 (main): Update calls.
10798 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10800 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10801 * remote-utils.c (remote_open): Do not call disable_async_io.
10802 (block_async_io): Delete.
10803 (unblock_async_io): Make static.
10804 (initialize_async_io): New.
10805 * server.c (handle_v_cont): Handle async I/O here.
10806 (myresume): Likewise. Move other common resume tasks here...
10807 (main): ... from here. Call initialize_async_io. Disable async
10808 I/O before the main loop.
10809 * server.h (initialize_async_io): Declare.
10810 (block_async_io, unblock_async_io): Delete prototypes.
10811 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10813 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10815 * remote-utils.c (readchar): Allow binary data in received messages.
10817 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10819 * win32-low.c (attaching): New global.
10820 (win32_create_inferior): Clear the `attaching' global.
10821 (win32_attach): Set the `attaching' global.
10822 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10823 attaching. Only set a breakpoint at the entry point if not
10826 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10828 * server.c (main): Don't report dll events on the initial
10829 connection on attaches.
10831 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10833 * server.c (main): Relax numerical bases supported for the pid of
10834 the --attach command line argument.
10836 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10838 * win32-low.c (win32_attach): Call OpenProcess before
10839 DebugActiveProcess, not after. Add last error output to error
10842 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10844 * win32-low.c (win32_get_thread_context)
10845 (win32_set_thread_context): New functions.
10846 (thread_rec): Use win32_get_thread_context.
10847 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10848 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10851 2007-12-03 Leo Zayas
10852 Pedro Alves <pedro_alves@portugalmail.pt>
10854 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10856 (child_add_thread): Minor cleanup.
10857 (child_continue): Resume artificially suspended threads before
10858 calling ContinueDebugEvent.
10859 (suspend_one_thread): New.
10860 (fake_breakpoint_event): New.
10861 (get_child_debug_event): Change return type to int. Check here if
10862 gdb sent an interrupt request. If a soft interrupt was requested,
10863 fake a breakpoint event. Return 0 if there is no event to handle,
10865 (win32_wait): Don't check here if gdb sent an interrupt request.
10866 Ensure there is a valid event to handle.
10867 (win32_request_interrupt): Add soft interruption method as last
10870 2007-12-03 Leo Zayas
10871 Pedro Alves <pedro_alves@portugalmail.pt>
10873 * win32-low.h (win32_thread_info): Add descriptions to the
10874 structure members. Replace `suspend_count' counter by a
10876 * win32-low.c (thread_rec): Update condition of when to get the
10877 context from the inferior. Rely on ContextFlags being set if it
10878 has already been retrieved. Only suspend the inferior thread if
10879 we haven't already. Warn if that fails.
10880 (continue_one_thread): s/suspend_count/suspended/. Only call
10881 ResumeThread once. Warn if that fails.
10883 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10885 * win32-low.c (win32_wait): Don't read from the inferior when it
10886 has already exited.
10888 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10890 * Makefile.in (win32_low_h): New variable.
10891 (win32-low.o): Add dependency on $(win32_low_h).
10892 (win32-arm-low.o, win32-i386-low.o): New rules.
10894 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10896 * hostio.c: Correct copyright year.
10898 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10900 * Makefile.in (OBS): Add hostio.o.
10901 (hostio.o): New rule.
10902 * server.h (handle_vFile): Declare.
10903 * hostio.c: New file.
10904 * server.c (handle_v_requests): Take packet_len and new_packet_len
10905 for binary packets. Call handle_vFile.
10906 (main): Update call to handle_v_requests.
10908 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10910 * linux-low.c: Include <sched.h>.
10912 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10914 * linux-low.c (linux_tracefork_grandchild): New.
10915 (linux_tracefork_child): Use clone.
10916 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10918 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10920 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10922 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10924 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10926 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10928 * inferiors.c (change_inferior_id): Delete.
10929 (add_pid_to_list, pull_pid_from_list): New.
10930 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10931 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10932 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10933 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10934 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10935 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10936 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10937 (using_threads): Always set to 1.
10938 (handle_extended_wait): New.
10939 (add_process): Do not set TID.
10940 (linux_create_inferior): Set must_set_ptrace_flags.
10941 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10942 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10943 (linux_thread_alive): Rename TID argument to LWPID.
10944 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10945 (linux_wait_for_event): Do not use TID or check using_threads. Update
10946 call to dead_thread_notify. Call handle_extended_wait.
10947 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10948 (send_sigstop): Delete sigstop_sent.
10949 (wait_for_sigstop): Avoid TID.
10950 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10951 (linux_test_for_tracefork): New.
10952 (linux_lookup_signals): Use thread_db_active and
10953 linux_supports_tracefork_flag.
10954 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10955 * linux-low.h (get_process_thread): Avoid TID.
10956 (struct process_ifo): Move thread_known and tid to the end. Remove
10958 (linux_attach_lwp, thread_db_init): Update prototypes.
10959 * server.h (change_inferior_id): Delete prototype.
10960 (add_pid_to_list, pull_pid_from_list): New prototypes.
10961 * thread-db.c (thread_db_use_events): New.
10962 (find_first_thread): Rename to...
10963 (find_one_thread): ...this. Update callers and messages. Do not
10964 call fatal. Check thread_db_use_events. Do not call
10965 change_inferior_id or new_thread_notify.
10966 (maybe_attach_thread): Update. Do not call new_thread_notify.
10967 (thread_db_init): Set thread_db_use_events. Check use_events.
10968 * utils.c (fatal, warning): Correct message prefix.
10970 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10972 * Makefile.in (clean): Remove new files.
10973 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10974 (powerpc-64.o, powerpc-64.c): New rules.
10975 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10976 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10978 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10980 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10981 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10982 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10983 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10984 (target_regsets): Add AltiVec and SPE register sets.
10985 * configure.ac: Check for AltiVec and SPE.
10986 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10987 (ppc_fill_vrregset, ppc_store_vrregset): New.
10988 (target_regsets): Add AltiVec register set.
10989 * configure: Regenerated.
10991 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10993 * linux-low.c (O_LARGEFILE): Define.
10994 (linux_read_memory): Use /proc/PID/mem.
10995 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10996 * configure, config.in: Regenerated.
10998 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11000 * linux-low.c (linux_wait_for_event): Do not pass signals while
11003 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11005 * win32-low.c (create_process): New.
11006 (win32_create_inferior): Use create_process instead of
11007 CreateProcess. If create_process failed retry appending an ".exe"
11008 suffix. Store the GetLastError result immediatelly after
11009 create_process calls and use it on the call to error.
11011 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11013 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11015 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11017 * configure.ac: Switch license to GPLv3.
11019 2007-08-01 Michael Snyder <msnyder@access-company.com>
11021 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11023 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11025 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11027 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11028 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11029 CloseToolhelp32Snapshot.
11030 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11031 CloseToolhelp32Snapshot.
11033 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11035 * server.c (main): Check for inferior exit before main loop.
11037 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11039 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11040 instead of on tmp_desc.
11042 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11043 Daniel Jacobowitz <dan@codesourcery.com>
11045 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11046 (add_thread): Minor cleanups.
11047 (clear_inferiors): Move lower in the file. Clear the DLL
11049 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11050 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11051 (xml_escape_text): New.
11052 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11054 (handle_v_cont): Report errors.
11055 (gdbserver_version): Update.
11056 (main): Correct size of own_buf. Do not report initial DLL events.
11057 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11058 (unloaded_dll, xml_escape_text): New.
11059 * win32-low.c (enum target_waitkind): Update comments.
11060 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11061 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11062 (win32_EnumProcessModules, win32_GetModuleInformation)
11063 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11064 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11065 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11066 (win32_Module32First, win32_Module32Next, load_toolhelp)
11067 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11068 (get_child_debug_event): Handle DLL events.
11069 (win32_wait): Likewise.
11071 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11073 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11074 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11076 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11078 * win32-low.c (handle_output_debug_string): Ignore event if not
11081 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11083 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11085 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11087 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11089 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11091 * inferiors.c (change_inferior_id): Add comment.
11092 * linux-low.c (check_removed_breakpoint): Add an early
11093 prototype. Improve debug output.
11094 (linux_attach): Doc update.
11095 (linux_detach_one_process, linux_detach): Clean up before releasing
11097 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11098 * linux-low.h (struct process_info): Doc improvement.
11099 * mem-break.c (delete_all_breakpoints): New.
11100 * mem-break.h (delete_all_breakpoints): New prototype.
11101 * thread-db.c (find_first_thread): New.
11102 (thread_db_create_event): Call it instead of
11103 thread_db_find_new_threads. Clean up unused variables.
11104 (maybe_attach_thread): Remove first thread handling.
11105 (thread_db_find_new_threads): Use find_first_thread.
11106 (thread_db_get_tls_address): Likewise.
11108 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11110 * thread-db.c (thread_db_find_new_threads): Add prototype.
11111 (thread_db_create_event): Check for the main thread before adding
11113 (maybe_attach_thread): Only enable event reporting if TID == 0.
11114 (thread_db_get_tls_address): Check for new threads.
11116 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11118 * linux-low.c (linux_create_inferior): Try execv before execvp.
11119 * spu-low.c (spu_create_inferior): Likewise.
11121 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11123 * linux-low.c (linux_create_inferior): Change execv to execvp.
11124 * spu-low.c (spu_create_inferior): Likewies.
11126 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11128 * Makefile.in (clean): Clean new files instead of deleted ones.
11129 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11130 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11132 * configure.srv: Specify XML files and new regformats for MIPS and
11134 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11135 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11136 an entry for the restart register.
11137 (mips_cannot_fetch_register, mips_cannot_store_register)
11138 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11139 register names to match the XML descriptions.
11140 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11141 restart register instead of $0.
11143 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11144 Markus Deuling <deuling@de.ibm.com>
11146 * remote-utils.c (decode_xfer_write): New function.
11147 * server.h (decode_xfer_write): Add prototype.
11148 * server.c (handle_query): Add PACKET_LEN argument. Support
11149 qXfer:spu:read and qXfer:spu:write packets.
11150 (main): Pass packet_len to handle_query.
11151 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11152 * target.h (target_ops): Add qxfer_spu.
11154 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11156 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11157 accessing non-seekable spufs files.
11159 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11161 * server.c (handle_query): Add reply for qC packet.
11163 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11164 Leo Zayas <lerele@champenstudios@com>
11166 * server.h (check_remote_input_interrupt_request): New function.
11167 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11168 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11169 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11170 (check_remote_input_interrupt_request): New function.
11171 * server.h (check_remote_input_interrupt_request): Declare.
11172 * win32-low.c (winapi_DebugBreakProcess,
11173 winapi_GenerateConsoleCtrlEvent): New typedefs.
11174 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11176 (win32_wait): Check for remote interrupt request
11177 with check_remote_input_interrupt_request.
11178 (win32_request_interrupt): New function.
11179 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11181 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11183 * win32-low.c (debug_registers_changed,
11184 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11185 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11186 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11187 (thread_rec): Get context using the low target.
11188 (child_add_thread): Call thread_added on the low target,
11189 which does the same thing.
11191 (do_initial_child_stuff): Remove debug registers references.
11192 Set context using the low target. Resume threads after
11193 setting the contexts.
11194 (child_continue): Remove dead variable. Remove debug
11195 registers references.
11196 (child_fetch_inferior_registers): Go through the low target.
11197 (do_child_store_inferior_registers): Remove.
11198 (child_store_inferior_registers): Go through the low target.
11199 (win32_resume): Remove debug registers references.
11200 Set context using the low target.
11201 (handle_exception): Change return type to void. Don't record
11202 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11203 first chance exception.
11204 (get_child_debug_event): Change return type to void. Remove
11205 goto loop. Always return after waiting for debug event.
11206 (win32_wait): Convert to switch statement. Handle spurious
11209 * win32-i386-low.c (debug_registers_changed,
11210 debug_registers_used): New.
11211 (initial_stuff): Rename to ...
11212 (i386_initial_stuff): ... this. Clear debug registers
11214 (store_debug_registers): Delete.
11215 (i386_get_thread_context): New.
11216 (load_debug_registers): Delete.
11217 (i386_set_thread_context): New.
11218 (i386_thread_added): New.
11219 (single_step): Rename to ...
11220 (i386_single_step): ... this.
11221 (do_fetch_inferior_registers): Rename to ...
11222 (i386_fetch_inferior_register): ... this.
11223 (i386_store_inferior_register): New.
11224 (the_low_target): Adapt to new interface.
11226 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11227 (arm_get_thread_context): New.
11228 (arm_set_thread_context): New.
11230 (do_fetch_inferior_registers): Rename to ...
11231 (arm_fetch_inferior_register): ... this.
11232 (arm_store_inferior_register): New.
11233 (arm_wince_breakpoint): Reimplement as unsigned long.
11234 (arm_wince_breakpoint_len): Define.
11235 (the_low_target): Adapt to new interface.
11237 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11238 load_debug_registers. Add get_thread_context, set_thread_context,
11239 thread_added and store_inferior_register. Rename
11240 fetch_inferior_registers to fetch_inferior_register.
11241 (regptr): Remove declaration.
11243 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11245 * linux-low.c (linux_detach): Change return type to int. Return 0.
11246 * spu-low.c (spu_detach): Likewise.
11248 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11250 * target.h (target_ops): Change return type of detach to int.
11252 (join_inferior): New.
11253 * server.c (main): Don't skip detach support on mingw32.
11254 If the inferior doesn't support detaching return error.
11255 Call join_inferior instead of using waitpid.
11256 * linux-low.c (linux_join): New.
11257 (linux_target_op): Add linux_join.
11258 * spu-low.c (spu_join): New.
11259 (spu_target_ops): Add spu_join.
11260 * win32-low.c (win32_detach): Adapt to new interface.
11261 Reopen current_process_handle before detaching. Issue a child
11262 resume before detaching.
11264 (win32_target_op): Add win32_join.
11266 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11268 * win32-low.c (win32-attach): Fix return value.
11269 * target.h (target_ops): Describe ATTACH return values.
11271 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11273 * win32-low.c (GETPROCADDRESS): Define.
11274 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11275 (winapi_DebugSetProcessKillOnExit): Likewise.
11276 (win32_create_inferior): Force usage of ansi CreateProcessA.
11277 (win32_attach): Use GETPROCADDRESS.
11278 (win32_detach): Likewise.
11280 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11282 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11284 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11286 * win32-low.c: Commit leftover changes from 2007-03-29.
11288 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11290 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11291 fields short instead of int. Add explicit padding.
11292 (i387_cache_to_fsave): Remove unnecessary casts.
11293 (i387_fsave_to_cache): Doc fix.
11294 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11296 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11298 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11299 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11301 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11303 * configure.srv (arm*-*-mingw32ce*): Move near the other
11306 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11308 * configure.ac: Add errno checking.
11309 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11310 sys/file.h and malloc.h.
11311 (AC_CHECK_DECLS): Add perror.
11312 (srv_mingwce): Handle.
11313 * configure.srv (i[34567]86-*-cygwin*): Add
11314 win32-i386-low.o to srv_tgtobj.
11315 (i[34567]86-*-mingw*): Likewise.
11316 (arm*-*-mingw32ce*): Add case.
11317 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11318 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11319 [__MINGW32CE__] (strerror): New function.
11320 [__MINGW32CE__] (errno): Define to GetLastError.
11321 [__MINGW32CE__] (COUNTOF): New macro.
11322 (remote_open): Remove extra close call.
11323 * mem-break.c (delete_breakpoint_at): New function.
11324 * mem-break.h (delete_breakpoint_at): Declare.
11325 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11326 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11327 [USE_WIN32API] (read, write): Add char* casts.
11328 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11329 * server.h: Include wincecompat.h on Windows CE.
11330 [HAVE_ERRNO_H]: Check.
11331 (perror): Declare if not declared.
11332 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11333 (perror_with_name): Remove errno declaration.
11334 * wincecompat.h: New.
11335 * wincecompat.c: New.
11336 * win32-low.h: New.
11337 * win32-arm-low.c: New.
11338 * win32-i386-low.c: New.
11339 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11340 (OUTMSG2): Make it safe.
11342 (COUNTOF): New macro.
11343 (NUM_REGS): Get it from the low target.
11344 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11345 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11346 (thread_rec): Let low target handle debug registers.
11347 (child_add_thread): Likewise.
11348 (child_init_thread_list): Likewise.
11349 (continue_one_thread): Likewise.
11351 (do_child_fetch_inferior_registers): Move to ...
11352 * win32-i386-low.c: ... here, and rename to ...
11353 (do_fetch_inferior_registers): ... this.
11354 * win32-low.c (child_fetch_inferior_registers):
11355 Go through the low target.
11356 (do_child_store_inferior_registers): Use regptr.
11357 (strwinerror): New function.
11358 (win32_create_inferior): Handle Windows CE.
11359 Use strwinerror instead of strerror on Windows error
11360 codes. Add program to the error output.
11361 Don't close the main thread handle on Windows CE.
11362 (win32_attach): Use coredll.dll on Windows CE.
11363 (win32_kill): Close current process and current
11365 (win32_detach): Use coredll.dll on Windows CE.
11366 (win32_resume): Let low target handle debug registers, and
11368 (handle_exception): Add/Remove initial breakpoint. Avoid
11369 non-existant WSTOPSIG on Windows CE.
11370 (win32_read_inferior_memory): Cast to remove warning.
11371 (win32_arch_string): Go through the low target.
11372 (initialize_low): Call set_breakpoint_data with the low
11373 target's breakpoint.
11374 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11375 FOP_REGNUM, mappings): Move to ...
11376 * win32-i386-low.c: ... here.
11377 * win32-low.c (win32_thread_info): Move to ...
11378 * win32-low.h: ... here.
11379 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11380 win32-arm-low.c and wincecompat.c.
11381 (all:): Add $EXEEXT.
11382 (install-only:): Likewise.
11383 (gdbserver:): Likewise.
11384 (gdbreplay:): Likewise.
11385 * config.in: Regenerate.
11386 * configure: Regenerate.
11388 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11390 * win32-low.c: Rename typedef thread_info to
11391 win32_thread_info throughout.
11393 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11395 * win32-i386-low.c: Rename to ...
11396 * win32-low.c: ... this.
11397 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11398 * Makefile.in: Likewise.
11400 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11402 * remote-utils.c (monitor_output): Constify msg parameter.
11403 * server.h (monitor_output): Likewise.
11404 * win32-i386-low.c (handle_output_debug_string): New.
11405 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11406 handle_output_debug_string.
11407 (get_child_debug_event): Likewise.
11409 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11411 * server.c (main): Correct strtoul check.
11413 2007-03-27 Jon Ringle <jon@ringle.org>
11415 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11417 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11419 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11421 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11423 * terminal.h: Check HAVE_SGTTY_H.
11425 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11427 * remote-utils.c (remote_open): Print out the assigned port number.
11429 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11431 * remote-utils.c (monitor_output): New function.
11432 * server.c (debug_threads): Define here.
11433 (monitor_show_help): New function.
11434 (handle_query): Handle qRcmd.
11435 (main): Do not handle 'd' packet.
11436 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11437 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11440 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11442 * Makefile.in (EXEEXT): New.
11443 (clean): Use $(EXEEXT).
11445 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11447 * target.h (target_ops): Rename send_signal to request_interrupt,
11448 and remove enum target_signal parameter.
11449 * linux-low.c (linux_request_interrupt): Rename from
11450 linux_send_signal, and always send SIGINT.
11451 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11452 and always send SIGINT.
11453 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11455 (input_interrupt): Likewise.
11457 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11459 * server.c (get_features_xml): Check if target implemented
11461 * win32-i386-low.c (win32_arch_string): New.
11462 (win32_target_ops): Add win32_arch_string as arch_string member.
11464 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11466 * spu-low.c (spu_arch_string): New.
11467 (spu_target_ops): Add spu_arch_string.
11469 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11471 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11472 * configure.ac: Do not check for terminal.h.
11473 * configure, config.in: Regenerated.
11475 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11477 * Makefile.in (OBS): Add $(XML_BUILTIN).
11478 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11480 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11481 (arm-with-iwmmxt.c): New.
11482 * config.in, configure: Regenerate.
11483 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11484 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11485 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11486 (arm*-*-linux*): Add iWMMXt and regset support.
11487 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11488 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11489 (arm_store_wmmxregset, target_regsets): New.
11490 * server.c (get_features_xml): Take annex argument. Check builtin
11492 (handle_query): Handle multiple annexes.
11494 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11496 * remote-utils.c [USE_WIN32API] (read, write): Define.
11497 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11500 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11502 * linux-i386-low.c (the_low_target): Set arch_string.
11503 * linux-x86-64-low.c (the_low_target): Likewise.
11504 * linux-low.c (linux_arch_string): New.
11505 (linux_target_ops): Add it.
11506 * linux-low.h (struct linux_target_ops): Add arch_string.
11507 * server.c (write_qxfer_response): Use const void * for DATA.
11508 (get_features_xml): New.
11509 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11510 * target.h (struct target_ops): Add arch_string method.
11512 2007-01-03 Denis Pilat <denis.pilat@st.com>
11513 Daniel Jacobowitz <dan@codesourcery.com>
11515 * linux-low.c (linux_kill): Handle being called with no threads.
11516 * win32-i386-low.c (win32_kill): Likewise.
11517 (get_child_debug_event): Clear current_process_handle.
11519 2006-12-30 Denis PILAT <denis.pilat@st.com>
11520 Daniel Jacobowitz <dan@codesourcery.com>
11522 * remote-utils.c (remote_open): Check the type of specified
11523 serial port devices before opening them.
11524 * server.c (main): Kill the inferior if an error occurs during
11525 the first remote_open.
11527 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11529 * README: Update supported targets.
11531 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11533 * Makefile.in (clean): Remove reg-mips64.c.
11534 (reg-mips64.c, reg-mips64.o): New rules.
11535 * configure.srv: Handle mips64. Include regset support for mips.
11536 * linux-mips-low.c (union mips_register): New.
11537 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11538 (mips_breakpoint, mips_breakpoint_at): Use int.
11539 (mips_collect_register, mips_supply_register)
11540 (mips_collect_register_32bit, mips_supply_register_32bit)
11541 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11542 (mips_store_fpregset, target_regsets): New.
11543 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11545 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11547 * configure.srv: Add target "spu*-*-*".
11548 * Makefile.in (clean): Remove reg-spu.c.
11549 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11550 * spu-low.c: New file.
11552 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11554 * configure.ac: Correct td_thr_tls_get_addr test.
11555 * configure: Regenerated.
11557 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11559 * linux-low.c (linux_wait_for_event): Reformat. Use the
11560 pass_signals array.
11561 * remote-utils.c (decode_address_to_semicolon): New.
11562 * server.c (pass_signals, handle_general_set): New.
11563 (handle_query): Mention QPassSignals for qSupported.
11564 (main): Call handle_general_set.
11565 * server.h (pass_signals, decode_address_to_semicolon): New.
11567 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11569 * server.c (handle_query): Correct error handling for read_auxv.
11571 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11573 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11574 and srv_linux_thread_db to yes.
11575 * linux-s390-low.c (s390_fill_gregset): New function.
11576 (target_regsets): Define data structure.
11578 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11580 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11581 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11582 * config.in, configure: Regenerated.
11583 * inferiors.c (gdb_id_to_thread): New function.
11584 (gdb_id_to_thread_id): Use it.
11585 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11586 * linux-low.h (struct process_info): Add th member.
11587 (thread_db_get_tls_address): New prototype.
11588 * remote-utils.c (decode_address): Make non-static.
11589 * server.c (handle_query): Handle qGetTLSAddr.
11590 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11591 * target.h (struct target_ops): Add get_tls_address.
11592 * thread-db.c (maybe_attach_thread): Save the thread handle.
11593 (thread_db_get_tls_address): New.
11595 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11597 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11598 (linux_resume_one_process): Take a siginfo_t *. Update all
11599 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11600 (struct pending_signals): Add a siginfo_t.
11601 (linux_wait_for_process): Always set last_status.
11602 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11603 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11604 * linux-low.h (struct process_info): Add last_status.
11606 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11608 * remote-utils.c (try_rle): New function.
11609 (putpkt_binary): Use it.
11611 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11613 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11614 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11615 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11616 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11617 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11620 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11622 * server.c (terminal_fd): New variable.
11623 (old_foreground_pgrp): Likewise.
11624 (restore_old_foreground_pgrp): New function.
11625 (start_inferior): Record the terminal file descriptor in terminal_fd
11626 and its original foreground group in old_foreground_pgrp. Register
11627 restore_old_foreground_pgrp with atexit().
11629 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11631 * server.c (handle_query): Correct qPart to qXfer.
11633 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11635 * configure.ac: Check for more headers which are missing on
11636 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11637 * configure.srv: Add Cygwin and mingw32.
11638 * remote-utils.c: Don't include headers unconditionally which
11639 are missing on mingw32. Include <winsock.h> for mingw32.
11640 (remote_open): Adjust for mingw32 support. Flush
11641 standard error after writing to it.
11642 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11643 (unblock_async_io, enable_async_io, disable_async_io)
11644 (readchar, getpkt): Update for Winsock support.
11645 (prepare_resume_reply): Expect a protocol signal number.
11646 * server.c: Disable <sys/wait.h> on mingw32.
11647 (start_inferior): Adjust for mingw32 support. Flush
11648 standard error after writing to it.
11649 (attach_inferior): Likewise. Use protocol signal
11651 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11653 * win32-i386-low.c: New file.
11654 * Makefile.in (XM_CLIBS): Set.
11655 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11656 (win32-i386-low.o): New dependency rule.
11657 * linux-low.c (linux_wait): Use target signal numbers.
11658 * target.h (struct target_ops): Doc fix.
11659 * server.h (target_signal_to_name): New prototype.
11660 * gdbreplay.c: Don't include headers unconditionally which
11661 are missing on mingw32. Include <winsock.h> for mingw32.
11662 (remote_close, remote_open): Adjust for Winsock support.
11663 * configure, config.in: Regenerated.
11665 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11667 * server.c (decode_xfer_read, write_qxfer_response): New.
11668 (handle_query): Take a packet length argument. Handle
11669 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11670 the qSupported response.
11671 (main): Update call to handle_query.
11673 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11675 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11676 (putpkt_binary): Renamed from putpkt and adjusted for binary
11678 (putpkt): New wrapper for putpkt_binary.
11679 (readchar): Don't mask off the high bit.
11680 (decode_X_packet): New function.
11681 * server.c (main): Call putpkt_binary if a handler sets the packet
11682 length. Save the length of the incoming packet. Handle 'X'.
11683 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11685 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11687 * server.c (handle_query): Handle qSupported.
11689 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11691 * remote-utils.c (all_symbols_looked_up): New variable.
11692 (look_up_one_symbol): Check it.
11693 * server.h (look_up_one_symbol): New declaration.
11694 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11696 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11698 * Makefile.in (linux-arm-low.o): Update dependencies.
11699 * linux-arm-low.c: Include "gdb_proc_service.h".
11700 (PTRACE_GET_THREAD_AREA): Define.
11701 (ps_get_thread_area): New function.
11703 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11705 * configure.srv (m68k*-*-uclinux*): New target.
11706 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11707 (linux_resume_one_process): Remove extraneous cast.
11708 (linux_read_offsets): New.
11709 (linux_target_op): Add linux_read_offsets on mmuless systems.
11710 * server.c (handle_query): Add qOffsets logic.
11711 * target.h (struct target_ops): Add read_offsets.
11713 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11715 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11716 (PTRACE_GET_THREAD_AREA): Define.
11717 (ps_get_thread_area): New function.
11718 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11719 (linux-x86-64-low.o): Update.
11721 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11723 * configure.ac: Remove checks for prfpregset_t.
11724 * gdb_proc_service.h: New file.
11725 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11726 new "gdb_proc_service.h".
11727 * proc-service.c: Likewise.
11728 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11729 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11730 * Makefile.in (gdb_proc_service_h): Updated.
11731 * configure, config.in: Regenerated.
11733 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11735 * remote-utils.c (prepare_resume_reply): Move declaration
11736 of gdb_id_from_wait to the top of the block.
11738 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11740 * linux-low.c (regsets_store_inferior_registers): Read the regset
11741 from the target before filling it.
11743 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11745 * server.c (attach_inferior): Return SIGTRAP for a successful
11748 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11750 * Makefile.in (OBS): Add version.o.
11751 (STAGESTUFF): Delete.
11752 (version.o): Add dependencies.
11753 (version.c): Replace rule.
11754 (clean): Remove version.c.
11755 * server.c (gdbserver_version): New.
11756 (gdbserver_usage): Use printf.
11757 (main): Handle --version and --help.
11758 * server.h (version, host_name): Add declarations.
11760 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11772 * linux-x86-64-low.c:
11774 * linux-s390-low.c:
11775 * linux-ppc64-low.c:
11777 * linux-mips-low.c:
11778 * linux-m68k-low.c:
11779 * linux-m32r-low.c:
11782 * linux-ia64-low.c:
11783 * linux-i386-low.c:
11784 * linux-crisv32-low.c:
11796 * gdbserver.1: Add (C) after Copyright. Update the FSF
11799 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11801 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11802 (arm_breakpoint_at): Recognize both breakpoints.
11803 (the_low_target): Use the correct breakpoint instruction.
11805 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11807 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11808 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11809 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11810 (the_low_target): Update.
11812 2005-10-25 Andreas Schwab <schwab@suse.de>
11814 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11816 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11817 (ia64_num_regs): Reduce to 462.
11819 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11821 * acinclude.m4: Correct quoting.
11822 * aclocal.m4: Regenerated.
11824 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11825 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11826 (thread_db_init): Call thread_db_err_str.
11827 * configure.ac: Check for TD_VERSION.
11828 * config.in, configure: Regenerated.
11830 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11832 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11834 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11836 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11837 is not available. Define HAVE_PTRACE_GETREGS if it is.
11838 * config.in, configure: Regenerated.
11839 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11840 * linux-i386-low.c, linux-m68k-low.c: Update to use
11841 HAVE_PTRACE_GETREGS.
11842 * linux-low.c (regsets_fetch_inferior_registers)
11843 (regsets_store_inferior_registers): Only return 0 if we processed
11845 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11846 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11848 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11850 * inferiors.c (struct thread_info): Add gdb_id.
11851 (add_thread): Add gdb_id argument.
11852 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11853 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11854 calls to add_thread.
11855 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11856 * server.c (handle_query): Use thread_to_gdb_id.
11857 (handle_v_cont, main): Use gdb_id_to_thread_id.
11858 * server.h (add_thread): Update prototype.
11859 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11862 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11864 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11865 left-padded registers.
11866 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11867 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11869 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11871 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11872 * configure: Regenerate.
11873 * config.in: Regenerate.
11874 * server.h (NEED_DECLARATION_STRERROR):
11875 Replace with !HAVE_DECL_STRERROR.
11877 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11879 * linux-low.c (linux_wait, linux_send_signal): Don't test
11880 an unsigned long variable for > 0 if it could be MAX_ULONG.
11881 * server.c (myresume): Likewise.
11882 * target.c (set_desired_inferior): Likewise.
11884 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11886 * configure.ac: Simplify and improve check for socklen_t.
11887 * configure, config.in: Regenerate.
11889 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11891 * acconfig.h: Remove.
11892 * configure.ac: Add a test for socklen_t. Use three-argument
11893 AC_DEFINE throughout.
11894 * config.in: Regenerated using autoheader 2.59.
11895 * configure: Regenerated.
11897 * gdbreplay.c (socklen_t): Provide a default.
11898 (remote_open): Use socklen_t.
11899 * remote-utils.c (socklen_t): Provide a default.
11900 (remote_open): Use socklen_t.
11901 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11904 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11906 * linux-low.c (linux_read_memory, linux_write_memory)
11907 (linux_read_auxv): Likewise.
11908 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11909 (check_mem_write): Likewise.
11910 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11912 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11913 (registers_from_string, register_data): Likewise.
11914 * server.c (handle_query, main): Likewise.
11915 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11916 (decode_M_packet): Likewise.
11917 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11918 * target.h (struct target_ops): Update read_memory, write_memory,
11920 (read_inferior_memory, write_inferior_memory): Update.
11921 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11922 to unsigned char *.
11923 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11924 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11925 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11926 linux-s390-low.c, linux-sh-low.c: Update for changes in
11927 read_inferior_memory and the_low_target->breakpoint.
11929 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11931 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11932 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11933 * configure.srv: Add powerpc64-*-linux*.
11934 * linux-ppc64-low.c: New file.
11936 2005-05-23 Orjan Friberg <orjanf@axis.com>
11938 * linux-cris-low.c: New file with support for CRIS.
11939 * linux-crisv32-low.c: Ditto for CRISv32.
11940 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11941 (clean): Add reg-cris.c and reg-crisv32.c.
11942 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11943 reg-crisv32.o, and reg-crisv32.c to make rules.
11944 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11945 recognized targets.
11947 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11949 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11950 of sizeof (PTRACE_XFER_TYPE).
11951 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11953 2005-05-12 Orjan Friberg <orjanf@axis.com>
11955 * target.h (struct target_ops): Add insert_watchpoint,
11956 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11957 pointers for hardware watchpoint support.
11958 * linux-low.h (struct linux_target_ops): Ditto.
11959 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11960 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11961 to linux_target_ops.
11962 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11964 * server.c (main): Recognize 'Z' and 'z' packets.
11966 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11968 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11969 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11970 (the_low_target): Add new members.
11972 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11974 * proc-service.c (ps_lgetregs): Search all_processes instead of
11977 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11979 * server.c (start_inferior): Change return type to int.
11980 (attach_inferior): Change sigptr to int *.
11981 (handle_v_cont, handle_v_requests): Change signal to int *.
11982 (main): Change signal to int.
11984 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11986 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11987 * configure.srv: Add m32r*-*-linux*.
11988 * linux-m32r-low.c: New file.
11990 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11992 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11994 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11996 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11997 Take unsigned long arguments for PIDs.
11998 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11999 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12000 (wait_for_sigstop, linux_resume_one_process)
12001 (regsets_fetch_inferior_registers, linux_send_signal)
12002 (linux_read_auxv): Likewise. Update the types of variables holding
12003 PIDs. Update format string specifiers.
12004 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12005 * remote-utils.c (prepare_resume_reply): Likewise.
12006 * server.c (cont_thread, general_thread, step_thread)
12007 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12009 (handle_query): Update format specifiers.
12010 (handle_v_cont, main): Use strtoul for thread IDs.
12011 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12012 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12013 (general_thread, step_thread, thread_from_wait)
12014 (old_thread_from_wait): Update.
12015 * target.h (struct thread_resume): Use unsigned long for THREAD.
12016 (struct target_ops): Use unsigned long for arguments to attach and
12019 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12021 * acinclude.m4: Include bfd/bfd.m4 directly.
12022 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12023 <agriffis@toolchain.org>.
12024 * aclocal.m4, configure: Regenerated.
12026 2005-01-07 Andrew Cagney <cagney@gnu.org>
12028 * configure.ac: Rename configure.in, require autoconf 2.59.
12029 * configure: Re-generate.
12031 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12033 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12034 LIBS when finished.
12035 * aclocal.m4: Regenerated.
12036 * configure: Regenerated.
12038 2004-11-21 Andreas Schwab <schwab@suse.de>
12040 * linux-m68k-low.c (m68k_num_gregs): Define.
12041 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12042 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12043 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12044 (m68k_breakpoint_at): New. Add to the_low_target.
12046 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12047 srv_linux_thread_db to yes.
12049 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12051 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12052 (ARCH_SET_FS): Likewise.
12053 (ARCH_GET_FS): Likewise.
12054 (ARCH_GET_GS): Likewise.
12056 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12058 * linux-i386-low.c (ps_get_thread_area): New.
12059 * linux-x86-64-low.c (ps_get_thread_area): New.
12060 * linux-low.c: Include <sys/syscall.h>.
12061 (linux_kill_one_process): Don't kill the first thread here.
12062 (linux_kill): Kill the first thread here.
12063 (kill_lwp): New function.
12064 (send_sigstop, linux_send_signal): Use it.
12065 * proc-service.c: Clean up #ifdefs.
12066 (fpregset_info): Delete.
12067 (ps_lgetregs): Update and enable implementation.
12068 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12070 * remote-utils.c (struct sym_cache, symbol_cache): New.
12071 (input_interrupt): Print a clearer message.
12072 (async_io_enabled): New variable.
12073 (enable_async_io, disable_async_io): Use it. Update comments.
12074 (look_up_one_symbol): Use the symbol cache.
12075 * thread-db.c (thread_db_look_up_symbols): New function.
12076 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12078 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12080 * configure.in: Test for -rdynamic.
12081 * configure: Regenerated.
12082 * Makefile (INTERNAL_LDFLAGS): New.
12083 (gdbserver, gdbreplay): Use it.
12085 2004-09-02 Andrew Cagney <cagney@gnu.org>
12087 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12089 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12091 * linux-low.c (linux_wait): Clear all_processes list also.
12093 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12095 * linux-low.c: Include <errno.h>. Remove extern declaration of
12098 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12100 * gdbreplay.c, server.h, utils.c: Update copyright years.
12102 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12104 * server.c (main): Print child status or termination signal from
12105 variable 'signal', not 'sig'.
12107 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12109 * linux-low.c (linux_read_memory): Change return type to
12110 int. Check for and return error from ptrace().
12111 * target.c (read_inferior_memory): Change return type to int. Pass
12112 back return status from the_target->read_memory().
12113 * target.h (struct target_ops): Adapt *read_memory() prototype.
12115 (read_inferior_memory): Adapt prototype.
12116 * server.c (main): Return an error packet if
12117 read_inferior_memory() returns an error.
12119 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12121 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12122 Unify with other clean targets.
12124 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12126 * server.c (handle_v_cont): Call set_desired_inferior.
12128 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12130 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12132 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12134 * linux-low.c (linux_wait): Unblock async I/O.
12135 (linux_resume): Block and enable async I/O.
12136 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12137 * server.h (block_async_io, unblock_async_io): Add prototypes.
12139 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12141 * remote-utils.c (remote_open): Print a status notice after
12142 opening a TCP port.
12143 * server.c (attach_inferior): Print a status notice after
12146 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12148 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12150 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12152 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12154 * server.c, target.h: Update copyright years.
12156 2004-02-25 Roland McGrath <roland@redhat.com>
12158 * target.h (struct target_ops): New member `read_auxv'.
12159 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12160 * linux-low.c (linux_read_auxv): New function.
12161 (linux_target_ops): Initialize `read_auxv' member to that.
12163 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12165 Committed by Jim Blandy <jimb@redhat.com>.
12167 * linux-s390-low.c (s390_num_regs): Update.
12168 (s390_regmap): Remove control registers. Use __s390x__ predefine
12169 instead of GPR_SIZE to distiguish s390 and s390x targets.
12171 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12173 * linux-low.c: Update copyright year.
12174 (check_removed_breakpoint): Clear pending_is_breakpoint.
12175 (linux_set_resume_request, linux_queue_one_thread)
12176 (resume_status_pending_p): New functions.
12177 (linux_continue_one_thread): Use process->resume.
12178 (linux_resume): Only resume threads if there are no pending events.
12179 * linux-low.h (struct process_info): Add resume request
12182 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12184 * regcache.c (new_register_cache): Clear the allocated register
12185 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12187 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12189 * linux-low.c (linux_resume): Take a struct thread_resume *
12191 (linux_wait): Update call.
12192 (resume_ptr): New static variable.
12193 (linux_continue_one_thread): Renamed from
12194 linux_continue_one_process. Use resume_ptr.
12195 (linux_resume): Use linux_continue_one_thread.
12196 * server.c (handle_v_cont, handle_v_requests): New functions.
12197 (myresume): New function.
12198 (main): Handle 'v' case.
12199 * target.h (struct thread_resume): New type.
12200 (struct target_ops): Change argument of "resume" to struct
12202 (myresume): Delete macro.
12204 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12206 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12207 (uninstall): Support DESTDIR.
12209 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12211 * configure.srv: Add xscale*linux copy of arm*linux entry.
12213 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12215 * linux-arm-low.c (arm_reinsert_addr): New function.
12216 (the_low_target): Add arm_reinsert_addr.
12218 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12220 * mem-break.c: Remove whitespace at end of file.
12222 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12224 * configure.in: Check whether we need to prototype strerror.
12225 * server.h: Optionally prototype strerror.
12226 * gdbreplay.c (perror_with_name): Use strerror.
12227 * linux-low.c (linux_attach_lwp): Use strerror.
12228 * utils.c (perror_with_name): Use strerror.
12229 * config.in, configure: Regenerated.
12231 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12233 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12234 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12236 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12238 * Makefile.in (SFILES): Update.
12239 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12240 low-sun3.c: Remove files.
12242 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12244 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12245 (linux_detach_one_process, linux_detach): New functions.
12246 (linux_target_ops): Add linux_detach.
12247 * server.c (main): Handle 'D' packet.
12248 * target.h (struct target_ops): Add "detach" member.
12249 (detach_inferior): Define.
12251 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12253 From Kelley Cook <kelleycook@wideopenwest.com>:
12254 * configure.srv: Accept i[34567]86 variants.
12256 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12258 * linux-low.c (linux_wait_for_event): Correct comment typos.
12259 (linux_resume_one_process): Call check_removed_breakpoint.
12260 (linux_send_signal): New function.
12261 (linux_target_ops): Add linux_send_signal.
12262 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12264 * target.h (struct target_ops): Add send_signal.
12266 2003-05-29 Jim Blandy <jimb@redhat.com>
12268 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12269 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12270 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12271 away part of the register's value.
12273 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12275 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12276 (linux_wait_for_event, linux_init_signals): Likewise.
12278 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12280 * configure.in: Check for stdlib.h.
12281 * configure: Regenerated.
12282 * config.in: Regenerated.
12284 2003-01-04 Andreas Schwab <schwab@suse.de>
12286 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12288 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12290 * Makefile.in: Remove obsolete code.
12292 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12294 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12295 defined(PT_FPR0_HI).
12297 2002-11-17 Stuart Hughes <seh@zee2.com>
12299 * linux-arm-low.c (arm_num_regs): Increase.
12300 (arm_regmap): Include status register.
12302 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12304 * linux-low.c (register_addr): Remove incorrect -1 check.
12306 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12308 * linux-low.c (linux_create_inferior): Call setpgid. Return
12310 (unstopped_p, linux_signal_pid): Remove.
12311 (linux_target_ops): Remove linux_signal_pid.
12312 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12313 global instead of target method.
12314 * target.h (struct target_ops): Remove signal_pid. Update comment
12315 for create_inferior.
12316 * server.c (signal_pid): New variable.
12317 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12318 gdbserver. Set the child to be the foreground process group.
12319 (attach_inferior): Set signal_pid.
12321 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12323 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12325 2002-08-20 Jim Blandy <jimb@redhat.com>
12327 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12330 2002-08-01 Andrew Cagney <cagney@redhat.com>
12332 * Makefile.in: Make chill references obsolete.
12334 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12336 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12337 * configure: Regenerate.
12338 * config.in: Regenerate.
12340 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12342 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12343 (perror_with_name, remote_close, remote_open, expect, play): Static.
12345 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12347 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12348 byte offsets instead of an array of indexes.
12349 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12351 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12353 * regcache.c: Add comment.
12355 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12357 * thread-db.c: New file.
12358 * proc-service.c: New file.
12359 * acinclude.m4: New file.
12360 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12361 proc-service.o, and thread-db.o.
12362 (linux-low.o): Add USE_THREAD_DB.
12363 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12364 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12365 * aclocal.m4: Regenerated.
12366 * config.in: Regenerated.
12367 * configure: Regenerated.
12368 * configure.in: Check for proc_service.h, sys/procfs.h,
12369 thread_db.h, and linux/elf.h headrs.
12370 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12371 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12372 Check for -lthread_db and thread support.
12373 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12374 PowerPC, and SuperH.
12375 * i387-fp.c: Constify arguments.
12376 * i387-fp.h: Likewise.
12377 * inferiors.c: (struct thread_info): Renamed from
12378 `struct inferior_info'. Remove PID member. Use generic inferior
12379 list header. All uses updated.
12380 (inferiors, signal_pid): Removed.
12381 (all_threads): New variable.
12382 (get_thread): Define.
12383 (add_inferior_to_list): New function.
12384 (for_each_inferior): New function.
12385 (change_inferior_id): New function.
12386 (add_inferior): Removed.
12387 (remove_inferior): New function.
12388 (add_thread): New function.
12389 (free_one_thread): New function.
12390 (remove_thread): New function.
12391 (clear_inferiors): Use for_each_inferior and free_one_thread.
12392 (find_inferior): New function.
12393 (find_inferior_id): New function.
12394 (inferior_target_data): Update argument type.
12395 (set_inferior_target_data): Likewise.
12396 (inferior_regcache_data): Likewise.
12397 (set_inferior_regcache_data): Likewise.
12398 * linux-low.c (linux_bp_reinsert): Remove.
12399 (all_processes, stopping_threads, using_thrads)
12400 (struct pending_signals, debug_threads, pid_of): New.
12401 (inferior_pid): Replace with macro.
12402 (struct inferior_linux_data): Remove.
12403 (get_stop_pc, add_process): New functions.
12404 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12405 Use add_process and add_thread.
12406 (linux_attach_lwp): New function, based on old linux_attach. Use
12407 add_process and add_thread. Set stop_expected for new threads.
12408 (linux_attach): New function.
12409 (linux_kill_one_process): New function.
12410 (linux_kill): Kill all LWPs.
12411 (linux_thread_alive): Use find_inferior_id.
12412 (check_removed_breakpoints, status_pending_p): New functions.
12413 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12414 Update. Use WNOHANG. Wait for cloned processes also. Update process
12415 struct for the found process.
12416 (linux_wait_for_event): New function.
12417 (linux_wait): Use it. Support LWPs.
12418 (send_sigstop, wait_for_sigstop, stop_all_processes)
12419 (linux_resume_one_process, linux_continue_one_process): New functions.
12420 (linux_resume): Support LWPs.
12421 (REGISTER_RAW_SIZE): Remove.
12422 (fetch_register): Use register_size instead. Call supply_register.
12423 (usr_store_inferior_registers): Likewise. Call collect_register.
12424 Fix recursive case.
12425 (regsets_fetch_inferior_registers): Improve error message.
12426 (regsets_store_inferior_registers): Add debugging.
12427 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12428 (unstopped_p, linux_signal_pid): New functions.
12429 (linux_target_ops): Add linux_signal_pid.
12430 (linux_init_signals): New function.
12431 (initialize_low): Call it. Initialize using_threads.
12432 * regcache.c (inferior_regcache_data): Add valid
12434 (get_regcache): Fetch registers lazily. Add fetch argument
12435 and update all callers.
12436 (regcache_invalidate_one, regcache_invalidate): New
12438 (new_register_cache): Renamed from create_register_cache.
12439 Return the new regcache.
12440 (free_register_cache): Change argument to a void *.
12441 (registers_to_string, registers_from_string): Call get_regcache
12442 with fetch flag set.
12443 (register_data): Make static. Pass fetch flag to get_regcache.
12444 (supply_register): Call get_regcache with fetch flag clear.
12445 (collect_register): Call get_regcache with fetch flag set.
12446 (collect_register_as_string): New function.
12447 * regcache.h: Update.
12448 * remote-utils.c (putpkt): Flush after debug output and use
12450 Handle input interrupts while waiting for an ACK.
12451 (input_interrupt): Use signal_pid method.
12452 (getpkt): Flush after debug output and use stderr.
12453 (outreg): Use collect_register_as_string.
12454 (new_thread_notify, dead_thread_notify): New functions.
12455 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12456 and general_thread.
12457 (look_up_one_symbol): Flush after debug output.
12458 * server.c (step_thread, server_waiting): New variables.
12459 (start_inferior): Don't use signal_pid. Update call to mywait.
12460 (attach_inferior): Update call to mywait.
12461 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12462 (main): Don't fetch/store registers explicitly. Use
12463 set_desired_inferior. Support proposed ``Hs'' packet. Update
12465 * server.h: Update.
12466 (struct inferior_list, struct_inferior_list_entry): New.
12467 * target.c (set_desired_inferior): New.
12468 (write_inferior_memory): Constify.
12469 (mywait): New function.
12470 * target.h: Update.
12471 (struct target_ops): New signal_pid method.
12472 (mywait): Removed macro, added prototype.
12474 * linux-low.h (regset_func): Removed.
12475 (regset_fill_func, regset_store_func): New.
12476 (enum regset_type): New.
12477 (struct regset_info): Add type field. Use new operation types.
12478 (struct linux_target_ops): stop_pc renamed to get_pc.
12479 Add decr_pc_after_break and breakpoint_at.
12480 (get_process, get_thread_proess, get_process_thread)
12481 (strut process_info, all_processes, linux_attach_lwp)
12482 (thread_db_init): New.
12484 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12485 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12486 (the_low_target): Add new members.
12487 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12488 (i386_store_fpxregset): Constify.
12489 (target_regsets): Add new kind identifier.
12490 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12491 (i386_set_pc): Add debugging.
12492 (i386_breakpoint_at): New function.
12493 (the_low_target): Add new members.
12494 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12495 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12496 (mips_breakpoint_at): New.
12497 (the_low_target): Add new members.
12498 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12499 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12500 (the_low_target): Add new members.
12501 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12502 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12503 (the_low_target): Add new members.
12504 * linux-x86-64-low.c (target_regsets): Add new kind
12507 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12509 From Martin Pool <mbp@samba.org>:
12510 * server.c (gdbserver_usage): New function.
12513 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12515 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12516 stop_at -> stop_pc.
12518 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12520 * Makefile.in: Remove obsolete code.
12522 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12524 * linux-low.c (regsets_fetch_inferior_registers),
12525 (regsets_store_inferior_registers): Removed cast to int from
12527 * regcache.h: Added declaration of struct inferior_info.
12529 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12531 * inferiors.c (struct inferior_info): Add regcache_data.
12532 (add_inferior): Call create_register_cache.
12533 (clear_inferiors): Call free_register_cache.
12534 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12535 * regcache.c (struct inferior_regcache_data): New.
12536 (registers): Remove.
12537 (get_regcache): New function.
12538 (create_register_cache, free_register_cache): New functions.
12539 (set_register_cache): Don't initialize the register cache here.
12540 (registers_to_string, registers_from_string, register_data): Call
12542 * regcache.h: Add prototypes.
12543 * server.h: Likewise.
12545 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12547 * mem-break.c: New file.
12548 * mem-break.h: New file.
12549 * Makefile.in: Add mem-break.o rule; update server.h
12551 * inferiors.c (struct inferior_info): Add target_data
12553 (clear_inferiors): Free target_data member if set.
12554 (inferior_target_data, set_inferior_target_data): New functions.
12555 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12556 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12557 * linux-low.c (linux_bp_reinsert): New variable.
12558 (struct inferior_linux_data): New.
12559 (linux_create_inferior): Use set_inferior_target_data.
12560 (linux_attach): Likewise. Call add_inferior.
12561 (linux_wait_for_one_inferior): New function.
12562 (linux_wait): Call it.
12563 (linux_write_memory): Add const.
12564 (initialize_low): Call set_breakpoint_data.
12565 * linux-low.h (struct linux_target_ops): Add breakpoint
12567 * server.c (attach_inferior): Remove extra add_inferior
12569 * server.h: Include mem-break.h. Update inferior.c
12571 * target.c (read_inferior_memory)
12572 (write_inferior_memory): New functions.
12573 * target.h (read_inferior_memory)
12574 (write_inferior_memory): Change macros to prototypes.
12575 (struct target_ops): Update comments. Add const to write_memory
12578 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12580 * linux-low.c (usr_store_inferior_registers): Support
12581 registers which are allowed to fail to store.
12582 * linux-low.h (linux_target_ops): Likewise.
12583 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12584 (ppc_cannot_store_register): FPSCR may not be storable.
12586 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12588 * server.h: Include <string.h> if HAVE_STRING_H.
12589 * ChangeLog: Correct paths in last ChangeLog entry.
12591 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12593 * linux-low.h: Remove obsolete prototypes.
12594 (struct linux_target_ops): New.
12595 (extern the_low_target): New.
12596 * linux-low.c (num_regs, regmap): Remove declarations.
12597 (register_addr): Use the_low_target explicitly.
12598 (fetch_register): Likewise.
12599 (usr_fetch_inferior_registers): Likewise.
12600 (usr_store_inferior_registers): Likewise.
12601 * linux-arm-low.c (num_regs): Remove.
12602 (arm_num_regs): Define.
12603 (arm_regmap): Renamed from regmap, made static.
12604 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12606 (arm_cannot_store_register): Renamed from cannot_store_register,
12608 (the_low_target): New.
12609 * linux-i386-low.c (num_regs): Remove.
12610 (i386_num_regs): Define.
12611 (i386_regmap): Renamed from regmap, made static.
12612 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12614 (i386_cannot_store_register): Renamed from cannot_store_register,
12616 (the_low_target): New.
12617 * linux-ia64-low.c (num_regs): Remove.
12618 (ia64_num_regs): Define.
12619 (ia64_regmap): Renamed from regmap, made static.
12620 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12622 (ia64_cannot_store_register): Renamed from cannot_store_register,
12624 (the_low_target): New.
12625 * linux-m68k-low.c (num_regs): Remove.
12626 (m68k_num_regs): Define.
12627 (m68k_regmap): Renamed from regmap, made static.
12628 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12630 (m68k_cannot_store_register): Renamed from cannot_store_register,
12632 (the_low_target): New.
12633 * linux-mips-low.c (num_regs): Remove.
12634 (mips_num_regs): Define.
12635 (mips_regmap): Renamed from regmap, made static.
12636 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12638 (mips_cannot_store_register): Renamed from cannot_store_register,
12640 (the_low_target): New.
12641 * linux-ppc-low.c (num_regs): Remove.
12642 (ppc_num_regs): Define.
12643 (ppc_regmap): Renamed from regmap, made static.
12644 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12646 (ppc_cannot_store_register): Renamed from cannot_store_register,
12648 (the_low_target): New.
12649 * linux-s390-low.c (num_regs): Remove.
12650 (s390_num_regs): Define.
12651 (s390_regmap): Renamed from regmap, made static.
12652 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12654 (s390_cannot_store_register): Renamed from cannot_store_register,
12656 (the_low_target): New.
12657 * linux-sh-low.c (num_regs): Remove.
12658 (sh_num_regs): Define.
12659 (sh_regmap): Renamed from regmap, made static.
12660 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12662 (sh_cannot_store_register): Renamed from cannot_store_register,
12664 (the_low_target): New.
12665 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12666 (the_low_target): New.
12668 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12670 * Makefile.in: Add stamp-h target.
12671 * configure.in: Create stamp-h.
12672 * configure: Regenerated.
12674 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12676 * inferiors.c: New file.
12677 * target.c: New file.
12678 * target.h: New file.
12679 * Makefile.in: Add target.o and inferiors.o. Update
12681 * linux-low.c (inferior_pid): New static variable,
12682 moved from server.c.
12683 (linux_create_inferior): Renamed from create_inferior.
12684 Call add_inferior. Return 0 on success instead of a PID.
12685 (linux_attach): Renamed from myattach.
12686 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12687 (linux_thread_alive): Renamed from mythread_alive.
12688 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12690 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12691 (regsets_store_inferior_registers): Correct error message.
12692 Add missing ``return 0''.
12693 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12694 (linux_store_registers): Renamed from store_inferior_registers.
12695 (linux_read_memory): Renamed from read_inferior_memory.
12696 (linux_write_memory): Renamed from write_inferior_memory.
12697 (linux_target_ops): New structure.
12698 (initialize_low): Call set_target_ops ().
12699 * remote-utils.c (unhexify): New function.
12700 (hexify): New function.
12701 (input_interrupt): Send signals to ``signal_pid''.
12702 * server.c (inferior_pid): Remove.
12703 (start_inferior): Update create_inferior call.
12704 (attach_inferior): Call add_inferior.
12705 (handle_query): New function.
12706 (main): Call handle_query for `q' packets.
12707 * server.h: Include "target.h". Remove obsolete prototypes.
12708 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12710 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12712 * Makefile.in: Add WARN_CFLAGS. Update configury
12714 * configure.in: Check for <string.h>
12715 * configure: Regenerate.
12716 * config.in: Regenerate.
12717 * gdbreplay.c: Include needed system headers.
12718 (remote_open): Remove strchr prototype.
12719 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12720 * regcache.c (supply_register): Change buf argument to const void *.
12721 (supply_register_by_name): Likewise.
12722 (collect_register): Change buf argument to void *.
12723 (collect_register_by_name): Likewise.
12724 * regcache.h: Add missing prototypes.
12725 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12726 * server.c (handle_query): New function.
12727 (attached): New static variable, moved out of main.
12728 (main): Quiet longjmp clobber warnings.
12729 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12730 * utils.c (error): Remove NORETURN.