1 2015-10-26 Doug Evans <dje@google.com>
3 * thread-db.c (find_one_thread): Cast ti.ti_tid to unsigned long
5 (attach_thread, find_new_threads_callback): Ditto.
7 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
9 * mem-break.h (set_breakpoint_data): Remove.
11 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
13 * nto-low.c (nto_sw_breakpoint_from_kind): New function.
14 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
15 (initialize_low): Remove set_breakpoint_data call.
16 * spu-low.c (spu_sw_breakpoint_from_kind): New function.
17 (struct target_ops) <sw_breakpoint_from_kind>: Iniitalize.
18 (initialize_low): Remove set_breakpoint_data call.
19 * win32-low.c (win32_sw_breakpoint_from_kind): New function.
20 (struct target_ops) <sw_breakpoint_from_kind>: Initialize.
21 (initialize_low): Remove set_breakpoint_data call.
23 2015-10-23 Antoine Tremblay <antoine.tremblay@ericsson.com>
25 * linux-low.c (default_breakpoint_kind_from_pc): Move to target.c.
26 * mem-break.c (set_breakpoint_at): Use target_breakpoint_kind_from_pc.
27 * target.c (default_breakpoint_kind_from_pc): Moved from linux-low.c
28 * target.h (target_breakpoint_kind_from_pc): New macro.
30 2015-10-22 Antoine Tremblay <antoine.tremblay@ericsson.com>
32 * linux-low.c (default_breakpoint_kind_from_pc): New function.
33 (linux_breakpoint_kind_from_pc): Use default_breakpoint_kind_from_pc for
34 the default breakpoint kind.
36 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
38 * linux-arm-low.c (arm_supports_z_point_type): Add software
41 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
43 * linux-arm-low.c: Refactor breakpoint definitions.
44 (arm_breakpoint_at): Adjust for arm_abi_breakpoint.
45 (arm_sw_breakpoint_from_kind): Adjust for arm_breakpoint.
47 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
49 * Makefile.in: Add arm.c/o.
50 * configure.srv: Likewise.
51 * linux-arm-low.c (arm_breakpoint_kinds): New enum.
52 (arm_breakpoint_kind_from_pc): New function.
53 (arm_sw_breakpoint_from_kind): Return proper kind.
54 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize.
56 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
58 * linux-low.c (initialize_low): Ajdust for breakpoint global variables
60 * mem-break.c : Remove breakpoint_data/breakpoint_len global variables.
61 (struct raw_breakpoint) <size>: Remove.
62 (struct raw_breakpoint) <kind>: Add.
63 (bp_size): New function.
64 (bp_opcode): Likewise.
65 (find_raw_breakpoint_at): Adjust for kind.
66 (insert_memory_breakpoint): Adjust for kind call bp_size,bp_opcode.
67 (remove_memory_breakpoint): Adjust for kind call bp_size.
68 (set_raw_breakpoint_at): Adjust for kind.
69 (set_breakpoint): Likewise.
70 (set_breakpoint_at): Call breakpoint_kind_from_pc.
71 (delete_raw_breakpoint): Adjust for kind.
72 (delete_breakpoint): Likewise.
73 (find_gdb_breakpoint): Likewise.
74 (set_gdb_breakpoint_1): Likewise.
75 (set_gdb_breakpoint): Likewise.
76 (delete_gdb_breakpoint_1): Likewise.
77 (delete_gdb_breakpoint): Likewise.
78 (uninsert_raw_breakpoint): Likewise.
79 (reinsert_raw_breakpoint): Likewise.
80 (set_breakpoint_data): Remove.
81 (validate_inserted_breakpoint): Adjust for kind call bp_size,bp_opcode.
82 (check_mem_read): Adjust for kind call bp_size.
83 (check_mem_write): Adjust for kind call bp_size,bp_opcode.
84 (clone_one_breakpoint): Adjust for kind.
85 * mem-break.h (set_gdb_breakpoint): Likewise.
86 (delete_gdb_breakpoint): Likewise.
87 * server.c (process_serial_event): Likewise.
89 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
91 * linux-aarch64-low.c (aarch64_sw_breakpoint_from_kind): New function.
92 (struct linux_target_ops) <breakpoint>: Remove.
93 (struct linux_target_ops) <breakpoint_len>: Remove.
94 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
95 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
96 * linux-arm-low.c (arm_breakpoint_kind_from_pc): New function.
97 (arm_sw_breakpoint_from_kind): New function.
98 * linux-bfin-low.c (bfin_sw_breakpoint_from_kind): New function.
99 (struct linux_target_ops) <breakpoint>: Remove.
100 (struct linux_target_ops) <breakpoint_len>: Remove.
101 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
102 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
103 * linux-cris-low.c (cris_sw_breakpoint_from_kind): New function.
104 (struct linux_target_ops) <breakpoint>: Remove.
105 (struct linux_target_ops) <breakpoint_len>: Remove.
106 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
107 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
108 * linux-crisv32-low.c (cris_sw_breakpoint_from_kind): New function.
109 (struct linux_target_ops) <breakpoint>: Remove.
110 (struct linux_target_ops) <breakpoint_len>: Remove.
111 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
112 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
113 * linux-low.c (linux_wait_1): Call breakpoint_kind_from_pc
114 and sw_breakpoint_from_kind to increment the pc.
115 (linux_breakpoint_kind_from_pc): New function.
116 (linux_sw_breakpoint_from_kind): New function.
117 (struct target_ops) <sw_breakpoint_from_kind>: Initialize field.
118 (initialize_low): Call breakpoint_kind_from_pc and
119 sw_breakpoint_from_kind to replace breakpoint_data/len.
120 * linux-low.h (struct linux_target_ops) <breakpoint_kind_from_pc>:
122 (struct linux_target_ops) <sw_breakpoint_from_kind>: Likewise.
123 * linux-m32r-low.c (m32r_sw_breakpoint_from_kind): New function.
124 (struct linux_target_ops) <breakpoint>: Remove.
125 (struct linux_target_ops) <breakpoint_len>: Remove.
126 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
127 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
128 * linux-m68k-low.c (m68k_sw_breakpoint_from_kind): New function.
129 (struct linux_target_ops) <breakpoint>: Remove.
130 (struct linux_target_ops) <breakpoint_len>: Remove.
131 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
132 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
133 * linux-mips-low.c (mips_sw_breakpoint_from_kind): New function.
134 (struct linux_target_ops) <breakpoint>: Remove.
135 (struct linux_target_ops) <breakpoint_len>: Remove.
136 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
137 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
138 * linux-nios2-low.c (nios2_sw_breakpoint_from_kind): New function.
139 (struct linux_target_ops) <breakpoint>: Remove.
140 (struct linux_target_ops) <breakpoint_len>: Remove.
141 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
142 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
143 * linux-ppc-low.c (ppc_sw_breakpoint_from_kind): New function.
144 (struct linux_target_ops) <breakpoint>: Remove.
145 (struct linux_target_ops) <breakpoint_len>: Remove.
146 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
147 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
148 * linux-s390-low.c (s390_sw_breakpoint_from_kind): New function.
149 (struct linux_target_ops) <breakpoint>: Remove.
150 (struct linux_target_ops) <breakpoint_len>: Remove.
151 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
152 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
153 * linux-sh-low.c (sh_sw_breakpoint_from_kind): New function.
154 (struct linux_target_ops) <breakpoint>: Remove.
155 (struct linux_target_ops) <breakpoint_len>: Remove.
156 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
157 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
158 * linux-sparc-low.c (sparc_sw_breakpoint_from_kind): New function.
159 (struct linux_target_ops) <breakpoint>: Remove.
160 (struct linux_target_ops) <breakpoint_len>: Remove.
161 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
162 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
163 * linux-tic6x-low.c (tic6x_sw_breakpoint_from_kind): New function.
164 (struct linux_target_ops) <breakpoint>: Remove.
165 (struct linux_target_ops) <breakpoint_len>: Remove.
166 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
167 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
168 * linux-tile-low.c (tile_sw_breakpoint_from_kind): New function.
169 * linux-x86-low.c (x86_sw_breakpoint_from_kind): New function.
170 (struct linux_target_ops) <breakpoint>: Remove.
171 (struct linux_target_ops) <breakpoint_len>: Remove.
172 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
173 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
174 * linux-xtensa-low.c (xtensa_sw_breakpoint_from_kind) New function.
175 (struct linux_target_ops) <breakpoint>: Remove.
176 (struct linux_target_ops) <breakpoint_len>: Remove.
177 (struct linux_target_ops) <breakpoint_kind_from_pc>: Initialize field.
178 (struct linux_target_ops) <sw_breakpoint_from_kind>: Initialize field.
180 2015-10-21 Antoine Tremblay <antoine.tremblay@ericsson.com>
182 * linux-cris-low.c (cris_get_pc): Remove void arg.
184 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
186 * gdbserver/nto-low.c (nto_insert_point, nto_remove_point): Fix
189 2015-10-16 Aleksandar Ristovski <aristovski@qnx.com>
191 * inferiors.c (thread_pid_matches_callback): New function.
192 (find_thread_process): New function.
193 (remove_thread): Reset current_thread.
194 (remove_process): Assert threads have been removed first.
196 2015-10-15 Yao Qi <yao.qi@linaro.org>
198 * linux-aarch64-low.c (aarch64_insert_point): Set len to 2
200 (aarch64_remove_point): Likewise.
201 * regcache.c (regcache_register_size): New function.
203 2015-10-12 Yao Qi <yao.qi@linaro.org>
205 * linux-aarch64-low.c: Update all callers as emit_load_store
206 is renamed to aarch64_emit_load_store.
208 2015-10-12 Yao Qi <yao.qi@linaro.org>
210 * linux-aarch64-low.c: Update all callers of function renaming
211 from emit_insn to aarch64_emit_insn.
213 2015-10-12 Yao Qi <yao.qi@linaro.org>
215 * linux-aarch64-low.c (enum aarch64_opcodes): Move to
217 (struct aarch64_memory_operand): Likewise.
219 (emit_insn): Move to arch/aarch64-insn.c.
220 (emit_b, emit_bcond, emit_cb, emit_tb): Remove.
221 (emit_load_store): Move to arch/aarch64-insn.c.
222 (emit_ldr, emit_ldrb, emit_ldrsw, emit_nop): Remove.
223 (can_encode_int32): Remove.
225 2015-10-12 Yao Qi <yao.qi@linaro.org>
227 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
228 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
229 (aarch64_relocate_instruction): Likewise.
230 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
231 (struct aarch64_insn_visitor): Likewise.
233 2015-10-12 Yao Qi <yao.qi@linaro.org>
235 * linux-aarch64-low.c (struct aarch64_insn_data): New.
236 (struct aarch64_insn_visitor): New.
237 (struct aarch64_insn_relocation_data): New.
238 (aarch64_ftrace_insn_reloc_b): New function.
239 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
240 (aarch64_ftrace_insn_reloc_cb): Likewise.
241 (aarch64_ftrace_insn_reloc_tb): Likewise.
242 (aarch64_ftrace_insn_reloc_adr): Likewise.
243 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
244 (aarch64_ftrace_insn_reloc_others): Likewise.
246 (aarch64_relocate_instruction): Use visitor.
248 2015-10-12 Yao Qi <yao.qi@linaro.org>
250 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
251 int. Add argument buf.
252 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
253 aarch64_relocate_instruction.
255 2015-10-12 Yao Qi <yao.qi@linaro.org>
257 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
258 argument insn. Remove local variable insn. Don't call
260 (aarch64_install_fast_tracepoint_jump_pad): Call
263 2015-09-30 Yao Qi <yao.qi@linaro.org>
265 * linux-aarch64-low.c (emit_movk): Shorten a long line.
266 (emit_load_store_pair): Likewise.
268 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
270 * dll.c (match_dll): Add cast(s).
271 (unloaded_dll): Likewise.
272 * linux-low.c (second_thread_of_pid_p): Likewise.
273 (delete_lwp_callback): Likewise.
274 (count_events_callback): Likewise.
275 (select_event_lwp_callback): Likewise.
276 (linux_set_resume_request): Likewise.
277 * server.c (accumulate_file_name_length): Likewise.
278 (emit_dll_description): Likewise.
279 (handle_qxfer_threads_worker): Likewise.
280 (visit_actioned_threads): Likewise.
281 * thread-db.c (any_thread_of): Likewise.
282 * tracepoint.c (same_process_p): Likewise.
283 (match_blocktype): Likewise.
284 (build_traceframe_info_xml): Likewise.
286 2015-09-25 Simon Marchi <simon.marchi@ericsson.com>
288 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
290 (gdb_unparse_agent_expr): Likewise.
291 * hostio.c (require_data): Likewise.
292 (handle_pread): Likewise.
293 * linux-low.c (disable_regset): Likewise.
294 (fetch_register): Likewise.
295 (store_register): Likewise.
296 (get_dynamic): Likewise.
297 (linux_qxfer_libraries_svr4): Likewise.
298 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
299 (set_fast_tracepoint_jump): Likewise.
300 (uninsert_fast_tracepoint_jumps_at): Likewise.
301 (reinsert_fast_tracepoint_jumps_at): Likewise.
302 (validate_inserted_breakpoint): Likewise.
303 (clone_agent_expr): Likewise.
304 * regcache.c (init_register_cache): Likewise.
305 * remote-utils.c (putpkt_binary_1): Likewise.
306 (decode_M_packet): Likewise.
307 (decode_X_packet): Likewise.
308 (look_up_one_symbol): Likewise.
309 (relocate_instruction): Likewise.
310 (monitor_output): Likewise.
311 * server.c (handle_search_memory): Likewise.
312 (handle_qxfer_exec_file): Likewise.
313 (handle_qxfer_libraries): Likewise.
314 (handle_qxfer): Likewise.
315 (handle_query): Likewise.
316 (handle_v_cont): Likewise.
317 (handle_v_run): Likewise.
318 (captured_main): Likewise.
319 * target.c (write_inferior_memory): Likewise.
320 * thread-db.c (try_thread_db_load_from_dir): Likewise.
321 * tracepoint.c (init_trace_buffer): Likewise.
322 (add_tracepoint_action): Likewise.
323 (add_traceframe): Likewise.
324 (add_traceframe_block): Likewise.
325 (cmd_qtdpsrc): Likewise.
326 (cmd_qtdv): Likewise.
327 (cmd_qtstatus): Likewise.
328 (response_source): Likewise.
329 (response_tsv): Likewise.
330 (cmd_qtnotes): Likewise.
331 (gdb_collect): Likewise.
332 (initialize_tracepoint): Likewise.
334 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
336 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
337 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
338 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
340 (enum aarch64_condition_codes): New enum.
341 (w0): New static global.
344 (struct aarch64_memory_operand) <type>: New
345 MEMORY_OPERAND_POSTINDEX type.
346 (postindex_memory_operand): New helper function.
347 (emit_ret): New function.
348 (emit_load_store_pair): New function, factored out of emit_stp
349 with support for MEMORY_OPERAND_POSTINDEX.
350 (emit_stp): Rewrite using emit_load_store_pair.
351 (emit_ldp): New function.
352 (emit_load_store): Likewise.
353 (emit_ldr): Mention post-index instruction in comment.
354 (emit_ldrh): New function.
355 (emit_ldrb): New function.
356 (emit_ldrsw): Mention post-index instruction in comment.
357 (emit_str): Likewise.
358 (emit_subs): New function.
359 (emit_cmp): Likewise.
360 (emit_and): Likewise.
361 (emit_orr): Likewise.
362 (emit_orn): Likewise.
363 (emit_eor): Likewise.
364 (emit_mvn): Likewise.
365 (emit_lslv): Likewise.
366 (emit_lsrv): Likewise.
367 (emit_asrv): Likewise.
368 (emit_mul): Likewise.
369 (emit_sbfm): Likewise.
370 (emit_sbfx): Likewise.
371 (emit_ubfm): Likewise.
372 (emit_ubfx): Likewise.
373 (emit_csinc): Likewise.
374 (emit_cset): Likewise.
375 (emit_nop): Likewise.
376 (emit_ops_insns): New helper function.
377 (emit_pop): Likewise.
378 (emit_push): Likewise.
379 (aarch64_emit_prologue): New function.
380 (aarch64_emit_epilogue): Likewise.
381 (aarch64_emit_add): Likewise.
382 (aarch64_emit_sub): Likewise.
383 (aarch64_emit_mul): Likewise.
384 (aarch64_emit_lsh): Likewise.
385 (aarch64_emit_rsh_signed): Likewise.
386 (aarch64_emit_rsh_unsigned): Likewise.
387 (aarch64_emit_ext): Likewise.
388 (aarch64_emit_log_not): Likewise.
389 (aarch64_emit_bit_and): Likewise.
390 (aarch64_emit_bit_or): Likewise.
391 (aarch64_emit_bit_xor): Likewise.
392 (aarch64_emit_bit_not): Likewise.
393 (aarch64_emit_equal): Likewise.
394 (aarch64_emit_less_signed): Likewise.
395 (aarch64_emit_less_unsigned): Likewise.
396 (aarch64_emit_ref): Likewise.
397 (aarch64_emit_if_goto): Likewise.
398 (aarch64_emit_goto): Likewise.
399 (aarch64_write_goto_address): Likewise.
400 (aarch64_emit_const): Likewise.
401 (aarch64_emit_call): Likewise.
402 (aarch64_emit_reg): Likewise.
403 (aarch64_emit_pop): Likewise.
404 (aarch64_emit_stack_flush): Likewise.
405 (aarch64_emit_zero_ext): Likewise.
406 (aarch64_emit_swap): Likewise.
407 (aarch64_emit_stack_adjust): Likewise.
408 (aarch64_emit_int_call_1): Likewise.
409 (aarch64_emit_void_call_2): Likewise.
410 (aarch64_emit_eq_goto): Likewise.
411 (aarch64_emit_ne_goto): Likewise.
412 (aarch64_emit_lt_goto): Likewise.
413 (aarch64_emit_le_goto): Likewise.
414 (aarch64_emit_gt_goto): Likewise.
415 (aarch64_emit_ge_got): Likewise.
416 (aarch64_emit_ops_impl): New static global variable.
417 (aarch64_emit_ops): New target function, return
418 &aarch64_emit_ops_impl.
419 (struct linux_target_ops): Install it.
421 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
423 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
424 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
426 * linux-aarch64-ipa.c: New file.
427 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
429 (aarch64_get_thread_area): New target method.
430 (extract_signed_bitfield): New helper function.
431 (aarch64_decode_ldr_literal): New function.
432 (enum aarch64_opcodes): New enum.
433 (struct aarch64_register): New struct.
434 (struct aarch64_operand): New struct.
435 (x0): New static global.
444 (aarch64_register): New helper function.
445 (register_operand): Likewise.
446 (immediate_operand): Likewise.
447 (struct aarch64_memory_operand): New struct.
448 (offset_memory_operand): New helper function.
449 (preindex_memory_operand): Likewise.
450 (enum aarch64_system_control_registers): New enum.
452 (emit_insn): New helper function.
453 (emit_b): New function.
454 (emit_bcond): Likewise.
457 (emit_blr): Likewise.
458 (emit_stp): Likewise.
459 (emit_ldp_q_offset): Likewise.
460 (emit_stp_q_offset): Likewise.
461 (emit_load_store): Likewise.
462 (emit_ldr): Likewise.
463 (emit_ldrsw): Likewise.
464 (emit_str): Likewise.
465 (emit_ldaxr): Likewise.
466 (emit_stxr): Likewise.
467 (emit_stlr): Likewise.
468 (emit_data_processing_reg): Likewise.
469 (emit_data_processing): Likewise.
470 (emit_add): Likewise.
471 (emit_sub): Likewise.
472 (emit_mov): Likewise.
473 (emit_movk): Likewise.
474 (emit_mov_addr): Likewise.
475 (emit_mrs): Likewise.
476 (emit_msr): Likewise.
477 (emit_sevl): Likewise.
478 (emit_wfe): Likewise.
479 (append_insns): Likewise.
480 (can_encode_int32_in): New helper function.
481 (aarch64_relocate_instruction): New function.
482 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
483 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
484 (struct linux_target_ops): Install aarch64_get_thread_area,
485 aarch64_install_fast_tracepoint_jump_pad and
486 aarch64_get_min_fast_tracepoint_insn_len.
488 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
490 * Makefile.in (aarch64-insn.o): New rule.
491 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
493 2015-09-21 Yao Qi <yao.qi@linaro.org>
495 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
497 2015-09-21 Yao Qi <yao.qi@linaro.org>
499 * tracepoint.c (max_jump_pad_size): Remove.
501 2015-09-18 Yao Qi <yao.qi@linaro.org>
503 * linux-aarch64-low.c: Don't include sys/uio.h.
504 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
506 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
508 * tracepoint.c (eval_result_type): Change prototype.
509 (condition_true_at_tracepoint): Fix argument to compiled_cond.
511 2015-09-15 Pedro Alves <palves@redhat.com>
513 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
514 Check whether to report exec events instead of checking whether
515 multiprocess is enabled.
517 2015-09-15 Pedro Alves <palves@redhat.com>
520 * remote-utils.c (prepare_resume_reply): Merge
521 TARGET_WAITKIND_VFORK_DONE switch case with the
522 TARGET_WAITKIND_FORKED case.
524 2015-09-15 Yao Qi <yao.qi@linaro.org>
526 * server.c (handle_query): Check string comparison using
527 "else if" instead of "if".
529 2015-09-15 Yao Qi <yao.qi@linaro.org>
531 * server.c (vCont_supported): New global variable.
532 (handle_query): Set vCont_supported to 1 if "vContSupported+"
533 matches. Append ";vContSupported+" to own_buf.
534 (handle_v_requests): Append ";s;S" to own_buf if target supports
535 hardware single step or vCont_supported is false.
536 (capture_main): Set vCont_supported to zero.
538 2015-09-15 Yao Qi <yao.qi@linaro.org>
540 * linux-low.c (linux_supports_conditional_breakpoints): Rename
542 (linux_supports_hardware_single_step): ... New function.
543 (linux_target_ops): Update.
544 * lynx-low.c (lynx_target_ops): Set field
545 supports_hardware_single_step to target_can_do_hardware_single_step.
546 * nto-low.c (nto_target_ops): Likewise.
547 * spu-low.c (spu_target_ops): Likewise.
548 * win32-low.c (win32_target_ops): Likewise.
549 * target.c (target_can_do_hardware_single_step): New function.
550 * target.h (struct target_ops) <supports_conditional_breakpoints>:
551 Remove. <supports_hardware_single_step>: New field.
552 (target_supports_conditional_breakpoints): Remove.
553 (target_supports_hardware_single_step): New macro.
554 (target_can_do_hardware_single_step): Declare.
555 * server.c (handle_query): Use target_supports_hardware_single_step
556 instead of target_supports_conditional_breakpoints.
558 2015-09-15 Yao Qi <yao.qi@linaro.org>
560 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
562 (struct linux_target_ops the_low_target): Install
563 aarch64_linux_siginfo_fixup.
565 2015-09-11 Don Breazeal <donb@codesourcery.com>
566 Luis Machado <lgustavo@codesourcery.com>
568 * linux-low.c (linux_mourn): Static declaration.
569 (linux_arch_setup): Move in front of
570 handle_extended_wait.
571 (linux_arch_setup_thread): New function.
572 (handle_extended_wait): Handle exec events. Call
573 linux_arch_setup_thread. Make event_lwp argument a
574 pointer-to-a-pointer.
575 (check_zombie_leaders): Do not check stopped threads.
576 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
577 (linux_low_filter_event): Add lwp and thread for exec'ing
578 non-leader thread if leader thread has been deleted.
579 Refactor code into linux_arch_setup_thread and call it.
580 Pass child lwp pointer by reference to handle_extended_wait.
581 (linux_wait_for_event_filtered): Update comment.
582 (linux_wait_1): Prevent clobbering exec event status.
583 (linux_supports_exec_events): New function.
584 (linux_target_ops) <supports_exec_events>: Initialize new member.
585 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
587 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
588 * server.c (report_exec_events): New global variable.
589 (handle_query): Handle qSupported query for exec-events feature.
590 (captured_main): Initialize report_exec_events.
591 * server.h (report_exec_events): Declare new global variable.
592 * target.h (struct target_ops) <supports_exec_events>: New
594 (target_supports_exec_events): New macro.
595 * win32-low.c (win32_target_ops) <supports_exec_events>:
596 Initialize new member.
598 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
600 * linux-low.c (linux_low_enable_btrace): Remove.
601 (linux_target_ops): Replace linux_low_enable_btrace with
604 2015-09-03 Yao Qi <yao.qi@linaro.org>
606 * linux-aarch64-low.c (aarch64_insert_point): Call
607 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
610 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
612 * linux-low.c (check_stopped_by_breakpoint): Use
613 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
615 2015-08-27 Pedro Alves <palves@redhat.com>
617 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
619 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
621 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
622 the XNEW-family equivalent.
623 (compile_bytecodes): Likewise.
624 * dll.c (loaded_dll): Likewise.
625 * event-loop.c (append_callback_event): Likewise.
626 (create_file_handler): Likewise.
627 (create_file_event): Likewise.
628 * hostio.c (handle_open): Likewise.
629 * inferiors.c (add_thread): Likewise.
630 (add_process): Likewise.
631 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
632 * linux-arm-low.c (arm_new_process): Likewise.
633 (arm_new_thread): Likewise.
634 * linux-low.c (add_to_pid_list): Likewise.
635 (linux_add_process): Likewise.
636 (handle_extended_wait): Likewise.
638 (enqueue_one_deferred_signal): Likewise.
639 (enqueue_pending_signal): Likewise.
640 (linux_resume_one_lwp_throw): Likewise.
641 (linux_resume_one_thread): Likewise.
642 (linux_read_memory): Likewise.
643 (linux_write_memory): Likewise.
644 * linux-mips-low.c (mips_linux_new_process): Likewise.
645 (mips_linux_new_thread): Likewise.
646 (mips_add_watchpoint): Likewise.
647 * linux-x86-low.c (initialize_low_arch): Likewise.
648 * lynx-low.c (lynx_add_process): Likewise.
649 * mem-break.c (set_raw_breakpoint_at): Likewise.
650 (set_breakpoint): Likewise.
651 (add_condition_to_breakpoint): Likewise.
652 (add_commands_to_breakpoint): Likewise.
653 (clone_agent_expr): Likewise.
654 (clone_one_breakpoint): Likewise.
655 * regcache.c (new_register_cache): Likewise.
656 * remote-utils.c (look_up_one_symbol): Likewise.
657 * server.c (queue_stop_reply): Likewise.
658 (start_inferior): Likewise.
659 (queue_stop_reply_callback): Likewise.
660 (handle_target_event): Likewise.
661 * spu-low.c (fetch_ppc_memory): Likewise.
662 (store_ppc_memory): Likewise.
663 * target.c (set_target_ops): Likewise.
664 * thread-db.c (thread_db_load_search): Likewise.
665 (try_thread_db_load_1): Likewise.
666 * tracepoint.c (add_tracepoint): Likewise.
667 (add_tracepoint_action): Likewise.
668 (create_trace_state_variable): Likewise.
669 (cmd_qtdpsrc): Likewise.
670 (cmd_qtro): Likewise.
671 (add_while_stepping_state): Likewise.
672 * win32-low.c (child_add_thread): Likewise.
673 (get_image_name): Likewise.
675 2015-08-25 Yao Qi <yao.qi@linaro.org>
677 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
679 2015-08-25 Yao Qi <yao.qi@linaro.org>
681 * Makefile.in (aarch64-linux.o): New rule.
682 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
684 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
685 (aarch64_init_debug_reg_state): Make it extern.
686 (aarch64_linux_prepare_to_resume): Remove.
688 2015-08-25 Yao Qi <yao.qi@linaro.org>
690 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
691 lwp_arch_private_info and ptid_of_lwp.
693 2015-08-25 Yao Qi <yao.qi@linaro.org>
695 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
696 Find proc_info by find_process_pid. All callers updated.
698 2015-08-25 Yao Qi <yao.qi@linaro.org>
700 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
702 (debug_reg_change_callback): Remove.
703 (aarch64_notify_debug_reg_change): Remove.
705 2015-08-25 Yao Qi <yao.qi@linaro.org>
707 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
708 Call current_lwp_ptid.
710 2015-08-25 Yao Qi <yao.qi@linaro.org>
712 * linux-aarch64-low.c (debug_reg_change_callback): Use
715 2015-08-25 Yao Qi <yao.qi@linaro.org>
717 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
719 2015-08-25 Yao Qi <yao.qi@linaro.org>
721 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
723 2015-08-25 Yao Qi <yao.qi@linaro.org>
725 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
728 2015-08-25 Yao Qi <yao.qi@linaro.org>
730 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
732 (debug_reg_change_callback): Remove argument entry and add argument
733 lwp. Remove local variable thread. Don't print thread id in the
734 debugging output. Don't check whether pid of thread equals to pid.
735 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
736 iterate_over_lwps instead find_inferior.
738 2015-08-24 Pedro Alves <palves@redhat.com>
740 * inferiors.c (get_first_process): New function.
741 * inferiors.h (get_first_process): New declaration.
742 * remote-utils.c (read_ptid): Default to the first process in the
743 list, instead of to the current thread's process.
745 2015-08-24 Pedro Alves <palves@redhat.com>
747 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
748 * event-loop.c: Likewise.
749 * remote-utils.c: Likewise.
750 * tracepoint.c: Likewise.
752 2015-08-24 Pedro Alves <palves@redhat.com>
754 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
757 2015-08-21 Pedro Alves <palves@redhat.com>
759 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
760 instead of literal 1.
762 2015-08-21 Pedro Alves <palves@redhat.com>
764 * tdesc.c (default_description): Explicitly zero-initialize.
766 2015-08-21 Pedro Alves <palves@redhat.com>
769 * inferiors.c (remove_thread): Discard any pending stop reply for
771 * server.c (remove_all_on_match_pid): Rename to ...
772 (remove_all_on_match_ptid): ... this. Work with a filter ptid
774 (discard_queued_stop_replies): Change parameter to a ptid. Now
776 (handle_v_kill, kill_inferior_callback, captured_main)
777 (process_serial_event): Adjust.
778 * server.h (discard_queued_stop_replies): Declare.
780 2015-08-21 Pedro Alves <palves@redhat.com>
782 * linux-low.c (wait_for_sigstop): Always switch to no thread
783 selected if the previously current thread dies.
784 * lynx-low.c (lynx_request_interrupt): Use the first thread's
785 process instead of the current thread's.
786 * remote-utils.c (input_interrupt): Don't check if there's no
788 * server.c (gdb_read_memory, gdb_write_memory): If setting the
789 current thread to the general thread fails, error out.
790 (handle_qxfer_auxv, handle_qxfer_libraries)
791 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
792 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
793 (handle_query): Check if there's a thread selected instead of
794 checking whether there's any thread in the thread list.
795 (handle_qxfer_threads, handle_qxfer_btrace)
796 (handle_qxfer_btrace_conf): Don't error out early if there's no
797 thread in the thread list.
798 (handle_v_cont, myresume): Don't set the current thread to the
800 (process_serial_event) <Hg handling>: Also set thread_id if the
801 previous general thread is still alive.
802 (process_serial_event) <g/G handling>: If setting the current
803 thread to the general thread fails, error out.
804 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
805 thread's lwp instead of the current thread's.
806 * target.c (set_desired_thread): If the desired thread was not
807 found, leave the current thread pointing to NULL. Return an int
808 (boolean) indicating success.
809 * target.h (set_desired_thread): Change return type to int.
811 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
813 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
814 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
816 (ps_get_thread_area): New function.
818 2015-08-19 Gary Benson <gbenson@redhat.com>
820 * hostio.c (handle_pread): Do not attempt to read more data
821 than hostio_reply_with_data can fit in a packet.
823 2015-08-18 Joel Brobecker <brobecker@adacore.com>
825 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
827 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
829 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
831 2015-08-06 Pedro Alves <palves@redhat.com>
833 * tracepoint.c (expr_eval_result): Now an int.
835 2015-08-06 Pedro Alves <palves@redhat.com>
837 * gdbthread.h (struct regcache): Forward declare.
838 (struct thread_info) <regcache_data>: Now a struct regcache
840 * inferiors.c (inferior_regcache_data)
841 (set_inferior_regcache_data): Now work with struct regcache
843 * inferiors.h (struct regcache): Forward declare.
844 (inferior_regcache_data, set_inferior_regcache_data): Now work
845 with struct regcache pointers.
846 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
847 (free_register_cache_thread): Remove struct regcache pointer
850 2015-08-06 Pedro Alves <palves@redhat.com>
852 * server.c (captured_main): On error, print the exception message
853 to stderr, and if run_once is set, throw a quit.
855 2015-08-06 Pedro Alves <palves@redhat.com>
857 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
860 2015-08-06 Pedro Alves <palves@redhat.com>
862 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
863 reading beyond the passed in buffer length.
865 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
867 * tracepoint.c (symbol_list) <required>: Remove.
869 2015-08-06 Pedro Alves <palves@redhat.com>
871 * linux-low.c (handle_extended_wait): Set the fork child's suspend
872 count if stopping and suspending threads.
873 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
874 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
875 (linux_detach): Complete an ongoing step-over.
876 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
878 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
879 (linux_wait_1): If passing a signal to the inferior after
880 finishing a step-over, unsuspend and re-resume all lwps. If we
881 see a single-step event but the thread should be continuing, don't
882 pass the trap to gdb.
883 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
884 internal_error instead of gdb_assert.
885 (enqueue_pending_signal): New function.
886 (check_ptrace_stopped_lwp_gone): Add debug output.
887 (start_step_over): Use internal_error instead of gdb_assert.
888 (complete_ongoing_step_over): New function.
889 (linux_resume_one_thread): Don't resume a suspended thread.
890 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
893 2015-08-06 Pedro Alves <palves@redhat.com>
895 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
896 (linux_thread_alive): Use lwp_is_marked_dead.
897 (extended_event_reported): Delete.
898 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
899 instead of extended_event_reported.
900 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
902 (lwp_is_marked_dead): New function.
903 (lwp_running): Use lwp_is_marked_dead.
904 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
907 2015-08-06 Pedro Alves <palves@redhat.com>
909 * linux-low.c (linux_wait_1): Move fork event output out of the
910 !report_to_gdb check. Pass event_child->waitstatus to
911 target_waitstatus_to_string instead of ourstatus.
913 2015-08-04 Yao Qi <yao.qi@linaro.org>
915 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
916 if current_thread is 32 bit.
918 2015-08-04 Yao Qi <yao.qi@linaro.org>
920 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
921 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
922 * server.c (extended_protocol): Remove "static".
923 * server.h (extended_protocol): Declare it.
925 2015-08-04 Yao Qi <yao.qi@linaro.org>
927 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
928 both aarch64 and aarch32.
929 (aarch64_set_pc): Likewise.
931 2015-08-04 Yao Qi <yao.qi@linaro.org>
933 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
934 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
935 arm-with-neon.xml to srv_xmlfiles.
936 * linux-aarch64-low.c: Include linux-aarch32-low.h.
937 (is_64bit_tdesc): New function.
938 (aarch64_linux_read_description): New function.
939 (aarch64_arch_setup): Call aarch64_linux_read_description.
940 (regs_info): Rename to regs_info_aarch64.
941 (aarch64_regs_info): Return right regs_info.
942 (initialize_low_arch): Call initialize_low_arch_aarch32.
944 2015-08-04 Yao Qi <yao.qi@linaro.org>
946 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
947 * linux-aarch32-low.c: New file.
948 * linux-aarch32-low.h: New file.
949 * linux-arm-low.c (arm_fill_gregset): Move it to
951 (arm_store_gregset): Likewise.
952 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
953 (arm_store_vfpregset): Call arm_store_vfpregset_num.
954 (arm_arch_setup): Check if PTRACE_GETREGSET works.
955 (regs_info): Rename to regs_info_arm.
956 (arm_regs_info): Return regs_info_aarch32 if
957 have_ptrace_getregset is 1 and target description is
958 arm_with_neon or arm_with_vfpv3.
959 (initialize_low_arch): Don't call init_registers_arm_with_neon.
960 Call initialize_low_arch_aarch32 instead.
962 2015-08-04 Yao Qi <yao.qi@linaro.org>
964 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
965 * linux-low.c: ... here.
966 * linux-low.h (have_ptrace_getregset): Declare it.
968 2015-08-04 Pedro Alves <palves@redhat.com>
970 * thread-db.c (struct thread_db): Use new typedefs.
971 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
973 (disable_thread_event_reporting): Cast result of dlsym to
974 destination function pointer type.
975 (thread_db_mourn): Use td_ta_delete_ftype.
977 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
979 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
981 (CDX_BREAKPOINT): Define for R2.
982 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
983 (the_low_target): Add comments.
985 2015-07-30 Yao Qi <yao.qi@linaro.org>
987 * linux-arm-low.c (arm_hwcap): Remove it.
988 (arm_read_description): New local variable arm_hwcap. Don't
989 set arm_hwcap to zero.
991 2015-07-30 Yao Qi <yao.qi@linaro.org>
993 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
994 Use regcache->tdesc instead.
995 (arm_store_wmmxregset): Likewise.
996 (arm_fill_vfpregset): Likewise.
997 (arm_store_vfpregset): Likewise.
999 2015-07-30 Yao Qi <yao.qi@linaro.org>
1001 * linux-arm-low.c: Include arch/arm.h.
1002 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
1003 (arm_store_gregset): Likewise.
1005 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
1007 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
1008 ptrace's 4th parameter.
1010 2015-07-27 Yao Qi <yao.qi@linaro.org>
1012 * configure.srv (case aarch64*-*-linux*): Don't set
1015 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
1017 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
1019 * linux-arm-low.c: Likewise.
1020 * linux-cris-low.c: Likewise.
1021 * linux-crisv32-low.c: Likewise.
1022 * linux-low.c: Likewise.
1023 * linux-m68k-low.c: Likewise.
1024 * linux-mips-low.c: Likewise.
1025 * linux-nios2-low.c: Likewise.
1026 * linux-s390-low.c: Likewise.
1027 * linux-sparc-low.c: Likewise.
1028 * linux-tic6x-low.c: Likewise.
1029 * linux-tile-low.c: Likewise.
1030 * linux-x86-low.c: Likewise.
1032 2015-07-24 Pedro Alves <palves@redhat.com>
1034 * config.in: Regenerate.
1035 * configure: Regenerate.
1037 2015-07-24 Pedro Alves <palves@redhat.com>
1039 * acinclude.m4: Include ../ptrace.m4.
1040 * configure.ac: Call GDB_AC_PTRACE.
1041 * config.in, configure: Regenerate.
1043 2015-07-24 Yao Qi <yao.qi@linaro.org>
1045 * linux-low.c (linux_create_inferior): Remove setting to
1046 proc->priv->new_inferior.
1047 (linux_attach): Likewise.
1048 (linux_low_filter_event): Likewise.
1049 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
1051 2015-07-24 Yao Qi <yao.qi@linaro.org>
1053 * linux-low.c (linux_arch_setup): New function.
1054 (linux_low_filter_event): If proc->tdesc is NULL and
1055 proc->attached is true, call the_low_target.arch_setup.
1056 Otherwise, keep status pending, and return.
1057 (linux_resume_one_lwp_throw): Don't call get_pc if
1058 thread->while_stepping isn't NULL. Don't call
1059 get_thread_regcache if proc->tdesc is NULL.
1060 (need_step_over_p): Return 0 if proc->tdesc is NULL.
1061 (linux_target_ops): Install arch_setup.
1062 * server.c (start_inferior): Call the_target->arch_setup.
1063 * target.h (struct target_ops) <arch_setup>: New field.
1064 (target_arch_setup): New marco.
1065 * lynx-low.c (lynx_target_ops): Update.
1066 * nto-low.c (nto_target_ops): Update.
1067 * spu-low.c (spu_target_ops): Update.
1068 * win32-low.c (win32_target_ops): Update.
1070 2015-07-24 Yao Qi <yao.qi@linaro.org>
1072 * linux-low.c (linux_add_process): Don't set
1073 proc->priv->new_inferior.
1074 (linux_create_inferior): Set proc->priv->new_inferior to 1.
1075 (linux_attach): Likewise.
1077 2015-07-24 Yao Qi <yao.qi@linaro.org>
1079 * server.c (start_inferior): Code refactor.
1081 2015-07-24 Yao Qi <yao.qi@linaro.org>
1083 * server.c (process_serial_event): Set general_thread.
1085 2015-07-21 Yao Qi <yao.qi@linaro.org>
1087 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
1088 aarch64_linux_get_debug_reg_capacity.
1090 2015-07-17 Yao Qi <yao.qi@linaro.org>
1092 * Makefile.in (aarch64-linux-hw-point.o): New rule.
1093 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
1094 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
1095 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
1096 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
1097 (AARCH64_HWP_ALIGNMENT): Likewise.
1098 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
1099 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
1100 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
1101 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
1102 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
1103 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
1104 (struct aarch64_debug_reg_state): Likewise.
1105 (struct arch_lwp_info): Likewise.
1106 (aarch64_align_watchpoint): Likewise.
1107 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
1108 (aarch64_watchpoint_length): Likewise.
1109 (aarch64_point_encode_ctrl_reg): Likewise
1110 (aarch64_point_is_aligned): Likewise.
1111 (aarch64_align_watchpoint): Likewise.
1112 (aarch64_linux_set_debug_regs):
1113 (aarch64_dr_state_insert_one_point): Likewise.
1114 (aarch64_dr_state_remove_one_point): Likewise.
1115 (aarch64_handle_breakpoint): Likewise.
1116 (aarch64_handle_aligned_watchpoint): Likewise.
1117 (aarch64_handle_unaligned_watchpoint): Likewise.
1118 (aarch64_handle_watchpoint): Likewise.
1120 2015-07-17 Yao Qi <yao.qi@linaro.org>
1122 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
1123 and don't aarch64_get_debug_reg_state. All callers update.
1124 (aarch64_handle_aligned_watchpoint): Likewise.
1125 (aarch64_handle_unaligned_watchpoint): Likewise.
1126 (aarch64_handle_watchpoint): Likewise.
1127 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
1128 (aarch64_remove_point): Likewise.
1130 2015-07-17 Yao Qi <yao.qi@linaro.org>
1132 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
1134 (aarch64_handle_unaligned_watchpoint): Likewise.
1136 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1138 Revert the previous 3 commits:
1139 Move gdb_regex* to common/
1140 Move linux_find_memory_regions_full & co.
1141 gdbserver build-id attribute generator
1143 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1144 Jan Kratochvil <jan.kratochvil@redhat.com>
1146 gdbserver build-id attribute generator.
1147 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
1148 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
1149 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
1151 (get_dynamic): Use find_pdhr to traverse program headers.
1152 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
1153 (compare_mapping_entry_range, struct find_memory_region_callback_data)
1154 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
1155 (get_hex_build_id): New.
1156 (linux_qxfer_libraries_svr4): Add optional build-id attribute
1157 to reply XML document.
1159 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1160 Jan Kratochvil <jan.kratochvil@redhat.com>
1162 * target.c: Include target/target-utils.h and fcntl.h.
1163 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
1164 (target_fileio_read_stralloc): New functions.
1166 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
1168 * Makefile.in (OBS): Add gdb_regex.o.
1170 * config.in: Rebuilt.
1171 * configure: Rebuilt.
1173 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
1174 Jan Kratochvil <jan.kratochvil@redhat.com>
1176 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
1177 * Makefile.in (OBS): Add target-utils.o.
1178 (linux-maps.o, target-utils.o): New.
1179 * configure.srv (srv_linux_obj): Add linux-maps.o.
1181 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
1183 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
1185 (the_low_target): Install it.
1187 2015-07-14 Pedro Alves <palves@redhat.com>
1189 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
1190 Instead, ignore ECHILD, and throw an error for other errnos.
1192 2015-07-10 Pedro Alves <palves@redhat.com>
1194 * event-loop.c (struct callback_event) <data>: Change type to
1195 gdb_client_data instance instead of gdb_client_data pointer.
1196 (append_callback_event): Adjust.
1198 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
1200 * linux-aarch64-low.c: Add comments for each linux_target_ops
1201 method. Remove comments already covered in target_ops and
1202 linux_target_ops definitions.
1203 (the_low_target): Add comments for each unimplemented method.
1205 2015-07-09 Yao Qi <yao.qi@linaro.org>
1207 * linux-aarch64-low.c (aarch64_regmap): Remove.
1208 (aarch64_usrregs_info): Remove.
1209 (regs_info): Set field usrregs to NULL.
1211 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
1213 * linux-low.c: Include "rsp-low.h"
1214 (linux_low_encode_pt_config, linux_low_encode_raw): New.
1215 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
1216 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
1217 (handle_btrace_enable_pt): New.
1218 (handle_btrace_general_set): Support "pt".
1219 (handle_btrace_conf_general_set): Support "pt:size".
1221 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1223 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1226 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1228 * linux-aarch64-low.c: Remove comment about endianness.
1229 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1230 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1233 2015-06-24 Gary Benson <gbenson@redhat.com>
1235 * linux-i386-ipa.c (stdint.h): Do not include.
1236 * lynx-i386-low.c (stdint.h): Likewise.
1237 * lynx-ppc-low.c (stdint.h): Likewise.
1238 * mem-break.c (stdint.h): Likewise.
1239 * thread-db.c (stdint.h): Likewise.
1240 * tracepoint.c (stdint.h): Likewise.
1241 * win32-low.c (stdint.h): Likewise.
1243 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1245 * server.c (write_qxfer_response): Update call to
1246 remote_escape_output.
1248 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1249 Jan Kratochvil <jan.kratochvil@redhat.com>
1251 Merge multiple hex conversions.
1252 * gdbreplay.c (tohex): Rename to 'fromhex'.
1253 (logchar): Use fromhex.
1255 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1257 * server.c (handle_qxfer_libraries): Set `version' attribute for
1260 2015-06-10 Gary Benson <gbenson@redhat.com>
1262 * target.h (struct target_ops) <multifs_open>: New field.
1263 <multifs_unlink>: Likewise.
1264 <multifs_readlink>: Likewise.
1265 * linux-low.c (nat/linux-namespaces.h): New include.
1266 (linux_target_ops): Initialize the_target->multifs_open,
1267 the_target->multifs_unlink and the_target->multifs_readlink.
1268 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1269 * hostio.c (hostio_fs_pid): New static variable.
1270 (hostio_handle_new_gdb_connection): New function.
1271 (handle_setfs): Likewise.
1272 (handle_open): Use the_target->multifs_open as appropriate.
1273 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1274 (handle_readlink): Use the_target->multifs_readlink as
1276 (handle_vFile): Handle vFile:setfs packets.
1277 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1278 after target_handle_new_gdb_connection.
1280 2015-06-10 Gary Benson <gbenson@redhat.com>
1282 * configure.ac (AC_CHECK_FUNCS): Add setns.
1283 * config.in: Regenerate.
1284 * configure: Likewise.
1285 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1286 (linux-namespaces.o): New rule.
1287 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1289 2015-06-09 Gary Benson <gbenson@redhat.com>
1291 * hostio.c (handle_open): Process mode argument with
1292 fileio_to_host_mode.
1294 2015-06-01 Yao Qi <yao.qi@linaro.org>
1296 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1297 * linux-x86-low.c: Likewise.
1299 2015-05-28 Don Breazeal <donb@codesourcery.com>
1301 * linux-low.c (handle_extended_wait): Initialize
1302 thread_info.last_resume_kind for new fork children.
1304 2015-05-15 Pedro Alves <palves@redhat.com>
1306 * target.h (target_handle_new_gdb_connection): Rewrite using if
1307 wrapped in do/while.
1309 2015-05-14 Joel Brobecker <brobecker@adacore.com>
1311 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1312 * configure, config.in: Regenerate.
1313 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1316 2015-05-12 Don Breazeal <donb@codesourcery.com>
1318 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1319 PTRACE_EVENT_VFORK_DONE.
1320 (linux_low_ptrace_options, extended_event_reported): Add vfork
1322 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1323 and "vforkdone" for RSP 'T' Stop Reply Packet.
1324 * server.h (report_vfork_events): Declare
1327 2015-05-12 Don Breazeal <donb@codesourcery.com>
1329 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1330 (the_low_target) <new_fork>: Initialize new member.
1331 * linux-arm-low.c (arm_new_fork): New function.
1332 (the_low_target) <new_fork>: Initialize new member.
1333 * linux-low.c (handle_extended_wait): Call new target function
1335 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1336 * linux-mips-low.c (mips_add_watchpoint): New function
1337 extracted from mips_insert_point.
1338 (the_low_target) <new_fork>: Initialize new member.
1339 (mips_linux_new_fork): New function.
1340 (mips_insert_point): Call mips_add_watchpoint.
1341 * linux-x86-low.c (x86_linux_new_fork): New function.
1342 (the_low_target) <new_fork>: Initialize new member.
1344 2015-05-12 Don Breazeal <donb@codesourcery.com>
1346 * linux-low.c (handle_extended_wait): Implement return value,
1347 rename argument 'event_child' to 'event_lwp', handle
1348 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1349 (linux_low_ptrace_options): New function.
1350 (linux_low_filter_event): Call linux_low_ptrace_options,
1351 use different argument fo linux_enable_event_reporting,
1352 use return value from handle_extended_wait.
1353 (extended_event_reported): New function.
1354 (linux_wait_1): Call extended_event_reported and set
1355 status to report fork events.
1356 (linux_write_memory): Add pid to debug message.
1357 (reset_lwp_ptrace_options_callback): New function.
1358 (linux_handle_new_gdb_connection): New function.
1359 (linux_target_ops): Initialize new structure member.
1360 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1361 * lynx-low.c: Initialize new structure member.
1362 * remote-utils.c (prepare_resume_reply): Implement stop reason
1363 "fork" for "T" stop message.
1364 * server.c (handle_query): Call handle_new_gdb_connection.
1365 * server.h (report_fork_events): Declare global flag.
1366 * target.h (struct target_ops) <handle_new_gdb_connection>:
1368 (target_handle_new_gdb_connection): New macro.
1369 * win32-low.c: Initialize new structure member.
1371 2015-05-12 Don Breazeal <donb@codesourcery.com>
1373 * mem-break.c (APPEND_TO_LIST): Define macro.
1374 (clone_agent_expr): New function.
1375 (clone_one_breakpoint): New function.
1376 (clone_all_breakpoints): New function.
1377 * mem-break.h: Declare new functions.
1379 2015-05-12 Don Breazeal <donb@codesourcery.com>
1381 * linux-low.c (linux_supports_fork_events): New function.
1382 (linux_supports_vfork_events): New function.
1383 (linux_target_ops): Initialize new structure members.
1384 (initialize_low): Call linux_check_ptrace_features.
1385 * lynx-low.c (lynx_target_ops): Initialize new structure
1387 * server.c (report_fork_events, report_vfork_events):
1389 (handle_query): Add new features to qSupported packet and
1391 (captured_main): Initialize new global variables.
1392 * target.h (struct target_ops) <supports_fork_events>:
1394 <supports_vfork_events>: New member.
1395 (target_supports_fork_events): New macro.
1396 (target_supports_vfork_events): New macro.
1397 * win32-low.c (win32_target_ops): Initialize new structure
1400 2015-05-12 Gary Benson <gbenson@redhat.com>
1402 * server.c (handle_qxfer_exec_file): Use current process
1405 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1407 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1408 Remove HAVE_PTRACE_GETREGS conditionals.
1409 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1410 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1412 2015-05-08 Yao Qi <yao.qi@linaro.org>
1414 * linux-low.c (linux_supports_conditional_breakpoints): New
1416 (linux_target_ops): Install new target method.
1417 * lynx-low.c (lynx_target_ops): Install NULL hook for
1418 supports_conditional_breakpoints.
1419 * nto-low.c (nto_target_ops): Likewise.
1420 * spu-low.c (spu_target_ops): Likewise.
1421 * win32-low.c (win32_target_ops): Likewise.
1422 * server.c (handle_query): Check
1423 target_supports_conditional_breakpoints.
1424 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1426 (target_supports_conditional_breakpoints): New macro.
1428 2015-05-06 Pedro Alves <palves@redhat.com>
1431 * server.c (start_inferior): If the process exits, mourn it.
1433 2015-04-21 Gary Benson <gbenson@redhat.com>
1435 * hostio.c (fileio_open_flags_to_host): Factored out to
1436 fileio_to_host_openflags in common/fileio.c. Single use
1439 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1441 * linux-xtensa-low.c (xtensa_fill_gregset)
1442 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1445 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1447 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1448 (regs_info): Replace usrregs pointer with NULL.
1450 2015-04-17 Gary Benson <gbenson@redhat.com>
1452 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1453 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1454 * server.c (handle_qxfer_exec_file): New function.
1455 (qxfer_packets): Add exec-file entry.
1456 (handle_query): Report qXfer:exec-file:read as supported packet.
1458 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1460 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1462 2015-04-09 Gary Benson <gbenson@redhat.com>
1464 * hostio-errno.c (errno_to_fileio_error): Remove function.
1465 Update caller to use remote_fileio_to_fio_error.
1467 2015-04-09 Yao Qi <yao.qi@linaro.org>
1469 * linux-low.c (linux_insert_point): Call
1470 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1471 (linux_remove_point): Call remove_memory_breakpoint if type is
1473 * linux-x86-low.c (x86_insert_point): Don't call
1474 insert_memory_breakpoint.
1475 (x86_remove_point): Don't call remove_memory_breakpoint.
1477 2015-04-01 Pedro Alves <palves@redhat.com>
1478 Cleber Rosa <crosa@redhat.com>
1480 * server.c (gdbserver_usage): Reorganize and extend the usage
1483 2015-03-24 Pedro Alves <palves@redhat.com>
1485 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1486 output. Also dump TRAP_TRACE.
1487 (linux_low_filter_event): In debug output, distinguish a
1488 resume_stop SIGSTOP from a delayed SIGSTOP.
1490 2015-03-24 Gary Benson <gbenson@redhat.com>
1492 * linux-x86-low.c (x86_linux_new_thread): Moved to
1494 (x86_linux_prepare_to_resume): Likewise.
1496 2015-03-24 Gary Benson <gbenson@redhat.com>
1498 * Makefile.in (x86-linux-dregs.o): New rule.
1499 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1500 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1501 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1502 (x86_linux_dr_get): Likewise.
1503 (x86_linux_dr_set): Likewise.
1504 (update_debug_registers_callback): Likewise.
1505 (x86_linux_dr_set_addr): Likewise.
1506 (x86_linux_dr_get_addr): Likewise.
1507 (x86_linux_dr_set_control): Likewise.
1508 (x86_linux_dr_get_control): Likewise.
1509 (x86_linux_dr_get_status): Likewise.
1510 (x86_linux_update_debug_registers): Likewise.
1512 2015-03-24 Gary Benson <gbenson@redhat.com>
1514 * linux-x86-low.c (x86_linux_update_debug_registers):
1515 New function, factored out from...
1516 (x86_linux_prepare_to_resume): ...this.
1518 2015-03-24 Gary Benson <gbenson@redhat.com>
1520 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1521 (x86_linux_dr_set): Likewise.
1522 (update_debug_registers_callback): Likewise.
1523 (x86_linux_dr_set_addr): Likewise.
1524 (x86_linux_dr_get_addr): Likewise.
1525 (x86_linux_dr_set_control): Likewise.
1526 (x86_linux_dr_get_control): Likewise.
1527 (x86_linux_dr_get_status): Likewise.
1528 (x86_linux_prepare_to_resume): Likewise.
1530 2015-03-24 Gary Benson <gbenson@redhat.com>
1532 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1533 Use perror_with_name. Pass string through gettext.
1534 (x86_linux_dr_set): Likewise.
1536 2015-03-24 Gary Benson <gbenson@redhat.com>
1538 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1539 (x86_linux_dr_set_addr): ...this.
1540 (x86_dr_low_get_addr): Rename to...
1541 (x86_linux_dr_get_addr): ...this.
1542 (x86_dr_low_set_control): Rename to...
1543 (x86_linux_dr_set_control): ...this.
1544 (x86_dr_low_get_control): Rename to...
1545 (x86_linux_dr_get_control): ...this.
1546 (x86_dr_low_get_status): Rename to...
1547 (x86_linux_dr_get_status): ...this.
1548 (x86_dr_low): Update with new function names.
1550 2015-03-24 Gary Benson <gbenson@redhat.com>
1552 * Makefile.in (x86-linux.o): New rule.
1553 * configure.srv: Add x86-linux.o to relevant targets.
1554 * linux-low.c (lwp_set_arch_private_info): New function.
1555 (lwp_arch_private_info): Likewise.
1556 * linux-x86-low.c: Include nat/x86-linux.h.
1557 (arch_lwp_info): Removed structure.
1558 (update_debug_registers_callback):
1559 Use lwp_set_debug_registers_changed.
1560 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1561 and lwp_set_debug_registers_changed.
1562 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1564 2015-03-24 Gary Benson <gbenson@redhat.com>
1566 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1567 * linux-arm-low.c (arm_new_thread): Likewise.
1568 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1569 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1570 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1571 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1573 2015-03-24 Gary Benson <gbenson@redhat.com>
1575 * linux-low.c (ptid_of_lwp): New function.
1576 (lwp_is_stopped): Likewise.
1577 (lwp_stop_reason): Likewise.
1578 * linux-x86-low.c (update_debug_registers_callback):
1580 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1583 2015-03-24 Gary Benson <gbenson@redhat.com>
1585 * linux-low.h (linux_stop_lwp): Remove declaration.
1587 2015-03-24 Gary Benson <gbenson@redhat.com>
1589 * linux-low.h: Include nat/linux-nat.h.
1590 * linux-low.c (iterate_over_lwps_args): New structure.
1591 (iterate_over_lwps_filter): New function.
1592 (iterate_over_lwps): Likewise.
1593 * linux-x86-low.c (update_debug_registers_callback):
1594 Update signature to what iterate_over_lwps expects.
1595 Remove PID check that iterate_over_lwps now performs.
1596 (x86_dr_low_set_addr): Use iterate_over_lwps.
1597 (x86_dr_low_set_control): Likewise.
1599 2015-03-24 Gary Benson <gbenson@redhat.com>
1601 * linux-x86-low.c (x86_debug_reg_state): New function.
1602 (x86_linux_prepare_to_resume): Use the above.
1604 2015-03-24 Gary Benson <gbenson@redhat.com>
1606 * linux-low.c (current_lwp_ptid): New function.
1607 * linux-x86-low.c: Include nat/linux-nat.h.
1608 (x86_dr_low_get_addr): Use current_lwp_ptid.
1609 (x86_dr_low_get_control): Likewise.
1610 (x86_dr_low_get_status): Likewise.
1612 2015-03-20 Pedro Alves <palves@redhat.com>
1614 * tracepoint.c (cmd_qtstatus): Make "str" const.
1616 2015-03-20 Pedro Alves <palves@redhat.com>
1618 * server.c (handle_general_set): Make "req_str" const.
1620 2015-03-19 Pedro Alves <palves@redhat.com>
1622 * linux-low.c (linux_resume_one_lwp): Rename to ...
1623 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1624 instead call perror_with_name.
1625 (check_ptrace_stopped_lwp_gone): New function.
1626 (linux_resume_one_lwp): Reimplement as wrapper around
1627 linux_resume_one_lwp_throw that swallows errors if the LWP is
1630 2015-03-19 Pedro Alves <palves@redhat.com>
1632 * linux-low.c (count_events_callback, select_event_lwp_callback):
1633 No longer check whether the thread has resume_stop as last resume
1636 2015-03-19 Pedro Alves <palves@redhat.com>
1638 * linux-low.c (count_events_callback, select_event_lwp_callback):
1639 Use the lwp's status_pending_p field, not the thread's.
1641 2015-03-19 Pedro Alves <palves@redhat.com>
1643 * linux-low.c (select_event_lwp_callback): Update comments to
1644 no longer mention SIGTRAP.
1646 2015-03-18 Gary Benson <gbenson@redhat.com>
1648 * server.c (handle_query): Do not report vFile:fstat as supported.
1650 2015-03-11 Gary Benson <gbenson@redhat.com>
1652 * hostio.c (sys/types.h): New include.
1653 (sys/stat.h): Likewise.
1654 (common-remote-fileio.h): Likewise.
1655 (handle_fstat): New function.
1656 (handle_vFile): Handle vFile:fstat packets.
1658 2015-03-11 Gary Benson <gbenson@redhat.com>
1660 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1661 struct stat.st_blocks and struct stat.st_blksize.
1662 * configure: Regenerate.
1663 * config.in: Likewise.
1664 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1665 (OBS): Add common-remote-fileio.o.
1666 (common-remote-fileio.o): New rule.
1668 2015-03-09 Pedro Alves <palves@redhat.com>
1670 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1671 'struct sockaddr' pointer in 'accept' call.
1673 2015-03-09 Pedro Alves <palves@redhat.com>
1676 2015-03-07 Pedro Alves <palves@redhat.com>
1677 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1678 or <winsock2.h> here. Instead include "gdb_socket.h".
1679 (remote_open): Use union gdb_sockaddr_u.
1680 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1681 or <winsock2.h> here. Instead include "gdb_socket.h".
1682 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1683 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1685 (init_named_socket, gdb_agent_helper_thread): Use union
1688 2015-03-07 Pedro Alves <palves@redhat.com>
1690 * configure.ac (build_warnings): Move
1691 -Wdeclaration-after-statement to the C-specific set.
1692 * configure: Regenerate.
1694 2015-03-07 Pedro Alves <palves@redhat.com>
1696 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1697 or <winsock2.h> here. Instead include "gdb_socket.h".
1698 (remote_open): Use union gdb_sockaddr_u.
1699 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1700 or <winsock2.h> here. Instead include "gdb_socket.h".
1701 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1702 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1704 (init_named_socket, gdb_agent_helper_thread): Use union
1707 2015-03-07 Pedro Alves <palves@redhat.com>
1709 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1712 2015-03-06 Yao Qi <yao.qi@linaro.org>
1714 * linux-aarch64-low.c (aarch64_insert_point): Use
1715 show_debug_regs as a boolean.
1716 (aarch64_remove_point): Likewise.
1718 2015-03-05 Pedro Alves <palves@redhat.com>
1720 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1721 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1722 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1723 * nto-low.c (nto_target_ops): Likewise.
1724 * spu-low.c (spu_target_ops): Likewise.
1725 * win32-low.c (win32_target_ops): Likewise.
1727 2015-03-04 Pedro Alves <palves@redhat.com>
1729 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1730 Decide whether a breakpoint triggered based on the SIGTRAP's
1732 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1733 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1734 (linux_low_filter_event): Check for breakpoints before checking
1736 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1738 (linux_stopped_by_sw_breakpoint)
1739 (linux_supports_stopped_by_sw_breakpoint)
1740 (linux_stopped_by_hw_breakpoint)
1741 (linux_supports_stopped_by_hw_breakpoint): New functions.
1742 (linux_target_ops): Install new target methods.
1744 2015-03-04 Pedro Alves <palves@redhat.com>
1746 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1747 * server.c (swbreak_feature, hwbreak_feature): New globals.
1748 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1749 (captured_main): Clear swbreak_feature and hwbreak_feature.
1750 * server.h (swbreak_feature, hwbreak_feature): Declare.
1751 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1752 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1753 supports_stopped_by_hw_breakpoint>: New fields.
1754 (target_supports_stopped_by_sw_breakpoint)
1755 (target_stopped_by_sw_breakpoint)
1756 (target_supports_stopped_by_hw_breakpoint)
1757 (target_stopped_by_hw_breakpoint): Declare.
1759 2015-03-04 Pedro Alves <palves@redhat.com>
1761 enum lwp_stop_reason -> enum target_stop_reason
1762 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1763 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1764 (linux_wait_1, stuck_in_jump_pad_callback)
1765 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1766 (linux_stopped_by_watchpoint):
1767 * linux-low.h (enum lwp_stop_reason): Delete.
1768 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1769 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1771 2015-03-04 Yao Qi <yao.qi@linaro.org>
1773 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1775 2015-03-03 Gary Benson <gbenson@redhat.com>
1777 * hostio.c (handle_vFile): Fix prefix lengths.
1779 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1781 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1784 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1786 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1787 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1788 (clean): Add "rm -f" for above C files.
1789 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1790 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1791 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1792 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1793 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1794 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1795 (init_registers_s390x_vx_linux64)
1796 (init_registers_s390x_tevx_linux64)
1797 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1798 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1800 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1801 (s390_store_vxrs_high): New functions.
1802 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1804 (s390_arch_setup): Add logic for selecting one of the new target
1805 descriptions. Activate the new vector regsets if applicable.
1806 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1807 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1808 and init_registers_s390x_tevx_linux64.
1810 2015-03-01 Pedro Alves <palves@redhat.com>
1812 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1815 2015-02-27 Pedro Alves <palves@redhat.com>
1817 * linux-x86-low.c (u_debugreg_offset): New function.
1818 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1820 2015-02-27 Pedro Alves <palves@redhat.com>
1822 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1823 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1824 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1825 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1826 (ps_lsetfpregs, ps_getpid)
1827 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1828 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1829 (ps_lsetxregs, ps_plog): Declare.
1831 2015-02-27 Pedro Alves <palves@redhat.com>
1833 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1834 IP_AGENT_EXPORT_FUNC.
1835 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1836 IP_AGENT_EXPORT_FUNC.
1837 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1838 (IP_AGENT_EXPORT): Delete.
1839 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1840 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1841 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1842 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1843 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1844 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1845 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1846 (traceframe_read_count, traceframe_write_count)
1847 (traceframes_created, trace_state_variables, get_raw_reg)
1848 (get_trace_state_variable_value, set_trace_state_variable_value)
1849 (ust_loaded, helper_thread_id, cmd_buf): Use
1850 IPA_SYM_EXPORTED_NAME.
1851 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1852 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1853 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1854 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1855 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1856 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1857 EXTERN_C_PUSH/EXTERN_C_POP.
1858 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1859 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1860 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1861 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1862 (traceframe_write_count, traceframe_read_count)
1863 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1864 (about_to_request_buffer_space, get_trace_state_variable_value)
1865 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1866 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1867 EXTERN_C_PUSH/EXTERN_C_POP.
1868 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1869 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1870 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1871 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1872 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1873 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1874 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1875 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1877 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1878 (IP_AGENT_EXPORT_VAR_DECL): Define.
1880 (gdb_agent_get_raw_reg): Declare.
1882 2015-02-27 Tom Tromey <tromey@redhat.com>
1883 Pedro Alves <palves@redhat.com>
1885 Rename symbols whose names are reserved C++ keywords throughout.
1887 2015-02-27 Pedro Alves <palves@redhat.com>
1889 * Makefile.in (COMPILER): New, get it from autoconf.
1890 (CXX): Get from autoconf instead.
1891 (COMPILE.pre): Use COMPILER.
1892 (CC-LD): Rename to ...
1893 (CC_LD): ... this. Use COMPILER.
1894 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1895 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1896 * acinclude.m4: Include build-with-cxx.m4.
1897 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1898 Disable -Werror by default if building in C++ mode.
1899 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1900 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1901 the C++ compiler. Save/restore CXXFLAGS too.
1902 * configure: Regenerate.
1904 2015-02-27 Pedro Alves <palves@redhat.com>
1906 * acinclude.m4: Include libiberty.m4.
1907 * configure.ac: Call libiberty_INIT.
1908 * config.in, configure: Regenerate.
1910 2015-02-26 Pedro Alves <palves@redhat.com>
1912 * linux-low.c (linux_wait_1): When incrementing the PC past a
1913 program breakpoint always use the_low_target.breakpoint_len as
1914 increment, rather than the maximum between that and
1915 the_low_target.decr_pc_after_break.
1917 2015-02-23 Pedro Alves <palves@redhat.com>
1919 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1920 thread was doing a step-over; always adjust the PC if
1921 we stepped over a permanent breakpoint.
1922 (linux_wait_1): If we stepped over breakpoint that was on top of a
1923 permanent breakpoint, manually advance the PC past it.
1925 2015-02-23 Pedro Alves <palves@redhat.com>
1927 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1929 (x86_fill_gregset, x86_store_gregset): Use it when handling
1932 2015-02-20 Pedro Alves <palves@redhat.com>
1934 * thread-db.c: Include "nat/linux-procfs.h".
1935 (thread_db_init): Skip listing new threads if the kernel supports
1936 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1938 2015-02-20 Pedro Alves <palves@redhat.com>
1940 * linux-low.c (status_pending_p_callback): Use ptid_match.
1942 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1944 PR breakpoints/16812
1945 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1946 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1947 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1949 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1951 PR breakpoints/15956
1952 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1954 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1956 * linux-low.c (linux_low_btrace_conf): Print size.
1957 * server.c (handle_btrace_conf_general_set): New.
1958 (hanle_general_set): Call handle_btrace_conf_general_set.
1959 (handle_query): Report Qbtrace-conf:bts:size as supported.
1961 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1963 * linux-low.c (linux_low_enable_btrace): Update parameters.
1964 (linux_low_btrace_conf): New.
1965 (linux_target_ops)<to_btrace_conf>: Initialize.
1966 * server.c (current_btrace_conf): New.
1967 (handle_btrace_enable): Rename to ...
1968 (handle_btrace_enable_bts): ... this. Pass ¤t_btrace_conf
1969 to target_enable_btrace. Update comment. Update users.
1970 (handle_qxfer_btrace_conf): New.
1971 (qxfer_packets): Add btrace-conf entry.
1972 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1973 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1974 (target_ops)<read_btrace_conf>: New.
1975 (target_enable_btrace): Update parameters.
1976 (target_read_btrace_conf): New.
1978 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1980 * server.c (handle_btrace_general_set): Remove call to
1981 target_supports_btrace.
1982 (supported_btrace_packets): New.
1983 (handle_query): Call supported_btrace_packets.
1984 * target.h: include btrace-common.h.
1985 (btrace_target_info): Removed.
1986 (supports_btrace, target_supports_btrace): Update parameters.
1988 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1990 * Makefile.in (SFILES): Add common/btrace-common.c.
1991 (OBS): Add common/btrace-common.o.
1992 (btrace-common.o): Add build rules.
1993 * linux-low: Include btrace-common.h.
1994 (linux_low_read_btrace): Use struct btrace_data. Call
1995 btrace_data_init and btrace_data_fini.
1997 2015-02-06 Pedro Alves <palves@redhat.com>
1999 * thread-db.c (find_new_threads_callback): Add debug output.
2001 2015-02-04 Pedro Alves <palves@redhat.com>
2003 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
2004 (resume_stopped_resumed_lwps): New function.
2005 (linux_wait_for_event_filtered): Use it.
2007 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2009 * Makefile.in (SFILES): Add linux-personality.c.
2010 (linux-personality.o): New rule.
2011 * configure.srv (srv_linux_obj): Add linux-personality.o to the
2012 list of objects to be built.
2013 * linux-low.c: Include nat/linux-personality.h.
2014 (linux_create_inferior): Remove code to disable address space
2015 randomization (moved to ../nat/linux-personality.c). Create
2016 cleanup to disable address space randomization.
2018 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
2020 * Makefile.in (posix-strerror.o): New rule.
2021 (mingw-strerror.o): Likewise.
2022 * configure: Regenerated.
2023 * configure.ac: Source file ../common/common.host. Initialize new
2024 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
2026 2015-01-14 Yao Qi <yao@codesourcery.com>
2028 * Makefile.in (SFILES): Add nat/ppc-linux.c.
2029 (ppc-linux.o): New rule.
2030 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
2031 * configure.ac: AC_CHECK_FUNCS(getauxval).
2032 * config.in: Re-generated.
2033 * configure: Re-generated.
2034 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
2035 ppc64_64bit_inferior_p
2037 2015-01-14 Yao Qi <yao@codesourcery.com>
2039 * linux-ppc-low.c: Include "nat/ppc-linux.h".
2040 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
2041 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
2042 (PT_ORIG_R3, PT_TRAP): Likewise.
2043 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
2044 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
2045 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
2047 2015-01-10 Joel Brobecker <brobecker@adacore.com>
2049 * i387-fp.c (i387_cache_to_xsave): In look over
2050 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
2051 zmmh_low_space field by use of zmmh_high_space.
2053 2015-01-09 Pedro Alves <palves@redhat.com>
2055 * linux-low.c (step_over_bkpt): Move higher up in the file.
2056 (handle_extended_wait): Don't store the stop_pc here.
2057 (get_stop_pc): Adjust comments and rename to ...
2058 (check_stopped_by_breakpoint): ... this. Record whether the LWP
2059 stopped for a software breakpoint or hardware breakpoint.
2060 (thread_still_has_status_pending_p): New function.
2061 (status_pending_p_callback): Use
2062 thread_still_has_status_pending_p. If the event is no longer
2063 interesting, resume the LWP.
2064 (handle_tracepoints): Add assert.
2065 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
2066 (wstatus_maybe_breakpoint): New function.
2067 (cancel_breakpoint): Delete function.
2068 (check_stopped_by_watchpoint): New function, factored out from
2069 linux_low_filter_event.
2070 (lp_status_maybe_breakpoint): Delete function.
2071 (linux_low_filter_event): Remove filter_ptid argument.
2072 Leave thread group exits pending here. Store the LWP's stop PC.
2073 Always leave events pending.
2074 (linux_wait_for_event_filtered): Pull all events out of the
2075 kernel, and leave them all pending.
2076 (count_events_callback, select_event_lwp_callback): Consider all
2078 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
2079 (select_event_lwp): Only give preference to the stepping LWP in
2080 all-stop mode. Adjust comments.
2081 (ignore_event): New function.
2082 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
2083 references to cancel_breakpoints. Adjust to renames. Also give
2084 equal priority to all LWPs that have had events in non-stop mode.
2085 If reporting a software breakpoint event, unadjust the LWP's PC.
2086 (linux_wait): If linux_wait_1 returned an ignored event, retry.
2087 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
2089 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
2090 (resume_status_pending_p): Use thread_still_has_status_pending_p.
2091 (linux_stopped_by_watchpoint): Adjust.
2092 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
2093 * linux-low.h (enum lwp_stop_reason): New.
2094 (struct lwp_info) <stop_pc>: Adjust comment.
2095 <stopped_by_watchpoint>: Delete field.
2096 <stop_reason>: New field.
2097 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
2098 * mem-break.c (software_breakpoint_inserted_here)
2099 (hardware_breakpoint_inserted_here): New function.
2100 * mem-break.h (software_breakpoint_inserted_here)
2101 (hardware_breakpoint_inserted_here): Declare.
2102 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
2103 (cancel_breakpoints): Delete.
2104 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
2105 (upload_fast_traceframes): Remove references to
2108 2015-01-09 Pedro Alves <palves@redhat.com>
2110 * thread-db.c (find_new_threads_callback): Ignore thread if the
2111 kernel thread ID is -1.
2113 2015-01-09 Pedro Alves <palves@redhat.com>
2115 * linux-low.c (linux_attach_fail_reason_string): Move to
2116 nat/linux-ptrace.c, and rename.
2117 (linux_attach_lwp): Update comment.
2118 (attach_proc_task_lwp_callback): New function.
2119 (linux_attach): Adjust to rename and use
2120 linux_proc_attach_tgid_threads.
2121 (linux_attach_fail_reason_string): Delete declaration.
2123 2015-01-01 Joel Brobecker <brobecker@adacore.com>
2125 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
2126 * server.c (gdbserver_version): Likewise.
2128 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
2130 * remote-utils.c: Include ctype.h.
2131 (input_interrupt): Explicitly handle the case when the char
2132 received is the NUL byte. Improve the printing of non-ASCII
2135 2014-12-16 Joel Brobecker <brobecker@adacore.com>
2137 * linux-low.c (linux_low_filter_event): Update call to
2138 linux_enable_event_reporting following the addition of
2139 a new parameter to that function.
2141 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
2144 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
2145 (AARCH64_FPCR_REGNO): Likewise.
2146 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
2147 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
2148 (aarch64_store_fpregset): Likewise.
2150 2014-12-15 Joel Brobecker <brobecker@adacore.com>
2152 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
2153 Remove FIXME comment about assumption about N.
2155 2014-12-13 Joel Brobecker <brobecker@adacore.com>
2157 * configure.ac: If large-file support is disabled in GDBserver,
2158 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
2159 * configure: Regenerate.
2161 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2163 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
2164 warning upon ENODATA from ptrace.
2165 * linux-s390-low.c (s390_store_tdb): New.
2166 (s390_regsets): Add regset for NT_S390_TDB.
2168 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2170 * linux-low.c (regsets_store_inferior_registers): Skip regsets
2171 without a fill_function.
2172 * linux-s390-low.c (s390_fill_last_break): Remove.
2173 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
2174 (s390_arch_setup): Use regset's size instead of fill_function for
2177 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2179 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
2180 the regset's store function when ptrace returned an error.
2181 * regcache.c (get_thread_regcache): Invalidate register cache
2182 before fetching inferior's registers.
2184 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
2186 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
2187 while-loop as for-loop.
2188 (regsets_store_inferior_registers): Likewise.
2190 2014-11-28 Yao Qi <yao@codesourcery.com>
2192 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
2193 * config.in, configure: Re-generate.
2194 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
2197 2014-11-21 Yao Qi <yao@codesourcery.com>
2199 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
2200 (AC_CHECK_HEADERS): Remove malloc.h.
2201 * configure: Re-generated.
2202 * config.in: Re-generated.
2203 * server.h: Don't include alloca.h and malloc.h.
2204 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
2205 Don't include malloc.h.
2207 2014-11-17 Joel Brobecker <brobecker@adacore.com>
2209 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
2210 corresponding ERRNO check in same block.
2212 2014-11-12 Pedro Alves <palves@redhat.com>
2214 * server.c (cont_thread): Update comment.
2215 (start_inferior, attach_inferior): No longer clear cont_thread.
2216 (handle_v_cont): No longer set cont_thread.
2217 (captured_main): Clear cont_thread each time a GDB connects.
2219 2014-11-12 Pedro Alves <palves@redhat.com>
2221 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
2222 thread, and don't resume all threads if the Hc thread has exited.
2224 2014-11-12 Pedro Alves <palves@redhat.com>
2226 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2227 the process group instead of to a specific LWP.
2229 2014-10-15 Pedro Alves <palves@redhat.com>
2232 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2234 (arm_set_thread_context): Delete.
2235 (the_low_target): Adjust.
2236 * win32-i386-low.c (debug_registers_changed)
2237 (debug_registers_used): Delete.
2238 (update_debug_registers_callback): New function.
2239 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2240 needing to update their debug registers.
2241 (win32_get_current_dr): New function.
2242 (x86_dr_low_get_addr, x86_dr_low_get_control)
2243 (x86_dr_low_get_status): Fetch the debug register from the thread
2245 (i386_initial_stuff): Adjust.
2246 (i386_get_thread_context): Remove current_event parameter. Don't
2247 clear debug_registers_changed nor copy DR values to
2249 (i386_set_thread_context): Delete.
2250 (i386_prepare_to_resume): New function.
2251 (i386_thread_added): Mark the thread as needing to update irs
2253 (the_low_target): Remove i386_set_thread_context and install
2254 i386_prepare_to_resume.
2255 * win32-low.c (win32_get_thread_context): Adjust.
2256 (win32_set_thread_context): Use SetThreadContext
2258 (win32_prepare_to_resume): New function.
2259 (win32_require_context): New function, factored out from ...
2260 (thread_rec): ... this.
2261 (continue_one_thread): Call win32_prepare_to_resume on each thread
2262 we're about to continue.
2263 (win32_resume): Call win32_prepare_to_resume on the event thread.
2264 * win32-low.h (struct win32_thread_info)
2265 <debug_registers_changed>: New field.
2266 (struct win32_target_ops): Change prototype of set_thread_context,
2267 delete set_thread_context and add prepare_to_resume.
2268 (win32_require_context): New declaration.
2270 2014-10-08 Gary Benson <gbenson@redhat.com>
2272 * server.h: Do not include common-exceptions.h.
2274 2014-10-08 Gary Benson <gbenson@redhat.com>
2276 * server.h: Do not include cleanups.h.
2278 2014-09-30 James Hogan <james.hogan@imgtec.com>
2280 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2283 2014-09-23 Yao Qi <yao@codesourcery.com>
2285 * linux-low.c (lp_status_maybe_breakpoint): New function.
2286 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2287 (count_events_callback): Likewise.
2288 (select_event_lwp_callback): Likewise.
2289 (cancel_breakpoints_callback): Likewise.
2291 2014-09-19 Don Breazeal <donb@codesourcery.com>
2293 * linux-low.c (handle_extended_wait): Call
2294 linux_ptrace_get_extended_event.
2295 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2296 linux_is_extended_waitstatus.
2298 2014-09-16 Joel Brobecker <brobecker@adacore.com>
2300 * Makefile.in (CPPFLAGS): Define.
2301 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2302 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2304 2014-09-16 Gary Benson <gbenson@redhat.com>
2306 * inferiors.h (current_inferior): Renamed as...
2307 (current_thread): New variable. All uses updated.
2308 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2309 (maybe_move_out_of_jump_pad): Likewise.
2310 (cancel_breakpoint): Likewise.
2311 (linux_low_filter_event): Likewise.
2312 (wait_for_sigstop): Likewise.
2313 (linux_resume_one_lwp): Likewise.
2314 (need_step_over_p): Likewise.
2315 (start_step_over): Likewise.
2316 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2317 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2318 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2319 and save_inferior as saved_thread.
2320 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2322 (regcache_invalidate_thread): Likewise.
2323 * remote-utils.c (prepare_resume_reply): Likewise.
2324 * thread-db.c (thread_db_get_tls_address): Likewise.
2325 (disable_thread_event_reporting): Likewise.
2326 (remove_thread_event_breakpoints): Likewise.
2327 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2329 * target.h (set_desired_inferior): Renamed as...
2330 (set_desired_thread): New declaration. All uses updated.
2331 * server.c (myresume): Updated comment to reference thread instead
2333 (handle_serial_event): Likewise.
2334 (handle_target_event): Likewise.
2336 2014-09-12 Tom Tromey <tromey@redhat.com>
2337 Gary Benson <gbenson@redhat.com>
2339 * regcache.h: Include common-regcache.h.
2340 (regcache_read_pc): Don't declare.
2341 * regcache.c (get_thread_regcache_for_ptid): New function.
2343 2014-09-11 Tom Tromey <tromey@redhat.com>
2344 Gary Benson <gbenson@redhat.com>
2346 * symbol.c: New file.
2347 * Makefile.in (SFILES): Add symbol.c.
2348 (OBS): Add symbol.o.
2350 2014-09-11 Gary Benson <gbenson@redhat.com>
2352 * target.c (target_stop_ptid, target_continue_ptid): New
2355 2014-09-11 Tom Tromey <tromey@redhat.com>
2356 Gary Benson <gbenson@redhat.com>
2358 * target.h: Include target/target.h.
2359 * target.c (target_read_memory, target_read_uint32)
2360 (target_write_memory): New functions.
2362 2014-09-11 Gary Benson <gbenson@redhat.com>
2364 * server.h (debug_hw_points): Don't declare.
2365 * server.c (debug_hw_points): Don't define. Replace all uses
2366 with show_debug_regs.
2367 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2368 all uses with show_debug_regs.
2370 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2372 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2373 endianness into account.
2374 (ppc_supply_ptrace_register): Likewise.
2376 2014-09-03 James Hogan <james.hogan@imgtec.com>
2378 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2379 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2381 2014-09-03 Gary Benson <gbenson@redhat.com>
2383 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2384 ALL_DEBUG_ADDRESS_REGISTERS.
2386 2014-09-02 Gary Benson <gbenson@redhat.com>
2388 * i386-low.h: Renamed as...
2389 * x86-low.h: New file. All type, function and variable name
2390 prefixes changed from "i386_" to "x86_". All references updated.
2391 * i386-low.c: Renamed as...
2392 * x86-low.c: New file. All type, function and variable name
2393 prefixes changed from "i386_" to "x86_". All references updated.
2395 2014-09-02 Gary Benson <gbenson@redhat.com>
2397 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2398 (x86_linux_new_thread): Likewise.
2400 2014-08-29 Gary Benson <gbenson@redhat.com>
2402 * server.h (setjmp.h): Do not include.
2403 (toplevel): Do not declare.
2404 (common-exceptions.h): Include.
2405 (cleanups.h): Likewise.
2406 * server.c (toplevel): Do not define.
2407 (exit_code): New static global.
2408 (detach_or_kill_for_exit_cleanup): New function.
2409 (main): New function. Original main renamed to...
2410 (captured_main): New function.
2411 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2413 2014-08-29 Gary Benson <gbenson@redhat.com>
2415 * Makefile.in (SFILES): Add common/common-exceptions.c.
2416 (OBS): Add common-exceptions.o.
2417 (common-exceptions.o): New rule.
2418 * utils.c (prepare_to_throw_exception): New function.
2420 2014-08-29 Gary Benson <gbenson@redhat.com>
2422 * config.in: Regenerate.
2423 * configure: Likewise.
2425 2014-08-29 Gary Benson <gbenson@redhat.com>
2427 * Makefile.in (SFILES): Add common/cleanups.c.
2429 (cleanups.o): New rule.
2431 2014-08-29 Gary Benson <gbenson@redhat.com>
2433 * utils.c (internal_vwarning): New function.
2435 2014-08-28 Gary Benson <gbenson@redhat.com>
2437 * utils.h (fatal): Remove declaration.
2438 * utils.c (fatal): Remove function.
2440 2014-08-28 Gary Benson <gbenson@redhat.com>
2442 * tracepoint.c (gdb_agent_init): Replace fatal with
2444 (initialize_tracepoint): Likewise.
2446 2014-08-28 Gary Benson <gbenson@redhat.com>
2448 * remote-utils.c (remote_prepare): Replace fatal with error.
2450 2014-08-28 Gary Benson <gbenson@redhat.com>
2452 * linux-low.c (linux_async): Replace fatal with warning.
2454 (linux_start_non_stop): Return -1 if linux_async failed.
2456 2014-08-28 Gary Benson <gbenson@redhat.com>
2458 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2460 (i386_dr_low_get_addr): Remove vague comment.
2461 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2464 2014-08-28 Gary Benson <gbenson@redhat.com>
2466 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2467 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2469 (linux_resume_one_lwp): Likewise.
2470 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2472 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2473 with internal_error.
2474 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2475 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2476 (find_register_by_name): Replace fatal with internal_error.
2477 (find_regno): Likewise.
2478 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2479 * thread-db.c (thread_db_create_event): Likewise.
2480 (thread_db_load_search): Likewise.
2481 (try_thread_db_load_1): Likewise.
2482 * tracepoint.c (get_jump_space_head): Replace fatal with
2484 (claim_trampoline_space): Likewise.
2485 (have_fast_tracepoint_trampoline_buffer): Likewise.
2486 (cmd_qtstart): Likewise.
2487 (stop_tracing): Likewise.
2488 (fast_tracepoint_collecting): Likewise.
2489 (target_malloc): Likewise.
2490 (download_tracepoint): Likewise.
2491 (download_trace_state_variables): Replace check with gdb_assert.
2492 (upload_fast_traceframes): Replace fatal with internal_error.
2494 2014-08-19 Tom Tromey <tromey@redhat.com>
2495 Gary Benson <gbenson@redhat.com>
2497 * Makefile.in (SFILES): Add common/common-debug.c.
2498 (OBS): Add common-debug.o.
2499 (common-debug.o): New rule.
2500 * debug.h (debug_printf): Don't declare.
2501 * debug.c (debug_printf): Renamed and rewritten as...
2502 (debug_vprintf): New function.
2504 2014-08-19 Gary Benson <gbenson@redhat.com>
2506 * utils.h: Do not include print-utils.h.
2508 2014-08-19 Tom Tromey <tromey@redhat.com>
2509 Gary Benson <gbenson@redhat.com>
2511 * server.h: Add static assertion.
2512 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2514 2014-08-19 Tom Tromey <tromey@redhat.com>
2515 Gary Benson <gbenson@redhat.com>
2517 * Makefile.in (SFILES): Add common/errors.c.
2518 (OBS): Add errors.o.
2519 (IPA_OBS): Add errors-ipa.o.
2520 (errors.o): New rule.
2521 (errors-ipa.o): Likewise.
2522 * utils.h (perror_with_name, error, warning): Don't declare.
2523 * utils.c (warning): Renamed and rewritten as...
2524 (vwarning): New function.
2525 (error): Renamed and rewritten as...
2526 (verror): New function.
2527 (internal_error): Renamed and rewritten as...
2528 (internal_verror): New function.
2530 2014-08-07 Gary Benson <gbenson@redhat.com>
2532 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2533 * configure: Regenerate.
2534 * config.in: Likewise.
2535 * server.h: Do not include errno.h.
2536 * event-loop.c: Likewise.
2537 * hostio-errno.c: Likewise.
2538 * linux-low.c: Likewise.
2539 * remote-utils.c: Likewise.
2540 * spu-low.c: Likewise.
2541 * utils.c: Likewise.
2542 * gdbreplay.c: Unconditionally include errno.h.
2544 2014-08-07 Gary Benson <gbenson@redhat.com>
2546 * server.h: Do not include string.h.
2547 * event-loop.c: Likewise.
2548 * linux-low.c: Likewise.
2549 * regcache.c: Likewise.
2550 * remote-utils.c: Likewise.
2551 * spu-low.c: Likewise.
2552 * utils.c: Likewise.
2554 2014-08-07 Gary Benson <gbenson@redhat.com>
2556 * server.h: Do not include gdb_assert.h.
2558 2014-08-07 Gary Benson <gbenson@redhat.com>
2560 * server.h: Do not include common-utils.h.
2562 2014-08-07 Gary Benson <gbenson@redhat.com>
2564 * server.h: Do not include ptid.h.
2565 * notif.h: Likewise.
2567 2014-08-07 Gary Benson <gbenson@redhat.com>
2569 * server.h: Do not include gdb_locale.h.
2571 2014-08-07 Gary Benson <gbenson@redhat.com>
2573 * server.h: Do not include gdb/signals.h.
2574 * win32-low.c: Likewise.
2576 2014-08-07 Gary Benson <gbenson@redhat.com>
2578 * server.h: Do not include pathmax.h.
2580 2014-08-07 Gary Benson <gbenson@redhat.com>
2582 * server.h: Do not include libiberty.h.
2583 * linux-bfin-low.c: Likewise.
2585 2014-08-07 Gary Benson <gbenson@redhat.com>
2587 * server.h: Do not include ansidecl.h.
2589 2014-08-07 Gary Benson <gbenson@redhat.com>
2591 * linux-x86-low.c: Do not include stddef.h.
2592 * lynx-ppc-low.c: Likewise.
2593 * tracepoint.c: Likewise.
2595 2014-08-07 Gary Benson <gbenson@redhat.com>
2597 * server.h: Do not include stdarg.h.
2598 * nto-low.c: Likewise.
2600 2014-08-07 Gary Benson <gbenson@redhat.com>
2602 * server.h: Do not include stdlib.h.
2603 * inferiors.c: Likewise.
2604 * linux-low.c: Likewise.
2605 * regcache.c: Likewise.
2606 * spu-low.c: Likewise.
2607 * tracepoint.c: Likewise.
2608 * utils.c: Likewise.
2610 2014-08-07 Gary Benson <gbenson@redhat.com>
2612 * server.h: Do not include stdio.h.
2613 * linux-low.c: Likewise.
2614 * remote-utils.c: Likewise.
2615 * spu-low.c: Likewise.
2616 * utils.c: Likewise.
2617 * wincecompat.c: Likewise.
2619 2014-08-06 Gary Benson <gbenson@redhat.com>
2621 * regcache.c (init_register_cache): Move conditionals inside if.
2623 2014-08-06 Gary Benson <gbenson@redhat.com>
2625 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2627 2014-07-31 Gary Benson <gbenson@redhat.com>
2629 * ax.h: Do not include server.h.
2630 * gdbthread.h: Likewise.
2631 * lynx-low.h: Likewise.
2632 * notif.h: Likewise.
2634 2014-07-30 Gary Benson <gbenson@redhat.com>
2636 * server.h: Include common-defs.h.
2637 Do not include config.h or build-gnulib-gdbserver/config.h.
2639 2014-07-30 Gary Benson <gbenson@redhat.com>
2641 * hostio-errno.c: Move server.h to top of includes list.
2642 * inferiors.c: Likewise.
2643 * linux-x86-low.c: Likewise.
2644 * notif.c: Include server.h.
2646 2014-07-24 Tom Tromey <tromey@redhat.com>
2647 Gary Benson <gbenson@redhat.com>
2649 * server.h (CORE_ADDR): Now unsigned.
2651 2014-07-16 Pedro Alves <palves@redhat.com>
2653 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2655 2014-07-15 Pedro Alves <palves@redhat.com>
2657 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2660 2014-07-11 Pedro Alves <palves@redhat.com>
2662 * linux-low.c (kill_wait_lwp): New function, based on
2663 kill_one_lwp_callback, but use my_waitpid directly.
2664 (kill_one_lwp_callback, linux_kill): Use it.
2666 2014-06-23 Pedro Alves <palves@redhat.com>
2668 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2669 before setting DR0..DR3.
2671 2014-06-20 Gary Benson <gbenson@redhat.com>
2673 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2674 * configure: Regenerated.
2675 * config.in: Likewise.
2677 2014-06-20 Gary Benson <gbenson@redhat.com>
2679 * Makefile.in (SFILES): Update locations for files moved
2681 (object file files): Reordered.
2683 2014-06-20 Gary Benson <gbenson@redhat.com>
2685 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2686 (i386_dr_low_set_addr): Likewise.
2687 (i386_dr_low_get_addr): Likewise.
2688 (i386_dr_low_can_set_control): Likewise.
2689 (i386_dr_low_set_control): Likewise.
2690 (i386_dr_low_get_control): Likewise.
2691 (i386_dr_low_get_status): Likewise.
2692 (i386_get_debug_register_length): Likewise.
2693 * linux-x86-low.c (i386_dr_low_set_addr):
2694 Changed signature. Made static.
2695 (i386_dr_low_get_addr): Likewise.
2696 (i386_dr_low_set_control): Likewise.
2697 (i386_dr_low_get_control): Likewise.
2698 (i386_dr_low_get_status): Likewise.
2699 (i386_dr_low): New global variable.
2700 * win32-i386-low.c (i386_dr_low_set_addr):
2701 Changed signature. Made static.
2702 (i386_dr_low_get_addr): Likewise.
2703 (i386_dr_low_set_control): Likewise.
2704 (i386_dr_low_get_control): Likewise.
2705 (i386_dr_low_get_status): Likewise.
2706 (i386_dr_low): New global variable.
2708 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2710 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2711 * Makefile.in (AR, AR_FLAGS): Define.
2712 * configure: Regenerate.
2714 2014-06-19 Gary Benson <gbenson@redhat.com>
2716 * Makefile.in (i386-dregs.o): New rule.
2717 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2718 * i386-low.c (target.h): Remove include.
2719 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2720 (DR_CONTROL_SHIFT): Likewise.
2721 (DR_CONTROL_SIZE): Likewise.
2722 (DR_RW_EXECUTE): Likewise.
2723 (DR_RW_WRITE): Likewise.
2724 (DR_RW_READ): Likewise.
2725 (DR_RW_IORW): Likewise.
2726 (DR_LEN_1): Likewise.
2727 (DR_LEN_2): Likewise.
2728 (DR_LEN_4): Likewise.
2729 (DR_LEN_8): Likewise.
2730 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2731 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2732 (DR_ENABLE_SIZE): Likewise.
2733 (DR_LOCAL_SLOWDOWN): Likewise.
2734 (DR_GLOBAL_SLOWDOWN): Likewise.
2735 (DR_CONTROL_RESERVED): Likewise.
2736 (I386_DR_CONTROL_MASK): Likewise.
2737 (I386_DR_VACANT): Likewise.
2738 (I386_DR_LOCAL_ENABLE): Likewise.
2739 (I386_DR_GLOBAL_ENABLE): Likewise.
2740 (I386_DR_DISABLE): Likewise.
2741 (I386_DR_SET_RW_LEN): Likewise.
2742 (I386_DR_GET_RW_LEN): Likewise.
2743 (I386_DR_WATCH_HIT): Likewise.
2744 (i386_wp_op_t): Likewise.
2745 (i386_show_dr): Likewise.
2746 (i386_length_and_rw_bits): Likewise.
2747 (i386_insert_aligned_watchpoint): Likewise.
2748 (i386_remove_aligned_watchpoint): Likewise.
2749 (i386_handle_nonaligned_watchpoint): Likewise.
2750 i386_update_inferior_debug_regs(): Likewise.
2751 (i386_dr_insert_watchpoint): Likewise.
2752 (i386_dr_remove_watchpoint): Likewise.
2753 (i386_dr_region_ok_for_watchpoint): Likewise.
2754 (i386_dr_stopped_data_address): Likewise.
2755 (i386_dr_stopped_by_watchpoint): Likewise.
2757 2014-06-19 Gary Benson <gbenson@redhat.com>
2759 * i386-low.c (i386_dr_show): Renamed to
2760 i386_show_dr and made static. All uses updated.
2761 (i386_dr_length_and_rw_bits): Renamed to
2762 i386_length_and_rw_bits and made static.
2764 (i386_dr_insert_aligned_watchpoint): Renamed to
2765 i386_insert_aligned_watchpoint and made static.
2767 (i386_dr_remove_aligned_watchpoint): Renamed to
2768 i386_remove_aligned_watchpoint and made static.
2770 (i386_dr_update_inferior_debug_regs): Renamed to
2771 i386_update_inferior_debug_regs and made static.
2774 2014-06-18 Gary Benson <gbenson@redhat.com>
2776 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2777 (i386_dr_low_can_set_control): Likewise.
2778 (i386_get_debug_register_length): Likewise.
2779 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2780 (i386_dr_low_can_set_control): Likewise.
2781 (i386_get_debug_register_length): Likewise.
2783 2014-06-17 Gary Benson <gbenson@redhat.com>
2785 * i386-low.h (i386-dregs.h): New include.
2786 (DR_FIRSTADDR): Now in i386-dregs.h.
2787 (DR_LASTADDR): Likewise.
2788 (DR_NADDR): Likewise.
2789 (DR_STATUS): Likewise.
2790 (DR_CONTROL): Likewise.
2791 (i386_debug_reg_state): Likewise.
2792 (i386_dr_insert_watchpoint): Likewise.
2793 (i386_dr_remove_watchpoint): Likewise.
2794 (i386_dr_region_ok_for_watchpoint): Likewise.
2795 (i386_dr_stopped_data_address): Likewise.
2796 (i386_dr_stopped_by_watchpoint): Likewise.
2797 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2799 2014-06-18 Gary Benson <gbenson@redhat.com>
2801 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2802 i386_dr_insert_watchpoint.
2803 (i386_low_remove_watchpoint): Renamed to
2804 i386_dr_remove_watchpoint.
2805 (i386_low_region_ok_for_watchpoint): Renamed to
2806 i386_dr_region_ok_for_watchpoint.
2807 (i386_low_stopped_data_address): Renamed to
2808 i386_dr_stopped_data_address.
2809 (i386_low_stopped_by_watchpoint): Renamed to
2810 i386_dr_stopped_by_watchpoint.
2811 * i386-low.c (i386_show_dr): Renamed to
2812 i386_dr_show and made nonstatic. All uses updated.
2813 (i386_length_and_rw_bits): Renamed to
2814 i386_dr_length_and_rw_bits and made nonstatic.
2816 (i386_insert_aligned_watchpoint): Renamed to
2817 i386_dr_insert_aligned_watchpoint and made nonstatic.
2819 (i386_remove_aligned_watchpoint): Renamed to
2820 i386_dr_remove_aligned_watchpoint and made nonstatic.
2822 (i386_update_inferior_debug_regs): Renamed to
2823 i386_dr_update_inferior_debug_regs and made nonstatic.
2825 (i386_low_insert_watchpoint): Renamed to
2826 i386_dr_insert_watchpoint. All uses updated.
2827 (i386_low_remove_watchpoint): Renamed to
2828 i386_dr_remove_watchpoint. All uses updated.
2829 (i386_low_region_ok_for_watchpoint): Renamed to
2830 i386_dr_region_ok_for_watchpoint. All uses updated.
2831 (i386_low_stopped_data_address): Renamed to
2832 i386_dr_stopped_data_address. All uses updated.
2833 (i386_low_stopped_by_watchpoint): Renamed to
2834 i386_dr_stopped_by_watchpoint. All uses updated.
2836 2014-06-18 Gary Benson <gbenson@redhat.com>
2838 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2839 (i386_dr_low_can_set_control): Likewise.
2840 (i386_insert_aligned_watchpoint): New check.
2842 2014-06-18 Gary Benson <gbenson@redhat.com>
2844 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2847 2014-06-18 Gary Benson <gbenson@redhat.com>
2849 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2850 instead of fatal and error.
2851 (i386_handle_nonaligned_watchpoint): Likewise.
2853 2014-06-18 Gary Benson <gbenson@redhat.com>
2855 * i386-low.c (i386_get_debug_register_length): New macro.
2856 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2857 (i386_show_dr): Use debug_printf instead of fprintf. Use
2858 phex to format values.
2860 2014-06-18 Gary Benson <gbenson@redhat.com>
2862 * i386-low.h: Comment changes.
2863 * i386-low.c: Likewise.
2865 2014-06-18 Gary Benson <gbenson@redhat.com>
2867 * i386-low.c: Whitespace changes.
2869 2014-06-12 Tom Tromey <tromey@redhat.com>
2871 * utils.c (freeargv): Remove.
2873 2014-06-12 Tom Tromey <tromey@redhat.com>
2875 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2876 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2877 (parse_debug_format_options): Likewise.
2878 (gdbserver_usage): Likewise.
2879 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2880 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2881 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2883 ($(LIBGNU)): Depend on libiberty.
2884 (all-lib): Recurse into all subdirs.
2885 (install-only): Invoke "install" target in subdirs.
2886 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2888 * configure: Rebuild.
2889 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2890 for vasprintf, vsnprintf, or gettimeofday.
2891 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2894 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2896 * development.sh: Delete.
2897 * Makefile.in (config.status): Adjust dependency on development.sh.
2898 * configure.ac: Adjust development.sh source call.
2899 * configure: Regenerate.
2901 2014-06-02 Pedro Alves <palves@redhat.com>
2903 * ax.c (gdb_free_agent_expr): New function.
2904 * ax.h (gdb_free_agent_expr): New declaration.
2905 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2907 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2909 (clear_breakpoint_conditions_and_commands): New function.
2910 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2911 (clear_breakpoint_conditions_and_commands): New declaration.
2913 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2915 * linux-aarch64-low.c (asm/ptrace.h): Include.
2917 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2919 Fix TLS access for -static -pthread.
2920 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2921 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2922 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2924 2014-05-20 Pedro Alves <palves@redhat.com>
2926 * linux-aarch64-low.c (aarch64_insert_point)
2927 (aarch64_remove_point): No longer check whether the type is
2928 supported here. Adjust to new interface.
2929 (the_low_target): Install aarch64_supports_z_point_type as
2930 supports_z_point_type method.
2931 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2932 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2933 instead of a Z packet char. Adjust.
2934 (arm_supports_z_point_type): New function.
2935 (arm_insert_point, arm_remove_point): Adjust to new interface.
2936 (the_low_target): Install arm_supports_z_point_type.
2937 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2938 (cris_insert_point, cris_remove_point): Adjust to new interface.
2939 Don't check whether the type is supported here.
2940 (the_low_target): Install cris_supports_z_point_type.
2941 * linux-low.c (linux_supports_z_point_type): New function.
2942 (linux_insert_point, linux_remove_point): Adjust to new interface.
2943 * linux-low.h (struct linux_target_ops) <insert_point,
2944 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2945 raw_breakpoint pointer parameter.
2946 <supports_z_point_type>: New method.
2947 * linux-mips-low.c (mips_supports_z_point_type): New function.
2948 (mips_insert_point, mips_remove_point): Adjust to new interface.
2949 Use mips_supports_z_point_type.
2950 (the_low_target): Install mips_supports_z_point_type.
2951 * linux-ppc-low.c (the_low_target): Install NULL as
2952 supports_z_point_type method.
2953 * linux-s390-low.c (the_low_target): Install NULL as
2954 supports_z_point_type method.
2955 * linux-sparc-low.c (the_low_target): Install NULL as
2956 supports_z_point_type method.
2957 * linux-x86-low.c (x86_supports_z_point_type): New function.
2958 (x86_insert_point): Adjust to new insert_point interface. Use
2959 insert_memory_breakpoint. Adjust to new
2960 i386_low_insert_watchpoint interface.
2961 (x86_remove_point): Adjust to remove_point interface. Use
2962 remove_memory_breakpoint. Adjust to new
2963 i386_low_remove_watchpoint interface.
2964 (the_low_target): Install x86_supports_z_point_type.
2965 * lynx-low.c (lynx_target_ops): Install NULL as
2966 supports_z_point_type callback.
2967 * nto-low.c (nto_supports_z_point_type): New.
2968 (nto_insert_point, nto_remove_point): Adjust to new interface.
2969 (nto_target_ops): Install nto_supports_z_point_type.
2970 * mem-break.c: Adjust intro comment.
2971 (struct raw_breakpoint) <raw_type, size>: New fields.
2972 <inserted>: Update comment.
2973 <shlib_disabled>: Delete field.
2974 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2975 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2976 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2977 (raw_bkpt_type_to_target_hw_bp_type): New function.
2978 (find_enabled_raw_code_breakpoint_at): New function.
2979 (find_raw_breakpoint_at): New type and size parameters. Use them.
2980 (insert_memory_breakpoint): New function, based off
2981 set_raw_breakpoint_at.
2982 (remove_memory_breakpoint): New function.
2983 (set_raw_breakpoint_at): Reimplement.
2984 (set_breakpoint): New, based on set_breakpoint_at.
2985 (set_breakpoint_at): Reimplement.
2986 (delete_raw_breakpoint): Go through the_target->remove_point
2987 instead of assuming memory breakpoints.
2988 (find_gdb_breakpoint_at): Delete.
2989 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2990 (find_gdb_breakpoint): New function.
2991 (set_gdb_breakpoint_at): Delete.
2992 (z_type_supported): New function.
2993 (set_gdb_breakpoint_1): New function, loosely based off
2994 set_gdb_breakpoint_at.
2995 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2996 (delete_gdb_breakpoint_at): Delete.
2997 (delete_gdb_breakpoint_1): New function, loosely based off
2998 delete_gdb_breakpoint_at.
2999 (delete_gdb_breakpoint): New function.
3000 (clear_gdb_breakpoint_conditions): Rename to ...
3001 (clear_breakpoint_conditions): ... this. Don't handle a NULL
3003 (add_condition_to_breakpoint): Make static.
3004 (add_breakpoint_condition): Take a struct breakpoint pointer
3005 instead of an address. Adjust.
3006 (gdb_condition_true_at_breakpoint): Rename to ...
3007 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
3009 (gdb_condition_true_at_breakpoint): Reimplement.
3010 (add_breakpoint_commands): Take a struct breakpoint pointer
3011 instead of an address. Adjust.
3012 (gdb_no_commands_at_breakpoint): Rename to ...
3013 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
3014 parameter. Return true if no breakpoint was found. Change debug
3016 (gdb_no_commands_at_breakpoint): Reimplement.
3017 (run_breakpoint_commands): Rename to ...
3018 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
3019 and change return type to boolean.
3020 (run_breakpoint_commands): New function.
3021 (gdb_breakpoint_here): Also check for Z1 breakpoints.
3022 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
3023 breakpoint. Go through the_target->remove_point instead of
3024 assuming memory breakpoint.
3025 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
3026 software and hardware breakpoints.
3027 (reinsert_raw_breakpoint): Go through the_target->insert_point
3028 instead of assuming memory breakpoint.
3029 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
3030 software and hardware breakpoints.
3031 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
3032 Check both software and hardware breakpoints.
3033 (validate_inserted_breakpoint): Assert the breakpoint is a
3034 software breakpoint. Set the inserted flag to -1 instead of
3035 setting shlib_disabled.
3036 (delete_disabled_breakpoints): Adjust.
3037 (validate_breakpoints): Only validate software breakpoints.
3038 Adjust to inserted flag change.
3039 (check_mem_read, check_mem_write): Skip breakpoint types other
3040 than software breakpoints. Adjust to inserted flag change.
3041 * mem-break.h (enum raw_bkpt_type): New enum.
3042 (raw_breakpoint, struct process_info): Forward declare.
3043 (Z_packet_to_target_hw_bp_type): Delete declaration.
3044 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
3045 (set_gdb_breakpoint, delete_gdb_breakpoint)
3046 (clear_breakpoint_conditions): New declarations.
3047 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
3048 (breakpoint_inserted_here): Update comment.
3049 (add_breakpoint_condition, add_breakpoint_commands): Replace
3050 address parameter with a breakpoint pointer parameter.
3051 (gdb_breakpoint_here): Update comment.
3052 (delete_gdb_breakpoint_at): Delete.
3053 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
3054 * server.c (process_point_options): Take a struct breakpoint
3055 pointer instead of an address. Adjust.
3056 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
3057 delete_gdb_breakpoint.
3058 * spu-low.c (spu_target_ops): Install NULL as
3059 supports_z_point_type method.
3060 * target.h: Include mem-break.h.
3061 (struct target_ops) <prepare_to_access_memory>: Update comment.
3062 <supports_z_point_type>: New field.
3063 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3064 instead of a char. Also take a raw breakpoint pointer.
3065 * win32-arm-low.c (the_low_target): Install NULL as
3066 supports_z_point_type.
3067 * win32-i386-low.c (i386_supports_z_point_type): New function.
3068 (i386_insert_point, i386_remove_point): Adjust to new interface.
3069 (the_low_target): Install i386_supports_z_point_type.
3070 * win32-low.c (win32_supports_z_point_type): New function.
3071 (win32_insert_point, win32_remove_point): Adjust to new interface.
3072 (win32_target_ops): Install win32_supports_z_point_type.
3073 * win32-low.h (struct win32_target_ops):
3074 <supports_z_point_type>: New method.
3075 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
3076 instead of a char. Also take a raw breakpoint pointer.
3078 2014-05-20 Pedro Alves <palves@redhat.com>
3080 * mem-break.h: Include break-common.h.
3081 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3082 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
3083 (Z_packet_to_target_hw_bp_type): New declaration.
3084 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
3085 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
3086 (Z_PACKET_ACCESS_WP): Delete macros.
3087 (Z_packet_to_hw_type): Delete function.
3088 * i386-low.h: Don't include break-common.h here.
3089 (Z_packet_to_hw_type): Delete declaration.
3090 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
3091 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3092 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
3093 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
3094 * linux-aarch64-low.c: Don't include break-common.h here.
3095 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
3096 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
3097 (Z_packet_to_target_hw_bp_type): Delete function.
3098 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
3100 (mips_insert_point, mips_remove_point): Use
3101 Z_packet_to_target_hw_bp_type.
3103 2014-05-20 Pedro Alves <palves@redhat.com>
3105 * linux-aarch64-low.c: Include break-common.h.
3106 (enum target_point_type): Delete.
3107 (Z_packet_to_point_type): Rename to ...
3108 (Z_packet_to_target_hw_bp_type): ... this, and return a
3109 target_hw_bp_type instead.
3110 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
3111 instead of an enum target_point_type.
3112 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
3114 (aarch64_dr_state_insert_one_point)
3115 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
3116 (aarch64_handle_aligned_watchpoint)
3117 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
3118 Take an enum target_hw_bp_type instead of an enum
3120 (aarch64_supports_z_point_type): New function.
3121 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
3122 use Z_packet_to_target_hw_bp_type.
3124 2014-05-20 Joel Brobecker <brobecker@adacore.com>
3126 * configure.ac: Only use -Werror by default when DEVELOPMENT
3128 * configure: Regenerate.
3130 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
3132 Fix gdbserver qGetTLSAddr for x86_64 -m32.
3133 * linux-x86-low.c (X86_64_USER_REGS): New.
3134 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
3136 2014-04-28 Yao Qi <yao@codesourcery.com>
3138 * Makefile.in (i386-avx512.c): Fix the typo of generated file
3141 2014-04-25 Pedro Alves <palves@redhat.com>
3144 * linux-low.c (linux_attach_fail_reason_string): New function.
3145 (linux_attach_lwp): Delete.
3146 (linux_attach_lwp_1): Rename to ...
3147 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
3148 argument. Remove "initial" parameter. Return int instead of
3149 void. Don't error or warn here.
3150 (linux_attach): Adjust to call linux_attach_lwp. Call error on
3151 failure to attach to the tgid. Call warning when failing to
3153 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
3154 argument. Remove "initial" parameter. Return int instead of
3155 void. Don't error or warn here.
3156 (linux_attach_fail_reason_string): New declaration.
3157 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
3158 interface change. Use linux_attach_fail_reason_string.
3160 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
3161 Walfred Tedeschi <walfred.tedeschi@intel.com>
3163 * Makefile.in: Added rules to handle new files
3164 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
3165 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
3166 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
3167 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
3168 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
3169 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
3171 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
3172 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
3173 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
3174 i386/x32-avx512.xml.
3175 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
3176 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
3177 i386/x32-avx512-linux.xml.
3178 * i387-fp.c (num_avx512_k_registers): New constant for number
3180 (num_avx512_zmmh_low_registers): New constant for number of
3181 lower ZMM registers (0-15).
3182 (num_avx512_zmmh_high_registers): New constant for number of
3183 higher ZMM registers (16-31).
3184 (num_avx512_ymmh_registers): New contant for number of higher
3185 YMM registers (ymm16-31 added by avx521 on x86_64).
3186 (num_avx512_xmm_registers): New constant for number of higher
3187 XMM registers (xmm16-31 added by AVX512 on x86_64).
3188 (struct i387_xsave): Add space for AVX512 registers.
3189 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
3190 Add code to handle AVX512 registers.
3191 (i387_xsave_to_cache): Add code to handle AVX512 registers.
3192 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
3193 prototypei from generated file.
3194 (tdesc_amd64_avx512_linux): Likewise.
3195 (init_registers_x32_avx512_linux): Likewise.
3196 (tdesc_x32_avx512_linux): Likewise.
3197 (init_registers_i386_avx512_linux): Likewise.
3198 (tdesc_i386_avx512_linux): Likewise.
3199 (x86_64_regmap): Add AVX512 registers.
3200 (x86_linux_read_description): Add code to handle AVX512 XSTATE
3202 (initialize_low_arch): Add code to initialize AVX512 registers.
3204 2014-04-23 Pedro Alves <palves@redhat.com>
3206 * mem-break.c (find_gdb_breakpoint_at): Make static.
3207 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
3209 2014-04-23 Pedro Alves <palves@redhat.com>
3211 * i386-low.c: Don't include break-common.h here.
3212 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3213 prototype to take target_hw_bp_type as argument instead of a Z
3215 * i386-low.h: Include break-common.h here.
3216 (Z_packet_to_hw_type): Declare.
3217 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
3219 * linux-x86-low.c (x86_insert_point): Convert the packet number to
3220 a target_hw_bp_type before calling i386_low_insert_watchpoint.
3221 (x86_remove_point): Convert the packet number to a
3222 target_hw_bp_type before calling i386_low_remove_watchpoint.
3223 * win32-i386-low.c (i386_insert_point): Convert the packet number
3224 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3225 (i386_remove_point): Convert the packet number to a
3226 target_hw_bp_type before calling i386_low_remove_watchpoint.
3228 2014-04-23 Pedro Alves <palves@redhat.com>
3230 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3232 2014-04-10 Pedro Alves <palves@redhat.com>
3234 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3235 Check if the condition or command is NULL before checking if the
3236 breakpoint is known. On success, return true.
3237 * mem-break.h (add_breakpoint_condition): Document return.
3238 (add_breakpoint_commands): Add describing comment.
3239 * server.c (skip_to_semicolon): New function.
3240 (process_point_options): Use it.
3242 2014-04-09 Pedro Alves <palves@redhat.com>
3244 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3247 2014-02-27 Pedro Alves <palves@redhat.com>
3250 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3252 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3254 (last_thread_of_process_p): Take a PID argument instead of a
3256 (linux_wait_for_lwp): Delete.
3257 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3259 (linux_low_filter_event): New function, party factored out from
3260 linux_wait_for_event.
3261 (linux_wait_for_event): Rename to ...
3262 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3263 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3264 sigsuspend. Check for zombie leaders.
3265 (linux_wait_for_event): Reimplement as wrapper around
3266 linux_wait_for_event_filtered.
3267 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3268 a normal or signal exit is seen, it's the whole process exiting.
3269 (wait_for_sigstop): No longer a for_each_inferior callback.
3270 Rewrite on top of linux_wait_for_event_filtered.
3271 (stop_all_lwps): Call wait_for_sigstop directly.
3272 * server.c (resume, handle_target_event): Handle
3273 TARGET_WAITKIND_NO_RESUMED.
3275 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3277 * win32-low.c (psapi_get_dll_name,
3278 * win32_CreateToolhelp32Snapshot): Delete.
3279 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3280 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3282 (handle_load_dll): Add function description.
3283 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3285 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3287 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3289 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3290 base address when calling win32_add_one_solib.
3291 (handle_load_dll): Delete local variable load_addr.
3292 Remove 0x1000 offset applied to DLL base address when calling
3293 win32_add_one_solib.
3294 (handle_unload_dll): Add comment.
3296 2014-02-26 Joel Brobecker <brobecker@adacore.com>
3298 * win32-low.c (win32_add_all_dlls): Renames
3299 win32_ensure_ntdll_loaded. Rewrite function documentation.
3300 Adjust implementation to always load all DLLs.
3301 Add 0x1000 offset to DLL base address when calling
3302 win32_add_one_solib.
3303 (child_initialization_done): New static global.
3304 (do_initial_child_stuff): Set child_initialization_done to
3305 zero during child initialization, and 1 after. Replace call
3306 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3308 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3309 (handle_unload_dll): Add function documentation.
3310 (get_child_debug_event): Ignore load and unload DLL events
3311 during child initialization.
3313 2014-02-20 Doug Evans <dje@google.com>
3315 Remove global all_lwps.
3316 * inferiors.h (ptid_of): Move here from linux-low.h.
3317 (pid_of, lwpid_of): Ditto.
3318 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3319 parameter is a struct thread_info * now.
3320 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3321 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3322 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3324 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3325 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3326 * linux-arm-low.c (update_registers_callback): Update, "entry"
3327 parameter is a struct thread_info * now.
3328 Fetch lwpid from current_inferior directly.
3329 (arm_insert_point): Pass &all_threads to find_inferior instead of
3331 (arm_remove_point): Ditto.
3332 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3333 (arm_prepare_to_resume): Fetch pid from thread.
3334 (arm_read_description): Fetch lwpid from current_inferior directly.
3335 * linux-low.c (all_lwps): Delete.
3336 (delete_lwp): Delete call to remove_inferior.
3337 (handle_extended_wait): Fetch lwpid from thread.
3338 (add_lwp): Don't set lwp->entry.id. Remove call to
3339 add_inferior_to_list.
3340 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3341 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3342 (kill_one_lwp_callback): Ditto.
3343 (linux_kill): Don't dereference NULL pointer.
3344 Fetch ptid,lwpid from thread.
3345 (get_detach_signal): Fetch ptid from thread.
3346 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3347 Simplify call to regcache_invalidate_thread.
3348 (delete_lwp_callback): Update, "entry" parameter is a
3349 struct thread_info * now. Fetch pid from thread.
3350 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3351 (status_pending_p_callback): Update, "entry" parameter is a
3352 struct thread_info * now. Fetch ptid from thread.
3353 (find_lwp_pid): Update, "entry" parameter is a
3354 struct thread_info * now.
3355 (linux_wait_for_lwp): Fetch pid from thread.
3356 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3357 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3358 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3359 (dequeue_one_deferred_signal): Ditto.
3360 (cancel_breakpoint): Fetch ptid from current_inferior.
3361 (linux_wait_for_event): Pass &all_threads to find_inferior,
3362 not &all_lwps. Fetch ptid, lwpid from thread.
3363 (count_events_callback): Update, "entry" parameter is a
3364 struct thread_info * now.
3365 (select_singlestep_lwp_callback): Ditto.
3366 (select_event_lwp_callback): Ditto.
3367 (cancel_breakpoints_callback): Ditto.
3368 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3370 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3371 (unsuspend_one_lwp): Update, "entry" parameter is a
3372 struct thread_info * now.
3373 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3375 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3376 Fetch lwpid from thread, not lwp.
3377 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3378 Pass &all_threads to find_inferior, not &all_lwps.
3379 (send_sigstop): Fetch lwpid from thread, not lwp.
3380 (send_sigstop_callback): Update, "entry" parameter is a
3381 struct thread_info * now.
3382 (suspend_and_send_sigstop_callback): Ditto.
3383 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3384 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3385 struct thread_info * now.
3386 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3388 (lwp_running): Update, "entry" parameter is a
3389 struct thread_info * now.
3390 (stop_all_lwps): Fetch ptid from thread.
3391 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3392 (linux_resume_one_lwp): Fetch lwpid from thread.
3393 (linux_set_resume_request): Update, "entry" parameter is a
3394 struct thread_info * now. Fetch pid, lwpid from thread.
3395 (resume_status_pending_p): Update, "entry" parameter is a
3396 struct thread_info * now.
3397 (need_step_over_p): Ditto. Fetch lwpid from thread.
3398 (start_step_over): Fetch lwpid from thread.
3399 (linux_resume_one_thread): Update, "entry" parameter is a
3400 struct thread_info * now. Fetch lwpid from thread.
3401 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3402 (proceed_one_lwp): Update, "entry" parameter is a
3403 struct thread_info * now. Fetch lwpid from thread.
3404 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3405 struct thread_info * now.
3406 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3407 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3408 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3410 (regsets_store_inferior_registers): Ditto.
3411 (fetch_register, store_register): Ditto.
3412 (linux_read_memory, linux_write_memory): Ditto.
3413 (linux_request_interrupt): Ditto.
3414 (linux_read_auxv): Ditto.
3415 (linux_xfer_siginfo): Ditto.
3416 (linux_qxfer_spu): Ditto.
3417 (linux_qxfer_libraries_svr4): Ditto.
3418 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3419 moved to inferiors.h.
3421 (get_thread_lwp): Update.
3422 (struct lwp_info): Delete member "entry". Simplify comment for
3425 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3426 current_inferior directly.
3427 (update_watch_registers_callback): Update, "entry" parameter is a
3428 struct thread_info * now. Fetch pid from thread.
3429 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3430 (mips_insert_point): Fetch lwpid from current_inferior.
3431 Pass &all_threads to find_inferior, not &all_lwps.
3432 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3433 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3435 (mips_stopped_data_address): Ditto.
3436 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3438 * linux-tile-low.c (tile_arch_setup): Ditto.
3439 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3440 (update_debug_registers_callback): Update, "entry" parameter is a
3441 struct thread_info * now. Fetch pid from thread.
3442 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3443 Pass &all_threads to find_inferior, not &all_lwps.
3444 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3445 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3446 Pass &all_threads to find_inferior, not &all_lwps.
3447 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3448 (i386_dr_low_get_status): Ditto.
3449 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3450 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3451 (x86_linux_read_description): Ditto.
3452 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3454 2014-02-20 Doug Evans <dje@google.com>
3456 * inferiors.c (get_first_inferior): Fix buglet.
3458 2014-02-19 Doug Evans <dje@google.com>
3460 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3461 * inferiors.c (add_thread): Change result type to struct thread_info *.
3462 All callers updated.
3463 (add_lwp): Call add_thread here instead of in callers.
3464 All callers updated.
3465 * linux-low.h (get_lwp_thread): Rewrite.
3466 (struct lwp_info): New member "thread".
3468 2014-02-19 Doug Evans <dje@google.com>
3470 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3471 All callers updated.
3473 2014-02-19 Doug Evans <dje@google.com>
3475 * inferiors.c (add_thread): Fix whitespace.
3477 2014-02-19 Doug Evans <dje@google.com>
3479 * dll.c (clear_dlls): Replace accessing list implemention details
3481 * gdbthread.h (get_first_thread): Declare.
3482 * inferiors.c (for_each_inferior_with_data): New function.
3483 (get_first_thread): New function.
3484 (find_thread_ptid): Simplify.
3485 (get_first_inferior): New function.
3486 (clear_list): Delete.
3487 (one_inferior_p): New function.
3488 (clear_inferior_list): New function.
3489 (clear_inferiors): Update.
3490 * inferiors.h (for_each_inferior_with_data): Declare.
3491 (clear_inferior_list): Declare.
3492 (one_inferior_p): Declare.
3493 (get_first_inferior): Declare.
3494 * linux-low.c (linux_wait_for_event): Replace accessing list
3495 implemention details with API function.
3496 * server.c (target_running): Ditto.
3497 (accumulate_file_name_length): New function.
3498 (emit_dll_description): New function.
3499 (handle_qxfer_libraries): Replace accessing list implemention
3500 details with API function.
3501 (handle_qxfer_threads_worker): New function.
3502 (handle_qxfer_threads_proper): Replace accessing list implemention
3503 details with API function.
3504 (handle_query): Ditto.
3505 (visit_actioned_threads_callback_ftype): New typedef.
3506 (visit_actioned_threads_data): New struct.
3507 (visit_actioned_threads): Rewrite to be find_inferior callback.
3508 (resume): Call find_inferior.
3509 (handle_status): Replace accessing list implemention
3510 details with API function.
3511 (process_serial_event): Replace accessing list implemention details
3513 * target.c (set_desired_inferior): Replace accessing list implemention
3514 details with API function.
3515 * tracepoint.c (same_process_p): New function.
3516 (gdb_agent_about_to_close): Replace accessing list implemention
3517 details with API function.
3518 * win32-low.c (child_delete_thread): Replace accessing list
3519 implemention details with API function.
3520 (match_dll_by_basename): New function.
3521 (dll_is_loaded_by_basename): New function.
3522 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3523 details call to dll_is_loaded_by_basename.
3525 2014-02-19 Doug Evans <dje@google.com>
3527 * dll.h (struct dll_info): Add comment.
3528 * gdbthread.h (struct thread_info): Add comment.
3529 (current_ptid): Simplify.
3530 * inferiors.c (add_process): Update.
3531 (remove_process): Update.
3532 * inferiors.h (struct process_info): Rename member "head" to "entry".
3533 * linux-low.c (delete_lwp): Update.
3535 (last_thread_of_process_p): Update.
3536 (kill_one_lwp_callback, linux_kill): Update.
3537 (status_pending_p_callback): Update.
3538 (wait_for_sigstop): Update. Simplify read of ptid.
3539 (start_step_over): Update.
3540 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3541 (get_lwp_thread): Update.
3542 (struct lwp_info): Rename member "head" to "entry".
3543 * regcache.h (inferior_list_entry): Delete.
3544 * server.c (kill_inferior_callback): Update.
3545 (detach_or_kill_inferior_callback): Update.
3546 (print_started_pid): Update.
3547 (print_attached_pid): Update.
3548 (process_serial_event): Simplify read of ptid.
3549 * thread-db.c (thread_db_create_event): Update.
3550 (thread_db_get_tls_address): Update.
3551 * win32-low.c (current_inferior_ptid): Simplify.
3553 2014-02-19 Tom Tromey <tromey@redhat.com>
3555 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3557 (target_supports_btrace): Update.
3559 2014-02-14 Yao Qi <yao@codesourcery.com>
3561 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3562 (rsp-low-ipa.o): New target.
3564 2014-02-12 Tom Tromey <tromey@redhat.com>
3566 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3567 convert_ascii_to_int.
3568 * regcache.c (registers_to_string): Likewise.
3569 * remote-utils.c (decode_M_packet): Likewise.
3570 * server.c (process_serial_event): Likewise.
3572 2014-02-12 Tom Tromey <tromey@redhat.com>
3574 * server.c (handle_query, handle_v_run): Use hex2bin, not
3576 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3578 2014-02-12 Tom Tromey <tromey@redhat.com>
3580 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3581 convert_int_to_ascii.
3582 * regcache.c (registers_to_string, collect_register_as_string):
3584 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3586 * server.c (process_serial_event): Likewise.
3587 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3588 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3590 2014-02-12 Tom Tromey <tromey@redhat.com>
3592 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3593 bin2hex, not hexify.
3594 * tracepoint.c (cmd_qtstatus): Likewise.
3596 2014-02-12 Tom Tromey <tromey@redhat.com>
3598 * remote-utils.c (monitor_output): Pass explicit length to
3601 2014-02-12 Tom Tromey <tromey@redhat.com>
3603 * tracepoint.c: Include rsp-low.h.
3604 * server.c: Include rsp-low.h.
3605 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3606 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3608 * remote-utils.c: Include rsp-low.h.
3609 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3610 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3611 (convert_int_to_ascii, convert_ascii_to_int): Move to
3613 * regcache.c: Include rsp-low.h.
3614 * ax.c: Include rsp-low.h.
3615 * Makefile.in (SFILES): Add common/rsp-low.c.
3616 (OBS): Add rsp-low.o.
3617 (rsp-low.o): New target.
3619 2014-02-12 Tom Tromey <tromey@redhat.com>
3621 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3622 Include print-utils.h.
3623 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3624 (plongest, thirty_two, phex_nz): Remove.
3625 * Makefile.in (SFILES): Add common/print-utils.c.
3626 (OBS): Add print-utils.o.
3627 (print-utils-ipa.o): New target.
3628 (print-utils.o): New target.
3629 (IPA_OBJS): Add print-utils-ipa.o.
3631 2014-02-06 Tom Tromey <tromey@redhat.com>
3633 * Makefile.in (SFILES): Fix indentation.
3635 2014-02-05 Doug Evans <dje@google.com>
3637 * linux-low.c (linux_wait_for_event): Improve comment.
3638 (linux_wait_1): Keep current_inferior in sync with event_child.
3640 2014-01-22 Doug Evans <dje@google.com>
3642 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3644 2014-01-22 Doug Evans <dje@google.com>
3646 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3647 * configure: Regenerate.
3648 * config.in: Regenerate.
3649 * Makefile.in (SFILES): Add debug.c.
3651 * debug.c: New file.
3652 * debug.h: New file.
3653 * linux-aarch64-low.c (*): Update all debugging printfs to use
3654 debug_printf instead of fprintf.
3655 * linux-arm-low.c (*): Ditto.
3656 * linux-cris-low.c (*): Ditto.
3657 * linux-crisv32-low.c (*): Ditto.
3658 * linux-m32r-low.c (*): Ditto.
3659 * linux-sparc-low.c (*): Ditto.
3660 * linux-x86.c (*): Ditto.
3661 * linux-low.c (*): Ditto.
3662 (linux_wait_1): Add calls to debug_enter, debug_exit.
3663 (linux_wait): Remove redundant debugging printf.
3664 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3665 (linux_resume, unstop_all_lwps): Ditto.
3666 * mem-break.c (*): Update all debugging printfs to use
3667 debug_printf instead of fprintf.
3668 * remote-utils.c (*): Ditto.
3669 * thread-db.c (*): Ditto.
3670 * server.c #include <ctype.h>, "gdb_vecs.h".
3671 (debug_threads): Moved to debug.c.
3672 (*): Update all debugging printfs to use debug_printf instead of
3674 (start_inferior): Replace call to fflush with call to debug_flush.
3675 (monitor_show_help): Mention set debug-format.
3676 (parse_debug_format_options): New function.
3677 (handle_monitor_command): Handle "monitor set debug-format".
3678 (gdbserver_usage): Mention --debug-format.
3679 (main): Parse --debug-format.
3680 * server.h (debug_threads): Declaration moved to debug.h.
3682 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3683 trace_debug_1 that uses debug_printf.
3684 (tracepoint_look_up_symbols): Update all debugging printfs to use
3685 debug_printf instead of fprintf.
3687 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3689 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3692 2014-01-17 Pedro Alves <palves@redhat.com>
3695 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3696 defined after including gdb_proc_service.h.
3698 2014-01-16 Doug Evans <dje@google.com>
3700 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3701 (match_dll): Use it.
3703 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3705 * target.h (target_ops) <read_btrace>: Change parameters and
3706 return type to allow error reporting.
3707 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3708 trace reading errors on.
3709 * linux-low.c (linux_low_read_btrace): Pass trace reading
3711 (linux_low_disable_btrace): New.
3713 2014-01-15 Doug Evans <dje@google.com>
3715 * inferiors.c (thread_id_to_gdb_id): Delete.
3716 * inferiors.h (thread_id_to_gdb_id): Delete.
3718 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3720 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3721 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3724 2014-01-08 Pedro Alves <palves@redhat.com>
3726 * server.c (handle_status): Don't discard previous queued stop
3727 replies or thread's pending status here.
3728 (main) <disconnection>: Do it here instead.
3730 2014-01-08 Pedro Alves <palves@redhat.com>
3732 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3733 * server.c (visit_actioned_threads, handle_pending_status): New
3735 (handle_v_cont): Factor out parts to ...
3736 (resume): ... this new function. If in all-stop, and a thread
3737 being resumed has a pending status, report it without actually
3739 (myresume): Adjust to use the new 'resume' function.
3740 (clear_pending_status_callback, set_pending_status_callback)
3741 (find_status_pending_thread_callback): New functions.
3742 (handle_status): Handle the case of multiple threads having
3743 interesting statuses to report. Report threads' real last signal
3744 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3745 with an interesting thread to report the status for, instead of
3746 always reporting the status of the first thread.
3748 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3750 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3751 * gdbreplay.c (gdbreplay_version): Likewise.
3753 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3755 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3756 iov.iov_len with the real length in use.
3758 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3760 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3761 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3762 for all targets that use win32-low.c.
3763 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3764 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3766 2013-12-13 Pedro Alves <palves@redhat.com>
3768 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3769 if equal to TARGET_WAITKIND_LOADED.
3770 * win32-low.c (cached_status): New static global.
3771 (win32_wait): Add declaration.
3772 (do_initial_child_stuff): Flush all initial pending debug events
3773 up to the initial breakpoint.
3774 (win32_wait): If CACHED_STATUS was set, return that instead
3775 of doing a real wait. Remove the code resuming the execution
3776 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3777 during the initial phase. Also remove the code changing
3778 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3779 TARGET_WAITKIND_STOPPED.
3781 2013-12-11 Yao Qi <yao@codesourcery.com>
3783 * notif.c (handle_notif_ack): Return 0 if no notification
3786 2013-11-20 Doug Evans <dje@google.com>
3788 * linux-low.c (linux_set_resume_request): Fix comment.
3790 2013-11-20 Doug Evans <dje@google.com>
3792 * linux-low.c (resume_status_pending_p): Tweak comment.
3794 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3796 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3797 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3798 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3799 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3800 (srv_amd64_regobj): Add amd64-mpx.o.
3801 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3802 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3803 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3804 * i387-fp.c (num_pl_bnd_register) Added constant.
3805 (num_pl_bnd_cfg_registers) Added constant.
3806 (struct i387_xsave) Added reserved area and MPX fields.
3807 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3808 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3810 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3811 (init_registers_amd64_mpx_linux): Declare new function.
3812 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3813 (x86_64_regmap): Add MPX registers.
3814 (x86_linux_read_description): Add MPX case.
3815 (initialize_low_arch): Initialize MPX targets.
3817 2013-11-18 Tom Tromey <tromey@redhat.com>
3819 * configure: Rebuild.
3820 * configure.ac: Don't check for stdlib.h.
3821 * gdbreplay.c: Unconditionally include stdlib.h.
3823 2013-11-18 Tom Tromey <tromey@redhat.com>
3825 * config.in: Rebuild.
3826 * configure: Rebuild.
3827 * configure.ac: Don't use AC_HEADER_DIRENT.
3829 2013-11-18 Tom Tromey <tromey@redhat.com>
3831 * server.h: Don't check HAVE_STRING_H.
3832 * gdbreplay.c: Don't check HAVE_STRING_H.
3833 * configure: Rebuild.
3835 2013-11-18 Tom Tromey <tromey@redhat.com>
3837 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3840 2013-11-08 Tom Tromey <tromey@redhat.com>
3842 * configure, config.in: Rebuild.
3843 * configure.ac: Remove unused configury.
3845 2013-11-08 Tom Tromey <tromey@redhat.com>
3847 * acinclude.m4: Include common.m4, codeset.m4.
3848 * configure, config.in: Rebuild.
3849 * configure.ac: Use GDB_AC_COMMON.
3851 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3853 * linux-s390-low.c (HWCAP_S390_TE): New define.
3854 (s390_arch_setup): Consider the TE field in the HWCAP for
3855 determining 'have_regset_tdb'.
3857 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3860 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3863 2013-10-02 Pedro Alves <palves@redhat.com>
3865 * server.c (process_serial_event): Don't output "GDBserver
3866 exiting" if GDB is connected through stdio.
3867 * target.c (mywait): Likewise, be silent if GDB is connected
3870 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3872 * lynx-low.c (lynx_add_threads_after_attach): New function.
3873 (lynx_attach): Remove call to add_thread. Add call to
3874 lynx_add_threads_after_attach instead.
3876 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3878 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3879 * config.in, configure: Regenerated.
3881 2013-09-18 Yao Qi <yao@codesourcery.com>
3884 * server.c (start_inferior): Clear 'resume_info'.
3886 2013-09-16 Jiong Wang <jiwang@tilera.com>
3888 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3891 2013-09-16 Jiong Wang <jiwang@tilera.com>
3893 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3894 linux-tile-low.o to srv_tgtobj.
3896 2013-09-16 Will Newton <will.newton@linaro.org>
3898 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3901 2013-09-06 Pedro Alves <palves@redhat.com>
3903 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3904 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3905 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3906 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3907 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3908 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3910 2013-09-06 Pedro Alves <palves@redhat.com>
3912 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3913 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3915 2013-09-06 Pedro Alves <palves@redhat.com>
3917 * linux-amd64-ipa.c: Include tracepoint.h.
3918 * linux-i386-ipa.c: Include tracepoint.h.
3920 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3922 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3923 (ps_get_thread_area): New function.
3925 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3927 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3928 (initialize_low_arch): Call init_registers_crisv32 rather than
3929 init_register_crisv32.
3931 2013-09-05 Pedro Alves <palves@redhat.com>
3933 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3935 * hostio.h: ... this new file.
3936 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3937 win32-low.c: Include hostio.h.
3939 2013-09-05 Pedro Alves <palves@redhat.com>
3941 * server.h (gdb_client_data, handler_func, callback_handler_func)
3942 (delete_file_handler, add_file_handler, append_callback_event)
3943 (delete_callback_event, start_event_loop, initialize_event_loop):
3944 Move to event-loop.h and include it.
3945 * event-loop.h: New file.
3947 2013-09-05 Pedro Alves <palves@redhat.com>
3949 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3950 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3951 (loaded_dll, unloaded_dll): Move to ...
3952 * dll.h: ... this new file.
3953 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3955 2013-09-05 Pedro Alves <palves@redhat.com>
3957 * server.h (current_process, get_thread_process, all_processes)
3958 (add_inferior_to_list, for_each_inferior, current_inferior)
3959 (remove_inferior, add_process, remove_process, find_process_pid)
3960 (have_started_inferiors_p, have_attached_inferiors_p)
3961 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3962 (clear_inferiors, find_inferior, find_inferior_id)
3963 (inferior_target_data, set_inferior_target_data)
3964 (inferior_regcache_data, set_inferior_regcache_data): Move to
3965 inferiors.h, and include it.
3966 * inferiors.h: New file.
3968 2013-09-05 Pedro Alves <palves@redhat.com>
3970 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3974 2013-09-05 Pedro Alves <palves@redhat.com>
3976 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3978 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3979 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3980 (handle_tracepoint_general_set, handle_tracepoint_query)
3981 (tracepoint_finished_step, tracepoint_was_hit)
3982 (release_while_stepping_state_list, current_traceframe)
3983 (in_readonly_region, traceframe_read_mem)
3984 (fetch_traceframe_registers, traceframe_read_sdata)
3985 (traceframe_read_info, struct fast_tpoint_collect_status)
3986 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3987 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3988 (supply_fast_tracepoint_registers)
3989 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3990 (ipa_tdesc, claim_trampoline_space)
3991 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3992 (agent_mem_read, agent_get_trace_state_variable_value)
3993 (agent_set_trace_state_variable_value, agent_tsv_read)
3994 (agent_mem_read_string, get_raw_reg_func_addr)
3995 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3996 * tracepoint.h: ... this new file.
3998 2013-09-05 Pedro Alves <palves@redhat.com>
4000 * server.h (perror_with_name, error, fatal, warning, paddress)
4001 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
4003 * utils.h: New file.
4005 2013-09-05 Pedro Alves <palves@redhat.com>
4007 * server.h (remote_debug, noack_mode, transport_is_reliable)
4008 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
4009 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
4010 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
4011 (write_enn, initialize_async_io, enable_async_io)
4012 (disable_async_io, check_remote_input_interrupt_request)
4013 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
4014 (dead_thread_notify, prepare_resume_reply)
4015 (decode_address_to_semicolon, decode_address, decode_m_packet)
4016 (decode_M_packet, decode_X_packet, decode_xfer_write)
4017 (decode_search_memory_packet, unhexify, hexify)
4018 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
4019 (look_up_one_symbol, relocate_instruction)
4020 (monitor_output): Move to remote-utils.h, and include it.
4021 * remote-utils.h: New file.
4023 2013-09-05 Pedro Alves <palves@redhat.com>
4025 * server.h (_): Delete.
4027 2013-09-02 Pedro Alves <palves@redhat.com>
4029 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
4030 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
4032 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
4034 2013-09-02 Pierre Muller <muller@sourceware.org>
4036 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
4037 or WriteProcessMemory complete successfully and handle
4038 ERROR_PARTIAL_COPY error.
4040 2013-09-02 Pedro Alves <palves@redhat.com>
4042 * server.c (gdb_read_memory): Return -1 on traceframe memory read
4043 error instead of EIO.
4045 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
4048 * linux-low.c: Include filestuff.h.
4049 (linux_create_inferior) <pid == 0>: Call close_most_fds.
4050 * lynx-low.c: Include filestuff.h.
4051 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
4052 * server.c: Include filestuff.h.
4053 (main): Call notice_open_fds.
4054 * spu-low.c: Include filestuff.h.
4055 (spu_create_inferior) <pid == 0>: Call close_most_fds.
4057 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
4059 * Makefile.in: Explain why ../target and ../nat are not
4060 listed as include file search paths.
4061 (linux-waitpid.o): New object file rule.
4062 * configure.srv (srv_native_linux_obj): New variable.
4063 Replace all occurrences of linux native object files with
4064 $srv_native_linux_obj.
4065 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
4066 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
4067 (linux_enable_event_reporting): Remove declaration.
4068 (my_waitpid): Moved to common/linux-waitpid.c.
4069 (linux_wait_for_event): Pass ptid when calling
4070 linux_enable_event_reporting.
4071 (linux_supports_tracefork_flag): Remove.
4072 (linux_enable_event_reporting): Likewise.
4073 (linux_tracefork_grandchild): Remove.
4074 (STACK_SIZE): Moved to common/linux-ptrace.c.
4075 (linux_tracefork_child): Remove.
4076 (linux_test_for_tracefork): Remove.
4077 (linux_look_up_symbols): Call linux_supports_traceclone.
4078 (initialize_low): Remove call to linux_test_for_tracefork.
4079 * linux-low.h (PTRACE_TYPE_ARG3): Move to
4080 common/linux-ptrace.h.
4081 (PTRACE_TYPE_ARG4): Likewise.
4082 Include linux-ptrace.h.
4084 2013-08-21 Pedro Alves <palves@redhat.com>
4086 * config.in: Renegerate.
4088 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
4090 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
4091 (SFILES): Remove $(srcdir)/common/target-common.c and
4092 add $(srcdir)/target/waitstatus.c.
4093 (OBS): Remove target-common.o and add waitstatus.o.
4094 (server_h): Remove $(srcdir)/../common/target-common.h and
4095 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
4096 and $(srcdir)/../target/waitstatus.h.
4097 (target-common.o): Remove.
4098 (waitstatus.o): New target object file.
4099 * target.h: Do not include target-common.h and
4100 include target/resume.h, target/wait.h and
4101 target/waitstatus.h.
4103 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
4105 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4106 to PTRACE_TYPE_ARG3.
4107 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
4108 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
4110 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
4111 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
4113 2013-07-27 Jie Zhang <jie@codesourcery.com>
4114 Daniel Jacobowitz <dan@codesourcery.com>
4115 Yao Qi <yao@codesourcery.com>
4117 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
4118 (mips-linux-watch.o): New rule.
4119 (mips_linux_watch_h): New variable.
4120 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
4122 * linux-mips-low.c: Include mips-linux-watch.h.
4123 (struct arch_process_info, struct arch_lwp_info): New.
4124 (update_watch_registers_callback): New function.
4125 (mips_linux_new_process, mips_linux_new_thread) New functions.
4126 (mips_linux_prepare_to_resume, mips_insert_point): New
4128 (mips_remove_point, mips_stopped_by_watchpoint): New
4130 (rsp_bp_type_to_target_hw_bp_type): New function.
4131 (mips_stopped_data_address): New function.
4132 (the_low_target): Add watchpoint support functions.
4134 2013-07-27 Yao Qi <yao@codesourcery.com>
4136 * i386-low.c: Include break-common.h.
4137 (enum target_hw_bp_type): Remove.
4139 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
4141 * Makefile.in (SFILES): /common/target-common.c.
4142 (OBS): Add target-common.o.
4143 (server_h): Add $(srcdir)/../common/target-common.h.
4144 (target-common.o): New target.
4145 * server.c (queue_stop_reply_callback): Free
4146 status string after use.
4147 * target.c (target_waitstatus_to_string): Remove.
4148 * target.h: Include target-common.h.
4149 (resume_kind): Likewise.
4150 (target_waitkind): Likewise.
4151 (target_waitstatus): Likewise.
4152 (TARGET_WNOHANG): Likewise.
4154 2013-07-04 Yao Qi <yao@codesourcery.com>
4156 * Makefile.in (host_alias): Use @host_noncanonical@.
4157 (target_alias): Use @target_noncanonical@.
4158 * configure.ac: Use ACX_NONCANONICAL_TARGET and
4159 ACX_NONCANONICAL_HOST.
4160 * configure: Regenerated.
4163 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4165 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4166 * configure: Rebuild.
4167 * Makefile.in (version_host, version_target): Get from configure.
4168 (version.c): Use $(version_host) and $(version_target).
4170 2013-07-03 Pedro Alves <palves@redhat.com>
4172 * Makefile.in (config.status): Depend on development.sh.
4173 * acinclude.m4: Include libmcheck.m4.
4174 * configure: Regenerate.
4176 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4178 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
4179 attribute inside the parentheses.
4180 (winapi_DebugSetProcessKillOnExit): Ditto.
4181 (winapi_DebugBreakProcess): Ditto.
4182 (winapi_GenerateConsoleCtrlEvent): Ditto.
4184 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
4186 * notif.h (notif_event): Add a dummy member to avoid compiler
4189 2013-07-01 Pedro Alves <palves@redhat.com>
4191 * hostio.c (HOSTIO_PATH_MAX): Define.
4192 (require_filename, handle_open, handle_unlink, handle_readlink):
4195 2013-07-01 Pedro Alves <palves@redhat.com>
4197 * server.h: Include "pathmax.h".
4198 * linux-low.c: Don't include sys/param.h.
4199 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
4201 * win32-low.c: Don't include sys/param.h.
4202 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
4204 2013-07-01 Pedro Alves <palves@redhat.com>
4206 * event-loop.c: Don't check HAVE_UNISTD_H before including
4208 * gdbreplay.c: Likewise.
4209 * remote-utils.c: Likewise.
4210 * server.c: Likewise.
4211 * configure.ac: Don't check for unistd.h.
4212 * configure: Regenerate.
4214 2013-06-28 Tom Tromey <tromey@redhat.com>
4216 * Makefile.in (version.c): Use version.in, not
4219 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
4221 * configure.ac (version_host, version_target): Set and AC_SUBST them.
4222 * configure: Rebuild.
4223 * Makefile.in (version_host, version_target): Get from configure.
4224 (version.c): Use $(version_host) and $(version_target).
4226 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4228 Fix trace-status to output user name without trailing colon.
4229 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4231 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4233 Fix trace-status to output proper start-time and stop-time.
4234 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4235 output start time and stop time in hex as gdb expects.
4237 2013-06-26 Pedro Alves <pedro@codesourcery.com>
4239 * tracepoint.c (build_traceframe_info_xml): Output trace state
4240 variables present in the trace buffer.
4242 2013-06-24 Tom Tromey <tromey@redhat.com>
4244 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4246 (version.o): Remove.
4247 * gdbreplay.c: Include version.h.
4248 (version, host_name): Don't declare.
4249 * server.h: Include version.h.
4250 (version, host_name): Don't declare.
4252 2013-06-12 Pedro Alves <palves@redhat.com>
4254 * linux-x86-low.c (linux_is_elf64): Delete global.
4255 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4256 with local linux_pid_exe_is_elf_64_file use.
4258 2013-06-11 Pedro Alves <palves@redhat.com>
4260 * linux-low.c (regset_disabled, disable_regset): New functions.
4261 (regsets_fetch_inferior_registers)
4262 (regsets_store_inferior_registers): Use them.
4263 (initialize_regsets_info); Don't allocate the disabled_regsets
4265 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4268 2013-06-11 Pedro Alves <palves@redhat.com>
4270 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4273 2013-06-11 Pedro Alves <palves@redhat.com>
4275 * linux-x86-low.c (initialize_low_arch): Call
4276 init_registers_x32_avx_linux.
4278 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4280 Fix compatibility with Android Bionic.
4281 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4284 2013-06-07 Pedro Alves <palves@redhat.com>
4287 * Makefile.in (OBS): Add tdesc.o.
4288 (IPA_OBJS): Add tdesc-ipa.o.
4289 (tdesc-ipa.o): New rule.
4290 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4292 * linux-low.c (new_inferior): Delete.
4293 (disabled_regsets, num_regsets): Delete.
4294 (linux_add_process): Adjust to set the new per-process
4296 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4297 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4298 was a stop. When calling arch_setup, switch the current inferior
4299 to the thread that got an event.
4300 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4301 (regsets_fetch_inferior_registers)
4302 (regsets_store_inferior_registers): New regsets_info parameter.
4304 (linux_register_in_regsets): New regs_info parameter. Adjust to
4306 (register_addr, fetch_register, store_register): New usrregs_info
4307 parameter. Adjust to use it.
4308 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4309 parameter regs_info. Adjust to use it.
4310 (linux_fetch_registers): Get the current inferior's regs_info, and
4312 (linux_store_registers): Ditto.
4313 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4314 (initialize_low): Don't initialize the target_regsets here. Call
4315 initialize_low_arch.
4316 * linux-low.h (target_regsets): Delete declaration.
4317 (struct regsets_info): New.
4318 (struct usrregs_info): New.
4319 (struct regs_info): New.
4320 (struct process_info_private) <new_inferior>: New field.
4321 (struct linux_target_ops): Delete the num_regs, regmap, and
4322 regset_bitmap fields. New field regs_info.
4323 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4324 * i387-fp.c (num_xmm_registers): Delete.
4325 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4326 calls to new interface.
4327 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4328 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4329 Infer the number of xmm registers from the regcache's target
4331 * i387-fp.h (num_xmm_registers): Delete.
4332 * inferiors.c (add_thread): Don't install the thread's regcache
4334 * proc-service.c (gregset_info): Fetch the current inferior's
4335 regs_info. Adjust to use it.
4336 * regcache.c: Include tdesc.h.
4337 (register_bytes, reg_defs, num_registers)
4338 (gdbserver_expedite_regs): Delete.
4339 (get_thread_regcache): If the thread doesn't have a regcache yet,
4340 create one, instead of aborting gdbserver.
4341 (regcache_invalidate_one): Rename to ...
4342 (regcache_invalidate_thread): ... this.
4343 (regcache_invalidate_one): New.
4344 (regcache_invalidate): Only invalidate registers of the current
4346 (init_register_cache): Add target_desc parameter, and use it.
4347 (new_register_cache): Ditto. Assert the target description has a
4348 non zero registers_size.
4349 (regcache_cpy): Add assertions. Adjust.
4350 (realloc_register_cache, set_register_cache): Delete.
4351 (registers_to_string, registers_from_string): Adjust.
4352 (find_register_by_name, find_regno, find_register_by_number)
4353 (register_cache_size): Add target_desc parameter, and use it.
4354 (free_register_cache_thread, free_register_cache_thread_one)
4355 (regcache_release, register_cache_size): New.
4356 (register_size): Add target_desc parameter, and use it.
4357 (register_data, supply_register, supply_register_zeroed)
4358 (supply_regblock, supply_register_by_name, collect_register)
4359 (collect_register_as_string, collect_register_by_name): Adjust.
4360 * regcache.h (struct target_desc): Forward declare.
4361 (struct regcache) <tdesc>: New field.
4362 (init_register_cache, new_register_cache): Add target_desc
4364 (regcache_invalidate_thread): Declare.
4365 (regcache_invalidate_one): Delete declaration.
4366 (regcache_release): Declare.
4367 (find_register_by_number, register_cache_size, register_size)
4368 (find_regno): Add target_desc parameter.
4369 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4371 * remote-utils.c: Include tdesc.h.
4372 (outreg, prepare_resume_reply): Adjust.
4373 * server.c: Include tdesc.h.
4374 (gdbserver_xmltarget): Delete declaration.
4375 (get_features_xml, process_serial_event): Adjust.
4376 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4378 (struct process_info) <tdesc>: New field.
4379 (ipa_tdesc): Declare.
4380 * tdesc.c: New file.
4381 * tdesc.h: New file.
4382 * tracepoint.c: Include tdesc.h.
4383 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4384 (get_context_regcache): Adjust to pass ipa_tdesc down.
4385 (do_action_at_tracepoint): Adjust to get the register cache size
4386 from the context regcache's description.
4387 (traceframe_walk_blocks): Adjust to get the register cache size
4388 from the current trace frame's description.
4389 (traceframe_get_pc): Adjust to get current trace frame's
4390 description and pass it down.
4391 (gdb_collect): Adjust to get the register cache size from the
4393 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4394 (gdbserver_xmltarget): Delete.
4395 (initialize_low_tracepoint): Set the ipa's target description.
4396 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4397 (initialize_low_tracepoint): Set the ipa's target description.
4398 * linux-x86-low.c: Include tdesc.h.
4399 [__x86_64__] (is_64bit_tdesc): New.
4400 (ps_get_thread_area, x86_get_thread_area): Use it.
4401 (i386_cannot_store_register): Rename to ...
4402 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4403 (i386_cannot_fetch_register): Rename to ...
4404 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4405 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4407 (target_regsets): Rename to ...
4408 (x86_regsets): ... this.
4409 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4411 (x86_siginfo_fixup): Use is_64bit_tdesc.
4412 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4413 (tdesc_x32_avx_linux, tdesc_x32_linux)
4414 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4416 (x86_linux_update_xmltarget): Delete.
4417 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4418 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4419 (AMD64_LINUX_USER64_CS): New.
4420 (x86_linux_read_description): New, based on
4421 x86_linux_update_xmltarget.
4422 (same_process_callback): New.
4423 (x86_arch_setup_process_callback): New.
4424 (x86_linux_update_xmltarget): New.
4425 (x86_regsets_info): New.
4426 (amd64_linux_regs_info): New.
4427 (i386_linux_usrregs_info): New.
4428 (i386_linux_regs_info): New.
4429 (x86_linux_regs_info): New.
4430 (x86_arch_setup): Reimplement.
4431 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4432 (x86_emit_ops): Ditto.
4433 (the_low_target): Adjust. Install x86_linux_regs_info,
4434 x86_cannot_fetch_register, and x86_cannot_store_register.
4435 (initialize_low_arch): New.
4436 * linux-ia64-low.c (tdesc_ia64): Declare.
4437 (ia64_fetch_register): Adjust.
4438 (ia64_usrregs_info, regs_info): New globals.
4439 (ia64_regs_info): New function.
4440 (the_low_target): Adjust.
4441 (initialize_low_arch): New function.
4442 * linux-sparc-low.c (tdesc_sparc64): Declare.
4443 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4445 (sparc_arch_setup): New function.
4446 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4447 (the_low_target): Adjust.
4448 (initialize_low_arch): New function.
4449 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4450 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4451 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4452 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4453 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4454 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4455 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4456 (tdesc_powerpc_isa205_vsx64l): Declare.
4457 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4458 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4459 (ppc_set_pc, ppc_get_hwcap): Adjust.
4460 (ppc_usrregs_info): Forward declare.
4461 (!__powerpc64__) ppc_regmap_adjusted: New global.
4462 (ppc_arch_setup): Adjust to the current process'es target
4464 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4465 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4466 (ppc_store_evrregset): Adjust.
4467 (target_regsets): Rename to ...
4468 (ppc_regsets): ... this, and make static.
4469 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4470 (ppc_regs_info): New function.
4471 (the_low_target): Adjust.
4472 (initialize_low_arch): New function.
4473 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4474 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4475 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4476 (tdesc_s390x_linux64v2): Declare.
4477 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4478 (s390_fill_gregset, s390_store_last_break): Adjust.
4479 (target_regsets): Rename to ...
4480 (s390_regsets): ... this, and make static.
4481 (s390_get_pc, s390_set_pc): Adjust.
4482 (s390_get_hwcap): New target_desc parameter, and use it.
4483 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4484 (s390_arch_setup): Adjust to set the current process'es target
4485 description. Don't adjust the regmap.
4486 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4487 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4488 (regs_info_3264): New globals.
4489 (s390_regs_info): New function.
4490 (the_low_target): Adjust.
4491 (initialize_low_arch): New function.
4492 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4493 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4494 [__mips64] (init_registers_mips_linux)
4495 (init_registers_mips_dsp_linux): Delete defines.
4496 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4497 (have_dsp): New global.
4498 (mips_read_description): New, based on mips_arch_setup.
4499 (mips_arch_setup): Reimplement.
4500 (get_usrregs_info): New function.
4501 (mips_cannot_fetch_register, mips_cannot_store_register)
4502 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4503 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4504 (target_regsets): Rename to ...
4505 (mips_regsets): ... this, and make static.
4506 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4507 (dsp_regs_info, regs_info): New globals.
4508 (mips_regs_info): New function.
4509 (the_low_target): Adjust.
4510 (initialize_low_arch): New function.
4511 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4512 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4514 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4515 (arm_read_description): New, with bits factored from
4517 (arm_arch_setup): Reimplement.
4518 (target_regsets): Rename to ...
4519 (arm_regsets): ... this, and make static.
4520 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4521 (arm_regs_info): New function.
4522 (the_low_target): Adjust.
4523 (initialize_low_arch): New function.
4524 * linux-m68k-low.c (tdesc_m68k): Declare.
4525 (target_regsets): Rename to ...
4526 (m68k_regsets): ... this, and make static.
4527 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4528 (m68k_regs_info): New function.
4529 (m68k_arch_setup): New function.
4530 (the_low_target): Adjust.
4531 (initialize_low_arch): New function.
4532 * linux-sh-low.c (tdesc_sharch): Declare.
4533 (target_regsets): Rename to ...
4534 (sh_regsets): ... this, and make static.
4535 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4536 (sh_regs_info, sh_arch_setup): New functions.
4537 (the_low_target): Adjust.
4538 (initialize_low_arch): New function.
4539 * linux-bfin-low.c (tdesc_bfin): Declare.
4540 (bfin_arch_setup): New function.
4541 (bfin_usrregs_info, regs_info): New globals.
4542 (bfin_regs_info): New function.
4543 (the_low_target): Adjust.
4544 (initialize_low_arch): New function.
4545 * linux-cris-low.c (tdesc_cris): Declare.
4546 (cris_arch_setup): New function.
4547 (cris_usrregs_info, regs_info): New globals.
4548 (cris_regs_info): New function.
4549 (the_low_target): Adjust.
4550 (initialize_low_arch): New function.
4551 * linux-cris-low.c (tdesc_crisv32): Declare.
4552 (cris_arch_setup): New function.
4553 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4554 (cris_regs_info): New function.
4555 (the_low_target): Adjust.
4556 (initialize_low_arch): New function.
4557 * linux-m32r-low.c (tdesc_m32r): Declare.
4558 (m32r_arch_setup): New function.
4559 (m32r_usrregs_info, regs_info): New globals.
4560 (m32r_regs_info): Adjust.
4561 (initialize_low_arch): New function.
4562 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4563 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4564 (tic6x_usrregs_info): Forward declare.
4565 (tic6x_read_description): New function, based on ...
4566 (tic6x_arch_setup): ... this. Reimplement.
4567 (target_regsets): Rename to ...
4568 (tic6x_regsets): ... this, and make static.
4569 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4570 (tic6x_regs_info): New function.
4571 (the_low_target): Adjust.
4572 (initialize_low_arch): New function.
4573 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4574 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4575 (target_regsets): Rename to ...
4576 (xtensa_regsets): ... this, and make static.
4577 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4579 (xtensa_arch_setup, xtensa_regs_info): New functions.
4580 (the_low_target): Adjust.
4581 (initialize_low_arch): New function.
4582 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4583 (nios2_arch_setup): Set the current process'es tdesc.
4584 (target_regsets): Rename to ...
4585 (nios2_regsets): ... this.
4586 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4587 (nios2_regs_info): New function.
4588 (the_low_target): Adjust.
4589 (initialize_low_arch): New function.
4590 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4591 (aarch64_arch_setup): Set the current process'es tdesc.
4592 (target_regsets): Rename to ...
4593 (aarch64_regsets): ... this.
4594 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4595 (aarch64_regs_info): New function.
4596 (the_low_target): Adjust.
4597 (initialize_low_arch): New function.
4598 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4600 (target_regsets): Rename to ...
4601 (tile_regsets): ... this.
4602 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4603 (tile_regs_info): New function.
4604 (tile_arch_setup): Set the current process'es tdesc.
4605 (the_low_target): Adjust.
4606 (initialize_low_arch): New function.
4607 * spu-low.c (tdesc_spu): Declare.
4608 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4609 * win32-arm-low.c (tdesc_arm): Declare.
4610 (arm_arch_setup): New function.
4611 (the_low_target): Install arm_arch_setup instead of
4613 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4614 (init_windows_x86): Rename to ...
4615 (i386_arch_setup): ... this. Set `win32_tdesc'.
4616 (the_low_target): Adjust.
4617 * win32-low.c (win32_tdesc): New global.
4618 (child_add_thread): Don't create the thread cache here.
4619 (do_initial_child_stuff): Set the new process'es tdesc.
4620 * win32-low.h (struct target_desc): Forward declare.
4621 (win32_tdesc): Declare.
4622 * lynx-i386-low.c (tdesc_i386): Declare global.
4623 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4624 * lynx-low.c (lynx_tdesc): New global.
4625 (lynx_add_process): Set the new process'es tdesc.
4626 * lynx-low.h (struct target_desc): Forward declare.
4627 (lynx_tdesc): Declare global.
4628 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4629 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4630 * nto-low.c (nto_tdesc): New global.
4631 (do_attach): Set the new process'es tdesc.
4632 * nto-low.h (struct target_desc): Forward declare.
4633 (nto_tdesc): Declare.
4634 * nto-x86-low.c (tdesc_i386): Declare.
4635 (nto_x86_arch_setup): Set `nto_tdesc'.
4637 2013-06-04 Gary Benson <gbenson@redhat.com>
4639 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4640 to qSupported response when appropriate.
4641 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4642 with nonzero-length annex.
4643 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4644 arguments supplied in annex.
4646 2013-05-31 Doug Evans <dje@google.com>
4649 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4650 64 bits in 64-cross-32 environment.
4652 2013-05-28 Pedro Alves <palves@redhat.com>
4654 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4655 (aarch64-without-fpu.c): Delete rule.
4656 * configure.srv (aarch64*-*-linux*): Remove references to
4657 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4658 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4661 2013-05-24 Pedro Alves <palves@redhat.com>
4663 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4664 instead of strchr/decode_address. Error if the range isn't split
4665 with a ','. Don't assume there's be a ':' in the action.
4667 2013-05-23 Yao Qi <yao@codesourcery.com>
4668 Pedro Alves <palves@redhat.com>
4670 * linux-low.c (lwp_in_step_range): New function.
4671 (linux_wait_1): If the thread was range stepping and stopped
4672 outside the stepping range, report the stop to GDB. Otherwise,
4673 continue stepping. Add range stepping debug output.
4674 (linux_set_resume_request): Copy the step range from the resume
4676 (linux_supports_range_stepping): New.
4677 (linux_target_ops) <supports_range_stepping>: Set to
4678 linux_supports_range_stepping.
4679 * linux-low.h (struct linux_target_ops)
4680 <supports_range_stepping>: New field.
4681 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4682 * linux-x86-low.c (x86_supports_range_stepping): New.
4683 (the_low_target) <supports_range_stepping>: Set to
4684 x86_supports_range_stepping.
4685 * server.c (handle_v_cont): Handle 'r' action.
4686 (handle_v_requests): Append ";r" if the target supports range
4688 * target.h (struct thread_resume) <step_range_start,
4689 step_range_end>: New fields.
4690 (struct target_ops) <supports_range_stepping>:
4692 (target_supports_range_stepping): New macro.
4694 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4696 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4697 confusion in comment.
4699 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4701 * lynx-low.c (struct process_info_private): New type.
4702 (lynx_add_process): New function.
4703 (lynx_create_inferior, lynx_attach): Replace calls to
4704 add_process by calls to lynx_add_process.
4705 (lynx_resume): If PTID is null, then try using
4706 current_process()->private->last_wait_event_ptid.
4708 (lynx_clear_inferiors): Delete. The contents of that function
4709 has been inlined in lynx_mourn;
4710 (lynx_wait_1): Save the ptid in the process's private data.
4711 (lynx_mourn): Free the process' private data. Replace call
4712 to lynx_clear_inferiors by call to clear_inferiors.
4714 2013-05-17 Yao Qi <yao@codesourcery.com>
4716 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4719 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4721 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4722 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4723 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4724 PT_TEXT_END_ADDR guards. Update comments.
4725 (linux_target_op) <read_offsets>: Conditionally define to
4726 linux_read_offsets if the target is UCLIBC and if it defines
4727 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4729 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4730 Andrew Jenner <andrew@codesourcery.com>
4732 * Makefile.in (SFILES): Add linux-nios2-low.c.
4733 (clean): Add action to delete nios2-linux.c.
4734 (nios2-linux.c): New rule.
4735 * configure.srv: Add nios2*-*-linux*.
4736 * linux-nios2-low.c: New.
4738 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4740 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4742 2013-04-25 Hui Zhu <hui@codesourcery.com>
4745 * ax.c (ax_printf): Add fflush.
4747 2013-04-22 Tom Tromey <tromey@redhat.com>
4749 * Makefile.in (SFILES): Add filestuff.c.
4750 (OBS): Add filestuff.o.
4751 (filestuff.o): New target.
4752 * config.in, configure: Rebuild.
4753 * configure.ac: Check for fdwalk, pipe2.
4755 2013-04-17 Pedro Alves <palves@redhat.com>
4757 * configure.ac (USE_THREAD_DB): Delete variable.
4758 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4759 Don't AC_SUBST USE_THREAD_DB.
4760 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4761 * config.in, configure: Regenerate.
4763 2013-04-16 Pedro Alves <palves@redhat.com>
4765 * linux-low.h (struct lwp_info) <thread_known>: Move under
4766 the USE_THREAD_DB #ifdef.
4768 2013-04-16 Pedro Alves <palves@redhat.com>
4770 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4771 (linux-low.o): Delete rule.
4772 * linux-low.h: Always include "gdb_thread_db.h" instead of
4773 conditionally including thread_db.h.
4774 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4777 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4779 * Makefile.in (install-only): Fix make install regression.
4781 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4783 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4784 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4786 * gdbserver.1: Remove.
4788 2013-03-22 Pedro Alves <palves@redhat.com>
4790 * linux-low.c (handle_extended_wait): Don't call
4791 linux_enable_event_reporting.
4793 2013-03-15 Tony Theodore <tonyt@logyst.com>
4796 * Makefile.in (SHELL): Use @SHELL@.
4798 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4800 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4803 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4805 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4806 Remove extraneous NULL element.
4808 2013-03-13 Yao Qi <yao@codesourcery.com>
4810 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4811 'V' block in trace frame.
4813 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4815 * target.h (struct target_ops): Add btrace ops.
4816 (target_supports_btrace): New macro.
4817 (target_enable_btrace): New macro.
4818 (target_disable_btrace): New macro.
4819 (target_read_btrace): New macro.
4820 * gdbthread.h (struct thread_info): Add btrace field.
4821 * server.c: Include btrace-common.h.
4822 (handle_btrace_general_set): New function.
4823 (handle_btrace_enable): New function.
4824 (handle_btrace_disable): New function.
4825 (handle_general_set): Call handle_btrace_general_set.
4826 (handle_qxfer_btrace): New function.
4827 (struct qxfer qxfer_packets[]): Add btrace entry.
4828 * inferiors.c (remove_thread): Disable btrace.
4829 * linux-low: Include linux-btrace.h.
4830 (linux_low_enable_btrace): New function.
4831 (linux_low_read_btrace): New function.
4832 (linux_target_ops): Add btrace ops.
4833 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4834 Add srv_linux_btrace=yes.
4835 (x86_64-*-linux*): Add linux-btrace.o.
4836 Add srv_linux_btrace=yes.
4837 * configure.ac: Define HAVE_LINUX_BTRACE.
4838 * config.in: Regenerated.
4839 * configure: Regenerated.
4841 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4843 * server.c (handle_qxfer): Preserve error message if -3 is
4845 (qxfer): Document the -3 return value.
4847 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4849 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4850 (linux_btrace_h): New variable.
4851 (linux-btrace.o): New rule.
4853 2013-03-08 Stan Shebs <stan@codesourcery.com>
4854 Hafiz Abid Qadeer <abidh@codesourcery.com>
4856 * tracepoint.c (trace_buffer_size): New global.
4857 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4858 (init_trace_buffer): Change to one-argument function. Allocate
4859 trace buffer memory.
4860 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4861 handle QTBuffer:size packet.
4862 (cmd_bigqtbuffer_size): New function.
4863 (initialize_tracepoint): Call init_trace_buffer with
4864 DEFAULT_TRACE_BUFFER_SIZE.
4865 * server.c (handle_query): Add QTBuffer:size in the
4868 2013-03-07 Yao Qi <yao@codesourcery.com>
4870 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4871 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4873 (cmd_qtsp): Adjust condition. Do post increment.
4874 Set cur_action and cur_step_action back to 0.
4876 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4879 * linux-low.c (linux_write_memory): Return early success if LEN is
4882 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4884 * configure.srv: Add x86_64-*-cygwin* as target.
4886 2013-02-28 Tom Tromey <tromey@redhat.com>
4888 * configure.ac: Invoke AC_SYS_LARGEFILE.
4889 * configure, config.in: Rebuild.
4891 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4893 * win32-low.c: Throughout, fix format strings and casts of
4894 printf-like functions to avoid type related warnings on all
4896 (get_child_debug_event): Print dwDebugEventCode as hex since
4897 that's how it's usually documented.
4899 2013-02-28 Yao Qi <yao@codesourcery.com>
4901 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4904 2013-02-27 Jiong Wang <jiwang@tilera.com>
4906 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4907 (reg-tilegx32.c): New rule.
4908 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4909 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4910 different register info initializer according to elf class.
4911 (init_registers_tilgx32): New function. The tilegx32 register info
4913 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4914 (tile_store_gregset): Likewise.
4916 2013-02-27 Yao Qi <yao@codesourcery.com>
4918 * server.c (process_point_options): Print debug message when
4919 debug_threads is true.
4921 2013-02-26 Yao Qi <yao@codesourcery.com>
4923 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4925 2013-02-19 Pedro Alves <palves@redhat.com>
4926 Kai Tietz <ktietz@redhat.com>
4930 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4931 instead of strtoul to extract address from packet.
4932 (process_serial_event) <'z'>: Likewise.
4934 2013-02-18 Yao Qi <yao@codesourcery.com>
4936 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4938 2013-02-14 Pedro Alves <palves@redhat.com>
4942 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4943 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4945 2013-02-14 Pedro Alves <palves@redhat.com>
4947 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4949 2013-02-14 Pedro Alves <palves@redhat.com>
4951 * tracepoint.c (save_string): Delete.
4952 (add_tracepoint_action): Use savestring instead of save_string.
4954 2013-02-12 Pedro Alves <palves@redhat.com>
4956 * linux-xtensa-low.c: Ditto.
4957 * xtensa-xtregs.c: Ditto.
4959 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4961 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4964 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4966 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4967 aarch64_num_wp_regs and aarch64_num_bp_regs to
4968 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4970 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4972 * linux-aarch64-low.c (ps_get_thread_area): Replace
4973 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4975 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4976 Marcus Shawcroft <marcus.shawcroft@arm.com>
4977 Nigel Stephens <nigel.stephens@arm.com>
4978 Yufeng Zhang <yufeng.zhang@arm.com>
4980 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4981 (aarch64.c, aarch64-without-fpu.c): New targets.
4982 * configure.srv (aarch64*-*-linux*): New.
4983 * linux-aarch64-low.c: New file.
4985 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4987 * linux-low.c (handle_extended_wait, linux_create_inferior)
4988 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4989 (dequeue_one_deferred_signal, linux_resume_one_thread)
4990 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4991 (linux_tracefork_grandchild, linux_test_for_tracefork)
4992 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4993 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4994 where the argument is 0.
4996 2013-01-25 Yao Qi <yao@codesourcery.com>
4998 * event-loop.c: Include "queue.h".
4999 (gdb_event_p): New typedef.
5000 (struct gdb_event) <next_event>: Remove.
5001 (event_queue): Change to QUEUE(gdb_event_p).
5002 (async_queue_event): Remove.
5003 (gdb_event_xfree): New.
5004 (initialize_event_loop): New.
5005 (process_event): Use API from QUEUE.
5006 (wait_for_event): Likewise.
5007 * server.c (main): Call initialize_event_loop.
5008 * server.h (initialize_event_loop): Declare.
5010 2013-01-18 Yao Qi <yao@codesourcery.com>
5012 * ax.h (struct eval_agent_expr_context): New.
5013 (gdb_eval_agent_expr): Update declaration.
5014 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
5015 TFRAME. Add new argument CTX.
5016 * server.h (struct eval_agent_expr_context): Declare.
5017 (agent_mem_read, agent_tsv_read): Update declaration.
5018 (agent_mem_read_string): Likewise.
5019 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
5020 (add_traceframe_block): Add new argument TPOINT.
5021 Increase TPOINT->traceframe_usage.
5022 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
5023 eval_tracepoint_agent_expr.
5024 (condition_true_at_tracepoint): Likewise.
5025 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
5026 (agent_mem_read_string, agent_tsv_read): Likewise.
5028 2013-01-16 Yao Qi <yao@codesourcery.com>
5030 * linux-low.c (linux_resume_one_lwp): Don't check
5031 'lwp->bp_reinsert != 0'.
5033 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5034 Pedro Alves <palves@redhat.com>
5036 * lynx-low.c (ptrace_request_to_str): Define a temporary
5037 macro and use it to simplify this function's implementation.
5039 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5041 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
5044 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5046 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
5048 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5050 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
5052 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5054 * lynx-low.c (lynx_resume): Use the resume_info parameter
5055 to determine the ptid for the lynx_ptrace call, unless
5056 it is equal to minus_one_ptid, in which case we use the
5057 ptid of the current_inferior.
5058 (lynx_wait_1): After having received a thread create/exit
5059 event, resume the inferior's execution using the signaling
5060 thread's ptid, rather than the old ptid.
5062 2013-01-07 Joel Brobecker <brobecker@adacore.com>
5064 * lynx-low.c (lynx_resume): Delete variable ret.
5066 2013-01-01 Joel Brobecker <brobecker@adacore.com>
5068 * gdbreplay.c (gdbreplay_version): Update copyright year.
5069 * server.c (gdbserver_version): Likewise.
5071 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5073 * lynx-low.c (lynx_wait_1): Add debug trace before adding
5076 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5078 * lynx-low.c (ptrace_request_to_str): Add handling for
5081 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5083 * lynx-low.c (lynx_attach): Delete variable new_process.
5085 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5087 * lynx-low.c (lynx_create_inferior): Delete variable
5090 2012-12-17 Joel Brobecker <brobecker@adacore.com>
5092 * lynx-low.c (ptrace_request_to_str): Do not handle
5093 PTRACE_GETTHREADLIST if this macro does not exist.
5095 2012-12-15 Yao Qi <yao@codesourcery.com>
5097 * Makefile.in (OBS): Add notif.o.
5098 * notif.c, notif.h: New.
5099 * server.c: Include "notif.h".
5100 (struct vstop_notif) <next>: Remove.
5102 (queue_stop_reply): Update.
5103 (push_event, send_next_stop_reply): Remove.
5104 (discard_queued_stop_replies): Update.
5105 (notif_stop): New variable.
5106 (handle_v_stopped): Remove.
5107 (handle_v_requests): Don't call handle_v_stopped. Call
5108 handle_ack_notif instead.
5109 (queue_stop_reply_callback): Call notif_event_enque instead
5110 of queue_stop_reply.
5111 (handle_status): Don't call send_next_stop_reply, call
5112 notif_write_event instead.
5113 (kill_inferior_callback): Likewise.
5114 (detach_or_kill_inferior_callback): Likewise.
5115 (main): Call initialize_notif.
5116 (process_serial_event): Call QUEUE_is_empty.
5117 (handle_target_event): Call notif_push instead of push event.
5118 * server.h (push_event): Remove declaration.
5120 2012-12-10 Tom Tromey <tromey@redhat.com>
5122 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
5123 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
5126 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
5127 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
5128 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
5129 (amd64-linux-ipa.o, ax.o): Rewrite.
5130 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
5131 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
5132 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
5133 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
5134 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
5135 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
5136 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
5137 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
5138 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
5139 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
5140 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
5141 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
5142 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
5143 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
5144 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
5145 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
5146 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
5147 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
5148 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
5149 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
5150 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
5151 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
5152 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
5153 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
5154 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
5155 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
5156 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
5157 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
5158 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
5159 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
5160 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
5161 (reg-tilegx.o): Remove.
5162 (all_object_files): New macro.
5163 Include .deps files.
5164 * aclocal.m4, configure: Rebuild.
5165 * acinclude.m4: Include depstand.m4, lead-dot.m4.
5166 * configure.ac: Invoke ZW_CREATE_DEPDIR,
5167 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
5169 2012-12-05 Tom Tromey <tromey@redhat.com>
5172 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
5174 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
5176 * configure.ac: Check for linux/perf_event.h.
5177 * config.in: Regenerated.
5178 * configure: Regenerated.
5180 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
5182 * hostio.c (handle_readlink): Decrease buffer size
5183 parameter passed to readlink by one byte.
5185 2012-11-26 Yao Qi <yao@codesourcery.com>
5187 * configure.ac (build_warnings): Append '-Wempty-body'.
5188 * configure: Regenerated.
5189 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
5192 2012-11-15 Pierre Muller <muller@sourceware.org>
5194 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
5195 * config.in: Regenerate.
5196 * configure: Regenerate.
5197 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
5198 Use "gdb_wait.h" header instead of <sys/wait.h> header.
5199 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5200 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
5202 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
5203 instead of <sys/wait.h> header.
5204 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
5206 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
5208 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
5209 (various make rules): Remove -DGDBSERVER
5211 2012-11-09 Yao Qi <yao@codesourcery.com>
5213 * spu-low.c (current_ptid): Move it to ..
5214 * gdbthread.h: ... here. New.
5215 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
5216 * server.c (myresume, process_serial_event): Likewise.
5217 * thread-db.c (thread_db_find_new_threads): Likewise.
5218 * tracepoint.c (run_inferior_command): Likewise.
5220 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
5222 * server.c (handle_search_memory_1): Include access length in
5225 2012-09-05 Michael Brandt <michael.brandt@axis.com>
5227 * linux-crisv32-low.c: Fix compile errors.
5229 2012-09-04 Yao Qi <yao@codesourcery.com>
5231 * tracepoint.c (cmd_qtsv): Adjust debug message.
5232 Don't check CUR_TPOINT.
5234 2012-08-28 Yao Qi <yao@codesourcery.com>
5236 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5237 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5238 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5239 Remove declarations of xmalloc, xreallloc, xstrdup and
5241 * Makefile.in (libiberty_h): New.
5242 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5243 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5245 2012-08-23 Yao Qi <yao@codesourcery.com>
5247 * server.h: Remove declaration of 'xsnprintf'.
5249 2012-08-22 Keith Seitz <keiths@redhat.com>
5251 * server.h: Include build-gnulib-gbserver/config.h.
5252 * gdbreplay.c: Likewise.
5254 2012-08-08 Doug Evans <dje@google.com>
5256 * Makefile.in (SFILES): Add gdb_vecs.c.
5257 (OBS): Add gdb_vecs.o.
5258 (gdb_vecs_h, host_defs_h): New variables.
5259 (thread-db.o): Add $(gdb_vecs_h) dependency.
5260 (gdb_vecs.o): New rule.
5261 * thread-db.c: #include "gdb_vecs.h".
5262 (thread_db_load_search): Use a vector to iterate over path elements.
5263 Handle text appearing after "$pdir".
5265 * configure.ac: Add check for strstr.
5266 * config.in: Regenerate.
5267 * configure: Regenerate.
5269 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5271 * hostio.c (handle_pread): If pread fails, fall back to attempting
5273 (handle_pwrite): Likewise for pwrite.
5275 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5277 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5278 between unsupported TYPE and unimplementable ADDR/LEN combination.
5279 (arm_insert_point): Act on new return value.
5281 2012-07-31 Pedro Alves <palves@redhat.com>
5283 * server.c (process_point_options): Only skip tokens if we find
5284 one that is unrecognized. Don't treat 'X' specially while
5285 skipping unrecognized tokens.
5287 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5289 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5290 to 4-byte-align HW breakpoint addresses for Thumb.
5292 2012-07-27 Yao Qi <yao@codesourcery.com>
5296 * server.h: Declare gdb_agent_about_to_close.
5297 * target.c (kill_inferior): Include "agent.h".
5298 New. Send command 'kill'.
5299 * target.h (kill_inferior): Removed macro.
5300 * tracepoint.c (gdb_agent_about_to_close): New.
5301 (gdb_agent_helper_thread): Handle command 'close'.
5302 Wait endlessly until the inferior stops.
5303 Install gdb_agent_remove_socket to atexit hook.
5304 (agent_socket_name): New static variable.
5305 (gdb_agent_socket_init): Replace local variable 'name' with
5306 'agent_socket_name'.
5307 (gdb_agent_remove_socket): New.
5309 2012-07-27 Yao Qi <yao@codesourcery.com>
5311 * server.c (process_point_options): Stop at 'X' when parsing.
5313 2012-07-19 Michael Eager <eager@eagercon.com>
5315 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
5317 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5318 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5319 hardware breakpoint.
5321 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5323 * gdbserver/linux-low.c (initialize_low): Call
5324 linux_ptrace_init_warnings.
5326 2012-07-02 Doug Evans <dje@google.com>
5328 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5331 2012-07-02 Stan Shebs <stan@codesourcery.com>
5333 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5334 (ax.o): Add it to build rule.
5336 (OBS): Add format.o.
5337 (IPA_OBS): Add format.o.
5338 * server.c (handle_query): Claim support for breakpoint commands.
5339 (process_point_options): Add command case.
5340 (process_serial_event): Leave running if there are printfs in
5342 * mem-break.h (any_persistent_commands): Declare.
5343 (add_breakpoint_commands): Declare.
5344 (gdb_no_commands_at_breakpoint): Declare.
5345 (run_breakpoint_commands): Declare.
5346 * mem-break.c (struct point_command_list): New struct.
5347 (struct breakpoint): New field command_list.
5348 (any_persistent_commands): New function.
5349 (add_commands_to_breakpoint): New function.
5350 (add_breakpoint_commands): New function.
5351 (gdb_no_commands_at_breakpoint): New function.
5352 (run_breakpoint_commands): New function.
5353 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5355 * ax.c: Include format.h.
5356 (ax_printf): New function.
5357 (gdb_eval_agent_expr): Add printf opcode.
5359 2012-06-13 Yao Qi <yao@codesourcery.com>
5361 * server.c (start_inferior): Remove duplicated writes to fields
5362 'last_resume_kind' and 'last_status' of 'current_inferior'.
5364 2012-06-12 Yao Qi <yao@codesourcery.com>
5365 Pedro Alves <palves@redhat.com>
5367 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5369 * server.c (handle_v_cont): Extend comment.
5371 2012-06-11 Yao Qi <yao@codesourcery.com>
5373 * linux-low.c (linux_attach): Add 'static'.
5375 2012-06-06 Yao Qi <yao@codesourcery.com>
5377 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5379 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5381 Fix gcc -flto compilation warning.
5382 * server.c (main): Make variable multi_mode and attach volatile.
5384 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5386 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5387 if the platform doesn't know about it.
5389 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5391 * Makefile.in (SFILES): Add linux-tile-low.c.
5392 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5393 * configure.srv: Handle tilegx-*-linux*.
5394 * linux-tile-low.c: New file.
5396 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5398 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5400 2012-05-24 Pedro Alves <palves@redhat.com>
5404 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5406 2012-05-24 Pedro Alves <palves@redhat.com>
5410 Replace target_signal with gdb_signal throughout.
5412 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5414 * linux-low.c (linux_store_registers): Avoid the copying sequence
5415 when no data has been retrieved by ptrace.
5417 2012-05-22 Will Deacon <will.deacon@arm.com>
5419 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5420 Include asm/ptrace.h.
5421 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5424 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5426 * linux-low.c (linux_store_registers): Don't re-retrieve data
5427 with ptrace that has already been obtained from /proc. Always
5428 copy any data retrieved with ptrace to the buffer supplied.
5430 2012-05-11 Yao Qi <yao@codesourcery.com>
5431 Pedro Alves <palves@redhat.com>
5433 * linux-low.c (enum stopping_threads_kind): New.
5434 (stopping_threads): Change type to `enum stopping_threads_kind'.
5435 (handle_extended_wait): If stopping and suspending threads, leave
5436 the new_lwp suspended too.
5437 (linux_wait_for_event): Adjust.
5438 (stop_all_lwps): Set `stopping_threads' to
5439 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5440 whether we're suspending threads or just stopping them. Assert no
5443 2012-04-29 Yao Qi <yao@codesourcery.com>
5445 * server.h: Move some code to ...
5446 * gdbthread.h: ... here. New.
5447 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5448 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5449 (nto-low.o, win32-low.o): Likewise.
5450 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5451 * regcache.c, remote-utils.c, server.c: Likewise.
5452 * target.c, tracepoint.c, win32-low.c: Likewise.
5454 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5456 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5457 (PTRACE_ARG4_TYPE): Likewise.
5458 (PTRACE_XFER_TYPE): Likewise.
5459 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5460 ptrace to PTRACE_ARG3_TYPE.
5461 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5462 (PTRACE_ARG4_TYPE): Likewise.
5463 (PTRACE_XFER_TYPE): Likewise.
5464 (linux_detach_one_lwp): Cast fourth argument of
5465 ptrace to long then PTRACE_ARG4_TYPE.
5466 (regsets_fetch_inferior_registers): Cast third argument of
5467 ptrace to long then PTRACE_ARG3_TYPE.
5468 (regsets_store_inferior_registers): Likewise.
5470 2012-04-20 Pedro Alves <palves@redhat.com>
5472 * configure: Regenerate.
5474 2012-04-19 Pedro Alves <palves@redhat.com>
5476 * Makefile.in (GNULIB_BUILDDIR): New.
5477 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5478 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5479 (all, install-only, uninstall, clean-info, all-lib, clean): No
5480 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5481 (maintainer-clean realclean distclean): Use subdir_do.
5483 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5484 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5485 * acinclude.m4: Include acx_configure_dir.m4.
5486 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5487 calls. Call AC_PROG_RANLIB. Configure gnulib using
5490 (GNULIB_STDINT_H): Adjust.
5491 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5492 * gdbreplay.c: Include build-gnulib/config.h.
5493 * server.h: Likewise.
5494 * aclocal.m4: Regenerate.
5495 * config.in: Regenerate.
5496 * configure: Regenerate.
5498 2012-04-19 Pedro Alves <palves@redhat.com>
5500 * Makefile.in (LIBGNU, INCGNU): Adjust.
5501 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5502 (all, install-only, uninstall, clean-info, all-lib, clean)
5503 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5504 * configure.ac: Adjust AC_OUTPUT output.
5505 * aclocal.m4: Regenerate.
5506 * configure: Regenerate.
5508 2012-04-19 Pedro Alves <palves@redhat.com>
5510 * Makefile.in (generated_files): New.
5511 (server_h): Remove the explicit dependency on config.h, and depend
5512 on $generated_files.
5514 2012-04-19 Pedro Alves <palves@redhat.com>
5516 * Makefile.in (INCGNU): Add -Ignulib.
5518 2012-04-19 Pedro Alves <palves@redhat.com>
5520 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5521 (INCGNU): ... this, and spell out -I here.
5522 (GNULIB_LIB): Rename to ...
5524 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5526 2012-04-19 Pedro Alves <palves@redhat.com>
5528 * config.in: Regenerate.
5530 2012-04-19 Pedro Alves <palves@redhat.com>
5532 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5533 * server.h (memmem): Remove declaration.
5534 * config.in: Regenerate.
5535 * configure: Regenerate.
5537 2012-04-19 Yao Qi <yao@codesourcery.com>
5539 * Makefile.in (SFILES): Add common/vec.c.
5543 2012-04-19 Yao Qi <yao@codesourcery.com>
5545 * remote-utils.c (prepare_resume_reply): Replace with macro
5546 target_core_of_thread.
5547 * server.c (handle_qxfer_threads_proper): Likewise.
5548 * target.h (traget_core_of_thread): New macro.
5550 2012-04-18 Pedro Alves <palves@redhat.com>
5552 * aclocal.m4: Regenerate.
5553 * configure: Regenerate.
5555 2012-04-16 Yao Qi <yao@codesourcery.com>
5557 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5558 duplicated on address.
5560 2012-04-16 Yao Qi <yao@codesourcery.com>
5562 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5563 (struct tracepoint_action_ops) <send>: New field.
5564 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5565 (agent_expr_send, x_tracepoint_action_send): New.
5566 (l_tracepoint_action_send): New.
5567 (cmd_qtdp): Download and install tracepoint
5568 according to `use_agent'.
5569 (run_inferior_command): Add one more parameter `len'.
5571 (tracepoint_send_agent): New.
5572 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5574 2012-04-16 Yao Qi <yao@codesourcery.com>
5576 * tracepoint.c (download_tracepoints): Moved to ...
5577 (cmd_qtstart): ... here.
5579 2012-04-14 Yao Qi <yao@codesourcery.com>
5581 * tracepoint.c: Include inttypes.h.
5582 (struct collect_memory_action): Use sized types.
5583 (struct tracepoint): Likewise.
5584 (cmd_qtdp, stop_tracing): Update print specifiers.
5585 (cmd_qtp, response_tracepoint): Likewise.
5586 (collect_data_at_tracepoint): Likewise.
5587 (collect_data_at_step): Likewise.
5589 2012-04-14 Yao Qi <yao@codesourcery.com>
5591 Import gnulib module inttypes.
5592 * aclocal.m4, config.in, configure: Regenerated.
5594 2012-04-14 Yao Qi <yao@codesourcery.com>
5596 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5597 Makefile and config.status at last.
5599 2012-04-13 Yao Qi <yao@codesourcery.com>
5601 * tracepoint.c: Include stdint.h unconditionally.
5603 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5605 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5606 on BFD_HAVE_SYS_PROCFS_TYPE.
5607 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5608 * configure: Regenerate.
5609 * config.in: Likewise.
5611 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5613 * Makefile.in (clean): Also remove x32.c x32-linux.c
5614 x32-avx.c x32-avx-linux.c.
5615 (x32.o): New target.
5617 (x32-linux.o): Likewise.
5618 (x32-linux.c): Likewise.
5619 (x32-avx.o): Likewise.
5620 (x32-avx.c): Likewise.
5621 (x32-avx-linux.o): Likewise.
5622 (x32-avx-linux.c): Likewise.
5624 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5625 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5626 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5627 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5628 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5629 i386/x32-avx-linux.xml.
5631 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5632 (init_registers_x32_avx_linux): Likwise.
5633 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5634 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5636 2012-04-13 Pedro Alves <palves@redhat.com>
5638 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5639 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5640 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5641 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5644 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5646 * linux-x86-low.c (compat_x32_clock_t): New.
5647 (compat_x32_siginfo_t): Likewise.
5648 (compat_x32_siginfo_from_siginfo): Likewise.
5649 (siginfo_from_compat_x32_siginfo): Likewise.
5650 (linux_is_elf64): Likewise.
5651 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5652 and siginfo_from_compat_x32_siginfo for x32.
5653 (x86_arch_setup): Set linux_is_elf64.
5655 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5658 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5660 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5661 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5662 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5663 compatible with process.
5665 2012-04-12 Yao Qi <yao@codesourcery.com>
5667 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5668 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5669 (install-only, install-info, clean): Handle sub dir gnulib.
5670 (all-lib, am--refresh): New targets.
5671 (memmem.o): Remove target.
5672 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5673 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5674 (AC_REPLACE_FUNCS): Remove memmem.
5675 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5676 (AC_OUTPUT): Generate Makefile in gnulib/.
5677 * aclocal.m4, config.in, configure: Regenerated.
5679 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5681 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5683 2012-04-05 Pedro Alves <palves@redhat.com>
5685 -Werror=strict-aliasing
5687 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5690 2012-04-04 Pedro Alves <palves@redhat.com>
5692 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5693 (sparc_store_gregset_from_stack, sparc_store_gregset)
5694 (sparc_breakpoint_at): Fix formatting.
5696 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5698 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5700 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5701 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5702 * config.in: Regenerate.
5703 * configure: Likewise.
5705 2012-03-29 Pedro Alves <palves@redhat.com>
5707 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5708 Correct ptrace arguments.
5710 2012-03-28 Pedro Alves <palves@redhat.com>
5712 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5713 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5714 (IA64_FR1_REGNUM): New defines.
5715 (ia64_fetch_register): New.
5716 (the_low_target): Install it.
5717 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5719 * linux-low.c (linux_fetch_registers): Try the
5720 the_low_target.fetch_register hook first.
5722 * linux-arm-low.c (the_low_target): Adjust.
5723 * linux-bfin-low.c (the_low_target): Adjust.
5724 * linux-cris-low.c (the_low_target): Adjust.
5725 * linux-crisv32-low.c (the_low_target): Adjust.
5726 * linux-m32r-low.c (the_low_target): Adjust.
5727 * linux-m68k-low.c (the_low_target): Adjust.
5728 * linux-mips-low.c (the_low_target): Adjust.
5729 * linux-ppc-low.c (the_low_target): Adjust.
5730 * linux-s390-low.c (the_low_target): Adjust.
5731 * linux-sh-low.c (the_low_target): Adjust.
5732 * linux-sparc-low.c (the_low_target): Adjust.
5733 * linux-tic6x-low.c (the_low_target): Adjust.
5734 * linux-x86-low.c (the_low_target): Adjust.
5735 * linux-xtensa-low.c (the_low_target): Adjust.
5737 2012-03-26 Pedro Alves <palves@redhat.com>
5739 * server.c (handle_qxfer_libraries): Don't bail early if
5740 the_target->qxfer_libraries_svr4 is not NULL.
5742 2012-03-26 Pedro Alves <palves@redhat.com>
5744 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5746 2012-03-23 Pedro Alves <palves@redhat.com>
5748 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5749 "library-list-svr4" element's start tag when the the DSO list is
5752 2012-03-23 Pedro Alves <palves@redhat.com>
5754 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5755 a variable whose type size is the same as the inferior's pointer
5758 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5760 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5762 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5763 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5764 * linux-low.h: Include <signal.h>.
5765 (struct siginfo): Remove forward declaration.
5766 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5769 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5771 * .gitignore: Ignore more files.
5773 2012-03-19 Pedro Alves <palves@redhat.com>
5774 Jan Kratochvil <jan.kratochvil@redhat.com>
5776 * server.c (cont_thread, general_thread): Add describing comments.
5777 (start_inferior): Clear `cont_thread'.
5778 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5781 2012-03-15 Yao Qi <yao@codesourcery.com>
5783 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5785 (cmd_qtdp): ... here.
5787 2012-03-15 Yao Qi <yao@codesourcery.com>
5789 * tracepoint.c (struct tracepoint_action_ops): New.
5790 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5791 (m_tracepoint_action_download): New.
5792 (r_tracepoint_action_download): New.
5793 (x_tracepoint_action_download): New.
5794 (l_tracepoint_action_download): New.
5795 (add_tracepoint_action): Install `action->ops' according type.
5796 (download_tracepoint_1): Move code `download' function pointer
5797 of various tracepoint_action_ops.
5799 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5801 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5802 linux_ptrace_attach_warnings.
5804 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5806 * Makefile.in (linux-ptrace.o): New.
5807 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5808 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5809 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5810 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5811 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5813 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5815 2012-03-08 Yao Qi <yao@codesourcery.com>
5816 Pedro Alves <palves@redhat.com>
5818 Fix PR server/13392.
5819 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5821 * tracepoint.c (remove_tracepoint): New.
5822 (cmd_qtdp): Call remove_tracepoint when failed to install.
5824 2012-03-07 Pedro Alves <palves@redhat.com>
5826 * linux-low.c (get_detach_signal): New.
5827 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5828 Pass on pending signals to PTRACE_DETACH. Check the result of the
5830 * server.c (program_signals, program_signals_p): New.
5831 (handle_general_set): Handle QProgramSignals.
5832 * server.h (program_signals, program_signals_p): Declare.
5834 2012-03-05 Pedro Alves <palves@redhat.com>
5835 Jan Kratochvil <jan.kratochvil@redhat.com>
5837 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5840 2012-03-03 Yao Qi <yao@codesourcery.com>
5842 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5843 agent_look_up_symbols.
5845 2012-03-03 Yao Qi <yao@codesourcery.com>
5847 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5848 (linux-x86-low.o): Likewise.
5849 * server.h: Remove in_process_agent_loaded.
5850 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5854 2012-03-03 Yao Qi <yao@codesourcery.com>
5856 * tracepoint.c (gdb_agent_capability): New global.
5857 (in_process_agent_loaded_ust): Renamed to
5858 `in_process_agent_supports_ust'.
5860 (in_process_agent_supports_ust): Call agent_capability_check.
5861 (clear_installed_tracepoints): Assert that agent supports
5864 2012-03-03 Yao Qi <yao@codesourcery.com>
5866 * linux-low.c (linux_supports_agent): New.
5867 (linux_target_ops): Initialize field `supports_agent' with
5868 linux_supports_agent.
5869 * target.h (struct target_ops) <supports_agent>: New.
5870 (target_supports_agent): New macro.
5871 * server.c (handle_general_set): Handle packet 'QAgent'.
5872 (handle_query): Send `QAgent+'.
5873 * Makefile.in (server.o): Depends on agent.h.
5875 2012-03-03 Yao Qi <yao@codesourcery.com>
5877 * Makefile.in (OBS): Add agent.o.
5878 Add new rule for agent.o.
5879 Track dependence of tracepoint.c on agent.h.
5880 * tracepoint.c (run_inferior_command_1):
5881 (run_inferior_command): Call agent_run_command.
5882 (gdb_ust_connect_sync_socket): Deleted. Move it to
5884 (resume_thread, stop_thread): Likewise.
5885 (gdb_ust_socket_init): Renamed to ...
5886 (gdb_agent_socket_init): ... New.
5887 (gdb_ust_thread): Renamed to ...
5888 (gdb_agent_helper_thread): ... New.
5889 (gdb_ust_init): Move some code to ...
5890 (gdb_agent_init): ... here. New.
5891 [HAVE_UST]: Call gdb_ust_init.
5892 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5893 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5894 * config.in, configure: Regenerated.
5896 2012-03-02 Pedro Alves <palves@redhat.com>
5898 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5899 * linux-low.c (struct simple_pid_list): New.
5900 (stopped_pids): New a struct simple_pid_list pointer.
5901 (add_to_pid_list, pull_pid_from_list): New.
5902 (handle_extended_wait): Don't assume the first signal new children
5903 report is SIGSTOP. Adjust call to pull_pid_from_list.
5904 (linux_wait_for_lwp): Adjust.
5906 2012-03-02 Yao Qi <yao@codesourcery.com>
5908 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5911 2012-03-02 Yao Qi <yao@codesourcery.com>
5913 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5914 `stop_pc' and `tpoint'. Update caller.
5916 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5918 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5919 * linux-low.c (use_linux_regsets): New macro.
5920 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5921 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5922 (linux_register_in_regsets): New function.
5923 (usr_fetch_inferior_registers): Skip registers covered by
5925 (usr_store_inferior_registers): Likewise.
5926 (usr_fetch_inferior_registers): New macro.
5927 (usr_store_inferior_registers): Likewise.
5928 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5929 (linux_store_registers): Likewise.
5930 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5932 (init_registers_mips64_dsp_linux): Likewise.
5933 (init_registers_mips_linux): New macro.
5934 (init_registers_mips_dsp_linux): Likewise.
5935 (mips_dsp_num_regs): Likewise.
5936 (DSP_BASE, DSP_CONTROL): New fallback macros.
5937 (mips_base_regs): New macro.
5938 (mips_regmap): Use it. Fix the size.
5939 (mips_dsp_regmap): New variable.
5940 (mips_dsp_regset_bitmap): Likewise.
5941 (mips_arch_setup): New function.
5942 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5944 (mips_cannot_store_register): Likewise.
5945 (the_low_target): Update .arch_setup, .num_regs and .regmap
5946 initializers. Add .regset_bitmap initializer.
5947 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5949 * linux-bfin-low.c (the_low_target): Likewise.
5950 * linux-cris-low.c (the_low_target): Likewise.
5951 * linux-crisv32-low.c (the_low_target): Likewise.
5952 * linux-ia64-low.c (the_low_target): Likewise.
5953 * linux-m32r-low.c (the_low_target): Likewise.
5954 * linux-m68k-low.c (the_low_target): Likewise.
5955 * linux-ppc-low.c (the_low_target): Likewise.
5956 * linux-s390-low.c (the_low_target): Likewise.
5957 * linux-sh-low.c (the_low_target): Likewise.
5958 * linux-sparc-low.c (the_low_target): Likewise.
5959 * linux-tic6x-low.c (the_low_target): Likewise.
5960 * linux-x86-low.c (the_low_target): Likewise.
5961 * linux-xtensa-low.c (the_low_target): Likewise.
5962 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5963 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5964 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5966 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5967 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5969 2012-02-29 Yao Qi <yao@codesourcery.com>
5970 Pedro Alves <palves@redhat.com>
5972 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5973 `step_over_finished' is true.
5975 2012-02-27 Pedro Alves <palves@redhat.com>
5977 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5978 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5980 2012-02-27 Pedro Alves <palves@redhat.com>
5983 * linux-low.c (pid_is_stopped): New.
5984 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5986 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5988 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5991 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5993 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5995 2012-02-24 Luis Machado <lgustavo@codesourcery>
5997 * server.c (handle_query): Advertise support for target-side
5998 breakpoint condition evaluation.
5999 (process_point_options): New function.
6000 (process_serial_event): When inserting a breakpoint, check for
6001 a target-side condition that should be evaluated.
6003 * mem-break.c: Include regcache.h and ax.h.
6004 (point_cond_list_t): New data structure.
6005 (breakpoint) <cond_list>: New field.
6006 (find_gdb_breakpoint_at): Make non-static.
6007 (delete_gdb_breakpoint_at): Clear any target-side
6009 (clear_gdb_breakpoint_conditions): New function.
6010 (add_condition_to_breakpoint): Likewise.
6011 (add_breakpoint_condition): Likewise.
6012 (gdb_condition_true_at_breakpoint): Likewise.
6013 (gdb_breakpoint_here): Return result directly instead
6014 of going through a local variable.
6016 * mem-break.h (find_gdb_breakpoint_at): New prototype.
6017 (clear_gdb_breakpoint_conditions): Likewise.
6018 (add_breakpoint_condition): Likewise.
6019 (gdb_condition_true_at_breakpoint): Likewise.
6021 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
6022 (need_step_over_p): Take target-side breakpoint condition into
6025 2012-02-24 Luis Machado <lgustavo@codesourcery>
6027 * server.h: Include tracepoint.h.
6028 (agent_mem_read, agent_get_trace_state_variable_value,
6029 agent_set_trace_state_variable_value,
6030 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
6031 get_set_tsv_func_addr): New prototypes.
6033 * ax.h: New include file.
6034 * ax.c: New source file.
6036 * tracepoint.c: Include ax.h.
6037 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
6038 agent_expr, eval_result_type): Move to ax.h.
6039 (parse_agent_expr): Rename to ...
6040 (gdb_parse_agent_expr): ... this, make it non-static and move
6042 (unparse_agent_expr) Rename to ...
6043 (gdb_unparse_agent_expr): ... this, make it non-static and move
6045 (eval_agent_expr): Rename to ...
6046 (eval_tracepoint_agent_expr): ... this.
6047 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
6048 forward declarations.
6049 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
6050 (agent_get_trace_state_variable_value): New function.
6051 (agent_set_trace_state_variable_value): New function.
6052 (cmd_qtdp): Call gdb_parse_agent_expr (...).
6053 (response_tracepoint): Call gdb_unparse_agent_expr (...).
6054 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
6055 (condition_true_at_tracepoint): Likewise.
6056 (parse_agent_expr): Rename to ...
6057 (gdb_parse_agent_expr): ... this and move to ax.c.
6058 (unparse_agent_expr): Rename to ...
6059 (gdb_unparse_agent_expr): ... this and move to ax.c.
6060 (gdb_agent_op_name): Move to ax.c.
6061 (eval_agent_expr): Rename to ...
6062 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
6064 (eval_tracepoint_agent_expr): New function.
6065 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
6067 (current_insn_ptr, emit_error, struct bytecode_address): Move to
6069 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
6070 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
6071 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
6072 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
6073 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
6074 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
6075 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
6076 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
6077 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
6078 (compile_bytecodes): Remove forward declaration.
6079 (is_goto_target): Move to ax.c.
6080 (compile_bytecodes): Move to ax.c and call
6081 agent_get_trace_state_variable_value (...) and
6082 agent_set_trace_state_variable_value (...).
6084 * Makefile.in: Update ax.c and IPA dependencies.
6086 2012-02-24 Pedro Alves <palves@redhat.com>
6088 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
6089 (cmd_bigqtbuffer_circular): ... this. Only handle
6090 'QTBuffer:circular:'.
6091 (handle_tracepoint_general_set): Adjust.
6093 2012-02-16 Yao Qi <yao@codesourcery.com>
6095 * inferiors.c: Move code to ...
6096 * dll.c: .... here. New.
6097 * server.h: Declare clear_dlls.
6098 * Makefile.in (SFILES): Add dll.c.
6102 2012-02-11 Yao Qi <yao@codesourcery.com>
6104 * server.c: (handle_monitor_command): Add a new parameter
6106 (handle_query): Update caller.
6108 2012-02-09 Joel Brobecker <brobecker@adacore.com>
6110 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
6111 * configure, config.in: Regenerate.
6112 * hostio.c: Provide an alternate implementation if HAVE_READLINK
6115 2012-02-02 Pedro Alves <palves@redhat.com>
6117 Try SIGKILL first, then PTRACE_KILL.
6118 * linux-low.c (linux_kill_one_lwp): New.
6119 (linux_kill_one_lwp): Rename to ...
6120 (kill_one_lwp_callback): ... this. Use the new
6123 2012-02-02 Pedro Alves <palves@redhat.com>
6125 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
6128 2012-01-27 Pedro Alves <palves@redhat.com>
6130 * linux-low.c (linux_child_pid_to_exec_file): Delete.
6131 (elf_64_file_p): Make static.
6132 (linux_pid_exe_is_elf_64_file): New.
6133 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
6134 Delete declarations.
6135 (linux_pid_exe_is_elf_64_file): Declare.
6136 * linux-x86-low.c (x86_arch_setup): Use
6137 linux_pid_exe_is_elf_64_file.
6139 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
6141 * linux-low.c (linux_wait_for_event_1): Rename to ...
6142 (linux_wait_for_event): ... here and merge it with former
6143 linux_wait_for_event - new variable wait_ptid, use it.
6144 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
6146 2012-01-23 Pedro Alves <palves@redhat.com>
6148 * server.c (main): Avoid yet another case of infinite loop while
6149 detaching/killing after a longjmp.
6151 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
6154 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
6156 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
6158 * hostio.c (handle_readlink): New function.
6159 (handle_vFile): Call it to handle "vFile:readlink" packets.
6161 2012-01-20 Pedro Alves <palves@redhat.com>
6162 Ulrich Weigand <ulrich.weigand@linaro.org>
6164 * server.c (handle_v_requests): Only support vAttach and vRun to
6165 start multiple processes when in extended protocol mode.
6167 2012-01-17 Pedro Alves <palves@redhat.com>
6169 * tracepoint.c (initialize_tracepoint): Use mmap instead of
6170 memalign plus mprotect to allocate the scratch buffer.
6172 2012-01-13 Pedro Alves <palves@redhat.com>
6174 * server.c (attach_inferior): Clear `cont_thread'.
6176 2012-01-13 Pedro Alves <palves@redhat.com>
6178 * server.c (main): Avoid infinite loop while detaching/killing
6181 2012-01-09 Doug Evans <dje@google.com>
6183 * server.c (start_inferior): Set last_ptid in --wrapper case.
6185 2012-01-06 Yao Qi <yao@codesourcery.com>
6187 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
6189 [IN_PROCESS_AGENT] (debug_agent): New global variable.
6191 2012-01-04 Yao Qi <yao@codesourcery.com>
6193 * tracepoint.c (cmd_qtdp): Print debug message
6194 for static tracepoint.
6196 2012-01-04 Yao Qi <yao@codesourcery.com>
6198 * tracepoint.c (trace_vdebug): Differentiate debug message
6199 between gdbserver and IPA.
6201 2012-01-03 Yao Qi <yao@codesourcery.com>
6203 * tracepoint.c (tracepoint_was_hit): Don't collect for
6206 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6208 * terminal.h: Reformat copyright header.
6210 2012-01-02 Joel Brobecker <brobecker@adacore.com>
6212 * server.c (gdbserver_version): Update copyright year.
6213 * gdbreplay.c (gdbreplay_version): Likewise.
6215 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
6217 * linux-low.c (linux_create_inferior): Put empty if clause for write.
6220 2011-12-18 Hui Zhu <teawater@gmail.com>
6221 * linux-low.c (linux_create_inferior): Save return value to ret.
6223 2011-12-18 Hui Zhu <teawater@gmail.com>
6225 * linux-low.c (linux_create_inferior): Save return value to ret.
6227 2011-12-16 Doug Evans <dje@google.com>
6229 * linux-low.c (linux_create_inferior): If stdio connection,
6230 redirect stdin from /dev/null, stdout to stderr.
6231 * remote-utils.c (remote_is_stdio): New static global.
6232 (remote_connection_is_stdio): New function.
6233 (remote_prepare): Handle stdio connection.
6234 (remote_open): Ditto.
6235 (remote_close): Don't close stdin for stdio connections.
6236 (read_prim,write_prim): New functions. Replace all calls to
6237 read/write to these.
6238 * server.c (main): Watch for "-" argument. Move call to
6239 remote_prepare before start_inferior.
6240 * server.h (STDIO_CONNECTION_NAME): New macro.
6241 (remote_connection_is_stdio): Declare.
6243 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6244 in debugging output.
6246 2011-12-15 Yao Qi <yao@codesourcery.com>
6248 * tracepoint.c: Include sys/syscall.h.
6249 (gdb_ust_thread): Remove preprocessor conditional.
6251 2011-12-14 Pedro Alves <pedro@codesourcery.com>
6253 * linux-low.c (linux_detach_one_lwp): Call
6254 the_low_target.prepare_to_resume before detaching.
6256 2011-12-14 Yao Qi <yao@codesourcery.com>
6258 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6261 2011-12-14 Yao Qi <yao@codesourcery.com>
6263 * i386-low.c (i386_low_stopped_data_address): Initialize local
6266 2011-12-13 Pedro Alves <pedro@codesourcery.com>
6270 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6271 DR_CONTROL unless necessary. Extend comments.
6272 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6273 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6275 2011-12-13 Yao Qi <yao@codesourcery.com>
6277 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6279 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6281 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6283 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6284 Print new debug message for such case.
6286 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6288 Fix overlapping memcpy.
6289 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6290 the read_inferior_memory transfer.
6291 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6292 write_inferior_memory transfer.
6293 (set_fast_tracepoint_jump): New variable buf. Use it for the
6294 read_inferior_memory and write_inferior_memory transfers.
6295 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6296 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6297 Use it for the write_inferior_memory transfer.
6298 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6301 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6303 * linux-low.c (fetch_register, store_register): Make code
6304 consistent, fix formatting.
6306 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6308 * linux-low.c (usr_store_inferior_registers): Factor out code
6309 to handle individual registers into...
6310 (store_register): ... this new function.
6312 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6314 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6315 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6316 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6317 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6318 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6319 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6320 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6321 (srv_xmlfiles): Add new XML files.
6323 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6325 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6326 (init_registers_s390_linux32v1): Add prototype.
6327 (init_registers_s390_linux32v2): Likewise.
6328 (init_registers_s390_linux64v1): Likewise.
6329 (init_registers_s390_linux64v2): Likewise.
6330 (init_registers_s390x_linux64v1): Likewise.
6331 (init_registers_s390x_linux64v2): Likewise.
6332 (s390_num_regs): Increment to 52.
6333 (s390_regmap): Add orig_r2 register.
6334 (s390_num_regs_3264): Increment to 68.
6335 (s390_regmap_3264): Add orig_r2 register.
6336 (s390_collect_ptrace_register): Handle orig_r2 register.
6337 (s390_supply_ptrace_register): Likewise.
6338 (s390_fill_last_break): New function.
6339 (s390_store_last_break): Likewise.
6340 (s390_fill_system_call): New function.
6341 (s390_store_system_call): Likewise.
6342 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6344 (s390_check_regset): New function.
6345 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6346 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6347 Update target_regsets for available register sets.
6349 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6350 Jan Kratochvil <jan.kratochvil@redhat.com>
6352 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6353 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6355 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6356 * linux-low.h (struct process_info_private): New member r_debug.
6357 * server.c (handle_qxfer_libraries): Call
6358 the_target->qxfer_libraries_svr4.
6359 (handle_qxfer_libraries_svr4): New function.
6360 (qxfer_packets): New entry "libraries-svr4".
6361 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6362 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6363 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6364 PACKET_qXfer_libraries_svr4.
6366 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6368 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6369 PSW address/mask between 8-byte and 16-byte formats.
6370 (s390_supply_ptrace_register): Likewise.
6371 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6372 basic addressing mode bit.
6374 2011-11-24 Stan Shebs <stan@codesourcery.com>
6376 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6378 2011-11-17 Stan Shebs <stan@codesourcery.com>
6380 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6381 (tracing_start_time): New global.
6382 (tracing_stop_time): New global.
6383 (tracing_user_name): New global.
6384 (tracing_notes): New global.
6385 (tracing_stop_note): New global.
6386 (cmd_qtstart): Set traceframe_usage, start_time.
6387 (stop_tracing): Set stop_time.
6388 (cmd_qtstatus): Report additional status.
6389 (cmd_qtp): New function.
6390 (handle_tracepoint_query): Call it.
6391 (cmd_qtnotes): New function.
6392 (handle_tracepoint_general_set): Call it.
6393 (get_timestamp): Rename from tsv_get_timestamp.
6395 2011-11-14 Stan Shebs <stan@codesourcery.com>
6396 Kwok Cheung Yeung <kcy@codesourcery.com>
6398 * linux-x86-low.c (small_jump_insn): New.
6399 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6400 trampoline and error message, build a trampoline and issue a small
6401 jump instruction to it.
6402 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6403 trampoline and error message.
6404 (x86_get_min_fast_tracepoint_insn_len): New.
6405 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6406 * linux-low.h (struct linux_target_ops): Add arguments to
6407 install_fast_tracepoint_jump_pad operation, add new operation.
6408 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6410 (linux_get_min_fast_tracepoint_insn_len): New function.
6411 (linux_target_op): Add new operation.
6412 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6413 (gdb_trampoline_buffer_end): Ditto.
6414 (gdb_trampoline_buffer_error): Ditto.
6415 (struct ipa_sym_addresses): Add fields for new IPA variables.
6416 (symbol_list): Add entries for new IPA variables.
6417 (struct tracepoint): Add fields to hold the address range of the
6418 trampoline used by the tracepoint.
6419 (trampoline_buffer_head): New static variable.
6420 (trampoline_buffer_tail): Ditto.
6421 (claim_trampoline_space): New function.
6422 (have_fast_tracepoint_trampoline_buffer): New function.
6423 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6425 (install_fast_tracepoint): Ditto, also add error buffer argument.
6426 (cmd_qtminftpilen): New function.
6427 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6428 (fast_tracepoint_from_trampoline_address): New function.
6429 (fast_tracepoint_collecting): Handle trampoline as part of jump
6431 (set_trampoline_buffer_space): New function.
6432 (initialize_tracepoint): Initialize new IPA variables.
6433 * target.h (struct target_ops): Add arguments to
6434 install_fast_tracepoint_jump_pad operation, add new
6435 get_min_fast_tracepoint_insn_len operation.
6436 (target_get_min_fast_tracepoint_insn_len): New.
6437 (install_fast_tracepoint_jump_pad): Add arguments.
6438 * server.h (IPA_BUFSIZ): Define.
6439 * linux-i386-ipa.c: Include extra header files.
6440 (initialize_fast_tracepoint_trampoline_buffer): New function.
6441 (initialize_low_tracepoint): Call it.
6442 * server.h (set_trampoline_buffer_space): Declare.
6443 (claim_trampoline_space): Ditto.
6444 (have_fast_tracepoint_trampoline_buffer): Ditto.
6446 2011-11-14 Yao Qi <yao@codesourcery.com>
6448 * server.c (handle_query): Handle InstallInTrace for qSupported.
6449 * tracepoint.c (add_tracepoint): Sort list.
6450 (install_tracepoint, download_tracepoint): New.
6451 (cmd_qtdp): Call them to install and download tracepoints.
6452 (sort_tracepoints): Removed.
6453 (cmd_qtstart): Update.
6455 2011-11-14 Yao Qi <yao@codesourcery.com>
6457 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6458 * mem-break.h: Declare.
6459 * tracepoint.c (cmd_qtstart): Move some code to ...
6460 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6462 (download_tracepoints): Move some code to ...
6463 (download_tracepoint_1): ... here. New.
6465 2011-11-08 Yao Qi <yao@codesourcery.com>
6467 * remote-utils.c (relocate_instruction): A comment fix.
6469 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6471 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6472 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6473 dr_status_mirror and dr_control_mirror from debug_reg_state.
6474 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6475 (i386_initial_stuff): Remove use of deleted globals.
6476 (i386_get_thread_context, i386_set_thread_context,
6477 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6478 from debug_reg_state.
6480 2011-11-05 Yao Qi <yao@codesourcery.com>
6482 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6483 address as TPOINT's.
6485 2011-11-02 Stan Shebs <stan@codesourcery.com>
6487 * tracepoint.c (agent_mem_read_string): New function.
6488 (eval_agent_expr): Call it for tracenz.
6489 * server.c (handle_query): Report support for tracenz.
6491 2011-11-02 Yao Qi <yao@codesourcery.com>
6493 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6495 2011-11-02 Yao Qi <yao@codesourcery.com>
6497 * target.h: Fix a typo in comment.
6499 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6501 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6502 clobber the breakpoints' shadows with fast tracepoint jumps.
6503 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6504 * target.c (write_inferior_memory): Also pass MYADDR down to
6507 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6509 * configure.ac: Check support for personality routine.
6510 * configure: Regenerate.
6511 * config.in: Likewise.
6512 * linux-low.c: Include <sys/personality.h>.
6513 Define ADDR_NO_RANDOMIZE if necessary.
6514 (linux_create_inferior): Disable address space randomization when
6515 forking inferior, if requested.
6516 (linux_supports_disable_randomization): New function.
6517 (linux_target_ops): Install it.
6518 * server.h (disable_randomization): Declare.
6519 * server.c (disable_randomization): New global variable.
6520 (handle_general_set): Handle QDisableRandomization.
6521 (handle_query): Likewise for qSupported.
6522 (main): Support --disable-randomization and --no-disable-randomization
6523 command line arguments.
6524 * target.h (struct target_ops): Add supports_disable_randomization.
6525 (target_supports_disable_randomization): New macro.
6527 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6529 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6531 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6532 [!PT_GETDSBT] (target_loadmap): New definition.
6533 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6534 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6535 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6536 and PT_GETDSBT to LINUX_LOADMAP.
6537 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6538 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6540 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6542 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6543 (arm_linux_hwbp_cap): New static variable.
6544 (arm_linux_get_hwbp_cap): Replace by ...
6545 (arm_linux_init_hwbp_cap): ... this new function.
6546 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6547 (arm_linux_get_hw_watchpoint_count): Likewise.
6548 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6549 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6550 (arm_prepare_to_resume): Use perror_with_name instead of error.
6552 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6554 * linux-arm-low.c: Include <signal.h>.
6555 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6556 (struct arm_linux_hwbp_cap): New data type.
6557 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6558 (struct arm_linux_hw_breakpoint): New data type.
6559 (MAX_BPTS, MAX_WPTS): Define.
6560 (struct arch_process_info, struct arch_lwp_info): New data types.
6561 (arm_linux_get_hwbp_cap): New function.
6562 (arm_linux_get_hw_breakpoint_count): Likewise.
6563 (arm_linux_get_hw_watchpoint_count): Likewise.
6564 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6565 (arm_hwbp_control_initialize): Likewise.
6566 (arm_hwbp_control_is_enabled): Likewise.
6567 (arm_hwbp_control_is_initialized): Likewise.
6568 (arm_hwbp_control_disable): Likewise.
6569 (arm_linux_hw_breakpoint_equal): Likewise.
6570 (arm_linux_hw_point_initialize): Likewise.
6571 (struct update_registers_data): New data structure.
6572 (update_registers_callback: New function.
6573 (arm_insert_point): Likewise.
6574 (arm_remove_point): Likewise.
6575 (arm_stopped_by_watchpoint): Likewise.
6576 (arm_stopped_data_address): Likewise.
6577 (arm_new_process): Likewise.
6578 (arm_new_thread): Likewise.
6579 (arm_prepare_to_resume): Likewise.
6580 (the_low_target): Register arm_insert_point, arm_remove_point,
6581 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6582 arm_new_thread, and arm_prepare_to_resume.
6584 2011-09-15 Stan Shebs <stan@codesourcery.com>
6586 * server.h (struct emit_ops): Add compare-goto fields.
6587 * tracepoint.c (gdb_agent_op_sizes): New table.
6588 (emit_eq_goto): New function.
6589 (emit_ne_goto): New function.
6590 (emit_lt_goto): New function.
6591 (emit_le_goto): New function.
6592 (emit_gt_goto): New function.
6593 (emit_ge_goto): New function.
6594 (is_goto_target): New function.
6595 (compile_bytecodes): Recognize special cases of compare-goto
6596 combinations and call specialized emitters for them.
6597 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6598 (amd64_emit_ne_goto): New function.
6599 (amd64_emit_lt_goto): New function.
6600 (amd64_emit_le_goto): New function.
6601 (amd64_emit_gt_goto): New function.
6602 (amd64_emit_ge_goto): New function.
6603 (amd64_emit_ops): Add the new functions.
6604 (i386_emit_eq_goto): New function.
6605 (i386_emit_ne_goto): New function.
6606 (i386_emit_lt_goto): New function.
6607 (i386_emit_le_goto): New function.
6608 (i386_emit_gt_goto): New function.
6609 (i386_emit_ge_goto): New function.
6610 (i386_emit_ops): Add the new functions.
6612 2011-09-08 Stan Shebs <stan@codesourcery.com>
6614 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6615 (i386_emit_epilogue): Restore %ebx.
6617 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6619 * server.c (step_thread): Remove definition.
6620 (process_serial_event): Don't handle Hs.
6621 * server.h (step_thread): Remove declaration.
6622 * target.c (set_desired_inferior): Remove use of step_thread.
6624 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6626 * linux-low.c: Include linux-procfs.h.
6627 (linux_attach_lwp_1): Update comments.
6628 (linux_attach): Scan for existing threads when attaching to a
6629 process that is the tgid.
6630 * Makefile.in: Update dependencies.
6632 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6634 * configure.srv: Add linux-procfs.o dependencies.
6636 2011-08-14 Yao Qi <yao@codesourcery.com>
6638 * target.h (struct target_ops): Fix indent.
6639 * win32-low.c (win32_target_ops): Fix comment.
6641 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6642 Yao Qi <yao@codesourcery.com>
6644 * Makefile.in (clean): Remove tic6x-*.c files.
6645 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6646 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6647 (tic6x-c64xp-linux.c): Likewise.
6648 * configure.srv: Add support for tic6x-*-uclinux.
6649 * linux-tic6x-low.c: New.
6650 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6652 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6653 Yao Qi <yao@codesourcery.com>
6655 * target.h (struct target_ops): Add read_loadmap.
6656 * linux-low.c (struct target_loadseg): New type.
6657 (struct target_loadmap): New type.
6658 (linux_read_loadmap): New function.
6659 (linux_target_ops): Add linux_read_loadmap.
6660 * server.c (handle_query): Support qXfer:fdpic:read packet.
6661 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6664 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6666 * win32-low.c: Include <stdint.h>.
6668 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6670 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6671 to the inferior here.
6672 (i386_remove_aligned_watchpoint): Ditto.
6673 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6674 fit part of the watchpoint in the debug registers.
6675 (i386_update_inferior_debug_regs): New.
6676 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6677 registers, and only update the inferior on success.
6678 (i386_low_remove_watchpoint): Ditto.
6680 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6682 * linux-low.c (compare_ints, unique, list_threads, show_process,
6683 linux_core_of_thread): Delete.
6684 (linux_target_ops): Change linux_core_of_thread to
6685 linux_common_core_of_thread.
6686 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6687 * utils.c (malloc_failure): Change type of argument.
6688 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6689 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6690 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6691 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6692 (IPA_OBJS): Add common-utils-ipa.o.
6693 (ptid_h, linux_osdata_h): New macros.
6694 (server_h): Add common/common-utils.h, common/xml-utils.h,
6695 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6697 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6698 ptid.o, buffer.o): New rules.
6699 (linux-low.o): Add common/linux-osdata.h as a dependency.
6700 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6701 * configure.ac: Add AC_HEADER_DIRENT check.
6702 * config.in: Regenerate.
6703 * configure: Regenerate.
6704 * remote-utils.c (xml_escape_text): Delete.
6705 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6706 buffer_xml_printf): Move to common/buffer.c.
6707 * server.c (main): Remove call to initialize_inferiors.
6708 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6709 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6710 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6711 internal_error, gdb_assert, gdb_assert_fail): Delete.
6712 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6713 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6715 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6716 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6717 initialize_inferiors): Delete.
6719 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6721 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6724 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6726 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6728 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6730 2011-05-26 Yao Qi <yao@codesourcery.com>
6732 * Makefile.in (thread-db.o): Track dependence to
6733 common/gdb_thread_db.h.
6734 * thread-db.c: include gdb_thread_db.h from right place.
6736 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6738 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6739 __FILE__ and __LINE__ to internal_error.
6741 2011-05-13 Doug Evans <dje@google.com>
6743 * thread-db.c (try_thread_db_load_from_sdir): New function.
6744 (try_thread_db_load_from_dir): New function.
6745 (thread_db_load_search): Handle $sdir, ignore $pdir.
6746 Remove trying of system directories if search of
6747 libthread-db-search-path fails, that is now done via $sdir.
6749 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6751 * server.c (handle_query): Add EnableDisableTracepoints to the list
6752 of supported features.
6753 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6755 (cmd_qtenable_disable): New.
6756 (cmd_qtstart): Install tracepoints even if disabled.
6757 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6758 receiving a QTEnable or QTDisable packet.
6759 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6760 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6762 (gdb_probe): Skip data collection if static tracepoint is disabled.
6764 2011-05-10 Doug Evans <dje@google.com>
6766 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6768 2011-05-04 Doug Evans <dje@google.com>
6770 * linux-low.c (linux_join): Skip process lookup.
6771 * spu-low.c (spu_join): Ditto.
6772 * server.c (join_inferiors_callback): Delete.
6773 (process_serial_event): For 'D' packet (detach) call join_inferior
6776 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6778 * README: Don't mention xscale*-*-linux*.
6779 * configure.srv (xscale*-*-linux*): Don't handle target.
6781 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6783 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6785 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6786 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6787 (i386_emit_void_call_2): Likewise.
6789 2011-04-26 Yao Qi <yao@codesourcery.com>
6791 * linux-low.c: Move common macros to linux-ptrace.h.
6792 Include linux-ptrace.h.
6793 * Makefile.in (linux_ptrace_h): New.
6794 (linux-low.o): Depends on linux-ptrace.h.
6796 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6798 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6799 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6800 (remote_prepare): New function with most of the TCP code from ...
6801 (remote_open): ... here. Detect PORT here unconditionally. Move also
6802 setting transport_is_reliable.
6803 * server.c (run_once): New variable.
6804 (gdbserver_usage): Document it.
6805 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6806 the first run if RUN_ONCE.
6807 * server.h (run_once, remote_prepare): New declarations.
6809 2011-04-19 Tom Tromey <tromey@redhat.com>
6811 * win32-low.c (handle_load_dll): Remove duplicate "the".
6813 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6815 Remove support for old Cygwin 1.5 versions.
6816 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6817 function to avoid warning.
6818 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6821 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6823 * gdbserver/server.h (Macro _): Define it if not available.
6825 2011-03-14 Michael Snyder <msnyder@vmware.com>
6827 * hostio.c (handle_close): Remove unnecessary null test.
6829 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6831 * Makefile.in (maintainer-clean realclean distclean): Remove
6832 "make ... subdir_do" command.
6834 2011-03-10 Michael Snyder <msnyder@vmware.com>
6836 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6838 * server.c (handle_v_run): Free alloced buffer on early return.
6840 2011-03-09 Yao Qi <yao@codesourcery.com>
6843 2011-03-04 Yao Qi <yao@codesourcery.com>
6845 * Makefile.in: Remove GNU make feature --directory.
6847 2011-03-05 Yao Qi <yao@codesourcery.com>
6849 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6850 (subdir_do): New make target. Copied from gdb/Makefile.
6851 (maintainer-clean, realclean, distclean, clean): Call corresponding
6852 make targets in common/Makefile.
6854 2011-02-11 Yao Qi <yao@codesourcery.com>
6856 * configure.ac: Call AC_PROG_RANLIB.
6857 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6858 * configure: Regenerate.
6860 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6862 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6864 2011-03-06 Yao Qi <yao@codesourcery.com>
6866 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6868 2011-03-05 Yao Qi <yao@codesourcery.com>
6870 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6871 (subdir_do): New make target. Copied from gdb/Makefile.
6872 (maintainer-clean, realclean, distclean, clean): Call corresponding
6873 make targets in common/Makefile.
6875 2011-03-04 Yao Qi <yao@codesourcery.com>
6877 * Makefile.in: Remove GNU make feature --directory.
6879 2011-03-04 Michael Snyder <msnyder@vmware.com>
6881 * server.c (queue_stop_reply): Call xmalloc not malloc.
6883 2011-03-02 Michael Snyder <msnyder@vmware.com>
6885 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6887 2011-02-28 Michael Snyder <msnyder@vmware.com>
6889 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6890 (cmd_qtframe): Ditto.
6891 (cmd_qtbuffer): Ditto.
6892 (cmd_bigqtbuffer): Ditto.
6894 * utils.c (decimal2str): Initialize 'width' to nine, then
6897 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6899 * hostio.c (require_data): Free *data, not data.
6901 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6903 * hostio.c (require_data): Use free, not xfree.
6905 2011-02-27 Michael Snyder <msnyder@vmware.com>
6907 * server.c (handle_query): Discard unused value.
6909 * hostio.c (require_data): Free malloc memory before returning
6912 2011-02-26 Michael Snyder <msnyder@vmware.com>
6914 * linux-low.c (list_threads): Call closedir for dirent.
6916 2011-02-27 Michael Snyder <msnyder@vmware.com>
6918 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6919 a case statement falls through.
6921 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6923 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6926 2011-02-26 Michael Snyder <msnyder@vmware.com>
6928 * utils.c (decimal2str): Eliminate dead code and dead param.
6929 (pulongest): Drop dead param from call to decimal2str.
6932 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6934 Revert the following patch (not approved yet):
6935 2011-02-21 Hui Zhu <teawater@gmail.com>
6936 * tracepoint.c (tp_printf): New function.
6937 (eval_agent_expr): Handle gdb_agent_op_printf.
6939 2011-02-21 Hui Zhu <teawater@gmail.com>
6941 * tracepoint.c (tp_printf): New function.
6942 (eval_agent_expr): Handle gdb_agent_op_printf.
6944 2011-02-18 Tom Tromey <tromey@redhat.com>
6946 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6947 (tracepoint.o): Likewise.
6948 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6949 (gdb_agent_op_names): Likewise.
6951 2011-02-18 Tom Tromey <tromey@redhat.com>
6953 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6954 gdb_agent_op_rot>: New constants.
6955 (gdb_agent_op_names): Add pick and roll.
6956 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6959 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6961 * aclocal.m4: Regenerated with aclocal-1.11.1.
6963 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6965 * server.c (handle_qxfer_traceframe_info): New.
6966 (qxfer_packets): Register "traceframe-info".
6967 (handle_query): Report support for qXfer:traceframe-info:read+.
6968 * tracepoint.c (match_blocktype): New.
6969 (traceframe_find_block_type): Rename to ...
6970 (traceframe_walk_blocks): ... this. Add callback filter argument,
6972 (traceframe_find_block_type): New, reimplemented on top of
6973 traceframe_walk_blocks.
6974 (build_traceframe_info_xml): New.
6975 (traceframe_read_info): New.
6976 * server.h (traceframe_read_info): Declare.
6978 2011-02-11 Yao Qi <yao@codesourcery.com>
6980 * configure.ac: Call AC_PROG_RANLIB.
6981 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6982 * configure: Regenerate.
6984 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6986 * server.c (gdb_read_memory): Change return semantics to allow
6988 (handle_search_memory_1): Adjust.
6989 (process_serial_event) <'m' packet>: Handle partial transfers.
6990 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6992 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6994 * regcache.c (init_register_cache): Initialize
6995 regcache->register_status.
6996 (free_register_cache): Release regcache->register_status.
6997 (regcache_cpy): Copy register_status.
6998 (registers_to_string): Print 'x's for unavailable registers.
6999 (supply_register): Mark the register's status valid or
7000 unavailable, depending on whether a buffer was passed in or not.
7001 (supply_register_zeroed): New.
7002 (supply_regblock): Mark the registers' status valid or
7003 unavailable, depending on whether a buffer was passed in or not.
7004 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
7005 (struct regcache): New `register_status' field.
7006 (supply_register_zeroed): Declare.
7007 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
7008 supply_register_zeroed, rather than passing a NULL buffer to
7010 * tracepoint.c (fetch_traceframe_registers): Update comment.
7012 2011-01-28 Pedro Alves <pedro@codesourcery.com>
7014 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
7017 2011-01-25 Pedro Alves <pedro@codesourcery.com>
7019 * server.h (decode_xfer_write): Change prototype.
7020 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
7021 and don't extract the annex here.
7022 * server.c (decode_xfer_read): Remove `annex' parameter,
7023 and don't extract the annex here.
7025 (struct qxfer): New.
7026 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
7027 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
7028 (handle_qxfer_statictrace): New functions, abstracted out from
7029 handle_query, and made to use the struct qxfer interface.
7030 (handle_threads_qxfer_proper): Rename to ...
7031 (handle_qxfer_threads_proper): ... this.
7032 (handle_threads_qxfer): Rename to ...
7033 (handle_qxfer_threads): ... this. Adjust.
7034 (qxfer_packets): New array.
7035 (handle_qxfer): New function.
7036 (handle_query): Use handle_qxfer.
7038 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
7040 * gdbreplay.c: Shorten lines of >= 80 columns.
7041 * linux-low.c: Ditto.
7042 * linux-ppc-low.c: Ditto.
7043 * linux-s390-low.c: Ditto.
7044 * linux-sparc-low.c: Ditto.
7045 * linux-x86-low.c: Ditto.
7046 * linux-xtensa-low.c: Ditto.
7047 * mem-break.c: Ditto.
7049 * regcache.h: Ditto.
7050 * remote-utils.c: Ditto.
7053 * thread-db.c: Ditto.
7054 * tracepoint.c: Ditto.
7056 * win32-low.h: Ditto.
7058 2011-01-05 Joel Brobecker <brobecker@adacore.com>
7060 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
7063 2011-01-01 Joel Brobecker <brobecker@adacore.com>
7065 * server.c (gdbserver_version): Update copyright year in version
7067 * gdbreplay.c (gdbreplay_version): Ditto.
7069 2010-12-29 Jie Zhang <jie.zhang@analog.com>
7071 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
7072 * linux-bfin-low.c: New file.
7073 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
7074 PT_DATA_ADDR for BFIN targets.
7075 * Makefile.in (SFILES): Add linux-bfin-low.c.
7076 (clean): Remove reg-bfin.c.
7077 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
7078 * README: Mention supported Blackfin targets.
7080 2010-12-23 Mike Frysinger <vapier@gentoo.org>
7082 * .gitignore: New file.
7084 2010-11-16 Mike Frysinger <vapier@gentoo.org>
7086 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
7088 2010-10-22 Jie Zhang <jie@codesourcery.com>
7090 * Makefile.in: Add FLAGS_TO_PASS variable.
7091 (install): Remove dependency of install-only and recursively
7092 invoke make for install-only.
7094 2010-10-04 Doug Evans <dje@google.com>
7096 * Makefile.in (uninstall): Use $(DESTDIR).
7098 2010-09-24 Pedro Alves <pedro@codesourcery.com>
7102 * linux-x86-low.c (compat_siginfo_from_siginfo)
7103 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
7104 si_code is < 0. Check for si_code == SI_TIMER before checking for
7107 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7109 * lynx-i386-low.c: New file.
7110 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
7112 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7114 * lynx-low.c (ptrace_request_to_str): Remove handling for
7115 request values that have been removed in LynxOS 5.x.
7117 2010-09-13 Joel Brobecker <brobecker@adacore.com>
7119 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
7122 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
7124 * configure.ac: Add --enable-inprocess-agent option.
7125 * configure: Rebuilt.
7127 2010-09-06 Yao Qi <yao@codesourcery.com>
7129 * linux-low.c (linux_kill): Remove unused variable.
7130 (linux_stabilize_threads): Likewise.
7131 * server.c (start_inferior): Likewise.
7132 (queue_stop_reply_callback): Likewise.
7133 * tracepoint.c (do_action_at_tracepoint): Likewise.
7135 2010-09-06 Yao Qi <yao@codesourcery.com>
7137 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
7140 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
7142 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
7144 2010-09-06 Pedro Alves <pedro@codesourcery.com>
7146 * Makefile.in (install-only): Replace $IPA_DEPFILES with
7149 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7151 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
7152 gdbserver/lynx-ppc-low.c: New files.
7153 * Makefile.in (lynx_low_h): New variable.
7154 (lynx-low.o, lynx-ppc-low.o): New rules.
7155 * configure.ac: On LynxOS, link with -lnetinet.
7156 * configure.srv: Add handling of powerpc-*-lynxos* targets.
7157 * configure: regenerate.
7159 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7161 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
7162 * configure.ac: Add check for vasprintf and vsnprintf.
7163 * configure, config.in: Regenerate.
7164 * server.h (vasprintf, vsnprintf): Add conditional declarations.
7166 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7168 * gdbreplay.c: Move include of alloca.h up, next to include of
7170 * server.h: Add include of malloc.h.
7171 * mem-break.c: Remove include of malloc.h.
7172 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
7174 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7176 * Makefile.in (memmem.o): Build with -Wno-error.
7178 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7180 * utils.c (xsnprintf): Make non-static.
7181 * server.h: Add xsnprintf declaration.
7182 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
7183 replace calls to snprintf by calls to xsnprintf throughout.
7185 2010-09-01 Joel Brobecker <brobecker@adacore.com>
7187 * configure.ac: Add configure check for alloca.
7188 * configure, config.in: Regenerate.
7189 * server.h: Include alloca.h if it exists.
7190 * gdbreplay.c: Include alloca.h if it exists.
7192 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7194 * linux-low.c (__SIGRTMIN): Define if not already defined.
7195 (linux_create_inferior): Check for __ANDROID__ rather than
7197 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
7198 are already deferred.
7199 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
7200 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
7201 stopped and already has a pending signal to report.
7202 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
7203 a pending signal to report or is moving out of a jump pad.
7204 (linux_init_signals): Check for __ANDROID__ rather than
7207 2010-08-28 Pedro Alves <pedro@codesourcery.com>
7209 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
7210 debug_threads check. Avoid a linear search when not doing debug
7213 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7215 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
7216 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
7217 (struct file_handler) <fd>: Change type to gdb_fildes_t.
7218 (process_event): Change local fd's type to gdb_fildes_t.
7219 (create_file_handler): Adjust prototype.
7220 (delete_file_handler): Adjust prototype.
7221 (handle_file_event): Adjust prototype. Use pfildes.
7222 (create_file_event): Adjsut prototype.
7223 * remote-utils.c (remote_desc, listen_desc): Change type to
7225 * server.h: New gdb_fildes_t typedef.
7226 [USE_WIN32API]: Include winsock2.h.
7227 (delete_file_handler, add_file_handler): Adjust prototypes.
7229 * utils.c (pfildes): New.
7231 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7233 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7234 * configure: Regenerate.
7236 2010-08-27 Pedro Alves <pedro@codesourcery.com>
7238 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7239 (linux_done_accessing_memory): ... this.
7240 (linux_target_ops): Adjust.
7241 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7242 * nto-low.c (nto_target_ops): Adjust comment.
7243 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7244 * spu-low.c (spu_target_ops): Adjust comment.
7245 * target.h (target_ops): Rename unprepare_to_access_memory field
7246 to done_accessing_memory.
7247 (unprepare_to_access_memory): Rename to ...
7248 (done_accessing_memory): ... this.
7250 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7252 * linux-low.c (linux_prepare_to_access_memory): New.
7253 (linux_unprepare_to_access_memory): New.
7254 (linux_target_ops): Install them.
7255 * server.c (read_memory): Rename to ...
7256 (gdb_read_memory): ... this. Use
7257 prepare_to_access_memory/prepare_to_access_memory.
7258 (write_memory): Rename to ...
7259 (gdb_write_memory): ... this. Use
7260 prepare_to_access_memory/prepare_to_access_memory.
7261 (handle_search_memory_1): Adjust.
7262 (process_serial_event): Adjust.
7263 * target.h (struct target_ops): New fields
7264 prepare_to_access_memory and unprepare_to_access_memory.
7265 (prepare_to_access_memory, unprepare_to_access_memory): New.
7266 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7267 prepare_to_access_memory/prepare_to_access_memory.
7268 * nto-low.c (nto_target_ops): Adjust.
7269 * spu-low.c (spu_target_ops): Adjust.
7270 * win32-low.c (win32_target_ops): Adjust.
7272 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7274 * Makefile.in (WARN_CFLAGS): Get it from configure.
7275 (WERROR_CFLAGS): New.
7276 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7277 * configure.ac: Introduce --enable-werror, which adds -Werror to
7278 the compiler command line. Enabled by default. Disable with
7279 --disable-werror. Add -Wdeclaration-after-statement
7280 Wpointer-arith and -Wformat-nonliteral to warning flags.
7281 * configure: Regenerate.
7283 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7285 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7287 2010-08-26 Pedro Alves <pedro@codesourcery.com>
7289 * gdbreplay.c (remote_error): New.
7291 (expect): Use gdbchar. Check for error reading from GDB.
7292 Clarify sync error output.
7293 (play): Check for errors writing to GDB.
7294 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7295 * remote-utils.c (getpkt): Check for errors writing to the remote
7298 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7300 * linux-low.c (linux_wait_1): Move non-debugging code out of
7301 `debug_threads' control.
7303 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7305 * linux-low.c (linux_wait_1): Don't set last_status here.
7306 * server.c (push_event, queue_stop_reply_callback): Assert we're
7307 not pushing a TARGET_WAITKIND_IGNORE event.
7308 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7309 (myresume, handle_target_event): Set the thread's last_resume_kind
7310 and last_status from the target returned status.
7312 2010-08-25 Pedro Alves <pedro@codesourcery.com>
7316 * linux-x86-low.c (update_debug_registers_callback): New.
7317 (i386_dr_low_set_addr): Use it.
7318 (i386_dr_low_get_addr): New.
7319 (i386_dr_low_set_control): Use update_debug_registers_callback.
7320 (i386_dr_low_get_control): New.
7321 (i386_dr_low_get_status): Adjust.
7322 * linux-low.c (linux_stop_lwp): New.
7323 * linux-low.h (linux_stop_lwp): Declare.
7325 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7326 argument instead of a i386_debug_reg_state.
7327 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7328 a i386_debug_reg_state.
7329 (i386_insert_aligned_watchpoint): Adjust.
7330 (i386_remove_aligned_watchpoint): Adjust.
7331 (i386_low_stopped_data_address): Read the debug registers from the
7332 inferior instead of from the mirrors.
7333 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7334 (i386_dr_low_get_addr): Declare.
7335 (i386_dr_low_get_control): Declare.
7336 (i386_dr_low_get_status): Change prototype.
7338 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7339 (i386_dr_low_get_addr): New.
7340 (i386_dr_low_get_control): New.
7341 (i386_dr_low_get_status): Adjust prototype. Return
7343 (i386_initial_stuff): Clear dr_status_mirror and
7345 (i386_get_thread_context): Adjust.
7346 (i386_set_thread_context): Adjust.
7347 (i386_thread_added): Adjust.
7349 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7351 * linux-low.h (linux_thread_area): Delete declaration.
7353 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7355 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7356 after its termination.
7358 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7360 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7361 (gdb_wants_all_stopped): Delete.
7362 (linux_wait_1): Don't call them.
7363 * server.c (handle_v_cont): Tag all threads as want-stopped.
7364 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7365 stopped as "client-wants-stopped".
7367 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7369 * Makefile.in (signals_h): New.
7370 (server_h): Depend on it.
7371 (server.o): Don't depend on $(signals_def).
7372 (signals.o): Depend on $(signals_def).
7374 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7376 * Makefile.in (signals_def): New.
7377 (server_h): Append include/gdb/signals.h and signals_def.
7378 (server.o): Append signals_def.
7380 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7382 * server.c (handle_target_event): Use target_signal_to_host for
7383 resume_info.sig initialization.
7384 * target.h (struct thread_resume) <sig>: New comment.
7386 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7388 * server.c (handle_query): strcpy() the returned string from paddress()
7389 instead of sprintf().
7390 * utils.c (paddress): Return phex_nz().
7392 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7394 * server.c (handle_v_cont): Call mourn_inferior if process
7396 (myresume): Likewise.
7398 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7400 Static tracepoints, and integration with UST.
7402 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7403 * mem-break.c (uninsert_all_breakpoints)
7404 (reinsert_all_breakpoints): New.
7405 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7406 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7407 (gdb_agent_ust_loaded, helper_thread_id)
7408 (gdb_agent_helper_thread_id): New macros.
7409 (struct ipa_sym_addresses): Add addr_ust_loaded,
7410 addr_helper_thread_id, addr_cmd_buf.
7411 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7412 (in_process_agent_loaded_ust): New.
7413 (write_e_ust_not_loaded): New.
7414 (maybe_write_ipa_ust_not_loaded): New.
7415 (struct collect_static_trace_data_action): New.
7416 (enum tracepoint_type) <static_tracepoint>: New.
7417 (struct tracepoint) <handle>: Mention static tracepoints.
7418 (struct static_tracepoint_ctx): New.
7419 (CMD_BUF_SIZE): New.
7420 (add_tracepoint_action): Handle static tracepoint actions.
7421 (unprobe_marker_at): New.
7422 (clear_installed_tracepoints): Handle static tracepoints.
7423 (cmd_qtdp): Handle static tracepoints.
7424 (probe_marker_at): New.
7425 (cmd_qtstart): Handle static tracepoints.
7426 (response_tracepoint): Handle static tracepoints.
7427 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7428 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7429 (get_context_regcache): Handle static tracepoints.
7430 (do_action_at_tracepoint): Handle static tracepoint actions.
7431 (traceframe_find_block_type): Handle static trace data blocks.
7432 (traceframe_read_sdata): New.
7433 (download_tracepoints): Download static tracepoint actions.
7434 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7435 (GDB_PROBE_NAME): New.
7440 (ust_marker_to_static_tracepoint): New.
7442 (collect_ust_data_at_tracepoint): New.
7443 (gdb_ust_probe): New.
7444 (UNIX_PATH_MAX, SOCK_DIR): New.
7445 (gdb_ust_connect_sync_socket): New.
7446 (resume_thread, stop_thread): New.
7447 (run_inferior_command): New.
7448 (init_named_socket): New.
7449 (gdb_ust_socket_init): New.
7450 (cstr_to_hexstr): New.
7452 (first_marker, next_marker): New.
7453 (response_ust_marker): New.
7454 (cmd_qtfstm, cmd_qtsstm): New.
7455 (unprobe_marker_at, probe_marker_at): New.
7456 (cmd_qtstmat, gdb_ust_thread): New.
7457 (gdb_ust_init): New.
7458 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7459 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7461 (x86_64_st_collect_regmap): New.
7462 (X86_64_NUM_ST_COLLECT_GREGS): New.
7463 (AMD64_RIP_REGNUM): New.
7464 (supply_static_tracepoint_registers): New.
7465 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7467 (i386_st_collect_regmap): New.
7468 (i386_NUM_ST_COLLECT_GREGS): New.
7469 (supply_static_tracepoint_registers): New.
7470 * server.c (handle_query): Handle qXfer:statictrace:read.
7471 <qSupported>: Report support for StaticTracepoints, and
7472 qXfer:statictrace:read features.
7473 * server.h (traceframe_read_sdata)
7474 (supply_static_tracepoint_registers): Declare.
7475 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7476 (unpack_varlen_hex): Include in IPA build.
7477 * Makefile.in (ustlibs, ustinc): New.
7478 (IPA_OBJS): Add remote-utils-ipa.o.
7479 ($(IPA_LIB)): Link -ldl and -lpthread.
7481 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7482 * config.in, configure: Regenerate.
7484 2010-06-20 Ian Lance Taylor <iant@google.com>
7485 Pedro Alves <pedro@codesourcery.com>
7487 * linux-x86-low.c (always_true): Delete.
7488 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7489 trying to fool the compiler with always_true.
7491 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7493 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7494 conditions in gdbserver.
7496 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7498 * spu-low.c (spu_read_memory): Wrap around local store limit.
7499 (spu_write_memory): Likewise.
7501 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7503 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7504 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7506 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7508 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7509 uses with LONGEST uses.
7511 2010-06-14 Stan Shebs <stan@codesourcery.com>
7512 Pedro Alves <pedro@codesourcery.com>
7516 * linux-x86-low.c: Include limits.h.
7521 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7522 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7523 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7524 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7525 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7526 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7527 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7528 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7529 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7530 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7531 (amd64_emit_void_call_2): New.
7532 (amd64_emit_ops): New.
7533 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7534 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7535 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7536 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7537 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7538 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7539 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7540 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7541 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7542 (i386_emit_stack_adjust, i386_emit_int_call_1)
7543 (i386_emit_void_call_2): New.
7544 (i386_emit_ops): New.
7545 (x86_emit_ops): New.
7546 (the_low_target): Install x86_emit_ops.
7547 * server.h (struct emit_ops): New.
7548 (get_raw_reg_func_addr): Declare.
7549 (current_insn_ptr, emit_error): Declare.
7550 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7551 (set_trace_state_variable_value): New defines.
7552 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7553 addr_get_trace_state_variable_value and
7554 addr_set_trace_state_variable_value.
7555 (symbol_list): New fields for get_raw_reg,
7556 get_trace_state_variable_value and set_trace_state_variable_value.
7557 (condfn): New typedef.
7558 (struct tracepoint): New field `compiled_cond'.
7559 (do_action_at_tracepoint): Clear compiled_cond.
7560 (get_trace_state_variable_value, set_trace_state_variable_value):
7562 (condition_true_at_tracepoint): If there's a compiled condition,
7564 (current_insn_ptr, emit_error): New globals.
7565 (struct bytecode_address): New.
7566 (get_raw_reg_func_addr): New.
7567 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7568 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7569 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7570 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7571 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7572 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7573 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7574 (compile_tracepoint_condition, compile_bytecodes): New.
7575 * target.h (emit_ops): Forward declare.
7576 (struct target_ops): New field emit_ops.
7577 (target_emit_ops): New.
7578 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7579 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7580 * linux-low.c (linux_emit_ops): New.
7581 (linux_target_ops): Install it.
7582 * linux-low.h (struct linux_target_ops): New field emit_ops.
7584 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7586 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7587 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7589 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7590 Stan Shebs <stan@codesourcery.com>
7592 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7593 (all): Depend on $(extra_libraries).
7594 (install-only): Install the IPA.
7595 (IPA_OBJS, IPA_LIB): New.
7596 (clean): Remove the IPA lib.
7597 (IPAGENT_CFLAGS): New.
7598 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7599 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7600 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7601 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7602 * configure.ac: Check for atomic builtins support in the compiler.
7603 (IPA_DEPFILES, extra_libraries): Define.
7604 * configure.srv (ipa_obj): Add description.
7605 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7606 (i[34567]86-*-linux*): Set ipa_obj.
7607 (x86_64-*-linux*): Set ipa_obj.
7608 * linux-low.c (stabilizing_threads): New.
7609 (supports_fast_tracepoints): New.
7610 (linux_detach): Stabilize threads before detaching.
7611 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7612 the lwp is either not stabilizing, or is moving out of a jump pad.
7613 (linux_fast_tracepoint_collecting): New.
7614 (maybe_move_out_of_jump_pad): New.
7615 (enqueue_one_deferred_signal): New.
7616 (dequeue_one_deferred_signal): New.
7617 (linux_wait_for_event_1): If moving out of a jump pad, defer
7618 pending signals to later.
7619 (linux_stabilize_threads): New.
7620 (linux_wait_1): Check if threads need moving out of jump pads, and
7622 (stuck_in_jump_pad_callback): New.
7623 (move_out_of_jump_pad_callback): New.
7625 (linux_resume_one_lwp): Handle moving out of jump pads.
7626 (linux_set_resume_request): Dequeue deferred signals.
7627 (need_step_over_p): Also step over fast tracepoint jumps.
7628 (start_step_over): Also uninsert fast tracepoint jumps.
7629 (finish_step_over): Also reinsert fast tracepoint jumps.
7630 (linux_install_fast_tracepoint_jump): New.
7631 (linux_target_ops): Install linux_stabilize_threads and
7632 linux_install_fast_tracepoint_jump_pad.
7633 * linux-low.h (linux_target_ops) <get_thread_area,
7634 install_fast_tracepoint_jump_pad>: New fields.
7635 (struct lwp_info) <collecting_fast_tracepoint,
7636 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7637 (linux_get_thread_area): Declare.
7638 * linux-x86-low.c (jump_insn): New.
7639 (x86_get_thread_area): New.
7640 (append_insns): New.
7642 (amd64_install_fast_tracepoint_jump_pad): New.
7643 (i386_install_fast_tracepoint_jump_pad): New.
7644 (x86_install_fast_tracepoint_jump_pad): New.
7645 (the_low_target): Install x86_get_thread_area and
7646 x86_install_fast_tracepoint_jump_pad.
7647 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7648 (struct fast_tracepoint_jump): New.
7649 (fast_tracepoint_jump_insn): New.
7650 (fast_tracepoint_jump_shadow): New.
7651 (find_fast_tracepoint_jump_at): New.
7652 (fast_tracepoint_jump_here): New.
7653 (delete_fast_tracepoint_jump): New.
7654 (set_fast_tracepoint_jump): New.
7655 (uninsert_fast_tracepoint_jumps_at): New.
7656 (reinsert_fast_tracepoint_jumps_at): New.
7657 (set_breakpoint_at): Use write_inferior_memory.
7658 (uninsert_raw_breakpoint): Use write_inferior_memory.
7659 (check_mem_read): Mask out fast tracepoint jumps.
7660 (check_mem_write): Mask out fast tracepoint jumps.
7661 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7662 (set_fast_tracepoint_jump): Declare.
7663 (delete_fast_tracepoint_jump)
7664 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7665 (reinsert_fast_tracepoint_jumps_at): Declare.
7666 * regcache.c: Don't compile many functions when building the
7667 in-process agent library.
7668 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7669 the register buffer in the heap.
7670 (free_register_cache): If the register buffer isn't owned by the
7671 regcache, don't free it.
7672 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7673 pre-existing register caches.
7674 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7676 (convert_ascii_to_int): : Constify `from' parameter type.
7677 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7678 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7679 the needed buffer in-place.
7680 (relocate_instruction): New.
7681 * server.c (handle_query) <qSymbols>: If the target supports
7682 tracepoints, give it a chance of looking up symbols. Report
7683 support for fast tracepoints.
7684 (handle_status): Stabilize threads.
7685 (process_serial_event): Adjust.
7686 * server.h (struct fast_tracepoint_jump): Forward declare.
7687 (struct process_info) <fast_tracepoint_jumps>: New field.
7688 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7689 (decode_X_packet, decode_M_packet): Adjust.
7690 (relocate_instruction): Declare.
7691 (in_process_agent_loaded): Declare.
7692 (tracepoint_look_up_symbols): Declare.
7693 (struct fast_tpoint_collect_status): Declare.
7694 (fast_tracepoint_collecting): Declare.
7695 (force_unlock_trace_buffer): Declare.
7696 (handle_tracepoint_bkpts): Declare.
7697 (initialize_low_tracepoint)
7698 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7699 * target.h (struct target_ops) <stabilize_threads,
7700 install_fast_tracepoint_jump_pad>: New fields.
7701 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7702 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7703 [HAVE_STDINT_H]: Include stdint.h.
7704 (trace_debug_1): Rename to ...
7705 (trace_vdebug): ... this.
7706 (trace_debug): Rename to ...
7707 (trace_debug_1): ... this. Add `level' parameter.
7709 (ATTR_USED, ATTR_NOINLINE): New.
7710 (IP_AGENT_EXPORT): New.
7711 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7712 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7713 (about_to_request_buffer_space, trace_buffer_is_full)
7714 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7715 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7716 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7717 (traceframe_write_count, traceframes_created)
7718 (trace_state_variables)
7719 New renaming defines.
7720 (struct ipa_sym_addresses): New.
7721 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7723 (ipa_sym_addrs): New.
7724 (all_tracepoint_symbols_looked_up): New.
7725 (in_process_agent_loaded): New.
7726 (write_e_ipa_not_loaded): New.
7727 (maybe_write_ipa_not_loaded): New.
7728 (tracepoint_look_up_symbols): New.
7729 (debug_threads) [IN_PROCESS_AGENT]: New.
7730 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7731 (UNKNOWN_SIDE_EFFECTS): New.
7732 (stop_tracing): New.
7733 (flush_trace_buffer): New.
7734 (stop_tracing_bkpt): New.
7735 (flush_trace_buffer_bkpt): New.
7736 (read_inferior_integer): New.
7737 (read_inferior_uinteger): New.
7738 (read_inferior_data_pointer): New.
7739 (write_inferior_data_pointer): New.
7740 (write_inferior_integer): New.
7741 (write_inferior_uinteger): New.
7742 (struct collect_static_trace_data_action): Delete.
7743 (enum tracepoint_type): New.
7744 (struct tracepoint) <type>: New field `type'.
7745 <actions_str, step_actions, step_actions_str>: Only include in
7747 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7748 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7749 (tracepoints): Use IP_AGENT_EXPORT.
7750 (last_tracepoint): Don't include in the IPA.
7751 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7752 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7753 (alloced_trace_state_variables): New.
7754 (trace_state_variables): Use IP_AGENT_EXPORT.
7755 (traceframe_t): Delete unused variable.
7756 (circular_trace_buffer): Don't include in the IPA.
7757 (trace_buffer_start): Delete.
7758 (struct trace_buffer_control): New.
7759 (trace_buffer_free): Delete.
7760 (struct ipa_trace_buffer_control): New.
7761 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7762 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7764 (trace_buffer_ctrl): New.
7765 (TRACE_BUFFER_CTRL_CURR): New.
7766 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7767 Reimplement as macros.
7768 (trace_buffer_wrap): Delete.
7769 (traceframe_write_count, traceframe_read_count)
7770 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7771 (struct tracepoint_hit_ctx) <type>: New field.
7772 (struct fast_tracepoint_ctx): New.
7773 (memory_barrier): New.
7775 (record_tracepoint_error): Update atomically in the IPA.
7776 (clear_inferior_trace_buffer): New.
7777 (about_to_request_buffer_space): New.
7778 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7779 updating the same buffer.
7780 (add_tracepoint): Default the tracepoint's type to trap
7781 tracepoint, and orig_size to -1.
7782 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7784 (create_trace_state_variable): New parameter `gdb'. Handle it.
7785 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7786 (cmd_qtdp): Handle fast tracepoints.
7788 (max_jump_pad_size): New.
7789 (gdb_jump_pad_head): New.
7790 (get_jump_space_head): New.
7791 (claim_jump_space): New.
7792 (sort_tracepoints): New.
7793 (MAX_JUMP_SIZE): New.
7794 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7796 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7797 support. Upload fast traceframes, and delete internal IPA
7799 (stop_tracing_handler): New.
7800 (flush_trace_buffer_handler): New.
7801 (cmd_qtstop): Upload fast tracepoints.
7802 (response_tracepoint): Handle fast tracepoints.
7803 (tracepoint_finished_step): Upload fast traceframes. Set the
7804 tracepoint hit context's tracepoint type.
7805 (handle_tracepoint_bkpts): New.
7806 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7807 type. Add comment about fast tracepoints.
7808 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7809 non-existing action_str field.
7810 (get_context_regcache): Handle fast tracepoints.
7811 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7813 (fast_tracepoint_from_jump_pad_address): New.
7814 (fast_tracepoint_from_ipa_tpoint_address): New.
7815 (collecting_t): New.
7816 (force_unlock_trace_buffer): New.
7817 (fast_tracepoint_collecting): New.
7820 (write_inferior_data_ptr): New.
7821 (target_tp_heap): New.
7822 (target_malloc): New.
7823 (download_agent_expr): New.
7825 (download_tracepoints): New.
7826 (download_trace_state_variables): New.
7827 (upload_fast_traceframes): New.
7828 (IPA_FIRST_TRACEFRAME): New.
7829 (IPA_NEXT_TRACEFRAME_1): New.
7830 (IPA_NEXT_TRACEFRAME): New.
7831 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7832 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7833 (gdb_jump_pad_buffer_end): New.
7834 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7835 (initialize_tracepoint): Adjust.
7836 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7837 buffer. Initialize the low module.
7838 * utils.c (PREFIX, TOOLNAME): New.
7839 (malloc_failure): Use PREFIX.
7840 (error): In the IPA, an error causes an exit.
7841 (fatal, warning): Use PREFIX.
7842 (internal_error): Use TOOLNAME.
7843 (NUMCELLS): Increase to 10.
7844 * configure, config.in: Regenerate.
7846 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7848 * server.c (handle_query) <qSupported>: Do two passes over the
7849 qSupported string to avoid nesting strtok.
7851 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7853 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7855 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7857 * configure: Regenerate.
7858 * proc-service.list: New.
7860 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7862 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7865 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7867 * gdbreplay.c (remote_open): Check error return from socket() call by
7868 its equality to -1 not by it being negative.
7869 * remote-utils.c (remote_open): Likewise.
7871 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7873 * config.h: Regenerate.
7875 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7877 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7878 doesn't provide PTRACE_GET_THREAD_AREA.
7880 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7882 * linux-m68k-low.c: Include <asm/ptrace.h>
7883 (ps_get_thread_area): Implement.
7885 2010-05-03 Doug Evans <dje@google.com>
7887 * event-loop.c (struct callback_event): New struct.
7888 (callback_list): New global.
7889 (append_callback_event, delete_callback_event): New functions.
7890 (process_callback): New function.
7891 (start_event_loop): Call it.
7892 * remote-utils.c (NOT_SCHEDULED): Define.
7893 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7894 moved out of readchar.
7895 (readchar): Rewrite. Call reschedule before returning.
7896 (reset_readchar): New function.
7897 (remote_close): Call it.
7898 (process_remaining, reschedule): New functions.
7899 * server.h (callback_handler_func): New typedef.
7900 (append_callback_event, delete_callback_event): Declare.
7902 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7904 * proc-service.c (ps_pglobal_lookup): Use
7905 thread_db_look_up_one_symbol.
7906 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7907 parameter. Use it instead of all_symbols_looked_up.
7908 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7910 (all_symbols_looked_up): Don't declare.
7911 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7912 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7914 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7915 Set all_symbols_looked_up here.
7916 (thread_db_look_up_one_symbol): New.
7917 (thread_db_get_tls_address): Adjust.
7918 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7919 thread_db object on the heap, and tentatively set it in the
7921 (thread_db_init): Don't set all_symbols_looked_up here.
7922 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7924 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7926 * linux-low.c (linux_kill, linux_detach): Adjust.
7927 (status_pending_p_callback): Remove redundant statement. Check
7928 for !TARGET_WAITIKIND_IGNORE, instead of
7929 TARGET_WAITKIND_STOPPED.
7930 (handle_tracepoints): Make sure LWP is locked. Adjust.
7931 (linux_wait_for_event_1): Adjust.
7932 (linux_cancel_breakpoints): New.
7933 (unsuspend_one_lwp): New.
7934 (unsuspend_all_lwps): New.
7935 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7936 (send_sigstop_callback): Change return type to int, add new
7937 `except' parameter and handle it.
7938 (suspend_and_send_sigstop_callback): New.
7939 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7940 pass them down. If SUSPEND, also increment the lwp's suspend
7942 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7943 (need_step_over_p): Don't consider suspended LWPs.
7944 (start_step_over): Adjust.
7945 (proceed_one_lwp): Change return type to int, add new `except'
7946 parameter and handle it.
7947 (unsuspend_and_proceed_one_lwp): New.
7948 (proceed_all_lwps): Use find_inferior instead of
7950 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7951 also decrement the suspend count of LWPs. Pass `except' down,
7952 instead of hacking its suspend count.
7953 (linux_pause_all): Add `freeze' parameter. Adjust.
7954 (linux_unpause_all): New.
7955 (linux_target_ops): Install linux_unpause_all.
7956 * server.c (handle_status): Adjust.
7957 * target.h (struct target_ops): New fields `unpause_all' and
7958 `cancel_breakpoints'. Add new parameter to `pause_all'.
7959 (pause_all): Add new `freeze' parameter.
7961 (cancel_breakpoints): New.
7962 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7964 (cmd_qtstart): Pause threads.
7965 (stop_tracing): Pause threads, and cancel breakpoints.
7966 * win32-low.c (win32_target_ops): Adjust.
7968 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7970 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7971 the inferior right away from here...
7972 (linux_wait_1): ... to here, and adjust to check the thread's
7973 last_resume_kind instead of the lwp's step or stop_expected flags.
7975 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7977 * README: Use consistent `GDB' and `GDBserver' spellings.
7979 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7981 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7982 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7983 (linux_detach_one_lwp): Assume the lwp is stopped.
7984 (any_thread_of): Delete.
7985 (linux_detach): Stop all lwps here. Don't blindly delete all
7987 (delete_lwp_callback): New.
7988 (linux_mourn): Delete all lwps of the process that is gone.
7989 (linux_wait_1): Don't delete the last lwp of the process here.
7990 * mem-break.h (mark_breakpoints_out): Declare.
7991 * mem-break.c (mark_breakpoints_out): New.
7992 (free_all_breakpoints): Use it.
7993 * server.c (handle_target_event): If the process is gone, mark
7995 * thread-db.c (struct thread_db) <create_bp>: New field.
7996 (thread_db_enable_reporting): Fix prototype. Store a thread event
7997 breakpoint reference in the thread_db struct.
7998 (thread_db_load_search): Clear the thread_db object.
7999 (try_thread_db_load_1): Ditto.
8000 (switch_to_process): New.
8001 (disable_thread_event_reporting): Use it.
8002 (remove_thread_event_breakpoints): New.
8003 (thread_db_detach, thread_db_mourn): Use it.
8005 2010-05-01 Pedro Alves <pedro@codesourcery.com>
8007 * linux-low.c (linux_enable_event_reporting): New.
8008 (linux_wait_for_event_1, handle_extended_wait): Use it.
8010 2010-04-30 Pedro Alves <pedro@codesourcery.com>
8012 * linux-low.c (linux_kill_one_lwp, linux_kill)
8013 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
8014 (send_sigstop): Take an lwp_info as parameter instead. Queue a
8015 SIGSTOP even if the LWP is stopped.
8016 (send_sigstop_callback): New.
8017 (stop_all_lwps): Use send_sigstop_callback instead.
8018 (linux_resume_one_thread): Adjust.
8019 (proceed_one_lwp): Still proceed an LWP that the client has
8020 requested to stop, if we haven't reported it as stopped yet. Make
8021 sure that LWPs the client want stopped, have a pending SIGSTOP.
8023 2010-04-26 Doug Evans <dje@google.com>
8025 * server.c (handle_general_set): Make static.
8027 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
8028 Print received char after testing for error/eof instead of before.
8029 (input_interrupt): Tweak comment.
8031 2010-04-23 Doug Evans <dje@google.com>
8033 * server.c (start_inferior): Print inferior argv if --debug.
8035 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
8037 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
8038 * nto-x86-low.c: Include server.h
8040 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
8042 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
8043 be consistent with other sources of this directory.
8044 (init_registers_amd64): Correct name of source file of this function
8047 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8049 * configure.srv (x86_64-*-mingw*): New configuration for Windows
8052 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8054 * win32-i386-low.c: Add 64-bit support.
8055 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
8056 (init_registers_amd64): Declare.
8057 (mappings): Add 64-bit version of array.
8058 (init_windows_x86): New function.
8059 (the_low_target): Change init_arch field to init_windows_x86.
8061 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8063 * win32-low.c: Adapt to support also 64-bit architecture.
8064 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
8065 (get_image_name): Use SIZE_T type for local variable `done'.
8066 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
8067 (toolhelp_get_dll_name): Idem.
8068 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
8069 Use uintptr_t typecast to avoid warning.
8070 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
8071 (handle_exception): Use phex_nz to avoid warning.
8072 (win32_wait): Remove unused local variable `process'.
8074 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
8076 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
8079 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
8081 * configure.ac: Use `ws2_32' library for srv_mingw.
8082 * configure: Regenerate.
8083 * gdbreplay.c: Include winsock2.h instead of winsock.h.
8084 * remote-utils.c: Likewise.
8086 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
8088 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
8089 if __x86_64__ is defined.
8091 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8093 * configure: Regenerate.
8095 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
8097 * server.c (handle_query): Handle 'qGetTIBAddr' query.
8098 * target.h (target_ops): New get_tib_address field.
8099 * win32-low.h (win32_thread_info): Add thread_local_base field.
8100 * win32-low.c (child_add_thread): Add tlb argument.
8101 Set thread_local_base field to TLB.
8102 (get_child_debug_event): Adapt to child_add_thread change.
8103 (win32_get_tib_address): New function.
8104 (win32_target_ops): Set get_tib_address field to
8105 win32_get_tib_address.
8106 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
8108 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8110 * linux-low.c (linux_mourn): Also remove the process.
8111 * server.c (handle_target_event): Don't remove the process here.
8112 * nto-low.c (nto_mourn): New.
8113 (nto_target_ops): Install it.
8114 * spu-low.c (spu_mourn): New.
8115 (spu_target_ops): Install it.
8116 * win32-low.c (win32_mourn): New.
8117 (win32_target_ops): Install it.
8119 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8121 * server.h (buffer_xml_printf): Remove redundant `;'.
8123 2010-04-12 Pedro Alves <pedro@codesourcery.com>
8125 * regcache.c (set_register_cache): Invalidate regcaches before
8126 changing the register cache layout.
8127 (regcache_invalidate_one): Allow a NULL regcache.
8128 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
8129 regcaches before changing the register cache layout or the target
8132 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
8134 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
8135 variable warning on Linux/x86-64.
8137 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8139 GDBserver disconnected tracing support.
8141 * linux-low.c (linux_remove_process): Delete.
8142 (add_lwp): Don't set last_resume_kind here.
8143 (linux_kill): Use `mourn'.
8144 (linux_detach): Use `thread_db_detach', and `mourn'.
8146 (linux_attach_lwp_1): Adjust comment.
8147 (linux_attach): last_resume_kind moved the thread_info; adjust.
8148 (status_pending_p_callback): Adjust.
8149 (linux_wait_for_event_1): Adjust.
8150 (count_events_callback, select_singlestep_lwp_callback)
8151 (select_event_lwp_callback, cancel_breakpoints_callback)
8152 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
8153 (proceed_one_lwp): Adjust.
8154 (linux_async): Add debug output.
8155 (linux_thread_stopped): New.
8156 (linux_pause_all): New.
8157 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
8159 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
8160 (thread_db_free): Delete declaration.
8161 (thread_db_detach, thread_db_mourn): Declare.
8162 * thread-db.c (thread_db_init): Use thread_db_mourn.
8163 (thread_db_free): Delete, split in two.
8164 (disable_thread_event_reporting): New.
8165 (thread_db_detach): New.
8166 (thread_db_mourn): New.
8168 * server.h (struct thread_info) <last_resume_kind>: New field.
8169 <attached>: Add comment.
8170 <gdb_detached>: New field.
8171 (handler_func): Change return type to int.
8172 (handle_serial_event, handle_target_event): Ditto.
8173 (gdb_connected): Declare.
8175 (disconnected_tracing): Declare.
8176 (stop_tracing): Declare.
8178 * server.c (handle_query) <qSupported>: Report support for
8179 disconnected tracing.
8180 (queue_stop_reply_callback): Account for running threads.
8181 (gdb_wants_thread_stopped): New.
8182 (gdb_wants_all_threads_stopped): New.
8183 (gdb_reattached_process): New.
8184 (handle_status): Clear the `gdb_detached' flag of all processes.
8185 In all-stop, stop all threads.
8186 (main): Be sure to leave tfind mode. Handle disconnected tracing.
8187 (process_serial_event): If the remote connection breaks, or if an
8188 exit was forced with "monitor exit", force an event loop exit.
8189 Handle disconnected tracing on detach.
8190 (handle_serial_event): Adjust.
8191 (handle_target_event): If GDB isn't connected, forward events back
8192 to the inferior, unless the last process exited, in which case,
8193 exit gdbserver. Adjust interface.
8195 * remote-utils.c (remote_open): Don't block in accept. Instead
8196 register an event loop source on the listen socket file
8197 descriptor. Refactor bits into ...
8198 (listen_desc): ... this new global.
8199 (gdb_connected): ... this new function.
8200 (enable_async_notification): ... this new function.
8201 (handle_accept_event): ... this new function.
8202 (remote_close): Clear remote_desc.
8204 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
8206 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
8208 (mourn_inferior): Define.
8209 (target_process_qsupported): Avoid the dangling else problem.
8210 (thread_stopped): Define.
8211 (pause_all): Define.
8212 (target_waitstatus_to_string): Declare.
8213 * target.c (target_waitstatus_to_string): New.
8215 * tracepoint.c (tracing): Make extern.
8216 (disconnected_tracing): New.
8217 (stop_tracing): Make extern. Handle tracing stops due to GDB
8219 (cmd_qtdisconnected): New.
8220 (cmd_qtstatus): Report disconnected tracing status in trace reply.
8221 (handle_tracepoint_general_set): Handle QTDisconnected.
8223 * event-loop.c (event_handler_func): Change return type to int.
8224 (process_event): Bail out if the event handler wants the event
8226 (handle_file_event): Ditto.
8227 (start_event_loop): Bail out if the event handler wants the event
8230 * nto-low.c (nto_target_ops): Adjust.
8231 * spu-low.c (spu_wait): Don't remove the process here.
8232 (spu_target_ops): Adjust.
8233 * win32-low.c (win32_wait): Don't remove the process here.
8234 (win32_target_ops): Adjust.
8236 2010-04-11 Pedro Alves <pedro@codesourcery.com>
8238 * regcache.c (realloc_register_cache): Invalidate inferior's
8239 regcache before recreating it.
8241 2010-04-09 Pedro Alves <pedro@codesourcery.com>
8243 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8245 2010-04-09 Stan Shebs <stan@codesourcery.com>
8246 Pedro Alves <pedro@codesourcery.com>
8248 * server.h (LONGEST): New.
8249 (struct thread_info) <while_stepping>: New field.
8250 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8252 (initialize_tracepoint, handle_tracepoint_general_set)
8253 (handle_tracepoint_query, tracepoint_finished_step)
8254 (tracepoint_was_hit, release_while_stepping_state_list):
8255 (current_traceframe): Declare.
8256 * server.c (handle_general_set): Handle tracepoint packets.
8258 (write_memory): New.
8259 (handle_search_memory_1): Use read_memory.
8260 (handle_query): Report support for conditional tracepoints, trace
8261 state variables, and tracepoint sources. Handle tracepoint
8263 (main): Initialize the tracepoints module.
8264 (process_serial_event): Handle traceframe reads/writes.
8266 * linux-low.c (handle_tracepoints): New.
8267 (linux_wait_1): Call it.
8268 (linux_resume_one_lwp): Handle while-stepping.
8269 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8270 (linux_target_ops): Install them.
8271 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8273 * linux-x86-low.c (x86_supports_tracepoints): New.
8274 (the_low_target). Install it.
8276 * mem-break.h (delete_breakpoint): Declare.
8277 * mem-break.c (delete_breakpoint): Make external.
8279 * target.h (struct target_ops): Add `supports_tracepoints',
8280 `read_pc', and `write_pc' fields.
8281 (target_supports_tracepoints): Define.
8282 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8285 * regcache.h (struct regcache) <registers_owned>: New field.
8286 (init_register_cache, regcache_cpy): Declare.
8287 (regcache_read_pc, regcache_write_pc): Declare.
8288 (register_cache_size): Declare.
8289 (supply_regblock): Declare.
8290 * regcache.c (init_register_cache): New.
8291 (new_register_cache): Use it.
8292 (regcache_cpy): New.
8293 (register_cache_size): New.
8294 (supply_regblock): New.
8295 (regcache_read_pc, regcache_write_pc): New.
8297 * tracepoint.c: New.
8299 * Makefile.in (OBS): Add tracepoint.o.
8300 (tracepoint.o): New rule.
8302 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8304 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8306 (i386-mmx.c): Likewise.
8307 (i386-mmx-linux.o): Likewise.
8308 (i386-mmx-linux.c): Likewise.
8310 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8311 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8312 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8313 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8315 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8316 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8317 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8319 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8321 * Makefile.in (clean): Updated.
8323 (i386-avx.c): Likewise.
8324 (i386-avx-linux.o): Likewise.
8325 (i386-avx-linux.c): Likewise.
8326 (amd64-avx.o): Likewise.
8327 (amd64-avx.c): Likewise.
8328 (amd64-avx-linux.o): Likewise.
8329 (amd64-avx-linux.c): Likewise.
8331 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8332 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8333 (srv_amd64_regobj): Add amd64-avx.o.
8334 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8335 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8336 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8337 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8338 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8339 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8340 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8342 * i387-fp.c: Include "i386-xstate.h".
8344 (i387_cache_to_xsave): Likewise.
8345 (i387_xsave_to_cache): Likewise.
8346 (x86_xcr0): Likewise.
8348 * i387-fp.h (i387_cache_to_xsave): Likewise.
8349 (i387_xsave_to_cache): Likewise.
8350 (x86_xcr0): Likewise.
8352 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8353 * linux-crisv32-low.c (target_regsets): Likewise.
8354 * linux-m68k-low.c (target_regsets): Likewise.
8355 * linux-mips-low.c (target_regsets): Likewise.
8356 * linux-ppc-low.c (target_regsets): Likewise.
8357 * linux-s390-low.c (target_regsets): Likewise.
8358 * linux-sh-low.c (target_regsets): Likewise.
8359 * linux-sparc-low.c (target_regsets): Likewise.
8360 * linux-xtensa-low.c (target_regsets): Likewise.
8362 * linux-low.c: Include <sys/uio.h>.
8363 (regsets_fetch_inferior_registers): Support nt_type.
8364 (regsets_store_inferior_registers): Likewise.
8365 (linux_process_qsupported): New.
8366 (linux_target_ops): Add linux_process_qsupported.
8368 * linux-low.h (regset_info): Add nt_type.
8369 (linux_target_ops): Add process_qsupported.
8371 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8373 (init_registers_i386_avx_linux): New.
8374 (init_registers_amd64_avx_linux): Likewise.
8375 (xmltarget_i386_linux_no_xml): Likewise.
8376 (xmltarget_amd64_linux_no_xml): Likewise.
8377 (PTRACE_GETREGSET): Likewise.
8378 (PTRACE_SETREGSET): Likewise.
8379 (x86_fill_xstateregset): Likewise.
8380 (x86_store_xstateregset): Likewise.
8381 (use_xml): Likewise.
8382 (x86_linux_update_xmltarget): Likewise.
8383 (x86_linux_process_qsupported): Likewise.
8384 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8385 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8386 init_registers_i386_linux here. Call
8387 x86_linux_update_xmltarget.
8388 (the_low_target): Add x86_linux_process_qsupported.
8390 * server.c (handle_query): Call target_process_qsupported.
8392 * target.h (target_ops): Add process_qsupported.
8393 (target_process_qsupported): New.
8395 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8397 * inferiors.c (add_thread): Set last_status kind to
8398 TARGET_WAITKIND_IGNORE.
8399 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8400 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8401 (linux_wait_1): Move `thread' local definition to block that uses
8402 it. Don't NULL initialize `event_child'.
8403 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8404 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8405 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8407 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8409 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8410 an extended waitstatus, or by a watchpoint.
8411 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8412 thread was stepping or has been stopped by a watchpoint.
8414 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8416 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8417 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8418 of another, then delete the previous, and validate all
8420 (validate_inserted_breakpoint): New.
8421 (delete_disabled_breakpoints): New.
8422 (validate_breakpoints): New.
8423 (check_mem_read): Validate breakpoints before trusting their
8424 shadow. Delete disabled breakpoints.
8425 (check_mem_write): Validate breakpoints before trusting they
8426 should be inserted. Delete disabled breakpoints.
8427 * mem-break.h (validate_breakpoints):
8428 * server.c (handle_query): Validate breakpoints when we see a
8431 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8433 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8434 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8435 if we could tell there's a GDB breakpoint at stop_pc.
8436 (need_step_over_p): Don't do a step over if we find a GDB
8437 breakpoint at the resume PC.
8439 * mem-break.c (struct raw_breakpoint): New.
8440 (enum bkpt_type): New type `gdb_breakpoint'.
8441 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8442 fields. New field `raw'.
8443 (find_raw_breakpoint_at): New.
8444 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8446 (set_breakpoint_at): Adjust.
8447 (delete_raw_breakpoint): New.
8448 (release_breakpoint): New.
8449 (delete_breakpoint): Rename to...
8450 (delete_breakpoint_1): ... this. Add proc parameter. Use
8451 release_breakpoint. Return ENOENT.
8452 (delete_breakpoint): Reimplement.
8453 (find_breakpoint_at): Delete.
8454 (find_gdb_breakpoint_at): New.
8455 (delete_breakpoint_at): Delete.
8456 (set_gdb_breakpoint_at): New.
8457 (delete_gdb_breakpoint_at): New.
8458 (gdb_breakpoint_here): New.
8459 (set_reinsert_breakpoint): Use release_breakpoint.
8460 (uninsert_breakpoint): Rename to ...
8461 (uninsert_raw_breakpoint): ... this.
8462 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8463 (reinsert_raw_breakpoint): Change parameter type to
8465 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8467 (check_breakpoints): Adjust. Use release_breakpoint.
8468 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8469 (breakpoint_inserted_here): Ditto.
8470 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8471 Don't trust the breakpoint's shadow if it is not inserted.
8472 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8473 (delete_all_breakpoints): Adjust.
8474 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8475 use delete_breakpoint_1.
8477 * mem-break.h (breakpoints_supported): Delete declaration.
8478 (set_gdb_breakpoint_at): Declare.
8479 (gdb_breakpoint_here): Declare.
8480 (delete_breakpoint_at): Delete.
8481 (delete_gdb_breakpoint_at): Declare.
8483 * server.h (struct raw_breakpoint): Forward declare.
8484 (struct process_info): New field `raw_breakpoints'.
8486 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8489 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8491 * linux-low.c (status_pending_p_callback): Fix comment.
8492 (linux_wait_for_event_1): Move most of the internal breakpoint
8493 handling from here...
8494 (linux_wait_1): ... to here.
8495 (count_events_callback): New.
8496 (select_singlestep_lwp_callback): New.
8497 (select_event_lwp_callback): New.
8498 (cancel_breakpoints_callback): New.
8499 (select_event_lwp): New.
8500 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8501 priority to all LWPs that have had events that should be reported
8502 to the client. Cancel breakpoints when about to reporting the
8503 event to the client, not while stopping lwps. No longer cancel
8504 finished single-steps here.
8505 (cancel_finished_single_step): Delete.
8506 (cancel_finished_single_steps): Delete.
8508 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8510 * mem-break.c (enum bkpt_type): New.
8511 (struct breakpoint): New field `type'.
8512 (set_breakpoint_at): Change return type to struct breakpoint
8513 pointer. Set type to `other_breakpoint' by default.
8514 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8515 in the breakpoint list.
8516 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8517 (reinsert_breakpoint): Rename to ...
8518 (reinsert_raw_breakpoint): ... this.
8519 (reinsert_breakpoints_at): Adjust.
8520 * mem-break.h (struct breakpoint): Declare.
8521 (set_breakpoint_at): Change return type to struct breakpoint
8524 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8526 * server.c (handle_query): Assign, not compare.
8528 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8530 Teach linux gdbserver to step-over-breakpoints.
8532 * linux-low.c (can_hardware_single_step): New.
8533 (supports_breakpoints): New.
8534 (handle_extended_wait): If stopping threads, read the stop pc of
8537 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8538 low target doesn't support retrieving the PC.
8539 (add_lwp): Set last_resume_kind to resume_continue.
8540 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8541 (linux_attach): Don't clear stop_expected. Set the lwp's
8542 last_resume_kind to resume_stop.
8543 (linux_detach_one_lwp): Don't check for removed breakpoints.
8544 (check_removed_breakpoint): Delete.
8545 (status_pending_p): Rename to ...
8546 (status_pending_p_callback): ... this. Don't check for removed
8547 breakpoints. Don't consider threads that are stopped from GDB's
8549 (linux_wait_for_lwp): Always read the stop_pc here.
8550 (cancel_breakpoint): New.
8551 (step_over_bkpt): New global.
8552 (linux_wait_for_event_1): Implement stepping over breakpoints.
8553 (gdb_wants_lwp_stopped): New.
8554 (gdb_wants_all_stopped): New.
8555 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8556 single-step traps here. Store the thread's last reported target
8558 (send_sigstop): Don't clear stop_expected. Always set it,
8560 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8561 (cancel_finished_single_step): New.
8562 (cancel_finished_single_steps): New.
8563 (wait_for_sigstop): Don't cancel finished single-step traps here.
8564 (linux_resume_one_lwp): Don't check for removed breakpoints.
8565 Don't set `step' on non-hardware step archs.
8566 (linux_set_resume_request): Ignore resume_stop requests if already
8567 stopping or stopped. Set the lwp's last_resume_kind.
8568 (resume_status_pending_p): Don't check for removed breakpoints.
8569 (need_step_over_p): New.
8570 (start_step_over): New.
8571 (finish_step_over): New.
8572 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8573 requests. Clear the thread's last reported target waitstatus.
8574 Don't use the `suspended' flag. Don't consider pending breakpoints.
8575 (linux_resume): Start a step-over if necessary.
8576 (proceed_one_lwp): New.
8577 (proceed_all_lwps): New.
8578 (unstop_all_lwps): New.
8579 * linux-low.h (struct lwp_info): Rewrite comment for the
8580 `suspended' flag. Add the `stop_pc' field. Delete the
8581 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8582 Add `'last_resume_kind' and `need_step_over' fields.
8583 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8584 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8585 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8586 (set_raw_breakpoint_at): New.
8587 (set_breakpoint_at): Rewrite to use it.
8588 (reinsert_breakpoint_handler): Delete.
8589 (set_reinsert_breakpoint): New.
8590 (reinsert_breakpoint_by_bp): Delete.
8591 (delete_reinsert_breakpoints): New.
8592 (uninsert_breakpoint): Rewrite.
8593 (uninsert_breakpoints_at): New.
8594 (reinsert_breakpoint): Rewrite.
8595 (reinsert_breakpoints_at): New.
8596 (check_breakpoints): Rewrite.
8597 (breakpoint_here): New.
8598 (breakpoint_inserted_here): New.
8599 (check_mem_read): Adjust.
8600 * mem-break.h (breakpoints_supported, breakpoint_here)
8601 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8602 (reinsert_breakpoint_by_bp): Delete declaration.
8603 (delete_reinsert_breakpoints): Declare.
8604 (reinsert_breakpoint): Delete declaration.
8605 (reinsert_breakpoints_at): Declare.
8606 (uninsert_breakpoint): Delete declaration.
8607 (uninsert_breakpoints_at): Declare.
8608 (check_breakpoints): Adjust prototype.
8609 * server.h: Adjust include order.
8610 (struct thread_info): Declare here. Add a `last_status' field.
8612 2010-03-23 Michael Snyder <msnyder@vmware.com>
8614 * server.c (crc32): New function.
8615 (handle_query): Add handling for 'qCRC:' request.
8617 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8619 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8620 lwp had been stopped by a watchpoint.
8622 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8624 * server.h (internal_error): Declare.
8625 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8626 * utils.c (internal_error): New function.
8628 2010-03-15 Andreas Schwab <schwab@redhat.com>
8630 * configure.srv: Fix typo setting srv_regobj.
8632 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8634 * linux-low.c (fetch_register): Avoid passing a non string literal
8636 (usr_store_inferior_registers): Ditto.
8638 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8640 * linux-low.c (linux_write_memory): Bail out early if peeking
8643 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8645 * linux-low.h (struct lwp_info): New fields
8646 `stopped_by_watchpoint' and `stopped_data_address'.
8647 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8648 here, and cache them in the lwp object.
8649 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8651 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8653 (linux_stopped_by_watchpoint): Rewrite.
8654 (linux_stopped_data_address): Rewrite.
8656 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8658 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8659 switching the current inferior, not before.
8661 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8663 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8664 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8665 i386-linux.c and amd64-linux.c.
8666 (reg-i386.o): Removed.
8667 (reg-i386.c): Likewise.
8668 (reg-i386-linux.o): Likewise.
8669 (reg-i386-linux.c): Likewise.
8670 (reg-x86-64.o): Likewise.
8671 (reg-x86-64.c): Likewise.
8672 (reg-x86-64-linux.o): Likewise.
8673 (reg-x86-64-linux.c): Likewise.
8676 (i386-linux.o): Likewise.
8677 (i386-linux.c): Likewise.
8678 (amd64.o): Likewise.
8679 (amd64.c): Likewise.
8680 (amd64-linux.o): Likewise.
8681 (amd64-linux.c): Likewise.
8683 * configure.srv (srv_i386_regobj): New.
8684 (srv_i386_linux_regobj): Likewise.
8685 (srv_amd64_regobj): Likewise.
8686 (srv_amd64_linux_regobj): Likewise.
8687 (srv_i386_32bit_xmlfiles): Likewise.
8688 (srv_i386_64bit_xmlfiles): Likewise.
8689 (srv_i386_xmlfiles): Likewise.
8690 (srv_amd64_xmlfiles): Likewise.
8691 (srv_i386_linux_xmlfiles): Likewise.
8692 (srv_amd64_linux_xmlfiles): Likewise.
8693 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8694 srv_xmlfiles to $srv_i386_xmlfiles.
8695 (i[34567]86-*-mingw32ce*): Likewise.
8696 (i[34567]86-*-mingw*): Likewise.
8697 (i[34567]86-*-nto*): Likewise.
8698 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8699 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8700 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8701 (x86_64-*-linux*): Likewise.
8703 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8704 (init_registers_amd64_linux): New.
8705 (x86_arch_setup): Replace init_registers_x86_64_linux with
8706 init_registers_amd64_linux.
8708 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8710 * configure.ac: Check for libdl. If it is not available link against
8711 static libthread_db.
8712 * configure: Regenerate.
8714 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8718 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8719 handing a read watchpoint.
8720 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8722 2010-02-12 Doug Evans <dje@google.com>
8724 * linux-low.c (linux_supports_tracefork_flag): Document.
8725 (linux_look_up_symbols): Add comment.
8727 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8729 * regcache.c (supply_register): Clear regcache if buf is NULL.
8731 2010-02-02 Nicolas Roche <roche@sourceware.org>
8732 Joel Brobecker <brobecker@adacore.com>
8734 * inferiors.c (find_inferior): Add function documentation.
8735 (unloaded_dll): Handle the case where the unloaded dll has not
8736 been previously registered in the dll list.
8738 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8740 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8741 (thumb2_breakpoint): New.
8742 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8744 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8746 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8747 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8750 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8752 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8754 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8756 * linux-s390-low.c (s390_collect_ptrace_register)
8757 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8759 2010-01-21 Doug Evans <dje@google.com>
8761 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8762 (PTRACE_ARG4_TYPE): New macro.
8763 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8764 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8765 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8766 (usr_store_inferior_registers): Ditto.
8767 (linux_read_memory, linux_write_memory): Ditto.
8768 (linux_test_for_tracefork): Ditto.
8770 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8771 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8773 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8775 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8778 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8780 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8781 prototype to take a regcache. Adjust.
8783 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8785 * regcache.h (struct thread_info): Forward declare.
8786 (struct regcache): New.
8787 (new_register_cache): Adjust prototype.
8788 (get_thread_regcache): Declare.
8789 (free_register_cache): Adjust prototype.
8790 (registers_to_string, registers_from_string): Ditto.
8791 (supply_register, supply_register_by_name, collect_register)
8792 (collect_register_as_string, collect_register_by_name): Ditto.
8793 * regcache.c (struct inferior_regcache_data): Delete.
8794 (get_regcache): Rename to ...
8795 (get_thread_regcache): ... this. Adjust. Switch inferior before
8797 (regcache_invalidate_one): Adjust.
8798 (regcache_invalidate): Fix prototype.
8799 (new_register_cache): Return the new register cache.
8800 (free_register_cache): Change prototype.
8801 (realloc_register_cache): Adjust.
8802 (registers_to_string): Change prototype to take a regcache. Adjust.
8803 (registers_from_string): Ditto.
8804 (register_data): Ditto.
8805 (supply_register): Ditto.
8806 (supply_register_by_name): Ditto.
8807 (collect_register): Ditto.
8808 (collect_register_as_string): Ditto.
8809 (collect_register_by_name): Ditto.
8810 * server.c (process_serial_event): Adjust.
8811 * linux-low.h (regset_fill_func, regset_store_func): Change
8813 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8815 * linux-low.c (get_stop_pc): Adjust.
8816 (check_removed_breakpoint): Adjust.
8817 (linux_wait_for_event): Adjust.
8818 (linux_resume_one_lwp): Adjust.
8819 (fetch_register): Add regcache parameter. Adjust.
8820 (usr_store_inferior_registers): Ditto.
8821 (regsets_fetch_inferior_registers): Ditto.
8822 (regsets_store_inferior_registers): Ditto.
8823 (linux_fetch_registers, linux_store_registers): Ditto.
8824 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8826 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8828 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8829 prototype to take a regcache.
8830 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8831 * remote-utils.c (convert_ascii_to_int, outreg)
8832 (prepare_resume_reply): Change prototype to take a regcache.
8834 * target.h (struct target_ops) <fetch_registers, store_registers>:
8835 Change prototype to take a regcache.
8836 (fetch_inferior_registers, store_inferior_registers): Change
8837 prototype to take a regcache. Adjust.
8838 * proc-service.c (ps_lgetregs): Adjust.
8839 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8840 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8841 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8842 take a regcache. Adjust.
8843 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8844 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8845 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8846 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8847 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8848 (cris_cannot_fetch_register):
8849 (cris_breakpoint_at): Change prototype to take a regcache.
8851 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8852 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8853 to take a regcache. Adjust.
8854 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8856 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8857 take a regcache. Adjust.
8858 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8859 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8860 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8861 * linux-mips-low.c (mips_get_pc):
8862 (mips_set_pc): Change prototype to take a regcache. Adjust.
8863 (mips_reinsert_addr): Adjust.
8864 (mips_collect_register): Change prototype to take a regcache.
8866 (mips_supply_register):
8867 (mips_collect_register_32bit, mips_supply_register_32bit)
8868 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8869 (mips_store_fpregset): Ditto.
8870 * linux-ppc-low.c (ppc_supply_ptrace_register)
8871 (ppc_supply_ptrace_register): Ditto.
8872 (parse_spufs_run): Adjust.
8873 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8874 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8875 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8876 take a regcache. Adjust.
8877 * linux-s390-low.c (s390_collect_ptrace_register)
8878 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8879 (s390_set_pc): Change prototype to take a regcache. Adjust.
8880 (s390_arch_setup): Adjust.
8881 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8882 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8883 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8884 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8885 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8887 (sparc_breakpoint_at): Adjust.
8888 * linux-xtensa-low.c (xtensa_fill_gregset):
8889 (xtensa_store_gregset):
8890 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8891 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8892 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8893 prototype to take a regcache. Adjust.
8894 * win32-arm-low.c (arm_fetch_inferior_register)
8895 (arm_store_inferior_register): Change prototype to take a
8897 * win32-i386-low.c (i386_fetch_inferior_register)
8898 (i386_store_inferior_register): Change prototype to take a
8900 * win32-low.c (child_fetch_inferior_registers)
8901 (child_store_inferior_registers): Change prototype to take a
8903 (win32_wait): Adjust.
8904 (win32_fetch_inferior_registers): Change prototype to take a
8906 (win32_store_inferior_registers): Adjust.
8907 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8908 store_inferior_register>: Change prototype to take a regcache.
8910 2010-01-20 Doug Evans <dje@google.com>
8912 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8914 (linux_wait_for_event1, linux_init_signals): Ditto.
8915 (W_STOPCODE): Provide definition if missing.
8917 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8919 * linux-low.c (linux_core_of_thread): New.
8920 (compare_ints, show_process, list_threads): New.
8921 (linux_qxfer_osdata): Report threads and cores.
8922 (linux_target_op): Register linux_core_of_thread.
8923 * remote-utils.c (prepare_resume_reply): Report the core.
8924 (buffer_xml_printf): Support %d specifier.
8925 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8927 (handle_query): Handle qXfer:threads. Announce availability
8929 * target.h (struct target_ops): New field core_of_thread.
8931 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8933 * Makefile.in (clean): Remove new generated files.
8934 (reg-s390.o, reg-s390.c): Remove rules.
8935 (reg-s390x.o, reg-s390x.c): Likewise.
8936 (s390-linux32.o, s390-linux32.c): Add rules.
8937 (s390-linux64.o, s390-linux64.c): Likewise.
8938 (s390x-linux64.o, s390x-linux64.c): Likewise.
8939 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8940 * linux-s390-low.c: Include <elf.h>.
8941 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8942 (init_registers_s390): Remove prototype.
8943 (init_registers_s390x): Likewise.
8944 (init_registers_s390_linux32): Add prototype.
8945 (init_registers_s390_linux64): Likewise.
8946 (init_registers_s390x_linux64): Likewise.
8947 (s390_num_regs_3264): New define.
8948 (s390_regmap_3264): New global variable.
8949 (s390_cannot_fetch_register): Remove obsolete check.
8950 (s390_cannot_store_register): Likewise.
8951 (s390_collect_ptrace_register): Handle upper/lower register halves.
8952 (s390_supply_ptrace_register): Likewise.
8953 (s390_fill_gregset): Update to register number changes.
8954 (s390_get_hwcap): New routine.
8955 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8956 Install appropriate regmap and register set.
8958 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8960 * server.c (gdbserver_version): Update copyright year to 2010.
8961 * gdbreplay.c (gdbreplay_version): Likewise.
8963 2009-12-28 Doug Evans <dje@google.com>
8965 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8966 elf/external.h. Include <elf.h> instead but only if necessary.
8968 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8970 * linux-low.c (linux_remove_process): Remove `detaching'
8971 parameter. Don't release/detach from thread_db here.
8972 (linux_kill): Release/detach from thread_db here, ...
8973 (linux_detach): ... and here, before actually detaching.
8974 (linux_wait_1): ... and here, when a process exits.
8975 * thread-db.c (any_thread_of): New.
8976 (thread_db_free): Switch the current inferior to a thread of the
8979 2009-12-21 Doug Evans <dje@google.com>
8981 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8983 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8984 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8985 warning ifndef __NR_tkill. Move setting of errno there too.
8986 Delete unnecessary resetting of errno after syscall.
8987 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8989 * configure.ac: Check for dladdr.
8990 * config.in: Regenerate.
8991 * configure: Regenerate.
8992 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8993 (try_thread_db_load): Update.
8995 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8997 2009-12-18 Doug Evans <dje@google.com>
8999 * event-loop.c: Include unistd.h if it exists.
9001 * linux-low.c (my_waitpid): Move definition away from being in
9002 between linux_tracefork_child/linux_test_for_tracefork.
9004 * gdb_proc_service.h (psaddr_t): Fix type.
9005 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
9006 signature to match glibc.
9008 2009-12-16 Doug Evans <dje@google.com>
9010 * linux-low.c (linux_read_memory): Fix argument to read.
9012 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9014 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
9015 events, don't leave current_inferior pointing at null.
9017 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9019 * win32-low.c (LOG): Delete.
9020 (OUTMSG): Output to stderr.
9021 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
9022 on compile time LOG macro.
9023 (win32_wait): Fix debug output.
9025 2009-11-26 Pedro Alves <pedro@codesourcery.com>
9027 * win32-low.c (win32_add_one_solib): If the dll name is
9028 "ntdll.dll", prepend the system directory to the dll path.
9030 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
9032 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
9034 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
9035 Vladimir Prus <vladimir@codesourcery.com>
9037 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
9038 * configure.ac: Check for __mcoldfire__ and set
9039 gdb_cv_m68k_is_coldfire.
9040 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
9041 reg-cf.o and reg-m68k.o.
9042 * configure: Regenerated.
9044 2009-11-16 Pedro Alves <pedro@codesourcery.com>
9046 * linux-low.c (linux_remove_process): Add `detaching' parameter.
9047 Pass it to thread_db_free.
9048 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
9049 proper `detaching' argument to linux_remove_process.
9050 * linux-low.h (thread_db_free): Add `detaching' parameter.
9051 * thread-db.c (thread_db_init): Pass false as `detaching' argument
9053 (thread_db_free): Add `detaching' parameter. Only
9054 call td_ta_clear_event if detaching from process.
9056 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
9058 * thread-db.c (thread_db_free): Fix typo.
9060 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
9063 * thread-db.c (thread_db_free): Call td_ta_clear_event.
9065 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
9067 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
9068 with an i686 compiler.
9069 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
9071 * configure: Rebuilt.
9073 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
9077 * server.c (handle_search_memory_1): Correct read_addr initialization
9078 in loop for searching subsequent chunks.
9080 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
9082 * configure.ac: New --with-libthread-db option.
9083 * thread-db.c: Allow direct dependence on libthread_db.
9084 (thread_db_free): Adjust.
9085 * config.in: Regenerate.
9086 * configure: Likewise.
9088 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
9091 * thread-db.c (attach_thread): New function.
9092 (maybe_attach_thread): Return success/failure.
9093 (find_new_threads_callback): Adjust.
9094 (thread_db_find_new_threads): Loop until no new threads.
9096 2009-10-13 Pedro Alves <pedro@codesourcery.com>
9098 * proc-service.c (ps_lgetregs): Formatting.
9100 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
9102 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
9103 * configure.ac: Adjust.
9104 * linux-low.h (struct process_info_private): Move members to struct
9106 (thread_db_free, thread_db_handle_monitor_command): New prototype.
9107 * linux-low.c (linux_remove_process): Adjust.
9108 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
9109 * server.c (handle_query): Move code ...
9110 (handle_monitor_command): ... here. New function.
9111 * target.h (struct target_ops): New member.
9112 * thread-db.c (struct thread_db): New.
9113 (libthread_db_search_path): New variable.
9114 (thread_db_create_event, thread_db_enable_reporting)
9115 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
9116 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
9117 (try_thread_db_load_1, dladdr_to_soname): New functions.
9118 (try_thread_db_load, thread_db_load_search): New functions.
9119 (thread_db_init): Search for libthread_db.
9120 (thread_db_free): New function.
9121 (thread_db_handle_monitor_command): Likewise.
9122 * config.in: Regenerate.
9123 * configure: Regenerate.
9125 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
9127 * spu-low.c (spu_kill): Wait for inferior to terminate.
9128 Call clear_inferiors.
9129 (spu_detach): Call clear_inferiors.
9131 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9133 * aclocal.m4: Regenerate.
9134 * config.in: Likewise.
9135 * configure: Likewise.
9137 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9139 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
9140 (parse_spufs_run): New function.
9141 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
9142 (ppc_breakpoint_at): Handle SPU breakpoints.
9144 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9146 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
9147 (SPUFS_MAGIC): Define.
9148 (spu_enumerate_spu_ids): New function.
9149 (linux_qxfer_spu): New function.
9150 (linux_target_ops): Install linux_qxfer_spu.
9152 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
9154 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
9155 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
9156 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
9157 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
9158 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
9159 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
9160 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
9161 (init_registers_powerpc_cell32l): Add prototype.
9162 (init_registers_powerpc_cell64l): Likewise.
9163 (ppc_arch_setup): Detect Cell/B.E. architecture.
9165 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9167 * Makefile.in (datarootdir): New variable.
9169 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9171 * linux-low.c (linux_write_memory): Update debugging output.
9172 * Makefile.in (clean): Add new descriptions.
9173 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
9174 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
9175 * configure.srv: Add new files for arm*-*-linux*.
9176 * linux-arm-low.c: Add new declarations.
9177 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
9178 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
9179 (HWCAP_VFPv3D16): New.
9180 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
9181 instead of __IWMMXT__.
9182 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
9183 (arm_arch_setup): New.
9184 (target_regsets): Remove #ifdef. Add VFP regset.
9185 (the_low_target): Use arm_arch_setup.
9187 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
9189 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
9190 the main thread again.
9192 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
9194 Adding Neutrino gdbserver.
9195 * configure: Regenerated.
9196 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
9197 * configure.srv (i[34567]86-*-nto*): New target.
9198 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
9199 * remote-utils.c [__QNX__]: Include sys/iomgr.h
9200 (nto_comctrl) [__QNX__]: New function.
9201 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
9203 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
9205 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
9208 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
9209 Pedro Alves <pedro@codesourcery.com>
9211 * win32-i386-low.c (i386_get_thread_context): Handle systems that
9212 don't support CONTEXT_EXTENDED_REGISTERS.
9213 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
9214 (the_low_target): Install them.
9215 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
9216 failing with ERROR_PIPE_NOT_CONNECTED.
9218 2009-06-30 Doug Evans <dje@google.com>
9219 Pierre Muller <muller@ics.u-strasbg.fr>
9221 Add h/w watchpoint support to x86-linux, win32-i386.
9222 * Makefile.in (SFILES): Add i386-low.c
9223 (i386_low_h): Define.
9224 (i386-low.o): Add dependencies.
9225 (linux-x86-low.o): Add i386-low.h dependency.
9226 (win32-i386-low.o): Ditto.
9227 * i386-low.c: New file.
9228 * i386-low.h: New file.
9229 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9230 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9231 * linux-low.c (linux_add_process): Initialize arch_private.
9232 (linux_remove_process): Free arch_private.
9233 (add_lwp): Initialize arch_private.
9234 (delete_lwp): Free arch_private.
9235 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9237 * linux-low.h (process_info_private): New member arch_private.
9238 (lwp_info): New member arch_private.
9239 (linux_target_ops): New members new_process, new_thread,
9241 (ptid_of): New macro.
9242 * linux-x86-low.c: Include stddef.h, i386-low.h.
9243 (arch_process_info): New struct.
9244 (arch_lwp_info): New struct.
9245 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9246 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9247 (i386_dr_low_get_status): New function.
9248 (x86_insert_point, x86_remove_point): New functions.
9249 (x86_stopped_by_watchpoint): New function.
9250 (x86_stopped_data_address): New function.
9251 (x86_linux_new_process, x86_linux_new_thread): New functions.
9252 (x86_linux_prepare_to_resume): New function.
9253 (the_low_target): Add entries for insert_point, remove_point,
9254 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9256 * server.c (debug_hw_points): New global.
9257 (monitor_show_help): Document set debug-hw-points.
9258 (handle_query): Process "set debug-hw-points".
9259 * server.h (debug_hw_points): Declare.
9260 (paddress): Declare.
9261 * utils.c (NUMCELLS, CELLSIZE): New macros.
9262 (get_sell, xsnprintf, paddress): New functions.
9263 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9264 remove_point, stopped_by_watchpoint, stopped_data_address.
9265 * win32-i386-low.c: Include i386-low.h.
9266 (debug_reg_state): Replaces dr.
9267 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9268 (i386_dr_low_get_status): New function.
9269 (i386_insert_point, i386_remove_point): New functions.
9270 (i386_stopped_by_watchpoint): New function.
9271 (i386_stopped_data_address): New function.
9272 (i386_initial_stuff): Update.
9273 (get_thread_context,set_thread_context,i386_thread_added): Update.
9274 (the_low_target): Add entries for insert_point,
9275 remove_point, stopped_by_watchpoint, stopped_data_address.
9276 * win32-low.c (win32_insert_watchpoint): New function.
9277 (win32_remove_watchpoint): New function.
9278 (win32_stopped_by_watchpoint): New function.
9279 (win32_stopped_data_address): New function.
9280 (win32_target_ops): Add entries for insert_watchpoint,
9281 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9282 * win32-low.h (win32_target_ops): New members insert_point,
9283 remove_point, stopped_by_watchpoint, stopped_data_address.
9285 2009-06-25 Pedro Alves <pedro@codesourcery.com>
9287 * server.c (process_serial_event): Re-return unsupported, not
9288 error, if the type isn't recognized. Re-allow supporting only
9289 insert or remove packets. Also call require_running for
9290 breakpoints. Add missing break statement to default case. Tidy.
9291 * target.h (struct target_ops): Rename insert_watchpoint to
9292 insert_point, and remove_watchpoint to remove_point.
9294 * linux-low.h (struct linux_target_ops): Likewise.
9295 * linux-low.c (linux_insert_watchpoint): Rename to ...
9296 (linux_insert_point): ... this. Adjust.
9297 (linux_remove_watchpoint): Rename to ...
9298 (linux_remove_point): ... this. Adjust.
9299 (linux_target_ops): Adjust.
9300 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9301 (cris_insert_point): ... this.
9302 (cris_remove_watchpoint): Rename to ...
9303 (cris_remove_point): ... this.
9304 (the_low_target): Adjust.
9306 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9308 * server.c (handle_v_kill): Pass signal_pid to
9309 kill_inferior if multi_process is zero.
9311 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9313 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9314 * target.h (target_ops): Comment for *_watchpoint to make it clear
9315 the functions can get types '0' and '1'.
9317 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9319 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9320 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9321 * regcache.c (get_regcache): Likewise.
9322 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9323 * win32-low.c (child_fetch_inferior_registers): Remove check for
9326 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9327 Pedro Alves <pedro@codesourcery.com>
9329 * target.h (struct target_ops) <supports_multi_process>: New
9331 (target_supports_multi_process): New.
9332 * server.c (handle_query): Even if GDB reports support, only
9333 enable multi-process if the target also supports it. Report
9334 multi-process support only if the target backend supports it.
9335 * linux-low.c (linux_supports_multi_process): New function.
9336 (linux_target_ops): Install it as target_supports_multi_process
9339 2009-05-24 Doug Evans <dje@google.com>
9341 Global renaming of find_thread_pid to find_thread_ptid.
9342 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9343 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9344 All callers updated.
9346 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9347 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9350 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9351 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9352 (linux_resume_one_lwp): Ditto.
9354 2009-05-23 Doug Evans <dje@google.com>
9356 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9357 from struct inferior_list_entry * to struct lwp_info *.
9358 All callers updated.
9360 2009-05-13 Doug Evans <dje@google.com>
9362 * linux-x86-low.c: Don't include assert.h.
9363 (x86_siginfo_fixup): Use fatal, not assert.
9364 (x86_arch_setup): Fix comment.
9366 2009-05-12 Doug Evans <dje@google.com>
9368 Biarch support for i386/amd64 gdbserver.
9369 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9370 Add linux-x86-low.c.
9371 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9372 (linux-x86-low.o): Add.
9373 * linux-x86-64-low.c: Delete.
9374 * linux-i386-low.c: Delete.
9375 * linux-x86-low.c: New file.
9376 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9378 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9380 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9381 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9382 (linux_child_pid_to_exec_file): New function.
9383 (elf_64_header_p, elf_64_file_p): New functions.
9384 (siginfo_fixup): New function.
9385 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9386 give target a chance to convert layout.
9387 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9388 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9390 2009-05-07 Doug Evans <dje@google.com>
9392 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9393 (regsets_store_inferior_registers): Ditto.
9395 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9399 * linux-low.c (must_set_ptrace_flags): Delete.
9400 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9402 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9403 `lwp->must_set_ptrace_flags' instead.
9404 (linux_wait_for_event_1): Set ptrace options here.
9405 (linux_wait_1): ... not here.
9407 2009-04-30 Doug Evans <dje@google.com>
9409 * inferiors.c (started_inferior_callback): New function.
9410 (attached_inferior_callback): New function.
9411 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9412 * server.c (print_started_pid, print_attached_pid): New functions.
9413 (detach_or_kill_for_exit): New function.
9414 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9415 * server.h (have_started_inferiors_p): Declare.
9416 (have_attached_inferiors_p): Declare.
9418 * inferiors.c (remove_process): Fix memory leak, free process.
9419 * linux-low.c (linux_remove_process): New function.
9420 (linux_kill): Call it instead of remove_process.
9421 (linux_detach, linux_wait_1): Ditto.
9423 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9425 * configure.srv: Add x86 Windows CE target.
9427 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9429 * inferiors.c (get_thread_process): Make global.
9430 * server.h (get_thread_process): Add prototype.
9431 * thread-db.c (find_one_thread): Use get_thread_process
9432 instead of current_process.
9433 (thread_db_get_tls_address): Do not crash if called when
9434 thread layer is not yet initialized.
9436 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9438 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9439 * spu-low.c (current_tid): Rename to ...
9440 (current_ptid): ... this.
9441 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9442 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9443 ptid_get_lwp (current_ptid) instead of current_tid.
9444 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9445 instead of current_tid. Use find_process_pid to verify pid
9446 argument is valid. Pass proper argument to remove_process.
9447 (spu_thread_alive): Compare current_ptid instead of current_tid.
9448 (spu_resume): Likewise.
9450 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9452 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9455 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9457 Implement the multiprocess extensions, and add linux multiprocess
9460 * server.h (ULONGEST): Declare.
9461 (struct ptid, ptid_t): New.
9462 (minus_one_ptid, null_ptid): Declare.
9463 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9464 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9465 (struct inferior_list_entry): Change `id' type from unsigned from
9467 (struct sym_cache, struct breakpoint, struct
9468 process_info_private): Forward declare.
9469 (struct process_info): Declare.
9470 (current_process): Declare.
9471 (all_processes): Declare.
9472 (initialize_inferiors): Declare.
9473 (add_thread): Adjust to use ptid_t.
9474 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9475 (add_process, remove_process, find_thread_pid): Declare.
9476 (find_inferior_id): Adjust to use ptid_t.
9477 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9478 (multi_process): Declare.
9479 (push_event): Adjust to use ptid_t.
9480 (read_ptid, write_ptid): Declare.
9481 (prepare_resume_reply): Adjust to use ptid_t.
9482 (clear_symbol_cache): Declare.
9483 * inferiors.c (all_processes): New.
9484 (null_ptid, minus_one_ptid): New.
9485 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9486 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9487 (add_thread): Change unsigned long to ptid. Remove gdb_id
9489 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9490 (gdb_id_to_thread): Rename to ...
9491 (find_thread_pid): ... this. Change unsigned long to ptid.
9492 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9493 (loaded_dll, pull_pid_from_list): Adjust.
9494 (add_process, remove_process, find_process_pid)
9495 (get_thread_process, current_process, initialize_inferiors): New.
9496 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9497 (struct target_waitstatus) <related_pid>: Ditto.
9498 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9500 (struct target_ops) <join>: Add `pid' argument.
9501 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9502 (struct target_ops) <wait>: Add `ptid' field. Change return type
9504 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9505 (mywait): Add `ptid' argument. Change return type to ptid_t.
9506 (target_pid_to_str): Declare.
9507 * target.c (set_desired_inferior): Adjust to use ptids.
9508 (mywait): Add new `ptid' argument. Adjust.
9509 (target_pid_to_str): New.
9510 * mem-break.h (free_all_breakpoints): Declare.
9511 * mem-break.c (breakpoints): Delelete.
9512 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9513 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9514 to use per-process breakpoint list.
9515 (free_all_breakpoints): New.
9516 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9517 (symbol_cache, all_symbols_looked_up): Delete.
9519 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9521 (prepare_resume_reply): Change ptid argument's type from unsigned
9522 long to ptid_t. Adjust. Implement W;process and X;process.
9523 (free_sym_cache, clear_symbol_cache): New.
9524 (look_up_one_symbol): Adjust to per-process symbol cache. *
9525 * server.c (cont_thread, general_thread, step_thread): Change type
9528 (multi_process): New.
9529 (last_ptid): Change type to ptid_t.
9530 (struct vstop_notif) <ptid>: Change type to ptid_t.
9531 (queue_stop_reply, push_event): Change `ptid' argument's type to
9533 (discard_queued_stop_replies): Add `pid' argument.
9534 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9535 changes. Don't reference the `attached' global.
9536 (attach_inferior): Adjust to mywait interface changes.
9537 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9538 features. Handle and report "multiprocess+". Handle
9540 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9542 (handle_v_kill): New.
9543 (handle_v_stopped): Adjust to use target_pid_to_str.
9544 (handle_v_requests): Allow multiple attaches and runs when
9545 multiprocess extensions are in effect. Handle "vKill".
9546 (myresume): Adjust to use ptids.
9547 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9548 (handle_status): Adjust to discard_queued_stop_replies interface
9550 (first_thread_of, kill_inferior_callback)
9551 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9552 (main): Call initialize_inferiors. Adjust to use ptids, killing
9553 and detaching from all inferiors. Handle multiprocess packet
9555 * linux-low.h: Include gdb_proc_service.h.
9556 (struct process_info_private): New.
9557 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9558 <lwpid_of>: Use ptid_get_lwp.
9559 (get_lwp_thread): Adjust.
9560 (struct lwp_info): Add `dead' member.
9561 (find_lwp_pid): Declare.
9562 * linux-low.c (thread_db_active): Delete.
9563 (new_inferior): Adjust comment.
9564 (inferior_pid): Delete.
9565 (linux_add_process): New.
9566 (handle_extended_wait): Adjust.
9567 (add_lwp): Change unsigned long to ptid.
9568 (linux_create_inferior): Add process to processes table. Adjust
9569 to use ptids. Don't set new_inferior here.
9570 (linux_attach_lwp): Rename to ...
9571 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9572 it. Adjust to use ptids.
9573 (linux_attach_lwp): New.
9574 (linux_attach): Add process to processes table. Don't set
9576 (struct counter): New.
9577 (second_thread_of_pid_p, last_thread_of_process_p): New.
9578 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9580 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9581 processes. Remove process from process table.
9582 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9583 to multiple processes.
9584 (any_thread_of): New.
9585 (linux_detach): Add `pid' argument, and handle it. Remove process
9586 from processes table.
9587 (linux_join): Add `pid' argument. Handle it.
9588 (linux_thread_alive): Change unsighed long argument to ptid_t.
9589 Consider dead lwps as not being alive.
9590 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9591 threads we're not interested in.
9592 (same_lwp, find_lwp_pid): New.
9593 (linux_wait_for_lwp): Change `pid' argument's type from int to
9595 (linux_wait_for_event): Rename to ...
9596 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9597 from int to ptid_t. Adjust.
9598 (linux_wait_for_event): New.
9599 (linux_wait_1): Add `ptid' argument. Change return type to
9600 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9601 that exit from the process table.
9602 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9604 (mark_lwp_dead): New.
9605 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9606 stopping all threads, mark its main lwp as dead.
9607 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9609 (fetch_register, usr_store_inferior_registers)
9610 (regsets_fetch_inferior_registers)
9611 (regsets_store_inferior_registers, linux_read_memory)
9612 (linux_write_memory): Inline `inferior_pid'.
9613 (linux_look_up_symbols): Adjust to use per-process
9615 (linux_request_interrupt): Adjust to use ptids.
9616 (linux_read_auxv): Inline `inferior_pid'.
9617 (initialize_low): Don't reference thread_db_active.
9618 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9619 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9620 (ps_getpid): Return the pid of the current inferior.
9621 * thread-db.c (proc_handle, thread_agent): Delete.
9622 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9624 (find_one_thread): Change argument type to ptid_t. Adjust to
9626 (maybe_attach_thread): Adjust to per-process data and ptids.
9627 (thread_db_find_new_threads): Ditto.
9628 (thread_db_init): Ditto.
9629 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9630 processes table. Adjust to use ptids.
9631 (spu_kill, spu_detach): Adjust interface. Remove process from
9633 (spu_join, spu_thread_alive): Adjust interface.
9634 (spu_wait): Adjust interface. Remove process from processes
9635 table. Adjust to use ptids.
9636 * win32-low.c (current_inferior_tid): Delete.
9637 (current_inferior_ptid): New.
9638 (debug_event_ptid): New.
9639 (thread_rec): Take a ptid. Adjust.
9640 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9641 (child_delete_thread): Ditto.
9642 (do_initial_child_stuff): Add `attached' argument. Add process to
9644 (child_fetch_inferior_registers, child_store_inferior_registers):
9646 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9647 (win32_attach): Pass 1 to do_initial_child_stuff.
9648 (win32_kill): Adjust interface. Remove process from processes
9650 (win32_detach): Ditto.
9651 (win32_join): Adjust interface.
9652 (win32_thread_alive): Take a ptid.
9653 (win32_resume): Adjust to use ptids.
9654 (get_child_debug_event): Ditto.
9655 (win32_wait): Adjust interface. Remove exiting process from
9658 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9660 Non-stop mode support.
9662 * server.h (non_stop): Declare.
9663 (gdb_client_data, handler_func): Declare.
9664 (delete_file_handler, add_file_handler, start_event_loop):
9666 (handle_serial_event, handle_target_event, push_event)
9667 (putpkt_notif): Declare.
9668 * target.h (enum resume_kind): New.
9669 (struct thread_resume): Replace `step' field by `kind' field.
9670 (TARGET_WNOHANG): Define.
9671 (struct target_ops) <wait>: Add `options' argument.
9672 <supports_non_stop, async, start_non_stop>: New fields.
9673 (target_supports_non_stop, target_async): New.
9674 (start_non_stop): Declare.
9675 (mywait): Add `options' argument.
9676 * target.c (mywait): Add `options' argument. Print child exit
9678 (start_non_stop): New.
9679 * server.c (non_stop, own_buf, mem_buf): New globals.
9680 (struct vstop_notif): New.
9681 (notif_queue): New global.
9682 (queue_stop_reply, push_event, discard_queued_stop_replies)
9683 (send_next_stop_reply): New.
9684 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9686 (attach_inferior): In non-stop mode, don't wait for the target
9688 (handle_general_set): Handle QNonStop.
9689 (handle_query): When handling qC, return the current general
9690 thread, instead of the first thread of the list.
9691 (handle_query): If the backend supports non-stop mode, include
9692 QNonStop+ in the qSupported query response.
9693 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9695 (handle_v_attach, handle_v_run): Handle non-stop mode.
9696 (handle_v_stopped): New.
9697 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9698 (myresume): Adjust to use resume_kind. Handle non-stop.
9699 (queue_stop_reply_callback): New.
9700 (handle_status): Handle non-stop mode.
9701 (main): Clear non_stop flag on reconnection. Use the event-loop.
9702 Refactor serial protocol handling from here ...
9703 (process_serial_event): ... to this new function. When GDB
9704 selects any thread, select one here. In non-stop mode, wait until
9705 GDB acks all pending events before exiting.
9706 (handle_serial_event, handle_target_event): New.
9707 * remote-utils.c (remote_open): Install remote_desc in the event
9709 (remote_close): Remove remote_desc from the event loop.
9710 (putpkt_binary): Rename to...
9711 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9712 (putpkt_binary): New as wrapper around putpkt_binary_1.
9713 (putpkt_notif): New.
9714 (prepare_resume_reply): In non-stop mode, don't change the
9716 * event-loop.c: New.
9717 * Makefile.in (OBJ): Add event-loop.o.
9718 (event-loop.o): New rule.
9720 * linux-low.h (pid_of): Moved here.
9722 (get_lwp_thread): Use lwpid_of.
9723 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9724 * linux-low.c (pid_of): Delete.
9725 (inferior_pid): Use lwpid_of.
9726 (linux_event_pipe): New.
9727 (target_is_async_p): New.
9729 (handle_extended_wait): Use lwpid_of.
9730 (add_lwp): Don't set lwpid field.
9731 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9732 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9733 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9734 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9735 first. Adjust to linux_wait_for_event interface changes. Use
9737 (linux_detach): Don't delete the main lwp here.
9738 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9739 (status_pending_p): Don't consider explicitly suspended lwps.
9740 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9741 pointer. Add OPTIONS argument. Change return type to int. Use
9742 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9743 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9744 pointer. Add status pointer argument. Return a pid instead of a
9745 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9746 changes. In non-stop mode, don't switch to a random thread.
9747 (linux_wait): Rename to...
9748 (linux_wait_1): ... this. Add target_options argument, and handle
9749 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9750 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9751 clean exit and signal exit code. Don't stop all threads in
9752 non-stop mode. In all-stop mode, only stop all threads when
9753 reporting a stop to GDB. Handle explicit thread stop requests.
9754 (async_file_flush, async_file_mark): New.
9756 (send_sigstop): Use lwpid_of.
9757 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9758 interface changes. In non-stop mode, don't switch to a random
9760 (linux_resume_one_lwp): Use lwpid_of.
9761 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9762 (linux_resume_one_thread): ... this. Handle resume_stop. In
9763 non-stop mode, don't look for pending flag in all threads.
9764 (resume_status_pending_p): Don't consider explicitly suspended
9766 (my_waitpid): Reimplement. Emulate __WALL.
9767 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9769 (sigchld_handler, linux_supports_non_stop, linux_async)
9770 (linux_start_non_stop): New.
9771 (linux_target_ops): Register linux_supports_non_stop, linux_async
9772 and linux_start_non_stop.
9773 (initialize_low): Install SIGCHLD handler.
9774 * thread-db.c (thread_db_create_event, find_one_thread)
9775 (thread_db_get_tls_address): Use lwpid_of.
9776 * win32-low.c (win32_detach): Adjust to use resume_kind.
9777 (win32_wait): Add `options' argument.
9778 * spu-low.c (spu_resume): Adjust to use resume_kind.
9779 (spu_wait): Add `options' argument.
9781 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9783 Decouple target code from remote protocol.
9785 * target.h (enum target_waitkind): New.
9786 (struct target_waitstatus): New.
9787 (struct target_ops) <wait>: Return an unsigned long. Take a
9788 target_waitstatus pointer instead of a char pointer.
9790 * target.c (mywait): Change prototype to return an unsigned long.
9791 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9792 * server.h (thread_from_wait, old_thread_from_wait): Delete
9794 (prepare_resume_reply): Change prototype to take a
9796 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9797 (last_status, last_ptid): New.
9798 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9799 pid instead of a signal.
9800 (attach_inferior): Remove "status" and "signal" parameters.
9802 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9804 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9805 (handle_v_requests, myresume): Remove "status" and "signal"
9807 (handle_status): New.
9808 (main): Delete local `status'. Adjust.
9809 * remote-utils.c: Include target.h.
9810 (prepare_resume_reply): Change prototype to take a
9811 target_waitstatus. Adjust.
9813 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9815 * spu-low.c (spu_wait): Adjust.
9816 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9818 (win32_wait): Adjust.
9820 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9822 * target.h (struct thread_resume): Delete leave_stopped member.
9823 (struct target_ops): Add a `n' argument to the `resume' callback.
9824 * server.c (start_inferior): Adjust.
9825 (handle_v_cont, myresume): Adjust.
9826 * linux-low.c (check_removed_breakpoint): Adjust to resume
9827 interface change, and to removed leave_stopped field.
9828 (resume_ptr): Delete.
9829 (struct thread_resume_array): New.
9830 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9831 resume interface change.
9832 (linux_continue_one_thread, linux_queue_one_thread)
9833 (resume_status_pending_p): Check if the resume field is NULL
9834 instead of checking the leave_stopped member.
9835 (linux_resume): Adjust to the target resume interface change.
9836 * spu-low.c (spu_resume): Adjust to the target resume interface
9838 * win32-low.c (win32_detach, win32_resume): Ditto.
9840 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9842 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9844 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9846 (linux_continue_one_thread): Only preserve the stepping flag if
9847 there's a pending breakpoint.
9849 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9851 * server.c (main): After the inferior having exited, call
9852 remote_close before exiting gdbserver.
9854 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9856 Fix size of FPSCR in Power 7 processors.
9857 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9858 (PPC_FEATURE_HAS_DFP): New #define.
9859 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9862 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9864 * server.c (handle_query) Whitespace and formatting.
9866 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9868 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9869 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9870 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9871 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9872 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9873 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9874 Makefile.in, configure.ac: Fix whitespace throughout.
9875 * configure: Regenerate.
9877 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9879 * inferiors.c (find_inferior): Make it safe for the callback
9880 function to delete the currently iterated inferior.
9882 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9884 * Makefile.in (linuw_low_h): Move higher.
9885 (thread-db.o): Depend on $(linux_low_h).
9887 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9889 Rename "process" to "lwp" throughout.
9891 * linux-low.c (all_processes): Rename to...
9892 (all_lwps): ... this.
9893 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9894 (add_process): Rename to ...
9895 (add_lwp): ... this. Adjust.
9896 (linux_create_inferior): Adjust.
9897 (linux_attach_lwp): Adjust.
9898 (linux_attach): Adjust.
9899 (linux_kill_one_process): Rename to ...
9900 (linux_kill_one_lwp): ... this. Adjust.
9901 (linux_kill): Adjust.
9902 (linux_detach_one_process): Rename to ...
9903 (linux_detach_one_lwp): ... this. Adjust.
9904 (linux_detach): Adjust.
9905 (check_removed_breakpoint): Adjust.
9906 (status_pending_p): Adjust.
9907 (linux_wait_for_process): Rename to ...
9908 (linux_wait_for_lwp): ... this. Adjust.
9909 (linux_wait_for_event): Adjust.
9910 (send_sigstop): Adjust.
9911 (wait_for_sigstop): Adjust.
9912 (stop_all_processes): Rename to ...
9913 (stop_all_lwps): ... this.
9914 (linux_resume_one_process): Rename to ...
9915 (linux_resume_one_lwp): ... this. Adjust.
9916 (linux_set_resume_request, linux_continue_one_thread)
9917 (linux_queue_one_thread, resume_status_pending_p)
9918 (usr_store_inferior_registers, regsets_store_inferior_registers)
9919 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9921 * linux-low.h (get_process): Rename to ...
9922 (get_lwp): ... this. Adjust.
9923 (get_thread_process): Rename to ...
9924 (get_thread_lwp): ... this. Adjust.
9925 (get_process_thread): Rename to ...
9926 (get_lwp_thread): ... this. Adjust.
9927 (struct process_info): Rename to ...
9928 (struct lwp_info): ... this.
9929 (all_processes): Rename to ...
9930 (all_lwps): ... this.
9931 * proc-service.c (ps_lgetregs): Adjust.
9932 * thread-db.c (thread_db_create_event, find_one_thread)
9933 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9935 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9937 * server.c (handle_query): Handle "qAttached".
9939 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9941 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9942 GPLv3, update license URL.
9944 2009-03-01 Doug Evans <dje@google.com>
9946 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9947 (server_h): Add gdb_signals.h.
9948 (signals.o): Update.
9949 * server.h (target_signal_from_host,target_signal_to_host_p)
9950 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9952 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9954 * remote-utils.c (getpkt): Also generate remote-debug
9955 information if noack_mode is set.
9957 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9959 * server.c (handle_query): Report qXfer:siginfo:read and
9960 qXfer:siginfo:write as supported and handle them.
9961 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9962 * linux-low.c (linux_xfer_siginfo): New.
9963 (linux_target_ops): Set it.
9965 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9967 * server.c (gdbserver_usage): Mention --remote-debug.
9968 (main): Accept '--remote-debug' switch.
9970 2009-01-18 Doug Evans <dje@google.com>
9972 * regcache.c (new_register_cache): No need to check result of xcalloc.
9973 * server.c (handle_search_memory): Back out calls to xmalloc,
9974 result is checked and error is returned to user upon failure.
9975 (handle_query): Ditto. Add more checks for result of malloc.
9976 (handle_v_cont): Check result of malloc, report error back to
9978 (handle_v_run): Ditto. Call freeargv.
9979 * server.h (freeargv): Declare.
9980 * utils.c (freeargv): New fn.
9982 2009-01-15 Doug Evans <dje@google.com>
9984 * gdbreplay.c (perror_with_name): Make arg const char *.
9985 * server.h (target_signal_to_name): Make return type const char *.
9986 * thread-db.c (thread_db_err_str): Make return type const char *.
9987 * utils.c (perror_with_name): Make arg const char *.
9989 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9991 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9992 when handling a EXIT_PROCESS_DEBUG_EVENT.
9994 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9996 * gdbreplay.c (gdbreplay_version): Update copyright year.
9997 * server.c (gdbserver_version): Likewise.
9999 2009-01-05 Doug Evans <dje@google.com>
10001 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
10002 (handle_extended_wait): Improve comment.
10004 2008-12-13 Doug Evans <dje@google.com>
10006 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
10007 * server.h (ATTR_MALLOC): New macro.
10008 (xmalloc,xcalloc,xstrdup): Declare.
10009 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
10010 * inferiors.c: Ditto.
10011 * linux-low.c: Ditto.
10012 * mem-break.c: Ditto.
10013 * regcache.c: Ditto.
10014 * remote-utils.c: Ditto.
10017 * win32-low.c: Ditto.
10019 2008-12-12 Doug Evans <dje@google.com>
10021 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
10022 in debugging printf.
10024 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
10026 2008-12-09 Doug Evans <dje@google.com>
10028 * linux-low.h (struct process_info): Delete member tid, unused.
10029 * thread-db.c (find_one_thread): Update.
10030 (maybe_attach_thread): Update.
10032 2008-12-02 Pedro Alves <pedro@codesourcery.com>
10034 * target.h (struct target_ops): Add qxfer_osdata member.
10035 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
10037 (linux_qxfer_osdata): New functions.
10038 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
10040 * server.c (handle_query): Handle "qXfer:osdata:read:".
10041 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
10042 (buffer_xml_printf): New functions.
10043 * server.h (struct buffer): New.
10044 (buffer_grow_str, buffer_grow_str0): New macros.
10045 (buffer_grow, buffer_free, buffer_init, buffer_finish)
10046 (buffer_xml_printf): Declare.
10048 2008-11-24 Doug Evans <dje@google.com>
10050 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
10052 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
10054 * server.c (handle_v_run): Always use the supplied argument list.
10056 2008-11-19 Bob Wilson <bob.wilson@acm.org>
10058 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
10059 (xtensa_regmap_table): Add entry for scompare1.
10061 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
10063 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
10064 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
10065 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
10066 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
10067 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
10068 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
10069 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
10070 XML target descriptions.
10071 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
10072 when inferior is running on an ISA 2.05 or later processor. Add
10073 special case to return offset for full 64-bit slot of FPSCR when
10076 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
10078 * Makefile.in (SFILES, clean): Added sparc64 files.
10079 (reg-sparc64.o, reg-sparc64.c): New.
10080 * configure.srv (sparc*-*-linux*): New configuration.
10081 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
10082 syscall arguments for SPARC.
10083 (regsets_store_inferior_registers): Likewise.
10084 * linux-sparc-low.c: New file.
10086 2008-10-21 Doug Evans <dje@google.com>
10088 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
10089 (READLINE_DIR,READLINE_DEP): Delete.
10090 (INTERNAL_CFLAGS): Update.
10091 (LINTFLAGS): Update.
10093 2008-10-10 Pedro Alves <pedro@codesourcery.com>
10095 * server.c (handle_v_run): If GDB didn't specify an argv, use the
10096 whole argv from the last run, not just argv[0].
10098 2008-09-08 Pedro Alves <pedro@codesourcery.com>
10100 * regcache.c (new_register_cache): Return NULL if the register
10101 cache size isn't known yet.
10102 (free_register_cache): Avoid dereferencing a NULL regcache.
10104 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10106 * configure.srv: Merge MIPS and MIPS64.
10108 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
10110 * Makefile.in (uninstall): Apply $(EXEEXT) too.
10112 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
10114 * Makefile.in: Add required vsx dependencies.
10116 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
10117 Declare init_registers_powerpc_vsx32l.
10118 Declare init_registers_powerpc_vsx64l.
10119 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
10120 (ppc_arch_setup): Check for VSX in hwcap.
10121 (ppc_fill_vsxregset): New function.
10122 (ppc_store_vsxregset): New function.
10123 Add new VSX entry in regset_info target_regsets.
10125 * configure.srv: Add new VSX dependencies.
10127 2008-08-12 Pedro Alves <pedro@codesourcery.com>
10129 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
10130 (remote_open): Set or clear transport_is_reliable.
10131 (putpkt_binary): Don't expect acks in noack mode.
10132 (getpkt): Don't send ack/nac in noack mode.
10133 * server.c (handle_general_set): Handle QStartNoAckMode.
10134 (handle_query): If connected by tcp pass QStartNoAckMode+ in
10136 (main): Reset noack_mode on every connection.
10137 * server.h (noack_mode): Declare.
10139 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
10141 * Makefile.in (GDBREPLAY_OBS): New variable.
10142 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
10144 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
10145 Daniel Jacobowitz <dan@codesourcery.com>
10147 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
10148 (usr_store_inferior_registers): Likewise.
10149 (regsets_store_inferior_registers): Likewise.
10151 2008-07-31 Rolf Jansen <rj@surtec.com>
10152 Pedro Alves <pedro@codesourcery.com>
10154 * configure.ac: Check for memmem declaration.
10155 * server.c [HAVE_MALLOC_H]: Include malloc.h.
10156 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
10157 (disable_packet_qfThreadInfo): Unconditionally compile.
10158 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
10159 * configure, config.in: Regenerate.
10161 2008-07-28 Doug Kwan <dougkwan@google.com>
10163 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
10164 (linux_write_memory): Remove declaration of errno.
10166 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
10168 * linux-low.c (handle_extended_wait): Do not use "status"
10169 variable uninitialized.
10171 2008-07-07 Pedro Alves <pedro@codesourcery.com>
10173 * server.c (handle_v_attach): Inhibit reporting dll changes.
10175 2008-06-27 Pedro Alves <pedro@codesourcery.com>
10177 * remote-utils.c (prepare_resume_reply): If requested, don't
10178 output "thread:TID" in the T stop reply.
10180 * server.c (disable_packet_vCont, disable_packet_Tthread)
10181 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
10182 (handle_query): If requested, disable support for qC, qfThreadInfo
10184 (handle_v_requests): If requested, disable support for vCont.
10185 (gdbserver_show_disableable): New.
10186 (main): Handle --disable-packet and --disable-packet=LIST.
10188 * server.h (disable_packet_vCont, disable_packet_Tthread)
10189 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
10191 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
10193 * server.c (gdbserver_usage): Mention --version.
10195 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
10197 * Makefile.in (gdbreplay.o): New rule.
10199 2008-06-06 Joseph Myers <joseph@codesourcery.com>
10201 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
10202 message, not gdbserver.
10204 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
10205 Nathan Sidwell <nathan@codesourcery.com>
10206 Joseph Myers <joseph@codesourcery.com>
10208 * acinclude.m4: Include ../../config/acx.m4.
10209 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
10210 * configure, config.in: Regenerate.
10211 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
10212 * server.c (gdbserver_version): Print PKGVERSION.
10213 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
10214 (main): Adjust gdbserver_usage calls.
10215 * gdbreplay.c (version, host_name): Add declarations.
10216 (gdbreplay_version, gdbreplay_usage): New.
10217 (main): Accept --version and --help options.
10219 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
10221 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
10222 (arm_breakpoint_at): Handle Thumb.
10223 (the_low_target): Add comment.
10225 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10227 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10229 2008-05-09 Doug Evans <dje@google.com>
10231 * server.h (decode_search_memory_packet): Declare.
10232 * remote-utils.c (decode_search_memory_packet): New fn.
10233 * server.c (handle_search_memory_1): New fn.
10234 (handle_search_memory): New fn.
10235 (handle_query): Process qSearch:memory packets.
10237 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10239 * regcache.c (registers_length): Remove.
10240 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10241 full register packet.
10242 * regcache.h (registers_length): Remove prototype.
10243 * server.h (PBUFSIZ): Define to 16384.
10245 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10247 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10248 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10249 powerpc-64l.o, and powerpc-altivec64l.o.
10250 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10251 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10252 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10253 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10254 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10257 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10258 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10259 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10260 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10261 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10262 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10263 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10264 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10265 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10266 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10269 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10270 (init_registers_powerpc_32l): ... this new prototype.
10271 (init_registers_powerpc_32): Remove, replace by ...
10272 (init_registers_powerpc_altivec32l): ... this new prototype.
10273 (init_registers_powerpc_e500): Remove, replace by ...
10274 (init_registers_powerpc_e500l): ... this new prototype.
10275 (init_registers_ppc64): Remove, replace by ...
10276 (init_registers_powerpc_64l): ... this new prototype.
10277 (init_registers_powerpc_64): Remove, replace by ...
10278 (init_registers_powerpc_altivec64l): ... this new prototype.
10279 (ppc_num_regs): Set to 73.
10280 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10281 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10282 (ppc_cannot_store_register): Handle orig_r3 and trap.
10283 (ppc_arch_setup): Update init_registers_... calls.
10284 (ppc_fill_gregset): Handle orig_r3 and trap.
10286 * inferiors.c (clear_inferiors): Reset current_inferior.
10288 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
10290 * acinclude.m4: Add override.m4.
10291 * configure: Regenerate.
10293 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10295 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10296 initial call to init_register_ppc64.
10298 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10300 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10301 single powerpc*-*-linux* case.
10302 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10304 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10306 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
10307 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
10309 * linux-ppc-low.c: Include <elf.h>.
10310 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10311 (ppc_hwcap): New global variable.
10312 (ppc_regmap): Remove __SPE__ #ifdef sections.
10313 (ppc_regmap_e500): New global variable.
10314 (ppc_cannot_store_register): Update __SPE__ special case.
10315 (ppc_get_hwcap): New function.
10316 (ppc_arch_setup): Use it to determine whether inferior supports
10317 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10318 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10319 Do not access registers if target does not support AltiVec.
10320 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10321 Do not access registers if target does not support SPE.
10322 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10324 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10326 * linux-low.c (disabled_regsets, num_regsets): New.
10327 (use_regsets_p): Delete.
10328 (linux_wait_for_process): Clear disabled_regsets.
10329 (regsets_fetch_inferior_registers): Check and set it.
10330 (regsets_store_inferior_registers): Likewise.
10331 (linux_fetch_registers, linux_store_registers): Do not use
10333 (initialize_low): Allocate disabled_regsets.
10335 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10337 * Makefile.in (LIBOBJS): New.
10338 (OBS): Use LIBOBJS.
10339 (memmem.o): New rule.
10340 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10341 * configure: Regenerated.
10343 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10345 * server.c (handle_query): Never return "unsupported" for
10346 qXfer:features:read queries.
10348 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10350 * server.c (get_features_xml): Fix inverted condition.
10351 (handle_query): Always support qXfer:feature:read.
10353 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10355 * server.c (wrapper_argv): New.
10356 (start_inferior): Handle wrapper_argv. If set, expect an extra
10358 (gdbserver_usage): Document --wrapper.
10359 (main): Parse --wrapper.
10361 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10363 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10364 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10365 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10366 (ppc_set_pc): Likewise.
10367 (ppc_arch_setup): New function.
10368 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10369 of collect_register.
10370 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10372 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10374 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10375 instead of linux-ppc64-low.o.
10376 * linux-ppc64-low.c: Remove file.
10377 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10378 (linux-ppc64-low.o): Remove rule.
10380 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10381 (init_registers_powerpc_64): Likewise.
10382 (ppc_regmap): Conditionally define depending on __powerpc64__.
10383 (ppc_cannot_store_register): Do not special-case "fpscr" when
10384 compiled on __powerpc64__.
10385 (ppc_collect_ptrace_register): New function.
10386 (ppc_supply_ptrace_register): New function.
10387 (ppc_breakpoint): Change type to "unsigned int".
10388 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10389 (the_low_target): Conditionally provide initializers for the
10390 arch_setup member depending on __powerpc64__. Install
10391 collect_ptrace_register and supply_ptrace_register members.
10393 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10395 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10396 * server.c (gdbserver_xmltarget): Define.
10397 (get_features_xml): Use it to replace "target.xml" and arch_string.
10399 * configure.srv: Remove srv_xmltarget. Add XML files that were
10400 mentioned there to srv_xmlfiles instead. Remove conditional tests
10401 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10402 srv_xmlfiles and srv_regobj to include all possible choices.
10403 * configure.ac (srv_xmltarget): Remove.
10404 (srv_xmlfiles): Do not add "target.xml".
10405 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10406 checks for supplementary target information.
10407 * configure: Regenerate.
10408 * Makefile.in (XML_TARGET): Remove.
10409 (target.xml): Remove rule.
10410 (clean): Do not clean up target.xml.
10411 (.PRECIOUS): Do not mention target.xml.
10413 * target.h (struct target_ops): Remove arch_string member.
10414 * linux-low.c (linux_arch_string): Remove.
10415 (linux_target_ops): Remove arch_string initializer.
10416 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10417 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10418 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10419 * spu-low.c (spu_arch_string): Remove.
10420 (spu_target_ops): Remove arch_string initializer.
10421 * win32-low.c (win32_arch_string): Remove.
10422 (win32_target_ops): Remove arch_string initializer.
10423 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10424 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10425 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10427 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10429 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10430 by collect_ptrace_register and supply_ptrace_register hooks.
10431 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10432 instead of checking for the_low_target.left_pad_xfer.
10433 (usr_store_inferior_registers): Use collect_ptrace_register callback
10434 instead of checking for the_low_target.left_pad_xfer.
10436 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10437 (s390_supply_ptrace_register): Likewise.
10438 (s390_fill_gregset): Call s390_collect_ptrace_register.
10439 (the_low_target): Update.
10441 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10442 (ppc_supply_ptrace_register): Likewise.
10443 (the_low_target): Update.
10445 * linux-i386-low.c (the_low_target): Update.
10446 * linux-x86-64-low.c (the_low_target): Update.
10448 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10450 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10451 reg-s390.o and reg-s390x.o.
10453 * linux-low.c (new_inferior): New global variable.
10454 (linux_create_inferior, linux_attach): Set it.
10455 (linux_wait_for_process): Call the_low_target.arch_setup after the
10456 target has stopped for the first time.
10457 (initialize_low): Do not call the_low_target.arch_setup.
10459 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10460 (s390_set_pc): Likewise.
10461 (s390_arch_setup): New function.
10462 (the_low_target): Use s390_arch_setup as arch_setup routine.
10464 * regcache.c (realloc_register_cache): New function.
10465 (set_register_cache): Call it for each existing regcache.
10467 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10469 * server.h (init_registers): Remove prototype.
10471 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10472 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10473 instead of init_registers ().
10474 * linux-arm-low.c (init_registers_arm): Add prototype.
10475 (init_registers_arm_with_iwmmxt): Likewise.
10476 (the_low_target): Add initializer for arch_setup field.
10477 * linux-cris-low.c (init_registers_cris): Add prototype.
10478 (the_low_target): Add initializer for arch_setup field.
10479 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10480 (the_low_target): Add initializer for arch_setup field.
10481 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10482 (the_low_target): Add initializer for arch_setup field.
10483 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10484 (the_low_target): Add initializer for arch_setup field.
10485 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10486 (the_low_target): Add initializer for arch_setup field.
10487 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10488 (the_low_target): Add initializer for arch_setup field.
10489 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10490 (init_registers_mips64_linux): Likewise.
10491 (the_low_target): Add initializer for arch_setup field.
10492 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10493 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10494 (the_low_target): Add initializer for arch_setup field.
10495 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10496 (init_registers_powerpc_64): Likewise.
10497 (the_low_target): Add initializer for arch_setup field.
10498 * linux-s390-low.c (init_registers_s390): Add prototype.
10499 (init_registers_s390x): Likewise.
10500 (the_low_target): Add initializer for arch_setup field.
10501 * linux-sh-low.c (init_registers_sh): Add prototype.
10502 (the_low_target): Add initializer for arch_setup field.
10503 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10504 (the_low_target): Add initializer for arch_setup field.
10505 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10506 (the_low_target): Add initializer for arch_setup field.
10508 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10509 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10510 instead of init_registers ().
10511 * win32-arm-low.c (init_registers_arm): Add prototype.
10512 (the_low_target): Add initializer for arch_setup field.
10513 * win32-i386-low.c (init_registers_i386): Add prototype.
10514 (the_low_target): Add initializer for arch_setup field.
10516 * spu-low.c (init_registers_spu): Add prototype.
10517 (initialize_low): Call initialie_registers_spu () instead of
10518 initialize_registers ().
10520 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10522 * server.c (handle_v_requests): When handling the vRun and vAttach
10523 packets, if already debugging a process, don't kill it. Return an
10526 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10528 * server.c (handle_query): Correct length check.
10530 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10532 * win32-low.c (do_initial_child_stuff): Add process handle
10533 parameter. Set current_process_handle and current_process_id from the
10534 parameters. Clear globals.
10535 (win32_create_inferior): Don't set current_process_handle and
10536 current_process_id here. Instead pass them on the call to
10537 do_initial_child_stuff.
10538 (win32_attach): Likewise.
10539 (win32_clear_inferiors): New.
10540 (win32_kill): Don't close the current process handle or the
10541 current thread handle here. Instead call win32_clear_inferiors.
10542 (win32_detach): Don't open a new handle to the process. Call
10543 win32_clear_inferiors.
10544 (win32_join): Don't rely on current_process_handle; open a new
10545 handle using the process id.
10546 (win32_wait): Call win32_clear_inferiors when the inferior process
10549 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10551 * server.c (monitor_show_help): Add "exit".
10553 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10555 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10556 (clean): Add reg-xtensa.c.
10557 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10558 * configure.srv (xtensa*-*-linux*) New target.
10559 * linux-xtensa-low.c: New.
10560 * xtensa-xtregs.c: New.
10562 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10564 * hostio.c: Don't include errno.h.
10565 (errno_to_fileio_errno): Move to hostio-errno.
10566 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10567 error number outputting to the target->hostio_last_error callback.
10568 (hostio_packet_error): Use FILEIO_EINVAL directly.
10569 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10570 calls to hostio_error.
10571 * hostio-errno.c: New.
10572 * server.h (hostio_last_error_from_errno): Declare.
10573 * target.h (target_ops): Add hostio_last_error member.
10574 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10575 as hostio_last_error handler.
10576 * spu-low.c (spu_target_ops): Likewise.
10577 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10578 (wince_hostio_last_error): New functions.
10579 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10580 as hostio_last_error handler.
10581 (win32_target_ops) [!_WIN32_WCE]: Register
10582 hostio_last_error_from_errno as hostio_last_error handler.
10583 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10584 (hostio-errno.o): New rule.
10585 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10586 * configure.srv (srv_hostio_err_objs): New variable. Default to
10588 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10589 * configure: Regenerate.
10591 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10593 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10594 (linux_kill, linux_detach): Clean up the process list.
10595 * remote-utils.c (remote_open): Improve port number parsing.
10596 (putpkt_binary, input_interrupt): Only send interrupts if the target
10598 * server.c (extended_protocol): Make static.
10599 (attached): Define earlier.
10600 (exit_requested, response_needed, program_argv): New variables.
10601 (target_running): New.
10602 (start_inferior): Clear attached here.
10603 (attach_inferior): Set attached here.
10604 (require_running): Define.
10605 (handle_query): Use require_running and target_running. Implement
10607 (handle_v_attach, handle_v_run): New.
10608 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10609 (gdbserver_usage): Update.
10610 (main): Redo argument parsing. Handle --debug and --multi. Handle
10611 --attach along with other options or after the port. Save
10612 program_argv. Support no initial program. Resynchronize
10613 communication with GDB after an error. Handle "monitor exit".
10614 Use require_running and target_running. Always allow the extended
10615 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10616 restart in extended mode.
10617 * README: Refer to the GDB manual. Update --attach usage.
10619 2007-12-20 Andreas Schwab <schwab@suse.de>
10621 * linux-low.c (STACK_SIZE): Define.
10622 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10623 (linux_test_for_tracefork): Likewise.
10625 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10627 * linux-low.c (linux_wait_for_event): Update messages. Do not
10628 reinsert auto-delete breakpoints.
10629 * mem-break.c (struct breakpoint): Change return type of handler to
10631 (set_breakpoint_at): Update handler type.
10632 (reinsert_breakpoint_handler): Return 1 instead of calling
10634 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10636 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10637 * mem-break.h (set_breakpoint_at): Update handler type.
10638 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10639 * win32-low.c (auto_delete_breakpoint): New.
10640 (get_child_debug_event): Use it.
10642 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10644 * configure.ac: Check for pread and pwrite.
10645 * hostio.c (handle_pread): Fall back to lseek and read.
10646 (handle_pwrite): Fall back to lseek and write.
10647 * config.in, configure: Regenerated.
10649 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10651 * server.c (myresume): Add own_buf argument.
10652 (main): Update calls.
10654 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10656 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10657 * remote-utils.c (remote_open): Do not call disable_async_io.
10658 (block_async_io): Delete.
10659 (unblock_async_io): Make static.
10660 (initialize_async_io): New.
10661 * server.c (handle_v_cont): Handle async I/O here.
10662 (myresume): Likewise. Move other common resume tasks here...
10663 (main): ... from here. Call initialize_async_io. Disable async
10664 I/O before the main loop.
10665 * server.h (initialize_async_io): Declare.
10666 (block_async_io, unblock_async_io): Delete prototypes.
10667 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10669 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10671 * remote-utils.c (readchar): Allow binary data in received messages.
10673 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10675 * win32-low.c (attaching): New global.
10676 (win32_create_inferior): Clear the `attaching' global.
10677 (win32_attach): Set the `attaching' global.
10678 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10679 attaching. Only set a breakpoint at the entry point if not
10682 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10684 * server.c (main): Don't report dll events on the initial
10685 connection on attaches.
10687 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10689 * server.c (main): Relax numerical bases supported for the pid of
10690 the --attach command line argument.
10692 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10694 * win32-low.c (win32_attach): Call OpenProcess before
10695 DebugActiveProcess, not after. Add last error output to error
10698 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10700 * win32-low.c (win32_get_thread_context)
10701 (win32_set_thread_context): New functions.
10702 (thread_rec): Use win32_get_thread_context.
10703 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10704 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10707 2007-12-03 Leo Zayas
10708 Pedro Alves <pedro_alves@portugalmail.pt>
10710 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10712 (child_add_thread): Minor cleanup.
10713 (child_continue): Resume artificially suspended threads before
10714 calling ContinueDebugEvent.
10715 (suspend_one_thread): New.
10716 (fake_breakpoint_event): New.
10717 (get_child_debug_event): Change return type to int. Check here if
10718 gdb sent an interrupt request. If a soft interrupt was requested,
10719 fake a breakpoint event. Return 0 if there is no event to handle,
10721 (win32_wait): Don't check here if gdb sent an interrupt request.
10722 Ensure there is a valid event to handle.
10723 (win32_request_interrupt): Add soft interruption method as last
10726 2007-12-03 Leo Zayas
10727 Pedro Alves <pedro_alves@portugalmail.pt>
10729 * win32-low.h (win32_thread_info): Add descriptions to the
10730 structure members. Replace `suspend_count' counter by a
10732 * win32-low.c (thread_rec): Update condition of when to get the
10733 context from the inferior. Rely on ContextFlags being set if it
10734 has already been retrieved. Only suspend the inferior thread if
10735 we haven't already. Warn if that fails.
10736 (continue_one_thread): s/suspend_count/suspended/. Only call
10737 ResumeThread once. Warn if that fails.
10739 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10741 * win32-low.c (win32_wait): Don't read from the inferior when it
10742 has already exited.
10744 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10746 * Makefile.in (win32_low_h): New variable.
10747 (win32-low.o): Add dependency on $(win32_low_h).
10748 (win32-arm-low.o, win32-i386-low.o): New rules.
10750 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10752 * hostio.c: Correct copyright year.
10754 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10756 * Makefile.in (OBS): Add hostio.o.
10757 (hostio.o): New rule.
10758 * server.h (handle_vFile): Declare.
10759 * hostio.c: New file.
10760 * server.c (handle_v_requests): Take packet_len and new_packet_len
10761 for binary packets. Call handle_vFile.
10762 (main): Update call to handle_v_requests.
10764 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10766 * linux-low.c: Include <sched.h>.
10768 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10770 * linux-low.c (linux_tracefork_grandchild): New.
10771 (linux_tracefork_child): Use clone.
10772 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10774 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10776 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10778 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10780 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10782 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10784 * inferiors.c (change_inferior_id): Delete.
10785 (add_pid_to_list, pull_pid_from_list): New.
10786 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10787 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10788 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10789 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10790 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10791 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10792 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10793 (using_threads): Always set to 1.
10794 (handle_extended_wait): New.
10795 (add_process): Do not set TID.
10796 (linux_create_inferior): Set must_set_ptrace_flags.
10797 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10798 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10799 (linux_thread_alive): Rename TID argument to LWPID.
10800 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10801 (linux_wait_for_event): Do not use TID or check using_threads. Update
10802 call to dead_thread_notify. Call handle_extended_wait.
10803 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10804 (send_sigstop): Delete sigstop_sent.
10805 (wait_for_sigstop): Avoid TID.
10806 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10807 (linux_test_for_tracefork): New.
10808 (linux_lookup_signals): Use thread_db_active and
10809 linux_supports_tracefork_flag.
10810 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10811 * linux-low.h (get_process_thread): Avoid TID.
10812 (struct process_ifo): Move thread_known and tid to the end. Remove
10814 (linux_attach_lwp, thread_db_init): Update prototypes.
10815 * server.h (change_inferior_id): Delete prototype.
10816 (add_pid_to_list, pull_pid_from_list): New prototypes.
10817 * thread-db.c (thread_db_use_events): New.
10818 (find_first_thread): Rename to...
10819 (find_one_thread): ...this. Update callers and messages. Do not
10820 call fatal. Check thread_db_use_events. Do not call
10821 change_inferior_id or new_thread_notify.
10822 (maybe_attach_thread): Update. Do not call new_thread_notify.
10823 (thread_db_init): Set thread_db_use_events. Check use_events.
10824 * utils.c (fatal, warning): Correct message prefix.
10826 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10828 * Makefile.in (clean): Remove new files.
10829 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10830 (powerpc-64.o, powerpc-64.c): New rules.
10831 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10832 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10834 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10836 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10837 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10838 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10839 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10840 (target_regsets): Add AltiVec and SPE register sets.
10841 * configure.ac: Check for AltiVec and SPE.
10842 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10843 (ppc_fill_vrregset, ppc_store_vrregset): New.
10844 (target_regsets): Add AltiVec register set.
10845 * configure: Regenerated.
10847 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10849 * linux-low.c (O_LARGEFILE): Define.
10850 (linux_read_memory): Use /proc/PID/mem.
10851 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10852 * configure, config.in: Regenerated.
10854 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10856 * linux-low.c (linux_wait_for_event): Do not pass signals while
10859 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10861 * win32-low.c (create_process): New.
10862 (win32_create_inferior): Use create_process instead of
10863 CreateProcess. If create_process failed retry appending an ".exe"
10864 suffix. Store the GetLastError result immediatelly after
10865 create_process calls and use it on the call to error.
10867 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10869 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10871 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10873 * configure.ac: Switch license to GPLv3.
10875 2007-08-01 Michael Snyder <msnyder@access-company.com>
10877 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10879 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10881 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10883 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10884 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10885 CloseToolhelp32Snapshot.
10886 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10887 CloseToolhelp32Snapshot.
10889 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10891 * server.c (main): Check for inferior exit before main loop.
10893 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10895 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10896 instead of on tmp_desc.
10898 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10899 Daniel Jacobowitz <dan@codesourcery.com>
10901 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10902 (add_thread): Minor cleanups.
10903 (clear_inferiors): Move lower in the file. Clear the DLL
10905 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10906 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10907 (xml_escape_text): New.
10908 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10910 (handle_v_cont): Report errors.
10911 (gdbserver_version): Update.
10912 (main): Correct size of own_buf. Do not report initial DLL events.
10913 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10914 (unloaded_dll, xml_escape_text): New.
10915 * win32-low.c (enum target_waitkind): Update comments.
10916 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10917 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10918 (win32_EnumProcessModules, win32_GetModuleInformation)
10919 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10920 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10921 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10922 (win32_Module32First, win32_Module32Next, load_toolhelp)
10923 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10924 (get_child_debug_event): Handle DLL events.
10925 (win32_wait): Likewise.
10927 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10929 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10930 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10932 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10934 * win32-low.c (handle_output_debug_string): Ignore event if not
10937 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10939 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10941 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10943 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10945 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10947 * inferiors.c (change_inferior_id): Add comment.
10948 * linux-low.c (check_removed_breakpoint): Add an early
10949 prototype. Improve debug output.
10950 (linux_attach): Doc update.
10951 (linux_detach_one_process, linux_detach): Clean up before releasing
10953 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10954 * linux-low.h (struct process_info): Doc improvement.
10955 * mem-break.c (delete_all_breakpoints): New.
10956 * mem-break.h (delete_all_breakpoints): New prototype.
10957 * thread-db.c (find_first_thread): New.
10958 (thread_db_create_event): Call it instead of
10959 thread_db_find_new_threads. Clean up unused variables.
10960 (maybe_attach_thread): Remove first thread handling.
10961 (thread_db_find_new_threads): Use find_first_thread.
10962 (thread_db_get_tls_address): Likewise.
10964 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10966 * thread-db.c (thread_db_find_new_threads): Add prototype.
10967 (thread_db_create_event): Check for the main thread before adding
10969 (maybe_attach_thread): Only enable event reporting if TID == 0.
10970 (thread_db_get_tls_address): Check for new threads.
10972 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10974 * linux-low.c (linux_create_inferior): Try execv before execvp.
10975 * spu-low.c (spu_create_inferior): Likewise.
10977 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10979 * linux-low.c (linux_create_inferior): Change execv to execvp.
10980 * spu-low.c (spu_create_inferior): Likewies.
10982 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10984 * Makefile.in (clean): Clean new files instead of deleted ones.
10985 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10986 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10988 * configure.srv: Specify XML files and new regformats for MIPS and
10990 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10991 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10992 an entry for the restart register.
10993 (mips_cannot_fetch_register, mips_cannot_store_register)
10994 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10995 register names to match the XML descriptions.
10996 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10997 restart register instead of $0.
10999 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11000 Markus Deuling <deuling@de.ibm.com>
11002 * remote-utils.c (decode_xfer_write): New function.
11003 * server.h (decode_xfer_write): Add prototype.
11004 * server.c (handle_query): Add PACKET_LEN argument. Support
11005 qXfer:spu:read and qXfer:spu:write packets.
11006 (main): Pass packet_len to handle_query.
11007 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
11008 * target.h (target_ops): Add qxfer_spu.
11010 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
11012 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
11013 accessing non-seekable spufs files.
11015 2007-05-16 Markus Deuling <deuling@de.ibm.com>
11017 * server.c (handle_query): Add reply for qC packet.
11019 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11020 Leo Zayas <lerele@champenstudios@com>
11022 * server.h (check_remote_input_interrupt_request): New function.
11023 * remote_utils.c (INVALID_DESCRIPTOR): New define.
11024 (remote_desc): Initialize with INVALID_DESCRIPTOR.
11025 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
11026 (check_remote_input_interrupt_request): New function.
11027 * server.h (check_remote_input_interrupt_request): Declare.
11028 * win32-low.c (winapi_DebugBreakProcess,
11029 winapi_GenerateConsoleCtrlEvent): New typedefs.
11030 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
11032 (win32_wait): Check for remote interrupt request
11033 with check_remote_input_interrupt_request.
11034 (win32_request_interrupt): New function.
11035 (win32_target_op): Set request_interrupt to win32_request_interrupt.
11037 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11039 * win32-low.c (debug_registers_changed,
11040 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
11041 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
11042 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
11043 (thread_rec): Get context using the low target.
11044 (child_add_thread): Call thread_added on the low target,
11045 which does the same thing.
11047 (do_initial_child_stuff): Remove debug registers references.
11048 Set context using the low target. Resume threads after
11049 setting the contexts.
11050 (child_continue): Remove dead variable. Remove debug
11051 registers references.
11052 (child_fetch_inferior_registers): Go through the low target.
11053 (do_child_store_inferior_registers): Remove.
11054 (child_store_inferior_registers): Go through the low target.
11055 (win32_resume): Remove debug registers references.
11056 Set context using the low target.
11057 (handle_exception): Change return type to void. Don't record
11058 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
11059 first chance exception.
11060 (get_child_debug_event): Change return type to void. Remove
11061 goto loop. Always return after waiting for debug event.
11062 (win32_wait): Convert to switch statement. Handle spurious
11065 * win32-i386-low.c (debug_registers_changed,
11066 debug_registers_used): New.
11067 (initial_stuff): Rename to ...
11068 (i386_initial_stuff): ... this. Clear debug registers
11070 (store_debug_registers): Delete.
11071 (i386_get_thread_context): New.
11072 (load_debug_registers): Delete.
11073 (i386_set_thread_context): New.
11074 (i386_thread_added): New.
11075 (single_step): Rename to ...
11076 (i386_single_step): ... this.
11077 (do_fetch_inferior_registers): Rename to ...
11078 (i386_fetch_inferior_register): ... this.
11079 (i386_store_inferior_register): New.
11080 (the_low_target): Adapt to new interface.
11082 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
11083 (arm_get_thread_context): New.
11084 (arm_set_thread_context): New.
11086 (do_fetch_inferior_registers): Rename to ...
11087 (arm_fetch_inferior_register): ... this.
11088 (arm_store_inferior_register): New.
11089 (arm_wince_breakpoint): Reimplement as unsigned long.
11090 (arm_wince_breakpoint_len): Define.
11091 (the_low_target): Adapt to new interface.
11093 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
11094 load_debug_registers. Add get_thread_context, set_thread_context,
11095 thread_added and store_inferior_register. Rename
11096 fetch_inferior_registers to fetch_inferior_register.
11097 (regptr): Remove declaration.
11099 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11101 * linux-low.c (linux_detach): Change return type to int. Return 0.
11102 * spu-low.c (spu_detach): Likewise.
11104 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11106 * target.h (target_ops): Change return type of detach to int.
11108 (join_inferior): New.
11109 * server.c (main): Don't skip detach support on mingw32.
11110 If the inferior doesn't support detaching return error.
11111 Call join_inferior instead of using waitpid.
11112 * linux-low.c (linux_join): New.
11113 (linux_target_op): Add linux_join.
11114 * spu-low.c (spu_join): New.
11115 (spu_target_ops): Add spu_join.
11116 * win32-low.c (win32_detach): Adapt to new interface.
11117 Reopen current_process_handle before detaching. Issue a child
11118 resume before detaching.
11120 (win32_target_op): Add win32_join.
11122 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11124 * win32-low.c (win32-attach): Fix return value.
11125 * target.h (target_ops): Describe ATTACH return values.
11127 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11129 * win32-low.c (GETPROCADDRESS): Define.
11130 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
11131 (winapi_DebugSetProcessKillOnExit): Likewise.
11132 (win32_create_inferior): Force usage of ansi CreateProcessA.
11133 (win32_attach): Use GETPROCADDRESS.
11134 (win32_detach): Likewise.
11136 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
11138 * win32-low.c (win32_wait): Don't use WSTOPSIG.
11140 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
11142 * win32-low.c: Commit leftover changes from 2007-03-29.
11144 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11146 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
11147 fields short instead of int. Add explicit padding.
11148 (i387_cache_to_fsave): Remove unnecessary casts.
11149 (i387_fsave_to_cache): Doc fix.
11150 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
11152 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
11154 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
11155 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
11157 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11159 * configure.srv (arm*-*-mingw32ce*): Move near the other
11162 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
11164 * configure.ac: Add errno checking.
11165 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
11166 sys/file.h and malloc.h.
11167 (AC_CHECK_DECLS): Add perror.
11168 (srv_mingwce): Handle.
11169 * configure.srv (i[34567]86-*-cygwin*): Add
11170 win32-i386-low.o to srv_tgtobj.
11171 (i[34567]86-*-mingw*): Likewise.
11172 (arm*-*-mingw32ce*): Add case.
11173 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11174 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
11175 [__MINGW32CE__] (strerror): New function.
11176 [__MINGW32CE__] (errno): Define to GetLastError.
11177 [__MINGW32CE__] (COUNTOF): New macro.
11178 (remote_open): Remove extra close call.
11179 * mem-break.c (delete_breakpoint_at): New function.
11180 * mem-break.h (delete_breakpoint_at): Declare.
11181 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
11182 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
11183 [USE_WIN32API] (read, write): Add char* casts.
11184 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
11185 * server.h: Include wincecompat.h on Windows CE.
11186 [HAVE_ERRNO_H]: Check.
11187 (perror): Declare if not declared.
11188 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
11189 (perror_with_name): Remove errno declaration.
11190 * wincecompat.h: New.
11191 * wincecompat.c: New.
11192 * win32-low.h: New.
11193 * win32-arm-low.c: New.
11194 * win32-i386-low.c: New.
11195 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
11196 (OUTMSG2): Make it safe.
11198 (COUNTOF): New macro.
11199 (NUM_REGS): Get it from the low target.
11200 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
11201 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
11202 (thread_rec): Let low target handle debug registers.
11203 (child_add_thread): Likewise.
11204 (child_init_thread_list): Likewise.
11205 (continue_one_thread): Likewise.
11207 (do_child_fetch_inferior_registers): Move to ...
11208 * win32-i386-low.c: ... here, and rename to ...
11209 (do_fetch_inferior_registers): ... this.
11210 * win32-low.c (child_fetch_inferior_registers):
11211 Go through the low target.
11212 (do_child_store_inferior_registers): Use regptr.
11213 (strwinerror): New function.
11214 (win32_create_inferior): Handle Windows CE.
11215 Use strwinerror instead of strerror on Windows error
11216 codes. Add program to the error output.
11217 Don't close the main thread handle on Windows CE.
11218 (win32_attach): Use coredll.dll on Windows CE.
11219 (win32_kill): Close current process and current
11221 (win32_detach): Use coredll.dll on Windows CE.
11222 (win32_resume): Let low target handle debug registers, and
11224 (handle_exception): Add/Remove initial breakpoint. Avoid
11225 non-existant WSTOPSIG on Windows CE.
11226 (win32_read_inferior_memory): Cast to remove warning.
11227 (win32_arch_string): Go through the low target.
11228 (initialize_low): Call set_breakpoint_data with the low
11229 target's breakpoint.
11230 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11231 FOP_REGNUM, mappings): Move to ...
11232 * win32-i386-low.c: ... here.
11233 * win32-low.c (win32_thread_info): Move to ...
11234 * win32-low.h: ... here.
11235 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11236 win32-arm-low.c and wincecompat.c.
11237 (all:): Add $EXEEXT.
11238 (install-only:): Likewise.
11239 (gdbserver:): Likewise.
11240 (gdbreplay:): Likewise.
11241 * config.in: Regenerate.
11242 * configure: Regenerate.
11244 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11246 * win32-low.c: Rename typedef thread_info to
11247 win32_thread_info throughout.
11249 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11251 * win32-i386-low.c: Rename to ...
11252 * win32-low.c: ... this.
11253 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11254 * Makefile.in: Likewise.
11256 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11258 * remote-utils.c (monitor_output): Constify msg parameter.
11259 * server.h (monitor_output): Likewise.
11260 * win32-i386-low.c (handle_output_debug_string): New.
11261 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11262 handle_output_debug_string.
11263 (get_child_debug_event): Likewise.
11265 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11267 * server.c (main): Correct strtoul check.
11269 2007-03-27 Jon Ringle <jon@ringle.org>
11271 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11273 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11275 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11277 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11279 * terminal.h: Check HAVE_SGTTY_H.
11281 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
11283 * remote-utils.c (remote_open): Print out the assigned port number.
11285 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11287 * remote-utils.c (monitor_output): New function.
11288 * server.c (debug_threads): Define here.
11289 (monitor_show_help): New function.
11290 (handle_query): Handle qRcmd.
11291 (main): Do not handle 'd' packet.
11292 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11293 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11296 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11298 * Makefile.in (EXEEXT): New.
11299 (clean): Use $(EXEEXT).
11301 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11303 * target.h (target_ops): Rename send_signal to request_interrupt,
11304 and remove enum target_signal parameter.
11305 * linux-low.c (linux_request_interrupt): Rename from
11306 linux_send_signal, and always send SIGINT.
11307 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11308 and always send SIGINT.
11309 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11311 (input_interrupt): Likewise.
11313 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11315 * server.c (get_features_xml): Check if target implemented
11317 * win32-i386-low.c (win32_arch_string): New.
11318 (win32_target_ops): Add win32_arch_string as arch_string member.
11320 2007-02-22 Markus Deuling <deuling@de.ibm.com>
11322 * spu-low.c (spu_arch_string): New.
11323 (spu_target_ops): Add spu_arch_string.
11325 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11327 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11328 * configure.ac: Do not check for terminal.h.
11329 * configure, config.in: Regenerated.
11331 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11333 * Makefile.in (OBS): Add $(XML_BUILTIN).
11334 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11336 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11337 (arm-with-iwmmxt.c): New.
11338 * config.in, configure: Regenerate.
11339 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11340 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11341 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11342 (arm*-*-linux*): Add iWMMXt and regset support.
11343 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11344 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11345 (arm_store_wmmxregset, target_regsets): New.
11346 * server.c (get_features_xml): Take annex argument. Check builtin
11348 (handle_query): Handle multiple annexes.
11350 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11352 * remote-utils.c [USE_WIN32API] (read, write): Define.
11353 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11356 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11358 * linux-i386-low.c (the_low_target): Set arch_string.
11359 * linux-x86-64-low.c (the_low_target): Likewise.
11360 * linux-low.c (linux_arch_string): New.
11361 (linux_target_ops): Add it.
11362 * linux-low.h (struct linux_target_ops): Add arch_string.
11363 * server.c (write_qxfer_response): Use const void * for DATA.
11364 (get_features_xml): New.
11365 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11366 * target.h (struct target_ops): Add arch_string method.
11368 2007-01-03 Denis Pilat <denis.pilat@st.com>
11369 Daniel Jacobowitz <dan@codesourcery.com>
11371 * linux-low.c (linux_kill): Handle being called with no threads.
11372 * win32-i386-low.c (win32_kill): Likewise.
11373 (get_child_debug_event): Clear current_process_handle.
11375 2006-12-30 Denis PILAT <denis.pilat@st.com>
11376 Daniel Jacobowitz <dan@codesourcery.com>
11378 * remote-utils.c (remote_open): Check the type of specified
11379 serial port devices before opening them.
11380 * server.c (main): Kill the inferior if an error occurs during
11381 the first remote_open.
11383 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11385 * README: Update supported targets.
11387 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11389 * Makefile.in (clean): Remove reg-mips64.c.
11390 (reg-mips64.c, reg-mips64.o): New rules.
11391 * configure.srv: Handle mips64. Include regset support for mips.
11392 * linux-mips-low.c (union mips_register): New.
11393 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11394 (mips_breakpoint, mips_breakpoint_at): Use int.
11395 (mips_collect_register, mips_supply_register)
11396 (mips_collect_register_32bit, mips_supply_register_32bit)
11397 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11398 (mips_store_fpregset, target_regsets): New.
11399 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11401 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11403 * configure.srv: Add target "spu*-*-*".
11404 * Makefile.in (clean): Remove reg-spu.c.
11405 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11406 * spu-low.c: New file.
11408 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11410 * configure.ac: Correct td_thr_tls_get_addr test.
11411 * configure: Regenerated.
11413 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11415 * linux-low.c (linux_wait_for_event): Reformat. Use the
11416 pass_signals array.
11417 * remote-utils.c (decode_address_to_semicolon): New.
11418 * server.c (pass_signals, handle_general_set): New.
11419 (handle_query): Mention QPassSignals for qSupported.
11420 (main): Call handle_general_set.
11421 * server.h (pass_signals, decode_address_to_semicolon): New.
11423 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11425 * server.c (handle_query): Correct error handling for read_auxv.
11427 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11429 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11430 and srv_linux_thread_db to yes.
11431 * linux-s390-low.c (s390_fill_gregset): New function.
11432 (target_regsets): Define data structure.
11434 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11436 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11437 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11438 * config.in, configure: Regenerated.
11439 * inferiors.c (gdb_id_to_thread): New function.
11440 (gdb_id_to_thread_id): Use it.
11441 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11442 * linux-low.h (struct process_info): Add th member.
11443 (thread_db_get_tls_address): New prototype.
11444 * remote-utils.c (decode_address): Make non-static.
11445 * server.c (handle_query): Handle qGetTLSAddr.
11446 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11447 * target.h (struct target_ops): Add get_tls_address.
11448 * thread-db.c (maybe_attach_thread): Save the thread handle.
11449 (thread_db_get_tls_address): New.
11451 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11453 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11454 (linux_resume_one_process): Take a siginfo_t *. Update all
11455 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11456 (struct pending_signals): Add a siginfo_t.
11457 (linux_wait_for_process): Always set last_status.
11458 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11459 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11460 * linux-low.h (struct process_info): Add last_status.
11462 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11464 * remote-utils.c (try_rle): New function.
11465 (putpkt_binary): Use it.
11467 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11469 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11470 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11471 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11472 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11473 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11476 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11478 * server.c (terminal_fd): New variable.
11479 (old_foreground_pgrp): Likewise.
11480 (restore_old_foreground_pgrp): New function.
11481 (start_inferior): Record the terminal file descriptor in terminal_fd
11482 and its original foreground group in old_foreground_pgrp. Register
11483 restore_old_foreground_pgrp with atexit().
11485 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11487 * server.c (handle_query): Correct qPart to qXfer.
11489 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11491 * configure.ac: Check for more headers which are missing on
11492 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11493 * configure.srv: Add Cygwin and mingw32.
11494 * remote-utils.c: Don't include headers unconditionally which
11495 are missing on mingw32. Include <winsock.h> for mingw32.
11496 (remote_open): Adjust for mingw32 support. Flush
11497 standard error after writing to it.
11498 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11499 (unblock_async_io, enable_async_io, disable_async_io)
11500 (readchar, getpkt): Update for Winsock support.
11501 (prepare_resume_reply): Expect a protocol signal number.
11502 * server.c: Disable <sys/wait.h> on mingw32.
11503 (start_inferior): Adjust for mingw32 support. Flush
11504 standard error after writing to it.
11505 (attach_inferior): Likewise. Use protocol signal
11507 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11509 * win32-i386-low.c: New file.
11510 * Makefile.in (XM_CLIBS): Set.
11511 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11512 (win32-i386-low.o): New dependency rule.
11513 * linux-low.c (linux_wait): Use target signal numbers.
11514 * target.h (struct target_ops): Doc fix.
11515 * server.h (target_signal_to_name): New prototype.
11516 * gdbreplay.c: Don't include headers unconditionally which
11517 are missing on mingw32. Include <winsock.h> for mingw32.
11518 (remote_close, remote_open): Adjust for Winsock support.
11519 * configure, config.in: Regenerated.
11521 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11523 * server.c (decode_xfer_read, write_qxfer_response): New.
11524 (handle_query): Take a packet length argument. Handle
11525 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11526 the qSupported response.
11527 (main): Update call to handle_query.
11529 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11531 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11532 (putpkt_binary): Renamed from putpkt and adjusted for binary
11534 (putpkt): New wrapper for putpkt_binary.
11535 (readchar): Don't mask off the high bit.
11536 (decode_X_packet): New function.
11537 * server.c (main): Call putpkt_binary if a handler sets the packet
11538 length. Save the length of the incoming packet. Handle 'X'.
11539 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11541 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11543 * server.c (handle_query): Handle qSupported.
11545 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11547 * remote-utils.c (all_symbols_looked_up): New variable.
11548 (look_up_one_symbol): Check it.
11549 * server.h (look_up_one_symbol): New declaration.
11550 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11552 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11554 * Makefile.in (linux-arm-low.o): Update dependencies.
11555 * linux-arm-low.c: Include "gdb_proc_service.h".
11556 (PTRACE_GET_THREAD_AREA): Define.
11557 (ps_get_thread_area): New function.
11559 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11561 * configure.srv (m68k*-*-uclinux*): New target.
11562 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11563 (linux_resume_one_process): Remove extraneous cast.
11564 (linux_read_offsets): New.
11565 (linux_target_op): Add linux_read_offsets on mmuless systems.
11566 * server.c (handle_query): Add qOffsets logic.
11567 * target.h (struct target_ops): Add read_offsets.
11569 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11571 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11572 (PTRACE_GET_THREAD_AREA): Define.
11573 (ps_get_thread_area): New function.
11574 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11575 (linux-x86-64-low.o): Update.
11577 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11579 * configure.ac: Remove checks for prfpregset_t.
11580 * gdb_proc_service.h: New file.
11581 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11582 new "gdb_proc_service.h".
11583 * proc-service.c: Likewise.
11584 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11585 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11586 * Makefile.in (gdb_proc_service_h): Updated.
11587 * configure, config.in: Regenerated.
11589 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11591 * remote-utils.c (prepare_resume_reply): Move declaration
11592 of gdb_id_from_wait to the top of the block.
11594 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11596 * linux-low.c (regsets_store_inferior_registers): Read the regset
11597 from the target before filling it.
11599 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11601 * server.c (attach_inferior): Return SIGTRAP for a successful
11604 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11606 * Makefile.in (OBS): Add version.o.
11607 (STAGESTUFF): Delete.
11608 (version.o): Add dependencies.
11609 (version.c): Replace rule.
11610 (clean): Remove version.c.
11611 * server.c (gdbserver_version): New.
11612 (gdbserver_usage): Use printf.
11613 (main): Handle --version and --help.
11614 * server.h (version, host_name): Add declarations.
11616 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11628 * linux-x86-64-low.c:
11630 * linux-s390-low.c:
11631 * linux-ppc64-low.c:
11633 * linux-mips-low.c:
11634 * linux-m68k-low.c:
11635 * linux-m32r-low.c:
11638 * linux-ia64-low.c:
11639 * linux-i386-low.c:
11640 * linux-crisv32-low.c:
11652 * gdbserver.1: Add (C) after Copyright. Update the FSF
11655 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11657 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11658 (arm_breakpoint_at): Recognize both breakpoints.
11659 (the_low_target): Use the correct breakpoint instruction.
11661 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11663 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11664 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11665 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11666 (the_low_target): Update.
11668 2005-10-25 Andreas Schwab <schwab@suse.de>
11670 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11672 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11673 (ia64_num_regs): Reduce to 462.
11675 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11677 * acinclude.m4: Correct quoting.
11678 * aclocal.m4: Regenerated.
11680 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11681 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11682 (thread_db_init): Call thread_db_err_str.
11683 * configure.ac: Check for TD_VERSION.
11684 * config.in, configure: Regenerated.
11686 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11688 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11690 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11692 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11693 is not available. Define HAVE_PTRACE_GETREGS if it is.
11694 * config.in, configure: Regenerated.
11695 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11696 * linux-i386-low.c, linux-m68k-low.c: Update to use
11697 HAVE_PTRACE_GETREGS.
11698 * linux-low.c (regsets_fetch_inferior_registers)
11699 (regsets_store_inferior_registers): Only return 0 if we processed
11701 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11702 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11704 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11706 * inferiors.c (struct thread_info): Add gdb_id.
11707 (add_thread): Add gdb_id argument.
11708 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11709 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11710 calls to add_thread.
11711 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11712 * server.c (handle_query): Use thread_to_gdb_id.
11713 (handle_v_cont, main): Use gdb_id_to_thread_id.
11714 * server.h (add_thread): Update prototype.
11715 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11718 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11720 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11721 left-padded registers.
11722 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11723 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11725 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11727 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11728 * configure: Regenerate.
11729 * config.in: Regenerate.
11730 * server.h (NEED_DECLARATION_STRERROR):
11731 Replace with !HAVE_DECL_STRERROR.
11733 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11735 * linux-low.c (linux_wait, linux_send_signal): Don't test
11736 an unsigned long variable for > 0 if it could be MAX_ULONG.
11737 * server.c (myresume): Likewise.
11738 * target.c (set_desired_inferior): Likewise.
11740 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11742 * configure.ac: Simplify and improve check for socklen_t.
11743 * configure, config.in: Regenerate.
11745 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11747 * acconfig.h: Remove.
11748 * configure.ac: Add a test for socklen_t. Use three-argument
11749 AC_DEFINE throughout.
11750 * config.in: Regenerated using autoheader 2.59.
11751 * configure: Regenerated.
11753 * gdbreplay.c (socklen_t): Provide a default.
11754 (remote_open): Use socklen_t.
11755 * remote-utils.c (socklen_t): Provide a default.
11756 (remote_open): Use socklen_t.
11757 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11760 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11762 * linux-low.c (linux_read_memory, linux_write_memory)
11763 (linux_read_auxv): Likewise.
11764 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11765 (check_mem_write): Likewise.
11766 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11768 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11769 (registers_from_string, register_data): Likewise.
11770 * server.c (handle_query, main): Likewise.
11771 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11772 (decode_M_packet): Likewise.
11773 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11774 * target.h (struct target_ops): Update read_memory, write_memory,
11776 (read_inferior_memory, write_inferior_memory): Update.
11777 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11778 to unsigned char *.
11779 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11780 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11781 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11782 linux-s390-low.c, linux-sh-low.c: Update for changes in
11783 read_inferior_memory and the_low_target->breakpoint.
11785 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11787 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11788 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11789 * configure.srv: Add powerpc64-*-linux*.
11790 * linux-ppc64-low.c: New file.
11792 2005-05-23 Orjan Friberg <orjanf@axis.com>
11794 * linux-cris-low.c: New file with support for CRIS.
11795 * linux-crisv32-low.c: Ditto for CRISv32.
11796 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11797 (clean): Add reg-cris.c and reg-crisv32.c.
11798 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11799 reg-crisv32.o, and reg-crisv32.c to make rules.
11800 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11801 recognized targets.
11803 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11805 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11806 of sizeof (PTRACE_XFER_TYPE).
11807 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11809 2005-05-12 Orjan Friberg <orjanf@axis.com>
11811 * target.h (struct target_ops): Add insert_watchpoint,
11812 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11813 pointers for hardware watchpoint support.
11814 * linux-low.h (struct linux_target_ops): Ditto.
11815 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11816 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11817 to linux_target_ops.
11818 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11820 * server.c (main): Recognize 'Z' and 'z' packets.
11822 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11824 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11825 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11826 (the_low_target): Add new members.
11828 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11830 * proc-service.c (ps_lgetregs): Search all_processes instead of
11833 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11835 * server.c (start_inferior): Change return type to int.
11836 (attach_inferior): Change sigptr to int *.
11837 (handle_v_cont, handle_v_requests): Change signal to int *.
11838 (main): Change signal to int.
11840 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11842 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11843 * configure.srv: Add m32r*-*-linux*.
11844 * linux-m32r-low.c: New file.
11846 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11848 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11850 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11852 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11853 Take unsigned long arguments for PIDs.
11854 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11855 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11856 (wait_for_sigstop, linux_resume_one_process)
11857 (regsets_fetch_inferior_registers, linux_send_signal)
11858 (linux_read_auxv): Likewise. Update the types of variables holding
11859 PIDs. Update format string specifiers.
11860 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11861 * remote-utils.c (prepare_resume_reply): Likewise.
11862 * server.c (cont_thread, general_thread, step_thread)
11863 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11865 (handle_query): Update format specifiers.
11866 (handle_v_cont, main): Use strtoul for thread IDs.
11867 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11868 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11869 (general_thread, step_thread, thread_from_wait)
11870 (old_thread_from_wait): Update.
11871 * target.h (struct thread_resume): Use unsigned long for THREAD.
11872 (struct target_ops): Use unsigned long for arguments to attach and
11875 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11877 * acinclude.m4: Include bfd/bfd.m4 directly.
11878 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11879 <agriffis@toolchain.org>.
11880 * aclocal.m4, configure: Regenerated.
11882 2005-01-07 Andrew Cagney <cagney@gnu.org>
11884 * configure.ac: Rename configure.in, require autoconf 2.59.
11885 * configure: Re-generate.
11887 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11889 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11890 LIBS when finished.
11891 * aclocal.m4: Regenerated.
11892 * configure: Regenerated.
11894 2004-11-21 Andreas Schwab <schwab@suse.de>
11896 * linux-m68k-low.c (m68k_num_gregs): Define.
11897 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11898 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11899 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11900 (m68k_breakpoint_at): New. Add to the_low_target.
11902 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11903 srv_linux_thread_db to yes.
11905 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11907 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11908 (ARCH_SET_FS): Likewise.
11909 (ARCH_GET_FS): Likewise.
11910 (ARCH_GET_GS): Likewise.
11912 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11914 * linux-i386-low.c (ps_get_thread_area): New.
11915 * linux-x86-64-low.c (ps_get_thread_area): New.
11916 * linux-low.c: Include <sys/syscall.h>.
11917 (linux_kill_one_process): Don't kill the first thread here.
11918 (linux_kill): Kill the first thread here.
11919 (kill_lwp): New function.
11920 (send_sigstop, linux_send_signal): Use it.
11921 * proc-service.c: Clean up #ifdefs.
11922 (fpregset_info): Delete.
11923 (ps_lgetregs): Update and enable implementation.
11924 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11926 * remote-utils.c (struct sym_cache, symbol_cache): New.
11927 (input_interrupt): Print a clearer message.
11928 (async_io_enabled): New variable.
11929 (enable_async_io, disable_async_io): Use it. Update comments.
11930 (look_up_one_symbol): Use the symbol cache.
11931 * thread-db.c (thread_db_look_up_symbols): New function.
11932 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11934 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11936 * configure.in: Test for -rdynamic.
11937 * configure: Regenerated.
11938 * Makefile (INTERNAL_LDFLAGS): New.
11939 (gdbserver, gdbreplay): Use it.
11941 2004-09-02 Andrew Cagney <cagney@gnu.org>
11943 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11945 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11947 * linux-low.c (linux_wait): Clear all_processes list also.
11949 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11951 * linux-low.c: Include <errno.h>. Remove extern declaration of
11954 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11956 * gdbreplay.c, server.h, utils.c: Update copyright years.
11958 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11960 * server.c (main): Print child status or termination signal from
11961 variable 'signal', not 'sig'.
11963 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11965 * linux-low.c (linux_read_memory): Change return type to
11966 int. Check for and return error from ptrace().
11967 * target.c (read_inferior_memory): Change return type to int. Pass
11968 back return status from the_target->read_memory().
11969 * target.h (struct target_ops): Adapt *read_memory() prototype.
11971 (read_inferior_memory): Adapt prototype.
11972 * server.c (main): Return an error packet if
11973 read_inferior_memory() returns an error.
11975 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11977 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11978 Unify with other clean targets.
11980 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11982 * server.c (handle_v_cont): Call set_desired_inferior.
11984 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11986 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11988 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11990 * linux-low.c (linux_wait): Unblock async I/O.
11991 (linux_resume): Block and enable async I/O.
11992 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11993 * server.h (block_async_io, unblock_async_io): Add prototypes.
11995 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11997 * remote-utils.c (remote_open): Print a status notice after
11998 opening a TCP port.
11999 * server.c (attach_inferior): Print a status notice after
12002 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
12004 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
12006 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
12008 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
12010 * server.c, target.h: Update copyright years.
12012 2004-02-25 Roland McGrath <roland@redhat.com>
12014 * target.h (struct target_ops): New member `read_auxv'.
12015 * server.c (handle_query): Handle qPart:auxv:read: query using that.
12016 * linux-low.c (linux_read_auxv): New function.
12017 (linux_target_ops): Initialize `read_auxv' member to that.
12019 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
12021 Committed by Jim Blandy <jimb@redhat.com>.
12023 * linux-s390-low.c (s390_num_regs): Update.
12024 (s390_regmap): Remove control registers. Use __s390x__ predefine
12025 instead of GPR_SIZE to distiguish s390 and s390x targets.
12027 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
12029 * linux-low.c: Update copyright year.
12030 (check_removed_breakpoint): Clear pending_is_breakpoint.
12031 (linux_set_resume_request, linux_queue_one_thread)
12032 (resume_status_pending_p): New functions.
12033 (linux_continue_one_thread): Use process->resume.
12034 (linux_resume): Only resume threads if there are no pending events.
12035 * linux-low.h (struct process_info): Add resume request
12038 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
12040 * regcache.c (new_register_cache): Clear the allocated register
12041 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
12043 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
12045 * linux-low.c (linux_resume): Take a struct thread_resume *
12047 (linux_wait): Update call.
12048 (resume_ptr): New static variable.
12049 (linux_continue_one_thread): Renamed from
12050 linux_continue_one_process. Use resume_ptr.
12051 (linux_resume): Use linux_continue_one_thread.
12052 * server.c (handle_v_cont, handle_v_requests): New functions.
12053 (myresume): New function.
12054 (main): Handle 'v' case.
12055 * target.h (struct thread_resume): New type.
12056 (struct target_ops): Change argument of "resume" to struct
12058 (myresume): Delete macro.
12060 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
12062 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
12063 (uninstall): Support DESTDIR.
12065 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
12067 * configure.srv: Add xscale*linux copy of arm*linux entry.
12069 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
12071 * linux-arm-low.c (arm_reinsert_addr): New function.
12072 (the_low_target): Add arm_reinsert_addr.
12074 2003-07-08 Mark Kettenis <kettenis@gnu.org>
12076 * mem-break.c: Remove whitespace at end of file.
12078 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12080 * configure.in: Check whether we need to prototype strerror.
12081 * server.h: Optionally prototype strerror.
12082 * gdbreplay.c (perror_with_name): Use strerror.
12083 * linux-low.c (linux_attach_lwp): Use strerror.
12084 * utils.c (perror_with_name): Use strerror.
12085 * config.in, configure: Regenerated.
12087 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
12089 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
12090 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
12092 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
12094 * Makefile.in (SFILES): Update.
12095 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
12096 low-sun3.c: Remove files.
12098 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
12100 * linux-low.c: Move comment to linux_thread_alive where it belonged.
12101 (linux_detach_one_process, linux_detach): New functions.
12102 (linux_target_ops): Add linux_detach.
12103 * server.c (main): Handle 'D' packet.
12104 * target.h (struct target_ops): Add "detach" member.
12105 (detach_inferior): Define.
12107 2003-06-13 Mark Kettenis <kettenis@gnu.org>
12109 From Kelley Cook <kelleycook@wideopenwest.com>:
12110 * configure.srv: Accept i[34567]86 variants.
12112 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
12114 * linux-low.c (linux_wait_for_event): Correct comment typos.
12115 (linux_resume_one_process): Call check_removed_breakpoint.
12116 (linux_send_signal): New function.
12117 (linux_target_ops): Add linux_send_signal.
12118 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
12120 * target.h (struct target_ops): Add send_signal.
12122 2003-05-29 Jim Blandy <jimb@redhat.com>
12124 * linux-low.c (usr_store_inferior_registers): Transfer buf in
12125 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
12126 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
12127 away part of the register's value.
12129 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
12131 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
12132 (linux_wait_for_event, linux_init_signals): Likewise.
12134 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
12136 * configure.in: Check for stdlib.h.
12137 * configure: Regenerated.
12138 * config.in: Regenerated.
12140 2003-01-04 Andreas Schwab <schwab@suse.de>
12142 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
12144 2003-01-02 Andrew Cagney <ac131313@redhat.com>
12146 * Makefile.in: Remove obsolete code.
12148 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
12150 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
12151 defined(PT_FPR0_HI).
12153 2002-11-17 Stuart Hughes <seh@zee2.com>
12155 * linux-arm-low.c (arm_num_regs): Increase.
12156 (arm_regmap): Include status register.
12158 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
12160 * linux-low.c (register_addr): Remove incorrect -1 check.
12162 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
12164 * linux-low.c (linux_create_inferior): Call setpgid. Return
12166 (unstopped_p, linux_signal_pid): Remove.
12167 (linux_target_ops): Remove linux_signal_pid.
12168 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
12169 global instead of target method.
12170 * target.h (struct target_ops): Remove signal_pid. Update comment
12171 for create_inferior.
12172 * server.c (signal_pid): New variable.
12173 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
12174 gdbserver. Set the child to be the foreground process group.
12175 (attach_inferior): Set signal_pid.
12177 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
12179 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
12181 2002-08-20 Jim Blandy <jimb@redhat.com>
12183 * Makefile.in (LDFLAGS): Allow the configure script to establish a
12186 2002-08-01 Andrew Cagney <cagney@redhat.com>
12188 * Makefile.in: Make chill references obsolete.
12190 2002-07-24 Kevin Buettner <kevinb@redhat.com>
12192 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
12193 * configure: Regenerate.
12194 * config.in: Regenerate.
12196 2002-07-09 David O'Brien <obrien@FreeBSD.org>
12198 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
12199 (perror_with_name, remote_close, remote_open, expect, play): Static.
12201 2002-07-04 Michal Ludvig <mludvig@suse.cz>
12203 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
12204 byte offsets instead of an array of indexes.
12205 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
12207 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
12209 * regcache.c: Add comment.
12211 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
12213 * thread-db.c: New file.
12214 * proc-service.c: New file.
12215 * acinclude.m4: New file.
12216 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
12217 proc-service.o, and thread-db.o.
12218 (linux-low.o): Add USE_THREAD_DB.
12219 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
12220 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
12221 * aclocal.m4: Regenerated.
12222 * config.in: Regenerated.
12223 * configure: Regenerated.
12224 * configure.in: Check for proc_service.h, sys/procfs.h,
12225 thread_db.h, and linux/elf.h headrs.
12226 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12227 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12228 Check for -lthread_db and thread support.
12229 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12230 PowerPC, and SuperH.
12231 * i387-fp.c: Constify arguments.
12232 * i387-fp.h: Likewise.
12233 * inferiors.c: (struct thread_info): Renamed from
12234 `struct inferior_info'. Remove PID member. Use generic inferior
12235 list header. All uses updated.
12236 (inferiors, signal_pid): Removed.
12237 (all_threads): New variable.
12238 (get_thread): Define.
12239 (add_inferior_to_list): New function.
12240 (for_each_inferior): New function.
12241 (change_inferior_id): New function.
12242 (add_inferior): Removed.
12243 (remove_inferior): New function.
12244 (add_thread): New function.
12245 (free_one_thread): New function.
12246 (remove_thread): New function.
12247 (clear_inferiors): Use for_each_inferior and free_one_thread.
12248 (find_inferior): New function.
12249 (find_inferior_id): New function.
12250 (inferior_target_data): Update argument type.
12251 (set_inferior_target_data): Likewise.
12252 (inferior_regcache_data): Likewise.
12253 (set_inferior_regcache_data): Likewise.
12254 * linux-low.c (linux_bp_reinsert): Remove.
12255 (all_processes, stopping_threads, using_thrads)
12256 (struct pending_signals, debug_threads, pid_of): New.
12257 (inferior_pid): Replace with macro.
12258 (struct inferior_linux_data): Remove.
12259 (get_stop_pc, add_process): New functions.
12260 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12261 Use add_process and add_thread.
12262 (linux_attach_lwp): New function, based on old linux_attach. Use
12263 add_process and add_thread. Set stop_expected for new threads.
12264 (linux_attach): New function.
12265 (linux_kill_one_process): New function.
12266 (linux_kill): Kill all LWPs.
12267 (linux_thread_alive): Use find_inferior_id.
12268 (check_removed_breakpoints, status_pending_p): New functions.
12269 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12270 Update. Use WNOHANG. Wait for cloned processes also. Update process
12271 struct for the found process.
12272 (linux_wait_for_event): New function.
12273 (linux_wait): Use it. Support LWPs.
12274 (send_sigstop, wait_for_sigstop, stop_all_processes)
12275 (linux_resume_one_process, linux_continue_one_process): New functions.
12276 (linux_resume): Support LWPs.
12277 (REGISTER_RAW_SIZE): Remove.
12278 (fetch_register): Use register_size instead. Call supply_register.
12279 (usr_store_inferior_registers): Likewise. Call collect_register.
12280 Fix recursive case.
12281 (regsets_fetch_inferior_registers): Improve error message.
12282 (regsets_store_inferior_registers): Add debugging.
12283 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12284 (unstopped_p, linux_signal_pid): New functions.
12285 (linux_target_ops): Add linux_signal_pid.
12286 (linux_init_signals): New function.
12287 (initialize_low): Call it. Initialize using_threads.
12288 * regcache.c (inferior_regcache_data): Add valid
12290 (get_regcache): Fetch registers lazily. Add fetch argument
12291 and update all callers.
12292 (regcache_invalidate_one, regcache_invalidate): New
12294 (new_register_cache): Renamed from create_register_cache.
12295 Return the new regcache.
12296 (free_register_cache): Change argument to a void *.
12297 (registers_to_string, registers_from_string): Call get_regcache
12298 with fetch flag set.
12299 (register_data): Make static. Pass fetch flag to get_regcache.
12300 (supply_register): Call get_regcache with fetch flag clear.
12301 (collect_register): Call get_regcache with fetch flag set.
12302 (collect_register_as_string): New function.
12303 * regcache.h: Update.
12304 * remote-utils.c (putpkt): Flush after debug output and use
12306 Handle input interrupts while waiting for an ACK.
12307 (input_interrupt): Use signal_pid method.
12308 (getpkt): Flush after debug output and use stderr.
12309 (outreg): Use collect_register_as_string.
12310 (new_thread_notify, dead_thread_notify): New functions.
12311 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12312 and general_thread.
12313 (look_up_one_symbol): Flush after debug output.
12314 * server.c (step_thread, server_waiting): New variables.
12315 (start_inferior): Don't use signal_pid. Update call to mywait.
12316 (attach_inferior): Update call to mywait.
12317 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12318 (main): Don't fetch/store registers explicitly. Use
12319 set_desired_inferior. Support proposed ``Hs'' packet. Update
12321 * server.h: Update.
12322 (struct inferior_list, struct_inferior_list_entry): New.
12323 * target.c (set_desired_inferior): New.
12324 (write_inferior_memory): Constify.
12325 (mywait): New function.
12326 * target.h: Update.
12327 (struct target_ops): New signal_pid method.
12328 (mywait): Removed macro, added prototype.
12330 * linux-low.h (regset_func): Removed.
12331 (regset_fill_func, regset_store_func): New.
12332 (enum regset_type): New.
12333 (struct regset_info): Add type field. Use new operation types.
12334 (struct linux_target_ops): stop_pc renamed to get_pc.
12335 Add decr_pc_after_break and breakpoint_at.
12336 (get_process, get_thread_proess, get_process_thread)
12337 (strut process_info, all_processes, linux_attach_lwp)
12338 (thread_db_init): New.
12340 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12341 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12342 (the_low_target): Add new members.
12343 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12344 (i386_store_fpxregset): Constify.
12345 (target_regsets): Add new kind identifier.
12346 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12347 (i386_set_pc): Add debugging.
12348 (i386_breakpoint_at): New function.
12349 (the_low_target): Add new members.
12350 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12351 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12352 (mips_breakpoint_at): New.
12353 (the_low_target): Add new members.
12354 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12355 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12356 (the_low_target): Add new members.
12357 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12358 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12359 (the_low_target): Add new members.
12360 * linux-x86-64-low.c (target_regsets): Add new kind
12363 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12365 From Martin Pool <mbp@samba.org>:
12366 * server.c (gdbserver_usage): New function.
12369 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12371 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12372 stop_at -> stop_pc.
12374 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12376 * Makefile.in: Remove obsolete code.
12378 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12380 * linux-low.c (regsets_fetch_inferior_registers),
12381 (regsets_store_inferior_registers): Removed cast to int from
12383 * regcache.h: Added declaration of struct inferior_info.
12385 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12387 * inferiors.c (struct inferior_info): Add regcache_data.
12388 (add_inferior): Call create_register_cache.
12389 (clear_inferiors): Call free_register_cache.
12390 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12391 * regcache.c (struct inferior_regcache_data): New.
12392 (registers): Remove.
12393 (get_regcache): New function.
12394 (create_register_cache, free_register_cache): New functions.
12395 (set_register_cache): Don't initialize the register cache here.
12396 (registers_to_string, registers_from_string, register_data): Call
12398 * regcache.h: Add prototypes.
12399 * server.h: Likewise.
12401 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12403 * mem-break.c: New file.
12404 * mem-break.h: New file.
12405 * Makefile.in: Add mem-break.o rule; update server.h
12407 * inferiors.c (struct inferior_info): Add target_data
12409 (clear_inferiors): Free target_data member if set.
12410 (inferior_target_data, set_inferior_target_data): New functions.
12411 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12412 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12413 * linux-low.c (linux_bp_reinsert): New variable.
12414 (struct inferior_linux_data): New.
12415 (linux_create_inferior): Use set_inferior_target_data.
12416 (linux_attach): Likewise. Call add_inferior.
12417 (linux_wait_for_one_inferior): New function.
12418 (linux_wait): Call it.
12419 (linux_write_memory): Add const.
12420 (initialize_low): Call set_breakpoint_data.
12421 * linux-low.h (struct linux_target_ops): Add breakpoint
12423 * server.c (attach_inferior): Remove extra add_inferior
12425 * server.h: Include mem-break.h. Update inferior.c
12427 * target.c (read_inferior_memory)
12428 (write_inferior_memory): New functions.
12429 * target.h (read_inferior_memory)
12430 (write_inferior_memory): Change macros to prototypes.
12431 (struct target_ops): Update comments. Add const to write_memory
12434 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12436 * linux-low.c (usr_store_inferior_registers): Support
12437 registers which are allowed to fail to store.
12438 * linux-low.h (linux_target_ops): Likewise.
12439 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12440 (ppc_cannot_store_register): FPSCR may not be storable.
12442 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12444 * server.h: Include <string.h> if HAVE_STRING_H.
12445 * ChangeLog: Correct paths in last ChangeLog entry.
12447 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12449 * linux-low.h: Remove obsolete prototypes.
12450 (struct linux_target_ops): New.
12451 (extern the_low_target): New.
12452 * linux-low.c (num_regs, regmap): Remove declarations.
12453 (register_addr): Use the_low_target explicitly.
12454 (fetch_register): Likewise.
12455 (usr_fetch_inferior_registers): Likewise.
12456 (usr_store_inferior_registers): Likewise.
12457 * linux-arm-low.c (num_regs): Remove.
12458 (arm_num_regs): Define.
12459 (arm_regmap): Renamed from regmap, made static.
12460 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12462 (arm_cannot_store_register): Renamed from cannot_store_register,
12464 (the_low_target): New.
12465 * linux-i386-low.c (num_regs): Remove.
12466 (i386_num_regs): Define.
12467 (i386_regmap): Renamed from regmap, made static.
12468 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12470 (i386_cannot_store_register): Renamed from cannot_store_register,
12472 (the_low_target): New.
12473 * linux-ia64-low.c (num_regs): Remove.
12474 (ia64_num_regs): Define.
12475 (ia64_regmap): Renamed from regmap, made static.
12476 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12478 (ia64_cannot_store_register): Renamed from cannot_store_register,
12480 (the_low_target): New.
12481 * linux-m68k-low.c (num_regs): Remove.
12482 (m68k_num_regs): Define.
12483 (m68k_regmap): Renamed from regmap, made static.
12484 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12486 (m68k_cannot_store_register): Renamed from cannot_store_register,
12488 (the_low_target): New.
12489 * linux-mips-low.c (num_regs): Remove.
12490 (mips_num_regs): Define.
12491 (mips_regmap): Renamed from regmap, made static.
12492 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12494 (mips_cannot_store_register): Renamed from cannot_store_register,
12496 (the_low_target): New.
12497 * linux-ppc-low.c (num_regs): Remove.
12498 (ppc_num_regs): Define.
12499 (ppc_regmap): Renamed from regmap, made static.
12500 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12502 (ppc_cannot_store_register): Renamed from cannot_store_register,
12504 (the_low_target): New.
12505 * linux-s390-low.c (num_regs): Remove.
12506 (s390_num_regs): Define.
12507 (s390_regmap): Renamed from regmap, made static.
12508 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12510 (s390_cannot_store_register): Renamed from cannot_store_register,
12512 (the_low_target): New.
12513 * linux-sh-low.c (num_regs): Remove.
12514 (sh_num_regs): Define.
12515 (sh_regmap): Renamed from regmap, made static.
12516 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12518 (sh_cannot_store_register): Renamed from cannot_store_register,
12520 (the_low_target): New.
12521 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12522 (the_low_target): New.
12524 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12526 * Makefile.in: Add stamp-h target.
12527 * configure.in: Create stamp-h.
12528 * configure: Regenerated.
12530 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12532 * inferiors.c: New file.
12533 * target.c: New file.
12534 * target.h: New file.
12535 * Makefile.in: Add target.o and inferiors.o. Update
12537 * linux-low.c (inferior_pid): New static variable,
12538 moved from server.c.
12539 (linux_create_inferior): Renamed from create_inferior.
12540 Call add_inferior. Return 0 on success instead of a PID.
12541 (linux_attach): Renamed from myattach.
12542 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12543 (linux_thread_alive): Renamed from mythread_alive.
12544 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12546 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12547 (regsets_store_inferior_registers): Correct error message.
12548 Add missing ``return 0''.
12549 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12550 (linux_store_registers): Renamed from store_inferior_registers.
12551 (linux_read_memory): Renamed from read_inferior_memory.
12552 (linux_write_memory): Renamed from write_inferior_memory.
12553 (linux_target_ops): New structure.
12554 (initialize_low): Call set_target_ops ().
12555 * remote-utils.c (unhexify): New function.
12556 (hexify): New function.
12557 (input_interrupt): Send signals to ``signal_pid''.
12558 * server.c (inferior_pid): Remove.
12559 (start_inferior): Update create_inferior call.
12560 (attach_inferior): Call add_inferior.
12561 (handle_query): New function.
12562 (main): Call handle_query for `q' packets.
12563 * server.h: Include "target.h". Remove obsolete prototypes.
12564 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12566 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12568 * Makefile.in: Add WARN_CFLAGS. Update configury
12570 * configure.in: Check for <string.h>
12571 * configure: Regenerate.
12572 * config.in: Regenerate.
12573 * gdbreplay.c: Include needed system headers.
12574 (remote_open): Remove strchr prototype.
12575 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12576 * regcache.c (supply_register): Change buf argument to const void *.
12577 (supply_register_by_name): Likewise.
12578 (collect_register): Change buf argument to void *.
12579 (collect_register_by_name): Likewise.
12580 * regcache.h: Add missing prototypes.
12581 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12582 * server.c (handle_query): New function.
12583 (attached): New static variable, moved out of main.
12584 (main): Quiet longjmp clobber warnings.
12585 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12586 * utils.c (error): Remove NORETURN.