1 2015-11-19 Yao Qi <yao.qi@linaro.org>
3 * linux-aarch64-low.c (aarch64_fill_fpregset): Cast buf to
4 struct user_fpsimd_state *.
5 (aarch64_store_fpregset): Likewise.
7 2015-11-19 Yao Qi <yao.qi@linaro.org>
9 * linux-aarch64-low.c (aarch64_fill_gregset): Cast buf to
10 struct user_pt_regs *.
11 (aarch64_store_gregset): Likewise.
13 2015-11-18 Pedro Alves <palves@redhat.com>
15 * Makefile.in (all_object_files): Add $IPA_OBJS.
17 2015-11-17 Pedro Alves <palves@redhat.com>
19 * win32-low.c (win32_resume): Use gdb_signal_from_host,
20 GDB_SIGNAL_0 and gdb_signal_to_string.
22 2015-11-17 Pedro Alves <palves@redhat.com>
24 * win32-low.c (handle_output_debug_string): Remove parameter.
25 (win32_kill): Remove our_status local and adjust call to
26 handle_output_debug_string.
27 (get_child_debug_event): Adjust call to
28 handle_output_debug_string.
30 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
32 * linux-mips-low.c (mips_fill_gregset): Add cast.
33 (mips_store_gregset): Likewise.
34 (mips_fill_fpregset): Likewise.
35 (mips_store_fpregset): Likewise.
37 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
39 * linux-mips-low.c (mips_add_watchpoint): Rename private to
42 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
44 * linux-mips-low.c (mips_linux_new_thread): Change type of
45 watch_type to enum target_hw_bp_type.
47 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
49 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type):
50 Change return type to arm_hwbp_type.
52 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
54 * linux-aarch32-low.c (arm_fill_gregset): Add cast.
55 (arm_store_gregset): Likewise.
56 * linux-arm-low.c (arm_get_hwcap): Likewise.
57 (arm_read_description): Likewise.
59 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
61 * linux-aarch32-low.c (aarch32_regsets): Use NULL_REGSET.
63 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
65 * linux-ppc-low.c (ppc_get_hwcap): Add cast.
66 (ppc_fill_vsxregset): Likewise.
67 (ppc_store_vsxregset): Likewise.
68 (ppc_fill_vrregset): Likewise.
69 (ppc_store_vrregset): Likewise.
70 (ppc_fill_evrregset): Likewise.
71 (ppc_store_evrregset): Likewise.
73 2015-11-03 Simon Marchi <simon.marchi@polymtl.ca>
75 * linux-ppc-low.c (ppc_usrregs_info): Remove
77 (ppc_arch_setup): Move lower in file.
79 2015-10-30 Simon Marchi <simon.marchi@ericsson.com>
81 * proc-service.c (ps_pdread): Change CORE_ADDR cast to uintptr_t.
82 (ps_pdwrite): Likewise.
84 2015-10-29 Henrik Wallin <henrik.wallin@windriver.com>
86 * linux-arm-low.c (arm_new_thread): Move pointer dereference
87 to after assert checks.
89 2015-10-29 Simon Marchi <simon.marchi@ericsson.com>
91 * proc-service.c (ps_pdread): Add/adjust casts.
92 (ps_pdwrite): Add/adjust casts.
94 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
96 * server.c (handle_search_memory_1): Cast return value of
99 2015-10-29 Simon Marchi <simon.marchi@polymtl.ca>
101 * server.c (write_qxfer_response): Change type of data to
104 2015-10-29 Pedro Alves <palves@redhat.com>
106 * mem-break.c (Z_packet_to_bkpt_type): Add cast.
108 2015-10-29 Pedro Alves <palves@redhat.com>
110 * tracepoint.c (clear_installed_tracepoints): Add casts.
112 2015-10-29 Pedro Alves <palves@redhat.com>
114 * server.c (handle_v_cont, process_serial_event): Add enum
115 gdb_signal casts to signal parsing code.
117 2015-10-29 Pedro Alves <palves@redhat.com>
119 * linux-low.h (NULL_REGSET): Define.
120 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
121 * linux-arm-low.c (arm_regsets): Likewise.
122 * linux-crisv32-low.c (cris_regsets): Likewise.
123 * linux-m68k-low.c (m68k_regsets): Likewise.
124 * linux-mips-low.c (mips_regsets): Likewise.
125 * linux-nios2-low.c (nios2_regsets): Likewise.
126 * linux-ppc-low.c (ppc_regsets): Likewise.
127 * linux-s390-low.c (s390_regsets): Likewise.
128 * linux-sh-low.c (sh_regsets): Likewise.
129 * linux-sparc-low.c (sparc_regsets): Likewise.
130 * linux-tic6x-low.c (tic6x_regsets): Likewise.
131 * linux-tile-low.c (tile_regsets): Likewise.
132 * linux-x86-low.c (x86_regsets): Likewise.
133 * linux-xtensa-low.c (xtensa_regsets): Likewise.
135 2015-10-29 Pedro Alves <palves@redhat.com>
137 * linux-low.h (NULL_REGSET): Define.
138 * linux-aarch64-low.c (aarch64_regsets): Use NULL_REGSET.
139 * linux-arm-low.c (arm_regsets): Likewise.
140 * linux-crisv32-low.c (cris_regsets): Likewise.
141 * linux-m68k-low.c (m68k_regsets): Likewise.
142 * linux-mips-low.c (mips_regsets): Likewise.
143 * linux-nios2-low.c (nios2_regsets): Likewise.
144 * linux-ppc-low.c (ppc_regsets): Likewise.
145 * linux-s390-low.c (s390_regsets): Likewise.
146 * linux-sh-low.c (sh_regsets): Likewise.
147 * linux-sparc-low.c (sparc_regsets): Likewise.
148 * linux-tic6x-low.c (tic6x_regsets): Likewise.
149 * linux-tile-low.c (tile_regsets): Likewise.
150 * linux-x86-low.c (x86_regsets): Likewise.
151 * linux-xtensa-low.c (xtensa_regsets): Likewise.
153 2015-10-26 Doug Evans <dje@google.com>
155 * linux-low.c (__SIGRTMIN): Move to nat/linux-nat.h.
157 2015-10-26 Doug Evans <dje@google.com>
159 * linux-low.c (W_STOPCODE): Moved to common/gdb_wait.h.
161 2015-10-26 Doug Evans <dje@google.com>
163 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
165 (attach_thread, find_new_threads_callback): Ditto.
167 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
169 * mem-break.h (set_breakpoint_data): Remove.
171 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
173 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
174 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
175 (initialize_low): Remove set_breakpoint_data call.
176 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
177 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
178 (initialize_low): Remove set_breakpoint_data call.
179 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
180 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
181 (initialize_low): Remove set_breakpoint_data call.
183 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
185 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
186 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
187 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
188 * target.h (target_breakpoint_kind_from_pc): New macro.
190 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
192 * linux-low.c (default_breakpoint_kind_from_pc): New function.
193 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
194 the default breakpoint kind.
196 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
198 * linux-arm-low.c (arm_supports_z_point_type): Add software
201 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
203 * linux-arm-low.c: Refactor breakpoint definitions.
204 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
205 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
207 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
209 * Makefile.in: Add arm.c/o.
210 * configure.srv: Likewise.
211 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
212 (arm_breakpoint_kind_from_pc): New function.
213 (arm_sw_breakpoint_from_kind): Return proper kind.
214 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
216 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
218 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
220 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
221 (struct raw_breakpoint) <size>: Remove.
222 (struct raw_breakpoint) <kind>: Add.
223 (bp_size): New function.
224 (bp_opcode): Likewise.
225 (find_raw_breakpoint_at): Adjust for kind.
226 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
227 (remove_memory_breakpoint): Adjust for kind call bp_size.
228 (set_raw_breakpoint_at): Adjust for kind.
229 (set_breakpoint): Likewise.
230 (set_breakpoint_at): Call breakpoint_kind_from_pc.
231 (delete_raw_breakpoint): Adjust for kind.
232 (delete_breakpoint): Likewise.
233 (find_gdb_breakpoint): Likewise.
234 (set_gdb_breakpoint_1): Likewise.
235 (set_gdb_breakpoint): Likewise.
236 (delete_gdb_breakpoint_1): Likewise.
237 (delete_gdb_breakpoint): Likewise.
238 (uninsert_raw_breakpoint): Likewise.
239 (reinsert_raw_breakpoint): Likewise.
240 (set_breakpoint_data): Remove.
241 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
242 (check_mem_read): Adjust for kind call bp_size.
243 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
244 (clone_one_breakpoint): Adjust for kind.
245 * mem-break.h (set_gdb_breakpoint): Likewise.
246 (delete_gdb_breakpoint): Likewise.
247 * server.c (process_serial_event): Likewise.
249 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
251 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
252 (struct linux_target_ops) <breakpoint>: Remove.
253 (struct linux_target_ops) <breakpoint_len>: Remove.
254 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
255 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
256 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
257 (arm_sw_breakpoint_from_kind): New function.
258 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
259 (struct linux_target_ops) <breakpoint>: Remove.
260 (struct linux_target_ops) <breakpoint_len>: Remove.
261 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
262 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
263 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
264 (struct linux_target_ops) <breakpoint>: Remove.
265 (struct linux_target_ops) <breakpoint_len>: Remove.
266 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
267 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
268 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
269 (struct linux_target_ops) <breakpoint>: Remove.
270 (struct linux_target_ops) <breakpoint_len>: Remove.
271 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
272 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
273 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
274 and sw_breakpoint_from_kind to increment the pc.
275 (linux_breakpoint_kind_from_pc): New function.
276 (linux_sw_breakpoint_from_kind): New function.
277 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
278 (initialize_low): Call breakpoint_kind_from_pc and
279 sw_breakpoint_from_kind to replace breakpoint_data/len.
280 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
282 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
283 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
284 (struct linux_target_ops) <breakpoint>: Remove.
285 (struct linux_target_ops) <breakpoint_len>: Remove.
286 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
287 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
288 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
289 (struct linux_target_ops) <breakpoint>: Remove.
290 (struct linux_target_ops) <breakpoint_len>: Remove.
291 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
292 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
293 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
294 (struct linux_target_ops) <breakpoint>: Remove.
295 (struct linux_target_ops) <breakpoint_len>: Remove.
296 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
297 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
298 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
299 (struct linux_target_ops) <breakpoint>: Remove.
300 (struct linux_target_ops) <breakpoint_len>: Remove.
301 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
302 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
303 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
304 (struct linux_target_ops) <breakpoint>: Remove.
305 (struct linux_target_ops) <breakpoint_len>: Remove.
306 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
307 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
308 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
309 (struct linux_target_ops) <breakpoint>: Remove.
310 (struct linux_target_ops) <breakpoint_len>: Remove.
311 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
312 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
313 * linux-sh-low.c (sh_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-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
319 (struct linux_target_ops) <breakpoint>: Remove.
320 (struct linux_target_ops) <breakpoint_len>: Remove.
321 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
322 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
323 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
324 (struct linux_target_ops) <breakpoint>: Remove.
325 (struct linux_target_ops) <breakpoint_len>: Remove.
326 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
327 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
328 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
329 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
330 (struct linux_target_ops) <breakpoint>: Remove.
331 (struct linux_target_ops) <breakpoint_len>: Remove.
332 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
333 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
334 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
335 (struct linux_target_ops) <breakpoint>: Remove.
336 (struct linux_target_ops) <breakpoint_len>: Remove.
337 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
338 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
340 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
342 * linux-cris-low.c (cris_get_pc): Remove void arg.
344 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
346 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
349 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
351 * inferiors.c (thread_pid_matches_callback): New function.
352 (find_thread_process): New function.
353 (remove_thread): Reset current_thread.
354 (remove_process): Assert threads have been removed first.
356 2015-10-15 Yao Qi <yao.qi@linaro.org>
358 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
360 (aarch64_remove_point): Likewise.
361 * regcache.c (regcache_register_size): New function.
363 2015-10-12 Yao Qi <yao.qi@linaro.org>
365 * linux-aarch64-low.c: Update all callers as emit_load_store
366 is renamed to aarch64_emit_load_store.
368 2015-10-12 Yao Qi <yao.qi@linaro.org>
370 * linux-aarch64-low.c: Update all callers of function renaming
371 from emit_insn to aarch64_emit_insn.
373 2015-10-12 Yao Qi <yao.qi@linaro.org>
375 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
377 (struct aarch64_memory_operand): Likewise.
379 (emit_insn): Move to arch/aarch64-insn.c.
380 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
381 (emit_load_store): Move to arch/aarch64-insn.c.
382 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
383 (can_encode_int32): Remove.
385 2015-10-12 Yao Qi <yao.qi@linaro.org>
387 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
388 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
389 (aarch64_relocate_instruction): Likewise.
390 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
391 (struct aarch64_insn_visitor): Likewise.
393 2015-10-12 Yao Qi <yao.qi@linaro.org>
395 * linux-aarch64-low.c (struct aarch64_insn_data): New.
396 (struct aarch64_insn_visitor): New.
397 (struct aarch64_insn_relocation_data): New.
398 (aarch64_ftrace_insn_reloc_b): New function.
399 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
400 (aarch64_ftrace_insn_reloc_cb): Likewise.
401 (aarch64_ftrace_insn_reloc_tb): Likewise.
402 (aarch64_ftrace_insn_reloc_adr): Likewise.
403 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
404 (aarch64_ftrace_insn_reloc_others): Likewise.
406 (aarch64_relocate_instruction): Use visitor.
408 2015-10-12 Yao Qi <yao.qi@linaro.org>
410 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
411 int. Add argument buf.
412 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
413 aarch64_relocate_instruction.
415 2015-10-12 Yao Qi <yao.qi@linaro.org>
417 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
418 argument insn. Remove local variable insn. Don't call
420 (aarch64_install_fast_tracepoint_jump_pad): Call
423 2015-09-30 Yao Qi <yao.qi@linaro.org>
425 * linux-aarch64-low.c (emit_movk): Shorten a long line.
426 (emit_load_store_pair): Likewise.
428 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
430 * dll.c (match_dll): Add cast(s).
431 (unloaded_dll): Likewise.
432 * linux-low.c (second_thread_of_pid_p): Likewise.
433 (delete_lwp_callback): Likewise.
434 (count_events_callback): Likewise.
435 (select_event_lwp_callback): Likewise.
436 (linux_set_resume_request): Likewise.
437 * server.c (accumulate_file_name_length): Likewise.
438 (emit_dll_description): Likewise.
439 (handle_qxfer_threads_worker): Likewise.
440 (visit_actioned_threads): Likewise.
441 * thread-db.c (any_thread_of): Likewise.
442 * tracepoint.c (same_process_p): Likewise.
443 (match_blocktype): Likewise.
444 (build_traceframe_info_xml): Likewise.
446 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
448 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
450 (gdb_unparse_agent_expr): Likewise.
451 * hostio.c (require_data): Likewise.
452 (handle_pread): Likewise.
453 * linux-low.c (disable_regset): Likewise.
454 (fetch_register): Likewise.
455 (store_register): Likewise.
456 (get_dynamic): Likewise.
457 (linux_qxfer_libraries_svr4): Likewise.
458 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
459 (set_fast_tracepoint_jump): Likewise.
460 (uninsert_fast_tracepoint_jumps_at): Likewise.
461 (reinsert_fast_tracepoint_jumps_at): Likewise.
462 (validate_inserted_breakpoint): Likewise.
463 (clone_agent_expr): Likewise.
464 * regcache.c (init_register_cache): Likewise.
465 * remote-utils.c (putpkt_binary_1): Likewise.
466 (decode_M_packet): Likewise.
467 (decode_X_packet): Likewise.
468 (look_up_one_symbol): Likewise.
469 (relocate_instruction): Likewise.
470 (monitor_output): Likewise.
471 * server.c (handle_search_memory): Likewise.
472 (handle_qxfer_exec_file): Likewise.
473 (handle_qxfer_libraries): Likewise.
474 (handle_qxfer): Likewise.
475 (handle_query): Likewise.
476 (handle_v_cont): Likewise.
477 (handle_v_run): Likewise.
478 (captured_main): Likewise.
479 * target.c (write_inferior_memory): Likewise.
480 * thread-db.c (try_thread_db_load_from_dir): Likewise.
481 * tracepoint.c (init_trace_buffer): Likewise.
482 (add_tracepoint_action): Likewise.
483 (add_traceframe): Likewise.
484 (add_traceframe_block): Likewise.
485 (cmd_qtdpsrc): Likewise.
486 (cmd_qtdv): Likewise.
487 (cmd_qtstatus): Likewise.
488 (response_source): Likewise.
489 (response_tsv): Likewise.
490 (cmd_qtnotes): Likewise.
491 (gdb_collect): Likewise.
492 (initialize_tracepoint): Likewise.
494 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
496 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
497 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
498 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
500 (enum aarch64_condition_codes): New enum.
501 (w0): New static global.
504 (struct aarch64_memory_operand) <type>: New
505 MEMORY_OPERAND_POSTINDEX type.
506 (postindex_memory_operand): New helper function.
507 (emit_ret): New function.
508 (emit_load_store_pair): New function, factored out of emit_stp
509 with support for MEMORY_OPERAND_POSTINDEX.
510 (emit_stp): Rewrite using emit_load_store_pair.
511 (emit_ldp): New function.
512 (emit_load_store): Likewise.
513 (emit_ldr): Mention post-index instruction in comment.
514 (emit_ldrh): New function.
515 (emit_ldrb): New function.
516 (emit_ldrsw): Mention post-index instruction in comment.
517 (emit_str): Likewise.
518 (emit_subs): New function.
519 (emit_cmp): Likewise.
520 (emit_and): Likewise.
521 (emit_orr): Likewise.
522 (emit_orn): Likewise.
523 (emit_eor): Likewise.
524 (emit_mvn): Likewise.
525 (emit_lslv): Likewise.
526 (emit_lsrv): Likewise.
527 (emit_asrv): Likewise.
528 (emit_mul): Likewise.
529 (emit_sbfm): Likewise.
530 (emit_sbfx): Likewise.
531 (emit_ubfm): Likewise.
532 (emit_ubfx): Likewise.
533 (emit_csinc): Likewise.
534 (emit_cset): Likewise.
535 (emit_nop): Likewise.
536 (emit_ops_insns): New helper function.
537 (emit_pop): Likewise.
538 (emit_push): Likewise.
539 (aarch64_emit_prologue): New function.
540 (aarch64_emit_epilogue): Likewise.
541 (aarch64_emit_add): Likewise.
542 (aarch64_emit_sub): Likewise.
543 (aarch64_emit_mul): Likewise.
544 (aarch64_emit_lsh): Likewise.
545 (aarch64_emit_rsh_signed): Likewise.
546 (aarch64_emit_rsh_unsigned): Likewise.
547 (aarch64_emit_ext): Likewise.
548 (aarch64_emit_log_not): Likewise.
549 (aarch64_emit_bit_and): Likewise.
550 (aarch64_emit_bit_or): Likewise.
551 (aarch64_emit_bit_xor): Likewise.
552 (aarch64_emit_bit_not): Likewise.
553 (aarch64_emit_equal): Likewise.
554 (aarch64_emit_less_signed): Likewise.
555 (aarch64_emit_less_unsigned): Likewise.
556 (aarch64_emit_ref): Likewise.
557 (aarch64_emit_if_goto): Likewise.
558 (aarch64_emit_goto): Likewise.
559 (aarch64_write_goto_address): Likewise.
560 (aarch64_emit_const): Likewise.
561 (aarch64_emit_call): Likewise.
562 (aarch64_emit_reg): Likewise.
563 (aarch64_emit_pop): Likewise.
564 (aarch64_emit_stack_flush): Likewise.
565 (aarch64_emit_zero_ext): Likewise.
566 (aarch64_emit_swap): Likewise.
567 (aarch64_emit_stack_adjust): Likewise.
568 (aarch64_emit_int_call_1): Likewise.
569 (aarch64_emit_void_call_2): Likewise.
570 (aarch64_emit_eq_goto): Likewise.
571 (aarch64_emit_ne_goto): Likewise.
572 (aarch64_emit_lt_goto): Likewise.
573 (aarch64_emit_le_goto): Likewise.
574 (aarch64_emit_gt_goto): Likewise.
575 (aarch64_emit_ge_got): Likewise.
576 (aarch64_emit_ops_impl): New static global variable.
577 (aarch64_emit_ops): New target function, return
578 &aarch64_emit_ops_impl.
579 (struct linux_target_ops): Install it.
581 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
583 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
584 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
586 * linux-aarch64-ipa.c: New file.
587 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
589 (aarch64_get_thread_area): New target method.
590 (extract_signed_bitfield): New helper function.
591 (aarch64_decode_ldr_literal): New function.
592 (enum aarch64_opcodes): New enum.
593 (struct aarch64_register): New struct.
594 (struct aarch64_operand): New struct.
595 (x0): New static global.
604 (aarch64_register): New helper function.
605 (register_operand): Likewise.
606 (immediate_operand): Likewise.
607 (struct aarch64_memory_operand): New struct.
608 (offset_memory_operand): New helper function.
609 (preindex_memory_operand): Likewise.
610 (enum aarch64_system_control_registers): New enum.
612 (emit_insn): New helper function.
613 (emit_b): New function.
614 (emit_bcond): Likewise.
617 (emit_blr): Likewise.
618 (emit_stp): Likewise.
619 (emit_ldp_q_offset): Likewise.
620 (emit_stp_q_offset): Likewise.
621 (emit_load_store): Likewise.
622 (emit_ldr): Likewise.
623 (emit_ldrsw): Likewise.
624 (emit_str): Likewise.
625 (emit_ldaxr): Likewise.
626 (emit_stxr): Likewise.
627 (emit_stlr): Likewise.
628 (emit_data_processing_reg): Likewise.
629 (emit_data_processing): Likewise.
630 (emit_add): Likewise.
631 (emit_sub): Likewise.
632 (emit_mov): Likewise.
633 (emit_movk): Likewise.
634 (emit_mov_addr): Likewise.
635 (emit_mrs): Likewise.
636 (emit_msr): Likewise.
637 (emit_sevl): Likewise.
638 (emit_wfe): Likewise.
639 (append_insns): Likewise.
640 (can_encode_int32_in): New helper function.
641 (aarch64_relocate_instruction): New function.
642 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
643 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
644 (struct linux_target_ops): Install aarch64_get_thread_area,
645 aarch64_install_fast_tracepoint_jump_pad and
646 aarch64_get_min_fast_tracepoint_insn_len.
648 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
650 * Makefile.in (aarch64-insn.o): New rule.
651 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
653 2015-09-21 Yao Qi <yao.qi@linaro.org>
655 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
657 2015-09-21 Yao Qi <yao.qi@linaro.org>
659 * tracepoint.c (max_jump_pad_size): Remove.
661 2015-09-18 Yao Qi <yao.qi@linaro.org>
663 * linux-aarch64-low.c: Don't include sys/uio.h.
664 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
666 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
668 * tracepoint.c (eval_result_type): Change prototype.
669 (condition_true_at_tracepoint): Fix argument to compiled_cond.
671 2015-09-15 Pedro Alves <palves@redhat.com>
673 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
674 Check whether to report exec events instead of checking whether
675 multiprocess is enabled.
677 2015-09-15 Pedro Alves <palves@redhat.com>
680 * remote-utils.c (prepare_resume_reply): Merge
681 TARGET_WAITKIND_VFORK_DONE switch case with the
682 TARGET_WAITKIND_FORKED case.
684 2015-09-15 Yao Qi <yao.qi@linaro.org>
686 * server.c (handle_query): Check string comparison using
687 "else if" instead of "if".
689 2015-09-15 Yao Qi <yao.qi@linaro.org>
691 * server.c (vCont_supported): New global variable.
692 (handle_query): Set vCont_supported to 1 if "vContSupported+"
693 matches. Append ";vContSupported+" to own_buf.
694 (handle_v_requests): Append ";s;S" to own_buf if target supports
695 hardware single step or vCont_supported is false.
696 (capture_main): Set vCont_supported to zero.
698 2015-09-15 Yao Qi <yao.qi@linaro.org>
700 * linux-low.c (linux_supports_conditional_breakpoints): Rename
702 (linux_supports_hardware_single_step): ... New function.
703 (linux_target_ops): Update.
704 * lynx-low.c (lynx_target_ops): Set field
705 supports_hardware_single_step to target_can_do_hardware_single_step.
706 * nto-low.c (nto_target_ops): Likewise.
707 * spu-low.c (spu_target_ops): Likewise.
708 * win32-low.c (win32_target_ops): Likewise.
709 * target.c (target_can_do_hardware_single_step): New function.
710 * target.h (struct target_ops) <supports_conditional_breakpoints>:
711 Remove. <supports_hardware_single_step>: New field.
712 (target_supports_conditional_breakpoints): Remove.
713 (target_supports_hardware_single_step): New macro.
714 (target_can_do_hardware_single_step): Declare.
715 * server.c (handle_query): Use target_supports_hardware_single_step
716 instead of target_supports_conditional_breakpoints.
718 2015-09-15 Yao Qi <yao.qi@linaro.org>
720 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
722 (struct linux_target_ops the_low_target): Install
723 aarch64_linux_siginfo_fixup.
725 2015-09-11 Don Breazeal <donb@codesourcery.com>
726 Luis Machado <lgustavo@codesourcery.com>
728 * linux-low.c (linux_mourn): Static declaration.
729 (linux_arch_setup): Move in front of
730 handle_extended_wait.
731 (linux_arch_setup_thread): New function.
732 (handle_extended_wait): Handle exec events. Call
733 linux_arch_setup_thread. Make event_lwp argument a
734 pointer-to-a-pointer.
735 (check_zombie_leaders): Do not check stopped threads.
736 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
737 (linux_low_filter_event): Add lwp and thread for exec'ing
738 non-leader thread if leader thread has been deleted.
739 Refactor code into linux_arch_setup_thread and call it.
740 Pass child lwp pointer by reference to handle_extended_wait.
741 (linux_wait_for_event_filtered): Update comment.
742 (linux_wait_1): Prevent clobbering exec event status.
743 (linux_supports_exec_events): New function.
744 (linux_target_ops) <supports_exec_events>: Initialize new member.
745 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
747 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
748 * server.c (report_exec_events): New global variable.
749 (handle_query): Handle qSupported query for exec-events feature.
750 (captured_main): Initialize report_exec_events.
751 * server.h (report_exec_events): Declare new global variable.
752 * target.h (struct target_ops) <supports_exec_events>: New
754 (target_supports_exec_events): New macro.
755 * win32-low.c (win32_target_ops) <supports_exec_events>:
756 Initialize new member.
758 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
760 * linux-low.c (linux_low_enable_btrace): Remove.
761 (linux_target_ops): Replace linux_low_enable_btrace with
764 2015-09-03 Yao Qi <yao.qi@linaro.org>
766 * linux-aarch64-low.c (aarch64_insert_point): Call
767 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
770 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
772 * linux-low.c (check_stopped_by_breakpoint): Use
773 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
775 2015-08-27 Pedro Alves <palves@redhat.com>
777 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
779 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
781 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
782 the XNEW-family equivalent.
783 (compile_bytecodes): Likewise.
784 * dll.c (loaded_dll): Likewise.
785 * event-loop.c (append_callback_event): Likewise.
786 (create_file_handler): Likewise.
787 (create_file_event): Likewise.
788 * hostio.c (handle_open): Likewise.
789 * inferiors.c (add_thread): Likewise.
790 (add_process): Likewise.
791 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
792 * linux-arm-low.c (arm_new_process): Likewise.
793 (arm_new_thread): Likewise.
794 * linux-low.c (add_to_pid_list): Likewise.
795 (linux_add_process): Likewise.
796 (handle_extended_wait): Likewise.
798 (enqueue_one_deferred_signal): Likewise.
799 (enqueue_pending_signal): Likewise.
800 (linux_resume_one_lwp_throw): Likewise.
801 (linux_resume_one_thread): Likewise.
802 (linux_read_memory): Likewise.
803 (linux_write_memory): Likewise.
804 * linux-mips-low.c (mips_linux_new_process): Likewise.
805 (mips_linux_new_thread): Likewise.
806 (mips_add_watchpoint): Likewise.
807 * linux-x86-low.c (initialize_low_arch): Likewise.
808 * lynx-low.c (lynx_add_process): Likewise.
809 * mem-break.c (set_raw_breakpoint_at): Likewise.
810 (set_breakpoint): Likewise.
811 (add_condition_to_breakpoint): Likewise.
812 (add_commands_to_breakpoint): Likewise.
813 (clone_agent_expr): Likewise.
814 (clone_one_breakpoint): Likewise.
815 * regcache.c (new_register_cache): Likewise.
816 * remote-utils.c (look_up_one_symbol): Likewise.
817 * server.c (queue_stop_reply): Likewise.
818 (start_inferior): Likewise.
819 (queue_stop_reply_callback): Likewise.
820 (handle_target_event): Likewise.
821 * spu-low.c (fetch_ppc_memory): Likewise.
822 (store_ppc_memory): Likewise.
823 * target.c (set_target_ops): Likewise.
824 * thread-db.c (thread_db_load_search): Likewise.
825 (try_thread_db_load_1): Likewise.
826 * tracepoint.c (add_tracepoint): Likewise.
827 (add_tracepoint_action): Likewise.
828 (create_trace_state_variable): Likewise.
829 (cmd_qtdpsrc): Likewise.
830 (cmd_qtro): Likewise.
831 (add_while_stepping_state): Likewise.
832 * win32-low.c (child_add_thread): Likewise.
833 (get_image_name): Likewise.
835 2015-08-25 Yao Qi <yao.qi@linaro.org>
837 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
839 2015-08-25 Yao Qi <yao.qi@linaro.org>
841 * Makefile.in (aarch64-linux.o): New rule.
842 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
844 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
845 (aarch64_init_debug_reg_state): Make it extern.
846 (aarch64_linux_prepare_to_resume): Remove.
848 2015-08-25 Yao Qi <yao.qi@linaro.org>
850 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
851 lwp_arch_private_info and ptid_of_lwp.
853 2015-08-25 Yao Qi <yao.qi@linaro.org>
855 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
856 Find proc_info by find_process_pid. All callers updated.
858 2015-08-25 Yao Qi <yao.qi@linaro.org>
860 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
862 (debug_reg_change_callback): Remove.
863 (aarch64_notify_debug_reg_change): Remove.
865 2015-08-25 Yao Qi <yao.qi@linaro.org>
867 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
868 Call current_lwp_ptid.
870 2015-08-25 Yao Qi <yao.qi@linaro.org>
872 * linux-aarch64-low.c (debug_reg_change_callback): Use
875 2015-08-25 Yao Qi <yao.qi@linaro.org>
877 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
879 2015-08-25 Yao Qi <yao.qi@linaro.org>
881 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
883 2015-08-25 Yao Qi <yao.qi@linaro.org>
885 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
888 2015-08-25 Yao Qi <yao.qi@linaro.org>
890 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
892 (debug_reg_change_callback): Remove argument entry and add argument
893 lwp. Remove local variable thread. Don't print thread id in the
894 debugging output. Don't check whether pid of thread equals to pid.
895 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
896 iterate_over_lwps instead find_inferior.
898 2015-08-24 Pedro Alves <palves@redhat.com>
900 * inferiors.c (get_first_process): New function.
901 * inferiors.h (get_first_process): New declaration.
902 * remote-utils.c (read_ptid): Default to the first process in the
903 list, instead of to the current thread's process.
905 2015-08-24 Pedro Alves <palves@redhat.com>
907 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
908 * event-loop.c: Likewise.
909 * remote-utils.c: Likewise.
910 * tracepoint.c: Likewise.
912 2015-08-24 Pedro Alves <palves@redhat.com>
914 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
917 2015-08-21 Pedro Alves <palves@redhat.com>
919 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
920 instead of literal 1.
922 2015-08-21 Pedro Alves <palves@redhat.com>
924 * tdesc.c (default_description): Explicitly zero-initialize.
926 2015-08-21 Pedro Alves <palves@redhat.com>
929 * inferiors.c (remove_thread): Discard any pending stop reply for
931 * server.c (remove_all_on_match_pid): Rename to ...
932 (remove_all_on_match_ptid): ... this. Work with a filter ptid
934 (discard_queued_stop_replies): Change parameter to a ptid. Now
936 (handle_v_kill, kill_inferior_callback, captured_main)
937 (process_serial_event): Adjust.
938 * server.h (discard_queued_stop_replies): Declare.
940 2015-08-21 Pedro Alves <palves@redhat.com>
942 * linux-low.c (wait_for_sigstop): Always switch to no thread
943 selected if the previously current thread dies.
944 * lynx-low.c (lynx_request_interrupt): Use the first thread's
945 process instead of the current thread's.
946 * remote-utils.c (input_interrupt): Don't check if there's no
948 * server.c (gdb_read_memory, gdb_write_memory): If setting the
949 current thread to the general thread fails, error out.
950 (handle_qxfer_auxv, handle_qxfer_libraries)
951 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
952 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
953 (handle_query): Check if there's a thread selected instead of
954 checking whether there's any thread in the thread list.
955 (handle_qxfer_threads, handle_qxfer_btrace)
956 (handle_qxfer_btrace_conf): Don't error out early if there's no
957 thread in the thread list.
958 (handle_v_cont, myresume): Don't set the current thread to the
960 (process_serial_event) <Hg handling>: Also set thread_id if the
961 previous general thread is still alive.
962 (process_serial_event) <g/G handling>: If setting the current
963 thread to the general thread fails, error out.
964 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
965 thread's lwp instead of the current thread's.
966 * target.c (set_desired_thread): If the desired thread was not
967 found, leave the current thread pointing to NULL. Return an int
968 (boolean) indicating success.
969 * target.h (set_desired_thread): Change return type to int.
971 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
973 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
974 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
976 (ps_get_thread_area): New function.
978 2015-08-19 Gary Benson <gbenson@redhat.com>
980 * hostio.c (handle_pread): Do not attempt to read more data
981 than hostio_reply_with_data can fit in a packet.
983 2015-08-18 Joel Brobecker <brobecker@adacore.com>
985 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
987 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
989 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
991 2015-08-06 Pedro Alves <palves@redhat.com>
993 * tracepoint.c (expr_eval_result): Now an int.
995 2015-08-06 Pedro Alves <palves@redhat.com>
997 * gdbthread.h (struct regcache): Forward declare.
998 (struct thread_info) <regcache_data>: Now a struct regcache
1000 * inferiors.c (inferior_regcache_data)
1001 (set_inferior_regcache_data): Now work with struct regcache
1003 * inferiors.h (struct regcache): Forward declare.
1004 (inferior_regcache_data, set_inferior_regcache_data): Now work
1005 with struct regcache pointers.
1006 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
1007 (free_register_cache_thread): Remove struct regcache pointer
1010 2015-08-06 Pedro Alves <palves@redhat.com>
1012 * server.c (captured_main): On error, print the exception message
1013 to stderr, and if run_once is set, throw a quit.
1015 2015-08-06 Pedro Alves <palves@redhat.com>
1017 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
1020 2015-08-06 Pedro Alves <palves@redhat.com>
1022 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
1023 reading beyond the passed in buffer length.
1025 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
1027 * tracepoint.c (symbol_list) <required>: Remove.
1029 2015-08-06 Pedro Alves <palves@redhat.com>
1031 * linux-low.c (handle_extended_wait): Set the fork child's suspend
1032 count if stopping and suspending threads.
1033 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
1034 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
1035 (linux_detach): Complete an ongoing step-over.
1036 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
1038 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
1039 (linux_wait_1): If passing a signal to the inferior after
1040 finishing a step-over, unsuspend and re-resume all lwps. If we
1041 see a single-step event but the thread should be continuing, don't
1042 pass the trap to gdb.
1043 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
1044 internal_error instead of gdb_assert.
1045 (enqueue_pending_signal): New function.
1046 (check_ptrace_stopped_lwp_gone): Add debug output.
1047 (start_step_over): Use internal_error instead of gdb_assert.
1048 (complete_ongoing_step_over): New function.
1049 (linux_resume_one_thread): Don't resume a suspended thread.
1050 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
1053 2015-08-06 Pedro Alves <palves@redhat.com>
1055 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
1056 (linux_thread_alive): Use lwp_is_marked_dead.
1057 (extended_event_reported): Delete.
1058 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
1059 instead of extended_event_reported.
1060 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
1062 (lwp_is_marked_dead): New function.
1063 (lwp_running): Use lwp_is_marked_dead.
1064 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
1067 2015-08-06 Pedro Alves <palves@redhat.com>
1069 * linux-low.c (linux_wait_1): Move fork event output out of the
1070 !report_to_gdb check. Pass event_child->waitstatus to
1071 target_waitstatus_to_string instead of ourstatus.
1073 2015-08-04 Yao Qi <yao.qi@linaro.org>
1075 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
1076 if current_thread is 32 bit.
1078 2015-08-04 Yao Qi <yao.qi@linaro.org>
1080 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
1081 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
1082 * server.c (extended_protocol): Remove "static".
1083 * server.h (extended_protocol): Declare it.
1085 2015-08-04 Yao Qi <yao.qi@linaro.org>
1087 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
1088 both aarch64 and aarch32.
1089 (aarch64_set_pc): Likewise.
1091 2015-08-04 Yao Qi <yao.qi@linaro.org>
1093 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
1094 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
1095 arm-with-neon.xml to srv_xmlfiles.
1096 * linux-aarch64-low.c: Include linux-aarch32-low.h.
1097 (is_64bit_tdesc): New function.
1098 (aarch64_linux_read_description): New function.
1099 (aarch64_arch_setup): Call aarch64_linux_read_description.
1100 (regs_info): Rename to regs_info_aarch64.
1101 (aarch64_regs_info): Return right regs_info.
1102 (initialize_low_arch): Call initialize_low_arch_aarch32.
1104 2015-08-04 Yao Qi <yao.qi@linaro.org>
1106 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
1107 * linux-aarch32-low.c: New file.
1108 * linux-aarch32-low.h: New file.
1109 * linux-arm-low.c (arm_fill_gregset): Move it to
1110 linux-aarch32-low.c.
1111 (arm_store_gregset): Likewise.
1112 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
1113 (arm_store_vfpregset): Call arm_store_vfpregset_num.
1114 (arm_arch_setup): Check if PTRACE_GETREGSET works.
1115 (regs_info): Rename to regs_info_arm.
1116 (arm_regs_info): Return regs_info_aarch32 if
1117 have_ptrace_getregset is 1 and target description is
1118 arm_with_neon or arm_with_vfpv3.
1119 (initialize_low_arch): Don't call init_registers_arm_with_neon.
1120 Call initialize_low_arch_aarch32 instead.
1122 2015-08-04 Yao Qi <yao.qi@linaro.org>
1124 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
1125 * linux-low.c: ... here.
1126 * linux-low.h (have_ptrace_getregset): Declare it.
1128 2015-08-04 Pedro Alves <palves@redhat.com>
1130 * thread-db.c (struct thread_db): Use new typedefs.
1131 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
1133 (disable_thread_event_reporting): Cast result of dlsym to
1134 destination function pointer type.
1135 (thread_db_mourn): Use td_ta_delete_ftype.
1137 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
1139 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
1141 (CDX_BREAKPOINT): Define for R2.
1142 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
1143 (the_low_target): Add comments.
1145 2015-07-30 Yao Qi <yao.qi@linaro.org>
1147 * linux-arm-low.c (arm_hwcap): Remove it.
1148 (arm_read_description): New local variable arm_hwcap. Don't
1149 set arm_hwcap to zero.
1151 2015-07-30 Yao Qi <yao.qi@linaro.org>
1153 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
1154 Use regcache->tdesc instead.
1155 (arm_store_wmmxregset): Likewise.
1156 (arm_fill_vfpregset): Likewise.
1157 (arm_store_vfpregset): Likewise.
1159 2015-07-30 Yao Qi <yao.qi@linaro.org>
1161 * linux-arm-low.c: Include arch/arm.h.
1162 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1163 (arm_store_gregset): Likewise.
1165 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1167 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1168 ptrace's 4th parameter.
1170 2015-07-27 Yao Qi <yao.qi@linaro.org>
1172 * configure.srv (case aarch64*-*-linux*): Don't set
1175 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1177 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1179 * linux-arm-low.c: Likewise.
1180 * linux-cris-low.c: Likewise.
1181 * linux-crisv32-low.c: Likewise.
1182 * linux-low.c: Likewise.
1183 * linux-m68k-low.c: Likewise.
1184 * linux-mips-low.c: Likewise.
1185 * linux-nios2-low.c: Likewise.
1186 * linux-s390-low.c: Likewise.
1187 * linux-sparc-low.c: Likewise.
1188 * linux-tic6x-low.c: Likewise.
1189 * linux-tile-low.c: Likewise.
1190 * linux-x86-low.c: Likewise.
1192 2015-07-24 Pedro Alves <palves@redhat.com>
1194 * config.in: Regenerate.
1195 * configure: Regenerate.
1197 2015-07-24 Pedro Alves <palves@redhat.com>
1199 * acinclude.m4: Include ../ptrace.m4.
1200 * configure.ac: Call GDB_AC_PTRACE.
1201 * config.in, configure: Regenerate.
1203 2015-07-24 Yao Qi <yao.qi@linaro.org>
1205 * linux-low.c (linux_create_inferior): Remove setting to
1206 proc->priv->new_inferior.
1207 (linux_attach): Likewise.
1208 (linux_low_filter_event): Likewise.
1209 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1211 2015-07-24 Yao Qi <yao.qi@linaro.org>
1213 * linux-low.c (linux_arch_setup): New function.
1214 (linux_low_filter_event): If proc->tdesc is NULL and
1215 proc->attached is true, call the_low_target.arch_setup.
1216 Otherwise, keep status pending, and return.
1217 (linux_resume_one_lwp_throw): Don't call get_pc if
1218 thread->while_stepping isn't NULL. Don't call
1219 get_thread_regcache if proc->tdesc is NULL.
1220 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1221 (linux_target_ops): Install arch_setup.
1222 * server.c (start_inferior): Call the_target->arch_setup.
1223 * target.h (struct target_ops) <arch_setup>: New field.
1224 (target_arch_setup): New marco.
1225 * lynx-low.c (lynx_target_ops): Update.
1226 * nto-low.c (nto_target_ops): Update.
1227 * spu-low.c (spu_target_ops): Update.
1228 * win32-low.c (win32_target_ops): Update.
1230 2015-07-24 Yao Qi <yao.qi@linaro.org>
1232 * linux-low.c (linux_add_process): Don't set
1233 proc->priv->new_inferior.
1234 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1235 (linux_attach): Likewise.
1237 2015-07-24 Yao Qi <yao.qi@linaro.org>
1239 * server.c (start_inferior): Code refactor.
1241 2015-07-24 Yao Qi <yao.qi@linaro.org>
1243 * server.c (process_serial_event): Set general_thread.
1245 2015-07-21 Yao Qi <yao.qi@linaro.org>
1247 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1248 aarch64_linux_get_debug_reg_capacity.
1250 2015-07-17 Yao Qi <yao.qi@linaro.org>
1252 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1253 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1254 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1255 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1256 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1257 (AARCH64_HWP_ALIGNMENT): Likewise.
1258 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1259 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1260 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1261 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1262 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1263 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1264 (struct aarch64_debug_reg_state): Likewise.
1265 (struct arch_lwp_info): Likewise.
1266 (aarch64_align_watchpoint): Likewise.
1267 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1268 (aarch64_watchpoint_length): Likewise.
1269 (aarch64_point_encode_ctrl_reg): Likewise
1270 (aarch64_point_is_aligned): Likewise.
1271 (aarch64_align_watchpoint): Likewise.
1272 (aarch64_linux_set_debug_regs):
1273 (aarch64_dr_state_insert_one_point): Likewise.
1274 (aarch64_dr_state_remove_one_point): Likewise.
1275 (aarch64_handle_breakpoint): Likewise.
1276 (aarch64_handle_aligned_watchpoint): Likewise.
1277 (aarch64_handle_unaligned_watchpoint): Likewise.
1278 (aarch64_handle_watchpoint): Likewise.
1280 2015-07-17 Yao Qi <yao.qi@linaro.org>
1282 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1283 and don't aarch64_get_debug_reg_state. All callers update.
1284 (aarch64_handle_aligned_watchpoint): Likewise.
1285 (aarch64_handle_unaligned_watchpoint): Likewise.
1286 (aarch64_handle_watchpoint): Likewise.
1287 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1288 (aarch64_remove_point): Likewise.
1290 2015-07-17 Yao Qi <yao.qi@linaro.org>
1292 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1294 (aarch64_handle_unaligned_watchpoint): Likewise.
1296 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1298 Revert the previous 3 commits:
1299 Move gdb_regex* to common/
1300 Move linux_find_memory_regions_full & co.
1301 gdbserver build-id attribute generator
1303 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1304 Jan Kratochvil <jan.kratochvil@redhat.com>
1306 gdbserver build-id attribute generator.
1307 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1308 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1309 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1311 (get_dynamic): Use find_pdhr to traverse program headers.
1312 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1313 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1314 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1315 (get_hex_build_id): New.
1316 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1317 to reply XML document.
1319 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1320 Jan Kratochvil <jan.kratochvil@redhat.com>
1322 * target.c: Include target/target-utils.h and fcntl.h.
1323 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1324 (target_fileio_read_stralloc): New functions.
1326 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1328 * Makefile.in (OBS): Add gdb_regex.o.
1330 * config.in: Rebuilt.
1331 * configure: Rebuilt.
1333 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1334 Jan Kratochvil <jan.kratochvil@redhat.com>
1336 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1337 * Makefile.in (OBS): Add target-utils.o.
1338 (linux-maps.o, target-utils.o): New.
1339 * configure.srv (srv_linux_obj): Add linux-maps.o.
1341 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1343 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1345 (the_low_target): Install it.
1347 2015-07-14 Pedro Alves <palves@redhat.com>
1349 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1350 Instead, ignore ECHILD, and throw an error for other errnos.
1352 2015-07-10 Pedro Alves <palves@redhat.com>
1354 * event-loop.c (struct callback_event) <data>: Change type to
1355 gdb_client_data instance instead of gdb_client_data pointer.
1356 (append_callback_event): Adjust.
1358 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1360 * linux-aarch64-low.c: Add comments for each linux_target_ops
1361 method. Remove comments already covered in target_ops and
1362 linux_target_ops definitions.
1363 (the_low_target): Add comments for each unimplemented method.
1365 2015-07-09 Yao Qi <yao.qi@linaro.org>
1367 * linux-aarch64-low.c (aarch64_regmap): Remove.
1368 (aarch64_usrregs_info): Remove.
1369 (regs_info): Set field usrregs to NULL.
1371 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1373 * linux-low.c: Include "rsp-low.h"
1374 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1375 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1376 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1377 (handle_btrace_enable_pt): New.
1378 (handle_btrace_general_set): Support "pt".
1379 (handle_btrace_conf_general_set): Support "pt:size".
1381 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1383 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1386 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1388 * linux-aarch64-low.c: Remove comment about endianness.
1389 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1390 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1393 2015-06-24 Gary Benson <gbenson@redhat.com>
1395 * linux-i386-ipa.c (stdint.h): Do not include.
1396 * lynx-i386-low.c (stdint.h): Likewise.
1397 * lynx-ppc-low.c (stdint.h): Likewise.
1398 * mem-break.c (stdint.h): Likewise.
1399 * thread-db.c (stdint.h): Likewise.
1400 * tracepoint.c (stdint.h): Likewise.
1401 * win32-low.c (stdint.h): Likewise.
1403 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1405 * server.c (write_qxfer_response): Update call to
1406 remote_escape_output.
1408 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1409 Jan Kratochvil <jan.kratochvil@redhat.com>
1411 Merge multiple hex conversions.
1412 * gdbreplay.c (tohex): Rename to 'fromhex'.
1413 (logchar): Use fromhex.
1415 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1417 * server.c (handle_qxfer_libraries): Set `version' attribute for
1420 2015-06-10 Gary Benson <gbenson@redhat.com>
1422 * target.h (struct target_ops) <multifs_open>: New field.
1423 <multifs_unlink>: Likewise.
1424 <multifs_readlink>: Likewise.
1425 * linux-low.c (nat/linux-namespaces.h): New include.
1426 (linux_target_ops): Initialize the_target->multifs_open,
1427 the_target->multifs_unlink and the_target->multifs_readlink.
1428 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1429 * hostio.c (hostio_fs_pid): New static variable.
1430 (hostio_handle_new_gdb_connection): New function.
1431 (handle_setfs): Likewise.
1432 (handle_open): Use the_target->multifs_open as appropriate.
1433 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1434 (handle_readlink): Use the_target->multifs_readlink as
1436 (handle_vFile): Handle vFile:setfs packets.
1437 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1438 after target_handle_new_gdb_connection.
1440 2015-06-10 Gary Benson <gbenson@redhat.com>
1442 * configure.ac (AC_CHECK_FUNCS): Add setns.
1443 * config.in: Regenerate.
1444 * configure: Likewise.
1445 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1446 (linux-namespaces.o): New rule.
1447 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1449 2015-06-09 Gary Benson <gbenson@redhat.com>
1451 * hostio.c (handle_open): Process mode argument with
1452 fileio_to_host_mode.
1454 2015-06-01 Yao Qi <yao.qi@linaro.org>
1456 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1457 * linux-x86-low.c: Likewise.
1459 2015-05-28 Don Breazeal <donb@codesourcery.com>
1461 * linux-low.c (handle_extended_wait): Initialize
1462 thread_info.last_resume_kind for new fork children.
1464 2015-05-15 Pedro Alves <palves@redhat.com>
1466 * target.h (target_handle_new_gdb_connection): Rewrite using if
1467 wrapped in do/while.
1469 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1471 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1472 * configure, config.in: Regenerate.
1473 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1476 2015-05-12 Don Breazeal <donb@codesourcery.com>
1478 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1479 PTRACE_EVENT_VFORK_DONE.
1480 (linux_low_ptrace_options, extended_event_reported): Add vfork
1482 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1483 and "vforkdone" for RSP 'T' Stop Reply Packet.
1484 * server.h (report_vfork_events): Declare
1487 2015-05-12 Don Breazeal <donb@codesourcery.com>
1489 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1490 (the_low_target) <new_fork>: Initialize new member.
1491 * linux-arm-low.c (arm_new_fork): New function.
1492 (the_low_target) <new_fork>: Initialize new member.
1493 * linux-low.c (handle_extended_wait): Call new target function
1495 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1496 * linux-mips-low.c (mips_add_watchpoint): New function
1497 extracted from mips_insert_point.
1498 (the_low_target) <new_fork>: Initialize new member.
1499 (mips_linux_new_fork): New function.
1500 (mips_insert_point): Call mips_add_watchpoint.
1501 * linux-x86-low.c (x86_linux_new_fork): New function.
1502 (the_low_target) <new_fork>: Initialize new member.
1504 2015-05-12 Don Breazeal <donb@codesourcery.com>
1506 * linux-low.c (handle_extended_wait): Implement return value,
1507 rename argument 'event_child' to 'event_lwp', handle
1508 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1509 (linux_low_ptrace_options): New function.
1510 (linux_low_filter_event): Call linux_low_ptrace_options,
1511 use different argument fo linux_enable_event_reporting,
1512 use return value from handle_extended_wait.
1513 (extended_event_reported): New function.
1514 (linux_wait_1): Call extended_event_reported and set
1515 status to report fork events.
1516 (linux_write_memory): Add pid to debug message.
1517 (reset_lwp_ptrace_options_callback): New function.
1518 (linux_handle_new_gdb_connection): New function.
1519 (linux_target_ops): Initialize new structure member.
1520 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1521 * lynx-low.c: Initialize new structure member.
1522 * remote-utils.c (prepare_resume_reply): Implement stop reason
1523 "fork" for "T" stop message.
1524 * server.c (handle_query): Call handle_new_gdb_connection.
1525 * server.h (report_fork_events): Declare global flag.
1526 * target.h (struct target_ops) <handle_new_gdb_connection>:
1528 (target_handle_new_gdb_connection): New macro.
1529 * win32-low.c: Initialize new structure member.
1531 2015-05-12 Don Breazeal <donb@codesourcery.com>
1533 * mem-break.c (APPEND_TO_LIST): Define macro.
1534 (clone_agent_expr): New function.
1535 (clone_one_breakpoint): New function.
1536 (clone_all_breakpoints): New function.
1537 * mem-break.h: Declare new functions.
1539 2015-05-12 Don Breazeal <donb@codesourcery.com>
1541 * linux-low.c (linux_supports_fork_events): New function.
1542 (linux_supports_vfork_events): New function.
1543 (linux_target_ops): Initialize new structure members.
1544 (initialize_low): Call linux_check_ptrace_features.
1545 * lynx-low.c (lynx_target_ops): Initialize new structure
1547 * server.c (report_fork_events, report_vfork_events):
1549 (handle_query): Add new features to qSupported packet and
1551 (captured_main): Initialize new global variables.
1552 * target.h (struct target_ops) <supports_fork_events>:
1554 <supports_vfork_events>: New member.
1555 (target_supports_fork_events): New macro.
1556 (target_supports_vfork_events): New macro.
1557 * win32-low.c (win32_target_ops): Initialize new structure
1560 2015-05-12 Gary Benson <gbenson@redhat.com>
1562 * server.c (handle_qxfer_exec_file): Use current process
1565 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1567 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1568 Remove HAVE_PTRACE_GETREGS conditionals.
1569 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1570 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1572 2015-05-08 Yao Qi <yao.qi@linaro.org>
1574 * linux-low.c (linux_supports_conditional_breakpoints): New
1576 (linux_target_ops): Install new target method.
1577 * lynx-low.c (lynx_target_ops): Install NULL hook for
1578 supports_conditional_breakpoints.
1579 * nto-low.c (nto_target_ops): Likewise.
1580 * spu-low.c (spu_target_ops): Likewise.
1581 * win32-low.c (win32_target_ops): Likewise.
1582 * server.c (handle_query): Check
1583 target_supports_conditional_breakpoints.
1584 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1586 (target_supports_conditional_breakpoints): New macro.
1588 2015-05-06 Pedro Alves <palves@redhat.com>
1591 * server.c (start_inferior): If the process exits, mourn it.
1593 2015-04-21 Gary Benson <gbenson@redhat.com>
1595 * hostio.c (fileio_open_flags_to_host): Factored out to
1596 fileio_to_host_openflags in common/fileio.c. Single use
1599 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1601 * linux-xtensa-low.c (xtensa_fill_gregset)
1602 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1605 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1607 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1608 (regs_info): Replace usrregs pointer with NULL.
1610 2015-04-17 Gary Benson <gbenson@redhat.com>
1612 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1613 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1614 * server.c (handle_qxfer_exec_file): New function.
1615 (qxfer_packets): Add exec-file entry.
1616 (handle_query): Report qXfer:exec-file:read as supported packet.
1618 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1620 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1622 2015-04-09 Gary Benson <gbenson@redhat.com>
1624 * hostio-errno.c (errno_to_fileio_error): Remove function.
1625 Update caller to use remote_fileio_to_fio_error.
1627 2015-04-09 Yao Qi <yao.qi@linaro.org>
1629 * linux-low.c (linux_insert_point): Call
1630 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1631 (linux_remove_point): Call remove_memory_breakpoint if type is
1633 * linux-x86-low.c (x86_insert_point): Don't call
1634 insert_memory_breakpoint.
1635 (x86_remove_point): Don't call remove_memory_breakpoint.
1637 2015-04-01 Pedro Alves <palves@redhat.com>
1638 Cleber Rosa <crosa@redhat.com>
1640 * server.c (gdbserver_usage): Reorganize and extend the usage
1643 2015-03-24 Pedro Alves <palves@redhat.com>
1645 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1646 output. Also dump TRAP_TRACE.
1647 (linux_low_filter_event): In debug output, distinguish a
1648 resume_stop SIGSTOP from a delayed SIGSTOP.
1650 2015-03-24 Gary Benson <gbenson@redhat.com>
1652 * linux-x86-low.c (x86_linux_new_thread): Moved to
1654 (x86_linux_prepare_to_resume): Likewise.
1656 2015-03-24 Gary Benson <gbenson@redhat.com>
1658 * Makefile.in (x86-linux-dregs.o): New rule.
1659 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1660 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1661 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1662 (x86_linux_dr_get): Likewise.
1663 (x86_linux_dr_set): Likewise.
1664 (update_debug_registers_callback): Likewise.
1665 (x86_linux_dr_set_addr): Likewise.
1666 (x86_linux_dr_get_addr): Likewise.
1667 (x86_linux_dr_set_control): Likewise.
1668 (x86_linux_dr_get_control): Likewise.
1669 (x86_linux_dr_get_status): Likewise.
1670 (x86_linux_update_debug_registers): Likewise.
1672 2015-03-24 Gary Benson <gbenson@redhat.com>
1674 * linux-x86-low.c (x86_linux_update_debug_registers):
1675 New function, factored out from...
1676 (x86_linux_prepare_to_resume): ...this.
1678 2015-03-24 Gary Benson <gbenson@redhat.com>
1680 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1681 (x86_linux_dr_set): Likewise.
1682 (update_debug_registers_callback): Likewise.
1683 (x86_linux_dr_set_addr): Likewise.
1684 (x86_linux_dr_get_addr): Likewise.
1685 (x86_linux_dr_set_control): Likewise.
1686 (x86_linux_dr_get_control): Likewise.
1687 (x86_linux_dr_get_status): Likewise.
1688 (x86_linux_prepare_to_resume): Likewise.
1690 2015-03-24 Gary Benson <gbenson@redhat.com>
1692 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1693 Use perror_with_name. Pass string through gettext.
1694 (x86_linux_dr_set): Likewise.
1696 2015-03-24 Gary Benson <gbenson@redhat.com>
1698 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1699 (x86_linux_dr_set_addr): ...this.
1700 (x86_dr_low_get_addr): Rename to...
1701 (x86_linux_dr_get_addr): ...this.
1702 (x86_dr_low_set_control): Rename to...
1703 (x86_linux_dr_set_control): ...this.
1704 (x86_dr_low_get_control): Rename to...
1705 (x86_linux_dr_get_control): ...this.
1706 (x86_dr_low_get_status): Rename to...
1707 (x86_linux_dr_get_status): ...this.
1708 (x86_dr_low): Update with new function names.
1710 2015-03-24 Gary Benson <gbenson@redhat.com>
1712 * Makefile.in (x86-linux.o): New rule.
1713 * configure.srv: Add x86-linux.o to relevant targets.
1714 * linux-low.c (lwp_set_arch_private_info): New function.
1715 (lwp_arch_private_info): Likewise.
1716 * linux-x86-low.c: Include nat/x86-linux.h.
1717 (arch_lwp_info): Removed structure.
1718 (update_debug_registers_callback):
1719 Use lwp_set_debug_registers_changed.
1720 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1721 and lwp_set_debug_registers_changed.
1722 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1724 2015-03-24 Gary Benson <gbenson@redhat.com>
1726 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1727 * linux-arm-low.c (arm_new_thread): Likewise.
1728 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1729 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1730 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1731 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1733 2015-03-24 Gary Benson <gbenson@redhat.com>
1735 * linux-low.c (ptid_of_lwp): New function.
1736 (lwp_is_stopped): Likewise.
1737 (lwp_stop_reason): Likewise.
1738 * linux-x86-low.c (update_debug_registers_callback):
1740 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1743 2015-03-24 Gary Benson <gbenson@redhat.com>
1745 * linux-low.h (linux_stop_lwp): Remove declaration.
1747 2015-03-24 Gary Benson <gbenson@redhat.com>
1749 * linux-low.h: Include nat/linux-nat.h.
1750 * linux-low.c (iterate_over_lwps_args): New structure.
1751 (iterate_over_lwps_filter): New function.
1752 (iterate_over_lwps): Likewise.
1753 * linux-x86-low.c (update_debug_registers_callback):
1754 Update signature to what iterate_over_lwps expects.
1755 Remove PID check that iterate_over_lwps now performs.
1756 (x86_dr_low_set_addr): Use iterate_over_lwps.
1757 (x86_dr_low_set_control): Likewise.
1759 2015-03-24 Gary Benson <gbenson@redhat.com>
1761 * linux-x86-low.c (x86_debug_reg_state): New function.
1762 (x86_linux_prepare_to_resume): Use the above.
1764 2015-03-24 Gary Benson <gbenson@redhat.com>
1766 * linux-low.c (current_lwp_ptid): New function.
1767 * linux-x86-low.c: Include nat/linux-nat.h.
1768 (x86_dr_low_get_addr): Use current_lwp_ptid.
1769 (x86_dr_low_get_control): Likewise.
1770 (x86_dr_low_get_status): Likewise.
1772 2015-03-20 Pedro Alves <palves@redhat.com>
1774 * tracepoint.c (cmd_qtstatus): Make "str" const.
1776 2015-03-20 Pedro Alves <palves@redhat.com>
1778 * server.c (handle_general_set): Make "req_str" const.
1780 2015-03-19 Pedro Alves <palves@redhat.com>
1782 * linux-low.c (linux_resume_one_lwp): Rename to ...
1783 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1784 instead call perror_with_name.
1785 (check_ptrace_stopped_lwp_gone): New function.
1786 (linux_resume_one_lwp): Reimplement as wrapper around
1787 linux_resume_one_lwp_throw that swallows errors if the LWP is
1790 2015-03-19 Pedro Alves <palves@redhat.com>
1792 * linux-low.c (count_events_callback, select_event_lwp_callback):
1793 No longer check whether the thread has resume_stop as last resume
1796 2015-03-19 Pedro Alves <palves@redhat.com>
1798 * linux-low.c (count_events_callback, select_event_lwp_callback):
1799 Use the lwp's status_pending_p field, not the thread's.
1801 2015-03-19 Pedro Alves <palves@redhat.com>
1803 * linux-low.c (select_event_lwp_callback): Update comments to
1804 no longer mention SIGTRAP.
1806 2015-03-18 Gary Benson <gbenson@redhat.com>
1808 * server.c (handle_query): Do not report vFile:fstat as supported.
1810 2015-03-11 Gary Benson <gbenson@redhat.com>
1812 * hostio.c (sys/types.h): New include.
1813 (sys/stat.h): Likewise.
1814 (common-remote-fileio.h): Likewise.
1815 (handle_fstat): New function.
1816 (handle_vFile): Handle vFile:fstat packets.
1818 2015-03-11 Gary Benson <gbenson@redhat.com>
1820 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1821 struct stat.st_blocks and struct stat.st_blksize.
1822 * configure: Regenerate.
1823 * config.in: Likewise.
1824 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1825 (OBS): Add common-remote-fileio.o.
1826 (common-remote-fileio.o): New rule.
1828 2015-03-09 Pedro Alves <palves@redhat.com>
1830 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1831 'struct sockaddr' pointer in 'accept' call.
1833 2015-03-09 Pedro Alves <palves@redhat.com>
1836 2015-03-07 Pedro Alves <palves@redhat.com>
1837 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1838 or <winsock2.h> here. Instead include "gdb_socket.h".
1839 (remote_open): Use union gdb_sockaddr_u.
1840 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1841 or <winsock2.h> here. Instead include "gdb_socket.h".
1842 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1843 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1845 (init_named_socket, gdb_agent_helper_thread): Use union
1848 2015-03-07 Pedro Alves <palves@redhat.com>
1850 * configure.ac (build_warnings): Move
1851 -Wdeclaration-after-statement to the C-specific set.
1852 * configure: Regenerate.
1854 2015-03-07 Pedro Alves <palves@redhat.com>
1856 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1857 or <winsock2.h> here. Instead include "gdb_socket.h".
1858 (remote_open): Use union gdb_sockaddr_u.
1859 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1860 or <winsock2.h> here. Instead include "gdb_socket.h".
1861 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1862 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1864 (init_named_socket, gdb_agent_helper_thread): Use union
1867 2015-03-07 Pedro Alves <palves@redhat.com>
1869 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1872 2015-03-06 Yao Qi <yao.qi@linaro.org>
1874 * linux-aarch64-low.c (aarch64_insert_point): Use
1875 show_debug_regs as a boolean.
1876 (aarch64_remove_point): Likewise.
1878 2015-03-05 Pedro Alves <palves@redhat.com>
1880 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1881 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1882 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1883 * nto-low.c (nto_target_ops): Likewise.
1884 * spu-low.c (spu_target_ops): Likewise.
1885 * win32-low.c (win32_target_ops): Likewise.
1887 2015-03-04 Pedro Alves <palves@redhat.com>
1889 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1890 Decide whether a breakpoint triggered based on the SIGTRAP's
1892 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1893 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1894 (linux_low_filter_event): Check for breakpoints before checking
1896 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1898 (linux_stopped_by_sw_breakpoint)
1899 (linux_supports_stopped_by_sw_breakpoint)
1900 (linux_stopped_by_hw_breakpoint)
1901 (linux_supports_stopped_by_hw_breakpoint): New functions.
1902 (linux_target_ops): Install new target methods.
1904 2015-03-04 Pedro Alves <palves@redhat.com>
1906 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1907 * server.c (swbreak_feature, hwbreak_feature): New globals.
1908 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1909 (captured_main): Clear swbreak_feature and hwbreak_feature.
1910 * server.h (swbreak_feature, hwbreak_feature): Declare.
1911 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1912 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1913 supports_stopped_by_hw_breakpoint>: New fields.
1914 (target_supports_stopped_by_sw_breakpoint)
1915 (target_stopped_by_sw_breakpoint)
1916 (target_supports_stopped_by_hw_breakpoint)
1917 (target_stopped_by_hw_breakpoint): Declare.
1919 2015-03-04 Pedro Alves <palves@redhat.com>
1921 enum lwp_stop_reason -> enum target_stop_reason
1922 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1923 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1924 (linux_wait_1, stuck_in_jump_pad_callback)
1925 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1926 (linux_stopped_by_watchpoint):
1927 * linux-low.h (enum lwp_stop_reason): Delete.
1928 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1929 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1931 2015-03-04 Yao Qi <yao.qi@linaro.org>
1933 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1935 2015-03-03 Gary Benson <gbenson@redhat.com>
1937 * hostio.c (handle_vFile): Fix prefix lengths.
1939 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1941 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1944 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1946 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1947 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1948 (clean): Add "rm -f" for above C files.
1949 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1950 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1951 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1952 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1953 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1954 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1955 (init_registers_s390x_vx_linux64)
1956 (init_registers_s390x_tevx_linux64)
1957 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1958 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1960 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1961 (s390_store_vxrs_high): New functions.
1962 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1964 (s390_arch_setup): Add logic for selecting one of the new target
1965 descriptions. Activate the new vector regsets if applicable.
1966 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1967 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1968 and init_registers_s390x_tevx_linux64.
1970 2015-03-01 Pedro Alves <palves@redhat.com>
1972 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1975 2015-02-27 Pedro Alves <palves@redhat.com>
1977 * linux-x86-low.c (u_debugreg_offset): New function.
1978 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1980 2015-02-27 Pedro Alves <palves@redhat.com>
1982 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1983 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1984 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1985 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1986 (ps_lsetfpregs, ps_getpid)
1987 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1988 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1989 (ps_lsetxregs, ps_plog): Declare.
1991 2015-02-27 Pedro Alves <palves@redhat.com>
1993 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1994 IP_AGENT_EXPORT_FUNC.
1995 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1996 IP_AGENT_EXPORT_FUNC.
1997 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1998 (IP_AGENT_EXPORT): Delete.
1999 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2000 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2001 (gdb_trampoline_buffer_error, collecting, gdb_collect)
2002 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
2003 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
2004 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
2005 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
2006 (traceframe_read_count, traceframe_write_count)
2007 (traceframes_created, trace_state_variables, get_raw_reg)
2008 (get_trace_state_variable_value, set_trace_state_variable_value)
2009 (ust_loaded, helper_thread_id, cmd_buf): Use
2010 IPA_SYM_EXPORTED_NAME.
2011 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
2012 (tracepoints) Use IP_AGENT_EXPORT_VAR.
2013 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
2014 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2015 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
2016 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
2017 EXTERN_C_PUSH/EXTERN_C_POP.
2018 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
2019 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
2020 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2021 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
2022 (traceframe_write_count, traceframe_read_count)
2023 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
2024 (about_to_request_buffer_space, get_trace_state_variable_value)
2025 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
2026 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
2027 EXTERN_C_PUSH/EXTERN_C_POP.
2028 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
2029 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
2030 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
2031 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
2032 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
2033 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
2034 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
2035 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
2037 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
2038 (IP_AGENT_EXPORT_VAR_DECL): Define.
2040 (gdb_agent_get_raw_reg): Declare.
2042 2015-02-27 Tom Tromey <tromey@redhat.com>
2043 Pedro Alves <palves@redhat.com>
2045 Rename symbols whose names are reserved C++ keywords throughout.
2047 2015-02-27 Pedro Alves <palves@redhat.com>
2049 * Makefile.in (COMPILER): New, get it from autoconf.
2050 (CXX): Get from autoconf instead.
2051 (COMPILE.pre): Use COMPILER.
2052 (CC-LD): Rename to ...
2053 (CC_LD): ... this. Use COMPILER.
2054 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
2055 (CXX_FOR_TARGET): Default to g++ instead of gcc.
2056 * acinclude.m4: Include build-with-cxx.m4.
2057 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
2058 Disable -Werror by default if building in C++ mode.
2059 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
2060 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
2061 the C++ compiler. Save/restore CXXFLAGS too.
2062 * configure: Regenerate.
2064 2015-02-27 Pedro Alves <palves@redhat.com>
2066 * acinclude.m4: Include libiberty.m4.
2067 * configure.ac: Call libiberty_INIT.
2068 * config.in, configure: Regenerate.
2070 2015-02-26 Pedro Alves <palves@redhat.com>
2072 * linux-low.c (linux_wait_1): When incrementing the PC past a
2073 program breakpoint always use the_low_target.breakpoint_len as
2074 increment, rather than the maximum between that and
2075 the_low_target.decr_pc_after_break.
2077 2015-02-23 Pedro Alves <palves@redhat.com>
2079 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
2080 thread was doing a step-over; always adjust the PC if
2081 we stepped over a permanent breakpoint.
2082 (linux_wait_1): If we stepped over breakpoint that was on top of a
2083 permanent breakpoint, manually advance the PC past it.
2085 2015-02-23 Pedro Alves <palves@redhat.com>
2087 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
2089 (x86_fill_gregset, x86_store_gregset): Use it when handling
2092 2015-02-20 Pedro Alves <palves@redhat.com>
2094 * thread-db.c: Include "nat/linux-procfs.h".
2095 (thread_db_init): Skip listing new threads if the kernel supports
2096 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
2098 2015-02-20 Pedro Alves <palves@redhat.com>
2100 * linux-low.c (status_pending_p_callback): Use ptid_match.
2102 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
2104 PR breakpoints/16812
2105 * linux-low.c (wstatus_maybe_breakpoint): Remove.
2106 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
2107 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
2109 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
2111 PR breakpoints/15956
2112 * tracepoint.c (cmd_qtinit): Add check for current_thread.
2114 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2116 * linux-low.c (linux_low_btrace_conf): Print size.
2117 * server.c (handle_btrace_conf_general_set): New.
2118 (hanle_general_set): Call handle_btrace_conf_general_set.
2119 (handle_query): Report Qbtrace-conf:bts:size as supported.
2121 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2123 * linux-low.c (linux_low_enable_btrace): Update parameters.
2124 (linux_low_btrace_conf): New.
2125 (linux_target_ops)<to_btrace_conf>: Initialize.
2126 * server.c (current_btrace_conf): New.
2127 (handle_btrace_enable): Rename to ...
2128 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
2129 to target_enable_btrace. Update comment. Update users.
2130 (handle_qxfer_btrace_conf): New.
2131 (qxfer_packets): Add btrace-conf entry.
2132 (handle_query): Report qXfer:btrace-conf:read as supported packet.
2133 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
2134 (target_ops)<read_btrace_conf>: New.
2135 (target_enable_btrace): Update parameters.
2136 (target_read_btrace_conf): New.
2138 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2140 * server.c (handle_btrace_general_set): Remove call to
2141 target_supports_btrace.
2142 (supported_btrace_packets): New.
2143 (handle_query): Call supported_btrace_packets.
2144 * target.h: include btrace-common.h.
2145 (btrace_target_info): Removed.
2146 (supports_btrace, target_supports_btrace): Update parameters.
2148 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
2150 * Makefile.in (SFILES): Add common/btrace-common.c.
2151 (OBS): Add common/btrace-common.o.
2152 (btrace-common.o): Add build rules.
2153 * linux-low: Include btrace-common.h.
2154 (linux_low_read_btrace): Use struct btrace_data. Call
2155 btrace_data_init and btrace_data_fini.
2157 2015-02-06 Pedro Alves <palves@redhat.com>
2159 * thread-db.c (find_new_threads_callback): Add debug output.
2161 2015-02-04 Pedro Alves <palves@redhat.com>
2163 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2164 (resume_stopped_resumed_lwps): New function.
2165 (linux_wait_for_event_filtered): Use it.
2167 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2169 * Makefile.in (SFILES): Add linux-personality.c.
2170 (linux-personality.o): New rule.
2171 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2172 list of objects to be built.
2173 * linux-low.c: Include nat/linux-personality.h.
2174 (linux_create_inferior): Remove code to disable address space
2175 randomization (moved to ../nat/linux-personality.c). Create
2176 cleanup to disable address space randomization.
2178 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2180 * Makefile.in (posix-strerror.o): New rule.
2181 (mingw-strerror.o): Likewise.
2182 * configure: Regenerated.
2183 * configure.ac: Source file ../common/common.host. Initialize new
2184 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2186 2015-01-14 Yao Qi <yao@codesourcery.com>
2188 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2189 (ppc-linux.o): New rule.
2190 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2191 * configure.ac: AC_CHECK_FUNCS(getauxval).
2192 * config.in: Re-generated.
2193 * configure: Re-generated.
2194 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2195 ppc64_64bit_inferior_p
2197 2015-01-14 Yao Qi <yao@codesourcery.com>
2199 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2200 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2201 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2202 (PT_ORIG_R3, PT_TRAP): Likewise.
2203 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2204 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2205 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2207 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2209 * i387-fp.c (i387_cache_to_xsave): In look over
2210 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2211 zmmh_low_space field by use of zmmh_high_space.
2213 2015-01-09 Pedro Alves <palves@redhat.com>
2215 * linux-low.c (step_over_bkpt): Move higher up in the file.
2216 (handle_extended_wait): Don't store the stop_pc here.
2217 (get_stop_pc): Adjust comments and rename to ...
2218 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2219 stopped for a software breakpoint or hardware breakpoint.
2220 (thread_still_has_status_pending_p): New function.
2221 (status_pending_p_callback): Use
2222 thread_still_has_status_pending_p. If the event is no longer
2223 interesting, resume the LWP.
2224 (handle_tracepoints): Add assert.
2225 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2226 (wstatus_maybe_breakpoint): New function.
2227 (cancel_breakpoint): Delete function.
2228 (check_stopped_by_watchpoint): New function, factored out from
2229 linux_low_filter_event.
2230 (lp_status_maybe_breakpoint): Delete function.
2231 (linux_low_filter_event): Remove filter_ptid argument.
2232 Leave thread group exits pending here. Store the LWP's stop PC.
2233 Always leave events pending.
2234 (linux_wait_for_event_filtered): Pull all events out of the
2235 kernel, and leave them all pending.
2236 (count_events_callback, select_event_lwp_callback): Consider all
2238 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2239 (select_event_lwp): Only give preference to the stepping LWP in
2240 all-stop mode. Adjust comments.
2241 (ignore_event): New function.
2242 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2243 references to cancel_breakpoints. Adjust to renames. Also give
2244 equal priority to all LWPs that have had events in non-stop mode.
2245 If reporting a software breakpoint event, unadjust the LWP's PC.
2246 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2247 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2249 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2250 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2251 (linux_stopped_by_watchpoint): Adjust.
2252 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2253 * linux-low.h (enum lwp_stop_reason): New.
2254 (struct lwp_info) <stop_pc>: Adjust comment.
2255 <stopped_by_watchpoint>: Delete field.
2256 <stop_reason>: New field.
2257 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2258 * mem-break.c (software_breakpoint_inserted_here)
2259 (hardware_breakpoint_inserted_here): New function.
2260 * mem-break.h (software_breakpoint_inserted_here)
2261 (hardware_breakpoint_inserted_here): Declare.
2262 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2263 (cancel_breakpoints): Delete.
2264 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2265 (upload_fast_traceframes): Remove references to
2268 2015-01-09 Pedro Alves <palves@redhat.com>
2270 * thread-db.c (find_new_threads_callback): Ignore thread if the
2271 kernel thread ID is -1.
2273 2015-01-09 Pedro Alves <palves@redhat.com>
2275 * linux-low.c (linux_attach_fail_reason_string): Move to
2276 nat/linux-ptrace.c, and rename.
2277 (linux_attach_lwp): Update comment.
2278 (attach_proc_task_lwp_callback): New function.
2279 (linux_attach): Adjust to rename and use
2280 linux_proc_attach_tgid_threads.
2281 (linux_attach_fail_reason_string): Delete declaration.
2283 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2285 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2286 * server.c (gdbserver_version): Likewise.
2288 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2290 * remote-utils.c: Include ctype.h.
2291 (input_interrupt): Explicitly handle the case when the char
2292 received is the NUL byte. Improve the printing of non-ASCII
2295 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2297 * linux-low.c (linux_low_filter_event): Update call to
2298 linux_enable_event_reporting following the addition of
2299 a new parameter to that function.
2301 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2304 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2305 (AARCH64_FPCR_REGNO): Likewise.
2306 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2307 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2308 (aarch64_store_fpregset): Likewise.
2310 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2312 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2313 Remove FIXME comment about assumption about N.
2315 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2317 * configure.ac: If large-file support is disabled in GDBserver,
2318 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2319 * configure: Regenerate.
2321 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2323 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2324 warning upon ENODATA from ptrace.
2325 * linux-s390-low.c (s390_store_tdb): New.
2326 (s390_regsets): Add regset for NT_S390_TDB.
2328 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2330 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2331 without a fill_function.
2332 * linux-s390-low.c (s390_fill_last_break): Remove.
2333 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2334 (s390_arch_setup): Use regset's size instead of fill_function for
2337 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2339 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2340 the regset's store function when ptrace returned an error.
2341 * regcache.c (get_thread_regcache): Invalidate register cache
2342 before fetching inferior's registers.
2344 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2346 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2347 while-loop as for-loop.
2348 (regsets_store_inferior_registers): Likewise.
2350 2014-11-28 Yao Qi <yao@codesourcery.com>
2352 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2353 * config.in, configure: Re-generate.
2354 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2357 2014-11-21 Yao Qi <yao@codesourcery.com>
2359 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2360 (AC_CHECK_HEADERS): Remove malloc.h.
2361 * configure: Re-generated.
2362 * config.in: Re-generated.
2363 * server.h: Don't include alloca.h and malloc.h.
2364 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2365 Don't include malloc.h.
2367 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2369 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2370 corresponding ERRNO check in same block.
2372 2014-11-12 Pedro Alves <palves@redhat.com>
2374 * server.c (cont_thread): Update comment.
2375 (start_inferior, attach_inferior): No longer clear cont_thread.
2376 (handle_v_cont): No longer set cont_thread.
2377 (captured_main): Clear cont_thread each time a GDB connects.
2379 2014-11-12 Pedro Alves <palves@redhat.com>
2381 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2382 thread, and don't resume all threads if the Hc thread has exited.
2384 2014-11-12 Pedro Alves <palves@redhat.com>
2386 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2387 the process group instead of to a specific LWP.
2389 2014-10-15 Pedro Alves <palves@redhat.com>
2392 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2394 (arm_set_thread_context): Delete.
2395 (the_low_target): Adjust.
2396 * win32-i386-low.c (debug_registers_changed)
2397 (debug_registers_used): Delete.
2398 (update_debug_registers_callback): New function.
2399 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2400 needing to update their debug registers.
2401 (win32_get_current_dr): New function.
2402 (x86_dr_low_get_addr, x86_dr_low_get_control)
2403 (x86_dr_low_get_status): Fetch the debug register from the thread
2405 (i386_initial_stuff): Adjust.
2406 (i386_get_thread_context): Remove current_event parameter. Don't
2407 clear debug_registers_changed nor copy DR values to
2409 (i386_set_thread_context): Delete.
2410 (i386_prepare_to_resume): New function.
2411 (i386_thread_added): Mark the thread as needing to update irs
2413 (the_low_target): Remove i386_set_thread_context and install
2414 i386_prepare_to_resume.
2415 * win32-low.c (win32_get_thread_context): Adjust.
2416 (win32_set_thread_context): Use SetThreadContext
2418 (win32_prepare_to_resume): New function.
2419 (win32_require_context): New function, factored out from ...
2420 (thread_rec): ... this.
2421 (continue_one_thread): Call win32_prepare_to_resume on each thread
2422 we're about to continue.
2423 (win32_resume): Call win32_prepare_to_resume on the event thread.
2424 * win32-low.h (struct win32_thread_info)
2425 <debug_registers_changed>: New field.
2426 (struct win32_target_ops): Change prototype of set_thread_context,
2427 delete set_thread_context and add prepare_to_resume.
2428 (win32_require_context): New declaration.
2430 2014-10-08 Gary Benson <gbenson@redhat.com>
2432 * server.h: Do not include common-exceptions.h.
2434 2014-10-08 Gary Benson <gbenson@redhat.com>
2436 * server.h: Do not include cleanups.h.
2438 2014-09-30 James Hogan <james.hogan@imgtec.com>
2440 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2443 2014-09-23 Yao Qi <yao@codesourcery.com>
2445 * linux-low.c (lp_status_maybe_breakpoint): New function.
2446 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2447 (count_events_callback): Likewise.
2448 (select_event_lwp_callback): Likewise.
2449 (cancel_breakpoints_callback): Likewise.
2451 2014-09-19 Don Breazeal <donb@codesourcery.com>
2453 * linux-low.c (handle_extended_wait): Call
2454 linux_ptrace_get_extended_event.
2455 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2456 linux_is_extended_waitstatus.
2458 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2460 * Makefile.in (CPPFLAGS): Define.
2461 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2462 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2464 2014-09-16 Gary Benson <gbenson@redhat.com>
2466 * inferiors.h (current_inferior): Renamed as...
2467 (current_thread): New variable. All uses updated.
2468 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2469 (maybe_move_out_of_jump_pad): Likewise.
2470 (cancel_breakpoint): Likewise.
2471 (linux_low_filter_event): Likewise.
2472 (wait_for_sigstop): Likewise.
2473 (linux_resume_one_lwp): Likewise.
2474 (need_step_over_p): Likewise.
2475 (start_step_over): Likewise.
2476 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2477 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2478 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2479 and save_inferior as saved_thread.
2480 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2482 (regcache_invalidate_thread): Likewise.
2483 * remote-utils.c (prepare_resume_reply): Likewise.
2484 * thread-db.c (thread_db_get_tls_address): Likewise.
2485 (disable_thread_event_reporting): Likewise.
2486 (remove_thread_event_breakpoints): Likewise.
2487 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2489 * target.h (set_desired_inferior): Renamed as...
2490 (set_desired_thread): New declaration. All uses updated.
2491 * server.c (myresume): Updated comment to reference thread instead
2493 (handle_serial_event): Likewise.
2494 (handle_target_event): Likewise.
2496 2014-09-12 Tom Tromey <tromey@redhat.com>
2497 Gary Benson <gbenson@redhat.com>
2499 * regcache.h: Include common-regcache.h.
2500 (regcache_read_pc): Don't declare.
2501 * regcache.c (get_thread_regcache_for_ptid): New function.
2503 2014-09-11 Tom Tromey <tromey@redhat.com>
2504 Gary Benson <gbenson@redhat.com>
2506 * symbol.c: New file.
2507 * Makefile.in (SFILES): Add symbol.c.
2508 (OBS): Add symbol.o.
2510 2014-09-11 Gary Benson <gbenson@redhat.com>
2512 * target.c (target_stop_ptid, target_continue_ptid): New
2515 2014-09-11 Tom Tromey <tromey@redhat.com>
2516 Gary Benson <gbenson@redhat.com>
2518 * target.h: Include target/target.h.
2519 * target.c (target_read_memory, target_read_uint32)
2520 (target_write_memory): New functions.
2522 2014-09-11 Gary Benson <gbenson@redhat.com>
2524 * server.h (debug_hw_points): Don't declare.
2525 * server.c (debug_hw_points): Don't define. Replace all uses
2526 with show_debug_regs.
2527 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2528 all uses with show_debug_regs.
2530 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2532 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2533 endianness into account.
2534 (ppc_supply_ptrace_register): Likewise.
2536 2014-09-03 James Hogan <james.hogan@imgtec.com>
2538 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2539 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2541 2014-09-03 Gary Benson <gbenson@redhat.com>
2543 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2544 ALL_DEBUG_ADDRESS_REGISTERS.
2546 2014-09-02 Gary Benson <gbenson@redhat.com>
2548 * i386-low.h: Renamed as...
2549 * x86-low.h: New file. All type, function and variable name
2550 prefixes changed from "i386_" to "x86_". All references updated.
2551 * i386-low.c: Renamed as...
2552 * x86-low.c: New file. All type, function and variable name
2553 prefixes changed from "i386_" to "x86_". All references updated.
2555 2014-09-02 Gary Benson <gbenson@redhat.com>
2557 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2558 (x86_linux_new_thread): Likewise.
2560 2014-08-29 Gary Benson <gbenson@redhat.com>
2562 * server.h (setjmp.h): Do not include.
2563 (toplevel): Do not declare.
2564 (common-exceptions.h): Include.
2565 (cleanups.h): Likewise.
2566 * server.c (toplevel): Do not define.
2567 (exit_code): New static global.
2568 (detach_or_kill_for_exit_cleanup): New function.
2569 (main): New function. Original main renamed to...
2570 (captured_main): New function.
2571 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2573 2014-08-29 Gary Benson <gbenson@redhat.com>
2575 * Makefile.in (SFILES): Add common/common-exceptions.c.
2576 (OBS): Add common-exceptions.o.
2577 (common-exceptions.o): New rule.
2578 * utils.c (prepare_to_throw_exception): New function.
2580 2014-08-29 Gary Benson <gbenson@redhat.com>
2582 * config.in: Regenerate.
2583 * configure: Likewise.
2585 2014-08-29 Gary Benson <gbenson@redhat.com>
2587 * Makefile.in (SFILES): Add common/cleanups.c.
2589 (cleanups.o): New rule.
2591 2014-08-29 Gary Benson <gbenson@redhat.com>
2593 * utils.c (internal_vwarning): New function.
2595 2014-08-28 Gary Benson <gbenson@redhat.com>
2597 * utils.h (fatal): Remove declaration.
2598 * utils.c (fatal): Remove function.
2600 2014-08-28 Gary Benson <gbenson@redhat.com>
2602 * tracepoint.c (gdb_agent_init): Replace fatal with
2604 (initialize_tracepoint): Likewise.
2606 2014-08-28 Gary Benson <gbenson@redhat.com>
2608 * remote-utils.c (remote_prepare): Replace fatal with error.
2610 2014-08-28 Gary Benson <gbenson@redhat.com>
2612 * linux-low.c (linux_async): Replace fatal with warning.
2614 (linux_start_non_stop): Return -1 if linux_async failed.
2616 2014-08-28 Gary Benson <gbenson@redhat.com>
2618 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2620 (i386_dr_low_get_addr): Remove vague comment.
2621 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2624 2014-08-28 Gary Benson <gbenson@redhat.com>
2626 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2627 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2629 (linux_resume_one_lwp): Likewise.
2630 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2632 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2633 with internal_error.
2634 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2635 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2636 (find_register_by_name): Replace fatal with internal_error.
2637 (find_regno): Likewise.
2638 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2639 * thread-db.c (thread_db_create_event): Likewise.
2640 (thread_db_load_search): Likewise.
2641 (try_thread_db_load_1): Likewise.
2642 * tracepoint.c (get_jump_space_head): Replace fatal with
2644 (claim_trampoline_space): Likewise.
2645 (have_fast_tracepoint_trampoline_buffer): Likewise.
2646 (cmd_qtstart): Likewise.
2647 (stop_tracing): Likewise.
2648 (fast_tracepoint_collecting): Likewise.
2649 (target_malloc): Likewise.
2650 (download_tracepoint): Likewise.
2651 (download_trace_state_variables): Replace check with gdb_assert.
2652 (upload_fast_traceframes): Replace fatal with internal_error.
2654 2014-08-19 Tom Tromey <tromey@redhat.com>
2655 Gary Benson <gbenson@redhat.com>
2657 * Makefile.in (SFILES): Add common/common-debug.c.
2658 (OBS): Add common-debug.o.
2659 (common-debug.o): New rule.
2660 * debug.h (debug_printf): Don't declare.
2661 * debug.c (debug_printf): Renamed and rewritten as...
2662 (debug_vprintf): New function.
2664 2014-08-19 Gary Benson <gbenson@redhat.com>
2666 * utils.h: Do not include print-utils.h.
2668 2014-08-19 Tom Tromey <tromey@redhat.com>
2669 Gary Benson <gbenson@redhat.com>
2671 * server.h: Add static assertion.
2672 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2674 2014-08-19 Tom Tromey <tromey@redhat.com>
2675 Gary Benson <gbenson@redhat.com>
2677 * Makefile.in (SFILES): Add common/errors.c.
2678 (OBS): Add errors.o.
2679 (IPA_OBS): Add errors-ipa.o.
2680 (errors.o): New rule.
2681 (errors-ipa.o): Likewise.
2682 * utils.h (perror_with_name, error, warning): Don't declare.
2683 * utils.c (warning): Renamed and rewritten as...
2684 (vwarning): New function.
2685 (error): Renamed and rewritten as...
2686 (verror): New function.
2687 (internal_error): Renamed and rewritten as...
2688 (internal_verror): New function.
2690 2014-08-07 Gary Benson <gbenson@redhat.com>
2692 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2693 * configure: Regenerate.
2694 * config.in: Likewise.
2695 * server.h: Do not include errno.h.
2696 * event-loop.c: Likewise.
2697 * hostio-errno.c: Likewise.
2698 * linux-low.c: Likewise.
2699 * remote-utils.c: Likewise.
2700 * spu-low.c: Likewise.
2701 * utils.c: Likewise.
2702 * gdbreplay.c: Unconditionally include errno.h.
2704 2014-08-07 Gary Benson <gbenson@redhat.com>
2706 * server.h: Do not include string.h.
2707 * event-loop.c: Likewise.
2708 * linux-low.c: Likewise.
2709 * regcache.c: Likewise.
2710 * remote-utils.c: Likewise.
2711 * spu-low.c: Likewise.
2712 * utils.c: Likewise.
2714 2014-08-07 Gary Benson <gbenson@redhat.com>
2716 * server.h: Do not include gdb_assert.h.
2718 2014-08-07 Gary Benson <gbenson@redhat.com>
2720 * server.h: Do not include common-utils.h.
2722 2014-08-07 Gary Benson <gbenson@redhat.com>
2724 * server.h: Do not include ptid.h.
2725 * notif.h: Likewise.
2727 2014-08-07 Gary Benson <gbenson@redhat.com>
2729 * server.h: Do not include gdb_locale.h.
2731 2014-08-07 Gary Benson <gbenson@redhat.com>
2733 * server.h: Do not include gdb/signals.h.
2734 * win32-low.c: Likewise.
2736 2014-08-07 Gary Benson <gbenson@redhat.com>
2738 * server.h: Do not include pathmax.h.
2740 2014-08-07 Gary Benson <gbenson@redhat.com>
2742 * server.h: Do not include libiberty.h.
2743 * linux-bfin-low.c: Likewise.
2745 2014-08-07 Gary Benson <gbenson@redhat.com>
2747 * server.h: Do not include ansidecl.h.
2749 2014-08-07 Gary Benson <gbenson@redhat.com>
2751 * linux-x86-low.c: Do not include stddef.h.
2752 * lynx-ppc-low.c: Likewise.
2753 * tracepoint.c: Likewise.
2755 2014-08-07 Gary Benson <gbenson@redhat.com>
2757 * server.h: Do not include stdarg.h.
2758 * nto-low.c: Likewise.
2760 2014-08-07 Gary Benson <gbenson@redhat.com>
2762 * server.h: Do not include stdlib.h.
2763 * inferiors.c: Likewise.
2764 * linux-low.c: Likewise.
2765 * regcache.c: Likewise.
2766 * spu-low.c: Likewise.
2767 * tracepoint.c: Likewise.
2768 * utils.c: Likewise.
2770 2014-08-07 Gary Benson <gbenson@redhat.com>
2772 * server.h: Do not include stdio.h.
2773 * linux-low.c: Likewise.
2774 * remote-utils.c: Likewise.
2775 * spu-low.c: Likewise.
2776 * utils.c: Likewise.
2777 * wincecompat.c: Likewise.
2779 2014-08-06 Gary Benson <gbenson@redhat.com>
2781 * regcache.c (init_register_cache): Move conditionals inside if.
2783 2014-08-06 Gary Benson <gbenson@redhat.com>
2785 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2787 2014-07-31 Gary Benson <gbenson@redhat.com>
2789 * ax.h: Do not include server.h.
2790 * gdbthread.h: Likewise.
2791 * lynx-low.h: Likewise.
2792 * notif.h: Likewise.
2794 2014-07-30 Gary Benson <gbenson@redhat.com>
2796 * server.h: Include common-defs.h.
2797 Do not include config.h or build-gnulib-gdbserver/config.h.
2799 2014-07-30 Gary Benson <gbenson@redhat.com>
2801 * hostio-errno.c: Move server.h to top of includes list.
2802 * inferiors.c: Likewise.
2803 * linux-x86-low.c: Likewise.
2804 * notif.c: Include server.h.
2806 2014-07-24 Tom Tromey <tromey@redhat.com>
2807 Gary Benson <gbenson@redhat.com>
2809 * server.h (CORE_ADDR): Now unsigned.
2811 2014-07-16 Pedro Alves <palves@redhat.com>
2813 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2815 2014-07-15 Pedro Alves <palves@redhat.com>
2817 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2820 2014-07-11 Pedro Alves <palves@redhat.com>
2822 * linux-low.c (kill_wait_lwp): New function, based on
2823 kill_one_lwp_callback, but use my_waitpid directly.
2824 (kill_one_lwp_callback, linux_kill): Use it.
2826 2014-06-23 Pedro Alves <palves@redhat.com>
2828 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2829 before setting DR0..DR3.
2831 2014-06-20 Gary Benson <gbenson@redhat.com>
2833 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2834 * configure: Regenerated.
2835 * config.in: Likewise.
2837 2014-06-20 Gary Benson <gbenson@redhat.com>
2839 * Makefile.in (SFILES): Update locations for files moved
2841 (object file files): Reordered.
2843 2014-06-20 Gary Benson <gbenson@redhat.com>
2845 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2846 (i386_dr_low_set_addr): Likewise.
2847 (i386_dr_low_get_addr): Likewise.
2848 (i386_dr_low_can_set_control): Likewise.
2849 (i386_dr_low_set_control): Likewise.
2850 (i386_dr_low_get_control): Likewise.
2851 (i386_dr_low_get_status): Likewise.
2852 (i386_get_debug_register_length): Likewise.
2853 * linux-x86-low.c (i386_dr_low_set_addr):
2854 Changed signature. Made static.
2855 (i386_dr_low_get_addr): Likewise.
2856 (i386_dr_low_set_control): Likewise.
2857 (i386_dr_low_get_control): Likewise.
2858 (i386_dr_low_get_status): Likewise.
2859 (i386_dr_low): New global variable.
2860 * win32-i386-low.c (i386_dr_low_set_addr):
2861 Changed signature. Made static.
2862 (i386_dr_low_get_addr): Likewise.
2863 (i386_dr_low_set_control): Likewise.
2864 (i386_dr_low_get_control): Likewise.
2865 (i386_dr_low_get_status): Likewise.
2866 (i386_dr_low): New global variable.
2868 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2870 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2871 * Makefile.in (AR, AR_FLAGS): Define.
2872 * configure: Regenerate.
2874 2014-06-19 Gary Benson <gbenson@redhat.com>
2876 * Makefile.in (i386-dregs.o): New rule.
2877 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2878 * i386-low.c (target.h): Remove include.
2879 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2880 (DR_CONTROL_SHIFT): Likewise.
2881 (DR_CONTROL_SIZE): Likewise.
2882 (DR_RW_EXECUTE): Likewise.
2883 (DR_RW_WRITE): Likewise.
2884 (DR_RW_READ): Likewise.
2885 (DR_RW_IORW): Likewise.
2886 (DR_LEN_1): Likewise.
2887 (DR_LEN_2): Likewise.
2888 (DR_LEN_4): Likewise.
2889 (DR_LEN_8): Likewise.
2890 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2891 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2892 (DR_ENABLE_SIZE): Likewise.
2893 (DR_LOCAL_SLOWDOWN): Likewise.
2894 (DR_GLOBAL_SLOWDOWN): Likewise.
2895 (DR_CONTROL_RESERVED): Likewise.
2896 (I386_DR_CONTROL_MASK): Likewise.
2897 (I386_DR_VACANT): Likewise.
2898 (I386_DR_LOCAL_ENABLE): Likewise.
2899 (I386_DR_GLOBAL_ENABLE): Likewise.
2900 (I386_DR_DISABLE): Likewise.
2901 (I386_DR_SET_RW_LEN): Likewise.
2902 (I386_DR_GET_RW_LEN): Likewise.
2903 (I386_DR_WATCH_HIT): Likewise.
2904 (i386_wp_op_t): Likewise.
2905 (i386_show_dr): Likewise.
2906 (i386_length_and_rw_bits): Likewise.
2907 (i386_insert_aligned_watchpoint): Likewise.
2908 (i386_remove_aligned_watchpoint): Likewise.
2909 (i386_handle_nonaligned_watchpoint): Likewise.
2910 i386_update_inferior_debug_regs(): Likewise.
2911 (i386_dr_insert_watchpoint): Likewise.
2912 (i386_dr_remove_watchpoint): Likewise.
2913 (i386_dr_region_ok_for_watchpoint): Likewise.
2914 (i386_dr_stopped_data_address): Likewise.
2915 (i386_dr_stopped_by_watchpoint): Likewise.
2917 2014-06-19 Gary Benson <gbenson@redhat.com>
2919 * i386-low.c (i386_dr_show): Renamed to
2920 i386_show_dr and made static. All uses updated.
2921 (i386_dr_length_and_rw_bits): Renamed to
2922 i386_length_and_rw_bits and made static.
2924 (i386_dr_insert_aligned_watchpoint): Renamed to
2925 i386_insert_aligned_watchpoint and made static.
2927 (i386_dr_remove_aligned_watchpoint): Renamed to
2928 i386_remove_aligned_watchpoint and made static.
2930 (i386_dr_update_inferior_debug_regs): Renamed to
2931 i386_update_inferior_debug_regs and made static.
2934 2014-06-18 Gary Benson <gbenson@redhat.com>
2936 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2937 (i386_dr_low_can_set_control): Likewise.
2938 (i386_get_debug_register_length): Likewise.
2939 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2940 (i386_dr_low_can_set_control): Likewise.
2941 (i386_get_debug_register_length): Likewise.
2943 2014-06-17 Gary Benson <gbenson@redhat.com>
2945 * i386-low.h (i386-dregs.h): New include.
2946 (DR_FIRSTADDR): Now in i386-dregs.h.
2947 (DR_LASTADDR): Likewise.
2948 (DR_NADDR): Likewise.
2949 (DR_STATUS): Likewise.
2950 (DR_CONTROL): Likewise.
2951 (i386_debug_reg_state): Likewise.
2952 (i386_dr_insert_watchpoint): Likewise.
2953 (i386_dr_remove_watchpoint): Likewise.
2954 (i386_dr_region_ok_for_watchpoint): Likewise.
2955 (i386_dr_stopped_data_address): Likewise.
2956 (i386_dr_stopped_by_watchpoint): Likewise.
2957 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2959 2014-06-18 Gary Benson <gbenson@redhat.com>
2961 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2962 i386_dr_insert_watchpoint.
2963 (i386_low_remove_watchpoint): Renamed to
2964 i386_dr_remove_watchpoint.
2965 (i386_low_region_ok_for_watchpoint): Renamed to
2966 i386_dr_region_ok_for_watchpoint.
2967 (i386_low_stopped_data_address): Renamed to
2968 i386_dr_stopped_data_address.
2969 (i386_low_stopped_by_watchpoint): Renamed to
2970 i386_dr_stopped_by_watchpoint.
2971 * i386-low.c (i386_show_dr): Renamed to
2972 i386_dr_show and made nonstatic. All uses updated.
2973 (i386_length_and_rw_bits): Renamed to
2974 i386_dr_length_and_rw_bits and made nonstatic.
2976 (i386_insert_aligned_watchpoint): Renamed to
2977 i386_dr_insert_aligned_watchpoint and made nonstatic.
2979 (i386_remove_aligned_watchpoint): Renamed to
2980 i386_dr_remove_aligned_watchpoint and made nonstatic.
2982 (i386_update_inferior_debug_regs): Renamed to
2983 i386_dr_update_inferior_debug_regs and made nonstatic.
2985 (i386_low_insert_watchpoint): Renamed to
2986 i386_dr_insert_watchpoint. All uses updated.
2987 (i386_low_remove_watchpoint): Renamed to
2988 i386_dr_remove_watchpoint. All uses updated.
2989 (i386_low_region_ok_for_watchpoint): Renamed to
2990 i386_dr_region_ok_for_watchpoint. All uses updated.
2991 (i386_low_stopped_data_address): Renamed to
2992 i386_dr_stopped_data_address. All uses updated.
2993 (i386_low_stopped_by_watchpoint): Renamed to
2994 i386_dr_stopped_by_watchpoint. All uses updated.
2996 2014-06-18 Gary Benson <gbenson@redhat.com>
2998 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2999 (i386_dr_low_can_set_control): Likewise.
3000 (i386_insert_aligned_watchpoint): New check.
3002 2014-06-18 Gary Benson <gbenson@redhat.com>
3004 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
3007 2014-06-18 Gary Benson <gbenson@redhat.com>
3009 * i386-low.c (i386_length_and_rw_bits): Use internal_error
3010 instead of fatal and error.
3011 (i386_handle_nonaligned_watchpoint): Likewise.
3013 2014-06-18 Gary Benson <gbenson@redhat.com>
3015 * i386-low.c (i386_get_debug_register_length): New macro.
3016 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
3017 (i386_show_dr): Use debug_printf instead of fprintf. Use
3018 phex to format values.
3020 2014-06-18 Gary Benson <gbenson@redhat.com>
3022 * i386-low.h: Comment changes.
3023 * i386-low.c: Likewise.
3025 2014-06-18 Gary Benson <gbenson@redhat.com>
3027 * i386-low.c: Whitespace changes.
3029 2014-06-12 Tom Tromey <tromey@redhat.com>
3031 * utils.c (freeargv): Remove.
3033 2014-06-12 Tom Tromey <tromey@redhat.com>
3035 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
3036 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
3037 (parse_debug_format_options): Likewise.
3038 (gdbserver_usage): Likewise.
3039 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
3040 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
3041 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
3043 ($(LIBGNU)): Depend on libiberty.
3044 (all-lib): Recurse into all subdirs.
3045 (install-only): Invoke "install" target in subdirs.
3046 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
3048 * configure: Rebuild.
3049 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
3050 for vasprintf, vsnprintf, or gettimeofday.
3051 * configure.srv: Don't add safe-ctype.o or lbasename.o to
3054 2014-06-05 Joel Brobecker <brobecker@adacore.com>
3056 * development.sh: Delete.
3057 * Makefile.in (config.status): Adjust dependency on development.sh.
3058 * configure.ac: Adjust development.sh source call.
3059 * configure: Regenerate.
3061 2014-06-02 Pedro Alves <palves@redhat.com>
3063 * ax.c (gdb_free_agent_expr): New function.
3064 * ax.h (gdb_free_agent_expr): New declaration.
3065 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
3067 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
3069 (clear_breakpoint_conditions_and_commands): New function.
3070 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
3071 (clear_breakpoint_conditions_and_commands): New declaration.
3073 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
3075 * linux-aarch64-low.c (asm/ptrace.h): Include.
3077 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
3079 Fix TLS access for -static -pthread.
3080 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
3081 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
3082 (thread_db_load_search, try_thread_db_load_1): Initialize it.
3084 2014-05-20 Pedro Alves <palves@redhat.com>
3086 * linux-aarch64-low.c (aarch64_insert_point)
3087 (aarch64_remove_point): No longer check whether the type is
3088 supported here. Adjust to new interface.
3089 (the_low_target): Install aarch64_supports_z_point_type as
3090 supports_z_point_type method.
3091 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
3092 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
3093 instead of a Z packet char. Adjust.
3094 (arm_supports_z_point_type): New function.
3095 (arm_insert_point, arm_remove_point): Adjust to new interface.
3096 (the_low_target): Install arm_supports_z_point_type.
3097 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
3098 (cris_insert_point, cris_remove_point): Adjust to new interface.
3099 Don't check whether the type is supported here.
3100 (the_low_target): Install cris_supports_z_point_type.
3101 * linux-low.c (linux_supports_z_point_type): New function.
3102 (linux_insert_point, linux_remove_point): Adjust to new interface.
3103 * linux-low.h (struct linux_target_ops) <insert_point,
3104 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
3105 raw_breakpoint pointer parameter.
3106 <supports_z_point_type>: New method.
3107 * linux-mips-low.c (mips_supports_z_point_type): New function.
3108 (mips_insert_point, mips_remove_point): Adjust to new interface.
3109 Use mips_supports_z_point_type.
3110 (the_low_target): Install mips_supports_z_point_type.
3111 * linux-ppc-low.c (the_low_target): Install NULL as
3112 supports_z_point_type method.
3113 * linux-s390-low.c (the_low_target): Install NULL as
3114 supports_z_point_type method.
3115 * linux-sparc-low.c (the_low_target): Install NULL as
3116 supports_z_point_type method.
3117 * linux-x86-low.c (x86_supports_z_point_type): New function.
3118 (x86_insert_point): Adjust to new insert_point interface. Use
3119 insert_memory_breakpoint. Adjust to new
3120 i386_low_insert_watchpoint interface.
3121 (x86_remove_point): Adjust to remove_point interface. Use
3122 remove_memory_breakpoint. Adjust to new
3123 i386_low_remove_watchpoint interface.
3124 (the_low_target): Install x86_supports_z_point_type.
3125 * lynx-low.c (lynx_target_ops): Install NULL as
3126 supports_z_point_type callback.
3127 * nto-low.c (nto_supports_z_point_type): New.
3128 (nto_insert_point, nto_remove_point): Adjust to new interface.
3129 (nto_target_ops): Install nto_supports_z_point_type.
3130 * mem-break.c: Adjust intro comment.
3131 (struct raw_breakpoint) <raw_type, size>: New fields.
3132 <inserted>: Update comment.
3133 <shlib_disabled>: Delete field.
3134 (enum bkpt_type) <gdb_breakpoint>: Delete value.
3135 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
3136 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
3137 (raw_bkpt_type_to_target_hw_bp_type): New function.
3138 (find_enabled_raw_code_breakpoint_at): New function.
3139 (find_raw_breakpoint_at): New type and size parameters. Use them.
3140 (insert_memory_breakpoint): New function, based off
3141 set_raw_breakpoint_at.
3142 (remove_memory_breakpoint): New function.
3143 (set_raw_breakpoint_at): Reimplement.
3144 (set_breakpoint): New, based on set_breakpoint_at.
3145 (set_breakpoint_at): Reimplement.
3146 (delete_raw_breakpoint): Go through the_target->remove_point
3147 instead of assuming memory breakpoints.
3148 (find_gdb_breakpoint_at): Delete.
3149 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
3150 (find_gdb_breakpoint): New function.
3151 (set_gdb_breakpoint_at): Delete.
3152 (z_type_supported): New function.
3153 (set_gdb_breakpoint_1): New function, loosely based off
3154 set_gdb_breakpoint_at.
3155 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
3156 (delete_gdb_breakpoint_at): Delete.
3157 (delete_gdb_breakpoint_1): New function, loosely based off
3158 delete_gdb_breakpoint_at.
3159 (delete_gdb_breakpoint): New function.
3160 (clear_gdb_breakpoint_conditions): Rename to ...
3161 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3163 (add_condition_to_breakpoint): Make static.
3164 (add_breakpoint_condition): Take a struct breakpoint pointer
3165 instead of an address. Adjust.
3166 (gdb_condition_true_at_breakpoint): Rename to ...
3167 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3169 (gdb_condition_true_at_breakpoint): Reimplement.
3170 (add_breakpoint_commands): Take a struct breakpoint pointer
3171 instead of an address. Adjust.
3172 (gdb_no_commands_at_breakpoint): Rename to ...
3173 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3174 parameter. Return true if no breakpoint was found. Change debug
3176 (gdb_no_commands_at_breakpoint): Reimplement.
3177 (run_breakpoint_commands): Rename to ...
3178 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3179 and change return type to boolean.
3180 (run_breakpoint_commands): New function.
3181 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3182 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3183 breakpoint. Go through the_target->remove_point instead of
3184 assuming memory breakpoint.
3185 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3186 software and hardware breakpoints.
3187 (reinsert_raw_breakpoint): Go through the_target->insert_point
3188 instead of assuming memory breakpoint.
3189 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3190 software and hardware breakpoints.
3191 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3192 Check both software and hardware breakpoints.
3193 (validate_inserted_breakpoint): Assert the breakpoint is a
3194 software breakpoint. Set the inserted flag to -1 instead of
3195 setting shlib_disabled.
3196 (delete_disabled_breakpoints): Adjust.
3197 (validate_breakpoints): Only validate software breakpoints.
3198 Adjust to inserted flag change.
3199 (check_mem_read, check_mem_write): Skip breakpoint types other
3200 than software breakpoints. Adjust to inserted flag change.
3201 * mem-break.h (enum raw_bkpt_type): New enum.
3202 (raw_breakpoint, struct process_info): Forward declare.
3203 (Z_packet_to_target_hw_bp_type): Delete declaration.
3204 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3205 (set_gdb_breakpoint, delete_gdb_breakpoint)
3206 (clear_breakpoint_conditions): New declarations.
3207 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3208 (breakpoint_inserted_here): Update comment.
3209 (add_breakpoint_condition, add_breakpoint_commands): Replace
3210 address parameter with a breakpoint pointer parameter.
3211 (gdb_breakpoint_here): Update comment.
3212 (delete_gdb_breakpoint_at): Delete.
3213 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3214 * server.c (process_point_options): Take a struct breakpoint
3215 pointer instead of an address. Adjust.
3216 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3217 delete_gdb_breakpoint.
3218 * spu-low.c (spu_target_ops): Install NULL as
3219 supports_z_point_type method.
3220 * target.h: Include mem-break.h.
3221 (struct target_ops) <prepare_to_access_memory>: Update comment.
3222 <supports_z_point_type>: New field.
3223 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3224 instead of a char. Also take a raw breakpoint pointer.
3225 * win32-arm-low.c (the_low_target): Install NULL as
3226 supports_z_point_type.
3227 * win32-i386-low.c (i386_supports_z_point_type): New function.
3228 (i386_insert_point, i386_remove_point): Adjust to new interface.
3229 (the_low_target): Install i386_supports_z_point_type.
3230 * win32-low.c (win32_supports_z_point_type): New function.
3231 (win32_insert_point, win32_remove_point): Adjust to new interface.
3232 (win32_target_ops): Install win32_supports_z_point_type.
3233 * win32-low.h (struct win32_target_ops):
3234 <supports_z_point_type>: New method.
3235 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3236 instead of a char. Also take a raw breakpoint pointer.
3238 2014-05-20 Pedro Alves <palves@redhat.com>
3240 * mem-break.h: Include break-common.h.
3241 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3242 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3243 (Z_packet_to_target_hw_bp_type): New declaration.
3244 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3245 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3246 (Z_PACKET_ACCESS_WP): Delete macros.
3247 (Z_packet_to_hw_type): Delete function.
3248 * i386-low.h: Don't include break-common.h here.
3249 (Z_packet_to_hw_type): Delete declaration.
3250 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3251 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3252 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3253 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3254 * linux-aarch64-low.c: Don't include break-common.h here.
3255 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3256 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3257 (Z_packet_to_target_hw_bp_type): Delete function.
3258 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3260 (mips_insert_point, mips_remove_point): Use
3261 Z_packet_to_target_hw_bp_type.
3263 2014-05-20 Pedro Alves <palves@redhat.com>
3265 * linux-aarch64-low.c: Include break-common.h.
3266 (enum target_point_type): Delete.
3267 (Z_packet_to_point_type): Rename to ...
3268 (Z_packet_to_target_hw_bp_type): ... this, and return a
3269 target_hw_bp_type instead.
3270 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3271 instead of an enum target_point_type.
3272 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3274 (aarch64_dr_state_insert_one_point)
3275 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3276 (aarch64_handle_aligned_watchpoint)
3277 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3278 Take an enum target_hw_bp_type instead of an enum
3280 (aarch64_supports_z_point_type): New function.
3281 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3282 use Z_packet_to_target_hw_bp_type.
3284 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3286 * configure.ac: Only use -Werror by default when DEVELOPMENT
3288 * configure: Regenerate.
3290 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3292 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3293 * linux-x86-low.c (X86_64_USER_REGS): New.
3294 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3296 2014-04-28 Yao Qi <yao@codesourcery.com>
3298 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3301 2014-04-25 Pedro Alves <palves@redhat.com>
3304 * linux-low.c (linux_attach_fail_reason_string): New function.
3305 (linux_attach_lwp): Delete.
3306 (linux_attach_lwp_1): Rename to ...
3307 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3308 argument. Remove "initial" parameter. Return int instead of
3309 void. Don't error or warn here.
3310 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3311 failure to attach to the tgid. Call warning when failing to
3313 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3314 argument. Remove "initial" parameter. Return int instead of
3315 void. Don't error or warn here.
3316 (linux_attach_fail_reason_string): New declaration.
3317 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3318 interface change. Use linux_attach_fail_reason_string.
3320 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3321 Walfred Tedeschi <walfred.tedeschi@intel.com>
3323 * Makefile.in: Added rules to handle new files
3324 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3325 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3326 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3327 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3328 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3329 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3331 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3332 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3333 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3334 i386/x32-avx512.xml.
3335 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3336 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3337 i386/x32-avx512-linux.xml.
3338 * i387-fp.c (num_avx512_k_registers): New constant for number
3340 (num_avx512_zmmh_low_registers): New constant for number of
3341 lower ZMM registers (0-15).
3342 (num_avx512_zmmh_high_registers): New constant for number of
3343 higher ZMM registers (16-31).
3344 (num_avx512_ymmh_registers): New contant for number of higher
3345 YMM registers (ymm16-31 added by avx521 on x86_64).
3346 (num_avx512_xmm_registers): New constant for number of higher
3347 XMM registers (xmm16-31 added by AVX512 on x86_64).
3348 (struct i387_xsave): Add space for AVX512 registers.
3349 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3350 Add code to handle AVX512 registers.
3351 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3352 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3353 prototypei from generated file.
3354 (tdesc_amd64_avx512_linux): Likewise.
3355 (init_registers_x32_avx512_linux): Likewise.
3356 (tdesc_x32_avx512_linux): Likewise.
3357 (init_registers_i386_avx512_linux): Likewise.
3358 (tdesc_i386_avx512_linux): Likewise.
3359 (x86_64_regmap): Add AVX512 registers.
3360 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3362 (initialize_low_arch): Add code to initialize AVX512 registers.
3364 2014-04-23 Pedro Alves <palves@redhat.com>
3366 * mem-break.c (find_gdb_breakpoint_at): Make static.
3367 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3369 2014-04-23 Pedro Alves <palves@redhat.com>
3371 * i386-low.c: Don't include break-common.h here.
3372 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3373 prototype to take target_hw_bp_type as argument instead of a Z
3375 * i386-low.h: Include break-common.h here.
3376 (Z_packet_to_hw_type): Declare.
3377 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3379 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3380 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3381 (x86_remove_point): Convert the packet number to a
3382 target_hw_bp_type before calling i386_low_remove_watchpoint.
3383 * win32-i386-low.c (i386_insert_point): Convert the packet number
3384 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3385 (i386_remove_point): Convert the packet number to a
3386 target_hw_bp_type before calling i386_low_remove_watchpoint.
3388 2014-04-23 Pedro Alves <palves@redhat.com>
3390 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3392 2014-04-10 Pedro Alves <palves@redhat.com>
3394 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3395 Check if the condition or command is NULL before checking if the
3396 breakpoint is known. On success, return true.
3397 * mem-break.h (add_breakpoint_condition): Document return.
3398 (add_breakpoint_commands): Add describing comment.
3399 * server.c (skip_to_semicolon): New function.
3400 (process_point_options): Use it.
3402 2014-04-09 Pedro Alves <palves@redhat.com>
3404 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3407 2014-02-27 Pedro Alves <palves@redhat.com>
3410 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3412 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3414 (last_thread_of_process_p): Take a PID argument instead of a
3416 (linux_wait_for_lwp): Delete.
3417 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3419 (linux_low_filter_event): New function, party factored out from
3420 linux_wait_for_event.
3421 (linux_wait_for_event): Rename to ...
3422 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3423 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3424 sigsuspend. Check for zombie leaders.
3425 (linux_wait_for_event): Reimplement as wrapper around
3426 linux_wait_for_event_filtered.
3427 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3428 a normal or signal exit is seen, it's the whole process exiting.
3429 (wait_for_sigstop): No longer a for_each_inferior callback.
3430 Rewrite on top of linux_wait_for_event_filtered.
3431 (stop_all_lwps): Call wait_for_sigstop directly.
3432 * server.c (resume, handle_target_event): Handle
3433 TARGET_WAITKIND_NO_RESUMED.
3435 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3437 * win32-low.c (psapi_get_dll_name,
3438 * win32_CreateToolhelp32Snapshot): Delete.
3439 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3440 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3442 (handle_load_dll): Add function description.
3443 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3445 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3447 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3449 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3450 base address when calling win32_add_one_solib.
3451 (handle_load_dll): Delete local variable load_addr.
3452 Remove 0x1000 offset applied to DLL base address when calling
3453 win32_add_one_solib.
3454 (handle_unload_dll): Add comment.
3456 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3458 * win32-low.c (win32_add_all_dlls): Renames
3459 win32_ensure_ntdll_loaded. Rewrite function documentation.
3460 Adjust implementation to always load all DLLs.
3461 Add 0x1000 offset to DLL base address when calling
3462 win32_add_one_solib.
3463 (child_initialization_done): New static global.
3464 (do_initial_child_stuff): Set child_initialization_done to
3465 zero during child initialization, and 1 after. Replace call
3466 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3468 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3469 (handle_unload_dll): Add function documentation.
3470 (get_child_debug_event): Ignore load and unload DLL events
3471 during child initialization.
3473 2014-02-20 Doug Evans <dje@google.com>
3475 Remove global all_lwps.
3476 * inferiors.h (ptid_of): Move here from linux-low.h.
3477 (pid_of, lwpid_of): Ditto.
3478 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3479 parameter is a struct thread_info * now.
3480 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3481 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3482 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3484 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3485 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3486 * linux-arm-low.c (update_registers_callback): Update, "entry"
3487 parameter is a struct thread_info * now.
3488 Fetch lwpid from current_inferior directly.
3489 (arm_insert_point): Pass &all_threads to find_inferior instead of
3491 (arm_remove_point): Ditto.
3492 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3493 (arm_prepare_to_resume): Fetch pid from thread.
3494 (arm_read_description): Fetch lwpid from current_inferior directly.
3495 * linux-low.c (all_lwps): Delete.
3496 (delete_lwp): Delete call to remove_inferior.
3497 (handle_extended_wait): Fetch lwpid from thread.
3498 (add_lwp): Don't set lwp->entry.id. Remove call to
3499 add_inferior_to_list.
3500 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3501 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3502 (kill_one_lwp_callback): Ditto.
3503 (linux_kill): Don't dereference NULL pointer.
3504 Fetch ptid,lwpid from thread.
3505 (get_detach_signal): Fetch ptid from thread.
3506 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3507 Simplify call to regcache_invalidate_thread.
3508 (delete_lwp_callback): Update, "entry" parameter is a
3509 struct thread_info * now. Fetch pid from thread.
3510 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3511 (status_pending_p_callback): Update, "entry" parameter is a
3512 struct thread_info * now. Fetch ptid from thread.
3513 (find_lwp_pid): Update, "entry" parameter is a
3514 struct thread_info * now.
3515 (linux_wait_for_lwp): Fetch pid from thread.
3516 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3517 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3518 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3519 (dequeue_one_deferred_signal): Ditto.
3520 (cancel_breakpoint): Fetch ptid from current_inferior.
3521 (linux_wait_for_event): Pass &all_threads to find_inferior,
3522 not &all_lwps. Fetch ptid, lwpid from thread.
3523 (count_events_callback): Update, "entry" parameter is a
3524 struct thread_info * now.
3525 (select_singlestep_lwp_callback): Ditto.
3526 (select_event_lwp_callback): Ditto.
3527 (cancel_breakpoints_callback): Ditto.
3528 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3530 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3531 (unsuspend_one_lwp): Update, "entry" parameter is a
3532 struct thread_info * now.
3533 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3535 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3536 Fetch lwpid from thread, not lwp.
3537 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3538 Pass &all_threads to find_inferior, not &all_lwps.
3539 (send_sigstop): Fetch lwpid from thread, not lwp.
3540 (send_sigstop_callback): Update, "entry" parameter is a
3541 struct thread_info * now.
3542 (suspend_and_send_sigstop_callback): Ditto.
3543 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3544 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3545 struct thread_info * now.
3546 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3548 (lwp_running): Update, "entry" parameter is a
3549 struct thread_info * now.
3550 (stop_all_lwps): Fetch ptid from thread.
3551 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3552 (linux_resume_one_lwp): Fetch lwpid from thread.
3553 (linux_set_resume_request): Update, "entry" parameter is a
3554 struct thread_info * now. Fetch pid, lwpid from thread.
3555 (resume_status_pending_p): Update, "entry" parameter is a
3556 struct thread_info * now.
3557 (need_step_over_p): Ditto. Fetch lwpid from thread.
3558 (start_step_over): Fetch lwpid from thread.
3559 (linux_resume_one_thread): Update, "entry" parameter is a
3560 struct thread_info * now. Fetch lwpid from thread.
3561 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3562 (proceed_one_lwp): Update, "entry" parameter is a
3563 struct thread_info * now. Fetch lwpid from thread.
3564 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3565 struct thread_info * now.
3566 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3567 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3568 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3570 (regsets_store_inferior_registers): Ditto.
3571 (fetch_register, store_register): Ditto.
3572 (linux_read_memory, linux_write_memory): Ditto.
3573 (linux_request_interrupt): Ditto.
3574 (linux_read_auxv): Ditto.
3575 (linux_xfer_siginfo): Ditto.
3576 (linux_qxfer_spu): Ditto.
3577 (linux_qxfer_libraries_svr4): Ditto.
3578 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3579 moved to inferiors.h.
3581 (get_thread_lwp): Update.
3582 (struct lwp_info): Delete member "entry". Simplify comment for
3585 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3586 current_inferior directly.
3587 (update_watch_registers_callback): Update, "entry" parameter is a
3588 struct thread_info * now. Fetch pid from thread.
3589 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3590 (mips_insert_point): Fetch lwpid from current_inferior.
3591 Pass &all_threads to find_inferior, not &all_lwps.
3592 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3593 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3595 (mips_stopped_data_address): Ditto.
3596 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3598 * linux-tile-low.c (tile_arch_setup): Ditto.
3599 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3600 (update_debug_registers_callback): Update, "entry" parameter is a
3601 struct thread_info * now. Fetch pid from thread.
3602 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3603 Pass &all_threads to find_inferior, not &all_lwps.
3604 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3605 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3606 Pass &all_threads to find_inferior, not &all_lwps.
3607 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3608 (i386_dr_low_get_status): Ditto.
3609 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3610 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3611 (x86_linux_read_description): Ditto.
3612 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3614 2014-02-20 Doug Evans <dje@google.com>
3616 * inferiors.c (get_first_inferior): Fix buglet.
3618 2014-02-19 Doug Evans <dje@google.com>
3620 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3621 * inferiors.c (add_thread): Change result type to struct thread_info *.
3622 All callers updated.
3623 (add_lwp): Call add_thread here instead of in callers.
3624 All callers updated.
3625 * linux-low.h (get_lwp_thread): Rewrite.
3626 (struct lwp_info): New member "thread".
3628 2014-02-19 Doug Evans <dje@google.com>
3630 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3631 All callers updated.
3633 2014-02-19 Doug Evans <dje@google.com>
3635 * inferiors.c (add_thread): Fix whitespace.
3637 2014-02-19 Doug Evans <dje@google.com>
3639 * dll.c (clear_dlls): Replace accessing list implemention details
3641 * gdbthread.h (get_first_thread): Declare.
3642 * inferiors.c (for_each_inferior_with_data): New function.
3643 (get_first_thread): New function.
3644 (find_thread_ptid): Simplify.
3645 (get_first_inferior): New function.
3646 (clear_list): Delete.
3647 (one_inferior_p): New function.
3648 (clear_inferior_list): New function.
3649 (clear_inferiors): Update.
3650 * inferiors.h (for_each_inferior_with_data): Declare.
3651 (clear_inferior_list): Declare.
3652 (one_inferior_p): Declare.
3653 (get_first_inferior): Declare.
3654 * linux-low.c (linux_wait_for_event): Replace accessing list
3655 implemention details with API function.
3656 * server.c (target_running): Ditto.
3657 (accumulate_file_name_length): New function.
3658 (emit_dll_description): New function.
3659 (handle_qxfer_libraries): Replace accessing list implemention
3660 details with API function.
3661 (handle_qxfer_threads_worker): New function.
3662 (handle_qxfer_threads_proper): Replace accessing list implemention
3663 details with API function.
3664 (handle_query): Ditto.
3665 (visit_actioned_threads_callback_ftype): New typedef.
3666 (visit_actioned_threads_data): New struct.
3667 (visit_actioned_threads): Rewrite to be find_inferior callback.
3668 (resume): Call find_inferior.
3669 (handle_status): Replace accessing list implemention
3670 details with API function.
3671 (process_serial_event): Replace accessing list implemention details
3673 * target.c (set_desired_inferior): Replace accessing list implemention
3674 details with API function.
3675 * tracepoint.c (same_process_p): New function.
3676 (gdb_agent_about_to_close): Replace accessing list implemention
3677 details with API function.
3678 * win32-low.c (child_delete_thread): Replace accessing list
3679 implemention details with API function.
3680 (match_dll_by_basename): New function.
3681 (dll_is_loaded_by_basename): New function.
3682 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3683 details call to dll_is_loaded_by_basename.
3685 2014-02-19 Doug Evans <dje@google.com>
3687 * dll.h (struct dll_info): Add comment.
3688 * gdbthread.h (struct thread_info): Add comment.
3689 (current_ptid): Simplify.
3690 * inferiors.c (add_process): Update.
3691 (remove_process): Update.
3692 * inferiors.h (struct process_info): Rename member "head" to "entry".
3693 * linux-low.c (delete_lwp): Update.
3695 (last_thread_of_process_p): Update.
3696 (kill_one_lwp_callback, linux_kill): Update.
3697 (status_pending_p_callback): Update.
3698 (wait_for_sigstop): Update. Simplify read of ptid.
3699 (start_step_over): Update.
3700 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3701 (get_lwp_thread): Update.
3702 (struct lwp_info): Rename member "head" to "entry".
3703 * regcache.h (inferior_list_entry): Delete.
3704 * server.c (kill_inferior_callback): Update.
3705 (detach_or_kill_inferior_callback): Update.
3706 (print_started_pid): Update.
3707 (print_attached_pid): Update.
3708 (process_serial_event): Simplify read of ptid.
3709 * thread-db.c (thread_db_create_event): Update.
3710 (thread_db_get_tls_address): Update.
3711 * win32-low.c (current_inferior_ptid): Simplify.
3713 2014-02-19 Tom Tromey <tromey@redhat.com>
3715 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3717 (target_supports_btrace): Update.
3719 2014-02-14 Yao Qi <yao@codesourcery.com>
3721 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3722 (rsp-low-ipa.o): New target.
3724 2014-02-12 Tom Tromey <tromey@redhat.com>
3726 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3727 convert_ascii_to_int.
3728 * regcache.c (registers_to_string): Likewise.
3729 * remote-utils.c (decode_M_packet): Likewise.
3730 * server.c (process_serial_event): Likewise.
3732 2014-02-12 Tom Tromey <tromey@redhat.com>
3734 * server.c (handle_query, handle_v_run): Use hex2bin, not
3736 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3738 2014-02-12 Tom Tromey <tromey@redhat.com>
3740 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3741 convert_int_to_ascii.
3742 * regcache.c (registers_to_string, collect_register_as_string):
3744 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3746 * server.c (process_serial_event): Likewise.
3747 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3748 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3750 2014-02-12 Tom Tromey <tromey@redhat.com>
3752 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3753 bin2hex, not hexify.
3754 * tracepoint.c (cmd_qtstatus): Likewise.
3756 2014-02-12 Tom Tromey <tromey@redhat.com>
3758 * remote-utils.c (monitor_output): Pass explicit length to
3761 2014-02-12 Tom Tromey <tromey@redhat.com>
3763 * tracepoint.c: Include rsp-low.h.
3764 * server.c: Include rsp-low.h.
3765 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3766 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3768 * remote-utils.c: Include rsp-low.h.
3769 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3770 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3771 (convert_int_to_ascii, convert_ascii_to_int): Move to
3773 * regcache.c: Include rsp-low.h.
3774 * ax.c: Include rsp-low.h.
3775 * Makefile.in (SFILES): Add common/rsp-low.c.
3776 (OBS): Add rsp-low.o.
3777 (rsp-low.o): New target.
3779 2014-02-12 Tom Tromey <tromey@redhat.com>
3781 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3782 Include print-utils.h.
3783 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3784 (plongest, thirty_two, phex_nz): Remove.
3785 * Makefile.in (SFILES): Add common/print-utils.c.
3786 (OBS): Add print-utils.o.
3787 (print-utils-ipa.o): New target.
3788 (print-utils.o): New target.
3789 (IPA_OBJS): Add print-utils-ipa.o.
3791 2014-02-06 Tom Tromey <tromey@redhat.com>
3793 * Makefile.in (SFILES): Fix indentation.
3795 2014-02-05 Doug Evans <dje@google.com>
3797 * linux-low.c (linux_wait_for_event): Improve comment.
3798 (linux_wait_1): Keep current_inferior in sync with event_child.
3800 2014-01-22 Doug Evans <dje@google.com>
3802 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3804 2014-01-22 Doug Evans <dje@google.com>
3806 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3807 * configure: Regenerate.
3808 * config.in: Regenerate.
3809 * Makefile.in (SFILES): Add debug.c.
3811 * debug.c: New file.
3812 * debug.h: New file.
3813 * linux-aarch64-low.c (*): Update all debugging printfs to use
3814 debug_printf instead of fprintf.
3815 * linux-arm-low.c (*): Ditto.
3816 * linux-cris-low.c (*): Ditto.
3817 * linux-crisv32-low.c (*): Ditto.
3818 * linux-m32r-low.c (*): Ditto.
3819 * linux-sparc-low.c (*): Ditto.
3820 * linux-x86.c (*): Ditto.
3821 * linux-low.c (*): Ditto.
3822 (linux_wait_1): Add calls to debug_enter, debug_exit.
3823 (linux_wait): Remove redundant debugging printf.
3824 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3825 (linux_resume, unstop_all_lwps): Ditto.
3826 * mem-break.c (*): Update all debugging printfs to use
3827 debug_printf instead of fprintf.
3828 * remote-utils.c (*): Ditto.
3829 * thread-db.c (*): Ditto.
3830 * server.c #include <ctype.h>, "gdb_vecs.h".
3831 (debug_threads): Moved to debug.c.
3832 (*): Update all debugging printfs to use debug_printf instead of
3834 (start_inferior): Replace call to fflush with call to debug_flush.
3835 (monitor_show_help): Mention set debug-format.
3836 (parse_debug_format_options): New function.
3837 (handle_monitor_command): Handle "monitor set debug-format".
3838 (gdbserver_usage): Mention --debug-format.
3839 (main): Parse --debug-format.
3840 * server.h (debug_threads): Declaration moved to debug.h.
3842 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3843 trace_debug_1 that uses debug_printf.
3844 (tracepoint_look_up_symbols): Update all debugging printfs to use
3845 debug_printf instead of fprintf.
3847 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3849 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3852 2014-01-17 Pedro Alves <palves@redhat.com>
3855 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3856 defined after including gdb_proc_service.h.
3858 2014-01-16 Doug Evans <dje@google.com>
3860 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3861 (match_dll): Use it.
3863 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3865 * target.h (target_ops) <read_btrace>: Change parameters and
3866 return type to allow error reporting.
3867 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3868 trace reading errors on.
3869 * linux-low.c (linux_low_read_btrace): Pass trace reading
3871 (linux_low_disable_btrace): New.
3873 2014-01-15 Doug Evans <dje@google.com>
3875 * inferiors.c (thread_id_to_gdb_id): Delete.
3876 * inferiors.h (thread_id_to_gdb_id): Delete.
3878 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3880 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3881 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3884 2014-01-08 Pedro Alves <palves@redhat.com>
3886 * server.c (handle_status): Don't discard previous queued stop
3887 replies or thread's pending status here.
3888 (main) <disconnection>: Do it here instead.
3890 2014-01-08 Pedro Alves <palves@redhat.com>
3892 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3893 * server.c (visit_actioned_threads, handle_pending_status): New
3895 (handle_v_cont): Factor out parts to ...
3896 (resume): ... this new function. If in all-stop, and a thread
3897 being resumed has a pending status, report it without actually
3899 (myresume): Adjust to use the new 'resume' function.
3900 (clear_pending_status_callback, set_pending_status_callback)
3901 (find_status_pending_thread_callback): New functions.
3902 (handle_status): Handle the case of multiple threads having
3903 interesting statuses to report. Report threads' real last signal
3904 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3905 with an interesting thread to report the status for, instead of
3906 always reporting the status of the first thread.
3908 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3910 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3911 * gdbreplay.c (gdbreplay_version): Likewise.
3913 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3915 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3916 iov.iov_len with the real length in use.
3918 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3920 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3921 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3922 for all targets that use win32-low.c.
3923 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3924 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3926 2013-12-13 Pedro Alves <palves@redhat.com>
3928 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3929 if equal to TARGET_WAITKIND_LOADED.
3930 * win32-low.c (cached_status): New static global.
3931 (win32_wait): Add declaration.
3932 (do_initial_child_stuff): Flush all initial pending debug events
3933 up to the initial breakpoint.
3934 (win32_wait): If CACHED_STATUS was set, return that instead
3935 of doing a real wait. Remove the code resuming the execution
3936 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3937 during the initial phase. Also remove the code changing
3938 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3939 TARGET_WAITKIND_STOPPED.
3941 2013-12-11 Yao Qi <yao@codesourcery.com>
3943 * notif.c (handle_notif_ack): Return 0 if no notification
3946 2013-11-20 Doug Evans <dje@google.com>
3948 * linux-low.c (linux_set_resume_request): Fix comment.
3950 2013-11-20 Doug Evans <dje@google.com>
3952 * linux-low.c (resume_status_pending_p): Tweak comment.
3954 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3956 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3957 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3958 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3959 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3960 (srv_amd64_regobj): Add amd64-mpx.o.
3961 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3962 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3963 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3964 * i387-fp.c (num_pl_bnd_register) Added constant.
3965 (num_pl_bnd_cfg_registers) Added constant.
3966 (struct i387_xsave) Added reserved area and MPX fields.
3967 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3968 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3970 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3971 (init_registers_amd64_mpx_linux): Declare new function.
3972 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3973 (x86_64_regmap): Add MPX registers.
3974 (x86_linux_read_description): Add MPX case.
3975 (initialize_low_arch): Initialize MPX targets.
3977 2013-11-18 Tom Tromey <tromey@redhat.com>
3979 * configure: Rebuild.
3980 * configure.ac: Don't check for stdlib.h.
3981 * gdbreplay.c: Unconditionally include stdlib.h.
3983 2013-11-18 Tom Tromey <tromey@redhat.com>
3985 * config.in: Rebuild.
3986 * configure: Rebuild.
3987 * configure.ac: Don't use AC_HEADER_DIRENT.
3989 2013-11-18 Tom Tromey <tromey@redhat.com>
3991 * server.h: Don't check HAVE_STRING_H.
3992 * gdbreplay.c: Don't check HAVE_STRING_H.
3993 * configure: Rebuild.
3995 2013-11-18 Tom Tromey <tromey@redhat.com>
3997 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
4000 2013-11-08 Tom Tromey <tromey@redhat.com>
4002 * configure, config.in: Rebuild.
4003 * configure.ac: Remove unused configury.
4005 2013-11-08 Tom Tromey <tromey@redhat.com>
4007 * acinclude.m4: Include common.m4, codeset.m4.
4008 * configure, config.in: Rebuild.
4009 * configure.ac: Use GDB_AC_COMMON.
4011 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
4013 * linux-s390-low.c (HWCAP_S390_TE): New define.
4014 (s390_arch_setup): Consider the TE field in the HWCAP for
4015 determining 'have_regset_tdb'.
4017 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
4020 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
4023 2013-10-02 Pedro Alves <palves@redhat.com>
4025 * server.c (process_serial_event): Don't output "GDBserver
4026 exiting" if GDB is connected through stdio.
4027 * target.c (mywait): Likewise, be silent if GDB is connected
4030 2013-10-01 Joel Brobecker <brobecker@adacore.com>
4032 * lynx-low.c (lynx_add_threads_after_attach): New function.
4033 (lynx_attach): Remove call to add_thread. Add call to
4034 lynx_add_threads_after_attach instead.
4036 2013-09-28 Mike Frysinger <vapier@gentoo.org>
4038 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
4039 * config.in, configure: Regenerated.
4041 2013-09-18 Yao Qi <yao@codesourcery.com>
4044 * server.c (start_inferior): Clear 'resume_info'.
4046 2013-09-16 Jiong Wang <jiwang@tilera.com>
4048 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
4051 2013-09-16 Jiong Wang <jiwang@tilera.com>
4053 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
4054 linux-tile-low.o to srv_tgtobj.
4056 2013-09-16 Will Newton <will.newton@linaro.org>
4058 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
4061 2013-09-06 Pedro Alves <palves@redhat.com>
4063 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
4064 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
4065 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
4066 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
4067 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
4068 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
4070 2013-09-06 Pedro Alves <palves@redhat.com>
4072 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
4073 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
4075 2013-09-06 Pedro Alves <palves@redhat.com>
4077 * linux-amd64-ipa.c: Include tracepoint.h.
4078 * linux-i386-ipa.c: Include tracepoint.h.
4080 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4082 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
4083 (ps_get_thread_area): New function.
4085 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
4087 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
4088 (initialize_low_arch): Call init_registers_crisv32 rather than
4089 init_register_crisv32.
4091 2013-09-05 Pedro Alves <palves@redhat.com>
4093 * server.h (handle_vFile, hostio_last_error_from_errno): Move
4095 * hostio.h: ... this new file.
4096 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
4097 win32-low.c: Include hostio.h.
4099 2013-09-05 Pedro Alves <palves@redhat.com>
4101 * server.h (gdb_client_data, handler_func, callback_handler_func)
4102 (delete_file_handler, add_file_handler, append_callback_event)
4103 (delete_callback_event, start_event_loop, initialize_event_loop):
4104 Move to event-loop.h and include it.
4105 * event-loop.h: New file.
4107 2013-09-05 Pedro Alves <palves@redhat.com>
4109 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
4110 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
4111 (loaded_dll, unloaded_dll): Move to ...
4112 * dll.h: ... this new file.
4113 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
4115 2013-09-05 Pedro Alves <palves@redhat.com>
4117 * server.h (current_process, get_thread_process, all_processes)
4118 (add_inferior_to_list, for_each_inferior, current_inferior)
4119 (remove_inferior, add_process, remove_process, find_process_pid)
4120 (have_started_inferiors_p, have_attached_inferiors_p)
4121 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
4122 (clear_inferiors, find_inferior, find_inferior_id)
4123 (inferior_target_data, set_inferior_target_data)
4124 (inferior_regcache_data, set_inferior_regcache_data): Move to
4125 inferiors.h, and include it.
4126 * inferiors.h: New file.
4128 2013-09-05 Pedro Alves <palves@redhat.com>
4130 * server.h (struct emit_ops, current_insn_ptr, emit_error):
4134 2013-09-05 Pedro Alves <palves@redhat.com>
4136 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
4138 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
4139 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
4140 (handle_tracepoint_general_set, handle_tracepoint_query)
4141 (tracepoint_finished_step, tracepoint_was_hit)
4142 (release_while_stepping_state_list, current_traceframe)
4143 (in_readonly_region, traceframe_read_mem)
4144 (fetch_traceframe_registers, traceframe_read_sdata)
4145 (traceframe_read_info, struct fast_tpoint_collect_status)
4146 (fast_tracepoint_collecting, force_unlock_trace_buffer)
4147 (handle_tracepoit_bkpts, initialize_low_tracepoint)
4148 (supply_fast_tracepoint_registers)
4149 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
4150 (ipa_tdesc, claim_trampoline_space)
4151 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
4152 (agent_mem_read, agent_get_trace_state_variable_value)
4153 (agent_set_trace_state_variable_value, agent_tsv_read)
4154 (agent_mem_read_string, get_raw_reg_func_addr)
4155 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
4156 * tracepoint.h: ... this new file.
4158 2013-09-05 Pedro Alves <palves@redhat.com>
4160 * server.h (perror_with_name, error, fatal, warning, paddress)
4161 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4163 * utils.h: New file.
4165 2013-09-05 Pedro Alves <palves@redhat.com>
4167 * server.h (remote_debug, noack_mode, transport_is_reliable)
4168 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4169 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4170 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4171 (write_enn, initialize_async_io, enable_async_io)
4172 (disable_async_io, check_remote_input_interrupt_request)
4173 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4174 (dead_thread_notify, prepare_resume_reply)
4175 (decode_address_to_semicolon, decode_address, decode_m_packet)
4176 (decode_M_packet, decode_X_packet, decode_xfer_write)
4177 (decode_search_memory_packet, unhexify, hexify)
4178 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4179 (look_up_one_symbol, relocate_instruction)
4180 (monitor_output): Move to remote-utils.h, and include it.
4181 * remote-utils.h: New file.
4183 2013-09-05 Pedro Alves <palves@redhat.com>
4185 * server.h (_): Delete.
4187 2013-09-02 Pedro Alves <palves@redhat.com>
4189 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4190 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4192 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4194 2013-09-02 Pierre Muller <muller@sourceware.org>
4196 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4197 or WriteProcessMemory complete successfully and handle
4198 ERROR_PARTIAL_COPY error.
4200 2013-09-02 Pedro Alves <palves@redhat.com>
4202 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4203 error instead of EIO.
4205 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4208 * linux-low.c: Include filestuff.h.
4209 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4210 * lynx-low.c: Include filestuff.h.
4211 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4212 * server.c: Include filestuff.h.
4213 (main): Call notice_open_fds.
4214 * spu-low.c: Include filestuff.h.
4215 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4217 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4219 * Makefile.in: Explain why ../target and ../nat are not
4220 listed as include file search paths.
4221 (linux-waitpid.o): New object file rule.
4222 * configure.srv (srv_native_linux_obj): New variable.
4223 Replace all occurrences of linux native object files with
4224 $srv_native_linux_obj.
4225 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4226 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4227 (linux_enable_event_reporting): Remove declaration.
4228 (my_waitpid): Moved to common/linux-waitpid.c.
4229 (linux_wait_for_event): Pass ptid when calling
4230 linux_enable_event_reporting.
4231 (linux_supports_tracefork_flag): Remove.
4232 (linux_enable_event_reporting): Likewise.
4233 (linux_tracefork_grandchild): Remove.
4234 (STACK_SIZE): Moved to common/linux-ptrace.c.
4235 (linux_tracefork_child): Remove.
4236 (linux_test_for_tracefork): Remove.
4237 (linux_look_up_symbols): Call linux_supports_traceclone.
4238 (initialize_low): Remove call to linux_test_for_tracefork.
4239 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4240 common/linux-ptrace.h.
4241 (PTRACE_TYPE_ARG4): Likewise.
4242 Include linux-ptrace.h.
4244 2013-08-21 Pedro Alves <palves@redhat.com>
4246 * config.in: Renegerate.
4248 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4250 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4251 (SFILES): Remove $(srcdir)/common/target-common.c and
4252 add $(srcdir)/target/waitstatus.c.
4253 (OBS): Remove target-common.o and add waitstatus.o.
4254 (server_h): Remove $(srcdir)/../common/target-common.h and
4255 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4256 and $(srcdir)/../target/waitstatus.h.
4257 (target-common.o): Remove.
4258 (waitstatus.o): New target object file.
4259 * target.h: Do not include target-common.h and
4260 include target/resume.h, target/wait.h and
4261 target/waitstatus.h.
4263 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4265 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4266 to PTRACE_TYPE_ARG3.
4267 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4268 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4270 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4271 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4273 2013-07-27 Jie Zhang <jie@codesourcery.com>
4274 Daniel Jacobowitz <dan@codesourcery.com>
4275 Yao Qi <yao@codesourcery.com>
4277 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4278 (mips-linux-watch.o): New rule.
4279 (mips_linux_watch_h): New variable.
4280 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4282 * linux-mips-low.c: Include mips-linux-watch.h.
4283 (struct arch_process_info, struct arch_lwp_info): New.
4284 (update_watch_registers_callback): New function.
4285 (mips_linux_new_process, mips_linux_new_thread) New functions.
4286 (mips_linux_prepare_to_resume, mips_insert_point): New
4288 (mips_remove_point, mips_stopped_by_watchpoint): New
4290 (rsp_bp_type_to_target_hw_bp_type): New function.
4291 (mips_stopped_data_address): New function.
4292 (the_low_target): Add watchpoint support functions.
4294 2013-07-27 Yao Qi <yao@codesourcery.com>
4296 * i386-low.c: Include break-common.h.
4297 (enum target_hw_bp_type): Remove.
4299 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4301 * Makefile.in (SFILES): /common/target-common.c.
4302 (OBS): Add target-common.o.
4303 (server_h): Add $(srcdir)/../common/target-common.h.
4304 (target-common.o): New target.
4305 * server.c (queue_stop_reply_callback): Free
4306 status string after use.
4307 * target.c (target_waitstatus_to_string): Remove.
4308 * target.h: Include target-common.h.
4309 (resume_kind): Likewise.
4310 (target_waitkind): Likewise.
4311 (target_waitstatus): Likewise.
4312 (TARGET_WNOHANG): Likewise.
4314 2013-07-04 Yao Qi <yao@codesourcery.com>
4316 * Makefile.in (host_alias): Use @host_noncanonical@.
4317 (target_alias): Use @target_noncanonical@.
4318 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4319 ACX_NONCANONICAL_HOST.
4320 * configure: Regenerated.
4323 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4325 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4326 * configure: Rebuild.
4327 * Makefile.in (version_host, version_target): Get from configure.
4328 (version.c): Use $(version_host) and $(version_target).
4330 2013-07-03 Pedro Alves <palves@redhat.com>
4332 * Makefile.in (config.status): Depend on development.sh.
4333 * acinclude.m4: Include libmcheck.m4.
4334 * configure: Regenerate.
4336 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4338 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4339 attribute inside the parentheses.
4340 (winapi_DebugSetProcessKillOnExit): Ditto.
4341 (winapi_DebugBreakProcess): Ditto.
4342 (winapi_GenerateConsoleCtrlEvent): Ditto.
4344 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4346 * notif.h (notif_event): Add a dummy member to avoid compiler
4349 2013-07-01 Pedro Alves <palves@redhat.com>
4351 * hostio.c (HOSTIO_PATH_MAX): Define.
4352 (require_filename, handle_open, handle_unlink, handle_readlink):
4355 2013-07-01 Pedro Alves <palves@redhat.com>
4357 * server.h: Include "pathmax.h".
4358 * linux-low.c: Don't include sys/param.h.
4359 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4361 * win32-low.c: Don't include sys/param.h.
4362 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4364 2013-07-01 Pedro Alves <palves@redhat.com>
4366 * event-loop.c: Don't check HAVE_UNISTD_H before including
4368 * gdbreplay.c: Likewise.
4369 * remote-utils.c: Likewise.
4370 * server.c: Likewise.
4371 * configure.ac: Don't check for unistd.h.
4372 * configure: Regenerate.
4374 2013-06-28 Tom Tromey <tromey@redhat.com>
4376 * Makefile.in (version.c): Use version.in, not
4379 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4381 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4382 * configure: Rebuild.
4383 * Makefile.in (version_host, version_target): Get from configure.
4384 (version.c): Use $(version_host) and $(version_target).
4386 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4388 Fix trace-status to output user name without trailing colon.
4389 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4391 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4393 Fix trace-status to output proper start-time and stop-time.
4394 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4395 output start time and stop time in hex as gdb expects.
4397 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4399 * tracepoint.c (build_traceframe_info_xml): Output trace state
4400 variables present in the trace buffer.
4402 2013-06-24 Tom Tromey <tromey@redhat.com>
4404 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4406 (version.o): Remove.
4407 * gdbreplay.c: Include version.h.
4408 (version, host_name): Don't declare.
4409 * server.h: Include version.h.
4410 (version, host_name): Don't declare.
4412 2013-06-12 Pedro Alves <palves@redhat.com>
4414 * linux-x86-low.c (linux_is_elf64): Delete global.
4415 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4416 with local linux_pid_exe_is_elf_64_file use.
4418 2013-06-11 Pedro Alves <palves@redhat.com>
4420 * linux-low.c (regset_disabled, disable_regset): New functions.
4421 (regsets_fetch_inferior_registers)
4422 (regsets_store_inferior_registers): Use them.
4423 (initialize_regsets_info); Don't allocate the disabled_regsets
4425 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4428 2013-06-11 Pedro Alves <palves@redhat.com>
4430 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4433 2013-06-11 Pedro Alves <palves@redhat.com>
4435 * linux-x86-low.c (initialize_low_arch): Call
4436 init_registers_x32_avx_linux.
4438 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4440 Fix compatibility with Android Bionic.
4441 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4444 2013-06-07 Pedro Alves <palves@redhat.com>
4447 * Makefile.in (OBS): Add tdesc.o.
4448 (IPA_OBJS): Add tdesc-ipa.o.
4449 (tdesc-ipa.o): New rule.
4450 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4452 * linux-low.c (new_inferior): Delete.
4453 (disabled_regsets, num_regsets): Delete.
4454 (linux_add_process): Adjust to set the new per-process
4456 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4457 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4458 was a stop. When calling arch_setup, switch the current inferior
4459 to the thread that got an event.
4460 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4461 (regsets_fetch_inferior_registers)
4462 (regsets_store_inferior_registers): New regsets_info parameter.
4464 (linux_register_in_regsets): New regs_info parameter. Adjust to
4466 (register_addr, fetch_register, store_register): New usrregs_info
4467 parameter. Adjust to use it.
4468 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4469 parameter regs_info. Adjust to use it.
4470 (linux_fetch_registers): Get the current inferior's regs_info, and
4472 (linux_store_registers): Ditto.
4473 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4474 (initialize_low): Don't initialize the target_regsets here. Call
4475 initialize_low_arch.
4476 * linux-low.h (target_regsets): Delete declaration.
4477 (struct regsets_info): New.
4478 (struct usrregs_info): New.
4479 (struct regs_info): New.
4480 (struct process_info_private) <new_inferior>: New field.
4481 (struct linux_target_ops): Delete the num_regs, regmap, and
4482 regset_bitmap fields. New field regs_info.
4483 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4484 * i387-fp.c (num_xmm_registers): Delete.
4485 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4486 calls to new interface.
4487 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4488 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4489 Infer the number of xmm registers from the regcache's target
4491 * i387-fp.h (num_xmm_registers): Delete.
4492 * inferiors.c (add_thread): Don't install the thread's regcache
4494 * proc-service.c (gregset_info): Fetch the current inferior's
4495 regs_info. Adjust to use it.
4496 * regcache.c: Include tdesc.h.
4497 (register_bytes, reg_defs, num_registers)
4498 (gdbserver_expedite_regs): Delete.
4499 (get_thread_regcache): If the thread doesn't have a regcache yet,
4500 create one, instead of aborting gdbserver.
4501 (regcache_invalidate_one): Rename to ...
4502 (regcache_invalidate_thread): ... this.
4503 (regcache_invalidate_one): New.
4504 (regcache_invalidate): Only invalidate registers of the current
4506 (init_register_cache): Add target_desc parameter, and use it.
4507 (new_register_cache): Ditto. Assert the target description has a
4508 non zero registers_size.
4509 (regcache_cpy): Add assertions. Adjust.
4510 (realloc_register_cache, set_register_cache): Delete.
4511 (registers_to_string, registers_from_string): Adjust.
4512 (find_register_by_name, find_regno, find_register_by_number)
4513 (register_cache_size): Add target_desc parameter, and use it.
4514 (free_register_cache_thread, free_register_cache_thread_one)
4515 (regcache_release, register_cache_size): New.
4516 (register_size): Add target_desc parameter, and use it.
4517 (register_data, supply_register, supply_register_zeroed)
4518 (supply_regblock, supply_register_by_name, collect_register)
4519 (collect_register_as_string, collect_register_by_name): Adjust.
4520 * regcache.h (struct target_desc): Forward declare.
4521 (struct regcache) <tdesc>: New field.
4522 (init_register_cache, new_register_cache): Add target_desc
4524 (regcache_invalidate_thread): Declare.
4525 (regcache_invalidate_one): Delete declaration.
4526 (regcache_release): Declare.
4527 (find_register_by_number, register_cache_size, register_size)
4528 (find_regno): Add target_desc parameter.
4529 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4531 * remote-utils.c: Include tdesc.h.
4532 (outreg, prepare_resume_reply): Adjust.
4533 * server.c: Include tdesc.h.
4534 (gdbserver_xmltarget): Delete declaration.
4535 (get_features_xml, process_serial_event): Adjust.
4536 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4538 (struct process_info) <tdesc>: New field.
4539 (ipa_tdesc): Declare.
4540 * tdesc.c: New file.
4541 * tdesc.h: New file.
4542 * tracepoint.c: Include tdesc.h.
4543 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4544 (get_context_regcache): Adjust to pass ipa_tdesc down.
4545 (do_action_at_tracepoint): Adjust to get the register cache size
4546 from the context regcache's description.
4547 (traceframe_walk_blocks): Adjust to get the register cache size
4548 from the current trace frame's description.
4549 (traceframe_get_pc): Adjust to get current trace frame's
4550 description and pass it down.
4551 (gdb_collect): Adjust to get the register cache size from the
4553 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4554 (gdbserver_xmltarget): Delete.
4555 (initialize_low_tracepoint): Set the ipa's target description.
4556 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4557 (initialize_low_tracepoint): Set the ipa's target description.
4558 * linux-x86-low.c: Include tdesc.h.
4559 [__x86_64__] (is_64bit_tdesc): New.
4560 (ps_get_thread_area, x86_get_thread_area): Use it.
4561 (i386_cannot_store_register): Rename to ...
4562 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4563 (i386_cannot_fetch_register): Rename to ...
4564 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4565 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4567 (target_regsets): Rename to ...
4568 (x86_regsets): ... this.
4569 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4571 (x86_siginfo_fixup): Use is_64bit_tdesc.
4572 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4573 (tdesc_x32_avx_linux, tdesc_x32_linux)
4574 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4576 (x86_linux_update_xmltarget): Delete.
4577 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4578 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4579 (AMD64_LINUX_USER64_CS): New.
4580 (x86_linux_read_description): New, based on
4581 x86_linux_update_xmltarget.
4582 (same_process_callback): New.
4583 (x86_arch_setup_process_callback): New.
4584 (x86_linux_update_xmltarget): New.
4585 (x86_regsets_info): New.
4586 (amd64_linux_regs_info): New.
4587 (i386_linux_usrregs_info): New.
4588 (i386_linux_regs_info): New.
4589 (x86_linux_regs_info): New.
4590 (x86_arch_setup): Reimplement.
4591 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4592 (x86_emit_ops): Ditto.
4593 (the_low_target): Adjust. Install x86_linux_regs_info,
4594 x86_cannot_fetch_register, and x86_cannot_store_register.
4595 (initialize_low_arch): New.
4596 * linux-ia64-low.c (tdesc_ia64): Declare.
4597 (ia64_fetch_register): Adjust.
4598 (ia64_usrregs_info, regs_info): New globals.
4599 (ia64_regs_info): New function.
4600 (the_low_target): Adjust.
4601 (initialize_low_arch): New function.
4602 * linux-sparc-low.c (tdesc_sparc64): Declare.
4603 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4605 (sparc_arch_setup): New function.
4606 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4607 (the_low_target): Adjust.
4608 (initialize_low_arch): New function.
4609 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4610 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4611 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4612 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4613 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4614 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4615 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4616 (tdesc_powerpc_isa205_vsx64l): Declare.
4617 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4618 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4619 (ppc_set_pc, ppc_get_hwcap): Adjust.
4620 (ppc_usrregs_info): Forward declare.
4621 (!__powerpc64__) ppc_regmap_adjusted: New global.
4622 (ppc_arch_setup): Adjust to the current process'es target
4624 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4625 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4626 (ppc_store_evrregset): Adjust.
4627 (target_regsets): Rename to ...
4628 (ppc_regsets): ... this, and make static.
4629 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4630 (ppc_regs_info): New function.
4631 (the_low_target): Adjust.
4632 (initialize_low_arch): New function.
4633 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4634 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4635 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4636 (tdesc_s390x_linux64v2): Declare.
4637 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4638 (s390_fill_gregset, s390_store_last_break): Adjust.
4639 (target_regsets): Rename to ...
4640 (s390_regsets): ... this, and make static.
4641 (s390_get_pc, s390_set_pc): Adjust.
4642 (s390_get_hwcap): New target_desc parameter, and use it.
4643 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4644 (s390_arch_setup): Adjust to set the current process'es target
4645 description. Don't adjust the regmap.
4646 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4647 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4648 (regs_info_3264): New globals.
4649 (s390_regs_info): New function.
4650 (the_low_target): Adjust.
4651 (initialize_low_arch): New function.
4652 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4653 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4654 [__mips64] (init_registers_mips_linux)
4655 (init_registers_mips_dsp_linux): Delete defines.
4656 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4657 (have_dsp): New global.
4658 (mips_read_description): New, based on mips_arch_setup.
4659 (mips_arch_setup): Reimplement.
4660 (get_usrregs_info): New function.
4661 (mips_cannot_fetch_register, mips_cannot_store_register)
4662 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4663 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4664 (target_regsets): Rename to ...
4665 (mips_regsets): ... this, and make static.
4666 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4667 (dsp_regs_info, regs_info): New globals.
4668 (mips_regs_info): New function.
4669 (the_low_target): Adjust.
4670 (initialize_low_arch): New function.
4671 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4672 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4674 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4675 (arm_read_description): New, with bits factored from
4677 (arm_arch_setup): Reimplement.
4678 (target_regsets): Rename to ...
4679 (arm_regsets): ... this, and make static.
4680 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4681 (arm_regs_info): New function.
4682 (the_low_target): Adjust.
4683 (initialize_low_arch): New function.
4684 * linux-m68k-low.c (tdesc_m68k): Declare.
4685 (target_regsets): Rename to ...
4686 (m68k_regsets): ... this, and make static.
4687 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4688 (m68k_regs_info): New function.
4689 (m68k_arch_setup): New function.
4690 (the_low_target): Adjust.
4691 (initialize_low_arch): New function.
4692 * linux-sh-low.c (tdesc_sharch): Declare.
4693 (target_regsets): Rename to ...
4694 (sh_regsets): ... this, and make static.
4695 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4696 (sh_regs_info, sh_arch_setup): New functions.
4697 (the_low_target): Adjust.
4698 (initialize_low_arch): New function.
4699 * linux-bfin-low.c (tdesc_bfin): Declare.
4700 (bfin_arch_setup): New function.
4701 (bfin_usrregs_info, regs_info): New globals.
4702 (bfin_regs_info): New function.
4703 (the_low_target): Adjust.
4704 (initialize_low_arch): New function.
4705 * linux-cris-low.c (tdesc_cris): Declare.
4706 (cris_arch_setup): New function.
4707 (cris_usrregs_info, regs_info): New globals.
4708 (cris_regs_info): New function.
4709 (the_low_target): Adjust.
4710 (initialize_low_arch): New function.
4711 * linux-cris-low.c (tdesc_crisv32): Declare.
4712 (cris_arch_setup): New function.
4713 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4714 (cris_regs_info): New function.
4715 (the_low_target): Adjust.
4716 (initialize_low_arch): New function.
4717 * linux-m32r-low.c (tdesc_m32r): Declare.
4718 (m32r_arch_setup): New function.
4719 (m32r_usrregs_info, regs_info): New globals.
4720 (m32r_regs_info): Adjust.
4721 (initialize_low_arch): New function.
4722 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4723 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4724 (tic6x_usrregs_info): Forward declare.
4725 (tic6x_read_description): New function, based on ...
4726 (tic6x_arch_setup): ... this. Reimplement.
4727 (target_regsets): Rename to ...
4728 (tic6x_regsets): ... this, and make static.
4729 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4730 (tic6x_regs_info): New function.
4731 (the_low_target): Adjust.
4732 (initialize_low_arch): New function.
4733 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4734 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4735 (target_regsets): Rename to ...
4736 (xtensa_regsets): ... this, and make static.
4737 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4739 (xtensa_arch_setup, xtensa_regs_info): New functions.
4740 (the_low_target): Adjust.
4741 (initialize_low_arch): New function.
4742 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4743 (nios2_arch_setup): Set the current process'es tdesc.
4744 (target_regsets): Rename to ...
4745 (nios2_regsets): ... this.
4746 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4747 (nios2_regs_info): New function.
4748 (the_low_target): Adjust.
4749 (initialize_low_arch): New function.
4750 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4751 (aarch64_arch_setup): Set the current process'es tdesc.
4752 (target_regsets): Rename to ...
4753 (aarch64_regsets): ... this.
4754 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4755 (aarch64_regs_info): New function.
4756 (the_low_target): Adjust.
4757 (initialize_low_arch): New function.
4758 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4760 (target_regsets): Rename to ...
4761 (tile_regsets): ... this.
4762 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4763 (tile_regs_info): New function.
4764 (tile_arch_setup): Set the current process'es tdesc.
4765 (the_low_target): Adjust.
4766 (initialize_low_arch): New function.
4767 * spu-low.c (tdesc_spu): Declare.
4768 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4769 * win32-arm-low.c (tdesc_arm): Declare.
4770 (arm_arch_setup): New function.
4771 (the_low_target): Install arm_arch_setup instead of
4773 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4774 (init_windows_x86): Rename to ...
4775 (i386_arch_setup): ... this. Set `win32_tdesc'.
4776 (the_low_target): Adjust.
4777 * win32-low.c (win32_tdesc): New global.
4778 (child_add_thread): Don't create the thread cache here.
4779 (do_initial_child_stuff): Set the new process'es tdesc.
4780 * win32-low.h (struct target_desc): Forward declare.
4781 (win32_tdesc): Declare.
4782 * lynx-i386-low.c (tdesc_i386): Declare global.
4783 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4784 * lynx-low.c (lynx_tdesc): New global.
4785 (lynx_add_process): Set the new process'es tdesc.
4786 * lynx-low.h (struct target_desc): Forward declare.
4787 (lynx_tdesc): Declare global.
4788 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4789 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4790 * nto-low.c (nto_tdesc): New global.
4791 (do_attach): Set the new process'es tdesc.
4792 * nto-low.h (struct target_desc): Forward declare.
4793 (nto_tdesc): Declare.
4794 * nto-x86-low.c (tdesc_i386): Declare.
4795 (nto_x86_arch_setup): Set `nto_tdesc'.
4797 2013-06-04 Gary Benson <gbenson@redhat.com>
4799 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4800 to qSupported response when appropriate.
4801 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4802 with nonzero-length annex.
4803 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4804 arguments supplied in annex.
4806 2013-05-31 Doug Evans <dje@google.com>
4809 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4810 64 bits in 64-cross-32 environment.
4812 2013-05-28 Pedro Alves <palves@redhat.com>
4814 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4815 (aarch64-without-fpu.c): Delete rule.
4816 * configure.srv (aarch64*-*-linux*): Remove references to
4817 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4818 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4821 2013-05-24 Pedro Alves <palves@redhat.com>
4823 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4824 instead of strchr/decode_address. Error if the range isn't split
4825 with a ','. Don't assume there's be a ':' in the action.
4827 2013-05-23 Yao Qi <yao@codesourcery.com>
4828 Pedro Alves <palves@redhat.com>
4830 * linux-low.c (lwp_in_step_range): New function.
4831 (linux_wait_1): If the thread was range stepping and stopped
4832 outside the stepping range, report the stop to GDB. Otherwise,
4833 continue stepping. Add range stepping debug output.
4834 (linux_set_resume_request): Copy the step range from the resume
4836 (linux_supports_range_stepping): New.
4837 (linux_target_ops) <supports_range_stepping>: Set to
4838 linux_supports_range_stepping.
4839 * linux-low.h (struct linux_target_ops)
4840 <supports_range_stepping>: New field.
4841 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4842 * linux-x86-low.c (x86_supports_range_stepping): New.
4843 (the_low_target) <supports_range_stepping>: Set to
4844 x86_supports_range_stepping.
4845 * server.c (handle_v_cont): Handle 'r' action.
4846 (handle_v_requests): Append ";r" if the target supports range
4848 * target.h (struct thread_resume) <step_range_start,
4849 step_range_end>: New fields.
4850 (struct target_ops) <supports_range_stepping>:
4852 (target_supports_range_stepping): New macro.
4854 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4856 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4857 confusion in comment.
4859 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4861 * lynx-low.c (struct process_info_private): New type.
4862 (lynx_add_process): New function.
4863 (lynx_create_inferior, lynx_attach): Replace calls to
4864 add_process by calls to lynx_add_process.
4865 (lynx_resume): If PTID is null, then try using
4866 current_process()->private->last_wait_event_ptid.
4868 (lynx_clear_inferiors): Delete. The contents of that function
4869 has been inlined in lynx_mourn;
4870 (lynx_wait_1): Save the ptid in the process's private data.
4871 (lynx_mourn): Free the process' private data. Replace call
4872 to lynx_clear_inferiors by call to clear_inferiors.
4874 2013-05-17 Yao Qi <yao@codesourcery.com>
4876 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4879 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4881 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4882 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4883 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4884 PT_TEXT_END_ADDR guards. Update comments.
4885 (linux_target_op) <read_offsets>: Conditionally define to
4886 linux_read_offsets if the target is UCLIBC and if it defines
4887 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4889 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4890 Andrew Jenner <andrew@codesourcery.com>
4892 * Makefile.in (SFILES): Add linux-nios2-low.c.
4893 (clean): Add action to delete nios2-linux.c.
4894 (nios2-linux.c): New rule.
4895 * configure.srv: Add nios2*-*-linux*.
4896 * linux-nios2-low.c: New.
4898 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4900 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4902 2013-04-25 Hui Zhu <hui@codesourcery.com>
4905 * ax.c (ax_printf): Add fflush.
4907 2013-04-22 Tom Tromey <tromey@redhat.com>
4909 * Makefile.in (SFILES): Add filestuff.c.
4910 (OBS): Add filestuff.o.
4911 (filestuff.o): New target.
4912 * config.in, configure: Rebuild.
4913 * configure.ac: Check for fdwalk, pipe2.
4915 2013-04-17 Pedro Alves <palves@redhat.com>
4917 * configure.ac (USE_THREAD_DB): Delete variable.
4918 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4919 Don't AC_SUBST USE_THREAD_DB.
4920 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4921 * config.in, configure: Regenerate.
4923 2013-04-16 Pedro Alves <palves@redhat.com>
4925 * linux-low.h (struct lwp_info) <thread_known>: Move under
4926 the USE_THREAD_DB #ifdef.
4928 2013-04-16 Pedro Alves <palves@redhat.com>
4930 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4931 (linux-low.o): Delete rule.
4932 * linux-low.h: Always include "gdb_thread_db.h" instead of
4933 conditionally including thread_db.h.
4934 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4937 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4939 * Makefile.in (install-only): Fix make install regression.
4941 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4943 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4944 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4946 * gdbserver.1: Remove.
4948 2013-03-22 Pedro Alves <palves@redhat.com>
4950 * linux-low.c (handle_extended_wait): Don't call
4951 linux_enable_event_reporting.
4953 2013-03-15 Tony Theodore <tonyt@logyst.com>
4956 * Makefile.in (SHELL): Use @SHELL@.
4958 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4960 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4963 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4965 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4966 Remove extraneous NULL element.
4968 2013-03-13 Yao Qi <yao@codesourcery.com>
4970 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4971 'V' block in trace frame.
4973 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4975 * target.h (struct target_ops): Add btrace ops.
4976 (target_supports_btrace): New macro.
4977 (target_enable_btrace): New macro.
4978 (target_disable_btrace): New macro.
4979 (target_read_btrace): New macro.
4980 * gdbthread.h (struct thread_info): Add btrace field.
4981 * server.c: Include btrace-common.h.
4982 (handle_btrace_general_set): New function.
4983 (handle_btrace_enable): New function.
4984 (handle_btrace_disable): New function.
4985 (handle_general_set): Call handle_btrace_general_set.
4986 (handle_qxfer_btrace): New function.
4987 (struct qxfer qxfer_packets[]): Add btrace entry.
4988 * inferiors.c (remove_thread): Disable btrace.
4989 * linux-low: Include linux-btrace.h.
4990 (linux_low_enable_btrace): New function.
4991 (linux_low_read_btrace): New function.
4992 (linux_target_ops): Add btrace ops.
4993 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4994 Add srv_linux_btrace=yes.
4995 (x86_64-*-linux*): Add linux-btrace.o.
4996 Add srv_linux_btrace=yes.
4997 * configure.ac: Define HAVE_LINUX_BTRACE.
4998 * config.in: Regenerated.
4999 * configure: Regenerated.
5001 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5003 * server.c (handle_qxfer): Preserve error message if -3 is
5005 (qxfer): Document the -3 return value.
5007 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
5009 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
5010 (linux_btrace_h): New variable.
5011 (linux-btrace.o): New rule.
5013 2013-03-08 Stan Shebs <stan@codesourcery.com>
5014 Hafiz Abid Qadeer <abidh@codesourcery.com>
5016 * tracepoint.c (trace_buffer_size): New global.
5017 (DEFAULT_TRACE_BUFFER_SIZE): New define.
5018 (init_trace_buffer): Change to one-argument function. Allocate
5019 trace buffer memory.
5020 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
5021 handle QTBuffer:size packet.
5022 (cmd_bigqtbuffer_size): New function.
5023 (initialize_tracepoint): Call init_trace_buffer with
5024 DEFAULT_TRACE_BUFFER_SIZE.
5025 * server.c (handle_query): Add QTBuffer:size in the
5028 2013-03-07 Yao Qi <yao@codesourcery.com>
5030 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
5031 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
5033 (cmd_qtsp): Adjust condition. Do post increment.
5034 Set cur_action and cur_step_action back to 0.
5036 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
5039 * linux-low.c (linux_write_memory): Return early success if LEN is
5042 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
5044 * configure.srv: Add x86_64-*-cygwin* as target.
5046 2013-02-28 Tom Tromey <tromey@redhat.com>
5048 * configure.ac: Invoke AC_SYS_LARGEFILE.
5049 * configure, config.in: Rebuild.
5051 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
5053 * win32-low.c: Throughout, fix format strings and casts of
5054 printf-like functions to avoid type related warnings on all
5056 (get_child_debug_event): Print dwDebugEventCode as hex since
5057 that's how it's usually documented.
5059 2013-02-28 Yao Qi <yao@codesourcery.com>
5061 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
5064 2013-02-27 Jiong Wang <jiwang@tilera.com>
5066 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
5067 (reg-tilegx32.c): New rule.
5068 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
5069 * linux-tile-low.c (tile_arch_setup): New function. Invoke
5070 different register info initializer according to elf class.
5071 (init_registers_tilgx32): New function. The tilegx32 register info
5073 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
5074 (tile_store_gregset): Likewise.
5076 2013-02-27 Yao Qi <yao@codesourcery.com>
5078 * server.c (process_point_options): Print debug message when
5079 debug_threads is true.
5081 2013-02-26 Yao Qi <yao@codesourcery.com>
5083 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
5085 2013-02-19 Pedro Alves <palves@redhat.com>
5086 Kai Tietz <ktietz@redhat.com>
5090 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
5091 instead of strtoul to extract address from packet.
5092 (process_serial_event) <'z'>: Likewise.
5094 2013-02-18 Yao Qi <yao@codesourcery.com>
5096 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
5098 2013-02-14 Pedro Alves <palves@redhat.com>
5102 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
5103 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
5105 2013-02-14 Pedro Alves <palves@redhat.com>
5107 * tracepoint.c (cmd_qtdpsrc): Use savestring.
5109 2013-02-14 Pedro Alves <palves@redhat.com>
5111 * tracepoint.c (save_string): Delete.
5112 (add_tracepoint_action): Use savestring instead of save_string.
5114 2013-02-12 Pedro Alves <palves@redhat.com>
5116 * linux-xtensa-low.c: Ditto.
5117 * xtensa-xtregs.c: Ditto.
5119 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
5121 * thread-db.c (thread_db_get_tls_address): NULL pointer check
5124 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5126 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
5127 aarch64_num_wp_regs and aarch64_num_bp_regs to
5128 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
5130 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
5132 * linux-aarch64-low.c (ps_get_thread_area): Replace
5133 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
5135 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
5136 Marcus Shawcroft <marcus.shawcroft@arm.com>
5137 Nigel Stephens <nigel.stephens@arm.com>
5138 Yufeng Zhang <yufeng.zhang@arm.com>
5140 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
5141 (aarch64.c, aarch64-without-fpu.c): New targets.
5142 * configure.srv (aarch64*-*-linux*): New.
5143 * linux-aarch64-low.c: New file.
5145 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
5147 * linux-low.c (handle_extended_wait, linux_create_inferior)
5148 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
5149 (dequeue_one_deferred_signal, linux_resume_one_thread)
5150 (fetch_register, linux_write_memory, linux_enable_event_reporting)
5151 (linux_tracefork_grandchild, linux_test_for_tracefork)
5152 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
5153 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
5154 where the argument is 0.
5156 2013-01-25 Yao Qi <yao@codesourcery.com>
5158 * event-loop.c: Include "queue.h".
5159 (gdb_event_p): New typedef.
5160 (struct gdb_event) <next_event>: Remove.
5161 (event_queue): Change to QUEUE(gdb_event_p).
5162 (async_queue_event): Remove.
5163 (gdb_event_xfree): New.
5164 (initialize_event_loop): New.
5165 (process_event): Use API from QUEUE.
5166 (wait_for_event): Likewise.
5167 * server.c (main): Call initialize_event_loop.
5168 * server.h (initialize_event_loop): Declare.
5170 2013-01-18 Yao Qi <yao@codesourcery.com>
5172 * ax.h (struct eval_agent_expr_context): New.
5173 (gdb_eval_agent_expr): Update declaration.
5174 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5175 TFRAME. Add new argument CTX.
5176 * server.h (struct eval_agent_expr_context): Declare.
5177 (agent_mem_read, agent_tsv_read): Update declaration.
5178 (agent_mem_read_string): Likewise.
5179 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5180 (add_traceframe_block): Add new argument TPOINT.
5181 Increase TPOINT->traceframe_usage.
5182 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5183 eval_tracepoint_agent_expr.
5184 (condition_true_at_tracepoint): Likewise.
5185 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5186 (agent_mem_read_string, agent_tsv_read): Likewise.
5188 2013-01-16 Yao Qi <yao@codesourcery.com>
5190 * linux-low.c (linux_resume_one_lwp): Don't check
5191 'lwp->bp_reinsert != 0'.
5193 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5194 Pedro Alves <palves@redhat.com>
5196 * lynx-low.c (ptrace_request_to_str): Define a temporary
5197 macro and use it to simplify this function's implementation.
5199 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5201 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5204 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5206 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5208 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5210 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5212 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5214 * lynx-low.c (lynx_resume): Use the resume_info parameter
5215 to determine the ptid for the lynx_ptrace call, unless
5216 it is equal to minus_one_ptid, in which case we use the
5217 ptid of the current_inferior.
5218 (lynx_wait_1): After having received a thread create/exit
5219 event, resume the inferior's execution using the signaling
5220 thread's ptid, rather than the old ptid.
5222 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5224 * lynx-low.c (lynx_resume): Delete variable ret.
5226 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5228 * gdbreplay.c (gdbreplay_version): Update copyright year.
5229 * server.c (gdbserver_version): Likewise.
5231 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5233 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5236 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5238 * lynx-low.c (ptrace_request_to_str): Add handling for
5241 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5243 * lynx-low.c (lynx_attach): Delete variable new_process.
5245 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5247 * lynx-low.c (lynx_create_inferior): Delete variable
5250 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5252 * lynx-low.c (ptrace_request_to_str): Do not handle
5253 PTRACE_GETTHREADLIST if this macro does not exist.
5255 2012-12-15 Yao Qi <yao@codesourcery.com>
5257 * Makefile.in (OBS): Add notif.o.
5258 * notif.c, notif.h: New.
5259 * server.c: Include "notif.h".
5260 (struct vstop_notif) <next>: Remove.
5262 (queue_stop_reply): Update.
5263 (push_event, send_next_stop_reply): Remove.
5264 (discard_queued_stop_replies): Update.
5265 (notif_stop): New variable.
5266 (handle_v_stopped): Remove.
5267 (handle_v_requests): Don't call handle_v_stopped. Call
5268 handle_ack_notif instead.
5269 (queue_stop_reply_callback): Call notif_event_enque instead
5270 of queue_stop_reply.
5271 (handle_status): Don't call send_next_stop_reply, call
5272 notif_write_event instead.
5273 (kill_inferior_callback): Likewise.
5274 (detach_or_kill_inferior_callback): Likewise.
5275 (main): Call initialize_notif.
5276 (process_serial_event): Call QUEUE_is_empty.
5277 (handle_target_event): Call notif_push instead of push event.
5278 * server.h (push_event): Remove declaration.
5280 2012-12-10 Tom Tromey <tromey@redhat.com>
5282 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5283 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5286 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5287 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5288 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5289 (amd64-linux-ipa.o, ax.o): Rewrite.
5290 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5291 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5292 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5293 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5294 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5295 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5296 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5297 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5298 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5299 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5300 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5301 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5302 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5303 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5304 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5305 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5306 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5307 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5308 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5309 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5310 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5311 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5312 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5313 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5314 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5315 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5316 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5317 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5318 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5319 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5320 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5321 (reg-tilegx.o): Remove.
5322 (all_object_files): New macro.
5323 Include .deps files.
5324 * aclocal.m4, configure: Rebuild.
5325 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5326 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5327 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5329 2012-12-05 Tom Tromey <tromey@redhat.com>
5332 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5334 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5336 * configure.ac: Check for linux/perf_event.h.
5337 * config.in: Regenerated.
5338 * configure: Regenerated.
5340 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5342 * hostio.c (handle_readlink): Decrease buffer size
5343 parameter passed to readlink by one byte.
5345 2012-11-26 Yao Qi <yao@codesourcery.com>
5347 * configure.ac (build_warnings): Append '-Wempty-body'.
5348 * configure: Regenerated.
5349 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5352 2012-11-15 Pierre Muller <muller@sourceware.org>
5354 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5355 * config.in: Regenerate.
5356 * configure: Regenerate.
5357 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5358 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5359 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5360 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5362 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5363 instead of <sys/wait.h> header.
5364 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5366 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5368 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5369 (various make rules): Remove -DGDBSERVER
5371 2012-11-09 Yao Qi <yao@codesourcery.com>
5373 * spu-low.c (current_ptid): Move it to ..
5374 * gdbthread.h: ... here. New.
5375 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5376 * server.c (myresume, process_serial_event): Likewise.
5377 * thread-db.c (thread_db_find_new_threads): Likewise.
5378 * tracepoint.c (run_inferior_command): Likewise.
5380 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5382 * server.c (handle_search_memory_1): Include access length in
5385 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5387 * linux-crisv32-low.c: Fix compile errors.
5389 2012-09-04 Yao Qi <yao@codesourcery.com>
5391 * tracepoint.c (cmd_qtsv): Adjust debug message.
5392 Don't check CUR_TPOINT.
5394 2012-08-28 Yao Qi <yao@codesourcery.com>
5396 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5397 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5398 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5399 Remove declarations of xmalloc, xreallloc, xstrdup and
5401 * Makefile.in (libiberty_h): New.
5402 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5403 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5405 2012-08-23 Yao Qi <yao@codesourcery.com>
5407 * server.h: Remove declaration of 'xsnprintf'.
5409 2012-08-22 Keith Seitz <keiths@redhat.com>
5411 * server.h: Include build-gnulib-gbserver/config.h.
5412 * gdbreplay.c: Likewise.
5414 2012-08-08 Doug Evans <dje@google.com>
5416 * Makefile.in (SFILES): Add gdb_vecs.c.
5417 (OBS): Add gdb_vecs.o.
5418 (gdb_vecs_h, host_defs_h): New variables.
5419 (thread-db.o): Add $(gdb_vecs_h) dependency.
5420 (gdb_vecs.o): New rule.
5421 * thread-db.c: #include "gdb_vecs.h".
5422 (thread_db_load_search): Use a vector to iterate over path elements.
5423 Handle text appearing after "$pdir".
5425 * configure.ac: Add check for strstr.
5426 * config.in: Regenerate.
5427 * configure: Regenerate.
5429 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5431 * hostio.c (handle_pread): If pread fails, fall back to attempting
5433 (handle_pwrite): Likewise for pwrite.
5435 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5437 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5438 between unsupported TYPE and unimplementable ADDR/LEN combination.
5439 (arm_insert_point): Act on new return value.
5441 2012-07-31 Pedro Alves <palves@redhat.com>
5443 * server.c (process_point_options): Only skip tokens if we find
5444 one that is unrecognized. Don't treat 'X' specially while
5445 skipping unrecognized tokens.
5447 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5449 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5450 to 4-byte-align HW breakpoint addresses for Thumb.
5452 2012-07-27 Yao Qi <yao@codesourcery.com>
5456 * server.h: Declare gdb_agent_about_to_close.
5457 * target.c (kill_inferior): Include "agent.h".
5458 New. Send command 'kill'.
5459 * target.h (kill_inferior): Removed macro.
5460 * tracepoint.c (gdb_agent_about_to_close): New.
5461 (gdb_agent_helper_thread): Handle command 'close'.
5462 Wait endlessly until the inferior stops.
5463 Install gdb_agent_remove_socket to atexit hook.
5464 (agent_socket_name): New static variable.
5465 (gdb_agent_socket_init): Replace local variable 'name' with
5466 'agent_socket_name'.
5467 (gdb_agent_remove_socket): New.
5469 2012-07-27 Yao Qi <yao@codesourcery.com>
5471 * server.c (process_point_options): Stop at 'X' when parsing.
5473 2012-07-19 Michael Eager <eager@eagercon.com>
5475 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5477 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5478 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5479 hardware breakpoint.
5481 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5483 * gdbserver/linux-low.c (initialize_low): Call
5484 linux_ptrace_init_warnings.
5486 2012-07-02 Doug Evans <dje@google.com>
5488 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5491 2012-07-02 Stan Shebs <stan@codesourcery.com>
5493 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5494 (ax.o): Add it to build rule.
5496 (OBS): Add format.o.
5497 (IPA_OBS): Add format.o.
5498 * server.c (handle_query): Claim support for breakpoint commands.
5499 (process_point_options): Add command case.
5500 (process_serial_event): Leave running if there are printfs in
5502 * mem-break.h (any_persistent_commands): Declare.
5503 (add_breakpoint_commands): Declare.
5504 (gdb_no_commands_at_breakpoint): Declare.
5505 (run_breakpoint_commands): Declare.
5506 * mem-break.c (struct point_command_list): New struct.
5507 (struct breakpoint): New field command_list.
5508 (any_persistent_commands): New function.
5509 (add_commands_to_breakpoint): New function.
5510 (add_breakpoint_commands): New function.
5511 (gdb_no_commands_at_breakpoint): New function.
5512 (run_breakpoint_commands): New function.
5513 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5515 * ax.c: Include format.h.
5516 (ax_printf): New function.
5517 (gdb_eval_agent_expr): Add printf opcode.
5519 2012-06-13 Yao Qi <yao@codesourcery.com>
5521 * server.c (start_inferior): Remove duplicated writes to fields
5522 'last_resume_kind' and 'last_status' of 'current_inferior'.
5524 2012-06-12 Yao Qi <yao@codesourcery.com>
5525 Pedro Alves <palves@redhat.com>
5527 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5529 * server.c (handle_v_cont): Extend comment.
5531 2012-06-11 Yao Qi <yao@codesourcery.com>
5533 * linux-low.c (linux_attach): Add 'static'.
5535 2012-06-06 Yao Qi <yao@codesourcery.com>
5537 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5539 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5541 Fix gcc -flto compilation warning.
5542 * server.c (main): Make variable multi_mode and attach volatile.
5544 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5546 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5547 if the platform doesn't know about it.
5549 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5551 * Makefile.in (SFILES): Add linux-tile-low.c.
5552 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5553 * configure.srv: Handle tilegx-*-linux*.
5554 * linux-tile-low.c: New file.
5556 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5558 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5560 2012-05-24 Pedro Alves <palves@redhat.com>
5564 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5566 2012-05-24 Pedro Alves <palves@redhat.com>
5570 Replace target_signal with gdb_signal throughout.
5572 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5574 * linux-low.c (linux_store_registers): Avoid the copying sequence
5575 when no data has been retrieved by ptrace.
5577 2012-05-22 Will Deacon <will.deacon@arm.com>
5579 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5580 Include asm/ptrace.h.
5581 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5584 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5586 * linux-low.c (linux_store_registers): Don't re-retrieve data
5587 with ptrace that has already been obtained from /proc. Always
5588 copy any data retrieved with ptrace to the buffer supplied.
5590 2012-05-11 Yao Qi <yao@codesourcery.com>
5591 Pedro Alves <palves@redhat.com>
5593 * linux-low.c (enum stopping_threads_kind): New.
5594 (stopping_threads): Change type to `enum stopping_threads_kind'.
5595 (handle_extended_wait): If stopping and suspending threads, leave
5596 the new_lwp suspended too.
5597 (linux_wait_for_event): Adjust.
5598 (stop_all_lwps): Set `stopping_threads' to
5599 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5600 whether we're suspending threads or just stopping them. Assert no
5603 2012-04-29 Yao Qi <yao@codesourcery.com>
5605 * server.h: Move some code to ...
5606 * gdbthread.h: ... here. New.
5607 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5608 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5609 (nto-low.o, win32-low.o): Likewise.
5610 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5611 * regcache.c, remote-utils.c, server.c: Likewise.
5612 * target.c, tracepoint.c, win32-low.c: Likewise.
5614 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5616 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5617 (PTRACE_ARG4_TYPE): Likewise.
5618 (PTRACE_XFER_TYPE): Likewise.
5619 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5620 ptrace to PTRACE_ARG3_TYPE.
5621 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5622 (PTRACE_ARG4_TYPE): Likewise.
5623 (PTRACE_XFER_TYPE): Likewise.
5624 (linux_detach_one_lwp): Cast fourth argument of
5625 ptrace to long then PTRACE_ARG4_TYPE.
5626 (regsets_fetch_inferior_registers): Cast third argument of
5627 ptrace to long then PTRACE_ARG3_TYPE.
5628 (regsets_store_inferior_registers): Likewise.
5630 2012-04-20 Pedro Alves <palves@redhat.com>
5632 * configure: Regenerate.
5634 2012-04-19 Pedro Alves <palves@redhat.com>
5636 * Makefile.in (GNULIB_BUILDDIR): New.
5637 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5638 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5639 (all, install-only, uninstall, clean-info, all-lib, clean): No
5640 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5641 (maintainer-clean realclean distclean): Use subdir_do.
5643 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5644 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5645 * acinclude.m4: Include acx_configure_dir.m4.
5646 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5647 calls. Call AC_PROG_RANLIB. Configure gnulib using
5650 (GNULIB_STDINT_H): Adjust.
5651 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5652 * gdbreplay.c: Include build-gnulib/config.h.
5653 * server.h: Likewise.
5654 * aclocal.m4: Regenerate.
5655 * config.in: Regenerate.
5656 * configure: Regenerate.
5658 2012-04-19 Pedro Alves <palves@redhat.com>
5660 * Makefile.in (LIBGNU, INCGNU): Adjust.
5661 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5662 (all, install-only, uninstall, clean-info, all-lib, clean)
5663 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5664 * configure.ac: Adjust AC_OUTPUT output.
5665 * aclocal.m4: Regenerate.
5666 * configure: Regenerate.
5668 2012-04-19 Pedro Alves <palves@redhat.com>
5670 * Makefile.in (generated_files): New.
5671 (server_h): Remove the explicit dependency on config.h, and depend
5672 on $generated_files.
5674 2012-04-19 Pedro Alves <palves@redhat.com>
5676 * Makefile.in (INCGNU): Add -Ignulib.
5678 2012-04-19 Pedro Alves <palves@redhat.com>
5680 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5681 (INCGNU): ... this, and spell out -I here.
5682 (GNULIB_LIB): Rename to ...
5684 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5686 2012-04-19 Pedro Alves <palves@redhat.com>
5688 * config.in: Regenerate.
5690 2012-04-19 Pedro Alves <palves@redhat.com>
5692 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5693 * server.h (memmem): Remove declaration.
5694 * config.in: Regenerate.
5695 * configure: Regenerate.
5697 2012-04-19 Yao Qi <yao@codesourcery.com>
5699 * Makefile.in (SFILES): Add common/vec.c.
5703 2012-04-19 Yao Qi <yao@codesourcery.com>
5705 * remote-utils.c (prepare_resume_reply): Replace with macro
5706 target_core_of_thread.
5707 * server.c (handle_qxfer_threads_proper): Likewise.
5708 * target.h (traget_core_of_thread): New macro.
5710 2012-04-18 Pedro Alves <palves@redhat.com>
5712 * aclocal.m4: Regenerate.
5713 * configure: Regenerate.
5715 2012-04-16 Yao Qi <yao@codesourcery.com>
5717 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5718 duplicated on address.
5720 2012-04-16 Yao Qi <yao@codesourcery.com>
5722 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5723 (struct tracepoint_action_ops) <send>: New field.
5724 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5725 (agent_expr_send, x_tracepoint_action_send): New.
5726 (l_tracepoint_action_send): New.
5727 (cmd_qtdp): Download and install tracepoint
5728 according to `use_agent'.
5729 (run_inferior_command): Add one more parameter `len'.
5731 (tracepoint_send_agent): New.
5732 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5734 2012-04-16 Yao Qi <yao@codesourcery.com>
5736 * tracepoint.c (download_tracepoints): Moved to ...
5737 (cmd_qtstart): ... here.
5739 2012-04-14 Yao Qi <yao@codesourcery.com>
5741 * tracepoint.c: Include inttypes.h.
5742 (struct collect_memory_action): Use sized types.
5743 (struct tracepoint): Likewise.
5744 (cmd_qtdp, stop_tracing): Update print specifiers.
5745 (cmd_qtp, response_tracepoint): Likewise.
5746 (collect_data_at_tracepoint): Likewise.
5747 (collect_data_at_step): Likewise.
5749 2012-04-14 Yao Qi <yao@codesourcery.com>
5751 Import gnulib module inttypes.
5752 * aclocal.m4, config.in, configure: Regenerated.
5754 2012-04-14 Yao Qi <yao@codesourcery.com>
5756 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5757 Makefile and config.status at last.
5759 2012-04-13 Yao Qi <yao@codesourcery.com>
5761 * tracepoint.c: Include stdint.h unconditionally.
5763 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5765 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5766 on BFD_HAVE_SYS_PROCFS_TYPE.
5767 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5768 * configure: Regenerate.
5769 * config.in: Likewise.
5771 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5773 * Makefile.in (clean): Also remove x32.c x32-linux.c
5774 x32-avx.c x32-avx-linux.c.
5775 (x32.o): New target.
5777 (x32-linux.o): Likewise.
5778 (x32-linux.c): Likewise.
5779 (x32-avx.o): Likewise.
5780 (x32-avx.c): Likewise.
5781 (x32-avx-linux.o): Likewise.
5782 (x32-avx-linux.c): Likewise.
5784 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5785 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5786 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5787 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5788 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5789 i386/x32-avx-linux.xml.
5791 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5792 (init_registers_x32_avx_linux): Likwise.
5793 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5794 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5796 2012-04-13 Pedro Alves <palves@redhat.com>
5798 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5799 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5800 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5801 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5804 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5806 * linux-x86-low.c (compat_x32_clock_t): New.
5807 (compat_x32_siginfo_t): Likewise.
5808 (compat_x32_siginfo_from_siginfo): Likewise.
5809 (siginfo_from_compat_x32_siginfo): Likewise.
5810 (linux_is_elf64): Likewise.
5811 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5812 and siginfo_from_compat_x32_siginfo for x32.
5813 (x86_arch_setup): Set linux_is_elf64.
5815 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5818 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5820 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5821 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5822 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5823 compatible with process.
5825 2012-04-12 Yao Qi <yao@codesourcery.com>
5827 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5828 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5829 (install-only, install-info, clean): Handle sub dir gnulib.
5830 (all-lib, am--refresh): New targets.
5831 (memmem.o): Remove target.
5832 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5833 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5834 (AC_REPLACE_FUNCS): Remove memmem.
5835 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5836 (AC_OUTPUT): Generate Makefile in gnulib/.
5837 * aclocal.m4, config.in, configure: Regenerated.
5839 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5841 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5843 2012-04-05 Pedro Alves <palves@redhat.com>
5845 -Werror=strict-aliasing
5847 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5850 2012-04-04 Pedro Alves <palves@redhat.com>
5852 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5853 (sparc_store_gregset_from_stack, sparc_store_gregset)
5854 (sparc_breakpoint_at): Fix formatting.
5856 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5858 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5860 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5861 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5862 * config.in: Regenerate.
5863 * configure: Likewise.
5865 2012-03-29 Pedro Alves <palves@redhat.com>
5867 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5868 Correct ptrace arguments.
5870 2012-03-28 Pedro Alves <palves@redhat.com>
5872 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5873 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5874 (IA64_FR1_REGNUM): New defines.
5875 (ia64_fetch_register): New.
5876 (the_low_target): Install it.
5877 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5879 * linux-low.c (linux_fetch_registers): Try the
5880 the_low_target.fetch_register hook first.
5882 * linux-arm-low.c (the_low_target): Adjust.
5883 * linux-bfin-low.c (the_low_target): Adjust.
5884 * linux-cris-low.c (the_low_target): Adjust.
5885 * linux-crisv32-low.c (the_low_target): Adjust.
5886 * linux-m32r-low.c (the_low_target): Adjust.
5887 * linux-m68k-low.c (the_low_target): Adjust.
5888 * linux-mips-low.c (the_low_target): Adjust.
5889 * linux-ppc-low.c (the_low_target): Adjust.
5890 * linux-s390-low.c (the_low_target): Adjust.
5891 * linux-sh-low.c (the_low_target): Adjust.
5892 * linux-sparc-low.c (the_low_target): Adjust.
5893 * linux-tic6x-low.c (the_low_target): Adjust.
5894 * linux-x86-low.c (the_low_target): Adjust.
5895 * linux-xtensa-low.c (the_low_target): Adjust.
5897 2012-03-26 Pedro Alves <palves@redhat.com>
5899 * server.c (handle_qxfer_libraries): Don't bail early if
5900 the_target->qxfer_libraries_svr4 is not NULL.
5902 2012-03-26 Pedro Alves <palves@redhat.com>
5904 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5906 2012-03-23 Pedro Alves <palves@redhat.com>
5908 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5909 "library-list-svr4" element's start tag when the the DSO list is
5912 2012-03-23 Pedro Alves <palves@redhat.com>
5914 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5915 a variable whose type size is the same as the inferior's pointer
5918 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5920 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5922 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5923 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5924 * linux-low.h: Include <signal.h>.
5925 (struct siginfo): Remove forward declaration.
5926 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5929 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5931 * .gitignore: Ignore more files.
5933 2012-03-19 Pedro Alves <palves@redhat.com>
5934 Jan Kratochvil <jan.kratochvil@redhat.com>
5936 * server.c (cont_thread, general_thread): Add describing comments.
5937 (start_inferior): Clear `cont_thread'.
5938 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5941 2012-03-15 Yao Qi <yao@codesourcery.com>
5943 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5945 (cmd_qtdp): ... here.
5947 2012-03-15 Yao Qi <yao@codesourcery.com>
5949 * tracepoint.c (struct tracepoint_action_ops): New.
5950 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5951 (m_tracepoint_action_download): New.
5952 (r_tracepoint_action_download): New.
5953 (x_tracepoint_action_download): New.
5954 (l_tracepoint_action_download): New.
5955 (add_tracepoint_action): Install `action->ops' according type.
5956 (download_tracepoint_1): Move code `download' function pointer
5957 of various tracepoint_action_ops.
5959 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5961 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5962 linux_ptrace_attach_warnings.
5964 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5966 * Makefile.in (linux-ptrace.o): New.
5967 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5968 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5969 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5970 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5971 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5973 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5975 2012-03-08 Yao Qi <yao@codesourcery.com>
5976 Pedro Alves <palves@redhat.com>
5978 Fix PR server/13392.
5979 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5981 * tracepoint.c (remove_tracepoint): New.
5982 (cmd_qtdp): Call remove_tracepoint when failed to install.
5984 2012-03-07 Pedro Alves <palves@redhat.com>
5986 * linux-low.c (get_detach_signal): New.
5987 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5988 Pass on pending signals to PTRACE_DETACH. Check the result of the
5990 * server.c (program_signals, program_signals_p): New.
5991 (handle_general_set): Handle QProgramSignals.
5992 * server.h (program_signals, program_signals_p): Declare.
5994 2012-03-05 Pedro Alves <palves@redhat.com>
5995 Jan Kratochvil <jan.kratochvil@redhat.com>
5997 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
6000 2012-03-03 Yao Qi <yao@codesourcery.com>
6002 * tracepoint.c (tracepoint_look_up_symbols): Update call to
6003 agent_look_up_symbols.
6005 2012-03-03 Yao Qi <yao@codesourcery.com>
6007 * Makefile.in (linux-low.o): Keep dependence on agent.h.
6008 (linux-x86-low.o): Likewise.
6009 * server.h: Remove in_process_agent_loaded.
6010 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
6014 2012-03-03 Yao Qi <yao@codesourcery.com>
6016 * tracepoint.c (gdb_agent_capability): New global.
6017 (in_process_agent_loaded_ust): Renamed to
6018 `in_process_agent_supports_ust'.
6020 (in_process_agent_supports_ust): Call agent_capability_check.
6021 (clear_installed_tracepoints): Assert that agent supports
6024 2012-03-03 Yao Qi <yao@codesourcery.com>
6026 * linux-low.c (linux_supports_agent): New.
6027 (linux_target_ops): Initialize field `supports_agent' with
6028 linux_supports_agent.
6029 * target.h (struct target_ops) <supports_agent>: New.
6030 (target_supports_agent): New macro.
6031 * server.c (handle_general_set): Handle packet 'QAgent'.
6032 (handle_query): Send `QAgent+'.
6033 * Makefile.in (server.o): Depends on agent.h.
6035 2012-03-03 Yao Qi <yao@codesourcery.com>
6037 * Makefile.in (OBS): Add agent.o.
6038 Add new rule for agent.o.
6039 Track dependence of tracepoint.c on agent.h.
6040 * tracepoint.c (run_inferior_command_1):
6041 (run_inferior_command): Call agent_run_command.
6042 (gdb_ust_connect_sync_socket): Deleted. Move it to
6044 (resume_thread, stop_thread): Likewise.
6045 (gdb_ust_socket_init): Renamed to ...
6046 (gdb_agent_socket_init): ... New.
6047 (gdb_ust_thread): Renamed to ...
6048 (gdb_agent_helper_thread): ... New.
6049 (gdb_ust_init): Move some code to ...
6050 (gdb_agent_init): ... here. New.
6051 [HAVE_UST]: Call gdb_ust_init.
6052 (initialize_tracepoint_ftlib): Call gdb_agent_init.
6053 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
6054 * config.in, configure: Regenerated.
6056 2012-03-02 Pedro Alves <palves@redhat.com>
6058 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
6059 * linux-low.c (struct simple_pid_list): New.
6060 (stopped_pids): New a struct simple_pid_list pointer.
6061 (add_to_pid_list, pull_pid_from_list): New.
6062 (handle_extended_wait): Don't assume the first signal new children
6063 report is SIGSTOP. Adjust call to pull_pid_from_list.
6064 (linux_wait_for_lwp): Adjust.
6066 2012-03-02 Yao Qi <yao@codesourcery.com>
6068 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
6071 2012-03-02 Yao Qi <yao@codesourcery.com>
6073 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
6074 `stop_pc' and `tpoint'. Update caller.
6076 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
6078 * linux-low.h (linux_target_ops): Add regset_bitmap member.
6079 * linux-low.c (use_linux_regsets): New macro.
6080 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
6081 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
6082 (linux_register_in_regsets): New function.
6083 (usr_fetch_inferior_registers): Skip registers covered by
6085 (usr_store_inferior_registers): Likewise.
6086 (usr_fetch_inferior_registers): New macro.
6087 (usr_store_inferior_registers): Likewise.
6088 (linux_fetch_registers): Handle mixed regset/non-regset targets.
6089 (linux_store_registers): Likewise.
6090 * linux-mips-low.c (init_registers_mips_dsp_linux): New
6092 (init_registers_mips64_dsp_linux): Likewise.
6093 (init_registers_mips_linux): New macro.
6094 (init_registers_mips_dsp_linux): Likewise.
6095 (mips_dsp_num_regs): Likewise.
6096 (DSP_BASE, DSP_CONTROL): New fallback macros.
6097 (mips_base_regs): New macro.
6098 (mips_regmap): Use it. Fix the size.
6099 (mips_dsp_regmap): New variable.
6100 (mips_dsp_regset_bitmap): Likewise.
6101 (mips_arch_setup): New function.
6102 (mips_cannot_fetch_register): Use the_low_target.regmap rather
6104 (mips_cannot_store_register): Likewise.
6105 (the_low_target): Update .arch_setup, .num_regs and .regmap
6106 initializers. Add .regset_bitmap initializer.
6107 * linux-arm-low.c (the_low_target): Add .regset_bitmap
6109 * linux-bfin-low.c (the_low_target): Likewise.
6110 * linux-cris-low.c (the_low_target): Likewise.
6111 * linux-crisv32-low.c (the_low_target): Likewise.
6112 * linux-ia64-low.c (the_low_target): Likewise.
6113 * linux-m32r-low.c (the_low_target): Likewise.
6114 * linux-m68k-low.c (the_low_target): Likewise.
6115 * linux-ppc-low.c (the_low_target): Likewise.
6116 * linux-s390-low.c (the_low_target): Likewise.
6117 * linux-sh-low.c (the_low_target): Likewise.
6118 * linux-sparc-low.c (the_low_target): Likewise.
6119 * linux-tic6x-low.c (the_low_target): Likewise.
6120 * linux-x86-low.c (the_low_target): Likewise.
6121 * linux-xtensa-low.c (the_low_target): Likewise.
6122 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
6123 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
6124 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
6126 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
6127 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
6129 2012-02-29 Yao Qi <yao@codesourcery.com>
6130 Pedro Alves <palves@redhat.com>
6132 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
6133 `step_over_finished' is true.
6135 2012-02-27 Pedro Alves <palves@redhat.com>
6137 * linux-low.c (pid_is_stopped): Delete, moved to common/.
6138 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
6140 2012-02-27 Pedro Alves <palves@redhat.com>
6143 * linux-low.c (pid_is_stopped): New.
6144 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
6146 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
6148 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
6151 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
6153 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
6155 2012-02-24 Luis Machado <lgustavo@codesourcery>
6157 * server.c (handle_query): Advertise support for target-side
6158 breakpoint condition evaluation.
6159 (process_point_options): New function.
6160 (process_serial_event): When inserting a breakpoint, check for
6161 a target-side condition that should be evaluated.
6163 * mem-break.c: Include regcache.h and ax.h.
6164 (point_cond_list_t): New data structure.
6165 (breakpoint) <cond_list>: New field.
6166 (find_gdb_breakpoint_at): Make non-static.
6167 (delete_gdb_breakpoint_at): Clear any target-side
6169 (clear_gdb_breakpoint_conditions): New function.
6170 (add_condition_to_breakpoint): Likewise.
6171 (add_breakpoint_condition): Likewise.
6172 (gdb_condition_true_at_breakpoint): Likewise.
6173 (gdb_breakpoint_here): Return result directly instead
6174 of going through a local variable.
6176 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6177 (clear_gdb_breakpoint_conditions): Likewise.
6178 (add_breakpoint_condition): Likewise.
6179 (gdb_condition_true_at_breakpoint): Likewise.
6181 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6182 (need_step_over_p): Take target-side breakpoint condition into
6185 2012-02-24 Luis Machado <lgustavo@codesourcery>
6187 * server.h: Include tracepoint.h.
6188 (agent_mem_read, agent_get_trace_state_variable_value,
6189 agent_set_trace_state_variable_value,
6190 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6191 get_set_tsv_func_addr): New prototypes.
6193 * ax.h: New include file.
6194 * ax.c: New source file.
6196 * tracepoint.c: Include ax.h.
6197 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6198 agent_expr, eval_result_type): Move to ax.h.
6199 (parse_agent_expr): Rename to ...
6200 (gdb_parse_agent_expr): ... this, make it non-static and move
6202 (unparse_agent_expr) Rename to ...
6203 (gdb_unparse_agent_expr): ... this, make it non-static and move
6205 (eval_agent_expr): Rename to ...
6206 (eval_tracepoint_agent_expr): ... this.
6207 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6208 forward declarations.
6209 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6210 (agent_get_trace_state_variable_value): New function.
6211 (agent_set_trace_state_variable_value): New function.
6212 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6213 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6214 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6215 (condition_true_at_tracepoint): Likewise.
6216 (parse_agent_expr): Rename to ...
6217 (gdb_parse_agent_expr): ... this and move to ax.c.
6218 (unparse_agent_expr): Rename to ...
6219 (gdb_unparse_agent_expr): ... this and move to ax.c.
6220 (gdb_agent_op_name): Move to ax.c.
6221 (eval_agent_expr): Rename to ...
6222 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6224 (eval_tracepoint_agent_expr): New function.
6225 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6227 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6229 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6230 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6231 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6232 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6233 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6234 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6235 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6236 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6237 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6238 (compile_bytecodes): Remove forward declaration.
6239 (is_goto_target): Move to ax.c.
6240 (compile_bytecodes): Move to ax.c and call
6241 agent_get_trace_state_variable_value (...) and
6242 agent_set_trace_state_variable_value (...).
6244 * Makefile.in: Update ax.c and IPA dependencies.
6246 2012-02-24 Pedro Alves <palves@redhat.com>
6248 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6249 (cmd_bigqtbuffer_circular): ... this. Only handle
6250 'QTBuffer:circular:'.
6251 (handle_tracepoint_general_set): Adjust.
6253 2012-02-16 Yao Qi <yao@codesourcery.com>
6255 * inferiors.c: Move code to ...
6256 * dll.c: .... here. New.
6257 * server.h: Declare clear_dlls.
6258 * Makefile.in (SFILES): Add dll.c.
6262 2012-02-11 Yao Qi <yao@codesourcery.com>
6264 * server.c: (handle_monitor_command): Add a new parameter
6266 (handle_query): Update caller.
6268 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6270 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6271 * configure, config.in: Regenerate.
6272 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6275 2012-02-02 Pedro Alves <palves@redhat.com>
6277 Try SIGKILL first, then PTRACE_KILL.
6278 * linux-low.c (linux_kill_one_lwp): New.
6279 (linux_kill_one_lwp): Rename to ...
6280 (kill_one_lwp_callback): ... this. Use the new
6283 2012-02-02 Pedro Alves <palves@redhat.com>
6285 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6288 2012-01-27 Pedro Alves <palves@redhat.com>
6290 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6291 (elf_64_file_p): Make static.
6292 (linux_pid_exe_is_elf_64_file): New.
6293 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6294 Delete declarations.
6295 (linux_pid_exe_is_elf_64_file): Declare.
6296 * linux-x86-low.c (x86_arch_setup): Use
6297 linux_pid_exe_is_elf_64_file.
6299 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6301 * linux-low.c (linux_wait_for_event_1): Rename to ...
6302 (linux_wait_for_event): ... here and merge it with former
6303 linux_wait_for_event - new variable wait_ptid, use it.
6304 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6306 2012-01-23 Pedro Alves <palves@redhat.com>
6308 * server.c (main): Avoid yet another case of infinite loop while
6309 detaching/killing after a longjmp.
6311 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6314 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6316 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6318 * hostio.c (handle_readlink): New function.
6319 (handle_vFile): Call it to handle "vFile:readlink" packets.
6321 2012-01-20 Pedro Alves <palves@redhat.com>
6322 Ulrich Weigand <ulrich.weigand@linaro.org>
6324 * server.c (handle_v_requests): Only support vAttach and vRun to
6325 start multiple processes when in extended protocol mode.
6327 2012-01-17 Pedro Alves <palves@redhat.com>
6329 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6330 memalign plus mprotect to allocate the scratch buffer.
6332 2012-01-13 Pedro Alves <palves@redhat.com>
6334 * server.c (attach_inferior): Clear `cont_thread'.
6336 2012-01-13 Pedro Alves <palves@redhat.com>
6338 * server.c (main): Avoid infinite loop while detaching/killing
6341 2012-01-09 Doug Evans <dje@google.com>
6343 * server.c (start_inferior): Set last_ptid in --wrapper case.
6345 2012-01-06 Yao Qi <yao@codesourcery.com>
6347 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6349 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6351 2012-01-04 Yao Qi <yao@codesourcery.com>
6353 * tracepoint.c (cmd_qtdp): Print debug message
6354 for static tracepoint.
6356 2012-01-04 Yao Qi <yao@codesourcery.com>
6358 * tracepoint.c (trace_vdebug): Differentiate debug message
6359 between gdbserver and IPA.
6361 2012-01-03 Yao Qi <yao@codesourcery.com>
6363 * tracepoint.c (tracepoint_was_hit): Don't collect for
6366 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6368 * terminal.h: Reformat copyright header.
6370 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6372 * server.c (gdbserver_version): Update copyright year.
6373 * gdbreplay.c (gdbreplay_version): Likewise.
6375 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6377 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6380 2011-12-18 Hui Zhu <teawater@gmail.com>
6381 * linux-low.c (linux_create_inferior): Save return value to ret.
6383 2011-12-18 Hui Zhu <teawater@gmail.com>
6385 * linux-low.c (linux_create_inferior): Save return value to ret.
6387 2011-12-16 Doug Evans <dje@google.com>
6389 * linux-low.c (linux_create_inferior): If stdio connection,
6390 redirect stdin from /dev/null, stdout to stderr.
6391 * remote-utils.c (remote_is_stdio): New static global.
6392 (remote_connection_is_stdio): New function.
6393 (remote_prepare): Handle stdio connection.
6394 (remote_open): Ditto.
6395 (remote_close): Don't close stdin for stdio connections.
6396 (read_prim,write_prim): New functions. Replace all calls to
6397 read/write to these.
6398 * server.c (main): Watch for "-" argument. Move call to
6399 remote_prepare before start_inferior.
6400 * server.h (STDIO_CONNECTION_NAME): New macro.
6401 (remote_connection_is_stdio): Declare.
6403 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6404 in debugging output.
6406 2011-12-15 Yao Qi <yao@codesourcery.com>
6408 * tracepoint.c: Include sys/syscall.h.
6409 (gdb_ust_thread): Remove preprocessor conditional.
6411 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6413 * linux-low.c (linux_detach_one_lwp): Call
6414 the_low_target.prepare_to_resume before detaching.
6416 2011-12-14 Yao Qi <yao@codesourcery.com>
6418 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6421 2011-12-14 Yao Qi <yao@codesourcery.com>
6423 * i386-low.c (i386_low_stopped_data_address): Initialize local
6426 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6430 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6431 DR_CONTROL unless necessary. Extend comments.
6432 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6433 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6435 2011-12-13 Yao Qi <yao@codesourcery.com>
6437 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6439 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6441 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6443 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6444 Print new debug message for such case.
6446 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6448 Fix overlapping memcpy.
6449 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6450 the read_inferior_memory transfer.
6451 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6452 write_inferior_memory transfer.
6453 (set_fast_tracepoint_jump): New variable buf. Use it for the
6454 read_inferior_memory and write_inferior_memory transfers.
6455 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6456 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6457 Use it for the write_inferior_memory transfer.
6458 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6461 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6463 * linux-low.c (fetch_register, store_register): Make code
6464 consistent, fix formatting.
6466 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6468 * linux-low.c (usr_store_inferior_registers): Factor out code
6469 to handle individual registers into...
6470 (store_register): ... this new function.
6472 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6474 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6475 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6476 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6477 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6478 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6479 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6480 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6481 (srv_xmlfiles): Add new XML files.
6483 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6485 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6486 (init_registers_s390_linux32v1): Add prototype.
6487 (init_registers_s390_linux32v2): Likewise.
6488 (init_registers_s390_linux64v1): Likewise.
6489 (init_registers_s390_linux64v2): Likewise.
6490 (init_registers_s390x_linux64v1): Likewise.
6491 (init_registers_s390x_linux64v2): Likewise.
6492 (s390_num_regs): Increment to 52.
6493 (s390_regmap): Add orig_r2 register.
6494 (s390_num_regs_3264): Increment to 68.
6495 (s390_regmap_3264): Add orig_r2 register.
6496 (s390_collect_ptrace_register): Handle orig_r2 register.
6497 (s390_supply_ptrace_register): Likewise.
6498 (s390_fill_last_break): New function.
6499 (s390_store_last_break): Likewise.
6500 (s390_fill_system_call): New function.
6501 (s390_store_system_call): Likewise.
6502 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6504 (s390_check_regset): New function.
6505 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6506 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6507 Update target_regsets for available register sets.
6509 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6510 Jan Kratochvil <jan.kratochvil@redhat.com>
6512 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6513 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6515 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6516 * linux-low.h (struct process_info_private): New member r_debug.
6517 * server.c (handle_qxfer_libraries): Call
6518 the_target->qxfer_libraries_svr4.
6519 (handle_qxfer_libraries_svr4): New function.
6520 (qxfer_packets): New entry "libraries-svr4".
6521 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6522 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6523 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6524 PACKET_qXfer_libraries_svr4.
6526 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6528 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6529 PSW address/mask between 8-byte and 16-byte formats.
6530 (s390_supply_ptrace_register): Likewise.
6531 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6532 basic addressing mode bit.
6534 2011-11-24 Stan Shebs <stan@codesourcery.com>
6536 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6538 2011-11-17 Stan Shebs <stan@codesourcery.com>
6540 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6541 (tracing_start_time): New global.
6542 (tracing_stop_time): New global.
6543 (tracing_user_name): New global.
6544 (tracing_notes): New global.
6545 (tracing_stop_note): New global.
6546 (cmd_qtstart): Set traceframe_usage, start_time.
6547 (stop_tracing): Set stop_time.
6548 (cmd_qtstatus): Report additional status.
6549 (cmd_qtp): New function.
6550 (handle_tracepoint_query): Call it.
6551 (cmd_qtnotes): New function.
6552 (handle_tracepoint_general_set): Call it.
6553 (get_timestamp): Rename from tsv_get_timestamp.
6555 2011-11-14 Stan Shebs <stan@codesourcery.com>
6556 Kwok Cheung Yeung <kcy@codesourcery.com>
6558 * linux-x86-low.c (small_jump_insn): New.
6559 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6560 trampoline and error message, build a trampoline and issue a small
6561 jump instruction to it.
6562 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6563 trampoline and error message.
6564 (x86_get_min_fast_tracepoint_insn_len): New.
6565 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6566 * linux-low.h (struct linux_target_ops): Add arguments to
6567 install_fast_tracepoint_jump_pad operation, add new operation.
6568 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6570 (linux_get_min_fast_tracepoint_insn_len): New function.
6571 (linux_target_op): Add new operation.
6572 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6573 (gdb_trampoline_buffer_end): Ditto.
6574 (gdb_trampoline_buffer_error): Ditto.
6575 (struct ipa_sym_addresses): Add fields for new IPA variables.
6576 (symbol_list): Add entries for new IPA variables.
6577 (struct tracepoint): Add fields to hold the address range of the
6578 trampoline used by the tracepoint.
6579 (trampoline_buffer_head): New static variable.
6580 (trampoline_buffer_tail): Ditto.
6581 (claim_trampoline_space): New function.
6582 (have_fast_tracepoint_trampoline_buffer): New function.
6583 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6585 (install_fast_tracepoint): Ditto, also add error buffer argument.
6586 (cmd_qtminftpilen): New function.
6587 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6588 (fast_tracepoint_from_trampoline_address): New function.
6589 (fast_tracepoint_collecting): Handle trampoline as part of jump
6591 (set_trampoline_buffer_space): New function.
6592 (initialize_tracepoint): Initialize new IPA variables.
6593 * target.h (struct target_ops): Add arguments to
6594 install_fast_tracepoint_jump_pad operation, add new
6595 get_min_fast_tracepoint_insn_len operation.
6596 (target_get_min_fast_tracepoint_insn_len): New.
6597 (install_fast_tracepoint_jump_pad): Add arguments.
6598 * server.h (IPA_BUFSIZ): Define.
6599 * linux-i386-ipa.c: Include extra header files.
6600 (initialize_fast_tracepoint_trampoline_buffer): New function.
6601 (initialize_low_tracepoint): Call it.
6602 * server.h (set_trampoline_buffer_space): Declare.
6603 (claim_trampoline_space): Ditto.
6604 (have_fast_tracepoint_trampoline_buffer): Ditto.
6606 2011-11-14 Yao Qi <yao@codesourcery.com>
6608 * server.c (handle_query): Handle InstallInTrace for qSupported.
6609 * tracepoint.c (add_tracepoint): Sort list.
6610 (install_tracepoint, download_tracepoint): New.
6611 (cmd_qtdp): Call them to install and download tracepoints.
6612 (sort_tracepoints): Removed.
6613 (cmd_qtstart): Update.
6615 2011-11-14 Yao Qi <yao@codesourcery.com>
6617 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6618 * mem-break.h: Declare.
6619 * tracepoint.c (cmd_qtstart): Move some code to ...
6620 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6622 (download_tracepoints): Move some code to ...
6623 (download_tracepoint_1): ... here. New.
6625 2011-11-08 Yao Qi <yao@codesourcery.com>
6627 * remote-utils.c (relocate_instruction): A comment fix.
6629 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6631 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6632 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6633 dr_status_mirror and dr_control_mirror from debug_reg_state.
6634 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6635 (i386_initial_stuff): Remove use of deleted globals.
6636 (i386_get_thread_context, i386_set_thread_context,
6637 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6638 from debug_reg_state.
6640 2011-11-05 Yao Qi <yao@codesourcery.com>
6642 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6643 address as TPOINT's.
6645 2011-11-02 Stan Shebs <stan@codesourcery.com>
6647 * tracepoint.c (agent_mem_read_string): New function.
6648 (eval_agent_expr): Call it for tracenz.
6649 * server.c (handle_query): Report support for tracenz.
6651 2011-11-02 Yao Qi <yao@codesourcery.com>
6653 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6655 2011-11-02 Yao Qi <yao@codesourcery.com>
6657 * target.h: Fix a typo in comment.
6659 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6661 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6662 clobber the breakpoints' shadows with fast tracepoint jumps.
6663 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6664 * target.c (write_inferior_memory): Also pass MYADDR down to
6667 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6669 * configure.ac: Check support for personality routine.
6670 * configure: Regenerate.
6671 * config.in: Likewise.
6672 * linux-low.c: Include <sys/personality.h>.
6673 Define ADDR_NO_RANDOMIZE if necessary.
6674 (linux_create_inferior): Disable address space randomization when
6675 forking inferior, if requested.
6676 (linux_supports_disable_randomization): New function.
6677 (linux_target_ops): Install it.
6678 * server.h (disable_randomization): Declare.
6679 * server.c (disable_randomization): New global variable.
6680 (handle_general_set): Handle QDisableRandomization.
6681 (handle_query): Likewise for qSupported.
6682 (main): Support --disable-randomization and --no-disable-randomization
6683 command line arguments.
6684 * target.h (struct target_ops): Add supports_disable_randomization.
6685 (target_supports_disable_randomization): New macro.
6687 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6689 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6691 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6692 [!PT_GETDSBT] (target_loadmap): New definition.
6693 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6694 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6695 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6696 and PT_GETDSBT to LINUX_LOADMAP.
6697 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6698 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6700 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6702 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6703 (arm_linux_hwbp_cap): New static variable.
6704 (arm_linux_get_hwbp_cap): Replace by ...
6705 (arm_linux_init_hwbp_cap): ... this new function.
6706 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6707 (arm_linux_get_hw_watchpoint_count): Likewise.
6708 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6709 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6710 (arm_prepare_to_resume): Use perror_with_name instead of error.
6712 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6714 * linux-arm-low.c: Include <signal.h>.
6715 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6716 (struct arm_linux_hwbp_cap): New data type.
6717 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6718 (struct arm_linux_hw_breakpoint): New data type.
6719 (MAX_BPTS, MAX_WPTS): Define.
6720 (struct arch_process_info, struct arch_lwp_info): New data types.
6721 (arm_linux_get_hwbp_cap): New function.
6722 (arm_linux_get_hw_breakpoint_count): Likewise.
6723 (arm_linux_get_hw_watchpoint_count): Likewise.
6724 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6725 (arm_hwbp_control_initialize): Likewise.
6726 (arm_hwbp_control_is_enabled): Likewise.
6727 (arm_hwbp_control_is_initialized): Likewise.
6728 (arm_hwbp_control_disable): Likewise.
6729 (arm_linux_hw_breakpoint_equal): Likewise.
6730 (arm_linux_hw_point_initialize): Likewise.
6731 (struct update_registers_data): New data structure.
6732 (update_registers_callback: New function.
6733 (arm_insert_point): Likewise.
6734 (arm_remove_point): Likewise.
6735 (arm_stopped_by_watchpoint): Likewise.
6736 (arm_stopped_data_address): Likewise.
6737 (arm_new_process): Likewise.
6738 (arm_new_thread): Likewise.
6739 (arm_prepare_to_resume): Likewise.
6740 (the_low_target): Register arm_insert_point, arm_remove_point,
6741 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6742 arm_new_thread, and arm_prepare_to_resume.
6744 2011-09-15 Stan Shebs <stan@codesourcery.com>
6746 * server.h (struct emit_ops): Add compare-goto fields.
6747 * tracepoint.c (gdb_agent_op_sizes): New table.
6748 (emit_eq_goto): New function.
6749 (emit_ne_goto): New function.
6750 (emit_lt_goto): New function.
6751 (emit_le_goto): New function.
6752 (emit_gt_goto): New function.
6753 (emit_ge_goto): New function.
6754 (is_goto_target): New function.
6755 (compile_bytecodes): Recognize special cases of compare-goto
6756 combinations and call specialized emitters for them.
6757 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6758 (amd64_emit_ne_goto): New function.
6759 (amd64_emit_lt_goto): New function.
6760 (amd64_emit_le_goto): New function.
6761 (amd64_emit_gt_goto): New function.
6762 (amd64_emit_ge_goto): New function.
6763 (amd64_emit_ops): Add the new functions.
6764 (i386_emit_eq_goto): New function.
6765 (i386_emit_ne_goto): New function.
6766 (i386_emit_lt_goto): New function.
6767 (i386_emit_le_goto): New function.
6768 (i386_emit_gt_goto): New function.
6769 (i386_emit_ge_goto): New function.
6770 (i386_emit_ops): Add the new functions.
6772 2011-09-08 Stan Shebs <stan@codesourcery.com>
6774 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6775 (i386_emit_epilogue): Restore %ebx.
6777 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6779 * server.c (step_thread): Remove definition.
6780 (process_serial_event): Don't handle Hs.
6781 * server.h (step_thread): Remove declaration.
6782 * target.c (set_desired_inferior): Remove use of step_thread.
6784 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6786 * linux-low.c: Include linux-procfs.h.
6787 (linux_attach_lwp_1): Update comments.
6788 (linux_attach): Scan for existing threads when attaching to a
6789 process that is the tgid.
6790 * Makefile.in: Update dependencies.
6792 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6794 * configure.srv: Add linux-procfs.o dependencies.
6796 2011-08-14 Yao Qi <yao@codesourcery.com>
6798 * target.h (struct target_ops): Fix indent.
6799 * win32-low.c (win32_target_ops): Fix comment.
6801 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6802 Yao Qi <yao@codesourcery.com>
6804 * Makefile.in (clean): Remove tic6x-*.c files.
6805 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6806 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6807 (tic6x-c64xp-linux.c): Likewise.
6808 * configure.srv: Add support for tic6x-*-uclinux.
6809 * linux-tic6x-low.c: New.
6810 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6812 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6813 Yao Qi <yao@codesourcery.com>
6815 * target.h (struct target_ops): Add read_loadmap.
6816 * linux-low.c (struct target_loadseg): New type.
6817 (struct target_loadmap): New type.
6818 (linux_read_loadmap): New function.
6819 (linux_target_ops): Add linux_read_loadmap.
6820 * server.c (handle_query): Support qXfer:fdpic:read packet.
6821 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6824 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6826 * win32-low.c: Include <stdint.h>.
6828 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6830 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6831 to the inferior here.
6832 (i386_remove_aligned_watchpoint): Ditto.
6833 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6834 fit part of the watchpoint in the debug registers.
6835 (i386_update_inferior_debug_regs): New.
6836 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6837 registers, and only update the inferior on success.
6838 (i386_low_remove_watchpoint): Ditto.
6840 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6842 * linux-low.c (compare_ints, unique, list_threads, show_process,
6843 linux_core_of_thread): Delete.
6844 (linux_target_ops): Change linux_core_of_thread to
6845 linux_common_core_of_thread.
6846 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6847 * utils.c (malloc_failure): Change type of argument.
6848 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6849 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6850 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6851 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6852 (IPA_OBJS): Add common-utils-ipa.o.
6853 (ptid_h, linux_osdata_h): New macros.
6854 (server_h): Add common/common-utils.h, common/xml-utils.h,
6855 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6857 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6858 ptid.o, buffer.o): New rules.
6859 (linux-low.o): Add common/linux-osdata.h as a dependency.
6860 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6861 * configure.ac: Add AC_HEADER_DIRENT check.
6862 * config.in: Regenerate.
6863 * configure: Regenerate.
6864 * remote-utils.c (xml_escape_text): Delete.
6865 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6866 buffer_xml_printf): Move to common/buffer.c.
6867 * server.c (main): Remove call to initialize_inferiors.
6868 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6869 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6870 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6871 internal_error, gdb_assert, gdb_assert_fail): Delete.
6872 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6873 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6875 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6876 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6877 initialize_inferiors): Delete.
6879 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6881 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6884 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6886 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6888 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6890 2011-05-26 Yao Qi <yao@codesourcery.com>
6892 * Makefile.in (thread-db.o): Track dependence to
6893 common/gdb_thread_db.h.
6894 * thread-db.c: include gdb_thread_db.h from right place.
6896 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6898 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6899 __FILE__ and __LINE__ to internal_error.
6901 2011-05-13 Doug Evans <dje@google.com>
6903 * thread-db.c (try_thread_db_load_from_sdir): New function.
6904 (try_thread_db_load_from_dir): New function.
6905 (thread_db_load_search): Handle $sdir, ignore $pdir.
6906 Remove trying of system directories if search of
6907 libthread-db-search-path fails, that is now done via $sdir.
6909 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6911 * server.c (handle_query): Add EnableDisableTracepoints to the list
6912 of supported features.
6913 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6915 (cmd_qtenable_disable): New.
6916 (cmd_qtstart): Install tracepoints even if disabled.
6917 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6918 receiving a QTEnable or QTDisable packet.
6919 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6920 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6922 (gdb_probe): Skip data collection if static tracepoint is disabled.
6924 2011-05-10 Doug Evans <dje@google.com>
6926 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6928 2011-05-04 Doug Evans <dje@google.com>
6930 * linux-low.c (linux_join): Skip process lookup.
6931 * spu-low.c (spu_join): Ditto.
6932 * server.c (join_inferiors_callback): Delete.
6933 (process_serial_event): For 'D' packet (detach) call join_inferior
6936 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6938 * README: Don't mention xscale*-*-linux*.
6939 * configure.srv (xscale*-*-linux*): Don't handle target.
6941 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6943 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6945 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6946 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6947 (i386_emit_void_call_2): Likewise.
6949 2011-04-26 Yao Qi <yao@codesourcery.com>
6951 * linux-low.c: Move common macros to linux-ptrace.h.
6952 Include linux-ptrace.h.
6953 * Makefile.in (linux_ptrace_h): New.
6954 (linux-low.o): Depends on linux-ptrace.h.
6956 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6958 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6959 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6960 (remote_prepare): New function with most of the TCP code from ...
6961 (remote_open): ... here. Detect PORT here unconditionally. Move also
6962 setting transport_is_reliable.
6963 * server.c (run_once): New variable.
6964 (gdbserver_usage): Document it.
6965 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6966 the first run if RUN_ONCE.
6967 * server.h (run_once, remote_prepare): New declarations.
6969 2011-04-19 Tom Tromey <tromey@redhat.com>
6971 * win32-low.c (handle_load_dll): Remove duplicate "the".
6973 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6975 Remove support for old Cygwin 1.5 versions.
6976 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6977 function to avoid warning.
6978 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6981 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6983 * gdbserver/server.h (Macro _): Define it if not available.
6985 2011-03-14 Michael Snyder <msnyder@vmware.com>
6987 * hostio.c (handle_close): Remove unnecessary null test.
6989 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6991 * Makefile.in (maintainer-clean realclean distclean): Remove
6992 "make ... subdir_do" command.
6994 2011-03-10 Michael Snyder <msnyder@vmware.com>
6996 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6998 * server.c (handle_v_run): Free alloced buffer on early return.
7000 2011-03-09 Yao Qi <yao@codesourcery.com>
7003 2011-03-04 Yao Qi <yao@codesourcery.com>
7005 * Makefile.in: Remove GNU make feature --directory.
7007 2011-03-05 Yao Qi <yao@codesourcery.com>
7009 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7010 (subdir_do): New make target. Copied from gdb/Makefile.
7011 (maintainer-clean, realclean, distclean, clean): Call corresponding
7012 make targets in common/Makefile.
7014 2011-02-11 Yao Qi <yao@codesourcery.com>
7016 * configure.ac: Call AC_PROG_RANLIB.
7017 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7018 * configure: Regenerate.
7020 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
7022 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
7024 2011-03-06 Yao Qi <yao@codesourcery.com>
7026 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
7028 2011-03-05 Yao Qi <yao@codesourcery.com>
7030 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
7031 (subdir_do): New make target. Copied from gdb/Makefile.
7032 (maintainer-clean, realclean, distclean, clean): Call corresponding
7033 make targets in common/Makefile.
7035 2011-03-04 Yao Qi <yao@codesourcery.com>
7037 * Makefile.in: Remove GNU make feature --directory.
7039 2011-03-04 Michael Snyder <msnyder@vmware.com>
7041 * server.c (queue_stop_reply): Call xmalloc not malloc.
7043 2011-03-02 Michael Snyder <msnyder@vmware.com>
7045 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
7047 2011-02-28 Michael Snyder <msnyder@vmware.com>
7049 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
7050 (cmd_qtframe): Ditto.
7051 (cmd_qtbuffer): Ditto.
7052 (cmd_bigqtbuffer): Ditto.
7054 * utils.c (decimal2str): Initialize 'width' to nine, then
7057 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
7059 * hostio.c (require_data): Free *data, not data.
7061 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7063 * hostio.c (require_data): Use free, not xfree.
7065 2011-02-27 Michael Snyder <msnyder@vmware.com>
7067 * server.c (handle_query): Discard unused value.
7069 * hostio.c (require_data): Free malloc memory before returning
7072 2011-02-26 Michael Snyder <msnyder@vmware.com>
7074 * linux-low.c (list_threads): Call closedir for dirent.
7076 2011-02-27 Michael Snyder <msnyder@vmware.com>
7078 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
7079 a case statement falls through.
7081 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
7083 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
7086 2011-02-26 Michael Snyder <msnyder@vmware.com>
7088 * utils.c (decimal2str): Eliminate dead code and dead param.
7089 (pulongest): Drop dead param from call to decimal2str.
7092 2011-02-24 Joel Brobecker <brobecker@adacore.com>
7094 Revert the following patch (not approved yet):
7095 2011-02-21 Hui Zhu <teawater@gmail.com>
7096 * tracepoint.c (tp_printf): New function.
7097 (eval_agent_expr): Handle gdb_agent_op_printf.
7099 2011-02-21 Hui Zhu <teawater@gmail.com>
7101 * tracepoint.c (tp_printf): New function.
7102 (eval_agent_expr): Handle gdb_agent_op_printf.
7104 2011-02-18 Tom Tromey <tromey@redhat.com>
7106 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
7107 (tracepoint.o): Likewise.
7108 * tracepoint.c (enum gdb_agent_op): Use ax.def.
7109 (gdb_agent_op_names): Likewise.
7111 2011-02-18 Tom Tromey <tromey@redhat.com>
7113 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
7114 gdb_agent_op_rot>: New constants.
7115 (gdb_agent_op_names): Add pick and roll.
7116 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
7119 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
7121 * aclocal.m4: Regenerated with aclocal-1.11.1.
7123 2011-02-14 Pedro Alves <pedro@codesourcery.com>
7125 * server.c (handle_qxfer_traceframe_info): New.
7126 (qxfer_packets): Register "traceframe-info".
7127 (handle_query): Report support for qXfer:traceframe-info:read+.
7128 * tracepoint.c (match_blocktype): New.
7129 (traceframe_find_block_type): Rename to ...
7130 (traceframe_walk_blocks): ... this. Add callback filter argument,
7132 (traceframe_find_block_type): New, reimplemented on top of
7133 traceframe_walk_blocks.
7134 (build_traceframe_info_xml): New.
7135 (traceframe_read_info): New.
7136 * server.h (traceframe_read_info): Declare.
7138 2011-02-11 Yao Qi <yao@codesourcery.com>
7140 * configure.ac: Call AC_PROG_RANLIB.
7141 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
7142 * configure: Regenerate.
7144 2011-02-07 Pedro Alves <pedro@codesourcery.com>
7146 * server.c (gdb_read_memory): Change return semantics to allow
7148 (handle_search_memory_1): Adjust.
7149 (process_serial_event) <'m' packet>: Handle partial transfers.
7150 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
7152 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7154 * regcache.c (init_register_cache): Initialize
7155 regcache->register_status.
7156 (free_register_cache): Release regcache->register_status.
7157 (regcache_cpy): Copy register_status.
7158 (registers_to_string): Print 'x's for unavailable registers.
7159 (supply_register): Mark the register's status valid or
7160 unavailable, depending on whether a buffer was passed in or not.
7161 (supply_register_zeroed): New.
7162 (supply_regblock): Mark the registers' status valid or
7163 unavailable, depending on whether a buffer was passed in or not.
7164 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7165 (struct regcache): New `register_status' field.
7166 (supply_register_zeroed): Declare.
7167 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7168 supply_register_zeroed, rather than passing a NULL buffer to
7170 * tracepoint.c (fetch_traceframe_registers): Update comment.
7172 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7174 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7177 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7179 * server.h (decode_xfer_write): Change prototype.
7180 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7181 and don't extract the annex here.
7182 * server.c (decode_xfer_read): Remove `annex' parameter,
7183 and don't extract the annex here.
7185 (struct qxfer): New.
7186 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7187 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7188 (handle_qxfer_statictrace): New functions, abstracted out from
7189 handle_query, and made to use the struct qxfer interface.
7190 (handle_threads_qxfer_proper): Rename to ...
7191 (handle_qxfer_threads_proper): ... this.
7192 (handle_threads_qxfer): Rename to ...
7193 (handle_qxfer_threads): ... this. Adjust.
7194 (qxfer_packets): New array.
7195 (handle_qxfer): New function.
7196 (handle_query): Use handle_qxfer.
7198 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7200 * gdbreplay.c: Shorten lines of >= 80 columns.
7201 * linux-low.c: Ditto.
7202 * linux-ppc-low.c: Ditto.
7203 * linux-s390-low.c: Ditto.
7204 * linux-sparc-low.c: Ditto.
7205 * linux-x86-low.c: Ditto.
7206 * linux-xtensa-low.c: Ditto.
7207 * mem-break.c: Ditto.
7209 * regcache.h: Ditto.
7210 * remote-utils.c: Ditto.
7213 * thread-db.c: Ditto.
7214 * tracepoint.c: Ditto.
7216 * win32-low.h: Ditto.
7218 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7220 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7223 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7225 * server.c (gdbserver_version): Update copyright year in version
7227 * gdbreplay.c (gdbreplay_version): Ditto.
7229 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7231 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7232 * linux-bfin-low.c: New file.
7233 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7234 PT_DATA_ADDR for BFIN targets.
7235 * Makefile.in (SFILES): Add linux-bfin-low.c.
7236 (clean): Remove reg-bfin.c.
7237 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7238 * README: Mention supported Blackfin targets.
7240 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7242 * .gitignore: New file.
7244 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7246 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7248 2010-10-22 Jie Zhang <jie@codesourcery.com>
7250 * Makefile.in: Add FLAGS_TO_PASS variable.
7251 (install): Remove dependency of install-only and recursively
7252 invoke make for install-only.
7254 2010-10-04 Doug Evans <dje@google.com>
7256 * Makefile.in (uninstall): Use $(DESTDIR).
7258 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7262 * linux-x86-low.c (compat_siginfo_from_siginfo)
7263 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7264 si_code is < 0. Check for si_code == SI_TIMER before checking for
7267 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7269 * lynx-i386-low.c: New file.
7270 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7272 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7274 * lynx-low.c (ptrace_request_to_str): Remove handling for
7275 request values that have been removed in LynxOS 5.x.
7277 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7279 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7282 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7284 * configure.ac: Add --enable-inprocess-agent option.
7285 * configure: Rebuilt.
7287 2010-09-06 Yao Qi <yao@codesourcery.com>
7289 * linux-low.c (linux_kill): Remove unused variable.
7290 (linux_stabilize_threads): Likewise.
7291 * server.c (start_inferior): Likewise.
7292 (queue_stop_reply_callback): Likewise.
7293 * tracepoint.c (do_action_at_tracepoint): Likewise.
7295 2010-09-06 Yao Qi <yao@codesourcery.com>
7297 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7300 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7302 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7304 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7306 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7309 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7311 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7312 gdbserver/lynx-ppc-low.c: New files.
7313 * Makefile.in (lynx_low_h): New variable.
7314 (lynx-low.o, lynx-ppc-low.o): New rules.
7315 * configure.ac: On LynxOS, link with -lnetinet.
7316 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7317 * configure: regenerate.
7319 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7321 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7322 * configure.ac: Add check for vasprintf and vsnprintf.
7323 * configure, config.in: Regenerate.
7324 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7326 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7328 * gdbreplay.c: Move include of alloca.h up, next to include of
7330 * server.h: Add include of malloc.h.
7331 * mem-break.c: Remove include of malloc.h.
7332 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7334 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7336 * Makefile.in (memmem.o): Build with -Wno-error.
7338 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7340 * utils.c (xsnprintf): Make non-static.
7341 * server.h: Add xsnprintf declaration.
7342 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7343 replace calls to snprintf by calls to xsnprintf throughout.
7345 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7347 * configure.ac: Add configure check for alloca.
7348 * configure, config.in: Regenerate.
7349 * server.h: Include alloca.h if it exists.
7350 * gdbreplay.c: Include alloca.h if it exists.
7352 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7354 * linux-low.c (__SIGRTMIN): Define if not already defined.
7355 (linux_create_inferior): Check for __ANDROID__ rather than
7357 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7358 are already deferred.
7359 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7360 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7361 stopped and already has a pending signal to report.
7362 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7363 a pending signal to report or is moving out of a jump pad.
7364 (linux_init_signals): Check for __ANDROID__ rather than
7367 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7369 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7370 debug_threads check. Avoid a linear search when not doing debug
7373 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7375 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7376 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7377 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7378 (process_event): Change local fd's type to gdb_fildes_t.
7379 (create_file_handler): Adjust prototype.
7380 (delete_file_handler): Adjust prototype.
7381 (handle_file_event): Adjust prototype. Use pfildes.
7382 (create_file_event): Adjsut prototype.
7383 * remote-utils.c (remote_desc, listen_desc): Change type to
7385 * server.h: New gdb_fildes_t typedef.
7386 [USE_WIN32API]: Include winsock2.h.
7387 (delete_file_handler, add_file_handler): Adjust prototypes.
7389 * utils.c (pfildes): New.
7391 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7393 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7394 * configure: Regenerate.
7396 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7398 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7399 (linux_done_accessing_memory): ... this.
7400 (linux_target_ops): Adjust.
7401 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7402 * nto-low.c (nto_target_ops): Adjust comment.
7403 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7404 * spu-low.c (spu_target_ops): Adjust comment.
7405 * target.h (target_ops): Rename unprepare_to_access_memory field
7406 to done_accessing_memory.
7407 (unprepare_to_access_memory): Rename to ...
7408 (done_accessing_memory): ... this.
7410 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7412 * linux-low.c (linux_prepare_to_access_memory): New.
7413 (linux_unprepare_to_access_memory): New.
7414 (linux_target_ops): Install them.
7415 * server.c (read_memory): Rename to ...
7416 (gdb_read_memory): ... this. Use
7417 prepare_to_access_memory/prepare_to_access_memory.
7418 (write_memory): Rename to ...
7419 (gdb_write_memory): ... this. Use
7420 prepare_to_access_memory/prepare_to_access_memory.
7421 (handle_search_memory_1): Adjust.
7422 (process_serial_event): Adjust.
7423 * target.h (struct target_ops): New fields
7424 prepare_to_access_memory and unprepare_to_access_memory.
7425 (prepare_to_access_memory, unprepare_to_access_memory): New.
7426 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7427 prepare_to_access_memory/prepare_to_access_memory.
7428 * nto-low.c (nto_target_ops): Adjust.
7429 * spu-low.c (spu_target_ops): Adjust.
7430 * win32-low.c (win32_target_ops): Adjust.
7432 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7434 * Makefile.in (WARN_CFLAGS): Get it from configure.
7435 (WERROR_CFLAGS): New.
7436 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7437 * configure.ac: Introduce --enable-werror, which adds -Werror to
7438 the compiler command line. Enabled by default. Disable with
7439 --disable-werror. Add -Wdeclaration-after-statement
7440 Wpointer-arith and -Wformat-nonliteral to warning flags.
7441 * configure: Regenerate.
7443 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7445 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7447 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7449 * gdbreplay.c (remote_error): New.
7451 (expect): Use gdbchar. Check for error reading from GDB.
7452 Clarify sync error output.
7453 (play): Check for errors writing to GDB.
7454 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7455 * remote-utils.c (getpkt): Check for errors writing to the remote
7458 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7460 * linux-low.c (linux_wait_1): Move non-debugging code out of
7461 `debug_threads' control.
7463 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7465 * linux-low.c (linux_wait_1): Don't set last_status here.
7466 * server.c (push_event, queue_stop_reply_callback): Assert we're
7467 not pushing a TARGET_WAITKIND_IGNORE event.
7468 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7469 (myresume, handle_target_event): Set the thread's last_resume_kind
7470 and last_status from the target returned status.
7472 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7476 * linux-x86-low.c (update_debug_registers_callback): New.
7477 (i386_dr_low_set_addr): Use it.
7478 (i386_dr_low_get_addr): New.
7479 (i386_dr_low_set_control): Use update_debug_registers_callback.
7480 (i386_dr_low_get_control): New.
7481 (i386_dr_low_get_status): Adjust.
7482 * linux-low.c (linux_stop_lwp): New.
7483 * linux-low.h (linux_stop_lwp): Declare.
7485 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7486 argument instead of a i386_debug_reg_state.
7487 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7488 a i386_debug_reg_state.
7489 (i386_insert_aligned_watchpoint): Adjust.
7490 (i386_remove_aligned_watchpoint): Adjust.
7491 (i386_low_stopped_data_address): Read the debug registers from the
7492 inferior instead of from the mirrors.
7493 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7494 (i386_dr_low_get_addr): Declare.
7495 (i386_dr_low_get_control): Declare.
7496 (i386_dr_low_get_status): Change prototype.
7498 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7499 (i386_dr_low_get_addr): New.
7500 (i386_dr_low_get_control): New.
7501 (i386_dr_low_get_status): Adjust prototype. Return
7503 (i386_initial_stuff): Clear dr_status_mirror and
7505 (i386_get_thread_context): Adjust.
7506 (i386_set_thread_context): Adjust.
7507 (i386_thread_added): Adjust.
7509 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7511 * linux-low.h (linux_thread_area): Delete declaration.
7513 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7515 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7516 after its termination.
7518 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7520 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7521 (gdb_wants_all_stopped): Delete.
7522 (linux_wait_1): Don't call them.
7523 * server.c (handle_v_cont): Tag all threads as want-stopped.
7524 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7525 stopped as "client-wants-stopped".
7527 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7529 * Makefile.in (signals_h): New.
7530 (server_h): Depend on it.
7531 (server.o): Don't depend on $(signals_def).
7532 (signals.o): Depend on $(signals_def).
7534 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7536 * Makefile.in (signals_def): New.
7537 (server_h): Append include/gdb/signals.h and signals_def.
7538 (server.o): Append signals_def.
7540 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7542 * server.c (handle_target_event): Use target_signal_to_host for
7543 resume_info.sig initialization.
7544 * target.h (struct thread_resume) <sig>: New comment.
7546 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7548 * server.c (handle_query): strcpy() the returned string from paddress()
7549 instead of sprintf().
7550 * utils.c (paddress): Return phex_nz().
7552 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7554 * server.c (handle_v_cont): Call mourn_inferior if process
7556 (myresume): Likewise.
7558 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7560 Static tracepoints, and integration with UST.
7562 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7563 * mem-break.c (uninsert_all_breakpoints)
7564 (reinsert_all_breakpoints): New.
7565 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7566 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7567 (gdb_agent_ust_loaded, helper_thread_id)
7568 (gdb_agent_helper_thread_id): New macros.
7569 (struct ipa_sym_addresses): Add addr_ust_loaded,
7570 addr_helper_thread_id, addr_cmd_buf.
7571 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7572 (in_process_agent_loaded_ust): New.
7573 (write_e_ust_not_loaded): New.
7574 (maybe_write_ipa_ust_not_loaded): New.
7575 (struct collect_static_trace_data_action): New.
7576 (enum tracepoint_type) <static_tracepoint>: New.
7577 (struct tracepoint) <handle>: Mention static tracepoints.
7578 (struct static_tracepoint_ctx): New.
7579 (CMD_BUF_SIZE): New.
7580 (add_tracepoint_action): Handle static tracepoint actions.
7581 (unprobe_marker_at): New.
7582 (clear_installed_tracepoints): Handle static tracepoints.
7583 (cmd_qtdp): Handle static tracepoints.
7584 (probe_marker_at): New.
7585 (cmd_qtstart): Handle static tracepoints.
7586 (response_tracepoint): Handle static tracepoints.
7587 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7588 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7589 (get_context_regcache): Handle static tracepoints.
7590 (do_action_at_tracepoint): Handle static tracepoint actions.
7591 (traceframe_find_block_type): Handle static trace data blocks.
7592 (traceframe_read_sdata): New.
7593 (download_tracepoints): Download static tracepoint actions.
7594 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7595 (GDB_PROBE_NAME): New.
7600 (ust_marker_to_static_tracepoint): New.
7602 (collect_ust_data_at_tracepoint): New.
7603 (gdb_ust_probe): New.
7604 (UNIX_PATH_MAX, SOCK_DIR): New.
7605 (gdb_ust_connect_sync_socket): New.
7606 (resume_thread, stop_thread): New.
7607 (run_inferior_command): New.
7608 (init_named_socket): New.
7609 (gdb_ust_socket_init): New.
7610 (cstr_to_hexstr): New.
7612 (first_marker, next_marker): New.
7613 (response_ust_marker): New.
7614 (cmd_qtfstm, cmd_qtsstm): New.
7615 (unprobe_marker_at, probe_marker_at): New.
7616 (cmd_qtstmat, gdb_ust_thread): New.
7617 (gdb_ust_init): New.
7618 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7619 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7621 (x86_64_st_collect_regmap): New.
7622 (X86_64_NUM_ST_COLLECT_GREGS): New.
7623 (AMD64_RIP_REGNUM): New.
7624 (supply_static_tracepoint_registers): New.
7625 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7627 (i386_st_collect_regmap): New.
7628 (i386_NUM_ST_COLLECT_GREGS): New.
7629 (supply_static_tracepoint_registers): New.
7630 * server.c (handle_query): Handle qXfer:statictrace:read.
7631 <qSupported>: Report support for StaticTracepoints, and
7632 qXfer:statictrace:read features.
7633 * server.h (traceframe_read_sdata)
7634 (supply_static_tracepoint_registers): Declare.
7635 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7636 (unpack_varlen_hex): Include in IPA build.
7637 * Makefile.in (ustlibs, ustinc): New.
7638 (IPA_OBJS): Add remote-utils-ipa.o.
7639 ($(IPA_LIB)): Link -ldl and -lpthread.
7641 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7642 * config.in, configure: Regenerate.
7644 2010-06-20 Ian Lance Taylor <iant@google.com>
7645 Pedro Alves <pedro@codesourcery.com>
7647 * linux-x86-low.c (always_true): Delete.
7648 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7649 trying to fool the compiler with always_true.
7651 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7653 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7654 conditions in gdbserver.
7656 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7658 * spu-low.c (spu_read_memory): Wrap around local store limit.
7659 (spu_write_memory): Likewise.
7661 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7663 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7664 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7666 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7668 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7669 uses with LONGEST uses.
7671 2010-06-14 Stan Shebs <stan@codesourcery.com>
7672 Pedro Alves <pedro@codesourcery.com>
7676 * linux-x86-low.c: Include limits.h.
7681 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7682 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7683 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7684 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7685 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7686 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7687 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7688 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7689 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7690 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7691 (amd64_emit_void_call_2): New.
7692 (amd64_emit_ops): New.
7693 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7694 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7695 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7696 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7697 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7698 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7699 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7700 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7701 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7702 (i386_emit_stack_adjust, i386_emit_int_call_1)
7703 (i386_emit_void_call_2): New.
7704 (i386_emit_ops): New.
7705 (x86_emit_ops): New.
7706 (the_low_target): Install x86_emit_ops.
7707 * server.h (struct emit_ops): New.
7708 (get_raw_reg_func_addr): Declare.
7709 (current_insn_ptr, emit_error): Declare.
7710 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7711 (set_trace_state_variable_value): New defines.
7712 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7713 addr_get_trace_state_variable_value and
7714 addr_set_trace_state_variable_value.
7715 (symbol_list): New fields for get_raw_reg,
7716 get_trace_state_variable_value and set_trace_state_variable_value.
7717 (condfn): New typedef.
7718 (struct tracepoint): New field `compiled_cond'.
7719 (do_action_at_tracepoint): Clear compiled_cond.
7720 (get_trace_state_variable_value, set_trace_state_variable_value):
7722 (condition_true_at_tracepoint): If there's a compiled condition,
7724 (current_insn_ptr, emit_error): New globals.
7725 (struct bytecode_address): New.
7726 (get_raw_reg_func_addr): New.
7727 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7728 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7729 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7730 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7731 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7732 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7733 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7734 (compile_tracepoint_condition, compile_bytecodes): New.
7735 * target.h (emit_ops): Forward declare.
7736 (struct target_ops): New field emit_ops.
7737 (target_emit_ops): New.
7738 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7739 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7740 * linux-low.c (linux_emit_ops): New.
7741 (linux_target_ops): Install it.
7742 * linux-low.h (struct linux_target_ops): New field emit_ops.
7744 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7746 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7747 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7749 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7750 Stan Shebs <stan@codesourcery.com>
7752 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7753 (all): Depend on $(extra_libraries).
7754 (install-only): Install the IPA.
7755 (IPA_OBJS, IPA_LIB): New.
7756 (clean): Remove the IPA lib.
7757 (IPAGENT_CFLAGS): New.
7758 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7759 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7760 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7761 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7762 * configure.ac: Check for atomic builtins support in the compiler.
7763 (IPA_DEPFILES, extra_libraries): Define.
7764 * configure.srv (ipa_obj): Add description.
7765 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7766 (i[34567]86-*-linux*): Set ipa_obj.
7767 (x86_64-*-linux*): Set ipa_obj.
7768 * linux-low.c (stabilizing_threads): New.
7769 (supports_fast_tracepoints): New.
7770 (linux_detach): Stabilize threads before detaching.
7771 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7772 the lwp is either not stabilizing, or is moving out of a jump pad.
7773 (linux_fast_tracepoint_collecting): New.
7774 (maybe_move_out_of_jump_pad): New.
7775 (enqueue_one_deferred_signal): New.
7776 (dequeue_one_deferred_signal): New.
7777 (linux_wait_for_event_1): If moving out of a jump pad, defer
7778 pending signals to later.
7779 (linux_stabilize_threads): New.
7780 (linux_wait_1): Check if threads need moving out of jump pads, and
7782 (stuck_in_jump_pad_callback): New.
7783 (move_out_of_jump_pad_callback): New.
7785 (linux_resume_one_lwp): Handle moving out of jump pads.
7786 (linux_set_resume_request): Dequeue deferred signals.
7787 (need_step_over_p): Also step over fast tracepoint jumps.
7788 (start_step_over): Also uninsert fast tracepoint jumps.
7789 (finish_step_over): Also reinsert fast tracepoint jumps.
7790 (linux_install_fast_tracepoint_jump): New.
7791 (linux_target_ops): Install linux_stabilize_threads and
7792 linux_install_fast_tracepoint_jump_pad.
7793 * linux-low.h (linux_target_ops) <get_thread_area,
7794 install_fast_tracepoint_jump_pad>: New fields.
7795 (struct lwp_info) <collecting_fast_tracepoint,
7796 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7797 (linux_get_thread_area): Declare.
7798 * linux-x86-low.c (jump_insn): New.
7799 (x86_get_thread_area): New.
7800 (append_insns): New.
7802 (amd64_install_fast_tracepoint_jump_pad): New.
7803 (i386_install_fast_tracepoint_jump_pad): New.
7804 (x86_install_fast_tracepoint_jump_pad): New.
7805 (the_low_target): Install x86_get_thread_area and
7806 x86_install_fast_tracepoint_jump_pad.
7807 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7808 (struct fast_tracepoint_jump): New.
7809 (fast_tracepoint_jump_insn): New.
7810 (fast_tracepoint_jump_shadow): New.
7811 (find_fast_tracepoint_jump_at): New.
7812 (fast_tracepoint_jump_here): New.
7813 (delete_fast_tracepoint_jump): New.
7814 (set_fast_tracepoint_jump): New.
7815 (uninsert_fast_tracepoint_jumps_at): New.
7816 (reinsert_fast_tracepoint_jumps_at): New.
7817 (set_breakpoint_at): Use write_inferior_memory.
7818 (uninsert_raw_breakpoint): Use write_inferior_memory.
7819 (check_mem_read): Mask out fast tracepoint jumps.
7820 (check_mem_write): Mask out fast tracepoint jumps.
7821 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7822 (set_fast_tracepoint_jump): Declare.
7823 (delete_fast_tracepoint_jump)
7824 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7825 (reinsert_fast_tracepoint_jumps_at): Declare.
7826 * regcache.c: Don't compile many functions when building the
7827 in-process agent library.
7828 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7829 the register buffer in the heap.
7830 (free_register_cache): If the register buffer isn't owned by the
7831 regcache, don't free it.
7832 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7833 pre-existing register caches.
7834 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7836 (convert_ascii_to_int): : Constify `from' parameter type.
7837 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7838 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7839 the needed buffer in-place.
7840 (relocate_instruction): New.
7841 * server.c (handle_query) <qSymbols>: If the target supports
7842 tracepoints, give it a chance of looking up symbols. Report
7843 support for fast tracepoints.
7844 (handle_status): Stabilize threads.
7845 (process_serial_event): Adjust.
7846 * server.h (struct fast_tracepoint_jump): Forward declare.
7847 (struct process_info) <fast_tracepoint_jumps>: New field.
7848 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7849 (decode_X_packet, decode_M_packet): Adjust.
7850 (relocate_instruction): Declare.
7851 (in_process_agent_loaded): Declare.
7852 (tracepoint_look_up_symbols): Declare.
7853 (struct fast_tpoint_collect_status): Declare.
7854 (fast_tracepoint_collecting): Declare.
7855 (force_unlock_trace_buffer): Declare.
7856 (handle_tracepoint_bkpts): Declare.
7857 (initialize_low_tracepoint)
7858 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7859 * target.h (struct target_ops) <stabilize_threads,
7860 install_fast_tracepoint_jump_pad>: New fields.
7861 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7862 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7863 [HAVE_STDINT_H]: Include stdint.h.
7864 (trace_debug_1): Rename to ...
7865 (trace_vdebug): ... this.
7866 (trace_debug): Rename to ...
7867 (trace_debug_1): ... this. Add `level' parameter.
7869 (ATTR_USED, ATTR_NOINLINE): New.
7870 (IP_AGENT_EXPORT): New.
7871 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7872 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7873 (about_to_request_buffer_space, trace_buffer_is_full)
7874 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7875 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7876 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7877 (traceframe_write_count, traceframes_created)
7878 (trace_state_variables)
7879 New renaming defines.
7880 (struct ipa_sym_addresses): New.
7881 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7883 (ipa_sym_addrs): New.
7884 (all_tracepoint_symbols_looked_up): New.
7885 (in_process_agent_loaded): New.
7886 (write_e_ipa_not_loaded): New.
7887 (maybe_write_ipa_not_loaded): New.
7888 (tracepoint_look_up_symbols): New.
7889 (debug_threads) [IN_PROCESS_AGENT]: New.
7890 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7891 (UNKNOWN_SIDE_EFFECTS): New.
7892 (stop_tracing): New.
7893 (flush_trace_buffer): New.
7894 (stop_tracing_bkpt): New.
7895 (flush_trace_buffer_bkpt): New.
7896 (read_inferior_integer): New.
7897 (read_inferior_uinteger): New.
7898 (read_inferior_data_pointer): New.
7899 (write_inferior_data_pointer): New.
7900 (write_inferior_integer): New.
7901 (write_inferior_uinteger): New.
7902 (struct collect_static_trace_data_action): Delete.
7903 (enum tracepoint_type): New.
7904 (struct tracepoint) <type>: New field `type'.
7905 <actions_str, step_actions, step_actions_str>: Only include in
7907 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7908 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7909 (tracepoints): Use IP_AGENT_EXPORT.
7910 (last_tracepoint): Don't include in the IPA.
7911 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7912 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7913 (alloced_trace_state_variables): New.
7914 (trace_state_variables): Use IP_AGENT_EXPORT.
7915 (traceframe_t): Delete unused variable.
7916 (circular_trace_buffer): Don't include in the IPA.
7917 (trace_buffer_start): Delete.
7918 (struct trace_buffer_control): New.
7919 (trace_buffer_free): Delete.
7920 (struct ipa_trace_buffer_control): New.
7921 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7922 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7924 (trace_buffer_ctrl): New.
7925 (TRACE_BUFFER_CTRL_CURR): New.
7926 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7927 Reimplement as macros.
7928 (trace_buffer_wrap): Delete.
7929 (traceframe_write_count, traceframe_read_count)
7930 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7931 (struct tracepoint_hit_ctx) <type>: New field.
7932 (struct fast_tracepoint_ctx): New.
7933 (memory_barrier): New.
7935 (record_tracepoint_error): Update atomically in the IPA.
7936 (clear_inferior_trace_buffer): New.
7937 (about_to_request_buffer_space): New.
7938 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7939 updating the same buffer.
7940 (add_tracepoint): Default the tracepoint's type to trap
7941 tracepoint, and orig_size to -1.
7942 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7944 (create_trace_state_variable): New parameter `gdb'. Handle it.
7945 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7946 (cmd_qtdp): Handle fast tracepoints.
7948 (max_jump_pad_size): New.
7949 (gdb_jump_pad_head): New.
7950 (get_jump_space_head): New.
7951 (claim_jump_space): New.
7952 (sort_tracepoints): New.
7953 (MAX_JUMP_SIZE): New.
7954 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7956 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7957 support. Upload fast traceframes, and delete internal IPA
7959 (stop_tracing_handler): New.
7960 (flush_trace_buffer_handler): New.
7961 (cmd_qtstop): Upload fast tracepoints.
7962 (response_tracepoint): Handle fast tracepoints.
7963 (tracepoint_finished_step): Upload fast traceframes. Set the
7964 tracepoint hit context's tracepoint type.
7965 (handle_tracepoint_bkpts): New.
7966 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7967 type. Add comment about fast tracepoints.
7968 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7969 non-existing action_str field.
7970 (get_context_regcache): Handle fast tracepoints.
7971 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7973 (fast_tracepoint_from_jump_pad_address): New.
7974 (fast_tracepoint_from_ipa_tpoint_address): New.
7975 (collecting_t): New.
7976 (force_unlock_trace_buffer): New.
7977 (fast_tracepoint_collecting): New.
7980 (write_inferior_data_ptr): New.
7981 (target_tp_heap): New.
7982 (target_malloc): New.
7983 (download_agent_expr): New.
7985 (download_tracepoints): New.
7986 (download_trace_state_variables): New.
7987 (upload_fast_traceframes): New.
7988 (IPA_FIRST_TRACEFRAME): New.
7989 (IPA_NEXT_TRACEFRAME_1): New.
7990 (IPA_NEXT_TRACEFRAME): New.
7991 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7992 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7993 (gdb_jump_pad_buffer_end): New.
7994 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7995 (initialize_tracepoint): Adjust.
7996 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7997 buffer. Initialize the low module.
7998 * utils.c (PREFIX, TOOLNAME): New.
7999 (malloc_failure): Use PREFIX.
8000 (error): In the IPA, an error causes an exit.
8001 (fatal, warning): Use PREFIX.
8002 (internal_error): Use TOOLNAME.
8003 (NUMCELLS): Increase to 10.
8004 * configure, config.in: Regenerate.
8006 2010-06-01 Pedro Alves <pedro@codesourcery.com>
8008 * server.c (handle_query) <qSupported>: Do two passes over the
8009 qSupported string to avoid nesting strtok.
8011 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8013 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
8015 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
8017 * configure: Regenerate.
8018 * proc-service.list: New.
8020 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
8022 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
8025 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
8027 * gdbreplay.c (remote_open): Check error return from socket() call by
8028 its equality to -1 not by it being negative.
8029 * remote-utils.c (remote_open): Likewise.
8031 2010-05-23 Pedro Alves <pedro@codesourcery.com>
8033 * config.h: Regenerate.
8035 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8037 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
8038 doesn't provide PTRACE_GET_THREAD_AREA.
8040 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
8042 * linux-m68k-low.c: Include <asm/ptrace.h>
8043 (ps_get_thread_area): Implement.
8045 2010-05-03 Doug Evans <dje@google.com>
8047 * event-loop.c (struct callback_event): New struct.
8048 (callback_list): New global.
8049 (append_callback_event, delete_callback_event): New functions.
8050 (process_callback): New function.
8051 (start_event_loop): Call it.
8052 * remote-utils.c (NOT_SCHEDULED): Define.
8053 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
8054 moved out of readchar.
8055 (readchar): Rewrite. Call reschedule before returning.
8056 (reset_readchar): New function.
8057 (remote_close): Call it.
8058 (process_remaining, reschedule): New functions.
8059 * server.h (callback_handler_func): New typedef.
8060 (append_callback_event, delete_callback_event): Declare.
8062 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8064 * proc-service.c (ps_pglobal_lookup): Use
8065 thread_db_look_up_one_symbol.
8066 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
8067 parameter. Use it instead of all_symbols_looked_up.
8068 * server.h (struct process_info) <all_symbols_looked_up>: Delete
8070 (all_symbols_looked_up): Don't declare.
8071 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
8072 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
8074 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
8075 Set all_symbols_looked_up here.
8076 (thread_db_look_up_one_symbol): New.
8077 (thread_db_get_tls_address): Adjust.
8078 (thread_db_load_search, try_thread_db_load_1): Always allocate the
8079 thread_db object on the heap, and tentatively set it in the
8081 (thread_db_init): Don't set all_symbols_looked_up here.
8082 * linux-low.h (thread_db_look_up_one_symbol): Declare.
8084 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8086 * linux-low.c (linux_kill, linux_detach): Adjust.
8087 (status_pending_p_callback): Remove redundant statement. Check
8088 for !TARGET_WAITIKIND_IGNORE, instead of
8089 TARGET_WAITKIND_STOPPED.
8090 (handle_tracepoints): Make sure LWP is locked. Adjust.
8091 (linux_wait_for_event_1): Adjust.
8092 (linux_cancel_breakpoints): New.
8093 (unsuspend_one_lwp): New.
8094 (unsuspend_all_lwps): New.
8095 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
8096 (send_sigstop_callback): Change return type to int, add new
8097 `except' parameter and handle it.
8098 (suspend_and_send_sigstop_callback): New.
8099 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
8100 pass them down. If SUSPEND, also increment the lwp's suspend
8102 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
8103 (need_step_over_p): Don't consider suspended LWPs.
8104 (start_step_over): Adjust.
8105 (proceed_one_lwp): Change return type to int, add new `except'
8106 parameter and handle it.
8107 (unsuspend_and_proceed_one_lwp): New.
8108 (proceed_all_lwps): Use find_inferior instead of
8110 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
8111 also decrement the suspend count of LWPs. Pass `except' down,
8112 instead of hacking its suspend count.
8113 (linux_pause_all): Add `freeze' parameter. Adjust.
8114 (linux_unpause_all): New.
8115 (linux_target_ops): Install linux_unpause_all.
8116 * server.c (handle_status): Adjust.
8117 * target.h (struct target_ops): New fields `unpause_all' and
8118 `cancel_breakpoints'. Add new parameter to `pause_all'.
8119 (pause_all): Add new `freeze' parameter.
8121 (cancel_breakpoints): New.
8122 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
8124 (cmd_qtstart): Pause threads.
8125 (stop_tracing): Pause threads, and cancel breakpoints.
8126 * win32-low.c (win32_target_ops): Adjust.
8128 2010-05-03 Pedro Alves <pedro@codesourcery.com>
8130 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
8131 the inferior right away from here...
8132 (linux_wait_1): ... to here, and adjust to check the thread's
8133 last_resume_kind instead of the lwp's step or stop_expected flags.
8135 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8137 * README: Use consistent `GDB' and `GDBserver' spellings.
8139 2010-05-02 Pedro Alves <pedro@codesourcery.com>
8141 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
8142 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
8143 (linux_detach_one_lwp): Assume the lwp is stopped.
8144 (any_thread_of): Delete.
8145 (linux_detach): Stop all lwps here. Don't blindly delete all
8147 (delete_lwp_callback): New.
8148 (linux_mourn): Delete all lwps of the process that is gone.
8149 (linux_wait_1): Don't delete the last lwp of the process here.
8150 * mem-break.h (mark_breakpoints_out): Declare.
8151 * mem-break.c (mark_breakpoints_out): New.
8152 (free_all_breakpoints): Use it.
8153 * server.c (handle_target_event): If the process is gone, mark
8155 * thread-db.c (struct thread_db) <create_bp>: New field.
8156 (thread_db_enable_reporting): Fix prototype. Store a thread event
8157 breakpoint reference in the thread_db struct.
8158 (thread_db_load_search): Clear the thread_db object.
8159 (try_thread_db_load_1): Ditto.
8160 (switch_to_process): New.
8161 (disable_thread_event_reporting): Use it.
8162 (remove_thread_event_breakpoints): New.
8163 (thread_db_detach, thread_db_mourn): Use it.
8165 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8167 * linux-low.c (linux_enable_event_reporting): New.
8168 (linux_wait_for_event_1, handle_extended_wait): Use it.
8170 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8172 * linux-low.c (linux_kill_one_lwp, linux_kill)
8173 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8174 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8175 SIGSTOP even if the LWP is stopped.
8176 (send_sigstop_callback): New.
8177 (stop_all_lwps): Use send_sigstop_callback instead.
8178 (linux_resume_one_thread): Adjust.
8179 (proceed_one_lwp): Still proceed an LWP that the client has
8180 requested to stop, if we haven't reported it as stopped yet. Make
8181 sure that LWPs the client want stopped, have a pending SIGSTOP.
8183 2010-04-26 Doug Evans <dje@google.com>
8185 * server.c (handle_general_set): Make static.
8187 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8188 Print received char after testing for error/eof instead of before.
8189 (input_interrupt): Tweak comment.
8191 2010-04-23 Doug Evans <dje@google.com>
8193 * server.c (start_inferior): Print inferior argv if --debug.
8195 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8197 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8198 * nto-x86-low.c: Include server.h
8200 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8202 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8203 be consistent with other sources of this directory.
8204 (init_registers_amd64): Correct name of source file of this function
8207 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8209 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8212 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8214 * win32-i386-low.c: Add 64-bit support.
8215 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8216 (init_registers_amd64): Declare.
8217 (mappings): Add 64-bit version of array.
8218 (init_windows_x86): New function.
8219 (the_low_target): Change init_arch field to init_windows_x86.
8221 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8223 * win32-low.c: Adapt to support also 64-bit architecture.
8224 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8225 (get_image_name): Use SIZE_T type for local variable `done'.
8226 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8227 (toolhelp_get_dll_name): Idem.
8228 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8229 Use uintptr_t typecast to avoid warning.
8230 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8231 (handle_exception): Use phex_nz to avoid warning.
8232 (win32_wait): Remove unused local variable `process'.
8234 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8236 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8239 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8241 * configure.ac: Use `ws2_32' library for srv_mingw.
8242 * configure: Regenerate.
8243 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8244 * remote-utils.c: Likewise.
8246 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8248 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8249 if __x86_64__ is defined.
8251 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8253 * configure: Regenerate.
8255 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8257 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8258 * target.h (target_ops): New get_tib_address field.
8259 * win32-low.h (win32_thread_info): Add thread_local_base field.
8260 * win32-low.c (child_add_thread): Add tlb argument.
8261 Set thread_local_base field to TLB.
8262 (get_child_debug_event): Adapt to child_add_thread change.
8263 (win32_get_tib_address): New function.
8264 (win32_target_ops): Set get_tib_address field to
8265 win32_get_tib_address.
8266 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8268 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8270 * linux-low.c (linux_mourn): Also remove the process.
8271 * server.c (handle_target_event): Don't remove the process here.
8272 * nto-low.c (nto_mourn): New.
8273 (nto_target_ops): Install it.
8274 * spu-low.c (spu_mourn): New.
8275 (spu_target_ops): Install it.
8276 * win32-low.c (win32_mourn): New.
8277 (win32_target_ops): Install it.
8279 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8281 * server.h (buffer_xml_printf): Remove redundant `;'.
8283 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8285 * regcache.c (set_register_cache): Invalidate regcaches before
8286 changing the register cache layout.
8287 (regcache_invalidate_one): Allow a NULL regcache.
8288 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8289 regcaches before changing the register cache layout or the target
8292 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8294 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8295 variable warning on Linux/x86-64.
8297 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8299 GDBserver disconnected tracing support.
8301 * linux-low.c (linux_remove_process): Delete.
8302 (add_lwp): Don't set last_resume_kind here.
8303 (linux_kill): Use `mourn'.
8304 (linux_detach): Use `thread_db_detach', and `mourn'.
8306 (linux_attach_lwp_1): Adjust comment.
8307 (linux_attach): last_resume_kind moved the thread_info; adjust.
8308 (status_pending_p_callback): Adjust.
8309 (linux_wait_for_event_1): Adjust.
8310 (count_events_callback, select_singlestep_lwp_callback)
8311 (select_event_lwp_callback, cancel_breakpoints_callback)
8312 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8313 (proceed_one_lwp): Adjust.
8314 (linux_async): Add debug output.
8315 (linux_thread_stopped): New.
8316 (linux_pause_all): New.
8317 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8319 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8320 (thread_db_free): Delete declaration.
8321 (thread_db_detach, thread_db_mourn): Declare.
8322 * thread-db.c (thread_db_init): Use thread_db_mourn.
8323 (thread_db_free): Delete, split in two.
8324 (disable_thread_event_reporting): New.
8325 (thread_db_detach): New.
8326 (thread_db_mourn): New.
8328 * server.h (struct thread_info) <last_resume_kind>: New field.
8329 <attached>: Add comment.
8330 <gdb_detached>: New field.
8331 (handler_func): Change return type to int.
8332 (handle_serial_event, handle_target_event): Ditto.
8333 (gdb_connected): Declare.
8335 (disconnected_tracing): Declare.
8336 (stop_tracing): Declare.
8338 * server.c (handle_query) <qSupported>: Report support for
8339 disconnected tracing.
8340 (queue_stop_reply_callback): Account for running threads.
8341 (gdb_wants_thread_stopped): New.
8342 (gdb_wants_all_threads_stopped): New.
8343 (gdb_reattached_process): New.
8344 (handle_status): Clear the `gdb_detached' flag of all processes.
8345 In all-stop, stop all threads.
8346 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8347 (process_serial_event): If the remote connection breaks, or if an
8348 exit was forced with "monitor exit", force an event loop exit.
8349 Handle disconnected tracing on detach.
8350 (handle_serial_event): Adjust.
8351 (handle_target_event): If GDB isn't connected, forward events back
8352 to the inferior, unless the last process exited, in which case,
8353 exit gdbserver. Adjust interface.
8355 * remote-utils.c (remote_open): Don't block in accept. Instead
8356 register an event loop source on the listen socket file
8357 descriptor. Refactor bits into ...
8358 (listen_desc): ... this new global.
8359 (gdb_connected): ... this new function.
8360 (enable_async_notification): ... this new function.
8361 (handle_accept_event): ... this new function.
8362 (remote_close): Clear remote_desc.
8364 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8366 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8368 (mourn_inferior): Define.
8369 (target_process_qsupported): Avoid the dangling else problem.
8370 (thread_stopped): Define.
8371 (pause_all): Define.
8372 (target_waitstatus_to_string): Declare.
8373 * target.c (target_waitstatus_to_string): New.
8375 * tracepoint.c (tracing): Make extern.
8376 (disconnected_tracing): New.
8377 (stop_tracing): Make extern. Handle tracing stops due to GDB
8379 (cmd_qtdisconnected): New.
8380 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8381 (handle_tracepoint_general_set): Handle QTDisconnected.
8383 * event-loop.c (event_handler_func): Change return type to int.
8384 (process_event): Bail out if the event handler wants the event
8386 (handle_file_event): Ditto.
8387 (start_event_loop): Bail out if the event handler wants the event
8390 * nto-low.c (nto_target_ops): Adjust.
8391 * spu-low.c (spu_wait): Don't remove the process here.
8392 (spu_target_ops): Adjust.
8393 * win32-low.c (win32_wait): Don't remove the process here.
8394 (win32_target_ops): Adjust.
8396 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8398 * regcache.c (realloc_register_cache): Invalidate inferior's
8399 regcache before recreating it.
8401 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8403 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8405 2010-04-09 Stan Shebs <stan@codesourcery.com>
8406 Pedro Alves <pedro@codesourcery.com>
8408 * server.h (LONGEST): New.
8409 (struct thread_info) <while_stepping>: New field.
8410 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8412 (initialize_tracepoint, handle_tracepoint_general_set)
8413 (handle_tracepoint_query, tracepoint_finished_step)
8414 (tracepoint_was_hit, release_while_stepping_state_list):
8415 (current_traceframe): Declare.
8416 * server.c (handle_general_set): Handle tracepoint packets.
8418 (write_memory): New.
8419 (handle_search_memory_1): Use read_memory.
8420 (handle_query): Report support for conditional tracepoints, trace
8421 state variables, and tracepoint sources. Handle tracepoint
8423 (main): Initialize the tracepoints module.
8424 (process_serial_event): Handle traceframe reads/writes.
8426 * linux-low.c (handle_tracepoints): New.
8427 (linux_wait_1): Call it.
8428 (linux_resume_one_lwp): Handle while-stepping.
8429 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8430 (linux_target_ops): Install them.
8431 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8433 * linux-x86-low.c (x86_supports_tracepoints): New.
8434 (the_low_target). Install it.
8436 * mem-break.h (delete_breakpoint): Declare.
8437 * mem-break.c (delete_breakpoint): Make external.
8439 * target.h (struct target_ops): Add `supports_tracepoints',
8440 `read_pc', and `write_pc' fields.
8441 (target_supports_tracepoints): Define.
8442 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8445 * regcache.h (struct regcache) <registers_owned>: New field.
8446 (init_register_cache, regcache_cpy): Declare.
8447 (regcache_read_pc, regcache_write_pc): Declare.
8448 (register_cache_size): Declare.
8449 (supply_regblock): Declare.
8450 * regcache.c (init_register_cache): New.
8451 (new_register_cache): Use it.
8452 (regcache_cpy): New.
8453 (register_cache_size): New.
8454 (supply_regblock): New.
8455 (regcache_read_pc, regcache_write_pc): New.
8457 * tracepoint.c: New.
8459 * Makefile.in (OBS): Add tracepoint.o.
8460 (tracepoint.o): New rule.
8462 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8464 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8466 (i386-mmx.c): Likewise.
8467 (i386-mmx-linux.o): Likewise.
8468 (i386-mmx-linux.c): Likewise.
8470 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8471 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8472 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8473 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8475 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8476 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8477 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8479 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8481 * Makefile.in (clean): Updated.
8483 (i386-avx.c): Likewise.
8484 (i386-avx-linux.o): Likewise.
8485 (i386-avx-linux.c): Likewise.
8486 (amd64-avx.o): Likewise.
8487 (amd64-avx.c): Likewise.
8488 (amd64-avx-linux.o): Likewise.
8489 (amd64-avx-linux.c): Likewise.
8491 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8492 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8493 (srv_amd64_regobj): Add amd64-avx.o.
8494 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8495 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8496 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8497 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8498 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8499 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8500 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8502 * i387-fp.c: Include "i386-xstate.h".
8504 (i387_cache_to_xsave): Likewise.
8505 (i387_xsave_to_cache): Likewise.
8506 (x86_xcr0): Likewise.
8508 * i387-fp.h (i387_cache_to_xsave): Likewise.
8509 (i387_xsave_to_cache): Likewise.
8510 (x86_xcr0): Likewise.
8512 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8513 * linux-crisv32-low.c (target_regsets): Likewise.
8514 * linux-m68k-low.c (target_regsets): Likewise.
8515 * linux-mips-low.c (target_regsets): Likewise.
8516 * linux-ppc-low.c (target_regsets): Likewise.
8517 * linux-s390-low.c (target_regsets): Likewise.
8518 * linux-sh-low.c (target_regsets): Likewise.
8519 * linux-sparc-low.c (target_regsets): Likewise.
8520 * linux-xtensa-low.c (target_regsets): Likewise.
8522 * linux-low.c: Include <sys/uio.h>.
8523 (regsets_fetch_inferior_registers): Support nt_type.
8524 (regsets_store_inferior_registers): Likewise.
8525 (linux_process_qsupported): New.
8526 (linux_target_ops): Add linux_process_qsupported.
8528 * linux-low.h (regset_info): Add nt_type.
8529 (linux_target_ops): Add process_qsupported.
8531 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8533 (init_registers_i386_avx_linux): New.
8534 (init_registers_amd64_avx_linux): Likewise.
8535 (xmltarget_i386_linux_no_xml): Likewise.
8536 (xmltarget_amd64_linux_no_xml): Likewise.
8537 (PTRACE_GETREGSET): Likewise.
8538 (PTRACE_SETREGSET): Likewise.
8539 (x86_fill_xstateregset): Likewise.
8540 (x86_store_xstateregset): Likewise.
8541 (use_xml): Likewise.
8542 (x86_linux_update_xmltarget): Likewise.
8543 (x86_linux_process_qsupported): Likewise.
8544 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8545 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8546 init_registers_i386_linux here. Call
8547 x86_linux_update_xmltarget.
8548 (the_low_target): Add x86_linux_process_qsupported.
8550 * server.c (handle_query): Call target_process_qsupported.
8552 * target.h (target_ops): Add process_qsupported.
8553 (target_process_qsupported): New.
8555 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8557 * inferiors.c (add_thread): Set last_status kind to
8558 TARGET_WAITKIND_IGNORE.
8559 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8560 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8561 (linux_wait_1): Move `thread' local definition to block that uses
8562 it. Don't NULL initialize `event_child'.
8563 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8564 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8565 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8567 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8569 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8570 an extended waitstatus, or by a watchpoint.
8571 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8572 thread was stepping or has been stopped by a watchpoint.
8574 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8576 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8577 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8578 of another, then delete the previous, and validate all
8580 (validate_inserted_breakpoint): New.
8581 (delete_disabled_breakpoints): New.
8582 (validate_breakpoints): New.
8583 (check_mem_read): Validate breakpoints before trusting their
8584 shadow. Delete disabled breakpoints.
8585 (check_mem_write): Validate breakpoints before trusting they
8586 should be inserted. Delete disabled breakpoints.
8587 * mem-break.h (validate_breakpoints):
8588 * server.c (handle_query): Validate breakpoints when we see a
8591 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8593 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8594 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8595 if we could tell there's a GDB breakpoint at stop_pc.
8596 (need_step_over_p): Don't do a step over if we find a GDB
8597 breakpoint at the resume PC.
8599 * mem-break.c (struct raw_breakpoint): New.
8600 (enum bkpt_type): New type `gdb_breakpoint'.
8601 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8602 fields. New field `raw'.
8603 (find_raw_breakpoint_at): New.
8604 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8606 (set_breakpoint_at): Adjust.
8607 (delete_raw_breakpoint): New.
8608 (release_breakpoint): New.
8609 (delete_breakpoint): Rename to...
8610 (delete_breakpoint_1): ... this. Add proc parameter. Use
8611 release_breakpoint. Return ENOENT.
8612 (delete_breakpoint): Reimplement.
8613 (find_breakpoint_at): Delete.
8614 (find_gdb_breakpoint_at): New.
8615 (delete_breakpoint_at): Delete.
8616 (set_gdb_breakpoint_at): New.
8617 (delete_gdb_breakpoint_at): New.
8618 (gdb_breakpoint_here): New.
8619 (set_reinsert_breakpoint): Use release_breakpoint.
8620 (uninsert_breakpoint): Rename to ...
8621 (uninsert_raw_breakpoint): ... this.
8622 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8623 (reinsert_raw_breakpoint): Change parameter type to
8625 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8627 (check_breakpoints): Adjust. Use release_breakpoint.
8628 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8629 (breakpoint_inserted_here): Ditto.
8630 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8631 Don't trust the breakpoint's shadow if it is not inserted.
8632 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8633 (delete_all_breakpoints): Adjust.
8634 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8635 use delete_breakpoint_1.
8637 * mem-break.h (breakpoints_supported): Delete declaration.
8638 (set_gdb_breakpoint_at): Declare.
8639 (gdb_breakpoint_here): Declare.
8640 (delete_breakpoint_at): Delete.
8641 (delete_gdb_breakpoint_at): Declare.
8643 * server.h (struct raw_breakpoint): Forward declare.
8644 (struct process_info): New field `raw_breakpoints'.
8646 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8649 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8651 * linux-low.c (status_pending_p_callback): Fix comment.
8652 (linux_wait_for_event_1): Move most of the internal breakpoint
8653 handling from here...
8654 (linux_wait_1): ... to here.
8655 (count_events_callback): New.
8656 (select_singlestep_lwp_callback): New.
8657 (select_event_lwp_callback): New.
8658 (cancel_breakpoints_callback): New.
8659 (select_event_lwp): New.
8660 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8661 priority to all LWPs that have had events that should be reported
8662 to the client. Cancel breakpoints when about to reporting the
8663 event to the client, not while stopping lwps. No longer cancel
8664 finished single-steps here.
8665 (cancel_finished_single_step): Delete.
8666 (cancel_finished_single_steps): Delete.
8668 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8670 * mem-break.c (enum bkpt_type): New.
8671 (struct breakpoint): New field `type'.
8672 (set_breakpoint_at): Change return type to struct breakpoint
8673 pointer. Set type to `other_breakpoint' by default.
8674 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8675 in the breakpoint list.
8676 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8677 (reinsert_breakpoint): Rename to ...
8678 (reinsert_raw_breakpoint): ... this.
8679 (reinsert_breakpoints_at): Adjust.
8680 * mem-break.h (struct breakpoint): Declare.
8681 (set_breakpoint_at): Change return type to struct breakpoint
8684 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8686 * server.c (handle_query): Assign, not compare.
8688 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8690 Teach linux gdbserver to step-over-breakpoints.
8692 * linux-low.c (can_hardware_single_step): New.
8693 (supports_breakpoints): New.
8694 (handle_extended_wait): If stopping threads, read the stop pc of
8697 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8698 low target doesn't support retrieving the PC.
8699 (add_lwp): Set last_resume_kind to resume_continue.
8700 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8701 (linux_attach): Don't clear stop_expected. Set the lwp's
8702 last_resume_kind to resume_stop.
8703 (linux_detach_one_lwp): Don't check for removed breakpoints.
8704 (check_removed_breakpoint): Delete.
8705 (status_pending_p): Rename to ...
8706 (status_pending_p_callback): ... this. Don't check for removed
8707 breakpoints. Don't consider threads that are stopped from GDB's
8709 (linux_wait_for_lwp): Always read the stop_pc here.
8710 (cancel_breakpoint): New.
8711 (step_over_bkpt): New global.
8712 (linux_wait_for_event_1): Implement stepping over breakpoints.
8713 (gdb_wants_lwp_stopped): New.
8714 (gdb_wants_all_stopped): New.
8715 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8716 single-step traps here. Store the thread's last reported target
8718 (send_sigstop): Don't clear stop_expected. Always set it,
8720 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8721 (cancel_finished_single_step): New.
8722 (cancel_finished_single_steps): New.
8723 (wait_for_sigstop): Don't cancel finished single-step traps here.
8724 (linux_resume_one_lwp): Don't check for removed breakpoints.
8725 Don't set `step' on non-hardware step archs.
8726 (linux_set_resume_request): Ignore resume_stop requests if already
8727 stopping or stopped. Set the lwp's last_resume_kind.
8728 (resume_status_pending_p): Don't check for removed breakpoints.
8729 (need_step_over_p): New.
8730 (start_step_over): New.
8731 (finish_step_over): New.
8732 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8733 requests. Clear the thread's last reported target waitstatus.
8734 Don't use the `suspended' flag. Don't consider pending breakpoints.
8735 (linux_resume): Start a step-over if necessary.
8736 (proceed_one_lwp): New.
8737 (proceed_all_lwps): New.
8738 (unstop_all_lwps): New.
8739 * linux-low.h (struct lwp_info): Rewrite comment for the
8740 `suspended' flag. Add the `stop_pc' field. Delete the
8741 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8742 Add `'last_resume_kind' and `need_step_over' fields.
8743 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8744 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8745 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8746 (set_raw_breakpoint_at): New.
8747 (set_breakpoint_at): Rewrite to use it.
8748 (reinsert_breakpoint_handler): Delete.
8749 (set_reinsert_breakpoint): New.
8750 (reinsert_breakpoint_by_bp): Delete.
8751 (delete_reinsert_breakpoints): New.
8752 (uninsert_breakpoint): Rewrite.
8753 (uninsert_breakpoints_at): New.
8754 (reinsert_breakpoint): Rewrite.
8755 (reinsert_breakpoints_at): New.
8756 (check_breakpoints): Rewrite.
8757 (breakpoint_here): New.
8758 (breakpoint_inserted_here): New.
8759 (check_mem_read): Adjust.
8760 * mem-break.h (breakpoints_supported, breakpoint_here)
8761 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8762 (reinsert_breakpoint_by_bp): Delete declaration.
8763 (delete_reinsert_breakpoints): Declare.
8764 (reinsert_breakpoint): Delete declaration.
8765 (reinsert_breakpoints_at): Declare.
8766 (uninsert_breakpoint): Delete declaration.
8767 (uninsert_breakpoints_at): Declare.
8768 (check_breakpoints): Adjust prototype.
8769 * server.h: Adjust include order.
8770 (struct thread_info): Declare here. Add a `last_status' field.
8772 2010-03-23 Michael Snyder <msnyder@vmware.com>
8774 * server.c (crc32): New function.
8775 (handle_query): Add handling for 'qCRC:' request.
8777 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8779 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8780 lwp had been stopped by a watchpoint.
8782 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8784 * server.h (internal_error): Declare.
8785 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8786 * utils.c (internal_error): New function.
8788 2010-03-15 Andreas Schwab <schwab@redhat.com>
8790 * configure.srv: Fix typo setting srv_regobj.
8792 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8794 * linux-low.c (fetch_register): Avoid passing a non string literal
8796 (usr_store_inferior_registers): Ditto.
8798 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8800 * linux-low.c (linux_write_memory): Bail out early if peeking
8803 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8805 * linux-low.h (struct lwp_info): New fields
8806 `stopped_by_watchpoint' and `stopped_data_address'.
8807 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8808 here, and cache them in the lwp object.
8809 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8811 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8813 (linux_stopped_by_watchpoint): Rewrite.
8814 (linux_stopped_data_address): Rewrite.
8816 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8818 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8819 switching the current inferior, not before.
8821 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8823 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8824 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8825 i386-linux.c and amd64-linux.c.
8826 (reg-i386.o): Removed.
8827 (reg-i386.c): Likewise.
8828 (reg-i386-linux.o): Likewise.
8829 (reg-i386-linux.c): Likewise.
8830 (reg-x86-64.o): Likewise.
8831 (reg-x86-64.c): Likewise.
8832 (reg-x86-64-linux.o): Likewise.
8833 (reg-x86-64-linux.c): Likewise.
8836 (i386-linux.o): Likewise.
8837 (i386-linux.c): Likewise.
8838 (amd64.o): Likewise.
8839 (amd64.c): Likewise.
8840 (amd64-linux.o): Likewise.
8841 (amd64-linux.c): Likewise.
8843 * configure.srv (srv_i386_regobj): New.
8844 (srv_i386_linux_regobj): Likewise.
8845 (srv_amd64_regobj): Likewise.
8846 (srv_amd64_linux_regobj): Likewise.
8847 (srv_i386_32bit_xmlfiles): Likewise.
8848 (srv_i386_64bit_xmlfiles): Likewise.
8849 (srv_i386_xmlfiles): Likewise.
8850 (srv_amd64_xmlfiles): Likewise.
8851 (srv_i386_linux_xmlfiles): Likewise.
8852 (srv_amd64_linux_xmlfiles): Likewise.
8853 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8854 srv_xmlfiles to $srv_i386_xmlfiles.
8855 (i[34567]86-*-mingw32ce*): Likewise.
8856 (i[34567]86-*-mingw*): Likewise.
8857 (i[34567]86-*-nto*): Likewise.
8858 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8859 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8860 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8861 (x86_64-*-linux*): Likewise.
8863 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8864 (init_registers_amd64_linux): New.
8865 (x86_arch_setup): Replace init_registers_x86_64_linux with
8866 init_registers_amd64_linux.
8868 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8870 * configure.ac: Check for libdl. If it is not available link against
8871 static libthread_db.
8872 * configure: Regenerate.
8874 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8878 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8879 handing a read watchpoint.
8880 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8882 2010-02-12 Doug Evans <dje@google.com>
8884 * linux-low.c (linux_supports_tracefork_flag): Document.
8885 (linux_look_up_symbols): Add comment.
8887 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8889 * regcache.c (supply_register): Clear regcache if buf is NULL.
8891 2010-02-02 Nicolas Roche <roche@sourceware.org>
8892 Joel Brobecker <brobecker@adacore.com>
8894 * inferiors.c (find_inferior): Add function documentation.
8895 (unloaded_dll): Handle the case where the unloaded dll has not
8896 been previously registered in the dll list.
8898 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8900 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8901 (thumb2_breakpoint): New.
8902 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8904 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8906 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8907 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8910 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8912 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8914 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8916 * linux-s390-low.c (s390_collect_ptrace_register)
8917 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8919 2010-01-21 Doug Evans <dje@google.com>
8921 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8922 (PTRACE_ARG4_TYPE): New macro.
8923 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8924 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8925 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8926 (usr_store_inferior_registers): Ditto.
8927 (linux_read_memory, linux_write_memory): Ditto.
8928 (linux_test_for_tracefork): Ditto.
8930 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8931 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8933 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8935 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8938 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8940 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8941 prototype to take a regcache. Adjust.
8943 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8945 * regcache.h (struct thread_info): Forward declare.
8946 (struct regcache): New.
8947 (new_register_cache): Adjust prototype.
8948 (get_thread_regcache): Declare.
8949 (free_register_cache): Adjust prototype.
8950 (registers_to_string, registers_from_string): Ditto.
8951 (supply_register, supply_register_by_name, collect_register)
8952 (collect_register_as_string, collect_register_by_name): Ditto.
8953 * regcache.c (struct inferior_regcache_data): Delete.
8954 (get_regcache): Rename to ...
8955 (get_thread_regcache): ... this. Adjust. Switch inferior before
8957 (regcache_invalidate_one): Adjust.
8958 (regcache_invalidate): Fix prototype.
8959 (new_register_cache): Return the new register cache.
8960 (free_register_cache): Change prototype.
8961 (realloc_register_cache): Adjust.
8962 (registers_to_string): Change prototype to take a regcache. Adjust.
8963 (registers_from_string): Ditto.
8964 (register_data): Ditto.
8965 (supply_register): Ditto.
8966 (supply_register_by_name): Ditto.
8967 (collect_register): Ditto.
8968 (collect_register_as_string): Ditto.
8969 (collect_register_by_name): Ditto.
8970 * server.c (process_serial_event): Adjust.
8971 * linux-low.h (regset_fill_func, regset_store_func): Change
8973 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8975 * linux-low.c (get_stop_pc): Adjust.
8976 (check_removed_breakpoint): Adjust.
8977 (linux_wait_for_event): Adjust.
8978 (linux_resume_one_lwp): Adjust.
8979 (fetch_register): Add regcache parameter. Adjust.
8980 (usr_store_inferior_registers): Ditto.
8981 (regsets_fetch_inferior_registers): Ditto.
8982 (regsets_store_inferior_registers): Ditto.
8983 (linux_fetch_registers, linux_store_registers): Ditto.
8984 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8986 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8988 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8989 prototype to take a regcache.
8990 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8991 * remote-utils.c (convert_ascii_to_int, outreg)
8992 (prepare_resume_reply): Change prototype to take a regcache.
8994 * target.h (struct target_ops) <fetch_registers, store_registers>:
8995 Change prototype to take a regcache.
8996 (fetch_inferior_registers, store_inferior_registers): Change
8997 prototype to take a regcache. Adjust.
8998 * proc-service.c (ps_lgetregs): Adjust.
8999 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
9000 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
9001 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
9002 take a regcache. Adjust.
9003 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
9004 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
9005 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
9006 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
9007 * linux-cris-low.c (cris_get_pc, cris_set_pc)
9008 (cris_cannot_fetch_register):
9009 (cris_breakpoint_at): Change prototype to take a regcache.
9011 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
9012 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
9013 to take a regcache. Adjust.
9014 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
9016 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
9017 take a regcache. Adjust.
9018 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
9019 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
9020 (m68k_set_pc): Change prototype to take a regcache. Adjust.
9021 * linux-mips-low.c (mips_get_pc):
9022 (mips_set_pc): Change prototype to take a regcache. Adjust.
9023 (mips_reinsert_addr): Adjust.
9024 (mips_collect_register): Change prototype to take a regcache.
9026 (mips_supply_register):
9027 (mips_collect_register_32bit, mips_supply_register_32bit)
9028 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
9029 (mips_store_fpregset): Ditto.
9030 * linux-ppc-low.c (ppc_supply_ptrace_register)
9031 (ppc_supply_ptrace_register): Ditto.
9032 (parse_spufs_run): Adjust.
9033 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
9034 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
9035 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
9036 take a regcache. Adjust.
9037 * linux-s390-low.c (s390_collect_ptrace_register)
9038 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
9039 (s390_set_pc): Change prototype to take a regcache. Adjust.
9040 (s390_arch_setup): Adjust.
9041 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
9042 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
9043 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
9044 (sparc_fill_gregset, sparc_store_gregset_from_stack)
9045 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
9047 (sparc_breakpoint_at): Adjust.
9048 * linux-xtensa-low.c (xtensa_fill_gregset):
9049 (xtensa_store_gregset):
9050 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
9051 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
9052 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
9053 prototype to take a regcache. Adjust.
9054 * win32-arm-low.c (arm_fetch_inferior_register)
9055 (arm_store_inferior_register): Change prototype to take a
9057 * win32-i386-low.c (i386_fetch_inferior_register)
9058 (i386_store_inferior_register): Change prototype to take a
9060 * win32-low.c (child_fetch_inferior_registers)
9061 (child_store_inferior_registers): Change prototype to take a
9063 (win32_wait): Adjust.
9064 (win32_fetch_inferior_registers): Change prototype to take a
9066 (win32_store_inferior_registers): Adjust.
9067 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
9068 store_inferior_register>: Change prototype to take a regcache.
9070 2010-01-20 Doug Evans <dje@google.com>
9072 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
9074 (linux_wait_for_event1, linux_init_signals): Ditto.
9075 (W_STOPCODE): Provide definition if missing.
9077 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
9079 * linux-low.c (linux_core_of_thread): New.
9080 (compare_ints, show_process, list_threads): New.
9081 (linux_qxfer_osdata): Report threads and cores.
9082 (linux_target_op): Register linux_core_of_thread.
9083 * remote-utils.c (prepare_resume_reply): Report the core.
9084 (buffer_xml_printf): Support %d specifier.
9085 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
9087 (handle_query): Handle qXfer:threads. Announce availability
9089 * target.h (struct target_ops): New field core_of_thread.
9091 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
9093 * Makefile.in (clean): Remove new generated files.
9094 (reg-s390.o, reg-s390.c): Remove rules.
9095 (reg-s390x.o, reg-s390x.c): Likewise.
9096 (s390-linux32.o, s390-linux32.c): Add rules.
9097 (s390-linux64.o, s390-linux64.c): Likewise.
9098 (s390x-linux64.o, s390x-linux64.c): Likewise.
9099 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
9100 * linux-s390-low.c: Include <elf.h>.
9101 (HWCAP_S390_HIGH_GPRS): Define if undefined.
9102 (init_registers_s390): Remove prototype.
9103 (init_registers_s390x): Likewise.
9104 (init_registers_s390_linux32): Add prototype.
9105 (init_registers_s390_linux64): Likewise.
9106 (init_registers_s390x_linux64): Likewise.
9107 (s390_num_regs_3264): New define.
9108 (s390_regmap_3264): New global variable.
9109 (s390_cannot_fetch_register): Remove obsolete check.
9110 (s390_cannot_store_register): Likewise.
9111 (s390_collect_ptrace_register): Handle upper/lower register halves.
9112 (s390_supply_ptrace_register): Likewise.
9113 (s390_fill_gregset): Update to register number changes.
9114 (s390_get_hwcap): New routine.
9115 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
9116 Install appropriate regmap and register set.
9118 2010-01-01 Joel Brobecker <brobecker@adacore.com>
9120 * server.c (gdbserver_version): Update copyright year to 2010.
9121 * gdbreplay.c (gdbreplay_version): Likewise.
9123 2009-12-28 Doug Evans <dje@google.com>
9125 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
9126 elf/external.h. Include <elf.h> instead but only if necessary.
9128 2009-12-28 Pedro Alves <pedro@codesourcery.com>
9130 * linux-low.c (linux_remove_process): Remove `detaching'
9131 parameter. Don't release/detach from thread_db here.
9132 (linux_kill): Release/detach from thread_db here, ...
9133 (linux_detach): ... and here, before actually detaching.
9134 (linux_wait_1): ... and here, when a process exits.
9135 * thread-db.c (any_thread_of): New.
9136 (thread_db_free): Switch the current inferior to a thread of the
9139 2009-12-21 Doug Evans <dje@google.com>
9141 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
9143 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
9144 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
9145 warning ifndef __NR_tkill. Move setting of errno there too.
9146 Delete unnecessary resetting of errno after syscall.
9147 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
9149 * configure.ac: Check for dladdr.
9150 * config.in: Regenerate.
9151 * configure: Regenerate.
9152 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
9153 (try_thread_db_load): Update.
9155 * linux-low.c (my_waitpid): Delete unnecessary prototype.
9157 2009-12-18 Doug Evans <dje@google.com>
9159 * event-loop.c: Include unistd.h if it exists.
9161 * linux-low.c (my_waitpid): Move definition away from being in
9162 between linux_tracefork_child/linux_test_for_tracefork.
9164 * gdb_proc_service.h (psaddr_t): Fix type.
9165 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9166 signature to match glibc.
9168 2009-12-16 Doug Evans <dje@google.com>
9170 * linux-low.c (linux_read_memory): Fix argument to read.
9172 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9174 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9175 events, don't leave current_inferior pointing at null.
9177 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9179 * win32-low.c (LOG): Delete.
9180 (OUTMSG): Output to stderr.
9181 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9182 on compile time LOG macro.
9183 (win32_wait): Fix debug output.
9185 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9187 * win32-low.c (win32_add_one_solib): If the dll name is
9188 "ntdll.dll", prepend the system directory to the dll path.
9190 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9192 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9194 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9195 Vladimir Prus <vladimir@codesourcery.com>
9197 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9198 * configure.ac: Check for __mcoldfire__ and set
9199 gdb_cv_m68k_is_coldfire.
9200 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9201 reg-cf.o and reg-m68k.o.
9202 * configure: Regenerated.
9204 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9206 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9207 Pass it to thread_db_free.
9208 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9209 proper `detaching' argument to linux_remove_process.
9210 * linux-low.h (thread_db_free): Add `detaching' parameter.
9211 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9213 (thread_db_free): Add `detaching' parameter. Only
9214 call td_ta_clear_event if detaching from process.
9216 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9218 * thread-db.c (thread_db_free): Fix typo.
9220 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9223 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9225 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9227 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9228 with an i686 compiler.
9229 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9231 * configure: Rebuilt.
9233 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9237 * server.c (handle_search_memory_1): Correct read_addr initialization
9238 in loop for searching subsequent chunks.
9240 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9242 * configure.ac: New --with-libthread-db option.
9243 * thread-db.c: Allow direct dependence on libthread_db.
9244 (thread_db_free): Adjust.
9245 * config.in: Regenerate.
9246 * configure: Likewise.
9248 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9251 * thread-db.c (attach_thread): New function.
9252 (maybe_attach_thread): Return success/failure.
9253 (find_new_threads_callback): Adjust.
9254 (thread_db_find_new_threads): Loop until no new threads.
9256 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9258 * proc-service.c (ps_lgetregs): Formatting.
9260 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9262 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9263 * configure.ac: Adjust.
9264 * linux-low.h (struct process_info_private): Move members to struct
9266 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9267 * linux-low.c (linux_remove_process): Adjust.
9268 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9269 * server.c (handle_query): Move code ...
9270 (handle_monitor_command): ... here. New function.
9271 * target.h (struct target_ops): New member.
9272 * thread-db.c (struct thread_db): New.
9273 (libthread_db_search_path): New variable.
9274 (thread_db_create_event, thread_db_enable_reporting)
9275 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9276 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9277 (try_thread_db_load_1, dladdr_to_soname): New functions.
9278 (try_thread_db_load, thread_db_load_search): New functions.
9279 (thread_db_init): Search for libthread_db.
9280 (thread_db_free): New function.
9281 (thread_db_handle_monitor_command): Likewise.
9282 * config.in: Regenerate.
9283 * configure: Regenerate.
9285 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9287 * spu-low.c (spu_kill): Wait for inferior to terminate.
9288 Call clear_inferiors.
9289 (spu_detach): Call clear_inferiors.
9291 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9293 * aclocal.m4: Regenerate.
9294 * config.in: Likewise.
9295 * configure: Likewise.
9297 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9299 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9300 (parse_spufs_run): New function.
9301 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9302 (ppc_breakpoint_at): Handle SPU breakpoints.
9304 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9306 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9307 (SPUFS_MAGIC): Define.
9308 (spu_enumerate_spu_ids): New function.
9309 (linux_qxfer_spu): New function.
9310 (linux_target_ops): Install linux_qxfer_spu.
9312 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9314 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9315 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9316 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9317 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9318 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9319 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9320 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9321 (init_registers_powerpc_cell32l): Add prototype.
9322 (init_registers_powerpc_cell64l): Likewise.
9323 (ppc_arch_setup): Detect Cell/B.E. architecture.
9325 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9327 * Makefile.in (datarootdir): New variable.
9329 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9331 * linux-low.c (linux_write_memory): Update debugging output.
9332 * Makefile.in (clean): Add new descriptions.
9333 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9334 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9335 * configure.srv: Add new files for arm*-*-linux*.
9336 * linux-arm-low.c: Add new declarations.
9337 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9338 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9339 (HWCAP_VFPv3D16): New.
9340 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9341 instead of __IWMMXT__.
9342 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9343 (arm_arch_setup): New.
9344 (target_regsets): Remove #ifdef. Add VFP regset.
9345 (the_low_target): Use arm_arch_setup.
9347 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9349 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9350 the main thread again.
9352 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9354 Adding Neutrino gdbserver.
9355 * configure: Regenerated.
9356 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9357 * configure.srv (i[34567]86-*-nto*): New target.
9358 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9359 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9360 (nto_comctrl) [__QNX__]: New function.
9361 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9363 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9365 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9368 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9369 Pedro Alves <pedro@codesourcery.com>
9371 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9372 don't support CONTEXT_EXTENDED_REGISTERS.
9373 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9374 (the_low_target): Install them.
9375 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9376 failing with ERROR_PIPE_NOT_CONNECTED.
9378 2009-06-30 Doug Evans <dje@google.com>
9379 Pierre Muller <muller@ics.u-strasbg.fr>
9381 Add h/w watchpoint support to x86-linux, win32-i386.
9382 * Makefile.in (SFILES): Add i386-low.c
9383 (i386_low_h): Define.
9384 (i386-low.o): Add dependencies.
9385 (linux-x86-low.o): Add i386-low.h dependency.
9386 (win32-i386-low.o): Ditto.
9387 * i386-low.c: New file.
9388 * i386-low.h: New file.
9389 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9390 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9391 * linux-low.c (linux_add_process): Initialize arch_private.
9392 (linux_remove_process): Free arch_private.
9393 (add_lwp): Initialize arch_private.
9394 (delete_lwp): Free arch_private.
9395 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9397 * linux-low.h (process_info_private): New member arch_private.
9398 (lwp_info): New member arch_private.
9399 (linux_target_ops): New members new_process, new_thread,
9401 (ptid_of): New macro.
9402 * linux-x86-low.c: Include stddef.h, i386-low.h.
9403 (arch_process_info): New struct.
9404 (arch_lwp_info): New struct.
9405 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9406 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9407 (i386_dr_low_get_status): New function.
9408 (x86_insert_point, x86_remove_point): New functions.
9409 (x86_stopped_by_watchpoint): New function.
9410 (x86_stopped_data_address): New function.
9411 (x86_linux_new_process, x86_linux_new_thread): New functions.
9412 (x86_linux_prepare_to_resume): New function.
9413 (the_low_target): Add entries for insert_point, remove_point,
9414 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9416 * server.c (debug_hw_points): New global.
9417 (monitor_show_help): Document set debug-hw-points.
9418 (handle_query): Process "set debug-hw-points".
9419 * server.h (debug_hw_points): Declare.
9420 (paddress): Declare.
9421 * utils.c (NUMCELLS, CELLSIZE): New macros.
9422 (get_sell, xsnprintf, paddress): New functions.
9423 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9424 remove_point, stopped_by_watchpoint, stopped_data_address.
9425 * win32-i386-low.c: Include i386-low.h.
9426 (debug_reg_state): Replaces dr.
9427 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9428 (i386_dr_low_get_status): New function.
9429 (i386_insert_point, i386_remove_point): New functions.
9430 (i386_stopped_by_watchpoint): New function.
9431 (i386_stopped_data_address): New function.
9432 (i386_initial_stuff): Update.
9433 (get_thread_context,set_thread_context,i386_thread_added): Update.
9434 (the_low_target): Add entries for insert_point,
9435 remove_point, stopped_by_watchpoint, stopped_data_address.
9436 * win32-low.c (win32_insert_watchpoint): New function.
9437 (win32_remove_watchpoint): New function.
9438 (win32_stopped_by_watchpoint): New function.
9439 (win32_stopped_data_address): New function.
9440 (win32_target_ops): Add entries for insert_watchpoint,
9441 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9442 * win32-low.h (win32_target_ops): New members insert_point,
9443 remove_point, stopped_by_watchpoint, stopped_data_address.
9445 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9447 * server.c (process_serial_event): Re-return unsupported, not
9448 error, if the type isn't recognized. Re-allow supporting only
9449 insert or remove packets. Also call require_running for
9450 breakpoints. Add missing break statement to default case. Tidy.
9451 * target.h (struct target_ops): Rename insert_watchpoint to
9452 insert_point, and remove_watchpoint to remove_point.
9454 * linux-low.h (struct linux_target_ops): Likewise.
9455 * linux-low.c (linux_insert_watchpoint): Rename to ...
9456 (linux_insert_point): ... this. Adjust.
9457 (linux_remove_watchpoint): Rename to ...
9458 (linux_remove_point): ... this. Adjust.
9459 (linux_target_ops): Adjust.
9460 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9461 (cris_insert_point): ... this.
9462 (cris_remove_watchpoint): Rename to ...
9463 (cris_remove_point): ... this.
9464 (the_low_target): Adjust.
9466 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9468 * server.c (handle_v_kill): Pass signal_pid to
9469 kill_inferior if multi_process is zero.
9471 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9473 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9474 * target.h (target_ops): Comment for *_watchpoint to make it clear
9475 the functions can get types '0' and '1'.
9477 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9479 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9480 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9481 * regcache.c (get_regcache): Likewise.
9482 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9483 * win32-low.c (child_fetch_inferior_registers): Remove check for
9486 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9487 Pedro Alves <pedro@codesourcery.com>
9489 * target.h (struct target_ops) <supports_multi_process>: New
9491 (target_supports_multi_process): New.
9492 * server.c (handle_query): Even if GDB reports support, only
9493 enable multi-process if the target also supports it. Report
9494 multi-process support only if the target backend supports it.
9495 * linux-low.c (linux_supports_multi_process): New function.
9496 (linux_target_ops): Install it as target_supports_multi_process
9499 2009-05-24 Doug Evans <dje@google.com>
9501 Global renaming of find_thread_pid to find_thread_ptid.
9502 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9503 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9504 All callers updated.
9506 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9507 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9510 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9511 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9512 (linux_resume_one_lwp): Ditto.
9514 2009-05-23 Doug Evans <dje@google.com>
9516 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9517 from struct inferior_list_entry * to struct lwp_info *.
9518 All callers updated.
9520 2009-05-13 Doug Evans <dje@google.com>
9522 * linux-x86-low.c: Don't include assert.h.
9523 (x86_siginfo_fixup): Use fatal, not assert.
9524 (x86_arch_setup): Fix comment.
9526 2009-05-12 Doug Evans <dje@google.com>
9528 Biarch support for i386/amd64 gdbserver.
9529 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9530 Add linux-x86-low.c.
9531 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9532 (linux-x86-low.o): Add.
9533 * linux-x86-64-low.c: Delete.
9534 * linux-i386-low.c: Delete.
9535 * linux-x86-low.c: New file.
9536 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9538 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9540 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9541 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9542 (linux_child_pid_to_exec_file): New function.
9543 (elf_64_header_p, elf_64_file_p): New functions.
9544 (siginfo_fixup): New function.
9545 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9546 give target a chance to convert layout.
9547 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9548 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9550 2009-05-07 Doug Evans <dje@google.com>
9552 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9553 (regsets_store_inferior_registers): Ditto.
9555 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9559 * linux-low.c (must_set_ptrace_flags): Delete.
9560 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9562 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9563 `lwp->must_set_ptrace_flags' instead.
9564 (linux_wait_for_event_1): Set ptrace options here.
9565 (linux_wait_1): ... not here.
9567 2009-04-30 Doug Evans <dje@google.com>
9569 * inferiors.c (started_inferior_callback): New function.
9570 (attached_inferior_callback): New function.
9571 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9572 * server.c (print_started_pid, print_attached_pid): New functions.
9573 (detach_or_kill_for_exit): New function.
9574 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9575 * server.h (have_started_inferiors_p): Declare.
9576 (have_attached_inferiors_p): Declare.
9578 * inferiors.c (remove_process): Fix memory leak, free process.
9579 * linux-low.c (linux_remove_process): New function.
9580 (linux_kill): Call it instead of remove_process.
9581 (linux_detach, linux_wait_1): Ditto.
9583 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9585 * configure.srv: Add x86 Windows CE target.
9587 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9589 * inferiors.c (get_thread_process): Make global.
9590 * server.h (get_thread_process): Add prototype.
9591 * thread-db.c (find_one_thread): Use get_thread_process
9592 instead of current_process.
9593 (thread_db_get_tls_address): Do not crash if called when
9594 thread layer is not yet initialized.
9596 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9598 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9599 * spu-low.c (current_tid): Rename to ...
9600 (current_ptid): ... this.
9601 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9602 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9603 ptid_get_lwp (current_ptid) instead of current_tid.
9604 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9605 instead of current_tid. Use find_process_pid to verify pid
9606 argument is valid. Pass proper argument to remove_process.
9607 (spu_thread_alive): Compare current_ptid instead of current_tid.
9608 (spu_resume): Likewise.
9610 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9612 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9615 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9617 Implement the multiprocess extensions, and add linux multiprocess
9620 * server.h (ULONGEST): Declare.
9621 (struct ptid, ptid_t): New.
9622 (minus_one_ptid, null_ptid): Declare.
9623 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9624 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9625 (struct inferior_list_entry): Change `id' type from unsigned from
9627 (struct sym_cache, struct breakpoint, struct
9628 process_info_private): Forward declare.
9629 (struct process_info): Declare.
9630 (current_process): Declare.
9631 (all_processes): Declare.
9632 (initialize_inferiors): Declare.
9633 (add_thread): Adjust to use ptid_t.
9634 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9635 (add_process, remove_process, find_thread_pid): Declare.
9636 (find_inferior_id): Adjust to use ptid_t.
9637 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9638 (multi_process): Declare.
9639 (push_event): Adjust to use ptid_t.
9640 (read_ptid, write_ptid): Declare.
9641 (prepare_resume_reply): Adjust to use ptid_t.
9642 (clear_symbol_cache): Declare.
9643 * inferiors.c (all_processes): New.
9644 (null_ptid, minus_one_ptid): New.
9645 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9646 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9647 (add_thread): Change unsigned long to ptid. Remove gdb_id
9649 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9650 (gdb_id_to_thread): Rename to ...
9651 (find_thread_pid): ... this. Change unsigned long to ptid.
9652 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9653 (loaded_dll, pull_pid_from_list): Adjust.
9654 (add_process, remove_process, find_process_pid)
9655 (get_thread_process, current_process, initialize_inferiors): New.
9656 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9657 (struct target_waitstatus) <related_pid>: Ditto.
9658 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9660 (struct target_ops) <join>: Add `pid' argument.
9661 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9662 (struct target_ops) <wait>: Add `ptid' field. Change return type
9664 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9665 (mywait): Add `ptid' argument. Change return type to ptid_t.
9666 (target_pid_to_str): Declare.
9667 * target.c (set_desired_inferior): Adjust to use ptids.
9668 (mywait): Add new `ptid' argument. Adjust.
9669 (target_pid_to_str): New.
9670 * mem-break.h (free_all_breakpoints): Declare.
9671 * mem-break.c (breakpoints): Delelete.
9672 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9673 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9674 to use per-process breakpoint list.
9675 (free_all_breakpoints): New.
9676 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9677 (symbol_cache, all_symbols_looked_up): Delete.
9679 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9681 (prepare_resume_reply): Change ptid argument's type from unsigned
9682 long to ptid_t. Adjust. Implement W;process and X;process.
9683 (free_sym_cache, clear_symbol_cache): New.
9684 (look_up_one_symbol): Adjust to per-process symbol cache. *
9685 * server.c (cont_thread, general_thread, step_thread): Change type
9688 (multi_process): New.
9689 (last_ptid): Change type to ptid_t.
9690 (struct vstop_notif) <ptid>: Change type to ptid_t.
9691 (queue_stop_reply, push_event): Change `ptid' argument's type to
9693 (discard_queued_stop_replies): Add `pid' argument.
9694 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9695 changes. Don't reference the `attached' global.
9696 (attach_inferior): Adjust to mywait interface changes.
9697 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9698 features. Handle and report "multiprocess+". Handle
9700 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9702 (handle_v_kill): New.
9703 (handle_v_stopped): Adjust to use target_pid_to_str.
9704 (handle_v_requests): Allow multiple attaches and runs when
9705 multiprocess extensions are in effect. Handle "vKill".
9706 (myresume): Adjust to use ptids.
9707 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9708 (handle_status): Adjust to discard_queued_stop_replies interface
9710 (first_thread_of, kill_inferior_callback)
9711 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9712 (main): Call initialize_inferiors. Adjust to use ptids, killing
9713 and detaching from all inferiors. Handle multiprocess packet
9715 * linux-low.h: Include gdb_proc_service.h.
9716 (struct process_info_private): New.
9717 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9718 <lwpid_of>: Use ptid_get_lwp.
9719 (get_lwp_thread): Adjust.
9720 (struct lwp_info): Add `dead' member.
9721 (find_lwp_pid): Declare.
9722 * linux-low.c (thread_db_active): Delete.
9723 (new_inferior): Adjust comment.
9724 (inferior_pid): Delete.
9725 (linux_add_process): New.
9726 (handle_extended_wait): Adjust.
9727 (add_lwp): Change unsigned long to ptid.
9728 (linux_create_inferior): Add process to processes table. Adjust
9729 to use ptids. Don't set new_inferior here.
9730 (linux_attach_lwp): Rename to ...
9731 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9732 it. Adjust to use ptids.
9733 (linux_attach_lwp): New.
9734 (linux_attach): Add process to processes table. Don't set
9736 (struct counter): New.
9737 (second_thread_of_pid_p, last_thread_of_process_p): New.
9738 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9740 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9741 processes. Remove process from process table.
9742 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9743 to multiple processes.
9744 (any_thread_of): New.
9745 (linux_detach): Add `pid' argument, and handle it. Remove process
9746 from processes table.
9747 (linux_join): Add `pid' argument. Handle it.
9748 (linux_thread_alive): Change unsighed long argument to ptid_t.
9749 Consider dead lwps as not being alive.
9750 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9751 threads we're not interested in.
9752 (same_lwp, find_lwp_pid): New.
9753 (linux_wait_for_lwp): Change `pid' argument's type from int to
9755 (linux_wait_for_event): Rename to ...
9756 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9757 from int to ptid_t. Adjust.
9758 (linux_wait_for_event): New.
9759 (linux_wait_1): Add `ptid' argument. Change return type to
9760 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9761 that exit from the process table.
9762 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9764 (mark_lwp_dead): New.
9765 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9766 stopping all threads, mark its main lwp as dead.
9767 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9769 (fetch_register, usr_store_inferior_registers)
9770 (regsets_fetch_inferior_registers)
9771 (regsets_store_inferior_registers, linux_read_memory)
9772 (linux_write_memory): Inline `inferior_pid'.
9773 (linux_look_up_symbols): Adjust to use per-process
9775 (linux_request_interrupt): Adjust to use ptids.
9776 (linux_read_auxv): Inline `inferior_pid'.
9777 (initialize_low): Don't reference thread_db_active.
9778 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9779 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9780 (ps_getpid): Return the pid of the current inferior.
9781 * thread-db.c (proc_handle, thread_agent): Delete.
9782 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9784 (find_one_thread): Change argument type to ptid_t. Adjust to
9786 (maybe_attach_thread): Adjust to per-process data and ptids.
9787 (thread_db_find_new_threads): Ditto.
9788 (thread_db_init): Ditto.
9789 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9790 processes table. Adjust to use ptids.
9791 (spu_kill, spu_detach): Adjust interface. Remove process from
9793 (spu_join, spu_thread_alive): Adjust interface.
9794 (spu_wait): Adjust interface. Remove process from processes
9795 table. Adjust to use ptids.
9796 * win32-low.c (current_inferior_tid): Delete.
9797 (current_inferior_ptid): New.
9798 (debug_event_ptid): New.
9799 (thread_rec): Take a ptid. Adjust.
9800 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9801 (child_delete_thread): Ditto.
9802 (do_initial_child_stuff): Add `attached' argument. Add process to
9804 (child_fetch_inferior_registers, child_store_inferior_registers):
9806 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9807 (win32_attach): Pass 1 to do_initial_child_stuff.
9808 (win32_kill): Adjust interface. Remove process from processes
9810 (win32_detach): Ditto.
9811 (win32_join): Adjust interface.
9812 (win32_thread_alive): Take a ptid.
9813 (win32_resume): Adjust to use ptids.
9814 (get_child_debug_event): Ditto.
9815 (win32_wait): Adjust interface. Remove exiting process from
9818 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9820 Non-stop mode support.
9822 * server.h (non_stop): Declare.
9823 (gdb_client_data, handler_func): Declare.
9824 (delete_file_handler, add_file_handler, start_event_loop):
9826 (handle_serial_event, handle_target_event, push_event)
9827 (putpkt_notif): Declare.
9828 * target.h (enum resume_kind): New.
9829 (struct thread_resume): Replace `step' field by `kind' field.
9830 (TARGET_WNOHANG): Define.
9831 (struct target_ops) <wait>: Add `options' argument.
9832 <supports_non_stop, async, start_non_stop>: New fields.
9833 (target_supports_non_stop, target_async): New.
9834 (start_non_stop): Declare.
9835 (mywait): Add `options' argument.
9836 * target.c (mywait): Add `options' argument. Print child exit
9838 (start_non_stop): New.
9839 * server.c (non_stop, own_buf, mem_buf): New globals.
9840 (struct vstop_notif): New.
9841 (notif_queue): New global.
9842 (queue_stop_reply, push_event, discard_queued_stop_replies)
9843 (send_next_stop_reply): New.
9844 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9846 (attach_inferior): In non-stop mode, don't wait for the target
9848 (handle_general_set): Handle QNonStop.
9849 (handle_query): When handling qC, return the current general
9850 thread, instead of the first thread of the list.
9851 (handle_query): If the backend supports non-stop mode, include
9852 QNonStop+ in the qSupported query response.
9853 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9855 (handle_v_attach, handle_v_run): Handle non-stop mode.
9856 (handle_v_stopped): New.
9857 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9858 (myresume): Adjust to use resume_kind. Handle non-stop.
9859 (queue_stop_reply_callback): New.
9860 (handle_status): Handle non-stop mode.
9861 (main): Clear non_stop flag on reconnection. Use the event-loop.
9862 Refactor serial protocol handling from here ...
9863 (process_serial_event): ... to this new function. When GDB
9864 selects any thread, select one here. In non-stop mode, wait until
9865 GDB acks all pending events before exiting.
9866 (handle_serial_event, handle_target_event): New.
9867 * remote-utils.c (remote_open): Install remote_desc in the event
9869 (remote_close): Remove remote_desc from the event loop.
9870 (putpkt_binary): Rename to...
9871 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9872 (putpkt_binary): New as wrapper around putpkt_binary_1.
9873 (putpkt_notif): New.
9874 (prepare_resume_reply): In non-stop mode, don't change the
9876 * event-loop.c: New.
9877 * Makefile.in (OBJ): Add event-loop.o.
9878 (event-loop.o): New rule.
9880 * linux-low.h (pid_of): Moved here.
9882 (get_lwp_thread): Use lwpid_of.
9883 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9884 * linux-low.c (pid_of): Delete.
9885 (inferior_pid): Use lwpid_of.
9886 (linux_event_pipe): New.
9887 (target_is_async_p): New.
9889 (handle_extended_wait): Use lwpid_of.
9890 (add_lwp): Don't set lwpid field.
9891 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9892 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9893 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9894 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9895 first. Adjust to linux_wait_for_event interface changes. Use
9897 (linux_detach): Don't delete the main lwp here.
9898 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9899 (status_pending_p): Don't consider explicitly suspended lwps.
9900 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9901 pointer. Add OPTIONS argument. Change return type to int. Use
9902 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9903 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9904 pointer. Add status pointer argument. Return a pid instead of a
9905 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9906 changes. In non-stop mode, don't switch to a random thread.
9907 (linux_wait): Rename to...
9908 (linux_wait_1): ... this. Add target_options argument, and handle
9909 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9910 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9911 clean exit and signal exit code. Don't stop all threads in
9912 non-stop mode. In all-stop mode, only stop all threads when
9913 reporting a stop to GDB. Handle explicit thread stop requests.
9914 (async_file_flush, async_file_mark): New.
9916 (send_sigstop): Use lwpid_of.
9917 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9918 interface changes. In non-stop mode, don't switch to a random
9920 (linux_resume_one_lwp): Use lwpid_of.
9921 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9922 (linux_resume_one_thread): ... this. Handle resume_stop. In
9923 non-stop mode, don't look for pending flag in all threads.
9924 (resume_status_pending_p): Don't consider explicitly suspended
9926 (my_waitpid): Reimplement. Emulate __WALL.
9927 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9929 (sigchld_handler, linux_supports_non_stop, linux_async)
9930 (linux_start_non_stop): New.
9931 (linux_target_ops): Register linux_supports_non_stop, linux_async
9932 and linux_start_non_stop.
9933 (initialize_low): Install SIGCHLD handler.
9934 * thread-db.c (thread_db_create_event, find_one_thread)
9935 (thread_db_get_tls_address): Use lwpid_of.
9936 * win32-low.c (win32_detach): Adjust to use resume_kind.
9937 (win32_wait): Add `options' argument.
9938 * spu-low.c (spu_resume): Adjust to use resume_kind.
9939 (spu_wait): Add `options' argument.
9941 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9943 Decouple target code from remote protocol.
9945 * target.h (enum target_waitkind): New.
9946 (struct target_waitstatus): New.
9947 (struct target_ops) <wait>: Return an unsigned long. Take a
9948 target_waitstatus pointer instead of a char pointer.
9950 * target.c (mywait): Change prototype to return an unsigned long.
9951 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9952 * server.h (thread_from_wait, old_thread_from_wait): Delete
9954 (prepare_resume_reply): Change prototype to take a
9956 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9957 (last_status, last_ptid): New.
9958 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9959 pid instead of a signal.
9960 (attach_inferior): Remove "status" and "signal" parameters.
9962 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9964 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9965 (handle_v_requests, myresume): Remove "status" and "signal"
9967 (handle_status): New.
9968 (main): Delete local `status'. Adjust.
9969 * remote-utils.c: Include target.h.
9970 (prepare_resume_reply): Change prototype to take a
9971 target_waitstatus. Adjust.
9973 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9975 * spu-low.c (spu_wait): Adjust.
9976 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9978 (win32_wait): Adjust.
9980 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9982 * target.h (struct thread_resume): Delete leave_stopped member.
9983 (struct target_ops): Add a `n' argument to the `resume' callback.
9984 * server.c (start_inferior): Adjust.
9985 (handle_v_cont, myresume): Adjust.
9986 * linux-low.c (check_removed_breakpoint): Adjust to resume
9987 interface change, and to removed leave_stopped field.
9988 (resume_ptr): Delete.
9989 (struct thread_resume_array): New.
9990 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9991 resume interface change.
9992 (linux_continue_one_thread, linux_queue_one_thread)
9993 (resume_status_pending_p): Check if the resume field is NULL
9994 instead of checking the leave_stopped member.
9995 (linux_resume): Adjust to the target resume interface change.
9996 * spu-low.c (spu_resume): Adjust to the target resume interface
9998 * win32-low.c (win32_detach, win32_resume): Ditto.
10000 2009-04-01 Pedro Alves <pedro@codesourcery.com>
10002 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
10004 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
10006 (linux_continue_one_thread): Only preserve the stepping flag if
10007 there's a pending breakpoint.
10009 2009-03-31 Pedro Alves <pedro@codesourcery.com>
10011 * server.c (main): After the inferior having exited, call
10012 remote_close before exiting gdbserver.
10014 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
10016 Fix size of FPSCR in Power 7 processors.
10017 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
10018 (PPC_FEATURE_HAS_DFP): New #define.
10019 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
10022 2009-03-23 Pedro Alves <pedro@codesourcery.com>
10024 * server.c (handle_query) Whitespace and formatting.
10026 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10028 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
10029 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
10030 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
10031 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
10032 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
10033 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
10034 Makefile.in, configure.ac: Fix whitespace throughout.
10035 * configure: Regenerate.
10037 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10039 * inferiors.c (find_inferior): Make it safe for the callback
10040 function to delete the currently iterated inferior.
10042 2009-03-22 Pedro Alves <pedro@codesourcery.com>
10044 * Makefile.in (linuw_low_h): Move higher.
10045 (thread-db.o): Depend on $(linux_low_h).
10047 2009-03-17 Pedro Alves <pedro@codesourcery.com>
10049 Rename "process" to "lwp" throughout.
10051 * linux-low.c (all_processes): Rename to...
10052 (all_lwps): ... this.
10053 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
10054 (add_process): Rename to ...
10055 (add_lwp): ... this. Adjust.
10056 (linux_create_inferior): Adjust.
10057 (linux_attach_lwp): Adjust.
10058 (linux_attach): Adjust.
10059 (linux_kill_one_process): Rename to ...
10060 (linux_kill_one_lwp): ... this. Adjust.
10061 (linux_kill): Adjust.
10062 (linux_detach_one_process): Rename to ...
10063 (linux_detach_one_lwp): ... this. Adjust.
10064 (linux_detach): Adjust.
10065 (check_removed_breakpoint): Adjust.
10066 (status_pending_p): Adjust.
10067 (linux_wait_for_process): Rename to ...
10068 (linux_wait_for_lwp): ... this. Adjust.
10069 (linux_wait_for_event): Adjust.
10070 (send_sigstop): Adjust.
10071 (wait_for_sigstop): Adjust.
10072 (stop_all_processes): Rename to ...
10073 (stop_all_lwps): ... this.
10074 (linux_resume_one_process): Rename to ...
10075 (linux_resume_one_lwp): ... this. Adjust.
10076 (linux_set_resume_request, linux_continue_one_thread)
10077 (linux_queue_one_thread, resume_status_pending_p)
10078 (usr_store_inferior_registers, regsets_store_inferior_registers)
10079 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
10081 * linux-low.h (get_process): Rename to ...
10082 (get_lwp): ... this. Adjust.
10083 (get_thread_process): Rename to ...
10084 (get_thread_lwp): ... this. Adjust.
10085 (get_process_thread): Rename to ...
10086 (get_lwp_thread): ... this. Adjust.
10087 (struct process_info): Rename to ...
10088 (struct lwp_info): ... this.
10089 (all_processes): Rename to ...
10090 (all_lwps): ... this.
10091 * proc-service.c (ps_lgetregs): Adjust.
10092 * thread-db.c (thread_db_create_event, find_one_thread)
10093 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
10095 2009-03-14 Pedro Alves <pedro@codesourcery.com>
10097 * server.c (handle_query): Handle "qAttached".
10099 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
10101 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
10102 GPLv3, update license URL.
10104 2009-03-01 Doug Evans <dje@google.com>
10106 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
10107 (server_h): Add gdb_signals.h.
10108 (signals.o): Update.
10109 * server.h (target_signal_from_host,target_signal_to_host_p)
10110 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
10112 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
10114 * remote-utils.c (getpkt): Also generate remote-debug
10115 information if noack_mode is set.
10117 2009-02-06 Pedro Alves <pedro@codesourcery.com>
10119 * server.c (handle_query): Report qXfer:siginfo:read and
10120 qXfer:siginfo:write as supported and handle them.
10121 * target.h (struct target_ops) <qxfer_siginfo>: New field.
10122 * linux-low.c (linux_xfer_siginfo): New.
10123 (linux_target_ops): Set it.
10125 2009-01-26 Pedro Alves <pedro@codesourcery.com>
10127 * server.c (gdbserver_usage): Mention --remote-debug.
10128 (main): Accept '--remote-debug' switch.
10130 2009-01-18 Doug Evans <dje@google.com>
10132 * regcache.c (new_register_cache): No need to check result of xcalloc.
10133 * server.c (handle_search_memory): Back out calls to xmalloc,
10134 result is checked and error is returned to user upon failure.
10135 (handle_query): Ditto. Add more checks for result of malloc.
10136 (handle_v_cont): Check result of malloc, report error back to
10138 (handle_v_run): Ditto. Call freeargv.
10139 * server.h (freeargv): Declare.
10140 * utils.c (freeargv): New fn.
10142 2009-01-15 Doug Evans <dje@google.com>
10144 * gdbreplay.c (perror_with_name): Make arg const char *.
10145 * server.h (target_signal_to_name): Make return type const char *.
10146 * thread-db.c (thread_db_err_str): Make return type const char *.
10147 * utils.c (perror_with_name): Make arg const char *.
10149 2009-01-14 Pedro Alves <pedro@codesourcery.com>
10151 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
10152 when handling a EXIT_PROCESS_DEBUG_EVENT.
10154 2009-01-06 Joel Brobecker <brobecker@adacore.com>
10156 * gdbreplay.c (gdbreplay_version): Update copyright year.
10157 * server.c (gdbserver_version): Likewise.
10159 2009-01-05 Doug Evans <dje@google.com>
10161 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10162 (handle_extended_wait): Improve comment.
10164 2008-12-13 Doug Evans <dje@google.com>
10166 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10167 * server.h (ATTR_MALLOC): New macro.
10168 (xmalloc,xcalloc,xstrdup): Declare.
10169 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10170 * inferiors.c: Ditto.
10171 * linux-low.c: Ditto.
10172 * mem-break.c: Ditto.
10173 * regcache.c: Ditto.
10174 * remote-utils.c: Ditto.
10177 * win32-low.c: Ditto.
10179 2008-12-12 Doug Evans <dje@google.com>
10181 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10182 in debugging printf.
10184 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10186 2008-12-09 Doug Evans <dje@google.com>
10188 * linux-low.h (struct process_info): Delete member tid, unused.
10189 * thread-db.c (find_one_thread): Update.
10190 (maybe_attach_thread): Update.
10192 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10194 * target.h (struct target_ops): Add qxfer_osdata member.
10195 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10197 (linux_qxfer_osdata): New functions.
10198 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10200 * server.c (handle_query): Handle "qXfer:osdata:read:".
10201 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10202 (buffer_xml_printf): New functions.
10203 * server.h (struct buffer): New.
10204 (buffer_grow_str, buffer_grow_str0): New macros.
10205 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10206 (buffer_xml_printf): Declare.
10208 2008-11-24 Doug Evans <dje@google.com>
10210 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10212 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10214 * server.c (handle_v_run): Always use the supplied argument list.
10216 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10218 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10219 (xtensa_regmap_table): Add entry for scompare1.
10221 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10223 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10224 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10225 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10226 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10227 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10228 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10229 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10230 XML target descriptions.
10231 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10232 when inferior is running on an ISA 2.05 or later processor. Add
10233 special case to return offset for full 64-bit slot of FPSCR when
10236 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10238 * Makefile.in (SFILES, clean): Added sparc64 files.
10239 (reg-sparc64.o, reg-sparc64.c): New.
10240 * configure.srv (sparc*-*-linux*): New configuration.
10241 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10242 syscall arguments for SPARC.
10243 (regsets_store_inferior_registers): Likewise.
10244 * linux-sparc-low.c: New file.
10246 2008-10-21 Doug Evans <dje@google.com>
10248 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10249 (READLINE_DIR,READLINE_DEP): Delete.
10250 (INTERNAL_CFLAGS): Update.
10251 (LINTFLAGS): Update.
10253 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10255 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10256 whole argv from the last run, not just argv[0].
10258 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10260 * regcache.c (new_register_cache): Return NULL if the register
10261 cache size isn't known yet.
10262 (free_register_cache): Avoid dereferencing a NULL regcache.
10264 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10266 * configure.srv: Merge MIPS and MIPS64.
10268 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10270 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10272 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10274 * Makefile.in: Add required vsx dependencies.
10276 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10277 Declare init_registers_powerpc_vsx32l.
10278 Declare init_registers_powerpc_vsx64l.
10279 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10280 (ppc_arch_setup): Check for VSX in hwcap.
10281 (ppc_fill_vsxregset): New function.
10282 (ppc_store_vsxregset): New function.
10283 Add new VSX entry in regset_info target_regsets.
10285 * configure.srv: Add new VSX dependencies.
10287 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10289 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10290 (remote_open): Set or clear transport_is_reliable.
10291 (putpkt_binary): Don't expect acks in noack mode.
10292 (getpkt): Don't send ack/nac in noack mode.
10293 * server.c (handle_general_set): Handle QStartNoAckMode.
10294 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10296 (main): Reset noack_mode on every connection.
10297 * server.h (noack_mode): Declare.
10299 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10301 * Makefile.in (GDBREPLAY_OBS): New variable.
10302 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10304 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10305 Daniel Jacobowitz <dan@codesourcery.com>
10307 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10308 (usr_store_inferior_registers): Likewise.
10309 (regsets_store_inferior_registers): Likewise.
10311 2008-07-31 Rolf Jansen <rj@surtec.com>
10312 Pedro Alves <pedro@codesourcery.com>
10314 * configure.ac: Check for memmem declaration.
10315 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10316 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10317 (disable_packet_qfThreadInfo): Unconditionally compile.
10318 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10319 * configure, config.in: Regenerate.
10321 2008-07-28 Doug Kwan <dougkwan@google.com>
10323 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10324 (linux_write_memory): Remove declaration of errno.
10326 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10328 * linux-low.c (handle_extended_wait): Do not use "status"
10329 variable uninitialized.
10331 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10333 * server.c (handle_v_attach): Inhibit reporting dll changes.
10335 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10337 * remote-utils.c (prepare_resume_reply): If requested, don't
10338 output "thread:TID" in the T stop reply.
10340 * server.c (disable_packet_vCont, disable_packet_Tthread)
10341 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10342 (handle_query): If requested, disable support for qC, qfThreadInfo
10344 (handle_v_requests): If requested, disable support for vCont.
10345 (gdbserver_show_disableable): New.
10346 (main): Handle --disable-packet and --disable-packet=LIST.
10348 * server.h (disable_packet_vCont, disable_packet_Tthread)
10349 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10351 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10353 * server.c (gdbserver_usage): Mention --version.
10355 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10357 * Makefile.in (gdbreplay.o): New rule.
10359 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10361 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10362 message, not gdbserver.
10364 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10365 Nathan Sidwell <nathan@codesourcery.com>
10366 Joseph Myers <joseph@codesourcery.com>
10368 * acinclude.m4: Include ../../config/acx.m4.
10369 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10370 * configure, config.in: Regenerate.
10371 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10372 * server.c (gdbserver_version): Print PKGVERSION.
10373 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10374 (main): Adjust gdbserver_usage calls.
10375 * gdbreplay.c (version, host_name): Add declarations.
10376 (gdbreplay_version, gdbreplay_usage): New.
10377 (main): Accept --version and --help options.
10379 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10381 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10382 (arm_breakpoint_at): Handle Thumb.
10383 (the_low_target): Add comment.
10385 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10387 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10389 2008-05-09 Doug Evans <dje@google.com>
10391 * server.h (decode_search_memory_packet): Declare.
10392 * remote-utils.c (decode_search_memory_packet): New fn.
10393 * server.c (handle_search_memory_1): New fn.
10394 (handle_search_memory): New fn.
10395 (handle_query): Process qSearch:memory packets.
10397 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10399 * regcache.c (registers_length): Remove.
10400 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10401 full register packet.
10402 * regcache.h (registers_length): Remove prototype.
10403 * server.h (PBUFSIZ): Define to 16384.
10405 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10407 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10408 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10409 powerpc-64l.o, and powerpc-altivec64l.o.
10410 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10411 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10412 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10413 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10414 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10417 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10418 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10419 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10420 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10421 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10422 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10423 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10424 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10425 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10426 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10429 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10430 (init_registers_powerpc_32l): ... this new prototype.
10431 (init_registers_powerpc_32): Remove, replace by ...
10432 (init_registers_powerpc_altivec32l): ... this new prototype.
10433 (init_registers_powerpc_e500): Remove, replace by ...
10434 (init_registers_powerpc_e500l): ... this new prototype.
10435 (init_registers_ppc64): Remove, replace by ...
10436 (init_registers_powerpc_64l): ... this new prototype.
10437 (init_registers_powerpc_64): Remove, replace by ...
10438 (init_registers_powerpc_altivec64l): ... this new prototype.
10439 (ppc_num_regs): Set to 73.
10440 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10441 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10442 (ppc_cannot_store_register): Handle orig_r3 and trap.
10443 (ppc_arch_setup): Update init_registers_... calls.
10444 (ppc_fill_gregset): Handle orig_r3 and trap.
10446 * inferiors.c (clear_inferiors): Reset current_inferior.
10448 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10450 * acinclude.m4: Add override.m4.
10451 * configure: Regenerate.
10453 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10455 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10456 initial call to init_register_ppc64.
10458 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10460 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10461 single powerpc*-*-linux* case.
10462 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10464 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10466 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10467 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10469 * linux-ppc-low.c: Include <elf.h>.
10470 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10471 (ppc_hwcap): New global variable.
10472 (ppc_regmap): Remove __SPE__ #ifdef sections.
10473 (ppc_regmap_e500): New global variable.
10474 (ppc_cannot_store_register): Update __SPE__ special case.
10475 (ppc_get_hwcap): New function.
10476 (ppc_arch_setup): Use it to determine whether inferior supports
10477 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10478 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10479 Do not access registers if target does not support AltiVec.
10480 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10481 Do not access registers if target does not support SPE.
10482 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10484 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10486 * linux-low.c (disabled_regsets, num_regsets): New.
10487 (use_regsets_p): Delete.
10488 (linux_wait_for_process): Clear disabled_regsets.
10489 (regsets_fetch_inferior_registers): Check and set it.
10490 (regsets_store_inferior_registers): Likewise.
10491 (linux_fetch_registers, linux_store_registers): Do not use
10493 (initialize_low): Allocate disabled_regsets.
10495 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10497 * Makefile.in (LIBOBJS): New.
10498 (OBS): Use LIBOBJS.
10499 (memmem.o): New rule.
10500 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10501 * configure: Regenerated.
10503 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10505 * server.c (handle_query): Never return "unsupported" for
10506 qXfer:features:read queries.
10508 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10510 * server.c (get_features_xml): Fix inverted condition.
10511 (handle_query): Always support qXfer:feature:read.
10513 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10515 * server.c (wrapper_argv): New.
10516 (start_inferior): Handle wrapper_argv. If set, expect an extra
10518 (gdbserver_usage): Document --wrapper.
10519 (main): Parse --wrapper.
10521 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10523 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10524 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10525 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10526 (ppc_set_pc): Likewise.
10527 (ppc_arch_setup): New function.
10528 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10529 of collect_register.
10530 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10532 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10534 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10535 instead of linux-ppc64-low.o.
10536 * linux-ppc64-low.c: Remove file.
10537 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10538 (linux-ppc64-low.o): Remove rule.
10540 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10541 (init_registers_powerpc_64): Likewise.
10542 (ppc_regmap): Conditionally define depending on __powerpc64__.
10543 (ppc_cannot_store_register): Do not special-case "fpscr" when
10544 compiled on __powerpc64__.
10545 (ppc_collect_ptrace_register): New function.
10546 (ppc_supply_ptrace_register): New function.
10547 (ppc_breakpoint): Change type to "unsigned int".
10548 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10549 (the_low_target): Conditionally provide initializers for the
10550 arch_setup member depending on __powerpc64__. Install
10551 collect_ptrace_register and supply_ptrace_register members.
10553 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10555 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10556 * server.c (gdbserver_xmltarget): Define.
10557 (get_features_xml): Use it to replace "target.xml" and arch_string.
10559 * configure.srv: Remove srv_xmltarget. Add XML files that were
10560 mentioned there to srv_xmlfiles instead. Remove conditional tests
10561 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10562 srv_xmlfiles and srv_regobj to include all possible choices.
10563 * configure.ac (srv_xmltarget): Remove.
10564 (srv_xmlfiles): Do not add "target.xml".
10565 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10566 checks for supplementary target information.
10567 * configure: Regenerate.
10568 * Makefile.in (XML_TARGET): Remove.
10569 (target.xml): Remove rule.
10570 (clean): Do not clean up target.xml.
10571 (.PRECIOUS): Do not mention target.xml.
10573 * target.h (struct target_ops): Remove arch_string member.
10574 * linux-low.c (linux_arch_string): Remove.
10575 (linux_target_ops): Remove arch_string initializer.
10576 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10577 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10578 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10579 * spu-low.c (spu_arch_string): Remove.
10580 (spu_target_ops): Remove arch_string initializer.
10581 * win32-low.c (win32_arch_string): Remove.
10582 (win32_target_ops): Remove arch_string initializer.
10583 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10584 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10585 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10587 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10589 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10590 by collect_ptrace_register and supply_ptrace_register hooks.
10591 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10592 instead of checking for the_low_target.left_pad_xfer.
10593 (usr_store_inferior_registers): Use collect_ptrace_register callback
10594 instead of checking for the_low_target.left_pad_xfer.
10596 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10597 (s390_supply_ptrace_register): Likewise.
10598 (s390_fill_gregset): Call s390_collect_ptrace_register.
10599 (the_low_target): Update.
10601 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10602 (ppc_supply_ptrace_register): Likewise.
10603 (the_low_target): Update.
10605 * linux-i386-low.c (the_low_target): Update.
10606 * linux-x86-64-low.c (the_low_target): Update.
10608 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10610 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10611 reg-s390.o and reg-s390x.o.
10613 * linux-low.c (new_inferior): New global variable.
10614 (linux_create_inferior, linux_attach): Set it.
10615 (linux_wait_for_process): Call the_low_target.arch_setup after the
10616 target has stopped for the first time.
10617 (initialize_low): Do not call the_low_target.arch_setup.
10619 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10620 (s390_set_pc): Likewise.
10621 (s390_arch_setup): New function.
10622 (the_low_target): Use s390_arch_setup as arch_setup routine.
10624 * regcache.c (realloc_register_cache): New function.
10625 (set_register_cache): Call it for each existing regcache.
10627 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10629 * server.h (init_registers): Remove prototype.
10631 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10632 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10633 instead of init_registers ().
10634 * linux-arm-low.c (init_registers_arm): Add prototype.
10635 (init_registers_arm_with_iwmmxt): Likewise.
10636 (the_low_target): Add initializer for arch_setup field.
10637 * linux-cris-low.c (init_registers_cris): Add prototype.
10638 (the_low_target): Add initializer for arch_setup field.
10639 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10640 (the_low_target): Add initializer for arch_setup field.
10641 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10642 (the_low_target): Add initializer for arch_setup field.
10643 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10644 (the_low_target): Add initializer for arch_setup field.
10645 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10646 (the_low_target): Add initializer for arch_setup field.
10647 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10648 (the_low_target): Add initializer for arch_setup field.
10649 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10650 (init_registers_mips64_linux): Likewise.
10651 (the_low_target): Add initializer for arch_setup field.
10652 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10653 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10654 (the_low_target): Add initializer for arch_setup field.
10655 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10656 (init_registers_powerpc_64): Likewise.
10657 (the_low_target): Add initializer for arch_setup field.
10658 * linux-s390-low.c (init_registers_s390): Add prototype.
10659 (init_registers_s390x): Likewise.
10660 (the_low_target): Add initializer for arch_setup field.
10661 * linux-sh-low.c (init_registers_sh): Add prototype.
10662 (the_low_target): Add initializer for arch_setup field.
10663 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10664 (the_low_target): Add initializer for arch_setup field.
10665 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10666 (the_low_target): Add initializer for arch_setup field.
10668 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10669 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10670 instead of init_registers ().
10671 * win32-arm-low.c (init_registers_arm): Add prototype.
10672 (the_low_target): Add initializer for arch_setup field.
10673 * win32-i386-low.c (init_registers_i386): Add prototype.
10674 (the_low_target): Add initializer for arch_setup field.
10676 * spu-low.c (init_registers_spu): Add prototype.
10677 (initialize_low): Call initialie_registers_spu () instead of
10678 initialize_registers ().
10680 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10682 * server.c (handle_v_requests): When handling the vRun and vAttach
10683 packets, if already debugging a process, don't kill it. Return an
10686 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10688 * server.c (handle_query): Correct length check.
10690 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10692 * win32-low.c (do_initial_child_stuff): Add process handle
10693 parameter. Set current_process_handle and current_process_id from the
10694 parameters. Clear globals.
10695 (win32_create_inferior): Don't set current_process_handle and
10696 current_process_id here. Instead pass them on the call to
10697 do_initial_child_stuff.
10698 (win32_attach): Likewise.
10699 (win32_clear_inferiors): New.
10700 (win32_kill): Don't close the current process handle or the
10701 current thread handle here. Instead call win32_clear_inferiors.
10702 (win32_detach): Don't open a new handle to the process. Call
10703 win32_clear_inferiors.
10704 (win32_join): Don't rely on current_process_handle; open a new
10705 handle using the process id.
10706 (win32_wait): Call win32_clear_inferiors when the inferior process
10709 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10711 * server.c (monitor_show_help): Add "exit".
10713 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10715 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10716 (clean): Add reg-xtensa.c.
10717 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10718 * configure.srv (xtensa*-*-linux*) New target.
10719 * linux-xtensa-low.c: New.
10720 * xtensa-xtregs.c: New.
10722 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10724 * hostio.c: Don't include errno.h.
10725 (errno_to_fileio_errno): Move to hostio-errno.
10726 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10727 error number outputting to the target->hostio_last_error callback.
10728 (hostio_packet_error): Use FILEIO_EINVAL directly.
10729 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10730 calls to hostio_error.
10731 * hostio-errno.c: New.
10732 * server.h (hostio_last_error_from_errno): Declare.
10733 * target.h (target_ops): Add hostio_last_error member.
10734 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10735 as hostio_last_error handler.
10736 * spu-low.c (spu_target_ops): Likewise.
10737 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10738 (wince_hostio_last_error): New functions.
10739 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10740 as hostio_last_error handler.
10741 (win32_target_ops) [!_WIN32_WCE]: Register
10742 hostio_last_error_from_errno as hostio_last_error handler.
10743 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10744 (hostio-errno.o): New rule.
10745 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10746 * configure.srv (srv_hostio_err_objs): New variable. Default to
10748 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10749 * configure: Regenerate.
10751 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10753 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10754 (linux_kill, linux_detach): Clean up the process list.
10755 * remote-utils.c (remote_open): Improve port number parsing.
10756 (putpkt_binary, input_interrupt): Only send interrupts if the target
10758 * server.c (extended_protocol): Make static.
10759 (attached): Define earlier.
10760 (exit_requested, response_needed, program_argv): New variables.
10761 (target_running): New.
10762 (start_inferior): Clear attached here.
10763 (attach_inferior): Set attached here.
10764 (require_running): Define.
10765 (handle_query): Use require_running and target_running. Implement
10767 (handle_v_attach, handle_v_run): New.
10768 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10769 (gdbserver_usage): Update.
10770 (main): Redo argument parsing. Handle --debug and --multi. Handle
10771 --attach along with other options or after the port. Save
10772 program_argv. Support no initial program. Resynchronize
10773 communication with GDB after an error. Handle "monitor exit".
10774 Use require_running and target_running. Always allow the extended
10775 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10776 restart in extended mode.
10777 * README: Refer to the GDB manual. Update --attach usage.
10779 2007-12-20 Andreas Schwab <schwab@suse.de>
10781 * linux-low.c (STACK_SIZE): Define.
10782 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10783 (linux_test_for_tracefork): Likewise.
10785 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10787 * linux-low.c (linux_wait_for_event): Update messages. Do not
10788 reinsert auto-delete breakpoints.
10789 * mem-break.c (struct breakpoint): Change return type of handler to
10791 (set_breakpoint_at): Update handler type.
10792 (reinsert_breakpoint_handler): Return 1 instead of calling
10794 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10796 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10797 * mem-break.h (set_breakpoint_at): Update handler type.
10798 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10799 * win32-low.c (auto_delete_breakpoint): New.
10800 (get_child_debug_event): Use it.
10802 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10804 * configure.ac: Check for pread and pwrite.
10805 * hostio.c (handle_pread): Fall back to lseek and read.
10806 (handle_pwrite): Fall back to lseek and write.
10807 * config.in, configure: Regenerated.
10809 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10811 * server.c (myresume): Add own_buf argument.
10812 (main): Update calls.
10814 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10816 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10817 * remote-utils.c (remote_open): Do not call disable_async_io.
10818 (block_async_io): Delete.
10819 (unblock_async_io): Make static.
10820 (initialize_async_io): New.
10821 * server.c (handle_v_cont): Handle async I/O here.
10822 (myresume): Likewise. Move other common resume tasks here...
10823 (main): ... from here. Call initialize_async_io. Disable async
10824 I/O before the main loop.
10825 * server.h (initialize_async_io): Declare.
10826 (block_async_io, unblock_async_io): Delete prototypes.
10827 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10829 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10831 * remote-utils.c (readchar): Allow binary data in received messages.
10833 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10835 * win32-low.c (attaching): New global.
10836 (win32_create_inferior): Clear the `attaching' global.
10837 (win32_attach): Set the `attaching' global.
10838 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10839 attaching. Only set a breakpoint at the entry point if not
10842 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10844 * server.c (main): Don't report dll events on the initial
10845 connection on attaches.
10847 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10849 * server.c (main): Relax numerical bases supported for the pid of
10850 the --attach command line argument.
10852 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10854 * win32-low.c (win32_attach): Call OpenProcess before
10855 DebugActiveProcess, not after. Add last error output to error
10858 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10860 * win32-low.c (win32_get_thread_context)
10861 (win32_set_thread_context): New functions.
10862 (thread_rec): Use win32_get_thread_context.
10863 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10864 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10867 2007-12-03 Leo Zayas
10868 Pedro Alves <pedro_alves@portugalmail.pt>
10870 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10872 (child_add_thread): Minor cleanup.
10873 (child_continue): Resume artificially suspended threads before
10874 calling ContinueDebugEvent.
10875 (suspend_one_thread): New.
10876 (fake_breakpoint_event): New.
10877 (get_child_debug_event): Change return type to int. Check here if
10878 gdb sent an interrupt request. If a soft interrupt was requested,
10879 fake a breakpoint event. Return 0 if there is no event to handle,
10881 (win32_wait): Don't check here if gdb sent an interrupt request.
10882 Ensure there is a valid event to handle.
10883 (win32_request_interrupt): Add soft interruption method as last
10886 2007-12-03 Leo Zayas
10887 Pedro Alves <pedro_alves@portugalmail.pt>
10889 * win32-low.h (win32_thread_info): Add descriptions to the
10890 structure members. Replace `suspend_count' counter by a
10892 * win32-low.c (thread_rec): Update condition of when to get the
10893 context from the inferior. Rely on ContextFlags being set if it
10894 has already been retrieved. Only suspend the inferior thread if
10895 we haven't already. Warn if that fails.
10896 (continue_one_thread): s/suspend_count/suspended/. Only call
10897 ResumeThread once. Warn if that fails.
10899 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10901 * win32-low.c (win32_wait): Don't read from the inferior when it
10902 has already exited.
10904 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10906 * Makefile.in (win32_low_h): New variable.
10907 (win32-low.o): Add dependency on $(win32_low_h).
10908 (win32-arm-low.o, win32-i386-low.o): New rules.
10910 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10912 * hostio.c: Correct copyright year.
10914 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10916 * Makefile.in (OBS): Add hostio.o.
10917 (hostio.o): New rule.
10918 * server.h (handle_vFile): Declare.
10919 * hostio.c: New file.
10920 * server.c (handle_v_requests): Take packet_len and new_packet_len
10921 for binary packets. Call handle_vFile.
10922 (main): Update call to handle_v_requests.
10924 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10926 * linux-low.c: Include <sched.h>.
10928 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10930 * linux-low.c (linux_tracefork_grandchild): New.
10931 (linux_tracefork_child): Use clone.
10932 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10934 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10936 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10938 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10940 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10942 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10944 * inferiors.c (change_inferior_id): Delete.
10945 (add_pid_to_list, pull_pid_from_list): New.
10946 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10947 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10948 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10949 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10950 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10951 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10952 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10953 (using_threads): Always set to 1.
10954 (handle_extended_wait): New.
10955 (add_process): Do not set TID.
10956 (linux_create_inferior): Set must_set_ptrace_flags.
10957 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10958 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10959 (linux_thread_alive): Rename TID argument to LWPID.
10960 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10961 (linux_wait_for_event): Do not use TID or check using_threads. Update
10962 call to dead_thread_notify. Call handle_extended_wait.
10963 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10964 (send_sigstop): Delete sigstop_sent.
10965 (wait_for_sigstop): Avoid TID.
10966 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10967 (linux_test_for_tracefork): New.
10968 (linux_lookup_signals): Use thread_db_active and
10969 linux_supports_tracefork_flag.
10970 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10971 * linux-low.h (get_process_thread): Avoid TID.
10972 (struct process_ifo): Move thread_known and tid to the end. Remove
10974 (linux_attach_lwp, thread_db_init): Update prototypes.
10975 * server.h (change_inferior_id): Delete prototype.
10976 (add_pid_to_list, pull_pid_from_list): New prototypes.
10977 * thread-db.c (thread_db_use_events): New.
10978 (find_first_thread): Rename to...
10979 (find_one_thread): ...this. Update callers and messages. Do not
10980 call fatal. Check thread_db_use_events. Do not call
10981 change_inferior_id or new_thread_notify.
10982 (maybe_attach_thread): Update. Do not call new_thread_notify.
10983 (thread_db_init): Set thread_db_use_events. Check use_events.
10984 * utils.c (fatal, warning): Correct message prefix.
10986 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10988 * Makefile.in (clean): Remove new files.
10989 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10990 (powerpc-64.o, powerpc-64.c): New rules.
10991 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10992 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10994 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10996 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10997 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10998 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10999 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
11000 (target_regsets): Add AltiVec and SPE register sets.
11001 * configure.ac: Check for AltiVec and SPE.
11002 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
11003 (ppc_fill_vrregset, ppc_store_vrregset): New.
11004 (target_regsets): Add AltiVec register set.
11005 * configure: Regenerated.
11007 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
11009 * linux-low.c (O_LARGEFILE): Define.
11010 (linux_read_memory): Use /proc/PID/mem.
11011 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
11012 * configure, config.in: Regenerated.
11014 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
11016 * linux-low.c (linux_wait_for_event): Do not pass signals while
11019 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11021 * win32-low.c (create_process): New.
11022 (win32_create_inferior): Use create_process instead of
11023 CreateProcess. If create_process failed retry appending an ".exe"
11024 suffix. Store the GetLastError result immediatelly after
11025 create_process calls and use it on the call to error.
11027 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
11029 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
11031 2007-08-23 Joel Brobecker <brobecker@adacore.com>
11033 * configure.ac: Switch license to GPLv3.
11035 2007-08-01 Michael Snyder <msnyder@access-company.com>
11037 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
11039 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
11041 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
11043 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
11044 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
11045 CloseToolhelp32Snapshot.
11046 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
11047 CloseToolhelp32Snapshot.
11049 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
11051 * server.c (main): Check for inferior exit before main loop.
11053 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
11055 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
11056 instead of on tmp_desc.
11058 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
11059 Daniel Jacobowitz <dan@codesourcery.com>
11061 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
11062 (add_thread): Minor cleanups.
11063 (clear_inferiors): Move lower in the file. Clear the DLL
11065 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
11066 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
11067 (xml_escape_text): New.
11068 * server.c (handle_query): Handle qXfer:libraries:read. Report it
11070 (handle_v_cont): Report errors.
11071 (gdbserver_version): Update.
11072 (main): Correct size of own_buf. Do not report initial DLL events.
11073 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
11074 (unloaded_dll, xml_escape_text): New.
11075 * win32-low.c (enum target_waitkind): Update comments.
11076 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
11077 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
11078 (win32_EnumProcessModules, win32_GetModuleInformation)
11079 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
11080 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
11081 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
11082 (win32_Module32First, win32_Module32Next, load_toolhelp)
11083 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
11084 (get_child_debug_event): Handle DLL events.
11085 (win32_wait): Likewise.
11087 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11089 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
11090 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
11092 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11094 * win32-low.c (handle_output_debug_string): Ignore event if not
11097 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
11099 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
11101 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
11103 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
11105 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
11107 * inferiors.c (change_inferior_id): Add comment.
11108 * linux-low.c (check_removed_breakpoint): Add an early
11109 prototype. Improve debug output.
11110 (linux_attach): Doc update.
11111 (linux_detach_one_process, linux_detach): Clean up before releasing
11113 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
11114 * linux-low.h (struct process_info): Doc improvement.
11115 * mem-break.c (delete_all_breakpoints): New.
11116 * mem-break.h (delete_all_breakpoints): New prototype.
11117 * thread-db.c (find_first_thread): New.
11118 (thread_db_create_event): Call it instead of
11119 thread_db_find_new_threads. Clean up unused variables.
11120 (maybe_attach_thread): Remove first thread handling.
11121 (thread_db_find_new_threads): Use find_first_thread.
11122 (thread_db_get_tls_address): Likewise.
11124 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
11126 * thread-db.c (thread_db_find_new_threads): Add prototype.
11127 (thread_db_create_event): Check for the main thread before adding
11129 (maybe_attach_thread): Only enable event reporting if TID == 0.
11130 (thread_db_get_tls_address): Check for new threads.
11132 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
11134 * linux-low.c (linux_create_inferior): Try execv before execvp.
11135 * spu-low.c (spu_create_inferior): Likewise.
11137 2007-06-13 Mike Frysinger <vapier@gentoo.org>
11139 * linux-low.c (linux_create_inferior): Change execv to execvp.
11140 * spu-low.c (spu_create_inferior): Likewies.
11142 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
11144 * Makefile.in (clean): Clean new files instead of deleted ones.
11145 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
11146 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
11148 * configure.srv: Specify XML files and new regformats for MIPS and
11150 * linux-mips-low.c (mips_num_regs): Set to only used registers.
11151 (mips_regmap): Do not fetch $0. Remove unused registers. Add
11152 an entry for the restart register.
11153 (mips_cannot_fetch_register, mips_cannot_store_register)
11154 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
11155 register names to match the XML descriptions.
11156 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
11157 restart register instead of $0.
11159 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11160 Markus Deuling <deuling@de.ibm.com>
11162 * remote-utils.c (decode_xfer_write): New function.
11163 * server.h (decode_xfer_write): Add prototype.
11164 * server.c (handle_query): Add PACKET_LEN argument. Support
11165 qXfer:spu:read and qXfer:spu:write packets.
11166 (main): Pass packet_len to handle_query.
11167 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11168 * target.h (target_ops): Add qxfer_spu.
11170 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11172 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11173 accessing non-seekable spufs files.
11175 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11177 * server.c (handle_query): Add reply for qC packet.
11179 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11180 Leo Zayas <lerele@champenstudios@com>
11182 * server.h (check_remote_input_interrupt_request): New function.
11183 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11184 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11185 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11186 (check_remote_input_interrupt_request): New function.
11187 * server.h (check_remote_input_interrupt_request): Declare.
11188 * win32-low.c (winapi_DebugBreakProcess,
11189 winapi_GenerateConsoleCtrlEvent): New typedefs.
11190 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11192 (win32_wait): Check for remote interrupt request
11193 with check_remote_input_interrupt_request.
11194 (win32_request_interrupt): New function.
11195 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11197 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11199 * win32-low.c (debug_registers_changed,
11200 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11201 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11202 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11203 (thread_rec): Get context using the low target.
11204 (child_add_thread): Call thread_added on the low target,
11205 which does the same thing.
11207 (do_initial_child_stuff): Remove debug registers references.
11208 Set context using the low target. Resume threads after
11209 setting the contexts.
11210 (child_continue): Remove dead variable. Remove debug
11211 registers references.
11212 (child_fetch_inferior_registers): Go through the low target.
11213 (do_child_store_inferior_registers): Remove.
11214 (child_store_inferior_registers): Go through the low target.
11215 (win32_resume): Remove debug registers references.
11216 Set context using the low target.
11217 (handle_exception): Change return type to void. Don't record
11218 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11219 first chance exception.
11220 (get_child_debug_event): Change return type to void. Remove
11221 goto loop. Always return after waiting for debug event.
11222 (win32_wait): Convert to switch statement. Handle spurious
11225 * win32-i386-low.c (debug_registers_changed,
11226 debug_registers_used): New.
11227 (initial_stuff): Rename to ...
11228 (i386_initial_stuff): ... this. Clear debug registers
11230 (store_debug_registers): Delete.
11231 (i386_get_thread_context): New.
11232 (load_debug_registers): Delete.
11233 (i386_set_thread_context): New.
11234 (i386_thread_added): New.
11235 (single_step): Rename to ...
11236 (i386_single_step): ... this.
11237 (do_fetch_inferior_registers): Rename to ...
11238 (i386_fetch_inferior_register): ... this.
11239 (i386_store_inferior_register): New.
11240 (the_low_target): Adapt to new interface.
11242 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11243 (arm_get_thread_context): New.
11244 (arm_set_thread_context): New.
11246 (do_fetch_inferior_registers): Rename to ...
11247 (arm_fetch_inferior_register): ... this.
11248 (arm_store_inferior_register): New.
11249 (arm_wince_breakpoint): Reimplement as unsigned long.
11250 (arm_wince_breakpoint_len): Define.
11251 (the_low_target): Adapt to new interface.
11253 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11254 load_debug_registers. Add get_thread_context, set_thread_context,
11255 thread_added and store_inferior_register. Rename
11256 fetch_inferior_registers to fetch_inferior_register.
11257 (regptr): Remove declaration.
11259 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11261 * linux-low.c (linux_detach): Change return type to int. Return 0.
11262 * spu-low.c (spu_detach): Likewise.
11264 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11266 * target.h (target_ops): Change return type of detach to int.
11268 (join_inferior): New.
11269 * server.c (main): Don't skip detach support on mingw32.
11270 If the inferior doesn't support detaching return error.
11271 Call join_inferior instead of using waitpid.
11272 * linux-low.c (linux_join): New.
11273 (linux_target_op): Add linux_join.
11274 * spu-low.c (spu_join): New.
11275 (spu_target_ops): Add spu_join.
11276 * win32-low.c (win32_detach): Adapt to new interface.
11277 Reopen current_process_handle before detaching. Issue a child
11278 resume before detaching.
11280 (win32_target_op): Add win32_join.
11282 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11284 * win32-low.c (win32-attach): Fix return value.
11285 * target.h (target_ops): Describe ATTACH return values.
11287 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11289 * win32-low.c (GETPROCADDRESS): Define.
11290 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11291 (winapi_DebugSetProcessKillOnExit): Likewise.
11292 (win32_create_inferior): Force usage of ansi CreateProcessA.
11293 (win32_attach): Use GETPROCADDRESS.
11294 (win32_detach): Likewise.
11296 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11298 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11300 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11302 * win32-low.c: Commit leftover changes from 2007-03-29.
11304 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11306 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11307 fields short instead of int. Add explicit padding.
11308 (i387_cache_to_fsave): Remove unnecessary casts.
11309 (i387_fsave_to_cache): Doc fix.
11310 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11312 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11314 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11315 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11317 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11319 * configure.srv (arm*-*-mingw32ce*): Move near the other
11322 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11324 * configure.ac: Add errno checking.
11325 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11326 sys/file.h and malloc.h.
11327 (AC_CHECK_DECLS): Add perror.
11328 (srv_mingwce): Handle.
11329 * configure.srv (i[34567]86-*-cygwin*): Add
11330 win32-i386-low.o to srv_tgtobj.
11331 (i[34567]86-*-mingw*): Likewise.
11332 (arm*-*-mingw32ce*): Add case.
11333 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11334 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11335 [__MINGW32CE__] (strerror): New function.
11336 [__MINGW32CE__] (errno): Define to GetLastError.
11337 [__MINGW32CE__] (COUNTOF): New macro.
11338 (remote_open): Remove extra close call.
11339 * mem-break.c (delete_breakpoint_at): New function.
11340 * mem-break.h (delete_breakpoint_at): Declare.
11341 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11342 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11343 [USE_WIN32API] (read, write): Add char* casts.
11344 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11345 * server.h: Include wincecompat.h on Windows CE.
11346 [HAVE_ERRNO_H]: Check.
11347 (perror): Declare if not declared.
11348 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11349 (perror_with_name): Remove errno declaration.
11350 * wincecompat.h: New.
11351 * wincecompat.c: New.
11352 * win32-low.h: New.
11353 * win32-arm-low.c: New.
11354 * win32-i386-low.c: New.
11355 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11356 (OUTMSG2): Make it safe.
11358 (COUNTOF): New macro.
11359 (NUM_REGS): Get it from the low target.
11360 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11361 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11362 (thread_rec): Let low target handle debug registers.
11363 (child_add_thread): Likewise.
11364 (child_init_thread_list): Likewise.
11365 (continue_one_thread): Likewise.
11367 (do_child_fetch_inferior_registers): Move to ...
11368 * win32-i386-low.c: ... here, and rename to ...
11369 (do_fetch_inferior_registers): ... this.
11370 * win32-low.c (child_fetch_inferior_registers):
11371 Go through the low target.
11372 (do_child_store_inferior_registers): Use regptr.
11373 (strwinerror): New function.
11374 (win32_create_inferior): Handle Windows CE.
11375 Use strwinerror instead of strerror on Windows error
11376 codes. Add program to the error output.
11377 Don't close the main thread handle on Windows CE.
11378 (win32_attach): Use coredll.dll on Windows CE.
11379 (win32_kill): Close current process and current
11381 (win32_detach): Use coredll.dll on Windows CE.
11382 (win32_resume): Let low target handle debug registers, and
11384 (handle_exception): Add/Remove initial breakpoint. Avoid
11385 non-existant WSTOPSIG on Windows CE.
11386 (win32_read_inferior_memory): Cast to remove warning.
11387 (win32_arch_string): Go through the low target.
11388 (initialize_low): Call set_breakpoint_data with the low
11389 target's breakpoint.
11390 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11391 FOP_REGNUM, mappings): Move to ...
11392 * win32-i386-low.c: ... here.
11393 * win32-low.c (win32_thread_info): Move to ...
11394 * win32-low.h: ... here.
11395 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11396 win32-arm-low.c and wincecompat.c.
11397 (all:): Add $EXEEXT.
11398 (install-only:): Likewise.
11399 (gdbserver:): Likewise.
11400 (gdbreplay:): Likewise.
11401 * config.in: Regenerate.
11402 * configure: Regenerate.
11404 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11406 * win32-low.c: Rename typedef thread_info to
11407 win32_thread_info throughout.
11409 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11411 * win32-i386-low.c: Rename to ...
11412 * win32-low.c: ... this.
11413 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11414 * Makefile.in: Likewise.
11416 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11418 * remote-utils.c (monitor_output): Constify msg parameter.
11419 * server.h (monitor_output): Likewise.
11420 * win32-i386-low.c (handle_output_debug_string): New.
11421 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11422 handle_output_debug_string.
11423 (get_child_debug_event): Likewise.
11425 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11427 * server.c (main): Correct strtoul check.
11429 2007-03-27 Jon Ringle <jon@ringle.org>
11431 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11433 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11435 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11437 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11439 * terminal.h: Check HAVE_SGTTY_H.
11441 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11443 * remote-utils.c (remote_open): Print out the assigned port number.
11445 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11447 * remote-utils.c (monitor_output): New function.
11448 * server.c (debug_threads): Define here.
11449 (monitor_show_help): New function.
11450 (handle_query): Handle qRcmd.
11451 (main): Do not handle 'd' packet.
11452 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11453 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11456 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11458 * Makefile.in (EXEEXT): New.
11459 (clean): Use $(EXEEXT).
11461 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11463 * target.h (target_ops): Rename send_signal to request_interrupt,
11464 and remove enum target_signal parameter.
11465 * linux-low.c (linux_request_interrupt): Rename from
11466 linux_send_signal, and always send SIGINT.
11467 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11468 and always send SIGINT.
11469 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11471 (input_interrupt): Likewise.
11473 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11475 * server.c (get_features_xml): Check if target implemented
11477 * win32-i386-low.c (win32_arch_string): New.
11478 (win32_target_ops): Add win32_arch_string as arch_string member.
11480 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11482 * spu-low.c (spu_arch_string): New.
11483 (spu_target_ops): Add spu_arch_string.
11485 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11487 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11488 * configure.ac: Do not check for terminal.h.
11489 * configure, config.in: Regenerated.
11491 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11493 * Makefile.in (OBS): Add $(XML_BUILTIN).
11494 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11496 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11497 (arm-with-iwmmxt.c): New.
11498 * config.in, configure: Regenerate.
11499 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11500 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11501 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11502 (arm*-*-linux*): Add iWMMXt and regset support.
11503 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11504 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11505 (arm_store_wmmxregset, target_regsets): New.
11506 * server.c (get_features_xml): Take annex argument. Check builtin
11508 (handle_query): Handle multiple annexes.
11510 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11512 * remote-utils.c [USE_WIN32API] (read, write): Define.
11513 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11516 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11518 * linux-i386-low.c (the_low_target): Set arch_string.
11519 * linux-x86-64-low.c (the_low_target): Likewise.
11520 * linux-low.c (linux_arch_string): New.
11521 (linux_target_ops): Add it.
11522 * linux-low.h (struct linux_target_ops): Add arch_string.
11523 * server.c (write_qxfer_response): Use const void * for DATA.
11524 (get_features_xml): New.
11525 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11526 * target.h (struct target_ops): Add arch_string method.
11528 2007-01-03 Denis Pilat <denis.pilat@st.com>
11529 Daniel Jacobowitz <dan@codesourcery.com>
11531 * linux-low.c (linux_kill): Handle being called with no threads.
11532 * win32-i386-low.c (win32_kill): Likewise.
11533 (get_child_debug_event): Clear current_process_handle.
11535 2006-12-30 Denis PILAT <denis.pilat@st.com>
11536 Daniel Jacobowitz <dan@codesourcery.com>
11538 * remote-utils.c (remote_open): Check the type of specified
11539 serial port devices before opening them.
11540 * server.c (main): Kill the inferior if an error occurs during
11541 the first remote_open.
11543 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11545 * README: Update supported targets.
11547 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11549 * Makefile.in (clean): Remove reg-mips64.c.
11550 (reg-mips64.c, reg-mips64.o): New rules.
11551 * configure.srv: Handle mips64. Include regset support for mips.
11552 * linux-mips-low.c (union mips_register): New.
11553 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11554 (mips_breakpoint, mips_breakpoint_at): Use int.
11555 (mips_collect_register, mips_supply_register)
11556 (mips_collect_register_32bit, mips_supply_register_32bit)
11557 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11558 (mips_store_fpregset, target_regsets): New.
11559 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11561 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11563 * configure.srv: Add target "spu*-*-*".
11564 * Makefile.in (clean): Remove reg-spu.c.
11565 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11566 * spu-low.c: New file.
11568 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11570 * configure.ac: Correct td_thr_tls_get_addr test.
11571 * configure: Regenerated.
11573 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11575 * linux-low.c (linux_wait_for_event): Reformat. Use the
11576 pass_signals array.
11577 * remote-utils.c (decode_address_to_semicolon): New.
11578 * server.c (pass_signals, handle_general_set): New.
11579 (handle_query): Mention QPassSignals for qSupported.
11580 (main): Call handle_general_set.
11581 * server.h (pass_signals, decode_address_to_semicolon): New.
11583 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11585 * server.c (handle_query): Correct error handling for read_auxv.
11587 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11589 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11590 and srv_linux_thread_db to yes.
11591 * linux-s390-low.c (s390_fill_gregset): New function.
11592 (target_regsets): Define data structure.
11594 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11596 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11597 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11598 * config.in, configure: Regenerated.
11599 * inferiors.c (gdb_id_to_thread): New function.
11600 (gdb_id_to_thread_id): Use it.
11601 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11602 * linux-low.h (struct process_info): Add th member.
11603 (thread_db_get_tls_address): New prototype.
11604 * remote-utils.c (decode_address): Make non-static.
11605 * server.c (handle_query): Handle qGetTLSAddr.
11606 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11607 * target.h (struct target_ops): Add get_tls_address.
11608 * thread-db.c (maybe_attach_thread): Save the thread handle.
11609 (thread_db_get_tls_address): New.
11611 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11613 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11614 (linux_resume_one_process): Take a siginfo_t *. Update all
11615 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11616 (struct pending_signals): Add a siginfo_t.
11617 (linux_wait_for_process): Always set last_status.
11618 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11619 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11620 * linux-low.h (struct process_info): Add last_status.
11622 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11624 * remote-utils.c (try_rle): New function.
11625 (putpkt_binary): Use it.
11627 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11629 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11630 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11631 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11632 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11633 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11636 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11638 * server.c (terminal_fd): New variable.
11639 (old_foreground_pgrp): Likewise.
11640 (restore_old_foreground_pgrp): New function.
11641 (start_inferior): Record the terminal file descriptor in terminal_fd
11642 and its original foreground group in old_foreground_pgrp. Register
11643 restore_old_foreground_pgrp with atexit().
11645 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11647 * server.c (handle_query): Correct qPart to qXfer.
11649 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11651 * configure.ac: Check for more headers which are missing on
11652 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11653 * configure.srv: Add Cygwin and mingw32.
11654 * remote-utils.c: Don't include headers unconditionally which
11655 are missing on mingw32. Include <winsock.h> for mingw32.
11656 (remote_open): Adjust for mingw32 support. Flush
11657 standard error after writing to it.
11658 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11659 (unblock_async_io, enable_async_io, disable_async_io)
11660 (readchar, getpkt): Update for Winsock support.
11661 (prepare_resume_reply): Expect a protocol signal number.
11662 * server.c: Disable <sys/wait.h> on mingw32.
11663 (start_inferior): Adjust for mingw32 support. Flush
11664 standard error after writing to it.
11665 (attach_inferior): Likewise. Use protocol signal
11667 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11669 * win32-i386-low.c: New file.
11670 * Makefile.in (XM_CLIBS): Set.
11671 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11672 (win32-i386-low.o): New dependency rule.
11673 * linux-low.c (linux_wait): Use target signal numbers.
11674 * target.h (struct target_ops): Doc fix.
11675 * server.h (target_signal_to_name): New prototype.
11676 * gdbreplay.c: Don't include headers unconditionally which
11677 are missing on mingw32. Include <winsock.h> for mingw32.
11678 (remote_close, remote_open): Adjust for Winsock support.
11679 * configure, config.in: Regenerated.
11681 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11683 * server.c (decode_xfer_read, write_qxfer_response): New.
11684 (handle_query): Take a packet length argument. Handle
11685 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11686 the qSupported response.
11687 (main): Update call to handle_query.
11689 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11691 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11692 (putpkt_binary): Renamed from putpkt and adjusted for binary
11694 (putpkt): New wrapper for putpkt_binary.
11695 (readchar): Don't mask off the high bit.
11696 (decode_X_packet): New function.
11697 * server.c (main): Call putpkt_binary if a handler sets the packet
11698 length. Save the length of the incoming packet. Handle 'X'.
11699 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11701 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11703 * server.c (handle_query): Handle qSupported.
11705 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11707 * remote-utils.c (all_symbols_looked_up): New variable.
11708 (look_up_one_symbol): Check it.
11709 * server.h (look_up_one_symbol): New declaration.
11710 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11712 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11714 * Makefile.in (linux-arm-low.o): Update dependencies.
11715 * linux-arm-low.c: Include "gdb_proc_service.h".
11716 (PTRACE_GET_THREAD_AREA): Define.
11717 (ps_get_thread_area): New function.
11719 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11721 * configure.srv (m68k*-*-uclinux*): New target.
11722 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11723 (linux_resume_one_process): Remove extraneous cast.
11724 (linux_read_offsets): New.
11725 (linux_target_op): Add linux_read_offsets on mmuless systems.
11726 * server.c (handle_query): Add qOffsets logic.
11727 * target.h (struct target_ops): Add read_offsets.
11729 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11731 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11732 (PTRACE_GET_THREAD_AREA): Define.
11733 (ps_get_thread_area): New function.
11734 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11735 (linux-x86-64-low.o): Update.
11737 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11739 * configure.ac: Remove checks for prfpregset_t.
11740 * gdb_proc_service.h: New file.
11741 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11742 new "gdb_proc_service.h".
11743 * proc-service.c: Likewise.
11744 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11745 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11746 * Makefile.in (gdb_proc_service_h): Updated.
11747 * configure, config.in: Regenerated.
11749 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11751 * remote-utils.c (prepare_resume_reply): Move declaration
11752 of gdb_id_from_wait to the top of the block.
11754 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11756 * linux-low.c (regsets_store_inferior_registers): Read the regset
11757 from the target before filling it.
11759 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11761 * server.c (attach_inferior): Return SIGTRAP for a successful
11764 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11766 * Makefile.in (OBS): Add version.o.
11767 (STAGESTUFF): Delete.
11768 (version.o): Add dependencies.
11769 (version.c): Replace rule.
11770 (clean): Remove version.c.
11771 * server.c (gdbserver_version): New.
11772 (gdbserver_usage): Use printf.
11773 (main): Handle --version and --help.
11774 * server.h (version, host_name): Add declarations.
11776 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11788 * linux-x86-64-low.c:
11790 * linux-s390-low.c:
11791 * linux-ppc64-low.c:
11793 * linux-mips-low.c:
11794 * linux-m68k-low.c:
11795 * linux-m32r-low.c:
11798 * linux-ia64-low.c:
11799 * linux-i386-low.c:
11800 * linux-crisv32-low.c:
11812 * gdbserver.1: Add (C) after Copyright. Update the FSF
11815 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11817 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11818 (arm_breakpoint_at): Recognize both breakpoints.
11819 (the_low_target): Use the correct breakpoint instruction.
11821 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11823 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11824 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11825 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11826 (the_low_target): Update.
11828 2005-10-25 Andreas Schwab <schwab@suse.de>
11830 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11832 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11833 (ia64_num_regs): Reduce to 462.
11835 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11837 * acinclude.m4: Correct quoting.
11838 * aclocal.m4: Regenerated.
11840 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11841 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11842 (thread_db_init): Call thread_db_err_str.
11843 * configure.ac: Check for TD_VERSION.
11844 * config.in, configure: Regenerated.
11846 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11848 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11850 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11852 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11853 is not available. Define HAVE_PTRACE_GETREGS if it is.
11854 * config.in, configure: Regenerated.
11855 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11856 * linux-i386-low.c, linux-m68k-low.c: Update to use
11857 HAVE_PTRACE_GETREGS.
11858 * linux-low.c (regsets_fetch_inferior_registers)
11859 (regsets_store_inferior_registers): Only return 0 if we processed
11861 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11862 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11864 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11866 * inferiors.c (struct thread_info): Add gdb_id.
11867 (add_thread): Add gdb_id argument.
11868 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11869 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11870 calls to add_thread.
11871 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11872 * server.c (handle_query): Use thread_to_gdb_id.
11873 (handle_v_cont, main): Use gdb_id_to_thread_id.
11874 * server.h (add_thread): Update prototype.
11875 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11878 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11880 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11881 left-padded registers.
11882 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11883 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11885 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11887 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11888 * configure: Regenerate.
11889 * config.in: Regenerate.
11890 * server.h (NEED_DECLARATION_STRERROR):
11891 Replace with !HAVE_DECL_STRERROR.
11893 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11895 * linux-low.c (linux_wait, linux_send_signal): Don't test
11896 an unsigned long variable for > 0 if it could be MAX_ULONG.
11897 * server.c (myresume): Likewise.
11898 * target.c (set_desired_inferior): Likewise.
11900 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11902 * configure.ac: Simplify and improve check for socklen_t.
11903 * configure, config.in: Regenerate.
11905 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11907 * acconfig.h: Remove.
11908 * configure.ac: Add a test for socklen_t. Use three-argument
11909 AC_DEFINE throughout.
11910 * config.in: Regenerated using autoheader 2.59.
11911 * configure: Regenerated.
11913 * gdbreplay.c (socklen_t): Provide a default.
11914 (remote_open): Use socklen_t.
11915 * remote-utils.c (socklen_t): Provide a default.
11916 (remote_open): Use socklen_t.
11917 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11920 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11922 * linux-low.c (linux_read_memory, linux_write_memory)
11923 (linux_read_auxv): Likewise.
11924 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11925 (check_mem_write): Likewise.
11926 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11928 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11929 (registers_from_string, register_data): Likewise.
11930 * server.c (handle_query, main): Likewise.
11931 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11932 (decode_M_packet): Likewise.
11933 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11934 * target.h (struct target_ops): Update read_memory, write_memory,
11936 (read_inferior_memory, write_inferior_memory): Update.
11937 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11938 to unsigned char *.
11939 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11940 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11941 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11942 linux-s390-low.c, linux-sh-low.c: Update for changes in
11943 read_inferior_memory and the_low_target->breakpoint.
11945 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11947 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11948 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11949 * configure.srv: Add powerpc64-*-linux*.
11950 * linux-ppc64-low.c: New file.
11952 2005-05-23 Orjan Friberg <orjanf@axis.com>
11954 * linux-cris-low.c: New file with support for CRIS.
11955 * linux-crisv32-low.c: Ditto for CRISv32.
11956 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11957 (clean): Add reg-cris.c and reg-crisv32.c.
11958 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11959 reg-crisv32.o, and reg-crisv32.c to make rules.
11960 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11961 recognized targets.
11963 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11965 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11966 of sizeof (PTRACE_XFER_TYPE).
11967 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11969 2005-05-12 Orjan Friberg <orjanf@axis.com>
11971 * target.h (struct target_ops): Add insert_watchpoint,
11972 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11973 pointers for hardware watchpoint support.
11974 * linux-low.h (struct linux_target_ops): Ditto.
11975 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11976 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11977 to linux_target_ops.
11978 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11980 * server.c (main): Recognize 'Z' and 'z' packets.
11982 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11984 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11985 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11986 (the_low_target): Add new members.
11988 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11990 * proc-service.c (ps_lgetregs): Search all_processes instead of
11993 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11995 * server.c (start_inferior): Change return type to int.
11996 (attach_inferior): Change sigptr to int *.
11997 (handle_v_cont, handle_v_requests): Change signal to int *.
11998 (main): Change signal to int.
12000 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
12002 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
12003 * configure.srv: Add m32r*-*-linux*.
12004 * linux-m32r-low.c: New file.
12006 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
12008 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
12010 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
12012 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
12013 Take unsigned long arguments for PIDs.
12014 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
12015 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
12016 (wait_for_sigstop, linux_resume_one_process)
12017 (regsets_fetch_inferior_registers, linux_send_signal)
12018 (linux_read_auxv): Likewise. Update the types of variables holding
12019 PIDs. Update format string specifiers.
12020 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
12021 * remote-utils.c (prepare_resume_reply): Likewise.
12022 * server.c (cont_thread, general_thread, step_thread)
12023 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
12025 (handle_query): Update format specifiers.
12026 (handle_v_cont, main): Use strtoul for thread IDs.
12027 * server.h (struct inferior_list_entry): Use unsigned long for ID.
12028 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
12029 (general_thread, step_thread, thread_from_wait)
12030 (old_thread_from_wait): Update.
12031 * target.h (struct thread_resume): Use unsigned long for THREAD.
12032 (struct target_ops): Use unsigned long for arguments to attach and
12035 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
12037 * acinclude.m4: Include bfd/bfd.m4 directly.
12038 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
12039 <agriffis@toolchain.org>.
12040 * aclocal.m4, configure: Regenerated.
12042 2005-01-07 Andrew Cagney <cagney@gnu.org>
12044 * configure.ac: Rename configure.in, require autoconf 2.59.
12045 * configure: Re-generate.
12047 2004-12-08 Daniel Jacobowitz <dan@debian.org>
12049 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
12050 LIBS when finished.
12051 * aclocal.m4: Regenerated.
12052 * configure: Regenerated.
12054 2004-11-21 Andreas Schwab <schwab@suse.de>
12056 * linux-m68k-low.c (m68k_num_gregs): Define.
12057 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
12058 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
12059 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
12060 (m68k_breakpoint_at): New. Add to the_low_target.
12062 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
12063 srv_linux_thread_db to yes.
12065 2004-10-20 Joel Brobecker <brobecker@gnat.com>
12067 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
12068 (ARCH_SET_FS): Likewise.
12069 (ARCH_GET_FS): Likewise.
12070 (ARCH_GET_GS): Likewise.
12072 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12074 * linux-i386-low.c (ps_get_thread_area): New.
12075 * linux-x86-64-low.c (ps_get_thread_area): New.
12076 * linux-low.c: Include <sys/syscall.h>.
12077 (linux_kill_one_process): Don't kill the first thread here.
12078 (linux_kill): Kill the first thread here.
12079 (kill_lwp): New function.
12080 (send_sigstop, linux_send_signal): Use it.
12081 * proc-service.c: Clean up #ifdefs.
12082 (fpregset_info): Delete.
12083 (ps_lgetregs): Update and enable implementation.
12084 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
12086 * remote-utils.c (struct sym_cache, symbol_cache): New.
12087 (input_interrupt): Print a clearer message.
12088 (async_io_enabled): New variable.
12089 (enable_async_io, disable_async_io): Use it. Update comments.
12090 (look_up_one_symbol): Use the symbol cache.
12091 * thread-db.c (thread_db_look_up_symbols): New function.
12092 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
12094 2004-10-16 Daniel Jacobowitz <dan@debian.org>
12096 * configure.in: Test for -rdynamic.
12097 * configure: Regenerated.
12098 * Makefile (INTERNAL_LDFLAGS): New.
12099 (gdbserver, gdbreplay): Use it.
12101 2004-09-02 Andrew Cagney <cagney@gnu.org>
12103 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
12105 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
12107 * linux-low.c (linux_wait): Clear all_processes list also.
12109 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12111 * linux-low.c: Include <errno.h>. Remove extern declaration of
12114 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
12116 * gdbreplay.c, server.h, utils.c: Update copyright years.
12118 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12120 * server.c (main): Print child status or termination signal from
12121 variable 'signal', not 'sig'.
12123 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
12125 * linux-low.c (linux_read_memory): Change return type to
12126 int. Check for and return error from ptrace().
12127 * target.c (read_inferior_memory): Change return type to int. Pass
12128 back return status from the_target->read_memory().
12129 * target.h (struct target_ops): Adapt *read_memory() prototype.
12131 (read_inferior_memory): Adapt prototype.
12132 * server.c (main): Return an error packet if
12133 read_inferior_memory() returns an error.
12135 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
12137 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
12138 Unify with other clean targets.
12140 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12142 * server.c (handle_v_cont): Call set_desired_inferior.
12144 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12146 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
12148 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12150 * linux-low.c (linux_wait): Unblock async I/O.
12151 (linux_resume): Block and enable async I/O.
12152 * remote-utils.c (block_async_io, unblock_async_io): New functions.
12153 * server.h (block_async_io, unblock_async_io): Add prototypes.
12155 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12157 * remote-utils.c (remote_open): Print a status notice after
12158 opening a TCP port.
12159 * server.c (attach_inferior): Print a status notice after
12162 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12164 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12166 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12168 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12170 * server.c, target.h: Update copyright years.
12172 2004-02-25 Roland McGrath <roland@redhat.com>
12174 * target.h (struct target_ops): New member `read_auxv'.
12175 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12176 * linux-low.c (linux_read_auxv): New function.
12177 (linux_target_ops): Initialize `read_auxv' member to that.
12179 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12181 Committed by Jim Blandy <jimb@redhat.com>.
12183 * linux-s390-low.c (s390_num_regs): Update.
12184 (s390_regmap): Remove control registers. Use __s390x__ predefine
12185 instead of GPR_SIZE to distiguish s390 and s390x targets.
12187 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12189 * linux-low.c: Update copyright year.
12190 (check_removed_breakpoint): Clear pending_is_breakpoint.
12191 (linux_set_resume_request, linux_queue_one_thread)
12192 (resume_status_pending_p): New functions.
12193 (linux_continue_one_thread): Use process->resume.
12194 (linux_resume): Only resume threads if there are no pending events.
12195 * linux-low.h (struct process_info): Add resume request
12198 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12200 * regcache.c (new_register_cache): Clear the allocated register
12201 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12203 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12205 * linux-low.c (linux_resume): Take a struct thread_resume *
12207 (linux_wait): Update call.
12208 (resume_ptr): New static variable.
12209 (linux_continue_one_thread): Renamed from
12210 linux_continue_one_process. Use resume_ptr.
12211 (linux_resume): Use linux_continue_one_thread.
12212 * server.c (handle_v_cont, handle_v_requests): New functions.
12213 (myresume): New function.
12214 (main): Handle 'v' case.
12215 * target.h (struct thread_resume): New type.
12216 (struct target_ops): Change argument of "resume" to struct
12218 (myresume): Delete macro.
12220 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12222 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12223 (uninstall): Support DESTDIR.
12225 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12227 * configure.srv: Add xscale*linux copy of arm*linux entry.
12229 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12231 * linux-arm-low.c (arm_reinsert_addr): New function.
12232 (the_low_target): Add arm_reinsert_addr.
12234 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12236 * mem-break.c: Remove whitespace at end of file.
12238 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12240 * configure.in: Check whether we need to prototype strerror.
12241 * server.h: Optionally prototype strerror.
12242 * gdbreplay.c (perror_with_name): Use strerror.
12243 * linux-low.c (linux_attach_lwp): Use strerror.
12244 * utils.c (perror_with_name): Use strerror.
12245 * config.in, configure: Regenerated.
12247 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12249 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12250 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12252 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12254 * Makefile.in (SFILES): Update.
12255 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12256 low-sun3.c: Remove files.
12258 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12260 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12261 (linux_detach_one_process, linux_detach): New functions.
12262 (linux_target_ops): Add linux_detach.
12263 * server.c (main): Handle 'D' packet.
12264 * target.h (struct target_ops): Add "detach" member.
12265 (detach_inferior): Define.
12267 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12269 From Kelley Cook <kelleycook@wideopenwest.com>:
12270 * configure.srv: Accept i[34567]86 variants.
12272 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12274 * linux-low.c (linux_wait_for_event): Correct comment typos.
12275 (linux_resume_one_process): Call check_removed_breakpoint.
12276 (linux_send_signal): New function.
12277 (linux_target_ops): Add linux_send_signal.
12278 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12280 * target.h (struct target_ops): Add send_signal.
12282 2003-05-29 Jim Blandy <jimb@redhat.com>
12284 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12285 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12286 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12287 away part of the register's value.
12289 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12291 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12292 (linux_wait_for_event, linux_init_signals): Likewise.
12294 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12296 * configure.in: Check for stdlib.h.
12297 * configure: Regenerated.
12298 * config.in: Regenerated.
12300 2003-01-04 Andreas Schwab <schwab@suse.de>
12302 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12304 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12306 * Makefile.in: Remove obsolete code.
12308 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12310 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12311 defined(PT_FPR0_HI).
12313 2002-11-17 Stuart Hughes <seh@zee2.com>
12315 * linux-arm-low.c (arm_num_regs): Increase.
12316 (arm_regmap): Include status register.
12318 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12320 * linux-low.c (register_addr): Remove incorrect -1 check.
12322 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12324 * linux-low.c (linux_create_inferior): Call setpgid. Return
12326 (unstopped_p, linux_signal_pid): Remove.
12327 (linux_target_ops): Remove linux_signal_pid.
12328 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12329 global instead of target method.
12330 * target.h (struct target_ops): Remove signal_pid. Update comment
12331 for create_inferior.
12332 * server.c (signal_pid): New variable.
12333 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12334 gdbserver. Set the child to be the foreground process group.
12335 (attach_inferior): Set signal_pid.
12337 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12339 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12341 2002-08-20 Jim Blandy <jimb@redhat.com>
12343 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12346 2002-08-01 Andrew Cagney <cagney@redhat.com>
12348 * Makefile.in: Make chill references obsolete.
12350 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12352 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12353 * configure: Regenerate.
12354 * config.in: Regenerate.
12356 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12358 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12359 (perror_with_name, remote_close, remote_open, expect, play): Static.
12361 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12363 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12364 byte offsets instead of an array of indexes.
12365 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12367 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12369 * regcache.c: Add comment.
12371 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12373 * thread-db.c: New file.
12374 * proc-service.c: New file.
12375 * acinclude.m4: New file.
12376 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12377 proc-service.o, and thread-db.o.
12378 (linux-low.o): Add USE_THREAD_DB.
12379 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12380 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12381 * aclocal.m4: Regenerated.
12382 * config.in: Regenerated.
12383 * configure: Regenerated.
12384 * configure.in: Check for proc_service.h, sys/procfs.h,
12385 thread_db.h, and linux/elf.h headrs.
12386 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12387 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12388 Check for -lthread_db and thread support.
12389 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12390 PowerPC, and SuperH.
12391 * i387-fp.c: Constify arguments.
12392 * i387-fp.h: Likewise.
12393 * inferiors.c: (struct thread_info): Renamed from
12394 `struct inferior_info'. Remove PID member. Use generic inferior
12395 list header. All uses updated.
12396 (inferiors, signal_pid): Removed.
12397 (all_threads): New variable.
12398 (get_thread): Define.
12399 (add_inferior_to_list): New function.
12400 (for_each_inferior): New function.
12401 (change_inferior_id): New function.
12402 (add_inferior): Removed.
12403 (remove_inferior): New function.
12404 (add_thread): New function.
12405 (free_one_thread): New function.
12406 (remove_thread): New function.
12407 (clear_inferiors): Use for_each_inferior and free_one_thread.
12408 (find_inferior): New function.
12409 (find_inferior_id): New function.
12410 (inferior_target_data): Update argument type.
12411 (set_inferior_target_data): Likewise.
12412 (inferior_regcache_data): Likewise.
12413 (set_inferior_regcache_data): Likewise.
12414 * linux-low.c (linux_bp_reinsert): Remove.
12415 (all_processes, stopping_threads, using_thrads)
12416 (struct pending_signals, debug_threads, pid_of): New.
12417 (inferior_pid): Replace with macro.
12418 (struct inferior_linux_data): Remove.
12419 (get_stop_pc, add_process): New functions.
12420 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12421 Use add_process and add_thread.
12422 (linux_attach_lwp): New function, based on old linux_attach. Use
12423 add_process and add_thread. Set stop_expected for new threads.
12424 (linux_attach): New function.
12425 (linux_kill_one_process): New function.
12426 (linux_kill): Kill all LWPs.
12427 (linux_thread_alive): Use find_inferior_id.
12428 (check_removed_breakpoints, status_pending_p): New functions.
12429 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12430 Update. Use WNOHANG. Wait for cloned processes also. Update process
12431 struct for the found process.
12432 (linux_wait_for_event): New function.
12433 (linux_wait): Use it. Support LWPs.
12434 (send_sigstop, wait_for_sigstop, stop_all_processes)
12435 (linux_resume_one_process, linux_continue_one_process): New functions.
12436 (linux_resume): Support LWPs.
12437 (REGISTER_RAW_SIZE): Remove.
12438 (fetch_register): Use register_size instead. Call supply_register.
12439 (usr_store_inferior_registers): Likewise. Call collect_register.
12440 Fix recursive case.
12441 (regsets_fetch_inferior_registers): Improve error message.
12442 (regsets_store_inferior_registers): Add debugging.
12443 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12444 (unstopped_p, linux_signal_pid): New functions.
12445 (linux_target_ops): Add linux_signal_pid.
12446 (linux_init_signals): New function.
12447 (initialize_low): Call it. Initialize using_threads.
12448 * regcache.c (inferior_regcache_data): Add valid
12450 (get_regcache): Fetch registers lazily. Add fetch argument
12451 and update all callers.
12452 (regcache_invalidate_one, regcache_invalidate): New
12454 (new_register_cache): Renamed from create_register_cache.
12455 Return the new regcache.
12456 (free_register_cache): Change argument to a void *.
12457 (registers_to_string, registers_from_string): Call get_regcache
12458 with fetch flag set.
12459 (register_data): Make static. Pass fetch flag to get_regcache.
12460 (supply_register): Call get_regcache with fetch flag clear.
12461 (collect_register): Call get_regcache with fetch flag set.
12462 (collect_register_as_string): New function.
12463 * regcache.h: Update.
12464 * remote-utils.c (putpkt): Flush after debug output and use
12466 Handle input interrupts while waiting for an ACK.
12467 (input_interrupt): Use signal_pid method.
12468 (getpkt): Flush after debug output and use stderr.
12469 (outreg): Use collect_register_as_string.
12470 (new_thread_notify, dead_thread_notify): New functions.
12471 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12472 and general_thread.
12473 (look_up_one_symbol): Flush after debug output.
12474 * server.c (step_thread, server_waiting): New variables.
12475 (start_inferior): Don't use signal_pid. Update call to mywait.
12476 (attach_inferior): Update call to mywait.
12477 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12478 (main): Don't fetch/store registers explicitly. Use
12479 set_desired_inferior. Support proposed ``Hs'' packet. Update
12481 * server.h: Update.
12482 (struct inferior_list, struct_inferior_list_entry): New.
12483 * target.c (set_desired_inferior): New.
12484 (write_inferior_memory): Constify.
12485 (mywait): New function.
12486 * target.h: Update.
12487 (struct target_ops): New signal_pid method.
12488 (mywait): Removed macro, added prototype.
12490 * linux-low.h (regset_func): Removed.
12491 (regset_fill_func, regset_store_func): New.
12492 (enum regset_type): New.
12493 (struct regset_info): Add type field. Use new operation types.
12494 (struct linux_target_ops): stop_pc renamed to get_pc.
12495 Add decr_pc_after_break and breakpoint_at.
12496 (get_process, get_thread_proess, get_process_thread)
12497 (strut process_info, all_processes, linux_attach_lwp)
12498 (thread_db_init): New.
12500 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12501 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12502 (the_low_target): Add new members.
12503 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12504 (i386_store_fpxregset): Constify.
12505 (target_regsets): Add new kind identifier.
12506 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12507 (i386_set_pc): Add debugging.
12508 (i386_breakpoint_at): New function.
12509 (the_low_target): Add new members.
12510 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12511 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12512 (mips_breakpoint_at): New.
12513 (the_low_target): Add new members.
12514 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12515 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12516 (the_low_target): Add new members.
12517 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12518 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12519 (the_low_target): Add new members.
12520 * linux-x86-64-low.c (target_regsets): Add new kind
12523 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12525 From Martin Pool <mbp@samba.org>:
12526 * server.c (gdbserver_usage): New function.
12529 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12531 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12532 stop_at -> stop_pc.
12534 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12536 * Makefile.in: Remove obsolete code.
12538 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12540 * linux-low.c (regsets_fetch_inferior_registers),
12541 (regsets_store_inferior_registers): Removed cast to int from
12543 * regcache.h: Added declaration of struct inferior_info.
12545 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12547 * inferiors.c (struct inferior_info): Add regcache_data.
12548 (add_inferior): Call create_register_cache.
12549 (clear_inferiors): Call free_register_cache.
12550 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12551 * regcache.c (struct inferior_regcache_data): New.
12552 (registers): Remove.
12553 (get_regcache): New function.
12554 (create_register_cache, free_register_cache): New functions.
12555 (set_register_cache): Don't initialize the register cache here.
12556 (registers_to_string, registers_from_string, register_data): Call
12558 * regcache.h: Add prototypes.
12559 * server.h: Likewise.
12561 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12563 * mem-break.c: New file.
12564 * mem-break.h: New file.
12565 * Makefile.in: Add mem-break.o rule; update server.h
12567 * inferiors.c (struct inferior_info): Add target_data
12569 (clear_inferiors): Free target_data member if set.
12570 (inferior_target_data, set_inferior_target_data): New functions.
12571 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12572 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12573 * linux-low.c (linux_bp_reinsert): New variable.
12574 (struct inferior_linux_data): New.
12575 (linux_create_inferior): Use set_inferior_target_data.
12576 (linux_attach): Likewise. Call add_inferior.
12577 (linux_wait_for_one_inferior): New function.
12578 (linux_wait): Call it.
12579 (linux_write_memory): Add const.
12580 (initialize_low): Call set_breakpoint_data.
12581 * linux-low.h (struct linux_target_ops): Add breakpoint
12583 * server.c (attach_inferior): Remove extra add_inferior
12585 * server.h: Include mem-break.h. Update inferior.c
12587 * target.c (read_inferior_memory)
12588 (write_inferior_memory): New functions.
12589 * target.h (read_inferior_memory)
12590 (write_inferior_memory): Change macros to prototypes.
12591 (struct target_ops): Update comments. Add const to write_memory
12594 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12596 * linux-low.c (usr_store_inferior_registers): Support
12597 registers which are allowed to fail to store.
12598 * linux-low.h (linux_target_ops): Likewise.
12599 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12600 (ppc_cannot_store_register): FPSCR may not be storable.
12602 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12604 * server.h: Include <string.h> if HAVE_STRING_H.
12605 * ChangeLog: Correct paths in last ChangeLog entry.
12607 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12609 * linux-low.h: Remove obsolete prototypes.
12610 (struct linux_target_ops): New.
12611 (extern the_low_target): New.
12612 * linux-low.c (num_regs, regmap): Remove declarations.
12613 (register_addr): Use the_low_target explicitly.
12614 (fetch_register): Likewise.
12615 (usr_fetch_inferior_registers): Likewise.
12616 (usr_store_inferior_registers): Likewise.
12617 * linux-arm-low.c (num_regs): Remove.
12618 (arm_num_regs): Define.
12619 (arm_regmap): Renamed from regmap, made static.
12620 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12622 (arm_cannot_store_register): Renamed from cannot_store_register,
12624 (the_low_target): New.
12625 * linux-i386-low.c (num_regs): Remove.
12626 (i386_num_regs): Define.
12627 (i386_regmap): Renamed from regmap, made static.
12628 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12630 (i386_cannot_store_register): Renamed from cannot_store_register,
12632 (the_low_target): New.
12633 * linux-ia64-low.c (num_regs): Remove.
12634 (ia64_num_regs): Define.
12635 (ia64_regmap): Renamed from regmap, made static.
12636 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12638 (ia64_cannot_store_register): Renamed from cannot_store_register,
12640 (the_low_target): New.
12641 * linux-m68k-low.c (num_regs): Remove.
12642 (m68k_num_regs): Define.
12643 (m68k_regmap): Renamed from regmap, made static.
12644 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12646 (m68k_cannot_store_register): Renamed from cannot_store_register,
12648 (the_low_target): New.
12649 * linux-mips-low.c (num_regs): Remove.
12650 (mips_num_regs): Define.
12651 (mips_regmap): Renamed from regmap, made static.
12652 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12654 (mips_cannot_store_register): Renamed from cannot_store_register,
12656 (the_low_target): New.
12657 * linux-ppc-low.c (num_regs): Remove.
12658 (ppc_num_regs): Define.
12659 (ppc_regmap): Renamed from regmap, made static.
12660 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12662 (ppc_cannot_store_register): Renamed from cannot_store_register,
12664 (the_low_target): New.
12665 * linux-s390-low.c (num_regs): Remove.
12666 (s390_num_regs): Define.
12667 (s390_regmap): Renamed from regmap, made static.
12668 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12670 (s390_cannot_store_register): Renamed from cannot_store_register,
12672 (the_low_target): New.
12673 * linux-sh-low.c (num_regs): Remove.
12674 (sh_num_regs): Define.
12675 (sh_regmap): Renamed from regmap, made static.
12676 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12678 (sh_cannot_store_register): Renamed from cannot_store_register,
12680 (the_low_target): New.
12681 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12682 (the_low_target): New.
12684 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12686 * Makefile.in: Add stamp-h target.
12687 * configure.in: Create stamp-h.
12688 * configure: Regenerated.
12690 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12692 * inferiors.c: New file.
12693 * target.c: New file.
12694 * target.h: New file.
12695 * Makefile.in: Add target.o and inferiors.o. Update
12697 * linux-low.c (inferior_pid): New static variable,
12698 moved from server.c.
12699 (linux_create_inferior): Renamed from create_inferior.
12700 Call add_inferior. Return 0 on success instead of a PID.
12701 (linux_attach): Renamed from myattach.
12702 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12703 (linux_thread_alive): Renamed from mythread_alive.
12704 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12706 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12707 (regsets_store_inferior_registers): Correct error message.
12708 Add missing ``return 0''.
12709 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12710 (linux_store_registers): Renamed from store_inferior_registers.
12711 (linux_read_memory): Renamed from read_inferior_memory.
12712 (linux_write_memory): Renamed from write_inferior_memory.
12713 (linux_target_ops): New structure.
12714 (initialize_low): Call set_target_ops ().
12715 * remote-utils.c (unhexify): New function.
12716 (hexify): New function.
12717 (input_interrupt): Send signals to ``signal_pid''.
12718 * server.c (inferior_pid): Remove.
12719 (start_inferior): Update create_inferior call.
12720 (attach_inferior): Call add_inferior.
12721 (handle_query): New function.
12722 (main): Call handle_query for `q' packets.
12723 * server.h: Include "target.h". Remove obsolete prototypes.
12724 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12726 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12728 * Makefile.in: Add WARN_CFLAGS. Update configury
12730 * configure.in: Check for <string.h>
12731 * configure: Regenerate.
12732 * config.in: Regenerate.
12733 * gdbreplay.c: Include needed system headers.
12734 (remote_open): Remove strchr prototype.
12735 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12736 * regcache.c (supply_register): Change buf argument to const void *.
12737 (supply_register_by_name): Likewise.
12738 (collect_register): Change buf argument to void *.
12739 (collect_register_by_name): Likewise.
12740 * regcache.h: Add missing prototypes.
12741 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12742 * server.c (handle_query): New function.
12743 (attached): New static variable, moved out of main.
12744 (main): Quiet longjmp clobber warnings.
12745 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12746 * utils.c (error): Remove NORETURN.