]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Move aarch64_relocate_instruction to arch/aarch64-insn.c
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
246994ce
YQ
12015-10-12 Yao Qi <yao.qi@linaro.org>
2
3 * linux-aarch64-low.c (extract_signed_bitfield): Remove.
4 (aarch64_decode_ldr_literal): Move to gdb/arch/aarch64-insn.c.
5 (aarch64_relocate_instruction): Likewise.
6 (struct aarch64_insn_data): Move to gdb/arch/aarch64-insn.h.
7 (struct aarch64_insn_visitor): Likewise.
8
0badd99f
YQ
92015-10-12 Yao Qi <yao.qi@linaro.org>
10
11 * linux-aarch64-low.c (struct aarch64_insn_data): New.
12 (struct aarch64_insn_visitor): New.
13 (struct aarch64_insn_relocation_data): New.
14 (aarch64_ftrace_insn_reloc_b): New function.
15 (aarch64_ftrace_insn_reloc_b_cond): Likewise.
16 (aarch64_ftrace_insn_reloc_cb): Likewise.
17 (aarch64_ftrace_insn_reloc_tb): Likewise.
18 (aarch64_ftrace_insn_reloc_adr): Likewise.
19 (aarch64_ftrace_insn_reloc_ldr_literal): Likewise.
20 (aarch64_ftrace_insn_reloc_others): Likewise.
21 (visitor): New.
22 (aarch64_relocate_instruction): Use visitor.
23
dfaffe9d
YQ
242015-10-12 Yao Qi <yao.qi@linaro.org>
25
26 * linux-aarch64-low.c (aarch64_relocate_instruction): Return
27 int. Add argument buf.
28 (aarch64_install_fast_tracepoint_jump_pad): Pass buf to
29 aarch64_relocate_instruction.
30
70b439f0
YQ
312015-10-12 Yao Qi <yao.qi@linaro.org>
32
33 * linux-aarch64-low.c (aarch64_relocate_instruction): Add
34 argument insn. Remove local variable insn. Don't call
35 target_read_uint32.
36 (aarch64_install_fast_tracepoint_jump_pad): Call
37 target_read_uint32.
38
7781c06f
YQ
392015-09-30 Yao Qi <yao.qi@linaro.org>
40
41 * linux-aarch64-low.c (emit_movk): Shorten a long line.
42 (emit_load_store_pair): Likewise.
43
9a3c8263
SM
442015-09-25 Simon Marchi <simon.marchi@ericsson.com>
45
46 * dll.c (match_dll): Add cast(s).
47 (unloaded_dll): Likewise.
48 * linux-low.c (second_thread_of_pid_p): Likewise.
49 (delete_lwp_callback): Likewise.
50 (count_events_callback): Likewise.
51 (select_event_lwp_callback): Likewise.
52 (linux_set_resume_request): Likewise.
53 * server.c (accumulate_file_name_length): Likewise.
54 (emit_dll_description): Likewise.
55 (handle_qxfer_threads_worker): Likewise.
56 (visit_actioned_threads): Likewise.
57 * thread-db.c (any_thread_of): Likewise.
58 * tracepoint.c (same_process_p): Likewise.
59 (match_blocktype): Likewise.
60 (build_traceframe_info_xml): Likewise.
61
224c3ddb
SM
622015-09-25 Simon Marchi <simon.marchi@ericsson.com>
63
64 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
65 assignment.
66 (gdb_unparse_agent_expr): Likewise.
67 * hostio.c (require_data): Likewise.
68 (handle_pread): Likewise.
69 * linux-low.c (disable_regset): Likewise.
70 (fetch_register): Likewise.
71 (store_register): Likewise.
72 (get_dynamic): Likewise.
73 (linux_qxfer_libraries_svr4): Likewise.
74 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
75 (set_fast_tracepoint_jump): Likewise.
76 (uninsert_fast_tracepoint_jumps_at): Likewise.
77 (reinsert_fast_tracepoint_jumps_at): Likewise.
78 (validate_inserted_breakpoint): Likewise.
79 (clone_agent_expr): Likewise.
80 * regcache.c (init_register_cache): Likewise.
81 * remote-utils.c (putpkt_binary_1): Likewise.
82 (decode_M_packet): Likewise.
83 (decode_X_packet): Likewise.
84 (look_up_one_symbol): Likewise.
85 (relocate_instruction): Likewise.
86 (monitor_output): Likewise.
87 * server.c (handle_search_memory): Likewise.
88 (handle_qxfer_exec_file): Likewise.
89 (handle_qxfer_libraries): Likewise.
90 (handle_qxfer): Likewise.
91 (handle_query): Likewise.
92 (handle_v_cont): Likewise.
93 (handle_v_run): Likewise.
94 (captured_main): Likewise.
95 * target.c (write_inferior_memory): Likewise.
96 * thread-db.c (try_thread_db_load_from_dir): Likewise.
97 * tracepoint.c (init_trace_buffer): Likewise.
98 (add_tracepoint_action): Likewise.
99 (add_traceframe): Likewise.
100 (add_traceframe_block): Likewise.
101 (cmd_qtdpsrc): Likewise.
102 (cmd_qtdv): Likewise.
103 (cmd_qtstatus): Likewise.
104 (response_source): Likewise.
105 (response_tsv): Likewise.
106 (cmd_qtnotes): Likewise.
107 (gdb_collect): Likewise.
108 (initialize_tracepoint): Likewise.
109
afbe19f8
PL
1102015-09-21 Pierre Langlois <pierre.langlois@arm.com>
111
112 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
113 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
114 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
115 <NOP>: New.
116 (enum aarch64_condition_codes): New enum.
117 (w0): New static global.
118 (fp): Likewise.
119 (lr): Likewise.
120 (struct aarch64_memory_operand) <type>: New
121 MEMORY_OPERAND_POSTINDEX type.
122 (postindex_memory_operand): New helper function.
123 (emit_ret): New function.
124 (emit_load_store_pair): New function, factored out of emit_stp
125 with support for MEMORY_OPERAND_POSTINDEX.
126 (emit_stp): Rewrite using emit_load_store_pair.
127 (emit_ldp): New function.
128 (emit_load_store): Likewise.
129 (emit_ldr): Mention post-index instruction in comment.
130 (emit_ldrh): New function.
131 (emit_ldrb): New function.
132 (emit_ldrsw): Mention post-index instruction in comment.
133 (emit_str): Likewise.
134 (emit_subs): New function.
135 (emit_cmp): Likewise.
136 (emit_and): Likewise.
137 (emit_orr): Likewise.
138 (emit_orn): Likewise.
139 (emit_eor): Likewise.
140 (emit_mvn): Likewise.
141 (emit_lslv): Likewise.
142 (emit_lsrv): Likewise.
143 (emit_asrv): Likewise.
144 (emit_mul): Likewise.
145 (emit_sbfm): Likewise.
146 (emit_sbfx): Likewise.
147 (emit_ubfm): Likewise.
148 (emit_ubfx): Likewise.
149 (emit_csinc): Likewise.
150 (emit_cset): Likewise.
151 (emit_nop): Likewise.
152 (emit_ops_insns): New helper function.
153 (emit_pop): Likewise.
154 (emit_push): Likewise.
155 (aarch64_emit_prologue): New function.
156 (aarch64_emit_epilogue): Likewise.
157 (aarch64_emit_add): Likewise.
158 (aarch64_emit_sub): Likewise.
159 (aarch64_emit_mul): Likewise.
160 (aarch64_emit_lsh): Likewise.
161 (aarch64_emit_rsh_signed): Likewise.
162 (aarch64_emit_rsh_unsigned): Likewise.
163 (aarch64_emit_ext): Likewise.
164 (aarch64_emit_log_not): Likewise.
165 (aarch64_emit_bit_and): Likewise.
166 (aarch64_emit_bit_or): Likewise.
167 (aarch64_emit_bit_xor): Likewise.
168 (aarch64_emit_bit_not): Likewise.
169 (aarch64_emit_equal): Likewise.
170 (aarch64_emit_less_signed): Likewise.
171 (aarch64_emit_less_unsigned): Likewise.
172 (aarch64_emit_ref): Likewise.
173 (aarch64_emit_if_goto): Likewise.
174 (aarch64_emit_goto): Likewise.
175 (aarch64_write_goto_address): Likewise.
176 (aarch64_emit_const): Likewise.
177 (aarch64_emit_call): Likewise.
178 (aarch64_emit_reg): Likewise.
179 (aarch64_emit_pop): Likewise.
180 (aarch64_emit_stack_flush): Likewise.
181 (aarch64_emit_zero_ext): Likewise.
182 (aarch64_emit_swap): Likewise.
183 (aarch64_emit_stack_adjust): Likewise.
184 (aarch64_emit_int_call_1): Likewise.
185 (aarch64_emit_void_call_2): Likewise.
186 (aarch64_emit_eq_goto): Likewise.
187 (aarch64_emit_ne_goto): Likewise.
188 (aarch64_emit_lt_goto): Likewise.
189 (aarch64_emit_le_goto): Likewise.
190 (aarch64_emit_gt_goto): Likewise.
191 (aarch64_emit_ge_got): Likewise.
192 (aarch64_emit_ops_impl): New static global variable.
193 (aarch64_emit_ops): New target function, return
194 &aarch64_emit_ops_impl.
195 (struct linux_target_ops): Install it.
196
bb903df0
PL
1972015-09-21 Pierre Langlois <pierre.langlois@arm.com>
198
199 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
200 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
201 aarch64-ipa.o.
202 * linux-aarch64-ipa.c: New file.
203 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
204 and endian.h.
205 (aarch64_get_thread_area): New target method.
206 (extract_signed_bitfield): New helper function.
207 (aarch64_decode_ldr_literal): New function.
208 (enum aarch64_opcodes): New enum.
209 (struct aarch64_register): New struct.
210 (struct aarch64_operand): New struct.
211 (x0): New static global.
212 (x1): Likewise.
213 (x2): Likewise.
214 (x3): Likewise.
215 (x4): Likewise.
216 (w2): Likewise.
217 (ip0): Likewise.
218 (sp): Likewise.
219 (xzr): Likewise.
220 (aarch64_register): New helper function.
221 (register_operand): Likewise.
222 (immediate_operand): Likewise.
223 (struct aarch64_memory_operand): New struct.
224 (offset_memory_operand): New helper function.
225 (preindex_memory_operand): Likewise.
226 (enum aarch64_system_control_registers): New enum.
227 (ENCODE): New macro.
228 (emit_insn): New helper function.
229 (emit_b): New function.
230 (emit_bcond): Likewise.
231 (emit_cb): Likewise.
232 (emit_tb): Likewise.
233 (emit_blr): Likewise.
234 (emit_stp): Likewise.
235 (emit_ldp_q_offset): Likewise.
236 (emit_stp_q_offset): Likewise.
237 (emit_load_store): Likewise.
238 (emit_ldr): Likewise.
239 (emit_ldrsw): Likewise.
240 (emit_str): Likewise.
241 (emit_ldaxr): Likewise.
242 (emit_stxr): Likewise.
243 (emit_stlr): Likewise.
244 (emit_data_processing_reg): Likewise.
245 (emit_data_processing): Likewise.
246 (emit_add): Likewise.
247 (emit_sub): Likewise.
248 (emit_mov): Likewise.
249 (emit_movk): Likewise.
250 (emit_mov_addr): Likewise.
251 (emit_mrs): Likewise.
252 (emit_msr): Likewise.
253 (emit_sevl): Likewise.
254 (emit_wfe): Likewise.
255 (append_insns): Likewise.
256 (can_encode_int32_in): New helper function.
257 (aarch64_relocate_instruction): New function.
258 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
259 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
260 (struct linux_target_ops): Install aarch64_get_thread_area,
261 aarch64_install_fast_tracepoint_jump_pad and
262 aarch64_get_min_fast_tracepoint_insn_len.
263
787749ea
PL
2642015-09-21 Pierre Langlois <pierre.langlois@arm.com>
265
266 * Makefile.in (aarch64-insn.o): New rule.
267 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
268
9812b2e6
YQ
2692015-09-21 Yao Qi <yao.qi@linaro.org>
270
271 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
272
18fe412b
YQ
2732015-09-21 Yao Qi <yao.qi@linaro.org>
274
275 * tracepoint.c (max_jump_pad_size): Remove.
276
a0cc84cd
YQ
2772015-09-18 Yao Qi <yao.qi@linaro.org>
278
279 * linux-aarch64-low.c: Don't include sys/uio.h.
280 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
281
d78908cf
WW
2822015-09-16 Wei-cheng Wang <cole945@gmail.com>
283
284 * tracepoint.c (eval_result_type): Change prototype.
285 (condition_true_at_tracepoint): Fix argument to compiled_cond.
286
d57e0d50
PA
2872015-09-15 Pedro Alves <palves@redhat.com>
288
289 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
290 Check whether to report exec events instead of checking whether
291 multiprocess is enabled.
292
5a676acc
PA
2932015-09-15 Pedro Alves <palves@redhat.com>
294
295 PR remote/18965
296 * remote-utils.c (prepare_resume_reply): Merge
297 TARGET_WAITKIND_VFORK_DONE switch case with the
298 TARGET_WAITKIND_FORKED case.
299
7c5d0fad
YQ
3002015-09-15 Yao Qi <yao.qi@linaro.org>
301
302 * server.c (handle_query): Check string comparison using
303 "else if" instead of "if".
304
750ce8d1
YQ
3052015-09-15 Yao Qi <yao.qi@linaro.org>
306
307 * server.c (vCont_supported): New global variable.
308 (handle_query): Set vCont_supported to 1 if "vContSupported+"
309 matches. Append ";vContSupported+" to own_buf.
310 (handle_v_requests): Append ";s;S" to own_buf if target supports
311 hardware single step or vCont_supported is false.
312 (capture_main): Set vCont_supported to zero.
313
70b90b91
YQ
3142015-09-15 Yao Qi <yao.qi@linaro.org>
315
316 * linux-low.c (linux_supports_conditional_breakpoints): Rename
317 it to ...
318 (linux_supports_hardware_single_step): ... New function.
319 (linux_target_ops): Update.
320 * lynx-low.c (lynx_target_ops): Set field
321 supports_hardware_single_step to target_can_do_hardware_single_step.
322 * nto-low.c (nto_target_ops): Likewise.
323 * spu-low.c (spu_target_ops): Likewise.
324 * win32-low.c (win32_target_ops): Likewise.
325 * target.c (target_can_do_hardware_single_step): New function.
326 * target.h (struct target_ops) <supports_conditional_breakpoints>:
327 Remove. <supports_hardware_single_step>: New field.
328 (target_supports_conditional_breakpoints): Remove.
329 (target_supports_hardware_single_step): New macro.
330 (target_can_do_hardware_single_step): Declare.
331 * server.c (handle_query): Use target_supports_hardware_single_step
332 instead of target_supports_conditional_breakpoints.
333
ade90bde
YQ
3342015-09-15 Yao Qi <yao.qi@linaro.org>
335
336 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
337 function.
338 (struct linux_target_ops the_low_target): Install
339 aarch64_linux_siginfo_fixup.
340
94585166
DB
3412015-09-11 Don Breazeal <donb@codesourcery.com>
342 Luis Machado <lgustavo@codesourcery.com>
343
344 * linux-low.c (linux_mourn): Static declaration.
345 (linux_arch_setup): Move in front of
346 handle_extended_wait.
347 (linux_arch_setup_thread): New function.
348 (handle_extended_wait): Handle exec events. Call
349 linux_arch_setup_thread. Make event_lwp argument a
350 pointer-to-a-pointer.
351 (check_zombie_leaders): Do not check stopped threads.
352 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
353 (linux_low_filter_event): Add lwp and thread for exec'ing
354 non-leader thread if leader thread has been deleted.
355 Refactor code into linux_arch_setup_thread and call it.
356 Pass child lwp pointer by reference to handle_extended_wait.
357 (linux_wait_for_event_filtered): Update comment.
358 (linux_wait_1): Prevent clobbering exec event status.
359 (linux_supports_exec_events): New function.
360 (linux_target_ops) <supports_exec_events>: Initialize new member.
361 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
362 new member.
363 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
364 * server.c (report_exec_events): New global variable.
365 (handle_query): Handle qSupported query for exec-events feature.
366 (captured_main): Initialize report_exec_events.
367 * server.h (report_exec_events): Declare new global variable.
368 * target.h (struct target_ops) <supports_exec_events>: New
369 member.
370 (target_supports_exec_events): New macro.
371 * win32-low.c (win32_target_ops) <supports_exec_events>:
372 Initialize new member.
373
0568462b
MM
3742015-09-09 Markus Metzger <markus.t.metzger@intel.com>
375
376 * linux-low.c (linux_low_enable_btrace): Remove.
377 (linux_target_ops): Replace linux_low_enable_btrace with
378 linux_enable_btrace.
379
39edd165
YQ
3802015-09-03 Yao Qi <yao.qi@linaro.org>
381
382 * linux-aarch64-low.c (aarch64_insert_point): Call
383 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
384 returns true.
385
1db33b5a
UW
3862015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
387
388 * linux-low.c (check_stopped_by_breakpoint): Use
389 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
390
ab290430
PA
3912015-08-27 Pedro Alves <palves@redhat.com>
392
393 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
394
8d749320
SM
3952015-08-26 Simon Marchi <simon.marchi@ericsson.com>
396
6711b7f8
SM
397 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
398 the XNEW-family equivalent.
8d749320
SM
399 (compile_bytecodes): Likewise.
400 * dll.c (loaded_dll): Likewise.
401 * event-loop.c (append_callback_event): Likewise.
402 (create_file_handler): Likewise.
403 (create_file_event): Likewise.
404 * hostio.c (handle_open): Likewise.
405 * inferiors.c (add_thread): Likewise.
406 (add_process): Likewise.
407 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
408 * linux-arm-low.c (arm_new_process): Likewise.
409 (arm_new_thread): Likewise.
410 * linux-low.c (add_to_pid_list): Likewise.
411 (linux_add_process): Likewise.
412 (handle_extended_wait): Likewise.
413 (add_lwp): Likewise.
414 (enqueue_one_deferred_signal): Likewise.
415 (enqueue_pending_signal): Likewise.
416 (linux_resume_one_lwp_throw): Likewise.
417 (linux_resume_one_thread): Likewise.
418 (linux_read_memory): Likewise.
419 (linux_write_memory): Likewise.
420 * linux-mips-low.c (mips_linux_new_process): Likewise.
421 (mips_linux_new_thread): Likewise.
422 (mips_add_watchpoint): Likewise.
423 * linux-x86-low.c (initialize_low_arch): Likewise.
424 * lynx-low.c (lynx_add_process): Likewise.
425 * mem-break.c (set_raw_breakpoint_at): Likewise.
426 (set_breakpoint): Likewise.
427 (add_condition_to_breakpoint): Likewise.
428 (add_commands_to_breakpoint): Likewise.
429 (clone_agent_expr): Likewise.
430 (clone_one_breakpoint): Likewise.
431 * regcache.c (new_register_cache): Likewise.
432 * remote-utils.c (look_up_one_symbol): Likewise.
433 * server.c (queue_stop_reply): Likewise.
434 (start_inferior): Likewise.
435 (queue_stop_reply_callback): Likewise.
436 (handle_target_event): Likewise.
437 * spu-low.c (fetch_ppc_memory): Likewise.
438 (store_ppc_memory): Likewise.
439 * target.c (set_target_ops): Likewise.
440 * thread-db.c (thread_db_load_search): Likewise.
441 (try_thread_db_load_1): Likewise.
442 * tracepoint.c (add_tracepoint): Likewise.
443 (add_tracepoint_action): Likewise.
444 (create_trace_state_variable): Likewise.
445 (cmd_qtdpsrc): Likewise.
446 (cmd_qtro): Likewise.
447 (add_while_stepping_state): Likewise.
448 * win32-low.c (child_add_thread): Likewise.
449 (get_image_name): Likewise.
450
ed8b7b42
YQ
4512015-08-25 Yao Qi <yao.qi@linaro.org>
452
453 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
454
db3cb7cb
YQ
4552015-08-25 Yao Qi <yao.qi@linaro.org>
456
457 * Makefile.in (aarch64-linux.o): New rule.
458 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
459 srv_tgtobj.
460 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
461 (aarch64_init_debug_reg_state): Make it extern.
462 (aarch64_linux_prepare_to_resume): Remove.
463
f6011a1c
YQ
4642015-08-25 Yao Qi <yao.qi@linaro.org>
465
466 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
467 lwp_arch_private_info and ptid_of_lwp.
468
88e2cf7e
YQ
4692015-08-25 Yao Qi <yao.qi@linaro.org>
470
471 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
472 Find proc_info by find_process_pid. All callers updated.
473
5e35436e
YQ
4742015-08-25 Yao Qi <yao.qi@linaro.org>
475
476 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
477 Remove.
478 (debug_reg_change_callback): Remove.
479 (aarch64_notify_debug_reg_change): Remove.
480
4a8a7965
YQ
4812015-08-25 Yao Qi <yao.qi@linaro.org>
482
483 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
484 Call current_lwp_ptid.
485
32a271ee
YQ
4862015-08-25 Yao Qi <yao.qi@linaro.org>
487
488 * linux-aarch64-low.c (debug_reg_change_callback): Use
489 debug_printf.
490
0d51c8d7
YQ
4912015-08-25 Yao Qi <yao.qi@linaro.org>
492
493 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
494
31a43dd5
YQ
4952015-08-25 Yao Qi <yao.qi@linaro.org>
496
497 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
498
8ee52567
YQ
4992015-08-25 Yao Qi <yao.qi@linaro.org>
500
501 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
502 the code.
503
ff3f0f45
YQ
5042015-08-25 Yao Qi <yao.qi@linaro.org>
505
506 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
507 Remove.
508 (debug_reg_change_callback): Remove argument entry and add argument
509 lwp. Remove local variable thread. Don't print thread id in the
510 debugging output. Don't check whether pid of thread equals to pid.
511 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
512 iterate_over_lwps instead find_inferior.
513
3d40fbb5
PA
5142015-08-24 Pedro Alves <palves@redhat.com>
515
516 * inferiors.c (get_first_process): New function.
517 * inferiors.h (get_first_process): New declaration.
518 * remote-utils.c (read_ptid): Default to the first process in the
519 list, instead of to the current thread's process.
520
438e1e42
PA
5212015-08-24 Pedro Alves <palves@redhat.com>
522
523 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
524 * event-loop.c: Likewise.
525 * remote-utils.c: Likewise.
526 * tracepoint.c: Likewise.
527
a8c6d4fc
PA
5282015-08-24 Pedro Alves <palves@redhat.com>
529
530 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
531 ptid_get_lwp.
532
99b0bb12
PA
5332015-08-21 Pedro Alves <palves@redhat.com>
534
535 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
536 instead of literal 1.
537
f8904751
PA
5382015-08-21 Pedro Alves <palves@redhat.com>
539
540 * tdesc.c (default_description): Explicitly zero-initialize.
541
465a859e
PA
5422015-08-21 Pedro Alves <palves@redhat.com>
543
544 PR gdb/18749
545 * inferiors.c (remove_thread): Discard any pending stop reply for
546 this thread.
547 * server.c (remove_all_on_match_pid): Rename to ...
548 (remove_all_on_match_ptid): ... this. Work with a filter ptid
549 instead of a pid.
550 (discard_queued_stop_replies): Change parameter to a ptid. Now
551 extern.
552 (handle_v_kill, kill_inferior_callback, captured_main)
553 (process_serial_event): Adjust.
554 * server.h (discard_queued_stop_replies): Declare.
555
f0db101d
PA
5562015-08-21 Pedro Alves <palves@redhat.com>
557
558 * linux-low.c (wait_for_sigstop): Always switch to no thread
559 selected if the previously current thread dies.
560 * lynx-low.c (lynx_request_interrupt): Use the first thread's
561 process instead of the current thread's.
562 * remote-utils.c (input_interrupt): Don't check if there's no
563 current thread.
564 * server.c (gdb_read_memory, gdb_write_memory): If setting the
565 current thread to the general thread fails, error out.
566 (handle_qxfer_auxv, handle_qxfer_libraries)
567 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
568 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
569 (handle_query): Check if there's a thread selected instead of
570 checking whether there's any thread in the thread list.
571 (handle_qxfer_threads, handle_qxfer_btrace)
572 (handle_qxfer_btrace_conf): Don't error out early if there's no
573 thread in the thread list.
574 (handle_v_cont, myresume): Don't set the current thread to the
575 continue thread.
576 (process_serial_event) <Hg handling>: Also set thread_id if the
577 previous general thread is still alive.
578 (process_serial_event) <g/G handling>: If setting the current
579 thread to the general thread fails, error out.
580 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
581 thread's lwp instead of the current thread's.
582 * target.c (set_desired_thread): If the desired thread was not
583 found, leave the current thread pointing to NULL. Return an int
584 (boolean) indicating success.
585 * target.h (set_desired_thread): Change return type to int.
586
40045d91
MF
5872015-08-20 Max Filippov <jcmvbkbc@gmail.com>
588
589 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
590 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
591 #includes.
592 (ps_get_thread_area): New function.
593
45face3b
GB
5942015-08-19 Gary Benson <gbenson@redhat.com>
595
596 * hostio.c (handle_pread): Do not attempt to read more data
597 than hostio_reply_with_data can fit in a packet.
598
16d5f642
JB
5992015-08-18 Joel Brobecker <brobecker@adacore.com>
600
601 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
602
a738da3a
MF
6032015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
604
605 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
606
33ebda9d
PA
6072015-08-06 Pedro Alves <palves@redhat.com>
608
609 * tracepoint.c (expr_eval_result): Now an int.
610
a44892be
PA
6112015-08-06 Pedro Alves <palves@redhat.com>
612
613 * gdbthread.h (struct regcache): Forward declare.
614 (struct thread_info) <regcache_data>: Now a struct regcache
615 pointer.
616 * inferiors.c (inferior_regcache_data)
617 (set_inferior_regcache_data): Now work with struct regcache
618 pointers.
619 * inferiors.h (struct regcache): Forward declare.
620 (inferior_regcache_data, set_inferior_regcache_data): Now work
621 with struct regcache pointers.
622 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
623 (free_register_cache_thread): Remove struct regcache pointer
624 casts.
625
608a1e46
PA
6262015-08-06 Pedro Alves <palves@redhat.com>
627
628 * server.c (captured_main): On error, print the exception message
629 to stderr, and if run_once is set, throw a quit.
630
f0ce0d3a
PA
6312015-08-06 Pedro Alves <palves@redhat.com>
632
633 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
634 the current thread.
635
bf47e248
PA
6362015-08-06 Pedro Alves <palves@redhat.com>
637
638 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
639 reading beyond the passed in buffer length.
640
b6b9ffcc
PL
6412015-08-06 Pierre Langlois <pierre.langlois@arm.com>
642
643 * tracepoint.c (symbol_list) <required>: Remove.
644
863d01bd
PA
6452015-08-06 Pedro Alves <palves@redhat.com>
646
647 * linux-low.c (handle_extended_wait): Set the fork child's suspend
648 count if stopping and suspending threads.
649 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
650 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
651 (linux_detach): Complete an ongoing step-over.
652 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
653 throughout.
654 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
655 (linux_wait_1): If passing a signal to the inferior after
656 finishing a step-over, unsuspend and re-resume all lwps. If we
657 see a single-step event but the thread should be continuing, don't
658 pass the trap to gdb.
659 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
660 internal_error instead of gdb_assert.
661 (enqueue_pending_signal): New function.
662 (check_ptrace_stopped_lwp_gone): Add debug output.
663 (start_step_over): Use internal_error instead of gdb_assert.
664 (complete_ongoing_step_over): New function.
665 (linux_resume_one_thread): Don't resume a suspended thread.
666 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
667 it stepping.
668
00db26fa
PA
6692015-08-06 Pedro Alves <palves@redhat.com>
670
671 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
672 (linux_thread_alive): Use lwp_is_marked_dead.
673 (extended_event_reported): Delete.
674 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
675 instead of extended_event_reported.
676 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
677 as well.
678 (lwp_is_marked_dead): New function.
679 (lwp_running): Use lwp_is_marked_dead.
680 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
681 comment.
682
ad071a30
PA
6832015-08-06 Pedro Alves <palves@redhat.com>
684
685 * linux-low.c (linux_wait_1): Move fork event output out of the
686 !report_to_gdb check. Pass event_child->waitstatus to
687 target_waitstatus_to_string instead of ourstatus.
688
524b57e6
YQ
6892015-08-04 Yao Qi <yao.qi@linaro.org>
690
691 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
692 if current_thread is 32 bit.
693
6085d6f6
YQ
6942015-08-04 Yao Qi <yao.qi@linaro.org>
695
696 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
697 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
698 * server.c (extended_protocol): Remove "static".
699 * server.h (extended_protocol): Declare it.
700
8a7e4587
YQ
7012015-08-04 Yao Qi <yao.qi@linaro.org>
702
703 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
704 both aarch64 and aarch32.
705 (aarch64_set_pc): Likewise.
706
3b53ae99
YQ
7072015-08-04 Yao Qi <yao.qi@linaro.org>
708
709 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
710 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
711 arm-with-neon.xml to srv_xmlfiles.
712 * linux-aarch64-low.c: Include linux-aarch32-low.h.
713 (is_64bit_tdesc): New function.
714 (aarch64_linux_read_description): New function.
715 (aarch64_arch_setup): Call aarch64_linux_read_description.
716 (regs_info): Rename to regs_info_aarch64.
717 (aarch64_regs_info): Return right regs_info.
718 (initialize_low_arch): Call initialize_low_arch_aarch32.
719
bd9e6534
YQ
7202015-08-04 Yao Qi <yao.qi@linaro.org>
721
722 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
723 * linux-aarch32-low.c: New file.
724 * linux-aarch32-low.h: New file.
725 * linux-arm-low.c (arm_fill_gregset): Move it to
726 linux-aarch32-low.c.
727 (arm_store_gregset): Likewise.
728 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
729 (arm_store_vfpregset): Call arm_store_vfpregset_num.
730 (arm_arch_setup): Check if PTRACE_GETREGSET works.
731 (regs_info): Rename to regs_info_arm.
732 (arm_regs_info): Return regs_info_aarch32 if
733 have_ptrace_getregset is 1 and target description is
734 arm_with_neon or arm_with_vfpv3.
735 (initialize_low_arch): Don't call init_registers_arm_with_neon.
736 Call initialize_low_arch_aarch32 instead.
737
ded48a5e
YQ
7382015-08-04 Yao Qi <yao.qi@linaro.org>
739
740 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
741 * linux-low.c: ... here.
742 * linux-low.h (have_ptrace_getregset): Declare it.
743
96e9210f
PA
7442015-08-04 Pedro Alves <palves@redhat.com>
745
746 * thread-db.c (struct thread_db): Use new typedefs.
747 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
748 CHK calls.
749 (disable_thread_event_reporting): Cast result of dlsym to
750 destination function pointer type.
751 (thread_db_mourn): Use td_ta_delete_ftype.
752
af60a1ef
SL
7532015-08-03 Sandra Loosemore <sandra@codesourcery.com>
754
755 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
756 arch variant.
757 (CDX_BREAKPOINT): Define for R2.
758 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
759 (the_low_target): Add comments.
760
e8b41681
YQ
7612015-07-30 Yao Qi <yao.qi@linaro.org>
762
763 * linux-arm-low.c (arm_hwcap): Remove it.
764 (arm_read_description): New local variable arm_hwcap. Don't
765 set arm_hwcap to zero.
766
89abb039
YQ
7672015-07-30 Yao Qi <yao.qi@linaro.org>
768
769 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
770 Use regcache->tdesc instead.
771 (arm_store_wmmxregset): Likewise.
772 (arm_fill_vfpregset): Likewise.
773 (arm_store_vfpregset): Likewise.
774
deca266c
YQ
7752015-07-30 Yao Qi <yao.qi@linaro.org>
776
777 * linux-arm-low.c: Include arch/arm.h.
778 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
779 (arm_store_gregset): Likewise.
780
aa58a496
SM
7812015-07-29 Simon Marchi <simon.marchi@ericsson.com>
782
783 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
784 ptrace's 4th parameter.
785
50904b25
YQ
7862015-07-27 Yao Qi <yao.qi@linaro.org>
787
788 * configure.srv (case aarch64*-*-linux*): Don't set
789 srv_linux_usrregs.
790
5826e159
PA
7912015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
792
793 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
794 sys/ptrace.h.
795 * linux-arm-low.c: Likewise.
796 * linux-cris-low.c: Likewise.
797 * linux-crisv32-low.c: Likewise.
798 * linux-low.c: Likewise.
799 * linux-m68k-low.c: Likewise.
800 * linux-mips-low.c: Likewise.
801 * linux-nios2-low.c: Likewise.
802 * linux-s390-low.c: Likewise.
803 * linux-sparc-low.c: Likewise.
804 * linux-tic6x-low.c: Likewise.
805 * linux-tile-low.c: Likewise.
806 * linux-x86-low.c: Likewise.
807
54019719
PA
8082015-07-24 Pedro Alves <palves@redhat.com>
809
810 * config.in: Regenerate.
811 * configure: Regenerate.
812
eb7aa561
PA
8132015-07-24 Pedro Alves <palves@redhat.com>
814
815 * acinclude.m4: Include ../ptrace.m4.
816 * configure.ac: Call GDB_AC_PTRACE.
817 * config.in, configure: Regenerate.
818
55d7b841
YQ
8192015-07-24 Yao Qi <yao.qi@linaro.org>
820
821 * linux-low.c (linux_create_inferior): Remove setting to
822 proc->priv->new_inferior.
823 (linux_attach): Likewise.
824 (linux_low_filter_event): Likewise.
825 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
826
c06cbd92
YQ
8272015-07-24 Yao Qi <yao.qi@linaro.org>
828
829 * linux-low.c (linux_arch_setup): New function.
830 (linux_low_filter_event): If proc->tdesc is NULL and
831 proc->attached is true, call the_low_target.arch_setup.
832 Otherwise, keep status pending, and return.
833 (linux_resume_one_lwp_throw): Don't call get_pc if
834 thread->while_stepping isn't NULL. Don't call
835 get_thread_regcache if proc->tdesc is NULL.
836 (need_step_over_p): Return 0 if proc->tdesc is NULL.
837 (linux_target_ops): Install arch_setup.
838 * server.c (start_inferior): Call the_target->arch_setup.
839 * target.h (struct target_ops) <arch_setup>: New field.
840 (target_arch_setup): New marco.
841 * lynx-low.c (lynx_target_ops): Update.
842 * nto-low.c (nto_target_ops): Update.
843 * spu-low.c (spu_target_ops): Update.
844 * win32-low.c (win32_target_ops): Update.
845
5ae3ebba
YQ
8462015-07-24 Yao Qi <yao.qi@linaro.org>
847
848 * linux-low.c (linux_add_process): Don't set
849 proc->priv->new_inferior.
850 (linux_create_inferior): Set proc->priv->new_inferior to 1.
851 (linux_attach): Likewise.
852
eb97750b
YQ
8532015-07-24 Yao Qi <yao.qi@linaro.org>
854
855 * server.c (start_inferior): Code refactor.
856
51aee833
YQ
8572015-07-24 Yao Qi <yao.qi@linaro.org>
858
859 * server.c (process_serial_event): Set general_thread.
860
af1b22f3
YQ
8612015-07-21 Yao Qi <yao.qi@linaro.org>
862
863 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
864 aarch64_linux_get_debug_reg_capacity.
865
554717a3
YQ
8662015-07-17 Yao Qi <yao.qi@linaro.org>
867
868 * Makefile.in (aarch64-linux-hw-point.o): New rule.
869 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
870 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
871 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
872 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
873 (AARCH64_HWP_ALIGNMENT): Likewise.
874 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
875 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
876 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
877 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
878 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
879 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
880 (struct aarch64_debug_reg_state): Likewise.
881 (struct arch_lwp_info): Likewise.
882 (aarch64_align_watchpoint): Likewise.
883 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
884 (aarch64_watchpoint_length): Likewise.
885 (aarch64_point_encode_ctrl_reg): Likewise
886 (aarch64_point_is_aligned): Likewise.
887 (aarch64_align_watchpoint): Likewise.
888 (aarch64_linux_set_debug_regs):
889 (aarch64_dr_state_insert_one_point): Likewise.
890 (aarch64_dr_state_remove_one_point): Likewise.
891 (aarch64_handle_breakpoint): Likewise.
892 (aarch64_handle_aligned_watchpoint): Likewise.
893 (aarch64_handle_unaligned_watchpoint): Likewise.
894 (aarch64_handle_watchpoint): Likewise.
895
c67ca4de
YQ
8962015-07-17 Yao Qi <yao.qi@linaro.org>
897
898 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
899 and don't aarch64_get_debug_reg_state. All callers update.
900 (aarch64_handle_aligned_watchpoint): Likewise.
901 (aarch64_handle_unaligned_watchpoint): Likewise.
902 (aarch64_handle_watchpoint): Likewise.
903 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
904 (aarch64_remove_point): Likewise.
905
25abf979
YQ
9062015-07-17 Yao Qi <yao.qi@linaro.org>
907
908 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
909 debug_printf.
910 (aarch64_handle_unaligned_watchpoint): Likewise.
911
db1ff28b
JK
9122015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
913
914 Revert the previous 3 commits:
915 Move gdb_regex* to common/
916 Move linux_find_memory_regions_full & co.
917 gdbserver build-id attribute generator
918
700ca40f
JK
9192015-07-15 Aleksandar Ristovski <aristovski@qnx.com
920 Jan Kratochvil <jan.kratochvil@redhat.com>
921
922 gdbserver build-id attribute generator.
923 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
924 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
925 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
926 (find_phdr): New.
927 (get_dynamic): Use find_pdhr to traverse program headers.
928 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
929 (compare_mapping_entry_range, struct find_memory_region_callback_data)
930 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
931 (get_hex_build_id): New.
932 (linux_qxfer_libraries_svr4): Add optional build-id attribute
933 to reply XML document.
934
9904185c
JK
9352015-07-15 Aleksandar Ristovski <aristovski@qnx.com
936 Jan Kratochvil <jan.kratochvil@redhat.com>
937
938 * target.c: Include target/target-utils.h and fcntl.h.
939 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
940 (target_fileio_read_stralloc): New functions.
941
6e5b4429
JK
9422015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
943
944 * Makefile.in (OBS): Add gdb_regex.o.
945 (gdb_regex.o): New.
946 * config.in: Rebuilt.
947 * configure: Rebuilt.
948
ddc98fbf
JK
9492015-07-15 Aleksandar Ristovski <aristovski@qnx.com
950 Jan Kratochvil <jan.kratochvil@redhat.com>
951
952 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
953 * Makefile.in (OBS): Add target-utils.o.
954 (linux-maps.o, target-utils.o): New.
955 * configure.srv (srv_linux_obj): Add linux-maps.o.
956
e57bb7a0
PL
9572015-07-15 Pierre Langlois <pierre.langlois@arm.com>
958
959 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
960 function, return 1.
961 (the_low_target): Install it.
962
586b02a9
PA
9632015-07-14 Pedro Alves <palves@redhat.com>
964
965 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
966 Instead, ignore ECHILD, and throw an error for other errnos.
967
58c1b36c
PA
9682015-07-10 Pedro Alves <palves@redhat.com>
969
970 * event-loop.c (struct callback_event) <data>: Change type to
971 gdb_client_data instance instead of gdb_client_data pointer.
972 (append_callback_event): Adjust.
973
421530db
PL
9742015-07-10 Pierre Langlois <pierre.langlois@arm.com>
975
976 * linux-aarch64-low.c: Add comments for each linux_target_ops
977 method. Remove comments already covered in target_ops and
978 linux_target_ops definitions.
979 (the_low_target): Add comments for each unimplemented method.
980
c2d65f38
YQ
9812015-07-09 Yao Qi <yao.qi@linaro.org>
982
983 * linux-aarch64-low.c (aarch64_regmap): Remove.
984 (aarch64_usrregs_info): Remove.
985 (regs_info): Set field usrregs to NULL.
986
b20a6524
MM
9872015-07-02 Markus Metzger <markus.t.metzger@intel.com>
988
989 * linux-low.c: Include "rsp-low.h"
990 (linux_low_encode_pt_config, linux_low_encode_raw): New.
991 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
992 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
993 (handle_btrace_enable_pt): New.
994 (handle_btrace_general_set): Support "pt".
995 (handle_btrace_conf_general_set): Support "pt:size".
996
96c97461
PL
9972015-06-29 Pierre Langlois <pierre.langlois@arm.com>
998
999 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
1000 Z_PACKET_SW_BP.
1001
37d66942
PL
10022015-06-29 Pierre Langlois <pierre.langlois@arm.com>
1003
1004 * linux-aarch64-low.c: Remove comment about endianness.
1005 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
1006 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
1007 memcmp.
1008
dc06243f
GB
10092015-06-24 Gary Benson <gbenson@redhat.com>
1010
1011 * linux-i386-ipa.c (stdint.h): Do not include.
1012 * lynx-i386-low.c (stdint.h): Likewise.
1013 * lynx-ppc-low.c (stdint.h): Likewise.
1014 * mem-break.c (stdint.h): Likewise.
1015 * thread-db.c (stdint.h): Likewise.
1016 * tracepoint.c (stdint.h): Likewise.
1017 * win32-low.c (stdint.h): Likewise.
1018
124e13d9
SM
10192015-06-18 Simon Marchi <simon.marchi@ericsson.com>
1020
1021 * server.c (write_qxfer_response): Update call to
1022 remote_escape_output.
1023
909c2cda
JK
10242015-06-15 Aleksandar Ristovski <aristovski@qnx.com
1025 Jan Kratochvil <jan.kratochvil@redhat.com>
1026
1027 Merge multiple hex conversions.
1028 * gdbreplay.c (tohex): Rename to 'fromhex'.
1029 (logchar): Use fromhex.
1030
24c05f46
JK
10312015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
1032
1033 * server.c (handle_qxfer_libraries): Set `version' attribute for
1034 <library-list>.
1035
14d2069a
GB
10362015-06-10 Gary Benson <gbenson@redhat.com>
1037
1038 * target.h (struct target_ops) <multifs_open>: New field.
1039 <multifs_unlink>: Likewise.
1040 <multifs_readlink>: Likewise.
1041 * linux-low.c (nat/linux-namespaces.h): New include.
1042 (linux_target_ops): Initialize the_target->multifs_open,
1043 the_target->multifs_unlink and the_target->multifs_readlink.
1044 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
1045 * hostio.c (hostio_fs_pid): New static variable.
1046 (hostio_handle_new_gdb_connection): New function.
1047 (handle_setfs): Likewise.
1048 (handle_open): Use the_target->multifs_open as appropriate.
1049 (handle_unlink): Use the_target->multifs_unlink as appropriate.
1050 (handle_readlink): Use the_target->multifs_readlink as
1051 appropriate.
1052 (handle_vFile): Handle vFile:setfs packets.
1053 * server.c (handle_query): Call hostio_handle_new_gdb_connection
1054 after target_handle_new_gdb_connection.
1055
4b8b5e72
GB
10562015-06-10 Gary Benson <gbenson@redhat.com>
1057
1058 * configure.ac (AC_CHECK_FUNCS): Add setns.
1059 * config.in: Regenerate.
1060 * configure: Likewise.
1061 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1062 (linux-namespaces.o): New rule.
1063 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1064
3ac2e371
GB
10652015-06-09 Gary Benson <gbenson@redhat.com>
1066
1067 * hostio.c (handle_open): Process mode argument with
1068 fileio_to_host_mode.
1069
ca9b78ce
YQ
10702015-06-01 Yao Qi <yao.qi@linaro.org>
1071
1072 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1073 * linux-x86-low.c: Likewise.
1074
bfacd19d
DB
10752015-05-28 Don Breazeal <donb@codesourcery.com>
1076
1077 * linux-low.c (handle_extended_wait): Initialize
1078 thread_info.last_resume_kind for new fork children.
1079
452003ef
PA
10802015-05-15 Pedro Alves <palves@redhat.com>
1081
1082 * target.h (target_handle_new_gdb_connection): Rewrite using if
1083 wrapped in do/while.
1084
1041a03c
JB
10852015-05-14 Joel Brobecker <brobecker@adacore.com>
1086
1087 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1088 * configure, config.in: Regenerate.
1089 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1090 Declare typedef.
1091
c269dbdb
DB
10922015-05-12 Don Breazeal <donb@codesourcery.com>
1093
1094 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1095 PTRACE_EVENT_VFORK_DONE.
1096 (linux_low_ptrace_options, extended_event_reported): Add vfork
1097 events.
1098 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1099 and "vforkdone" for RSP 'T' Stop Reply Packet.
1100 * server.h (report_vfork_events): Declare
1101 global variable.
1102
3a8a0396
DB
11032015-05-12 Don Breazeal <donb@codesourcery.com>
1104
1105 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1106 (the_low_target) <new_fork>: Initialize new member.
1107 * linux-arm-low.c (arm_new_fork): New function.
1108 (the_low_target) <new_fork>: Initialize new member.
1109 * linux-low.c (handle_extended_wait): Call new target function
1110 new_fork.
1111 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1112 * linux-mips-low.c (mips_add_watchpoint): New function
1113 extracted from mips_insert_point.
1114 (the_low_target) <new_fork>: Initialize new member.
1115 (mips_linux_new_fork): New function.
1116 (mips_insert_point): Call mips_add_watchpoint.
1117 * linux-x86-low.c (x86_linux_new_fork): New function.
1118 (the_low_target) <new_fork>: Initialize new member.
1119
de0d863e
DB
11202015-05-12 Don Breazeal <donb@codesourcery.com>
1121
1122 * linux-low.c (handle_extended_wait): Implement return value,
1123 rename argument 'event_child' to 'event_lwp', handle
1124 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1125 (linux_low_ptrace_options): New function.
1126 (linux_low_filter_event): Call linux_low_ptrace_options,
1127 use different argument fo linux_enable_event_reporting,
1128 use return value from handle_extended_wait.
1129 (extended_event_reported): New function.
1130 (linux_wait_1): Call extended_event_reported and set
1131 status to report fork events.
1132 (linux_write_memory): Add pid to debug message.
1133 (reset_lwp_ptrace_options_callback): New function.
1134 (linux_handle_new_gdb_connection): New function.
1135 (linux_target_ops): Initialize new structure member.
1136 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1137 * lynx-low.c: Initialize new structure member.
1138 * remote-utils.c (prepare_resume_reply): Implement stop reason
1139 "fork" for "T" stop message.
1140 * server.c (handle_query): Call handle_new_gdb_connection.
1141 * server.h (report_fork_events): Declare global flag.
1142 * target.h (struct target_ops) <handle_new_gdb_connection>:
1143 New member.
1144 (target_handle_new_gdb_connection): New macro.
1145 * win32-low.c: Initialize new structure member.
1146
ddcbc397
DB
11472015-05-12 Don Breazeal <donb@codesourcery.com>
1148
1149 * mem-break.c (APPEND_TO_LIST): Define macro.
1150 (clone_agent_expr): New function.
1151 (clone_one_breakpoint): New function.
1152 (clone_all_breakpoints): New function.
1153 * mem-break.h: Declare new functions.
1154
89245bc0
DB
11552015-05-12 Don Breazeal <donb@codesourcery.com>
1156
1157 * linux-low.c (linux_supports_fork_events): New function.
1158 (linux_supports_vfork_events): New function.
1159 (linux_target_ops): Initialize new structure members.
1160 (initialize_low): Call linux_check_ptrace_features.
1161 * lynx-low.c (lynx_target_ops): Initialize new structure
1162 members.
1163 * server.c (report_fork_events, report_vfork_events):
1164 New global flags.
1165 (handle_query): Add new features to qSupported packet and
1166 response.
1167 (captured_main): Initialize new global variables.
1168 * target.h (struct target_ops) <supports_fork_events>:
1169 New member.
1170 <supports_vfork_events>: New member.
1171 (target_supports_fork_events): New macro.
1172 (target_supports_vfork_events): New macro.
1173 * win32-low.c (win32_target_ops): Initialize new structure
1174 members.
1175
835205d0
GB
11762015-05-12 Gary Benson <gbenson@redhat.com>
1177
1178 * server.c (handle_qxfer_exec_file): Use current process
1179 if annex is empty.
1180
21e94bd9
SL
11812015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1182
1183 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1184 Remove HAVE_PTRACE_GETREGS conditionals.
1185 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1186 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1187
45614f15
YQ
11882015-05-08 Yao Qi <yao.qi@linaro.org>
1189
1190 * linux-low.c (linux_supports_conditional_breakpoints): New
1191 function.
1192 (linux_target_ops): Install new target method.
1193 * lynx-low.c (lynx_target_ops): Install NULL hook for
1194 supports_conditional_breakpoints.
1195 * nto-low.c (nto_target_ops): Likewise.
1196 * spu-low.c (spu_target_ops): Likewise.
1197 * win32-low.c (win32_target_ops): Likewise.
1198 * server.c (handle_query): Check
1199 target_supports_conditional_breakpoints.
1200 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1201 New field.
1202 (target_supports_conditional_breakpoints): New macro.
1203
80ad801e
PA
12042015-05-06 Pedro Alves <palves@redhat.com>
1205
1206 PR server/18081
1207 * server.c (start_inferior): If the process exits, mourn it.
1208
819843c7
GB
12092015-04-21 Gary Benson <gbenson@redhat.com>
1210
1211 * hostio.c (fileio_open_flags_to_host): Factored out to
1212 fileio_to_host_openflags in common/fileio.c. Single use
1213 updated.
1214
a2d5a9d7
MF
12152015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1216
1217 * linux-xtensa-low.c (xtensa_fill_gregset)
1218 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1219 XCHAL_HAVE_LOOP.
1220
deb44829
MF
12212015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1222
1223 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1224 (regs_info): Replace usrregs pointer with NULL.
1225
e57f1de3
GB
12262015-04-17 Gary Benson <gbenson@redhat.com>
1227
1228 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1229 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1230 * server.c (handle_qxfer_exec_file): New function.
1231 (qxfer_packets): Add exec-file entry.
1232 (handle_query): Report qXfer:exec-file:read as supported packet.
1233
62828379
RN
12342015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1235
1236 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1237
b88bb450
GB
12382015-04-09 Gary Benson <gbenson@redhat.com>
1239
1240 * hostio-errno.c (errno_to_fileio_error): Remove function.
1241 Update caller to use remote_fileio_to_fio_error.
1242
c8f4bfdd
YQ
12432015-04-09 Yao Qi <yao.qi@linaro.org>
1244
1245 * linux-low.c (linux_insert_point): Call
1246 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1247 (linux_remove_point): Call remove_memory_breakpoint if type is
1248 raw_bkpt_type_sw.
1249 * linux-x86-low.c (x86_insert_point): Don't call
1250 insert_memory_breakpoint.
1251 (x86_remove_point): Don't call remove_memory_breakpoint.
1252
41f98f02
PA
12532015-04-01 Pedro Alves <palves@redhat.com>
1254 Cleber Rosa <crosa@redhat.com>
1255
1256 * server.c (gdbserver_usage): Reorganize and extend the usage
1257 message.
1258
2bf6fb9d
PA
12592015-03-24 Pedro Alves <palves@redhat.com>
1260
1261 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1262 output. Also dump TRAP_TRACE.
1263 (linux_low_filter_event): In debug output, distinguish a
1264 resume_stop SIGSTOP from a delayed SIGSTOP.
1265
369f6daa
GB
12662015-03-24 Gary Benson <gbenson@redhat.com>
1267
1268 * linux-x86-low.c (x86_linux_new_thread): Moved to
1269 nat/x86-linux.c.
1270 (x86_linux_prepare_to_resume): Likewise.
1271
8e5d4070
GB
12722015-03-24 Gary Benson <gbenson@redhat.com>
1273
1274 * Makefile.in (x86-linux-dregs.o): New rule.
1275 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1276 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1277 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1278 (x86_linux_dr_get): Likewise.
1279 (x86_linux_dr_set): Likewise.
1280 (update_debug_registers_callback): Likewise.
1281 (x86_linux_dr_set_addr): Likewise.
1282 (x86_linux_dr_get_addr): Likewise.
1283 (x86_linux_dr_set_control): Likewise.
1284 (x86_linux_dr_get_control): Likewise.
1285 (x86_linux_dr_get_status): Likewise.
1286 (x86_linux_update_debug_registers): Likewise.
1287
2b95d440
GB
12882015-03-24 Gary Benson <gbenson@redhat.com>
1289
1290 * linux-x86-low.c (x86_linux_update_debug_registers):
1291 New function, factored out from...
1292 (x86_linux_prepare_to_resume): ...this.
1293
14b0bc68
GB
12942015-03-24 Gary Benson <gbenson@redhat.com>
1295
1296 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1297 (x86_linux_dr_set): Likewise.
1298 (update_debug_registers_callback): Likewise.
1299 (x86_linux_dr_set_addr): Likewise.
1300 (x86_linux_dr_get_addr): Likewise.
1301 (x86_linux_dr_set_control): Likewise.
1302 (x86_linux_dr_get_control): Likewise.
1303 (x86_linux_dr_get_status): Likewise.
1304 (x86_linux_prepare_to_resume): Likewise.
1305
5dfe6ca8
GB
13062015-03-24 Gary Benson <gbenson@redhat.com>
1307
1308 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1309 Use perror_with_name. Pass string through gettext.
1310 (x86_linux_dr_set): Likewise.
1311
d33472ad
GB
13122015-03-24 Gary Benson <gbenson@redhat.com>
1313
1314 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1315 (x86_linux_dr_set_addr): ...this.
1316 (x86_dr_low_get_addr): Rename to...
1317 (x86_linux_dr_get_addr): ...this.
1318 (x86_dr_low_set_control): Rename to...
1319 (x86_linux_dr_set_control): ...this.
1320 (x86_dr_low_get_control): Rename to...
1321 (x86_linux_dr_get_control): ...this.
1322 (x86_dr_low_get_status): Rename to...
1323 (x86_linux_dr_get_status): ...this.
1324 (x86_dr_low): Update with new function names.
1325
4b134ca1
GB
13262015-03-24 Gary Benson <gbenson@redhat.com>
1327
1328 * Makefile.in (x86-linux.o): New rule.
1329 * configure.srv: Add x86-linux.o to relevant targets.
1330 * linux-low.c (lwp_set_arch_private_info): New function.
1331 (lwp_arch_private_info): Likewise.
1332 * linux-x86-low.c: Include nat/x86-linux.h.
1333 (arch_lwp_info): Removed structure.
1334 (update_debug_registers_callback):
1335 Use lwp_set_debug_registers_changed.
1336 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1337 and lwp_set_debug_registers_changed.
1338 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1339
34c703da
GB
13402015-03-24 Gary Benson <gbenson@redhat.com>
1341
1342 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1343 * linux-arm-low.c (arm_new_thread): Likewise.
1344 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1345 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1346 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1347 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1348
cff068da
GB
13492015-03-24 Gary Benson <gbenson@redhat.com>
1350
1351 * linux-low.c (ptid_of_lwp): New function.
1352 (lwp_is_stopped): Likewise.
1353 (lwp_stop_reason): Likewise.
1354 * linux-x86-low.c (update_debug_registers_callback):
1355 Use lwp_is_stopped.
1356 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1357 lwp_stop_reason.
1358
b2f7c7e8
GB
13592015-03-24 Gary Benson <gbenson@redhat.com>
1360
1361 * linux-low.h (linux_stop_lwp): Remove declaration.
1362
6d4ee8c6
GB
13632015-03-24 Gary Benson <gbenson@redhat.com>
1364
1365 * linux-low.h: Include nat/linux-nat.h.
1366 * linux-low.c (iterate_over_lwps_args): New structure.
1367 (iterate_over_lwps_filter): New function.
1368 (iterate_over_lwps): Likewise.
1369 * linux-x86-low.c (update_debug_registers_callback):
1370 Update signature to what iterate_over_lwps expects.
1371 Remove PID check that iterate_over_lwps now performs.
1372 (x86_dr_low_set_addr): Use iterate_over_lwps.
1373 (x86_dr_low_set_control): Likewise.
1374
70a0bb6b
GB
13752015-03-24 Gary Benson <gbenson@redhat.com>
1376
1377 * linux-x86-low.c (x86_debug_reg_state): New function.
1378 (x86_linux_prepare_to_resume): Use the above.
1379
7b669087
GB
13802015-03-24 Gary Benson <gbenson@redhat.com>
1381
1382 * linux-low.c (current_lwp_ptid): New function.
1383 * linux-x86-low.c: Include nat/linux-nat.h.
1384 (x86_dr_low_get_addr): Use current_lwp_ptid.
1385 (x86_dr_low_get_control): Likewise.
1386 (x86_dr_low_get_status): Likewise.
1387
eef49a3d
PA
13882015-03-20 Pedro Alves <palves@redhat.com>
1389
1390 * tracepoint.c (cmd_qtstatus): Make "str" const.
1391
b2333d22
PA
13922015-03-20 Pedro Alves <palves@redhat.com>
1393
1394 * server.c (handle_general_set): Make "req_str" const.
1395
23f238d3
PA
13962015-03-19 Pedro Alves <palves@redhat.com>
1397
1398 * linux-low.c (linux_resume_one_lwp): Rename to ...
1399 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1400 instead call perror_with_name.
1401 (check_ptrace_stopped_lwp_gone): New function.
1402 (linux_resume_one_lwp): Reimplement as wrapper around
1403 linux_resume_one_lwp_throw that swallows errors if the LWP is
1404 gone.
1405
91baf43f
PA
14062015-03-19 Pedro Alves <palves@redhat.com>
1407
1408 * linux-low.c (count_events_callback, select_event_lwp_callback):
1409 No longer check whether the thread has resume_stop as last resume
1410 kind.
1411
8bf3b159
PA
14122015-03-19 Pedro Alves <palves@redhat.com>
1413
1414 * linux-low.c (count_events_callback, select_event_lwp_callback):
1415 Use the lwp's status_pending_p field, not the thread's.
1416
b90fc188
PA
14172015-03-19 Pedro Alves <palves@redhat.com>
1418
1419 * linux-low.c (select_event_lwp_callback): Update comments to
1420 no longer mention SIGTRAP.
1421
464b0089
GB
14222015-03-18 Gary Benson <gbenson@redhat.com>
1423
1424 * server.c (handle_query): Do not report vFile:fstat as supported.
1425
aa9e327f
GB
14262015-03-11 Gary Benson <gbenson@redhat.com>
1427
1428 * hostio.c (sys/types.h): New include.
1429 (sys/stat.h): Likewise.
1430 (common-remote-fileio.h): Likewise.
1431 (handle_fstat): New function.
1432 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1433
791c0056
GB
14342015-03-11 Gary Benson <gbenson@redhat.com>
1435
1436 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1437 struct stat.st_blocks and struct stat.st_blksize.
1438 * configure: Regenerate.
1439 * config.in: Likewise.
1440 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1441 (OBS): Add common-remote-fileio.o.
1442 (common-remote-fileio.o): New rule.
1443
9a9df970
PA
14442015-03-09 Pedro Alves <palves@redhat.com>
1445
1446 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1447 'struct sockaddr' pointer in 'accept' call.
1448
9eb1356e
PA
14492015-03-09 Pedro Alves <palves@redhat.com>
1450
1451 Revert:
1452 2015-03-07 Pedro Alves <palves@redhat.com>
1453 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1454 or <winsock2.h> here. Instead include "gdb_socket.h".
1455 (remote_open): Use union gdb_sockaddr_u.
1456 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1457 or <winsock2.h> here. Instead include "gdb_socket.h".
1458 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1459 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1460 or <sys/un.h>.
1461 (init_named_socket, gdb_agent_helper_thread): Use union
1462 gdb_sockaddr_u.
1463
aac331e4
PA
14642015-03-07 Pedro Alves <palves@redhat.com>
1465
1466 * configure.ac (build_warnings): Move
1467 -Wdeclaration-after-statement to the C-specific set.
1468 * configure: Regenerate.
1469
366c75fc
PA
14702015-03-07 Pedro Alves <palves@redhat.com>
1471
1472 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1473 or <winsock2.h> here. Instead include "gdb_socket.h".
1474 (remote_open): Use union gdb_sockaddr_u.
1475 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1476 or <winsock2.h> here. Instead include "gdb_socket.h".
1477 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1478 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1479 or <sys/un.h>.
1480 (init_named_socket, gdb_agent_helper_thread): Use union
1481 gdb_sockaddr_u.
1482
492d29ea
PA
14832015-03-07 Pedro Alves <palves@redhat.com>
1484
1485 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1486 instead.
1487
60a191ed
YQ
14882015-03-06 Yao Qi <yao.qi@linaro.org>
1489
1490 * linux-aarch64-low.c (aarch64_insert_point): Use
1491 show_debug_regs as a boolean.
1492 (aarch64_remove_point): Likewise.
1493
f5771b1d
PA
14942015-03-05 Pedro Alves <palves@redhat.com>
1495
1496 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1497 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1498 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1499 * nto-low.c (nto_target_ops): Likewise.
1500 * spu-low.c (spu_target_ops): Likewise.
1501 * win32-low.c (win32_target_ops): Likewise.
1502
3e572f71
PA
15032015-03-04 Pedro Alves <palves@redhat.com>
1504
72f4393d 1505 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1506 Decide whether a breakpoint triggered based on the SIGTRAP's
1507 siginfo.si_code.
72f4393d
L
1508 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1509 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1510 (linux_low_filter_event): Check for breakpoints before checking
1511 watchpoints.
1512 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1513 siginfo.si_code.
72f4393d
L
1514 (linux_stopped_by_sw_breakpoint)
1515 (linux_supports_stopped_by_sw_breakpoint)
1516 (linux_stopped_by_hw_breakpoint)
1517 (linux_supports_stopped_by_hw_breakpoint): New functions.
1518 (linux_target_ops): Install new target methods.
3e572f71 1519
1ec68e26
PA
15202015-03-04 Pedro Alves <palves@redhat.com>
1521
1522 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1523 * server.c (swbreak_feature, hwbreak_feature): New globals.
1524 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1525 (captured_main): Clear swbreak_feature and hwbreak_feature.
1526 * server.h (swbreak_feature, hwbreak_feature): Declare.
1527 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1528 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1529 supports_stopped_by_hw_breakpoint>: New fields.
1530 (target_supports_stopped_by_sw_breakpoint)
1531 (target_stopped_by_sw_breakpoint)
1532 (target_supports_stopped_by_hw_breakpoint)
1533 (target_stopped_by_hw_breakpoint): Declare.
1534
15c66dd6
PA
15352015-03-04 Pedro Alves <palves@redhat.com>
1536
1537 enum lwp_stop_reason -> enum target_stop_reason
1538 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1539 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1540 (linux_wait_1, stuck_in_jump_pad_callback)
1541 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1542 (linux_stopped_by_watchpoint):
1543 * linux-low.h (enum lwp_stop_reason): Delete.
1544 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1545 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1546
98fc70d6
YQ
15472015-03-04 Yao Qi <yao.qi@linaro.org>
1548
1549 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1550
dd2ac174
GB
15512015-03-03 Gary Benson <gbenson@redhat.com>
1552
1553 * hostio.c (handle_vFile): Fix prefix lengths.
1554
d68e53f4
MM
15552015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1556
1557 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1558 ptr_bits.
1559
bf2d68ab
AA
15602015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1561
1562 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1563 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1564 (clean): Add "rm -f" for above C files.
1565 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1566 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1567 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1568 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1569 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1570 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1571 (init_registers_s390x_vx_linux64)
1572 (init_registers_s390x_tevx_linux64)
1573 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1574 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1575 declarations.
1576 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1577 (s390_store_vxrs_high): New functions.
1578 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1579 NT_S390_VXRS_HIGH.
1580 (s390_arch_setup): Add logic for selecting one of the new target
1581 descriptions. Activate the new vector regsets if applicable.
1582 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1583 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1584 and init_registers_s390x_tevx_linux64.
1585
c966a859
PA
15862015-03-01 Pedro Alves <palves@redhat.com>
1587
1588 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1589 parameter.
1590
4180215b
PA
15912015-02-27 Pedro Alves <palves@redhat.com>
1592
1593 * linux-x86-low.c (u_debugreg_offset): New function.
1594 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1595
749bab01
PA
15962015-02-27 Pedro Alves <palves@redhat.com>
1597
1598 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1599 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1600 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1601 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1602 (ps_lsetfpregs, ps_getpid)
1603 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1604 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1605 (ps_lsetxregs, ps_plog): Declare.
1606
3c14e5a3
PA
16072015-02-27 Pedro Alves <palves@redhat.com>
1608
1609 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1610 IP_AGENT_EXPORT_FUNC.
1611 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1612 IP_AGENT_EXPORT_FUNC.
1613 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1614 (IP_AGENT_EXPORT): Delete.
1615 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1616 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1617 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1618 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1619 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1620 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1621 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1622 (traceframe_read_count, traceframe_write_count)
1623 (traceframes_created, trace_state_variables, get_raw_reg)
1624 (get_trace_state_variable_value, set_trace_state_variable_value)
1625 (ust_loaded, helper_thread_id, cmd_buf): Use
1626 IPA_SYM_EXPORTED_NAME.
1627 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1628 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1629 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1630 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1631 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1632 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1633 EXTERN_C_PUSH/EXTERN_C_POP.
1634 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1635 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1636 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1637 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1638 (traceframe_write_count, traceframe_read_count)
1639 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1640 (about_to_request_buffer_space, get_trace_state_variable_value)
1641 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1642 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1643 EXTERN_C_PUSH/EXTERN_C_POP.
1644 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1645 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1646 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1647 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1648 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1649 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1650 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1651 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1652 Define.
1653 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1654 (IP_AGENT_EXPORT_VAR_DECL): Define.
1655 (tracing): Declare.
1656 (gdb_agent_get_raw_reg): Declare.
1657
fe978cb0
PA
16582015-02-27 Tom Tromey <tromey@redhat.com>
1659 Pedro Alves <palves@redhat.com>
1660
1661 Rename symbols whose names are reserved C++ keywords throughout.
1662
3bc3d82a
PA
16632015-02-27 Pedro Alves <palves@redhat.com>
1664
1665 * Makefile.in (COMPILER): New, get it from autoconf.
1666 (CXX): Get from autoconf instead.
1667 (COMPILE.pre): Use COMPILER.
1668 (CC-LD): Rename to ...
1669 (CC_LD): ... this. Use COMPILER.
1670 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1671 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1672 * acinclude.m4: Include build-with-cxx.m4.
1673 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1674 Disable -Werror by default if building in C++ mode.
1675 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1676 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1677 the C++ compiler. Save/restore CXXFLAGS too.
1678 * configure: Regenerate.
1679
07697489
PA
16802015-02-27 Pedro Alves <palves@redhat.com>
1681
1682 * acinclude.m4: Include libiberty.m4.
1683 * configure.ac: Call libiberty_INIT.
1684 * config.in, configure: Regenerate.
1685
9beb7c4e
PA
16862015-02-26 Pedro Alves <palves@redhat.com>
1687
1688 * linux-low.c (linux_wait_1): When incrementing the PC past a
1689 program breakpoint always use the_low_target.breakpoint_len as
1690 increment, rather than the maximum between that and
1691 the_low_target.decr_pc_after_break.
1692
8090aef2
PA
16932015-02-23 Pedro Alves <palves@redhat.com>
1694
1695 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1696 thread was doing a step-over; always adjust the PC if
1697 we stepped over a permanent breakpoint.
1698 (linux_wait_1): If we stepped over breakpoint that was on top of a
1699 permanent breakpoint, manually advance the PC past it.
1700
bc9540e8
PA
17012015-02-23 Pedro Alves <palves@redhat.com>
1702
1703 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1704 modes.
1705 (x86_fill_gregset, x86_store_gregset): Use it when handling
1706 $orig_eax.
1707
2db9a427
PA
17082015-02-20 Pedro Alves <palves@redhat.com>
1709
1710 * thread-db.c: Include "nat/linux-procfs.h".
1711 (thread_db_init): Skip listing new threads if the kernel supports
1712 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1713
afa8d396
PA
17142015-02-20 Pedro Alves <palves@redhat.com>
1715
1716 * linux-low.c (status_pending_p_callback): Use ptid_match.
1717
c9587f88
AT
17182015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1719
1720 PR breakpoints/16812
1721 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1722 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1723 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1724
b05ec7a5
AT
17252015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1726
1727 PR breakpoints/15956
1728 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1729
d33501a5
MM
17302015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1731
1732 * linux-low.c (linux_low_btrace_conf): Print size.
1733 * server.c (handle_btrace_conf_general_set): New.
1734 (hanle_general_set): Call handle_btrace_conf_general_set.
1735 (handle_query): Report Qbtrace-conf:bts:size as supported.
1736
f4abbc16
MM
17372015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1738
1739 * linux-low.c (linux_low_enable_btrace): Update parameters.
1740 (linux_low_btrace_conf): New.
1741 (linux_target_ops)<to_btrace_conf>: Initialize.
1742 * server.c (current_btrace_conf): New.
1743 (handle_btrace_enable): Rename to ...
1744 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1745 to target_enable_btrace. Update comment. Update users.
1746 (handle_qxfer_btrace_conf): New.
1747 (qxfer_packets): Add btrace-conf entry.
1748 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1749 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1750 (target_ops)<read_btrace_conf>: New.
1751 (target_enable_btrace): Update parameters.
1752 (target_read_btrace_conf): New.
1753
043c3577
MM
17542015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1755
1756 * server.c (handle_btrace_general_set): Remove call to
1757 target_supports_btrace.
1758 (supported_btrace_packets): New.
1759 (handle_query): Call supported_btrace_packets.
1760 * target.h: include btrace-common.h.
1761 (btrace_target_info): Removed.
1762 (supports_btrace, target_supports_btrace): Update parameters.
1763
734b0e4b
MM
17642015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1765
1766 * Makefile.in (SFILES): Add common/btrace-common.c.
1767 (OBS): Add common/btrace-common.o.
1768 (btrace-common.o): Add build rules.
1769 * linux-low: Include btrace-common.h.
1770 (linux_low_read_btrace): Use struct btrace_data. Call
1771 btrace_data_init and btrace_data_fini.
1772
d6c146e9
PA
17732015-02-06 Pedro Alves <palves@redhat.com>
1774
1775 * thread-db.c (find_new_threads_callback): Add debug output.
1776
20ba1ce6
PA
17772015-02-04 Pedro Alves <palves@redhat.com>
1778
1779 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1780 (resume_stopped_resumed_lwps): New function.
1781 (linux_wait_for_event_filtered): Use it.
1782
8cc73a39
SDJ
17832015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1784
1785 * Makefile.in (SFILES): Add linux-personality.c.
1786 (linux-personality.o): New rule.
1787 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1788 list of objects to be built.
1789 * linux-low.c: Include nat/linux-personality.h.
1790 (linux_create_inferior): Remove code to disable address space
1791 randomization (moved to ../nat/linux-personality.c). Create
1792 cleanup to disable address space randomization.
1793
fb23d554
SDJ
17942015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1795
1796 * Makefile.in (posix-strerror.o): New rule.
1797 (mingw-strerror.o): Likewise.
1798 * configure: Regenerated.
1799 * configure.ac: Source file ../common/common.host. Initialize new
1800 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1801
cdf43629
YQ
18022015-01-14 Yao Qi <yao@codesourcery.com>
1803
1804 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1805 (ppc-linux.o): New rule.
1806 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1807 * configure.ac: AC_CHECK_FUNCS(getauxval).
1808 * config.in: Re-generated.
1809 * configure: Re-generated.
1810 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1811 ppc64_64bit_inferior_p
1812
514c5338
YQ
18132015-01-14 Yao Qi <yao@codesourcery.com>
1814
1815 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1816 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1817 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1818 (PT_ORIG_R3, PT_TRAP): Likewise.
1819 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1820 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1821 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1822
3368c1e5
JB
18232015-01-10 Joel Brobecker <brobecker@adacore.com>
1824
1825 * i387-fp.c (i387_cache_to_xsave): In look over
1826 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1827 zmmh_low_space field by use of zmmh_high_space.
1828
582511be
PA
18292015-01-09 Pedro Alves <palves@redhat.com>
1830
1831 * linux-low.c (step_over_bkpt): Move higher up in the file.
1832 (handle_extended_wait): Don't store the stop_pc here.
1833 (get_stop_pc): Adjust comments and rename to ...
1834 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1835 stopped for a software breakpoint or hardware breakpoint.
1836 (thread_still_has_status_pending_p): New function.
1837 (status_pending_p_callback): Use
1838 thread_still_has_status_pending_p. If the event is no longer
1839 interesting, resume the LWP.
1840 (handle_tracepoints): Add assert.
1841 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1842 (wstatus_maybe_breakpoint): New function.
1843 (cancel_breakpoint): Delete function.
1844 (check_stopped_by_watchpoint): New function, factored out from
1845 linux_low_filter_event.
1846 (lp_status_maybe_breakpoint): Delete function.
1847 (linux_low_filter_event): Remove filter_ptid argument.
1848 Leave thread group exits pending here. Store the LWP's stop PC.
1849 Always leave events pending.
1850 (linux_wait_for_event_filtered): Pull all events out of the
1851 kernel, and leave them all pending.
1852 (count_events_callback, select_event_lwp_callback): Consider all
1853 events.
1854 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1855 (select_event_lwp): Only give preference to the stepping LWP in
1856 all-stop mode. Adjust comments.
1857 (ignore_event): New function.
1858 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1859 references to cancel_breakpoints. Adjust to renames. Also give
1860 equal priority to all LWPs that have had events in non-stop mode.
1861 If reporting a software breakpoint event, unadjust the LWP's PC.
1862 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1863 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1864 Adjust.
1865 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1866 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1867 (linux_stopped_by_watchpoint): Adjust.
1868 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1869 * linux-low.h (enum lwp_stop_reason): New.
1870 (struct lwp_info) <stop_pc>: Adjust comment.
1871 <stopped_by_watchpoint>: Delete field.
1872 <stop_reason>: New field.
1873 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1874 * mem-break.c (software_breakpoint_inserted_here)
1875 (hardware_breakpoint_inserted_here): New function.
1876 * mem-break.h (software_breakpoint_inserted_here)
1877 (hardware_breakpoint_inserted_here): Declare.
1878 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1879 (cancel_breakpoints): Delete.
1880 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1881 (upload_fast_traceframes): Remove references to
1882 cancel_breakpoints.
1883
a33e3959
PA
18842015-01-09 Pedro Alves <palves@redhat.com>
1885
1886 * thread-db.c (find_new_threads_callback): Ignore thread if the
1887 kernel thread ID is -1.
1888
8784d563
PA
18892015-01-09 Pedro Alves <palves@redhat.com>
1890
1891 * linux-low.c (linux_attach_fail_reason_string): Move to
1892 nat/linux-ptrace.c, and rename.
1893 (linux_attach_lwp): Update comment.
1894 (attach_proc_task_lwp_callback): New function.
1895 (linux_attach): Adjust to rename and use
1896 linux_proc_attach_tgid_threads.
1897 (linux_attach_fail_reason_string): Delete declaration.
1898
76f2b779
JB
18992015-01-01 Joel Brobecker <brobecker@adacore.com>
1900
1901 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1902 * server.c (gdbserver_version): Likewise.
1903
fafcc06a
SDJ
19042014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1905
1906 * remote-utils.c: Include ctype.h.
1907 (input_interrupt): Explicitly handle the case when the char
1908 received is the NUL byte. Improve the printing of non-ASCII
1909 characters.
1910
beed38b8
JB
19112014-12-16 Joel Brobecker <brobecker@adacore.com>
1912
1913 * linux-low.c (linux_low_filter_event): Update call to
1914 linux_enable_event_reporting following the addition of
1915 a new parameter to that function.
1916
bf330350
CU
19172014-12-16 Catalin Udma <catalin.udma@freescale.com>
1918
1919 PR server/17457
1920 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1921 (AARCH64_FPCR_REGNO): Likewise.
1922 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1923 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1924 (aarch64_store_fpregset): Likewise.
1925
5227d625
JB
19262014-12-15 Joel Brobecker <brobecker@adacore.com>
1927
1928 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1929 Remove FIXME comment about assumption about N.
1930
f93b65a0
JB
19312014-12-13 Joel Brobecker <brobecker@adacore.com>
1932
1933 * configure.ac: If large-file support is disabled in GDBserver,
1934 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1935 * configure: Regenerate.
1936
e5a9158d
AA
19372014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1938
1939 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1940 warning upon ENODATA from ptrace.
1941 * linux-s390-low.c (s390_store_tdb): New.
1942 (s390_regsets): Add regset for NT_S390_TDB.
1943
feea5f36
AA
19442014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1945
1946 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1947 without a fill_function.
1948 * linux-s390-low.c (s390_fill_last_break): Remove.
1949 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1950 (s390_arch_setup): Use regset's size instead of fill_function for
1951 loop end condition.
1952
098dbe61
AA
19532014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1954
1955 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1956 the regset's store function when ptrace returned an error.
1957 * regcache.c (get_thread_regcache): Invalidate register cache
1958 before fetching inferior's registers.
1959
28eef672
AA
19602014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1961
1962 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1963 while-loop as for-loop.
1964 (regsets_store_inferior_registers): Likewise.
1965
bdca27a2
YQ
19662014-11-28 Yao Qi <yao@codesourcery.com>
1967
1968 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1969 * config.in, configure: Re-generate.
1970 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1971 is defined.
1972
9c232dda
YQ
19732014-11-21 Yao Qi <yao@codesourcery.com>
1974
1975 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1976 (AC_CHECK_HEADERS): Remove malloc.h.
1977 * configure: Re-generated.
1978 * config.in: Re-generated.
1979 * server.h: Don't include alloca.h and malloc.h.
1980 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1981 Don't include malloc.h.
1982
43968415
JB
19832014-11-17 Joel Brobecker <brobecker@adacore.com>
1984
1985 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1986 corresponding ERRNO check in same block.
1987
40e91bc7
PA
19882014-11-12 Pedro Alves <palves@redhat.com>
1989
1990 * server.c (cont_thread): Update comment.
1991 (start_inferior, attach_inferior): No longer clear cont_thread.
1992 (handle_v_cont): No longer set cont_thread.
1993 (captured_main): Clear cont_thread each time a GDB connects.
1994
c2c118cf
PA
19952014-11-12 Pedro Alves <palves@redhat.com>
1996
1997 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1998 thread, and don't resume all threads if the Hc thread has exited.
1999
78708b7c
PA
20002014-11-12 Pedro Alves <palves@redhat.com>
2001
2002 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
2003 the process group instead of to a specific LWP.
2004
a2abc7de
PA
20052014-10-15 Pedro Alves <palves@redhat.com>
2006
2007 PR server/17487
2008 * win32-arm-low.c (arm_set_thread_context): Remove current_event
2009 parameter.
2010 (arm_set_thread_context): Delete.
2011 (the_low_target): Adjust.
2012 * win32-i386-low.c (debug_registers_changed)
2013 (debug_registers_used): Delete.
2014 (update_debug_registers_callback): New function.
2015 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
2016 needing to update their debug registers.
2017 (win32_get_current_dr): New function.
2018 (x86_dr_low_get_addr, x86_dr_low_get_control)
2019 (x86_dr_low_get_status): Fetch the debug register from the thread
2020 record's context.
2021 (i386_initial_stuff): Adjust.
2022 (i386_get_thread_context): Remove current_event parameter. Don't
2023 clear debug_registers_changed nor copy DR values to
2024 debug_reg_state.
2025 (i386_set_thread_context): Delete.
2026 (i386_prepare_to_resume): New function.
2027 (i386_thread_added): Mark the thread as needing to update irs
2028 debug registers.
2029 (the_low_target): Remove i386_set_thread_context and install
2030 i386_prepare_to_resume.
2031 * win32-low.c (win32_get_thread_context): Adjust.
2032 (win32_set_thread_context): Use SetThreadContext
2033 directly.
2034 (win32_prepare_to_resume): New function.
2035 (win32_require_context): New function, factored out from ...
2036 (thread_rec): ... this.
2037 (continue_one_thread): Call win32_prepare_to_resume on each thread
2038 we're about to continue.
2039 (win32_resume): Call win32_prepare_to_resume on the event thread.
2040 * win32-low.h (struct win32_thread_info)
2041 <debug_registers_changed>: New field.
2042 (struct win32_target_ops): Change prototype of set_thread_context,
2043 delete set_thread_context and add prepare_to_resume.
2044 (win32_require_context): New declaration.
2045
a442d071
GB
20462014-10-08 Gary Benson <gbenson@redhat.com>
2047
2048 * server.h: Do not include common-exceptions.h.
2049
6f1947e8
GB
20502014-10-08 Gary Benson <gbenson@redhat.com>
2051
2052 * server.h: Do not include cleanups.h.
2053
63b434a4
JH
20542014-09-30 James Hogan <james.hogan@imgtec.com>
2055
2056 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
2057 mips64-dsp-linux.c.
2058
c4d9ceb6
YQ
20592014-09-23 Yao Qi <yao@codesourcery.com>
2060
2061 * linux-low.c (lp_status_maybe_breakpoint): New function.
2062 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2063 (count_events_callback): Likewise.
2064 (select_event_lwp_callback): Likewise.
2065 (cancel_breakpoints_callback): Likewise.
2066
89a5711c
DB
20672014-09-19 Don Breazeal <donb@codesourcery.com>
2068
2069 * linux-low.c (handle_extended_wait): Call
2070 linux_ptrace_get_extended_event.
2071 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2072 linux_is_extended_waitstatus.
2073
bffc0964
JB
20742014-09-16 Joel Brobecker <brobecker@adacore.com>
2075
2076 * Makefile.in (CPPFLAGS): Define.
2077 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2078 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2079
0bfdf32f
GB
20802014-09-16 Gary Benson <gbenson@redhat.com>
2081
2082 * inferiors.h (current_inferior): Renamed as...
2083 (current_thread): New variable. All uses updated.
2084 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2085 (maybe_move_out_of_jump_pad): Likewise.
2086 (cancel_breakpoint): Likewise.
2087 (linux_low_filter_event): Likewise.
2088 (wait_for_sigstop): Likewise.
2089 (linux_resume_one_lwp): Likewise.
2090 (need_step_over_p): Likewise.
2091 (start_step_over): Likewise.
2092 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2093 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2094 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2095 and save_inferior as saved_thread.
2096 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2097 saved_thread.
2098 (regcache_invalidate_thread): Likewise.
2099 * remote-utils.c (prepare_resume_reply): Likewise.
2100 * thread-db.c (thread_db_get_tls_address): Likewise.
2101 (disable_thread_event_reporting): Likewise.
2102 (remove_thread_event_breakpoints): Likewise.
2103 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2104 as saved_thread.
2105 * target.h (set_desired_inferior): Renamed as...
2106 (set_desired_thread): New declaration. All uses updated.
2107 * server.c (myresume): Updated comment to reference thread instead
2108 of inferior.
2109 (handle_serial_event): Likewise.
2110 (handle_target_event): Likewise.
2111
361c8ade
GB
21122014-09-12 Tom Tromey <tromey@redhat.com>
2113 Gary Benson <gbenson@redhat.com>
2114
2115 * regcache.h: Include common-regcache.h.
2116 (regcache_read_pc): Don't declare.
2117 * regcache.c (get_thread_regcache_for_ptid): New function.
2118
bd9269f7
GB
21192014-09-11 Tom Tromey <tromey@redhat.com>
2120 Gary Benson <gbenson@redhat.com>
2121
2122 * symbol.c: New file.
2123 * Makefile.in (SFILES): Add symbol.c.
2124 (OBS): Add symbol.o.
2125
f8c1d06b
GB
21262014-09-11 Gary Benson <gbenson@redhat.com>
2127
2128 * target.c (target_stop_ptid, target_continue_ptid): New
2129 functions.
2130
721ec300
GB
21312014-09-11 Tom Tromey <tromey@redhat.com>
2132 Gary Benson <gbenson@redhat.com>
2133
2134 * target.h: Include target/target.h.
2135 * target.c (target_read_memory, target_read_uint32)
2136 (target_write_memory): New functions.
2137
c5e92cca
GB
21382014-09-11 Gary Benson <gbenson@redhat.com>
2139
2140 * server.h (debug_hw_points): Don't declare.
2141 * server.c (debug_hw_points): Don't define. Replace all uses
2142 with show_debug_regs.
2143 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2144 all uses with show_debug_regs.
2145
2e4bb98a
EBM
21462014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2147
2148 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2149 endianness into account.
2150 (ppc_supply_ptrace_register): Likewise.
2151
ac740bc7
JH
21522014-09-03 James Hogan <james.hogan@imgtec.com>
2153
2154 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2155 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2156
97ea6506
GB
21572014-09-03 Gary Benson <gbenson@redhat.com>
2158
2159 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2160 ALL_DEBUG_ADDRESS_REGISTERS.
2161
df7e5265
GB
21622014-09-02 Gary Benson <gbenson@redhat.com>
2163
2164 * i386-low.h: Renamed as...
2165 * x86-low.h: New file. All type, function and variable name
2166 prefixes changed from "i386_" to "x86_". All references updated.
2167 * i386-low.c: Renamed as...
2168 * x86-low.c: New file. All type, function and variable name
2169 prefixes changed from "i386_" to "x86_". All references updated.
2170
ed859da7
GB
21712014-09-02 Gary Benson <gbenson@redhat.com>
2172
2173 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2174 (x86_linux_new_thread): Likewise.
2175
860789c7
GB
21762014-08-29 Gary Benson <gbenson@redhat.com>
2177
2178 * server.h (setjmp.h): Do not include.
2179 (toplevel): Do not declare.
2180 (common-exceptions.h): Include.
2181 (cleanups.h): Likewise.
2182 * server.c (toplevel): Do not define.
2183 (exit_code): New static global.
2184 (detach_or_kill_for_exit_cleanup): New function.
2185 (main): New function. Original main renamed to...
2186 (captured_main): New function.
2187 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2188
ff55e1b5
GB
21892014-08-29 Gary Benson <gbenson@redhat.com>
2190
2191 * Makefile.in (SFILES): Add common/common-exceptions.c.
2192 (OBS): Add common-exceptions.o.
2193 (common-exceptions.o): New rule.
2194 * utils.c (prepare_to_throw_exception): New function.
2195
e9bcb658
GB
21962014-08-29 Gary Benson <gbenson@redhat.com>
2197
2198 * config.in: Regenerate.
2199 * configure: Likewise.
2200
e3180625
GB
22012014-08-29 Gary Benson <gbenson@redhat.com>
2202
2203 * Makefile.in (SFILES): Add common/cleanups.c.
2204 (OBS): cleanups.o.
2205 (cleanups.o): New rule.
2206
e3d6ba5d
GB
22072014-08-29 Gary Benson <gbenson@redhat.com>
2208
2209 * utils.c (internal_vwarning): New function.
2210
7096e886
GB
22112014-08-28 Gary Benson <gbenson@redhat.com>
2212
2213 * utils.h (fatal): Remove declaration.
2214 * utils.c (fatal): Remove function.
2215
14ce3192
GB
22162014-08-28 Gary Benson <gbenson@redhat.com>
2217
2218 * tracepoint.c (gdb_agent_init): Replace fatal with
2219 perror_with_name.
2220 (initialize_tracepoint): Likewise.
2221
50278d59
GB
22222014-08-28 Gary Benson <gbenson@redhat.com>
2223
2224 * remote-utils.c (remote_prepare): Replace fatal with error.
2225
aa96c426
GB
22262014-08-28 Gary Benson <gbenson@redhat.com>
2227
2228 * linux-low.c (linux_async): Replace fatal with warning.
2229 Tidy up and return.
2230 (linux_start_non_stop): Return -1 if linux_async failed.
2231
f7160e97
GB
22322014-08-28 Gary Benson <gbenson@redhat.com>
2233
2234 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2235 gdb_assert.
2236 (i386_dr_low_get_addr): Remove vague comment.
2237 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2238 gdb_assert.
2239
38e08fca
GB
22402014-08-28 Gary Benson <gbenson@redhat.com>
2241
2242 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2243 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2244 internal_error.
2245 (linux_resume_one_lwp): Likewise.
2246 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2247 gdb_assert.
2248 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2249 with internal_error.
2250 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2251 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2252 (find_register_by_name): Replace fatal with internal_error.
2253 (find_regno): Likewise.
2254 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2255 * thread-db.c (thread_db_create_event): Likewise.
2256 (thread_db_load_search): Likewise.
2257 (try_thread_db_load_1): Likewise.
2258 * tracepoint.c (get_jump_space_head): Replace fatal with
2259 internal_error.
2260 (claim_trampoline_space): Likewise.
2261 (have_fast_tracepoint_trampoline_buffer): Likewise.
2262 (cmd_qtstart): Likewise.
2263 (stop_tracing): Likewise.
2264 (fast_tracepoint_collecting): Likewise.
2265 (target_malloc): Likewise.
2266 (download_tracepoint): Likewise.
2267 (download_trace_state_variables): Replace check with gdb_assert.
2268 (upload_fast_traceframes): Replace fatal with internal_error.
2269
34abf635
GB
22702014-08-19 Tom Tromey <tromey@redhat.com>
2271 Gary Benson <gbenson@redhat.com>
2272
2273 * Makefile.in (SFILES): Add common/common-debug.c.
2274 (OBS): Add common-debug.o.
2275 (common-debug.o): New rule.
2276 * debug.h (debug_printf): Don't declare.
2277 * debug.c (debug_printf): Renamed and rewritten as...
2278 (debug_vprintf): New function.
2279
f6e94d78
GB
22802014-08-19 Gary Benson <gbenson@redhat.com>
2281
2282 * utils.h: Do not include print-utils.h.
2283
9239eeab
GB
22842014-08-19 Tom Tromey <tromey@redhat.com>
2285 Gary Benson <gbenson@redhat.com>
2286
2287 * server.h: Add static assertion.
2288 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2289
ef87c8bb
GB
22902014-08-19 Tom Tromey <tromey@redhat.com>
2291 Gary Benson <gbenson@redhat.com>
2292
2293 * Makefile.in (SFILES): Add common/errors.c.
2294 (OBS): Add errors.o.
2295 (IPA_OBS): Add errors-ipa.o.
2296 (errors.o): New rule.
2297 (errors-ipa.o): Likewise.
2298 * utils.h (perror_with_name, error, warning): Don't declare.
2299 * utils.c (warning): Renamed and rewritten as...
2300 (vwarning): New function.
2301 (error): Renamed and rewritten as...
2302 (verror): New function.
2303 (internal_error): Renamed and rewritten as...
2304 (internal_verror): New function.
2305
bb974a24
GB
23062014-08-07 Gary Benson <gbenson@redhat.com>
2307
2308 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2309 * configure: Regenerate.
2310 * config.in: Likewise.
2311 * server.h: Do not include errno.h.
2312 * event-loop.c: Likewise.
2313 * hostio-errno.c: Likewise.
2314 * linux-low.c: Likewise.
2315 * remote-utils.c: Likewise.
2316 * spu-low.c: Likewise.
2317 * utils.c: Likewise.
2318 * gdbreplay.c: Unconditionally include errno.h.
2319
6d3d12eb
GB
23202014-08-07 Gary Benson <gbenson@redhat.com>
2321
2322 * server.h: Do not include string.h.
2323 * event-loop.c: Likewise.
2324 * linux-low.c: Likewise.
2325 * regcache.c: Likewise.
2326 * remote-utils.c: Likewise.
2327 * spu-low.c: Likewise.
2328 * utils.c: Likewise.
2329
dccbb609
GB
23302014-08-07 Gary Benson <gbenson@redhat.com>
2331
2332 * server.h: Do not include gdb_assert.h.
2333
e76df0d0
GB
23342014-08-07 Gary Benson <gbenson@redhat.com>
2335
2336 * server.h: Do not include common-utils.h.
2337
4cb9c816
GB
23382014-08-07 Gary Benson <gbenson@redhat.com>
2339
2340 * server.h: Do not include ptid.h.
2341 * notif.h: Likewise.
2342
3995eeee
GB
23432014-08-07 Gary Benson <gbenson@redhat.com>
2344
2345 * server.h: Do not include gdb_locale.h.
2346
cb9f1a9b
GB
23472014-08-07 Gary Benson <gbenson@redhat.com>
2348
2349 * server.h: Do not include gdb/signals.h.
2350 * win32-low.c: Likewise.
2351
a5fceff8
GB
23522014-08-07 Gary Benson <gbenson@redhat.com>
2353
2354 * server.h: Do not include pathmax.h.
2355
b9391142
GB
23562014-08-07 Gary Benson <gbenson@redhat.com>
2357
2358 * server.h: Do not include libiberty.h.
2359 * linux-bfin-low.c: Likewise.
2360
0e443c87
GB
23612014-08-07 Gary Benson <gbenson@redhat.com>
2362
2363 * server.h: Do not include ansidecl.h.
2364
8ebb3f56
GB
23652014-08-07 Gary Benson <gbenson@redhat.com>
2366
2367 * linux-x86-low.c: Do not include stddef.h.
2368 * lynx-ppc-low.c: Likewise.
2369 * tracepoint.c: Likewise.
2370
8980bdf6
GB
23712014-08-07 Gary Benson <gbenson@redhat.com>
2372
2373 * server.h: Do not include stdarg.h.
2374 * nto-low.c: Likewise.
2375
d7096f71
GB
23762014-08-07 Gary Benson <gbenson@redhat.com>
2377
2378 * server.h: Do not include stdlib.h.
2379 * inferiors.c: Likewise.
2380 * linux-low.c: Likewise.
2381 * regcache.c: Likewise.
2382 * spu-low.c: Likewise.
2383 * tracepoint.c: Likewise.
2384 * utils.c: Likewise.
2385
d02f550d
GB
23862014-08-07 Gary Benson <gbenson@redhat.com>
2387
2388 * server.h: Do not include stdio.h.
2389 * linux-low.c: Likewise.
2390 * remote-utils.c: Likewise.
2391 * spu-low.c: Likewise.
2392 * utils.c: Likewise.
2393 * wincecompat.c: Likewise.
2394
87f6c4e3
GB
23952014-08-06 Gary Benson <gbenson@redhat.com>
2396
2397 * regcache.c (init_register_cache): Move conditionals inside if.
2398
7089dca4
GB
23992014-08-06 Gary Benson <gbenson@redhat.com>
2400
2401 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2402
462f517e
GB
24032014-07-31 Gary Benson <gbenson@redhat.com>
2404
2405 * ax.h: Do not include server.h.
2406 * gdbthread.h: Likewise.
2407 * lynx-low.h: Likewise.
2408 * notif.h: Likewise.
2409
976411d6
GB
24102014-07-30 Gary Benson <gbenson@redhat.com>
2411
2412 * server.h: Include common-defs.h.
2413 Do not include config.h or build-gnulib-gdbserver/config.h.
2414
d41f6d8e
GB
24152014-07-30 Gary Benson <gbenson@redhat.com>
2416
2417 * hostio-errno.c: Move server.h to top of includes list.
2418 * inferiors.c: Likewise.
2419 * linux-x86-low.c: Likewise.
2420 * notif.c: Include server.h.
2421
314c6a35
TT
24222014-07-24 Tom Tromey <tromey@redhat.com>
2423 Gary Benson <gbenson@redhat.com>
2424
2425 * server.h (CORE_ADDR): Now unsigned.
2426
69ff6be5
PA
24272014-07-16 Pedro Alves <palves@redhat.com>
2428
2429 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2430
ce9e3fe7
PA
24312014-07-15 Pedro Alves <palves@redhat.com>
2432
2433 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2434 copy.
2435
e76126e8
PA
24362014-07-11 Pedro Alves <palves@redhat.com>
2437
2438 * linux-low.c (kill_wait_lwp): New function, based on
2439 kill_one_lwp_callback, but use my_waitpid directly.
2440 (kill_one_lwp_callback, linux_kill): Use it.
2441
8e9db26e
PA
24422014-06-23 Pedro Alves <palves@redhat.com>
2443
2444 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2445 before setting DR0..DR3.
2446
698b3e08
GB
24472014-06-20 Gary Benson <gbenson@redhat.com>
2448
2449 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2450 * configure: Regenerated.
2451 * config.in: Likewise.
2452
125f8a3d
GB
24532014-06-20 Gary Benson <gbenson@redhat.com>
2454
2455 * Makefile.in (SFILES): Update locations for files moved
2456 from common to nat.
2457 (object file files): Reordered.
2458
42995dbd
GB
24592014-06-20 Gary Benson <gbenson@redhat.com>
2460
2461 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2462 (i386_dr_low_set_addr): Likewise.
2463 (i386_dr_low_get_addr): Likewise.
2464 (i386_dr_low_can_set_control): Likewise.
2465 (i386_dr_low_set_control): Likewise.
2466 (i386_dr_low_get_control): Likewise.
2467 (i386_dr_low_get_status): Likewise.
2468 (i386_get_debug_register_length): Likewise.
2469 * linux-x86-low.c (i386_dr_low_set_addr):
2470 Changed signature. Made static.
2471 (i386_dr_low_get_addr): Likewise.
2472 (i386_dr_low_set_control): Likewise.
2473 (i386_dr_low_get_control): Likewise.
2474 (i386_dr_low_get_status): Likewise.
2475 (i386_dr_low): New global variable.
2476 * win32-i386-low.c (i386_dr_low_set_addr):
2477 Changed signature. Made static.
2478 (i386_dr_low_get_addr): Likewise.
2479 (i386_dr_low_set_control): Likewise.
2480 (i386_dr_low_get_control): Likewise.
2481 (i386_dr_low_get_status): Likewise.
2482 (i386_dr_low): New global variable.
2483
e1d2394b
MS
24842014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2485
2486 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2487 * Makefile.in (AR, AR_FLAGS): Define.
2488 * configure: Regenerate.
2489
3a8ee006
GB
24902014-06-19 Gary Benson <gbenson@redhat.com>
2491
2492 * Makefile.in (i386-dregs.o): New rule.
2493 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2494 * i386-low.c (target.h): Remove include.
2495 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2496 (DR_CONTROL_SHIFT): Likewise.
2497 (DR_CONTROL_SIZE): Likewise.
2498 (DR_RW_EXECUTE): Likewise.
2499 (DR_RW_WRITE): Likewise.
2500 (DR_RW_READ): Likewise.
2501 (DR_RW_IORW): Likewise.
2502 (DR_LEN_1): Likewise.
2503 (DR_LEN_2): Likewise.
2504 (DR_LEN_4): Likewise.
2505 (DR_LEN_8): Likewise.
2506 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2507 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2508 (DR_ENABLE_SIZE): Likewise.
2509 (DR_LOCAL_SLOWDOWN): Likewise.
2510 (DR_GLOBAL_SLOWDOWN): Likewise.
2511 (DR_CONTROL_RESERVED): Likewise.
2512 (I386_DR_CONTROL_MASK): Likewise.
2513 (I386_DR_VACANT): Likewise.
2514 (I386_DR_LOCAL_ENABLE): Likewise.
2515 (I386_DR_GLOBAL_ENABLE): Likewise.
2516 (I386_DR_DISABLE): Likewise.
2517 (I386_DR_SET_RW_LEN): Likewise.
2518 (I386_DR_GET_RW_LEN): Likewise.
2519 (I386_DR_WATCH_HIT): Likewise.
2520 (i386_wp_op_t): Likewise.
2521 (i386_show_dr): Likewise.
2522 (i386_length_and_rw_bits): Likewise.
2523 (i386_insert_aligned_watchpoint): Likewise.
2524 (i386_remove_aligned_watchpoint): Likewise.
2525 (i386_handle_nonaligned_watchpoint): Likewise.
2526 i386_update_inferior_debug_regs(): Likewise.
2527 (i386_dr_insert_watchpoint): Likewise.
2528 (i386_dr_remove_watchpoint): Likewise.
2529 (i386_dr_region_ok_for_watchpoint): Likewise.
2530 (i386_dr_stopped_data_address): Likewise.
2531 (i386_dr_stopped_by_watchpoint): Likewise.
2532
8f26655c
GB
25332014-06-19 Gary Benson <gbenson@redhat.com>
2534
2535 * i386-low.c (i386_dr_show): Renamed to
2536 i386_show_dr and made static. All uses updated.
2537 (i386_dr_length_and_rw_bits): Renamed to
2538 i386_length_and_rw_bits and made static.
2539 All uses updated.
2540 (i386_dr_insert_aligned_watchpoint): Renamed to
2541 i386_insert_aligned_watchpoint and made static.
2542 All uses updated.
2543 (i386_dr_remove_aligned_watchpoint): Renamed to
2544 i386_remove_aligned_watchpoint and made static.
2545 All uses updated.
2546 (i386_dr_update_inferior_debug_regs): Renamed to
2547 i386_update_inferior_debug_regs and made static.
2548 All uses updated.
2549
b9228891
GB
25502014-06-18 Gary Benson <gbenson@redhat.com>
2551
5171def3
GB
2552 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2553 (i386_dr_low_can_set_control): Likewise.
2554 (i386_get_debug_register_length): Likewise.
2555 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2556 (i386_dr_low_can_set_control): Likewise.
2557 (i386_get_debug_register_length): Likewise.
2558
25592014-06-17 Gary Benson <gbenson@redhat.com>
2560
b9228891
GB
2561 * i386-low.h (i386-dregs.h): New include.
2562 (DR_FIRSTADDR): Now in i386-dregs.h.
2563 (DR_LASTADDR): Likewise.
2564 (DR_NADDR): Likewise.
2565 (DR_STATUS): Likewise.
2566 (DR_CONTROL): Likewise.
2567 (i386_debug_reg_state): Likewise.
2568 (i386_dr_insert_watchpoint): Likewise.
2569 (i386_dr_remove_watchpoint): Likewise.
2570 (i386_dr_region_ok_for_watchpoint): Likewise.
2571 (i386_dr_stopped_data_address): Likewise.
2572 (i386_dr_stopped_by_watchpoint): Likewise.
2573 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2574
4be83cc2
GB
25752014-06-18 Gary Benson <gbenson@redhat.com>
2576
2577 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2578 i386_dr_insert_watchpoint.
2579 (i386_low_remove_watchpoint): Renamed to
2580 i386_dr_remove_watchpoint.
2581 (i386_low_region_ok_for_watchpoint): Renamed to
2582 i386_dr_region_ok_for_watchpoint.
2583 (i386_low_stopped_data_address): Renamed to
2584 i386_dr_stopped_data_address.
2585 (i386_low_stopped_by_watchpoint): Renamed to
2586 i386_dr_stopped_by_watchpoint.
2587 * i386-low.c (i386_show_dr): Renamed to
2588 i386_dr_show and made nonstatic. All uses updated.
2589 (i386_length_and_rw_bits): Renamed to
2590 i386_dr_length_and_rw_bits and made nonstatic.
2591 All uses updated.
2592 (i386_insert_aligned_watchpoint): Renamed to
2593 i386_dr_insert_aligned_watchpoint and made nonstatic.
2594 All uses updated.
2595 (i386_remove_aligned_watchpoint): Renamed to
2596 i386_dr_remove_aligned_watchpoint and made nonstatic.
2597 All uses updated.
2598 (i386_update_inferior_debug_regs): Renamed to
2599 i386_dr_update_inferior_debug_regs and made nonstatic.
2600 All uses updated.
2601 (i386_low_insert_watchpoint): Renamed to
2602 i386_dr_insert_watchpoint. All uses updated.
2603 (i386_low_remove_watchpoint): Renamed to
2604 i386_dr_remove_watchpoint. All uses updated.
2605 (i386_low_region_ok_for_watchpoint): Renamed to
2606 i386_dr_region_ok_for_watchpoint. All uses updated.
2607 (i386_low_stopped_data_address): Renamed to
2608 i386_dr_stopped_data_address. All uses updated.
2609 (i386_low_stopped_by_watchpoint): Renamed to
2610 i386_dr_stopped_by_watchpoint. All uses updated.
2611
131aa0d4
GB
26122014-06-18 Gary Benson <gbenson@redhat.com>
2613
2614 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2615 (i386_dr_low_can_set_control): Likewise.
2616 (i386_insert_aligned_watchpoint): New check.
2617
d9305f7f
GB
26182014-06-18 Gary Benson <gbenson@redhat.com>
2619
2620 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2621 Renamed to state.
2622
e927c9fc
GB
26232014-06-18 Gary Benson <gbenson@redhat.com>
2624
2625 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2626 instead of fatal and error.
2627 (i386_handle_nonaligned_watchpoint): Likewise.
2628
1b6d4134
GB
26292014-06-18 Gary Benson <gbenson@redhat.com>
2630
2631 * i386-low.c (i386_get_debug_register_length): New macro.
2632 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2633 (i386_show_dr): Use debug_printf instead of fprintf. Use
2634 phex to format values.
2635
6e62758f
GB
26362014-06-18 Gary Benson <gbenson@redhat.com>
2637
2638 * i386-low.h: Comment changes.
2639 * i386-low.c: Likewise.
2640
fc6e2f03
GB
26412014-06-18 Gary Benson <gbenson@redhat.com>
2642
2643 * i386-low.c: Whitespace changes.
2644
f9d1eeed
TT
26452014-06-12 Tom Tromey <tromey@redhat.com>
2646
2647 * utils.c (freeargv): Remove.
2648
0b04e523
TT
26492014-06-12 Tom Tromey <tromey@redhat.com>
2650
2651 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2652 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2653 (parse_debug_format_options): Likewise.
2654 (gdbserver_usage): Likewise.
2655 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2656 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2657 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2658 against libiberty.
2659 ($(LIBGNU)): Depend on libiberty.
2660 (all-lib): Recurse into all subdirs.
2661 (install-only): Invoke "install" target in subdirs.
2662 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2663 targets.
2664 * configure: Rebuild.
2665 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2666 for vasprintf, vsnprintf, or gettimeofday.
2667 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2668 srv_tgtobj.
2669
270c9937
JB
26702014-06-05 Joel Brobecker <brobecker@adacore.com>
2671
2672 * development.sh: Delete.
2673 * Makefile.in (config.status): Adjust dependency on development.sh.
2674 * configure.ac: Adjust development.sh source call.
2675 * configure: Regenerate.
2676
0a261ed8
PA
26772014-06-02 Pedro Alves <palves@redhat.com>
2678
2679 * ax.c (gdb_free_agent_expr): New function.
2680 * ax.h (gdb_free_agent_expr): New declaration.
2681 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2682 list.
2683 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2684 static.
2685 (clear_breakpoint_conditions_and_commands): New function.
2686 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2687 (clear_breakpoint_conditions_and_commands): New declaration.
2688
e9dae05e
RR
26892014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2690
2691 * linux-aarch64-low.c (asm/ptrace.h): Include.
2692
5876f503
JK
26932014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2694
2695 Fix TLS access for -static -pthread.
2696 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2697 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2698 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2699
802e8e6d
PA
27002014-05-20 Pedro Alves <palves@redhat.com>
2701
2702 * linux-aarch64-low.c (aarch64_insert_point)
2703 (aarch64_remove_point): No longer check whether the type is
2704 supported here. Adjust to new interface.
2705 (the_low_target): Install aarch64_supports_z_point_type as
2706 supports_z_point_type method.
2707 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2708 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2709 instead of a Z packet char. Adjust.
2710 (arm_supports_z_point_type): New function.
2711 (arm_insert_point, arm_remove_point): Adjust to new interface.
2712 (the_low_target): Install arm_supports_z_point_type.
2713 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2714 (cris_insert_point, cris_remove_point): Adjust to new interface.
2715 Don't check whether the type is supported here.
2716 (the_low_target): Install cris_supports_z_point_type.
2717 * linux-low.c (linux_supports_z_point_type): New function.
2718 (linux_insert_point, linux_remove_point): Adjust to new interface.
2719 * linux-low.h (struct linux_target_ops) <insert_point,
2720 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2721 raw_breakpoint pointer parameter.
2722 <supports_z_point_type>: New method.
2723 * linux-mips-low.c (mips_supports_z_point_type): New function.
2724 (mips_insert_point, mips_remove_point): Adjust to new interface.
2725 Use mips_supports_z_point_type.
2726 (the_low_target): Install mips_supports_z_point_type.
2727 * linux-ppc-low.c (the_low_target): Install NULL as
2728 supports_z_point_type method.
2729 * linux-s390-low.c (the_low_target): Install NULL as
2730 supports_z_point_type method.
2731 * linux-sparc-low.c (the_low_target): Install NULL as
2732 supports_z_point_type method.
2733 * linux-x86-low.c (x86_supports_z_point_type): New function.
2734 (x86_insert_point): Adjust to new insert_point interface. Use
2735 insert_memory_breakpoint. Adjust to new
2736 i386_low_insert_watchpoint interface.
2737 (x86_remove_point): Adjust to remove_point interface. Use
2738 remove_memory_breakpoint. Adjust to new
2739 i386_low_remove_watchpoint interface.
2740 (the_low_target): Install x86_supports_z_point_type.
2741 * lynx-low.c (lynx_target_ops): Install NULL as
2742 supports_z_point_type callback.
2743 * nto-low.c (nto_supports_z_point_type): New.
2744 (nto_insert_point, nto_remove_point): Adjust to new interface.
2745 (nto_target_ops): Install nto_supports_z_point_type.
2746 * mem-break.c: Adjust intro comment.
2747 (struct raw_breakpoint) <raw_type, size>: New fields.
2748 <inserted>: Update comment.
2749 <shlib_disabled>: Delete field.
2750 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2751 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2752 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2753 (raw_bkpt_type_to_target_hw_bp_type): New function.
2754 (find_enabled_raw_code_breakpoint_at): New function.
2755 (find_raw_breakpoint_at): New type and size parameters. Use them.
2756 (insert_memory_breakpoint): New function, based off
2757 set_raw_breakpoint_at.
2758 (remove_memory_breakpoint): New function.
2759 (set_raw_breakpoint_at): Reimplement.
2760 (set_breakpoint): New, based on set_breakpoint_at.
2761 (set_breakpoint_at): Reimplement.
2762 (delete_raw_breakpoint): Go through the_target->remove_point
2763 instead of assuming memory breakpoints.
2764 (find_gdb_breakpoint_at): Delete.
2765 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2766 (find_gdb_breakpoint): New function.
2767 (set_gdb_breakpoint_at): Delete.
2768 (z_type_supported): New function.
2769 (set_gdb_breakpoint_1): New function, loosely based off
2770 set_gdb_breakpoint_at.
2771 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2772 (delete_gdb_breakpoint_at): Delete.
2773 (delete_gdb_breakpoint_1): New function, loosely based off
2774 delete_gdb_breakpoint_at.
2775 (delete_gdb_breakpoint): New function.
2776 (clear_gdb_breakpoint_conditions): Rename to ...
2777 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2778 breakpoint.
2779 (add_condition_to_breakpoint): Make static.
2780 (add_breakpoint_condition): Take a struct breakpoint pointer
2781 instead of an address. Adjust.
2782 (gdb_condition_true_at_breakpoint): Rename to ...
2783 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2784 z_type parameter.
2785 (gdb_condition_true_at_breakpoint): Reimplement.
2786 (add_breakpoint_commands): Take a struct breakpoint pointer
2787 instead of an address. Adjust.
2788 (gdb_no_commands_at_breakpoint): Rename to ...
2789 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2790 parameter. Return true if no breakpoint was found. Change debug
2791 output.
2792 (gdb_no_commands_at_breakpoint): Reimplement.
2793 (run_breakpoint_commands): Rename to ...
2794 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2795 and change return type to boolean.
2796 (run_breakpoint_commands): New function.
2797 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2798 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2799 breakpoint. Go through the_target->remove_point instead of
2800 assuming memory breakpoint.
2801 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2802 software and hardware breakpoints.
2803 (reinsert_raw_breakpoint): Go through the_target->insert_point
2804 instead of assuming memory breakpoint.
2805 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2806 software and hardware breakpoints.
2807 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2808 Check both software and hardware breakpoints.
2809 (validate_inserted_breakpoint): Assert the breakpoint is a
2810 software breakpoint. Set the inserted flag to -1 instead of
2811 setting shlib_disabled.
2812 (delete_disabled_breakpoints): Adjust.
2813 (validate_breakpoints): Only validate software breakpoints.
2814 Adjust to inserted flag change.
2815 (check_mem_read, check_mem_write): Skip breakpoint types other
2816 than software breakpoints. Adjust to inserted flag change.
2817 * mem-break.h (enum raw_bkpt_type): New enum.
2818 (raw_breakpoint, struct process_info): Forward declare.
2819 (Z_packet_to_target_hw_bp_type): Delete declaration.
2820 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2821 (set_gdb_breakpoint, delete_gdb_breakpoint)
2822 (clear_breakpoint_conditions): New declarations.
2823 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2824 (breakpoint_inserted_here): Update comment.
2825 (add_breakpoint_condition, add_breakpoint_commands): Replace
2826 address parameter with a breakpoint pointer parameter.
2827 (gdb_breakpoint_here): Update comment.
2828 (delete_gdb_breakpoint_at): Delete.
2829 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2830 * server.c (process_point_options): Take a struct breakpoint
2831 pointer instead of an address. Adjust.
2832 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2833 delete_gdb_breakpoint.
2834 * spu-low.c (spu_target_ops): Install NULL as
2835 supports_z_point_type method.
2836 * target.h: Include mem-break.h.
2837 (struct target_ops) <prepare_to_access_memory>: Update comment.
2838 <supports_z_point_type>: New field.
2839 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2840 instead of a char. Also take a raw breakpoint pointer.
2841 * win32-arm-low.c (the_low_target): Install NULL as
2842 supports_z_point_type.
2843 * win32-i386-low.c (i386_supports_z_point_type): New function.
2844 (i386_insert_point, i386_remove_point): Adjust to new interface.
2845 (the_low_target): Install i386_supports_z_point_type.
2846 * win32-low.c (win32_supports_z_point_type): New function.
2847 (win32_insert_point, win32_remove_point): Adjust to new interface.
2848 (win32_target_ops): Install win32_supports_z_point_type.
2849 * win32-low.h (struct win32_target_ops):
2850 <supports_z_point_type>: New method.
2851 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2852 instead of a char. Also take a raw breakpoint pointer.
2853
932539e3
PA
28542014-05-20 Pedro Alves <palves@redhat.com>
2855
2856 * mem-break.h: Include break-common.h.
2857 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2858 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2859 (Z_packet_to_target_hw_bp_type): New declaration.
2860 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2861 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2862 (Z_PACKET_ACCESS_WP): Delete macros.
2863 (Z_packet_to_hw_type): Delete function.
2864 * i386-low.h: Don't include break-common.h here.
2865 (Z_packet_to_hw_type): Delete declaration.
2866 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2867 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2868 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2869 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2870 * linux-aarch64-low.c: Don't include break-common.h here.
2871 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2872 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2873 (Z_packet_to_target_hw_bp_type): Delete function.
2874 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2875 function.
2876 (mips_insert_point, mips_remove_point): Use
2877 Z_packet_to_target_hw_bp_type.
2878
4ff0d3d8
PA
28792014-05-20 Pedro Alves <palves@redhat.com>
2880
2881 * linux-aarch64-low.c: Include break-common.h.
2882 (enum target_point_type): Delete.
2883 (Z_packet_to_point_type): Rename to ...
2884 (Z_packet_to_target_hw_bp_type): ... this, and return a
2885 target_hw_bp_type instead.
2886 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2887 instead of an enum target_point_type.
2888 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2889 breakpoint type.
2890 (aarch64_dr_state_insert_one_point)
2891 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2892 (aarch64_handle_aligned_watchpoint)
2893 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2894 Take an enum target_hw_bp_type instead of an enum
2895 target_point_type.
2896 (aarch64_supports_z_point_type): New function.
2897 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2898 use Z_packet_to_target_hw_bp_type.
2899
786dc519
JB
29002014-05-20 Joel Brobecker <brobecker@adacore.com>
2901
2902 * configure.ac: Only use -Werror by default when DEVELOPMENT
2903 is true.
2904 * configure: Regenerate.
2905
9e0aa64f
JK
29062014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2907
2908 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2909 * linux-x86-low.c (X86_64_USER_REGS): New.
2910 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2911
2b577b92
YQ
29122014-04-28 Yao Qi <yao@codesourcery.com>
2913
2914 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2915 name.
2916
94611da2
PA
29172014-04-25 Pedro Alves <palves@redhat.com>
2918
2919 PR server/16255
2920 * linux-low.c (linux_attach_fail_reason_string): New function.
2921 (linux_attach_lwp): Delete.
2922 (linux_attach_lwp_1): Rename to ...
2923 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2924 argument. Remove "initial" parameter. Return int instead of
2925 void. Don't error or warn here.
2926 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2927 failure to attach to the tgid. Call warning when failing to
2928 attach to an lwp.
2929 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2930 argument. Remove "initial" parameter. Return int instead of
2931 void. Don't error or warn here.
2932 (linux_attach_fail_reason_string): New declaration.
2933 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2934 interface change. Use linux_attach_fail_reason_string.
2935
01f9f808
MS
29362014-04-24 Michael Sturm <michael.sturm@mintel.com>
2937 Walfred Tedeschi <walfred.tedeschi@intel.com>
2938
2939 * Makefile.in: Added rules to handle new files
2940 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2941 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2942 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2943 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2944 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2945 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2946 x32-avx512-linux.o.
2947 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2948 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2949 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2950 i386/x32-avx512.xml.
2951 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2952 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2953 i386/x32-avx512-linux.xml.
2954 * i387-fp.c (num_avx512_k_registers): New constant for number
2955 of K registers.
2956 (num_avx512_zmmh_low_registers): New constant for number of
2957 lower ZMM registers (0-15).
2958 (num_avx512_zmmh_high_registers): New constant for number of
2959 higher ZMM registers (16-31).
2960 (num_avx512_ymmh_registers): New contant for number of higher
2961 YMM registers (ymm16-31 added by avx521 on x86_64).
2962 (num_avx512_xmm_registers): New constant for number of higher
2963 XMM registers (xmm16-31 added by AVX512 on x86_64).
2964 (struct i387_xsave): Add space for AVX512 registers.
2965 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2966 Add code to handle AVX512 registers.
2967 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2968 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2969 prototypei from generated file.
2970 (tdesc_amd64_avx512_linux): Likewise.
2971 (init_registers_x32_avx512_linux): Likewise.
2972 (tdesc_x32_avx512_linux): Likewise.
2973 (init_registers_i386_avx512_linux): Likewise.
2974 (tdesc_i386_avx512_linux): Likewise.
2975 (x86_64_regmap): Add AVX512 registers.
2976 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2977 mask.
2978 (initialize_low_arch): Add code to initialize AVX512 registers.
2979
51aa91f9
PA
29802014-04-23 Pedro Alves <palves@redhat.com>
2981
2982 * mem-break.c (find_gdb_breakpoint_at): Make static.
2983 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2984
a4165e94
PA
29852014-04-23 Pedro Alves <palves@redhat.com>
2986
2987 * i386-low.c: Don't include break-common.h here.
2988 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2989 prototype to take target_hw_bp_type as argument instead of a Z
2990 packet char.
2991 * i386-low.h: Include break-common.h here.
2992 (Z_packet_to_hw_type): Declare.
2993 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2994 prototypes.
2995 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2996 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2997 (x86_remove_point): Convert the packet number to a
2998 target_hw_bp_type before calling i386_low_remove_watchpoint.
2999 * win32-i386-low.c (i386_insert_point): Convert the packet number
3000 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
3001 (i386_remove_point): Convert the packet number to a
3002 target_hw_bp_type before calling i386_low_remove_watchpoint.
3003
b8acf843
PA
30042014-04-23 Pedro Alves <palves@redhat.com>
3005
3006 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
3007
d708bcd1
PA
30082014-04-10 Pedro Alves <palves@redhat.com>
3009
3010 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
3011 Check if the condition or command is NULL before checking if the
3012 breakpoint is known. On success, return true.
3013 * mem-break.h (add_breakpoint_condition): Document return.
3014 (add_breakpoint_commands): Add describing comment.
3015 * server.c (skip_to_semicolon): New function.
3016 (process_point_options): Use it.
3017
2eec7d5b
PA
30182014-04-09 Pedro Alves <palves@redhat.com>
3019
3020 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
3021 to lwpid_of.
3022
fa96cb38
PA
30232014-02-27 Pedro Alves <palves@redhat.com>
3024
3025 PR 12702
3026 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
3027 macros.
3028 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
3029 output.
3030 (last_thread_of_process_p): Take a PID argument instead of a
3031 thread pointer.
3032 (linux_wait_for_lwp): Delete.
3033 (num_lwps, check_zombie_leaders, not_stopped_callback): New
3034 functions.
3035 (linux_low_filter_event): New function, party factored out from
3036 linux_wait_for_event.
3037 (linux_wait_for_event): Rename to ...
3038 (linux_wait_for_event_filtered): ... this. Add new filter ptid
3039 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
3040 sigsuspend. Check for zombie leaders.
3041 (linux_wait_for_event): Reimplement as wrapper around
3042 linux_wait_for_event_filtered.
3043 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
3044 a normal or signal exit is seen, it's the whole process exiting.
3045 (wait_for_sigstop): No longer a for_each_inferior callback.
3046 Rewrite on top of linux_wait_for_event_filtered.
3047 (stop_all_lwps): Call wait_for_sigstop directly.
3048 * server.c (resume, handle_target_event): Handle
3049 TARGET_WAITKIND_NO_RESUMED.
3050
d763de10
JB
30512014-02-26 Joel Brobecker <brobecker@adacore.com>
3052
3053 * win32-low.c (psapi_get_dll_name,
3054 * win32_CreateToolhelp32Snapshot): Delete.
3055 (win32_CreateToolhelp32Snapshot, win32_Module32First)
3056 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
3057 Delete.
3058 (handle_load_dll): Add function description.
3059 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
3060
850a0f76
JB
30612014-02-26 Joel Brobecker <brobecker@adacore.com>
3062
3063 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3064 Add comment.
3065 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3066 base address when calling win32_add_one_solib.
3067 (handle_load_dll): Delete local variable load_addr.
3068 Remove 0x1000 offset applied to DLL base address when calling
3069 win32_add_one_solib.
3070 (handle_unload_dll): Add comment.
3071
f25b3fc3
JB
30722014-02-26 Joel Brobecker <brobecker@adacore.com>
3073
3074 * win32-low.c (win32_add_all_dlls): Renames
3075 win32_ensure_ntdll_loaded. Rewrite function documentation.
3076 Adjust implementation to always load all DLLs.
3077 Add 0x1000 offset to DLL base address when calling
3078 win32_add_one_solib.
3079 (child_initialization_done): New static global.
3080 (do_initial_child_stuff): Set child_initialization_done to
3081 zero during child initialization, and 1 after. Replace call
3082 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3083 Add comment.
3084 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3085 (handle_unload_dll): Add function documentation.
3086 (get_child_debug_event): Ignore load and unload DLL events
3087 during child initialization.
3088
d86d4aaf
DE
30892014-02-20 Doug Evans <dje@google.com>
3090
3bc32da3 3091 Remove global all_lwps.
d86d4aaf
DE
3092 * inferiors.h (ptid_of): Move here from linux-low.h.
3093 (pid_of, lwpid_of): Ditto.
3094 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3095 parameter is a struct thread_info * now.
3096 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3097 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3098 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3099 directly.
3100 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3101 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3102 * linux-arm-low.c (update_registers_callback): Update, "entry"
3103 parameter is a struct thread_info * now.
3104 Fetch lwpid from current_inferior directly.
3105 (arm_insert_point): Pass &all_threads to find_inferior instead of
3106 &all_lwps.
3107 (arm_remove_point): Ditto.
3108 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3109 (arm_prepare_to_resume): Fetch pid from thread.
3110 (arm_read_description): Fetch lwpid from current_inferior directly.
3111 * linux-low.c (all_lwps): Delete.
3112 (delete_lwp): Delete call to remove_inferior.
3113 (handle_extended_wait): Fetch lwpid from thread.
3114 (add_lwp): Don't set lwp->entry.id. Remove call to
3115 add_inferior_to_list.
3116 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3117 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3118 (kill_one_lwp_callback): Ditto.
3119 (linux_kill): Don't dereference NULL pointer.
3120 Fetch ptid,lwpid from thread.
3121 (get_detach_signal): Fetch ptid from thread.
3122 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3123 Simplify call to regcache_invalidate_thread.
3124 (delete_lwp_callback): Update, "entry" parameter is a
3125 struct thread_info * now. Fetch pid from thread.
3126 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3127 (status_pending_p_callback): Update, "entry" parameter is a
3128 struct thread_info * now. Fetch ptid from thread.
3129 (find_lwp_pid): Update, "entry" parameter is a
3130 struct thread_info * now.
3131 (linux_wait_for_lwp): Fetch pid from thread.
3132 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3133 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3134 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3135 (dequeue_one_deferred_signal): Ditto.
3136 (cancel_breakpoint): Fetch ptid from current_inferior.
3137 (linux_wait_for_event): Pass &all_threads to find_inferior,
3138 not &all_lwps. Fetch ptid, lwpid from thread.
3139 (count_events_callback): Update, "entry" parameter is a
3140 struct thread_info * now.
3141 (select_singlestep_lwp_callback): Ditto.
3142 (select_event_lwp_callback): Ditto.
3143 (cancel_breakpoints_callback): Ditto.
3144 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3145 not &all_lwps.
3146 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3147 (unsuspend_one_lwp): Update, "entry" parameter is a
3148 struct thread_info * now.
3149 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3150 not &all_lwps.
3151 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3152 Fetch lwpid from thread, not lwp.
3153 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3154 Pass &all_threads to find_inferior, not &all_lwps.
3155 (send_sigstop): Fetch lwpid from thread, not lwp.
3156 (send_sigstop_callback): Update, "entry" parameter is a
3157 struct thread_info * now.
3158 (suspend_and_send_sigstop_callback): Ditto.
3159 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3160 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3161 struct thread_info * now.
3162 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3163 from thread, lwp.
3164 (lwp_running): Update, "entry" parameter is a
3165 struct thread_info * now.
3166 (stop_all_lwps): Fetch ptid from thread.
3167 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3168 (linux_resume_one_lwp): Fetch lwpid from thread.
3169 (linux_set_resume_request): Update, "entry" parameter is a
3170 struct thread_info * now. Fetch pid, lwpid from thread.
3171 (resume_status_pending_p): Update, "entry" parameter is a
3172 struct thread_info * now.
3173 (need_step_over_p): Ditto. Fetch lwpid from thread.
3174 (start_step_over): Fetch lwpid from thread.
3175 (linux_resume_one_thread): Update, "entry" parameter is a
3176 struct thread_info * now. Fetch lwpid from thread.
3177 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3178 (proceed_one_lwp): Update, "entry" parameter is a
3179 struct thread_info * now. Fetch lwpid from thread.
3180 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3181 struct thread_info * now.
3182 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3183 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3184 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3185 directly.
3186 (regsets_store_inferior_registers): Ditto.
3187 (fetch_register, store_register): Ditto.
3188 (linux_read_memory, linux_write_memory): Ditto.
3189 (linux_request_interrupt): Ditto.
3190 (linux_read_auxv): Ditto.
3191 (linux_xfer_siginfo): Ditto.
3192 (linux_qxfer_spu): Ditto.
3193 (linux_qxfer_libraries_svr4): Ditto.
3194 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3195 moved to inferiors.h.
3196 (get_lwp): Delete.
3197 (get_thread_lwp): Update.
3198 (struct lwp_info): Delete member "entry". Simplify comment for
3199 member "thread".
3200 (all_lwps): Delete.
3201 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3202 current_inferior directly.
3203 (update_watch_registers_callback): Update, "entry" parameter is a
3204 struct thread_info * now. Fetch pid from thread.
3205 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3206 (mips_insert_point): Fetch lwpid from current_inferior.
3207 Pass &all_threads to find_inferior, not &all_lwps.
3208 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3209 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3210 directly.
3211 (mips_stopped_data_address): Ditto.
3212 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3213 directly.
3214 * linux-tile-low.c (tile_arch_setup): Ditto.
3215 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3216 (update_debug_registers_callback): Update, "entry" parameter is a
3217 struct thread_info * now. Fetch pid from thread.
3218 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3219 Pass &all_threads to find_inferior, not &all_lwps.
3220 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3221 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3222 Pass &all_threads to find_inferior, not &all_lwps.
3223 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3224 (i386_dr_low_get_status): Ditto.
3225 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3226 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3227 (x86_linux_read_description): Ditto.
3228 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3229
3b8361aa
DE
32302014-02-20 Doug Evans <dje@google.com>
3231
3232 * inferiors.c (get_first_inferior): Fix buglet.
3233
f7667f0d
DE
32342014-02-19 Doug Evans <dje@google.com>
3235
3236 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3237 * inferiors.c (add_thread): Change result type to struct thread_info *.
3238 All callers updated.
3239 (add_lwp): Call add_thread here instead of in callers.
3240 All callers updated.
3241 * linux-low.h (get_lwp_thread): Rewrite.
3242 (struct lwp_info): New member "thread".
3243
b3312d80
DE
32442014-02-19 Doug Evans <dje@google.com>
3245
3246 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3247 All callers updated.
3248
ecc6f45c
DE
32492014-02-19 Doug Evans <dje@google.com>
3250
3251 * inferiors.c (add_thread): Fix whitespace.
3252
649ebbca
DE
32532014-02-19 Doug Evans <dje@google.com>
3254
3255 * dll.c (clear_dlls): Replace accessing list implemention details
3256 with API function.
3257 * gdbthread.h (get_first_thread): Declare.
3258 * inferiors.c (for_each_inferior_with_data): New function.
3259 (get_first_thread): New function.
3260 (find_thread_ptid): Simplify.
3261 (get_first_inferior): New function.
3262 (clear_list): Delete.
3263 (one_inferior_p): New function.
3264 (clear_inferior_list): New function.
3265 (clear_inferiors): Update.
3266 * inferiors.h (for_each_inferior_with_data): Declare.
3267 (clear_inferior_list): Declare.
3268 (one_inferior_p): Declare.
3269 (get_first_inferior): Declare.
3270 * linux-low.c (linux_wait_for_event): Replace accessing list
3271 implemention details with API function.
3272 * server.c (target_running): Ditto.
3273 (accumulate_file_name_length): New function.
3274 (emit_dll_description): New function.
3275 (handle_qxfer_libraries): Replace accessing list implemention
3276 details with API function.
3277 (handle_qxfer_threads_worker): New function.
3278 (handle_qxfer_threads_proper): Replace accessing list implemention
3279 details with API function.
3280 (handle_query): Ditto.
3281 (visit_actioned_threads_callback_ftype): New typedef.
3282 (visit_actioned_threads_data): New struct.
3283 (visit_actioned_threads): Rewrite to be find_inferior callback.
3284 (resume): Call find_inferior.
3285 (handle_status): Replace accessing list implemention
3286 details with API function.
3287 (process_serial_event): Replace accessing list implemention details
3288 with API function.
3289 * target.c (set_desired_inferior): Replace accessing list implemention
3290 details with API function.
3291 * tracepoint.c (same_process_p): New function.
3292 (gdb_agent_about_to_close): Replace accessing list implemention
3293 details with API function.
3294 * win32-low.c (child_delete_thread): Replace accessing list
3295 implemention details with API function.
3296 (match_dll_by_basename): New function.
3297 (dll_is_loaded_by_basename): New function.
3298 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3299 details call to dll_is_loaded_by_basename.
3300
80894984
DE
33012014-02-19 Doug Evans <dje@google.com>
3302
3303 * dll.h (struct dll_info): Add comment.
3304 * gdbthread.h (struct thread_info): Add comment.
3305 (current_ptid): Simplify.
3306 * inferiors.c (add_process): Update.
3307 (remove_process): Update.
3308 * inferiors.h (struct process_info): Rename member "head" to "entry".
3309 * linux-low.c (delete_lwp): Update.
3310 (add_lwp): Update.
3311 (last_thread_of_process_p): Update.
3312 (kill_one_lwp_callback, linux_kill): Update.
3313 (status_pending_p_callback): Update.
3314 (wait_for_sigstop): Update. Simplify read of ptid.
3315 (start_step_over): Update.
3316 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3317 (get_lwp_thread): Update.
3318 (struct lwp_info): Rename member "head" to "entry".
3319 * regcache.h (inferior_list_entry): Delete.
3320 * server.c (kill_inferior_callback): Update.
3321 (detach_or_kill_inferior_callback): Update.
3322 (print_started_pid): Update.
3323 (print_attached_pid): Update.
3324 (process_serial_event): Simplify read of ptid.
3325 * thread-db.c (thread_db_create_event): Update.
3326 (thread_db_get_tls_address): Update.
3327 * win32-low.c (current_inferior_ptid): Simplify.
3328
46917d26
TT
33292014-02-19 Tom Tromey <tromey@redhat.com>
3330
3331 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3332 argument.
3333 (target_supports_btrace): Update.
3334
0759a81e
YQ
33352014-02-14 Yao Qi <yao@codesourcery.com>
3336
3337 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3338 (rsp-low-ipa.o): New target.
3339
a7191e8b
TT
33402014-02-12 Tom Tromey <tromey@redhat.com>
3341
3342 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3343 convert_ascii_to_int.
3344 * regcache.c (registers_to_string): Likewise.
3345 * remote-utils.c (decode_M_packet): Likewise.
3346 * server.c (process_serial_event): Likewise.
3347
ff0e980e
TT
33482014-02-12 Tom Tromey <tromey@redhat.com>
3349
3350 * server.c (handle_query, handle_v_run): Use hex2bin, not
3351 unhexify.
3352 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3353
e9371aff
TT
33542014-02-12 Tom Tromey <tromey@redhat.com>
3355
3356 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3357 convert_int_to_ascii.
3358 * regcache.c (registers_to_string, collect_register_as_string):
3359 Likewise.
3360 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3361 Likewise.
3362 * server.c (process_serial_event): Likewise.
3363 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3364 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3365
971dc0b8
TT
33662014-02-12 Tom Tromey <tromey@redhat.com>
3367
3368 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3369 bin2hex, not hexify.
3370 * tracepoint.c (cmd_qtstatus): Likewise.
3371
0a822afb
TT
33722014-02-12 Tom Tromey <tromey@redhat.com>
3373
3374 * remote-utils.c (monitor_output): Pass explicit length to
3375 hexify.
3376
9c3d6531
TT
33772014-02-12 Tom Tromey <tromey@redhat.com>
3378
3379 * tracepoint.c: Include rsp-low.h.
3380 * server.c: Include rsp-low.h.
3381 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3382 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3383 declare.
3384 * remote-utils.c: Include rsp-low.h.
3385 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3386 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3387 (convert_int_to_ascii, convert_ascii_to_int): Move to
3388 common/rsp-low.c.
3389 * regcache.c: Include rsp-low.h.
3390 * ax.c: Include rsp-low.h.
3391 * Makefile.in (SFILES): Add common/rsp-low.c.
3392 (OBS): Add rsp-low.o.
3393 (rsp-low.o): New target.
3394
01fd3ea5
TT
33952014-02-12 Tom Tromey <tromey@redhat.com>
3396
3397 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3398 Include print-utils.h.
3399 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3400 (plongest, thirty_two, phex_nz): Remove.
3401 * Makefile.in (SFILES): Add common/print-utils.c.
3402 (OBS): Add print-utils.o.
3403 (print-utils-ipa.o): New target.
3404 (print-utils.o): New target.
3405 (IPA_OBJS): Add print-utils-ipa.o.
3406
e99dc820
TT
34072014-02-06 Tom Tromey <tromey@redhat.com>
3408
3409 * Makefile.in (SFILES): Fix indentation.
3410
ee1e2d4f
DE
34112014-02-05 Doug Evans <dje@google.com>
3412
3413 * linux-low.c (linux_wait_for_event): Improve comment.
3414 (linux_wait_1): Keep current_inferior in sync with event_child.
3415
f5a02773
DE
34162014-01-22 Doug Evans <dje@google.com>
3417
3418 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3419
87ce2a04
DE
34202014-01-22 Doug Evans <dje@google.com>
3421
3422 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3423 * configure: Regenerate.
3424 * config.in: Regenerate.
3425 * Makefile.in (SFILES): Add debug.c.
3426 (OBS): Add debug.o.
3427 * debug.c: New file.
3428 * debug.h: New file.
3429 * linux-aarch64-low.c (*): Update all debugging printfs to use
3430 debug_printf instead of fprintf.
3431 * linux-arm-low.c (*): Ditto.
3432 * linux-cris-low.c (*): Ditto.
3433 * linux-crisv32-low.c (*): Ditto.
3434 * linux-m32r-low.c (*): Ditto.
3435 * linux-sparc-low.c (*): Ditto.
3436 * linux-x86.c (*): Ditto.
3437 * linux-low.c (*): Ditto.
3438 (linux_wait_1): Add calls to debug_enter, debug_exit.
3439 (linux_wait): Remove redundant debugging printf.
3440 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3441 (linux_resume, unstop_all_lwps): Ditto.
3442 * mem-break.c (*): Update all debugging printfs to use
3443 debug_printf instead of fprintf.
3444 * remote-utils.c (*): Ditto.
3445 * thread-db.c (*): Ditto.
3446 * server.c #include <ctype.h>, "gdb_vecs.h".
3447 (debug_threads): Moved to debug.c.
3448 (*): Update all debugging printfs to use debug_printf instead of
3449 fprintf.
3450 (start_inferior): Replace call to fflush with call to debug_flush.
3451 (monitor_show_help): Mention set debug-format.
3452 (parse_debug_format_options): New function.
3453 (handle_monitor_command): Handle "monitor set debug-format".
3454 (gdbserver_usage): Mention --debug-format.
3455 (main): Parse --debug-format.
3456 * server.h (debug_threads): Declaration moved to debug.h.
3457 #include "debug.h".
3458 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3459 trace_debug_1 that uses debug_printf.
3460 (tracepoint_look_up_symbols): Update all debugging printfs to use
3461 debug_printf instead of fprintf.
3462
e671835b
BS
34632014-01-20 Baruch Siach <baruch@tkos.co.il>
3464
3465 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3466 sys/ptrace.h.
3467
b5737fa9
PA
34682014-01-17 Pedro Alves <palves@redhat.com>
3469
ea38d2a9 3470 PR build/16445
c7faa97a
PA
3471 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3472 defined after including gdb_proc_service.h.
b5737fa9 3473
40ed484e
DE
34742014-01-16 Doug Evans <dje@google.com>
3475
3476 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3477 (match_dll): Use it.
3478
969c39fb
MM
34792014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3480
3481 * target.h (target_ops) <read_btrace>: Change parameters and
3482 return type to allow error reporting.
3483 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3484 trace reading errors on.
3485 * linux-low.c (linux_low_read_btrace): Pass trace reading
3486 errors on.
3487 (linux_low_disable_btrace): New.
3488
ab7f45ba
DE
34892014-01-15 Doug Evans <dje@google.com>
3490
3491 * inferiors.c (thread_id_to_gdb_id): Delete.
3492 * inferiors.h (thread_id_to_gdb_id): Delete.
3493
66af0f44
EZ
34942014-01-13 Eli Zaretskii <eliz@gnu.org>
3495
3496 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3497 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3498 versions.
3499
9939e131
PA
35002014-01-08 Pedro Alves <palves@redhat.com>
3501
3502 * server.c (handle_status): Don't discard previous queued stop
3503 replies or thread's pending status here.
3504 (main) <disconnection>: Do it here instead.
3505
b7ea362b
PA
35062014-01-08 Pedro Alves <palves@redhat.com>
3507
3508 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3509 * server.c (visit_actioned_threads, handle_pending_status): New
3510 function.
3511 (handle_v_cont): Factor out parts to ...
3512 (resume): ... this new function. If in all-stop, and a thread
3513 being resumed has a pending status, report it without actually
3514 resuming.
3515 (myresume): Adjust to use the new 'resume' function.
3516 (clear_pending_status_callback, set_pending_status_callback)
3517 (find_status_pending_thread_callback): New functions.
3518 (handle_status): Handle the case of multiple threads having
3519 interesting statuses to report. Report threads' real last signal
3520 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3521 with an interesting thread to report the status for, instead of
3522 always reporting the status of the first thread.
3523
28498c42
JB
35242014-01-01 Joel Brobecker <brobecker@adacore.com>
3525
3526 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3527 * gdbreplay.c (gdbreplay_version): Likewise.
3528
f45c82da
YZ
35292013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3530
3531 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3532 iov.iov_len with the real length in use.
3533
379a5e2d
JB
35342013-12-13 Joel Brobecker <brobecker@adacore.com>
3535
3536 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3537 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3538 for all targets that use win32-low.c.
3539 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3540 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3541
4210d83e
PA
35422013-12-13 Pedro Alves <palves@redhat.com>
3543
3544 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3545 if equal to TARGET_WAITKIND_LOADED.
3546 * win32-low.c (cached_status): New static global.
3547 (win32_wait): Add declaration.
3548 (do_initial_child_stuff): Flush all initial pending debug events
3549 up to the initial breakpoint.
3550 (win32_wait): If CACHED_STATUS was set, return that instead
3551 of doing a real wait. Remove the code resuming the execution
3552 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3553 during the initial phase. Also remove the code changing
3554 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3555 TARGET_WAITKIND_STOPPED.
3556
e7f0d979
YQ
35572013-12-11 Yao Qi <yao@codesourcery.com>
3558
3559 * notif.c (handle_notif_ack): Return 0 if no notification
3560 matches.
3561
ebcf782c
DE
35622013-11-20 Doug Evans <dje@google.com>
3563
3564 * linux-low.c (linux_set_resume_request): Fix comment.
3565
20ad9378
DE
35662013-11-20 Doug Evans <dje@google.com>
3567
3568 * linux-low.c (resume_status_pending_p): Tweak comment.
3569
a196ebeb
WT
35702013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3571
3572 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3573 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3574 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3575 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3576 (srv_amd64_regobj): Add amd64-mpx.o.
3577 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3578 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3579 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3580 * i387-fp.c (num_pl_bnd_register) Added constant.
3581 (num_pl_bnd_cfg_registers) Added constant.
3582 (struct i387_xsave) Added reserved area and MPX fields.
3583 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3584 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3585 function.
3586 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3587 (init_registers_amd64_mpx_linux): Declare new function.
3588 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3589 (x86_64_regmap): Add MPX registers.
3590 (x86_linux_read_description): Add MPX case.
3591 (initialize_low_arch): Initialize MPX targets.
3592
0080a2f6
TT
35932013-11-18 Tom Tromey <tromey@redhat.com>
3594
3595 * configure: Rebuild.
3596 * configure.ac: Don't check for stdlib.h.
3597 * gdbreplay.c: Unconditionally include stdlib.h.
3598
2978b111
TT
35992013-11-18 Tom Tromey <tromey@redhat.com>
3600
3601 * config.in: Rebuild.
3602 * configure: Rebuild.
3603 * configure.ac: Don't use AC_HEADER_DIRENT.
3604
a3d08894
TT
36052013-11-18 Tom Tromey <tromey@redhat.com>
3606
3607 * server.h: Don't check HAVE_STRING_H.
3608 * gdbreplay.c: Don't check HAVE_STRING_H.
3609 * configure: Rebuild.
3610
0a5dd17d
TT
36112013-11-18 Tom Tromey <tromey@redhat.com>
3612
3613 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3614 LIBGNU.
3615
1bd2f0ba
TT
36162013-11-08 Tom Tromey <tromey@redhat.com>
3617
3618 * configure, config.in: Rebuild.
3619 * configure.ac: Remove unused configury.
3620
3266f10b
TT
36212013-11-08 Tom Tromey <tromey@redhat.com>
3622
3623 * acinclude.m4: Include common.m4, codeset.m4.
3624 * configure, config.in: Rebuild.
3625 * configure.ac: Use GDB_AC_COMMON.
3626
6682d959
AA
36272013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3628
3629 * linux-s390-low.c (HWCAP_S390_TE): New define.
3630 (s390_arch_setup): Consider the TE field in the HWCAP for
3631 determining 'have_regset_tdb'.
3632
fd0a4d76
SDJ
36332013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3634
3635 PR gdb/16014
3636 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3637 call to sizeof.
3638
1a3d890b
PA
36392013-10-02 Pedro Alves <palves@redhat.com>
3640
3641 * server.c (process_serial_event): Don't output "GDBserver
3642 exiting" if GDB is connected through stdio.
3643 * target.c (mywait): Likewise, be silent if GDB is connected
3644 through stdio.
3645
97ad4581
JB
36462013-10-01 Joel Brobecker <brobecker@adacore.com>
3647
3648 * lynx-low.c (lynx_add_threads_after_attach): New function.
3649 (lynx_attach): Remove call to add_thread. Add call to
3650 lynx_add_threads_after_attach instead.
3651
5b4e221c
MF
36522013-09-28 Mike Frysinger <vapier@gentoo.org>
3653
3654 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3655 * config.in, configure: Regenerated.
3656
ee47b2f8
YQ
36572013-09-18 Yao Qi <yao@codesourcery.com>
3658
3659 PR server/15959
3660 * server.c (start_inferior): Clear 'resume_info'.
3661
d6707650 36622013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3663
d6707650
JW
3664 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3665 for each register.
3666
9243dd0e 36672013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3668
9243dd0e
JW
3669 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3670 linux-tile-low.o to srv_tgtobj.
3671
c623a6ef
WN
36722013-09-16 Will Newton <will.newton@linaro.org>
3673
3674 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3675 out regs.
3676
fb71d39e
PA
36772013-09-06 Pedro Alves <palves@redhat.com>
3678
3679 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3680 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3681 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3682 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3683 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3684 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3685
8e7e9910
PA
36862013-09-06 Pedro Alves <palves@redhat.com>
3687
3688 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3689 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3690
7c3a12ca
PA
36912013-09-06 Pedro Alves <palves@redhat.com>
3692
3693 * linux-amd64-ipa.c: Include tracepoint.h.
3694 * linux-i386-ipa.c: Include tracepoint.h.
3695
8eb3d7b6
RW
36962013-09-06 Ricard Wanderlof <ricardw@axis.com>
3697
3698 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3699 (ps_get_thread_area): New function.
3700
eddddb9d
RW
37012013-09-06 Ricard Wanderlof <ricardw@axis.com>
3702
3703 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3704 (initialize_low_arch): Call init_registers_crisv32 rather than
3705 init_register_crisv32.
3706
533b0600
PA
37072013-09-05 Pedro Alves <palves@redhat.com>
3708
3709 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3710 to ...
3711 * hostio.h: ... this new file.
3712 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3713 win32-low.c: Include hostio.h.
3714
0ce3d3b5
PA
37152013-09-05 Pedro Alves <palves@redhat.com>
3716
3717 * server.h (gdb_client_data, handler_func, callback_handler_func)
3718 (delete_file_handler, add_file_handler, append_callback_event)
3719 (delete_callback_event, start_event_loop, initialize_event_loop):
3720 Move to event-loop.h and include it.
3721 * event-loop.h: New file.
3722
799cdc37
PA
37232013-09-05 Pedro Alves <palves@redhat.com>
3724
3725 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3726 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3727 (loaded_dll, unloaded_dll): Move to ...
3728 * dll.h: ... this new file.
3729 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3730
6a6bbd9d
PA
37312013-09-05 Pedro Alves <palves@redhat.com>
3732
3733 * server.h (current_process, get_thread_process, all_processes)
3734 (add_inferior_to_list, for_each_inferior, current_inferior)
3735 (remove_inferior, add_process, remove_process, find_process_pid)
3736 (have_started_inferiors_p, have_attached_inferiors_p)
3737 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3738 (clear_inferiors, find_inferior, find_inferior_id)
3739 (inferior_target_data, set_inferior_target_data)
3740 (inferior_regcache_data, set_inferior_regcache_data): Move to
3741 inferiors.h, and include it.
3742 * inferiors.h: New file.
3743
f699aaba
PA
37442013-09-05 Pedro Alves <palves@redhat.com>
3745
3746 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3747 Move ...
72f4393d 3748 * ax.h: ... here.
f699aaba 3749
c144c7a0
PA
37502013-09-05 Pedro Alves <palves@redhat.com>
3751
3752 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3753 tracepoint.h.
3754 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3755 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3756 (handle_tracepoint_general_set, handle_tracepoint_query)
3757 (tracepoint_finished_step, tracepoint_was_hit)
3758 (release_while_stepping_state_list, current_traceframe)
3759 (in_readonly_region, traceframe_read_mem)
3760 (fetch_traceframe_registers, traceframe_read_sdata)
3761 (traceframe_read_info, struct fast_tpoint_collect_status)
3762 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3763 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3764 (supply_fast_tracepoint_registers)
3765 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3766 (ipa_tdesc, claim_trampoline_space)
3767 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3768 (agent_mem_read, agent_get_trace_state_variable_value)
3769 (agent_set_trace_state_variable_value, agent_tsv_read)
3770 (agent_mem_read_string, get_raw_reg_func_addr)
3771 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3772 * tracepoint.h: ... this new file.
3773
ff42e6ab
PA
37742013-09-05 Pedro Alves <palves@redhat.com>
3775
3776 * server.h (perror_with_name, error, fatal, warning, paddress)
3777 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3778 include it.
3779 * utils.h: New file.
3780
541af0f4
PA
37812013-09-05 Pedro Alves <palves@redhat.com>
3782
3783 * server.h (remote_debug, noack_mode, transport_is_reliable)
3784 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3785 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3786 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3787 (write_enn, initialize_async_io, enable_async_io)
3788 (disable_async_io, check_remote_input_interrupt_request)
3789 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3790 (dead_thread_notify, prepare_resume_reply)
3791 (decode_address_to_semicolon, decode_address, decode_m_packet)
3792 (decode_M_packet, decode_X_packet, decode_xfer_write)
3793 (decode_search_memory_packet, unhexify, hexify)
3794 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3795 (look_up_one_symbol, relocate_instruction)
3796 (monitor_output): Move to remote-utils.h, and include it.
3797 * remote-utils.h: New file.
3798
eebdf26b
PA
37992013-09-05 Pedro Alves <palves@redhat.com>
3800
3801 * server.h (_): Delete.
3802
3aafd2ff
PA
38032013-09-02 Pedro Alves <palves@redhat.com>
3804
3805 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3806 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3807 allocated.
3808 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3809
cee83bcb
PM
38102013-09-02 Pierre Muller <muller@sourceware.org>
3811
3812 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3813 or WriteProcessMemory complete successfully and handle
3814 ERROR_PARTIAL_COPY error.
3815
9a13b2fa
PA
38162013-09-02 Pedro Alves <palves@redhat.com>
3817
3818 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3819 error instead of EIO.
3820
602e3198
JK
38212013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3822
3823 PR server/15604
3824 * linux-low.c: Include filestuff.h.
3825 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3826 * lynx-low.c: Include filestuff.h.
3827 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3828 * server.c: Include filestuff.h.
3829 (main): Call notice_open_fds.
3830 * spu-low.c: Include filestuff.h.
3831 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3832
96d7229d
LM
38332013-08-22 Luis Machado <lgustavo@codesourcery.com>
3834
3835 * Makefile.in: Explain why ../target and ../nat are not
3836 listed as include file search paths.
3837 (linux-waitpid.o): New object file rule.
3838 * configure.srv (srv_native_linux_obj): New variable.
3839 Replace all occurrences of linux native object files with
3840 $srv_native_linux_obj.
3841 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3842 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3843 (linux_enable_event_reporting): Remove declaration.
3844 (my_waitpid): Moved to common/linux-waitpid.c.
3845 (linux_wait_for_event): Pass ptid when calling
3846 linux_enable_event_reporting.
3847 (linux_supports_tracefork_flag): Remove.
3848 (linux_enable_event_reporting): Likewise.
3849 (linux_tracefork_grandchild): Remove.
3850 (STACK_SIZE): Moved to common/linux-ptrace.c.
3851 (linux_tracefork_child): Remove.
3852 (linux_test_for_tracefork): Remove.
3853 (linux_look_up_symbols): Call linux_supports_traceclone.
3854 (initialize_low): Remove call to linux_test_for_tracefork.
3855 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3856 common/linux-ptrace.h.
3857 (PTRACE_TYPE_ARG4): Likewise.
3858 Include linux-ptrace.h.
3859
32940073
PA
38602013-08-21 Pedro Alves <palves@redhat.com>
3861
3862 * config.in: Renegerate.
3863
33b60d58 38642013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3865
33b60d58
LM
3866 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3867 (SFILES): Remove $(srcdir)/common/target-common.c and
3868 add $(srcdir)/target/waitstatus.c.
3869 (OBS): Remove target-common.o and add waitstatus.o.
3870 (server_h): Remove $(srcdir)/../common/target-common.h and
3871 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3872 and $(srcdir)/../target/waitstatus.h.
3873 (target-common.o): Remove.
3874 (waitstatus.o): New target object file.
3875 * target.h: Do not include target-common.h and
3876 include target/resume.h, target/wait.h and
3877 target/waitstatus.h.
3878
b8e1b30e
LM
38792013-08-13 Luis Machado <lgustavo@codesourcery.com>
3880
3881 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3882 to PTRACE_TYPE_ARG3.
3883 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3884 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3885 PTRACE_TYPE_ARG4.
3886 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3887 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3888
7a60ad40
YQ
38892013-07-27 Jie Zhang <jie@codesourcery.com>
3890 Daniel Jacobowitz <dan@codesourcery.com>
3891 Yao Qi <yao@codesourcery.com>
3892
3893 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3894 (mips-linux-watch.o): New rule.
3895 (mips_linux_watch_h): New variable.
3896 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3897 srv_tgtobj.
3898 * linux-mips-low.c: Include mips-linux-watch.h.
3899 (struct arch_process_info, struct arch_lwp_info): New.
3900 (update_watch_registers_callback): New function.
3901 (mips_linux_new_process, mips_linux_new_thread) New functions.
3902 (mips_linux_prepare_to_resume, mips_insert_point): New
3903 functions.
3904 (mips_remove_point, mips_stopped_by_watchpoint): New
3905 functions.
3906 (rsp_bp_type_to_target_hw_bp_type): New function.
3907 (mips_stopped_data_address): New function.
3908 (the_low_target): Add watchpoint support functions.
3909
de6f69ad
YQ
39102013-07-27 Yao Qi <yao@codesourcery.com>
3911
3912 * i386-low.c: Include break-common.h.
3913 (enum target_hw_bp_type): Remove.
3914
3360c0bf
LM
39152013-07-24 Luis Machado <lgustavo@codesourcery.com>
3916
3917 * Makefile.in (SFILES): /common/target-common.c.
3918 (OBS): Add target-common.o.
3919 (server_h): Add $(srcdir)/../common/target-common.h.
3920 (target-common.o): New target.
3921 * server.c (queue_stop_reply_callback): Free
3922 status string after use.
3923 * target.c (target_waitstatus_to_string): Remove.
3924 * target.h: Include target-common.h.
3925 (resume_kind): Likewise.
3926 (target_waitkind): Likewise.
3927 (target_waitstatus): Likewise.
3928 (TARGET_WNOHANG): Likewise.
3929
bd885420
YQ
39302013-07-04 Yao Qi <yao@codesourcery.com>
3931
3932 * Makefile.in (host_alias): Use @host_noncanonical@.
3933 (target_alias): Use @target_noncanonical@.
3934 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3935 ACX_NONCANONICAL_HOST.
3936 * configure: Regenerated.
3937
3938 Revert:
3939 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3940
3941 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3942 * configure: Rebuild.
3943 * Makefile.in (version_host, version_target): Get from configure.
3944 (version.c): Use $(version_host) and $(version_target).
3945
17ef446e
PA
39462013-07-03 Pedro Alves <palves@redhat.com>
3947
3948 * Makefile.in (config.status): Depend on development.sh.
3949 * acinclude.m4: Include libmcheck.m4.
3950 * configure: Regenerate.
3951
7a9a7487
MG
39522013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3953
3954 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3955 attribute inside the parentheses.
3956 (winapi_DebugSetProcessKillOnExit): Ditto.
3957 (winapi_DebugBreakProcess): Ditto.
3958 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3959
49b64de6
MG
39602013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3961
3962 * notif.h (notif_event): Add a dummy member to avoid compiler
3963 errors.
3964
d5749ee7
PA
39652013-07-01 Pedro Alves <palves@redhat.com>
3966
3967 * hostio.c (HOSTIO_PATH_MAX): Define.
3968 (require_filename, handle_open, handle_unlink, handle_readlink):
3969 Use it.
3970
d8d2a3ee
PA
39712013-07-01 Pedro Alves <palves@redhat.com>
3972
3973 * server.h: Include "pathmax.h".
3974 * linux-low.c: Don't include sys/param.h.
3975 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3976 MAXPATHLEN.
3977 * win32-low.c: Don't include sys/param.h.
3978 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3979
bc7dea8d
PA
39802013-07-01 Pedro Alves <palves@redhat.com>
3981
3982 * event-loop.c: Don't check HAVE_UNISTD_H before including
3983 <unistd.h>.
3984 * gdbreplay.c: Likewise.
3985 * remote-utils.c: Likewise.
3986 * server.c: Likewise.
3987 * configure.ac: Don't check for unistd.h.
3988 * configure: Regenerate.
3989
d6c2da54
TT
39902013-06-28 Tom Tromey <tromey@redhat.com>
3991
3992 * Makefile.in (version.c): Use version.in, not
3993 common/version.in.
3994
257b6bec
MG
39952013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3996
3997 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3998 * configure: Rebuild.
3999 * Makefile.in (version_host, version_target): Get from configure.
4000 (version.c): Use $(version_host) and $(version_target).
4001
86ebe149
DK
40022013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4003
4004 Fix trace-status to output user name without trailing colon.
4005 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
4006
f30aa5af
DK
40072013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
4008
4009 Fix trace-status to output proper start-time and stop-time.
4010 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
4011 output start time and stop time in hex as gdb expects.
4012
28a93511
YQ
40132013-06-26 Pedro Alves <pedro@codesourcery.com>
4014
4015 * tracepoint.c (build_traceframe_info_xml): Output trace state
4016 variables present in the trace buffer.
4017
01208463
TT
40182013-06-24 Tom Tromey <tromey@redhat.com>
4019
4020 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
4021 create-version.sh.
4022 (version.o): Remove.
4023 * gdbreplay.c: Include version.h.
4024 (version, host_name): Don't declare.
4025 * server.h: Include version.h.
4026 (version, host_name): Don't declare.
4027
760256f9
PA
40282013-06-12 Pedro Alves <palves@redhat.com>
4029
4030 * linux-x86-low.c (linux_is_elf64): Delete global.
4031 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
4032 with local linux_pid_exe_is_elf_64_file use.
4033
030031ee
PA
40342013-06-11 Pedro Alves <palves@redhat.com>
4035
4036 * linux-low.c (regset_disabled, disable_regset): New functions.
4037 (regsets_fetch_inferior_registers)
4038 (regsets_store_inferior_registers): Use them.
4039 (initialize_regsets_info); Don't allocate the disabled_regsets
4040 array here.
4041 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
4042 comment.
4043
5da6eb0a
PA
40442013-06-11 Pedro Alves <palves@redhat.com>
4045
4046 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
4047 xmalloc.
4048
7e5aaa09
PA
40492013-06-11 Pedro Alves <palves@redhat.com>
4050
4051 * linux-x86-low.c (initialize_low_arch): Call
4052 init_registers_x32_avx_linux.
4053
d878444c
JK
40542013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
4055
4056 Fix compatibility with Android Bionic.
4057 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
4058 it is not empty.
4059
3aee8918
PA
40602013-06-07 Pedro Alves <palves@redhat.com>
4061
5f2b57b5 4062 PR server/14823
3aee8918
PA
4063 * Makefile.in (OBS): Add tdesc.o.
4064 (IPA_OBJS): Add tdesc-ipa.o.
4065 (tdesc-ipa.o): New rule.
4066 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4067 interface.
4068 * linux-low.c (new_inferior): Delete.
4069 (disabled_regsets, num_regsets): Delete.
4070 (linux_add_process): Adjust to set the new per-process
4071 new_inferior flag.
4072 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4073 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4074 was a stop. When calling arch_setup, switch the current inferior
4075 to the thread that got an event.
4076 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4077 (regsets_fetch_inferior_registers)
4078 (regsets_store_inferior_registers): New regsets_info parameter.
4079 Adjust to use it.
4080 (linux_register_in_regsets): New regs_info parameter. Adjust to
4081 use it.
4082 (register_addr, fetch_register, store_register): New usrregs_info
4083 parameter. Adjust to use it.
4084 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4085 parameter regs_info. Adjust to use it.
4086 (linux_fetch_registers): Get the current inferior's regs_info, and
4087 adjust to use it.
4088 (linux_store_registers): Ditto.
4089 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4090 (initialize_low): Don't initialize the target_regsets here. Call
4091 initialize_low_arch.
4092 * linux-low.h (target_regsets): Delete declaration.
4093 (struct regsets_info): New.
4094 (struct usrregs_info): New.
4095 (struct regs_info): New.
4096 (struct process_info_private) <new_inferior>: New field.
4097 (struct linux_target_ops): Delete the num_regs, regmap, and
4098 regset_bitmap fields. New field regs_info.
4099 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4100 * i387-fp.c (num_xmm_registers): Delete.
4101 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4102 calls to new interface.
4103 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4104 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4105 Infer the number of xmm registers from the regcache's target
4106 description.
4107 * i387-fp.h (num_xmm_registers): Delete.
4108 * inferiors.c (add_thread): Don't install the thread's regcache
4109 here.
4110 * proc-service.c (gregset_info): Fetch the current inferior's
4111 regs_info. Adjust to use it.
4112 * regcache.c: Include tdesc.h.
4113 (register_bytes, reg_defs, num_registers)
4114 (gdbserver_expedite_regs): Delete.
4115 (get_thread_regcache): If the thread doesn't have a regcache yet,
4116 create one, instead of aborting gdbserver.
4117 (regcache_invalidate_one): Rename to ...
4118 (regcache_invalidate_thread): ... this.
4119 (regcache_invalidate_one): New.
4120 (regcache_invalidate): Only invalidate registers of the current
4121 process.
4122 (init_register_cache): Add target_desc parameter, and use it.
4123 (new_register_cache): Ditto. Assert the target description has a
4124 non zero registers_size.
4125 (regcache_cpy): Add assertions. Adjust.
4126 (realloc_register_cache, set_register_cache): Delete.
4127 (registers_to_string, registers_from_string): Adjust.
4128 (find_register_by_name, find_regno, find_register_by_number)
4129 (register_cache_size): Add target_desc parameter, and use it.
4130 (free_register_cache_thread, free_register_cache_thread_one)
4131 (regcache_release, register_cache_size): New.
4132 (register_size): Add target_desc parameter, and use it.
4133 (register_data, supply_register, supply_register_zeroed)
4134 (supply_regblock, supply_register_by_name, collect_register)
4135 (collect_register_as_string, collect_register_by_name): Adjust.
4136 * regcache.h (struct target_desc): Forward declare.
4137 (struct regcache) <tdesc>: New field.
4138 (init_register_cache, new_register_cache): Add target_desc
4139 parameter.
4140 (regcache_invalidate_thread): Declare.
4141 (regcache_invalidate_one): Delete declaration.
4142 (regcache_release): Declare.
4143 (find_register_by_number, register_cache_size, register_size)
4144 (find_regno): Add target_desc parameter.
4145 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4146 declarations.
4147 * remote-utils.c: Include tdesc.h.
4148 (outreg, prepare_resume_reply): Adjust.
4149 * server.c: Include tdesc.h.
4150 (gdbserver_xmltarget): Delete declaration.
4151 (get_features_xml, process_serial_event): Adjust.
4152 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4153 declare.
4154 (struct process_info) <tdesc>: New field.
4155 (ipa_tdesc): Declare.
4156 * tdesc.c: New file.
4157 * tdesc.h: New file.
4158 * tracepoint.c: Include tdesc.h.
4159 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4160 (get_context_regcache): Adjust to pass ipa_tdesc down.
4161 (do_action_at_tracepoint): Adjust to get the register cache size
4162 from the context regcache's description.
4163 (traceframe_walk_blocks): Adjust to get the register cache size
4164 from the current trace frame's description.
4165 (traceframe_get_pc): Adjust to get current trace frame's
4166 description and pass it down.
4167 (gdb_collect): Adjust to get the register cache size from the
4168 IPA's description.
4169 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4170 (gdbserver_xmltarget): Delete.
4171 (initialize_low_tracepoint): Set the ipa's target description.
4172 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4173 (initialize_low_tracepoint): Set the ipa's target description.
4174 * linux-x86-low.c: Include tdesc.h.
4175 [__x86_64__] (is_64bit_tdesc): New.
4176 (ps_get_thread_area, x86_get_thread_area): Use it.
4177 (i386_cannot_store_register): Rename to ...
4178 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4179 (i386_cannot_fetch_register): Rename to ...
4180 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4181 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4182 to new interface.
4183 (target_regsets): Rename to ...
4184 (x86_regsets): ... this.
4185 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4186 interface.
4187 (x86_siginfo_fixup): Use is_64bit_tdesc.
4188 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4189 (tdesc_x32_avx_linux, tdesc_x32_linux)
4190 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4191 Declare.
4192 (x86_linux_update_xmltarget): Delete.
4193 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4194 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4195 (AMD64_LINUX_USER64_CS): New.
4196 (x86_linux_read_description): New, based on
4197 x86_linux_update_xmltarget.
4198 (same_process_callback): New.
4199 (x86_arch_setup_process_callback): New.
4200 (x86_linux_update_xmltarget): New.
4201 (x86_regsets_info): New.
4202 (amd64_linux_regs_info): New.
4203 (i386_linux_usrregs_info): New.
4204 (i386_linux_regs_info): New.
4205 (x86_linux_regs_info): New.
4206 (x86_arch_setup): Reimplement.
4207 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4208 (x86_emit_ops): Ditto.
4209 (the_low_target): Adjust. Install x86_linux_regs_info,
4210 x86_cannot_fetch_register, and x86_cannot_store_register.
4211 (initialize_low_arch): New.
4212 * linux-ia64-low.c (tdesc_ia64): Declare.
4213 (ia64_fetch_register): Adjust.
4214 (ia64_usrregs_info, regs_info): New globals.
4215 (ia64_regs_info): New function.
4216 (the_low_target): Adjust.
4217 (initialize_low_arch): New function.
4218 * linux-sparc-low.c (tdesc_sparc64): Declare.
4219 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4220 Adjust.
4221 (sparc_arch_setup): New function.
4222 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4223 (the_low_target): Adjust.
4224 (initialize_low_arch): New function.
4225 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4226 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4227 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4228 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4229 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4230 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4231 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4232 (tdesc_powerpc_isa205_vsx64l): Declare.
4233 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4234 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4235 (ppc_set_pc, ppc_get_hwcap): Adjust.
4236 (ppc_usrregs_info): Forward declare.
4237 (!__powerpc64__) ppc_regmap_adjusted: New global.
4238 (ppc_arch_setup): Adjust to the current process'es target
4239 description.
4240 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4241 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4242 (ppc_store_evrregset): Adjust.
4243 (target_regsets): Rename to ...
4244 (ppc_regsets): ... this, and make static.
4245 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4246 (ppc_regs_info): New function.
4247 (the_low_target): Adjust.
4248 (initialize_low_arch): New function.
4249 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4250 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4251 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4252 (tdesc_s390x_linux64v2): Declare.
4253 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4254 (s390_fill_gregset, s390_store_last_break): Adjust.
4255 (target_regsets): Rename to ...
4256 (s390_regsets): ... this, and make static.
4257 (s390_get_pc, s390_set_pc): Adjust.
4258 (s390_get_hwcap): New target_desc parameter, and use it.
4259 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4260 (s390_arch_setup): Adjust to set the current process'es target
4261 description. Don't adjust the regmap.
4262 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4263 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4264 (regs_info_3264): New globals.
4265 (s390_regs_info): New function.
4266 (the_low_target): Adjust.
4267 (initialize_low_arch): New function.
4268 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4269 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4270 [__mips64] (init_registers_mips_linux)
4271 (init_registers_mips_dsp_linux): Delete defines.
4272 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4273 (have_dsp): New global.
4274 (mips_read_description): New, based on mips_arch_setup.
4275 (mips_arch_setup): Reimplement.
4276 (get_usrregs_info): New function.
4277 (mips_cannot_fetch_register, mips_cannot_store_register)
4278 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4279 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4280 (target_regsets): Rename to ...
4281 (mips_regsets): ... this, and make static.
4282 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4283 (dsp_regs_info, regs_info): New globals.
4284 (mips_regs_info): New function.
4285 (the_low_target): Adjust.
4286 (initialize_low_arch): New function.
4287 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4288 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4289 Declare.
4290 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4291 (arm_read_description): New, with bits factored from
4292 arm_arch_setup.
4293 (arm_arch_setup): Reimplement.
4294 (target_regsets): Rename to ...
4295 (arm_regsets): ... this, and make static.
4296 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4297 (arm_regs_info): New function.
4298 (the_low_target): Adjust.
4299 (initialize_low_arch): New function.
4300 * linux-m68k-low.c (tdesc_m68k): Declare.
4301 (target_regsets): Rename to ...
4302 (m68k_regsets): ... this, and make static.
4303 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4304 (m68k_regs_info): New function.
4305 (m68k_arch_setup): New function.
4306 (the_low_target): Adjust.
4307 (initialize_low_arch): New function.
4308 * linux-sh-low.c (tdesc_sharch): Declare.
4309 (target_regsets): Rename to ...
4310 (sh_regsets): ... this, and make static.
4311 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4312 (sh_regs_info, sh_arch_setup): New functions.
4313 (the_low_target): Adjust.
4314 (initialize_low_arch): New function.
4315 * linux-bfin-low.c (tdesc_bfin): Declare.
4316 (bfin_arch_setup): New function.
4317 (bfin_usrregs_info, regs_info): New globals.
4318 (bfin_regs_info): New function.
4319 (the_low_target): Adjust.
4320 (initialize_low_arch): New function.
4321 * linux-cris-low.c (tdesc_cris): Declare.
4322 (cris_arch_setup): New function.
4323 (cris_usrregs_info, regs_info): New globals.
4324 (cris_regs_info): New function.
4325 (the_low_target): Adjust.
4326 (initialize_low_arch): New function.
4327 * linux-cris-low.c (tdesc_crisv32): Declare.
4328 (cris_arch_setup): New function.
4329 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4330 (cris_regs_info): New function.
4331 (the_low_target): Adjust.
4332 (initialize_low_arch): New function.
4333 * linux-m32r-low.c (tdesc_m32r): Declare.
4334 (m32r_arch_setup): New function.
4335 (m32r_usrregs_info, regs_info): New globals.
4336 (m32r_regs_info): Adjust.
4337 (initialize_low_arch): New function.
4338 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4339 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4340 (tic6x_usrregs_info): Forward declare.
4341 (tic6x_read_description): New function, based on ...
4342 (tic6x_arch_setup): ... this. Reimplement.
4343 (target_regsets): Rename to ...
4344 (tic6x_regsets): ... this, and make static.
4345 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4346 (tic6x_regs_info): New function.
4347 (the_low_target): Adjust.
4348 (initialize_low_arch): New function.
4349 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4350 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4351 (target_regsets): Rename to ...
4352 (xtensa_regsets): ... this, and make static.
4353 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4354 globals.
4355 (xtensa_arch_setup, xtensa_regs_info): New functions.
4356 (the_low_target): Adjust.
4357 (initialize_low_arch): New function.
4358 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4359 (nios2_arch_setup): Set the current process'es tdesc.
4360 (target_regsets): Rename to ...
4361 (nios2_regsets): ... this.
4362 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4363 (nios2_regs_info): New function.
4364 (the_low_target): Adjust.
4365 (initialize_low_arch): New function.
a261b8f5
PA
4366 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4367 (aarch64_arch_setup): Set the current process'es tdesc.
4368 (target_regsets): Rename to ...
4369 (aarch64_regsets): ... this.
4370 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4371 (aarch64_regs_info): New function.
4372 (the_low_target): Adjust.
4373 (initialize_low_arch): New function.
3aee8918
PA
4374 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4375 globals.
4376 (target_regsets): Rename to ...
4377 (tile_regsets): ... this.
4378 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4379 (tile_regs_info): New function.
4380 (tile_arch_setup): Set the current process'es tdesc.
4381 (the_low_target): Adjust.
4382 (initialize_low_arch): New function.
4383 * spu-low.c (tdesc_spu): Declare.
4384 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4385 * win32-arm-low.c (tdesc_arm): Declare.
4386 (arm_arch_setup): New function.
4387 (the_low_target): Install arm_arch_setup instead of
4388 init_registers_arm.
4389 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4390 (init_windows_x86): Rename to ...
4391 (i386_arch_setup): ... this. Set `win32_tdesc'.
4392 (the_low_target): Adjust.
4393 * win32-low.c (win32_tdesc): New global.
4394 (child_add_thread): Don't create the thread cache here.
4395 (do_initial_child_stuff): Set the new process'es tdesc.
4396 * win32-low.h (struct target_desc): Forward declare.
4397 (win32_tdesc): Declare.
4398 * lynx-i386-low.c (tdesc_i386): Declare global.
4399 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4400 * lynx-low.c (lynx_tdesc): New global.
4401 (lynx_add_process): Set the new process'es tdesc.
4402 * lynx-low.h (struct target_desc): Forward declare.
4403 (lynx_tdesc): Declare global.
4404 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4405 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4406 * nto-low.c (nto_tdesc): New global.
4407 (do_attach): Set the new process'es tdesc.
4408 * nto-low.h (struct target_desc): Forward declare.
4409 (nto_tdesc): Declare.
4410 * nto-x86-low.c (tdesc_i386): Declare.
4411 (nto_x86_arch_setup): Set `nto_tdesc'.
4412
b1fbec62
GB
44132013-06-04 Gary Benson <gbenson@redhat.com>
4414
4415 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4416 to qSupported response when appropriate.
4417 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4418 with nonzero-length annex.
4419 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4420 arguments supplied in annex.
4421
d1ec4ce7
DE
44222013-05-31 Doug Evans <dje@google.com>
4423
ac44adcb 4424 PR server/15594
d1ec4ce7
DE
4425 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4426 64 bits in 64-cross-32 environment.
4427
9b25f2d3
PA
44282013-05-28 Pedro Alves <palves@redhat.com>
4429
4430 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4431 (aarch64-without-fpu.c): Delete rule.
4432 * configure.srv (aarch64*-*-linux*): Remove references to
4433 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4434 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4435 declaration.
4436
6740dc9c
PA
44372013-05-24 Pedro Alves <palves@redhat.com>
4438
4439 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4440 instead of strchr/decode_address. Error if the range isn't split
4441 with a ','. Don't assume there's be a ':' in the action.
4442
c2d6af84
PA
44432013-05-23 Yao Qi <yao@codesourcery.com>
4444 Pedro Alves <palves@redhat.com>
4445
4446 * linux-low.c (lwp_in_step_range): New function.
4447 (linux_wait_1): If the thread was range stepping and stopped
4448 outside the stepping range, report the stop to GDB. Otherwise,
4449 continue stepping. Add range stepping debug output.
4450 (linux_set_resume_request): Copy the step range from the resume
4451 request to the lwp.
4452 (linux_supports_range_stepping): New.
4453 (linux_target_ops) <supports_range_stepping>: Set to
4454 linux_supports_range_stepping.
4455 * linux-low.h (struct linux_target_ops)
4456 <supports_range_stepping>: New field.
4457 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4458 * linux-x86-low.c (x86_supports_range_stepping): New.
4459 (the_low_target) <supports_range_stepping>: Set to
4460 x86_supports_range_stepping.
4461 * server.c (handle_v_cont): Handle 'r' action.
4462 (handle_v_requests): Append ";r" if the target supports range
4463 stepping.
4464 * target.h (struct thread_resume) <step_range_start,
4465 step_range_end>: New fields.
4466 (struct target_ops) <supports_range_stepping>:
4467 New field.
4468 (target_supports_range_stepping): New macro.
4469
58794e1a
JB
44702013-05-17 Joel Brobecker <brobecker@adacore.com>
4471
4472 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4473 confusion in comment.
4474
d631c5a7
JB
44752013-05-17 Joel Brobecker <brobecker@adacore.com>
4476
4477 * lynx-low.c (struct process_info_private): New type.
4478 (lynx_add_process): New function.
4479 (lynx_create_inferior, lynx_attach): Replace calls to
4480 add_process by calls to lynx_add_process.
4481 (lynx_resume): If PTID is null, then try using
4482 current_process()->private->last_wait_event_ptid.
4483 Add comments.
4484 (lynx_clear_inferiors): Delete. The contents of that function
4485 has been inlined in lynx_mourn;
4486 (lynx_wait_1): Save the ptid in the process's private data.
4487 (lynx_mourn): Free the process' private data. Replace call
4488 to lynx_clear_inferiors by call to clear_inferiors.
4489
96f7a20f
YQ
44902013-05-17 Yao Qi <yao@codesourcery.com>
4491
4492 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4493 the right place.
4494
db0dfaa0
LM
44952013-05-16 Luis Machado <lgustavo@codesourcery.com>
4496
4497 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4498 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4499 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4500 PT_TEXT_END_ADDR guards. Update comments.
4501 (linux_target_op) <read_offsets>: Conditionally define to
4502 linux_read_offsets if the target is UCLIBC and if it defines
4503 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4504
68f5f838
SL
45052013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4506 Andrew Jenner <andrew@codesourcery.com>
4507
4508 * Makefile.in (SFILES): Add linux-nios2-low.c.
4509 (clean): Add action to delete nios2-linux.c.
4510 (nios2-linux.c): New rule.
4511 * configure.srv: Add nios2*-*-linux*.
4512 * linux-nios2-low.c: New.
4513
1ebff1fd
HAQ
45142013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4515
4516 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4517
f6150862
HZ
45182013-04-25 Hui Zhu <hui@codesourcery.com>
4519
4520 PR gdb/15186
f6150862
HZ
4521 * ax.c (ax_printf): Add fflush.
4522
614c279d
TT
45232013-04-22 Tom Tromey <tromey@redhat.com>
4524
4525 * Makefile.in (SFILES): Add filestuff.c.
4526 (OBS): Add filestuff.o.
4527 (filestuff.o): New target.
4528 * config.in, configure: Rebuild.
4529 * configure.ac: Check for fdwalk, pipe2.
4530
7d4e5717
PA
45312013-04-17 Pedro Alves <palves@redhat.com>
4532
4533 * configure.ac (USE_THREAD_DB): Delete variable.
4534 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4535 Don't AC_SUBST USE_THREAD_DB.
4536 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4537 * config.in, configure: Regenerate.
4538
d5c93e41
PA
45392013-04-16 Pedro Alves <palves@redhat.com>
4540
4541 * linux-low.h (struct lwp_info) <thread_known>: Move under
4542 the USE_THREAD_DB #ifdef.
4543
04f5fe89
PA
45442013-04-16 Pedro Alves <palves@redhat.com>
4545
4546 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4547 (linux-low.o): Delete rule.
4548 * linux-low.h: Always include "gdb_thread_db.h" instead of
4549 conditionally including thread_db.h.
4550 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4551 HAVE_THREAD_DB_H.
4552
480b27bf
JK
45532013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4554
4555 * Makefile.in (install-only): Fix make install regression.
4556
43662968
JK
45572013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4558
4559 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4560 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4561 installation.
4562 * gdbserver.1: Remove.
4563
3e74e146
PA
45642013-03-22 Pedro Alves <palves@redhat.com>
4565
4566 * linux-low.c (handle_extended_wait): Don't call
4567 linux_enable_event_reporting.
4568
a8347a2a
TT
45692013-03-15 Tony Theodore <tonyt@logyst.com>
4570
4571 PR build/9098:
4572 * Makefile.in (SHELL): Use @SHELL@.
4573
eeb56fa7
SDJ
45742013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4575
4576 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4577 compiler warning.
4578
4fa7e2ff
JB
45792013-03-13 Joel Brobecker <brobecker@adacore.com>
4580
4581 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4582 Remove extraneous NULL element.
4583
8ddb1965
YQ
45842013-03-13 Yao Qi <yao@codesourcery.com>
4585
4586 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4587 'V' block in trace frame.
4588
9accd112
MM
45892013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4590
4591 * target.h (struct target_ops): Add btrace ops.
4592 (target_supports_btrace): New macro.
4593 (target_enable_btrace): New macro.
4594 (target_disable_btrace): New macro.
4595 (target_read_btrace): New macro.
4596 * gdbthread.h (struct thread_info): Add btrace field.
4597 * server.c: Include btrace-common.h.
4598 (handle_btrace_general_set): New function.
4599 (handle_btrace_enable): New function.
4600 (handle_btrace_disable): New function.
4601 (handle_general_set): Call handle_btrace_general_set.
4602 (handle_qxfer_btrace): New function.
4603 (struct qxfer qxfer_packets[]): Add btrace entry.
4604 * inferiors.c (remove_thread): Disable btrace.
4605 * linux-low: Include linux-btrace.h.
4606 (linux_low_enable_btrace): New function.
4607 (linux_low_read_btrace): New function.
4608 (linux_target_ops): Add btrace ops.
4609 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4610 Add srv_linux_btrace=yes.
4611 (x86_64-*-linux*): Add linux-btrace.o.
4612 Add srv_linux_btrace=yes.
4613 * configure.ac: Define HAVE_LINUX_BTRACE.
4614 * config.in: Regenerated.
4615 * configure: Regenerated.
4616
5cc22e4c
MM
46172013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4618
4619 * server.c (handle_qxfer): Preserve error message if -3 is
4620 returned.
4621 (qxfer): Document the -3 return value.
4622
7c97f91e
MM
46232013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4624
4625 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4626 (linux_btrace_h): New variable.
4627 (linux-btrace.o): New rule.
4628
be9a119c 46292013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4630 Hafiz Abid Qadeer <abidh@codesourcery.com>
4631
4632 * tracepoint.c (trace_buffer_size): New global.
4633 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4634 (init_trace_buffer): Change to one-argument function. Allocate
4635 trace buffer memory.
4636 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4637 handle QTBuffer:size packet.
4638 (cmd_bigqtbuffer_size): New function.
4639 (initialize_tracepoint): Call init_trace_buffer with
4640 DEFAULT_TRACE_BUFFER_SIZE.
4641 * server.c (handle_query): Add QTBuffer:size in the
4642 supported packets.
4643
e64f7499
YQ
46442013-03-07 Yao Qi <yao@codesourcery.com>
4645
4646 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4647 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4648 of -1.
4649 (cmd_qtsp): Adjust condition. Do post increment.
4650 Set cur_action and cur_step_action back to 0.
4651
f0ae6fc3
PA
46522013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4653
4654 PR server/15236
4655 * linux-low.c (linux_write_memory): Return early success if LEN is
4656 zero.
4657
b5b0b0af
CV
46582013-03-05 Corinna Vinschen <vinschen@redhat.de>
4659
334ad4a8 4660 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4661
589bc927
TT
46622013-02-28 Tom Tromey <tromey@redhat.com>
4663
4664 * configure.ac: Invoke AC_SYS_LARGEFILE.
4665 * configure, config.in: Rebuild.
4666
dfe07582
CV
46672013-02-28 Corinna Vinschen <vinschen@redhat.com>
4668
4669 * win32-low.c: Throughout, fix format strings and casts of
4670 printf-like functions to avoid type related warnings on all
4671 platforms.
4672 (get_child_debug_event): Print dwDebugEventCode as hex since
4673 that's how it's usually documented.
4674
736cd585
YQ
46752013-02-28 Yao Qi <yao@codesourcery.com>
4676
4677 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4678 pulongest.
4679
e1f58301
JW
46802013-02-27 Jiong Wang <jiwang@tilera.com>
4681
4682 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4683 (reg-tilegx32.c): New rule.
4684 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4685 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4686 different register info initializer according to elf class.
4687 (init_registers_tilgx32): New function. The tilegx32 register info
4688 initializer.
4689 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4690 (tile_store_gregset): Likewise.
4691
d171ca78
YQ
46922013-02-27 Yao Qi <yao@codesourcery.com>
4693
4694 * server.c (process_point_options): Print debug message when
4695 debug_threads is true.
4696
282bbdf3
YQ
46972013-02-26 Yao Qi <yao@codesourcery.com>
4698
4699 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4700
aca22551
PA
47012013-02-19 Pedro Alves <palves@redhat.com>
4702 Kai Tietz <ktietz@redhat.com>
4703
4704 PR gdb/15161
4705
4706 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4707 instead of strtoul to extract address from packet.
4708 (process_serial_event) <'z'>: Likewise.
4709
4f3cee1c
YQ
47102013-02-18 Yao Qi <yao@codesourcery.com>
4711
4712 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4713
8e1d55a3
PA
47142013-02-14 Pedro Alves <palves@redhat.com>
4715
4716 Plug memory leak.
4717
4718 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4719 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4720
458820da
PA
47212013-02-14 Pedro Alves <palves@redhat.com>
4722
4723 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4724
baea0dae
PA
47252013-02-14 Pedro Alves <palves@redhat.com>
4726
4727 * tracepoint.c (save_string): Delete.
4728 (add_tracepoint_action): Use savestring instead of save_string.
4729
0b1afbb3
PA
47302013-02-12 Pedro Alves <palves@redhat.com>
4731
4732 * linux-xtensa-low.c: Ditto.
4733 * xtensa-xtregs.c: Ditto.
4734
8a4ac37e
PA
47352013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4736
4737 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4738 thread_db.
4739
148de6bb
MS
47402013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4741
4742 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4743 aarch64_num_wp_regs and aarch64_num_bp_regs to
4744 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4745
55fac6e0
MS
47462013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4747
4748 * linux-aarch64-low.c (ps_get_thread_area): Replace
4749 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4750
176eb98c
MS
47512013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4752 Marcus Shawcroft <marcus.shawcroft@arm.com>
4753 Nigel Stephens <nigel.stephens@arm.com>
4754 Yufeng Zhang <yufeng.zhang@arm.com>
4755
4756 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4757 (aarch64.c, aarch64-without-fpu.c): New targets.
4758 * configure.srv (aarch64*-*-linux*): New.
4759 * linux-aarch64-low.c: New file.
4760
56f7af9c
MS
47612013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4762
43aaf8b6 4763 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4764 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4765 (dequeue_one_deferred_signal, linux_resume_one_thread)
4766 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4767 (linux_tracefork_grandchild, linux_test_for_tracefork)
4768 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4769 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4770 where the argument is 0.
4771
60f662b0
YQ
47722013-01-25 Yao Qi <yao@codesourcery.com>
4773
4774 * event-loop.c: Include "queue.h".
4775 (gdb_event_p): New typedef.
4776 (struct gdb_event) <next_event>: Remove.
4777 (event_queue): Change to QUEUE(gdb_event_p).
4778 (async_queue_event): Remove.
4779 (gdb_event_xfree): New.
4780 (initialize_event_loop): New.
4781 (process_event): Use API from QUEUE.
4782 (wait_for_event): Likewise.
4783 * server.c (main): Call initialize_event_loop.
4784 * server.h (initialize_event_loop): Declare.
4785
5ae4861a
YQ
47862013-01-18 Yao Qi <yao@codesourcery.com>
4787
4788 * ax.h (struct eval_agent_expr_context): New.
4789 (gdb_eval_agent_expr): Update declaration.
4790 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4791 TFRAME. Add new argument CTX.
4792 * server.h (struct eval_agent_expr_context): Declare.
4793 (agent_mem_read, agent_tsv_read): Update declaration.
4794 (agent_mem_read_string): Likewise.
4795 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4796 (add_traceframe_block): Add new argument TPOINT.
4797 Increase TPOINT->traceframe_usage.
4798 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4799 eval_tracepoint_agent_expr.
4800 (condition_true_at_tracepoint): Likewise.
4801 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4802 (agent_mem_read_string, agent_tsv_read): Likewise.
4803
85e00e85
YQ
48042013-01-16 Yao Qi <yao@codesourcery.com>
4805
4806 * linux-low.c (linux_resume_one_lwp): Don't check
4807 'lwp->bp_reinsert != 0'.
4808
4039cf45
JB
48092013-01-07 Joel Brobecker <brobecker@adacore.com>
4810 Pedro Alves <palves@redhat.com>
4811
4812 * lynx-low.c (ptrace_request_to_str): Define a temporary
4813 macro and use it to simplify this function's implementation.
4814
9044dee2
JB
48152013-01-07 Joel Brobecker <brobecker@adacore.com>
4816
4817 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4818 sets errno.
4819
e6352c8f
JB
48202013-01-07 Joel Brobecker <brobecker@adacore.com>
4821
4822 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4823
50681a27
JB
48242013-01-07 Joel Brobecker <brobecker@adacore.com>
4825
4826 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4827
3f6e77ef
JB
48282013-01-07 Joel Brobecker <brobecker@adacore.com>
4829
4830 * lynx-low.c (lynx_resume): Use the resume_info parameter
4831 to determine the ptid for the lynx_ptrace call, unless
4832 it is equal to minus_one_ptid, in which case we use the
4833 ptid of the current_inferior.
4834 (lynx_wait_1): After having received a thread create/exit
4835 event, resume the inferior's execution using the signaling
4836 thread's ptid, rather than the old ptid.
4837
7fda33ae
JB
48382013-01-07 Joel Brobecker <brobecker@adacore.com>
4839
4840 * lynx-low.c (lynx_resume): Delete variable ret.
4841
b9786c74
JB
48422013-01-01 Joel Brobecker <brobecker@adacore.com>
4843
4844 * gdbreplay.c (gdbreplay_version): Update copyright year.
4845 * server.c (gdbserver_version): Likewise.
4846
8b93d60f
JB
48472012-12-17 Joel Brobecker <brobecker@adacore.com>
4848
4849 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4850 new thread.
4851
037335a7
JB
48522012-12-17 Joel Brobecker <brobecker@adacore.com>
4853
4854 * lynx-low.c (ptrace_request_to_str): Add handling for
4855 PTRACE_GETTRACESIG.
4856
52d4cbd8
JB
48572012-12-17 Joel Brobecker <brobecker@adacore.com>
4858
4859 * lynx-low.c (lynx_attach): Delete variable new_process.
4860
ab8f6ca9
JB
48612012-12-17 Joel Brobecker <brobecker@adacore.com>
4862
4863 * lynx-low.c (lynx_create_inferior): Delete variable
4864 new_process.
4865
78cbc024
JB
48662012-12-17 Joel Brobecker <brobecker@adacore.com>
4867
4868 * lynx-low.c (ptrace_request_to_str): Do not handle
4869 PTRACE_GETTHREADLIST if this macro does not exist.
4870
14a00470
YQ
48712012-12-15 Yao Qi <yao@codesourcery.com>
4872
4873 * Makefile.in (OBS): Add notif.o.
4874 * notif.c, notif.h: New.
4875 * server.c: Include "notif.h".
4876 (struct vstop_notif) <next>: Remove.
4877 <base>: New field.
4878 (queue_stop_reply): Update.
4879 (push_event, send_next_stop_reply): Remove.
4880 (discard_queued_stop_replies): Update.
4881 (notif_stop): New variable.
4882 (handle_v_stopped): Remove.
4883 (handle_v_requests): Don't call handle_v_stopped. Call
4884 handle_ack_notif instead.
4885 (queue_stop_reply_callback): Call notif_event_enque instead
4886 of queue_stop_reply.
4887 (handle_status): Don't call send_next_stop_reply, call
4888 notif_write_event instead.
4889 (kill_inferior_callback): Likewise.
4890 (detach_or_kill_inferior_callback): Likewise.
4891 (main): Call initialize_notif.
4892 (process_serial_event): Call QUEUE_is_empty.
4893 (handle_target_event): Call notif_push instead of push event.
4894 * server.h (push_event): Remove declaration.
4895
61c125b9
TT
48962012-12-10 Tom Tromey <tromey@redhat.com>
4897
4898 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4899 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4900 macros.
4901 (.c.o): Rewrite.
4902 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4903 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4904 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4905 (amd64-linux-ipa.o, ax.o): Rewrite.
4906 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4907 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4908 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4909 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4910 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4911 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4912 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4913 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4914 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4915 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4916 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4917 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4918 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4919 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4920 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4921 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4922 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4923 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4924 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4925 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4926 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4927 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4928 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4929 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4930 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4931 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4932 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4933 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4934 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4935 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4936 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4937 (reg-tilegx.o): Remove.
4938 (all_object_files): New macro.
4939 Include .deps files.
4940 * aclocal.m4, configure: Rebuild.
4941 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4942 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4943 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4944
e90e9ad9
TT
49452012-12-05 Tom Tromey <tromey@redhat.com>
4946
4947 PR gdb/14917:
4948 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4949
02d403bf 49502012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4951
4952 * configure.ac: Check for linux/perf_event.h.
4953 * config.in: Regenerated.
4954 * configure: Regenerated.
4955
0270a750
PA
49562012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4957
4958 * hostio.c (handle_readlink): Decrease buffer size
4959 parameter passed to readlink by one byte.
4960
8c29b58e
YQ
49612012-11-26 Yao Qi <yao@codesourcery.com>
4962
4963 * configure.ac (build_warnings): Append '-Wempty-body'.
4964 * configure: Regenerated.
4965 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4966 body.
4967
8bdce1ff
PM
49682012-11-15 Pierre Muller <muller@sourceware.org>
4969
4970 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4971 * config.in: Regenerate.
4972 * configure: Regenerate.
4973 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4974 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4975 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4976 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4977 header.
4978 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4979 instead of <sys/wait.h> header.
4980 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4981
02d403bf 49822012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4983
4984 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4985 (various make rules): Remove -DGDBSERVER
4986
fbd5db48
YQ
49872012-11-09 Yao Qi <yao@codesourcery.com>
4988
4989 * spu-low.c (current_ptid): Move it to ..
4990 * gdbthread.h: ... here. New.
4991 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4992 * server.c (myresume, process_serial_event): Likewise.
4993 * thread-db.c (thread_db_find_new_threads): Likewise.
4994 * tracepoint.c (run_inferior_command): Likewise.
4995
b3dc46ff
AB
49962012-10-01 Andrew Burgess <aburgess@broadcom.com>
4997
4998 * server.c (handle_search_memory_1): Include access length in
4999 warning message.
5000
07c04788
HPN
50012012-09-05 Michael Brandt <michael.brandt@axis.com>
5002
5003 * linux-crisv32-low.c: Fix compile errors.
5004
918d227b
YQ
50052012-09-04 Yao Qi <yao@codesourcery.com>
5006
5007 * tracepoint.c (cmd_qtsv): Adjust debug message.
5008 Don't check CUR_TPOINT.
5009
18c1b81a
YQ
50102012-08-28 Yao Qi <yao@codesourcery.com>
5011
5012 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
5013 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
5014 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
5015 Remove declarations of xmalloc, xreallloc, xstrdup and
5016 freeargv.
5017 * Makefile.in (libiberty_h): New.
5018 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
5019 (linux-bfin-low.o): Append dependency 'libiberty.h'.
5020
dc82f37b
YQ
50212012-08-23 Yao Qi <yao@codesourcery.com>
5022
5023 * server.h: Remove declaration of 'xsnprintf'.
5024
406b1477
KS
50252012-08-22 Keith Seitz <keiths@redhat.com>
5026
5027 * server.h: Include build-gnulib-gbserver/config.h.
5028 * gdbreplay.c: Likewise.
5029
e6712ff1
DE
50302012-08-08 Doug Evans <dje@google.com>
5031
5032 * Makefile.in (SFILES): Add gdb_vecs.c.
5033 (OBS): Add gdb_vecs.o.
5034 (gdb_vecs_h, host_defs_h): New variables.
5035 (thread-db.o): Add $(gdb_vecs_h) dependency.
5036 (gdb_vecs.o): New rule.
5037 * thread-db.c: #include "gdb_vecs.h".
5038 (thread_db_load_search): Use a vector to iterate over path elements.
5039 Handle text appearing after "$pdir".
5040
5041 * configure.ac: Add check for strstr.
5042 * config.in: Regenerate.
5043 * configure: Regenerate.
5044
7c3270ae
UW
50452012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
5046
5047 * hostio.c (handle_pread): If pread fails, fall back to attempting
5048 lseek/read.
5049 (handle_pwrite): Likewise for pwrite.
5050
b62e2b27
UW
50512012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
5052
5053 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
5054 between unsupported TYPE and unimplementable ADDR/LEN combination.
5055 (arm_insert_point): Act on new return value.
5056
78a99e91
PA
50572012-07-31 Pedro Alves <palves@redhat.com>
5058
5059 * server.c (process_point_options): Only skip tokens if we find
5060 one that is unrecognized. Don't treat 'X' specially while
5061 skipping unrecognized tokens.
5062
fcf303ab
UW
50632012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5064
5065 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5066 to 4-byte-align HW breakpoint addresses for Thumb.
5067
7255706c
YQ
50682012-07-27 Yao Qi <yao@codesourcery.com>
5069
5070 PR remote/14161.
5071
5072 * server.h: Declare gdb_agent_about_to_close.
5073 * target.c (kill_inferior): Include "agent.h".
5074 New. Send command 'kill'.
5075 * target.h (kill_inferior): Removed macro.
5076 * tracepoint.c (gdb_agent_about_to_close): New.
5077 (gdb_agent_helper_thread): Handle command 'close'.
5078 Wait endlessly until the inferior stops.
5079 Install gdb_agent_remove_socket to atexit hook.
5080 (agent_socket_name): New static variable.
5081 (gdb_agent_socket_init): Replace local variable 'name' with
5082 'agent_socket_name'.
5083 (gdb_agent_remove_socket): New.
5084
5a3f286f
YQ
50852012-07-27 Yao Qi <yao@codesourcery.com>
5086
5087 * server.c (process_point_options): Stop at 'X' when parsing.
5088
961bd387
ME
50892012-07-19 Michael Eager <eager@eagercon.com>
5090
a261b8f5 5091 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5092 to hw_execute.
5093 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5094 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5095 hardware breakpoint.
5096
aa7c7447
JK
50972012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5098
5099 * gdbserver/linux-low.c (initialize_low): Call
5100 linux_ptrace_init_warnings.
5101
7f216e7c
DE
51022012-07-02 Doug Evans <dje@google.com>
5103
5104 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5105 pointer to int.
5106
d3ce09f5
SS
51072012-07-02 Stan Shebs <stan@codesourcery.com>
5108
5109 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5110 (ax.o): Add it to build rule.
5111 (ax-ipa.o): Ditto.
5112 (OBS): Add format.o.
5113 (IPA_OBS): Add format.o.
5114 * server.c (handle_query): Claim support for breakpoint commands.
5115 (process_point_options): Add command case.
5116 (process_serial_event): Leave running if there are printfs in
5117 effect.
5118 * mem-break.h (any_persistent_commands): Declare.
5119 (add_breakpoint_commands): Declare.
5120 (gdb_no_commands_at_breakpoint): Declare.
5121 (run_breakpoint_commands): Declare.
5122 * mem-break.c (struct point_command_list): New struct.
5123 (struct breakpoint): New field command_list.
5124 (any_persistent_commands): New function.
5125 (add_commands_to_breakpoint): New function.
5126 (add_breakpoint_commands): New function.
5127 (gdb_no_commands_at_breakpoint): New function.
5128 (run_breakpoint_commands): New function.
5129 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5130 locally.
5131 * ax.c: Include format.h.
5132 (ax_printf): New function.
5133 (gdb_eval_agent_expr): Add printf opcode.
5134
2f8f6aed
YQ
51352012-06-13 Yao Qi <yao@codesourcery.com>
5136
5137 * server.c (start_inferior): Remove duplicated writes to fields
5138 'last_resume_kind' and 'last_status' of 'current_inferior'.
5139
0c9070b3
YQ
51402012-06-12 Yao Qi <yao@codesourcery.com>
5141 Pedro Alves <palves@redhat.com>
5142
5143 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5144 comment.
5145 * server.c (handle_v_cont): Extend comment.
5146
c52daf70
YQ
51472012-06-11 Yao Qi <yao@codesourcery.com>
5148
5149 * linux-low.c (linux_attach): Add 'static'.
5150
d38bbb0a
YQ
51512012-06-06 Yao Qi <yao@codesourcery.com>
5152
5153 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5154
89dc0afd
JK
51552012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5156
5157 Fix gcc -flto compilation warning.
5158 * server.c (main): Make variable multi_mode and attach volatile.
5159
75f62ce7
TJB
51602012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5161
5162 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5163 if the platform doesn't know about it.
5164
65f479b6
PA
51652012-05-30 Jeff Kenton <jkenton@tilera.com>
5166
5167 * Makefile.in (SFILES): Add linux-tile-low.c.
5168 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5169 * configure.srv: Handle tilegx-*-linux*.
5170 * linux-tile-low.c: New file.
5171
0c5bf5a9
JK
51722012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5173
5174 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5175
a493e3e2
PA
51762012-05-24 Pedro Alves <palves@redhat.com>
5177
5178 PR gdb/7205
5179
43aaf8b6 5180 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5181
2ea28649
PA
51822012-05-24 Pedro Alves <palves@redhat.com>
5183
5184 PR gdb/7205
5185
5186 Replace target_signal with gdb_signal throughout.
5187
8d409d16
MR
51882012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5189
5190 * linux-low.c (linux_store_registers): Avoid the copying sequence
5191 when no data has been retrieved by ptrace.
5192
23512c01
MGD
51932012-05-22 Will Deacon <will.deacon@arm.com>
5194
5195 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5196 Include asm/ptrace.h.
5197 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5198 already defined.
5199
4934b29e
MR
52002012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5201
5202 * linux-low.c (linux_store_registers): Don't re-retrieve data
5203 with ptrace that has already been obtained from /proc. Always
5204 copy any data retrieved with ptrace to the buffer supplied.
5205
bde24c0a
PA
52062012-05-11 Yao Qi <yao@codesourcery.com>
5207 Pedro Alves <palves@redhat.com>
5208
5209 * linux-low.c (enum stopping_threads_kind): New.
5210 (stopping_threads): Change type to `enum stopping_threads_kind'.
5211 (handle_extended_wait): If stopping and suspending threads, leave
5212 the new_lwp suspended too.
5213 (linux_wait_for_event): Adjust.
5214 (stop_all_lwps): Set `stopping_threads' to
5215 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5216 whether we're suspending threads or just stopping them. Assert no
5217 recursion happens.
5218
623b6bdf
YQ
52192012-04-29 Yao Qi <yao@codesourcery.com>
5220
5221 * server.h: Move some code to ...
5222 * gdbthread.h: ... here. New.
5223 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5224 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5225 (nto-low.o, win32-low.o): Likewise.
5226 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5227 * regcache.c, remote-utils.c, server.c: Likewise.
5228 * target.c, tracepoint.c, win32-low.c: Likewise.
5229
f15f9948
TJB
52302012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5231
5232 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5233 (PTRACE_ARG4_TYPE): Likewise.
5234 (PTRACE_XFER_TYPE): Likewise.
5235 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5236 ptrace to PTRACE_ARG3_TYPE.
5237 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5238 (PTRACE_ARG4_TYPE): Likewise.
5239 (PTRACE_XFER_TYPE): Likewise.
5240 (linux_detach_one_lwp): Cast fourth argument of
5241 ptrace to long then PTRACE_ARG4_TYPE.
5242 (regsets_fetch_inferior_registers): Cast third argument of
5243 ptrace to long then PTRACE_ARG3_TYPE.
5244 (regsets_store_inferior_registers): Likewise.
5245
38ea300a
PA
52462012-04-20 Pedro Alves <palves@redhat.com>
5247
5248 * configure: Regenerate.
5249
c971b7fa
PA
52502012-04-19 Pedro Alves <palves@redhat.com>
5251
43aaf8b6 5252 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5253 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5254 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5255 (all, install-only, uninstall, clean-info, all-lib, clean): No
5256 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5257 (maintainer-clean realclean distclean): Use subdir_do.
5258 (subdir_do): New.
5259 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5260 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5261 * acinclude.m4: Include acx_configure_dir.m4.
5262 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5263 calls. Call AC_PROG_RANLIB. Configure gnulib using
5264 ACX_CONFIGURE_DIR.
5265 (GNULIB): New.
5266 (GNULIB_STDINT_H): Adjust.
5267 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5268 * gdbreplay.c: Include build-gnulib/config.h.
5269 * server.h: Likewise.
5270 * aclocal.m4: Regenerate.
5271 * config.in: Regenerate.
5272 * configure: Regenerate.
c971b7fa 5273
809277f8
PA
52742012-04-19 Pedro Alves <palves@redhat.com>
5275
5276 * Makefile.in (LIBGNU, INCGNU): Adjust.
5277 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5278 (all, install-only, uninstall, clean-info, all-lib, clean)
5279 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5280 * configure.ac: Adjust AC_OUTPUT output.
5281 * aclocal.m4: Regenerate.
5282 * configure: Regenerate.
5283
fd9bb8b8
PA
52842012-04-19 Pedro Alves <palves@redhat.com>
5285
5286 * Makefile.in (generated_files): New.
5287 (server_h): Remove the explicit dependency on config.h, and depend
5288 on $generated_files.
5289
1c298c66
PA
52902012-04-19 Pedro Alves <palves@redhat.com>
5291
5292 * Makefile.in (INCGNU): Add -Ignulib.
5293
57c4b50b
PA
52942012-04-19 Pedro Alves <palves@redhat.com>
5295
5296 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5297 (INCGNU): ... this, and spell out -I here.
5298 (GNULIB_LIB): Rename to ...
5299 (LIBGNU): ... this.
5300 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5301
1030e047
PA
53022012-04-19 Pedro Alves <palves@redhat.com>
5303
5304 * config.in: Regenerate.
5305
447d4319
PA
53062012-04-19 Pedro Alves <palves@redhat.com>
5307
5308 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5309 * server.h (memmem): Remove declaration.
5310 * config.in: Regenerate.
5311 * configure: Regenerate.
5312
aad9eab9
YQ
53132012-04-19 Yao Qi <yao@codesourcery.com>
5314
5315 * Makefile.in (SFILES): Add common/vec.c.
5316 (OBS): Add vec.o.
5317 (vec.o): New rule.
5318
3e10640f
YQ
53192012-04-19 Yao Qi <yao@codesourcery.com>
5320
5321 * remote-utils.c (prepare_resume_reply): Replace with macro
5322 target_core_of_thread.
5323 * server.c (handle_qxfer_threads_proper): Likewise.
5324 * target.h (traget_core_of_thread): New macro.
5325
71622373
PA
53262012-04-18 Pedro Alves <palves@redhat.com>
5327
5328 * aclocal.m4: Regenerate.
5329 * configure: Regenerate.
5330
80d26939
YQ
53312012-04-16 Yao Qi <yao@codesourcery.com>
5332
5333 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5334 duplicated on address.
5335
42476b70
YQ
53362012-04-16 Yao Qi <yao@codesourcery.com>
5337
5338 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5339 (struct tracepoint_action_ops) <send>: New field.
5340 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5341 (agent_expr_send, x_tracepoint_action_send): New.
5342 (l_tracepoint_action_send): New.
5343 (cmd_qtdp): Download and install tracepoint
5344 according to `use_agent'.
5345 (run_inferior_command): Add one more parameter `len'.
5346 Update callers.
5347 (tracepoint_send_agent): New.
5348 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5349
7bc83639
YQ
53502012-04-16 Yao Qi <yao@codesourcery.com>
5351
5352 * tracepoint.c (download_tracepoints): Moved to ...
5353 (cmd_qtstart): ... here.
5354
5f18041e
YQ
53552012-04-14 Yao Qi <yao@codesourcery.com>
5356
5357 * tracepoint.c: Include inttypes.h.
5358 (struct collect_memory_action): Use sized types.
5359 (struct tracepoint): Likewise.
5360 (cmd_qtdp, stop_tracing): Update print specifiers.
5361 (cmd_qtp, response_tracepoint): Likewise.
5362 (collect_data_at_tracepoint): Likewise.
5363 (collect_data_at_step): Likewise.
5364
55a8c076
YQ
53652012-04-14 Yao Qi <yao@codesourcery.com>
5366
5367 Import gnulib module inttypes.
5368 * aclocal.m4, config.in, configure: Regenerated.
5369
dc750257
YQ
53702012-04-14 Yao Qi <yao@codesourcery.com>
5371
5372 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5373 Makefile and config.status at last.
5374
0ab5faf9
YQ
53752012-04-13 Yao Qi <yao@codesourcery.com>
5376
5377 * tracepoint.c: Include stdint.h unconditionally.
5378
18f5fd81
TJB
53792012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5380
5381 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5382 on BFD_HAVE_SYS_PROCFS_TYPE.
5383 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5384 * configure: Regenerate.
5385 * config.in: Likewise.
5386
4d47af5c
L
53872012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5388
5389 * Makefile.in (clean): Also remove x32.c x32-linux.c
5390 x32-avx.c x32-avx-linux.c.
5391 (x32.o): New target.
5392 (x32.c): Likewise.
5393 (x32-linux.o): Likewise.
5394 (x32-linux.c): Likewise.
5395 (x32-avx.o): Likewise.
5396 (x32-avx.c): Likewise.
5397 (x32-avx-linux.o): Likewise.
5398 (x32-avx-linux.c): Likewise.
5399
5400 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5401 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5402 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5403 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5404 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5405 i386/x32-avx-linux.xml.
5406
5407 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5408 (init_registers_x32_avx_linux): Likwise.
5409 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5410 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5411
ecedbe58
PA
54122012-04-13 Pedro Alves <palves@redhat.com>
5413
5414 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5415 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5416 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5417 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5418 the sub-make.
5419
c92b5177
L
54202012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5421
5422 * linux-x86-low.c (compat_x32_clock_t): New.
5423 (compat_x32_siginfo_t): Likewise.
5424 (compat_x32_siginfo_from_siginfo): Likewise.
5425 (siginfo_from_compat_x32_siginfo): Likewise.
5426 (linux_is_elf64): Likewise.
5427 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5428 and siginfo_from_compat_x32_siginfo for x32.
5429 (x86_arch_setup): Set linux_is_elf64.
5430
214d508e
L
54312012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5432
5433 PR gdb/13969
5434 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5435 e_machine field.
5436 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5437 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5438 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5439 compatible with process.
5440
c9a1864a
YQ
54412012-04-12 Yao Qi <yao@codesourcery.com>
5442
5443 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5444 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5445 (install-only, install-info, clean): Handle sub dir gnulib.
5446 (all-lib, am--refresh): New targets.
5447 (memmem.o): Remove target.
5448 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5449 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5450 (AC_REPLACE_FUNCS): Remove memmem.
5451 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5452 (AC_OUTPUT): Generate Makefile in gnulib/.
5453 * aclocal.m4, config.in, configure: Regenerated.
5454
367ba2c2
MR
54552012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5456
5457 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5458
9d236627
PA
54592012-04-05 Pedro Alves <palves@redhat.com>
5460
5461 -Werror=strict-aliasing
5462
5463 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5464 pointer.
5465
111217b3
PA
54662012-04-04 Pedro Alves <palves@redhat.com>
5467
5468 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5469 (sparc_store_gregset_from_stack, sparc_store_gregset)
5470 (sparc_breakpoint_at): Fix formatting.
5471
8365dcf5
TJB
54722012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5473
5474 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5475 are available.
5476 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5477 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5478 * config.in: Regenerate.
5479 * configure: Likewise.
5480
689cc2ae
PA
54812012-03-29 Pedro Alves <palves@redhat.com>
5482
5483 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5484 Correct ptrace arguments.
5485
c14dfd32
PA
54862012-03-28 Pedro Alves <palves@redhat.com>
5487
5488 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5489 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5490 (IA64_FR1_REGNUM): New defines.
5491 (ia64_fetch_register): New.
5492 (the_low_target): Install it.
5493 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5494 field.
5495 * linux-low.c (linux_fetch_registers): Try the
5496 the_low_target.fetch_register hook first.
5497
5498 * linux-arm-low.c (the_low_target): Adjust.
5499 * linux-bfin-low.c (the_low_target): Adjust.
5500 * linux-cris-low.c (the_low_target): Adjust.
5501 * linux-crisv32-low.c (the_low_target): Adjust.
5502 * linux-m32r-low.c (the_low_target): Adjust.
5503 * linux-m68k-low.c (the_low_target): Adjust.
5504 * linux-mips-low.c (the_low_target): Adjust.
5505 * linux-ppc-low.c (the_low_target): Adjust.
5506 * linux-s390-low.c (the_low_target): Adjust.
5507 * linux-sh-low.c (the_low_target): Adjust.
5508 * linux-sparc-low.c (the_low_target): Adjust.
5509 * linux-tic6x-low.c (the_low_target): Adjust.
5510 * linux-x86-low.c (the_low_target): Adjust.
5511 * linux-xtensa-low.c (the_low_target): Adjust.
5512
63c88e13
PA
55132012-03-26 Pedro Alves <palves@redhat.com>
5514
5515 * server.c (handle_qxfer_libraries): Don't bail early if
5516 the_target->qxfer_libraries_svr4 is not NULL.
5517
fb723180
PA
55182012-03-26 Pedro Alves <palves@redhat.com>
5519
5520 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5521
0afae3cf
PA
55222012-03-23 Pedro Alves <palves@redhat.com>
5523
5524 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5525 "library-list-svr4" element's start tag when the the DSO list is
5526 empty.
5527
485f1ee4
PA
55282012-03-23 Pedro Alves <palves@redhat.com>
5529
5530 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5531 a variable whose type size is the same as the inferior's pointer
5532 size.
5533
a5362b9a
TS
55342012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5535
5536 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5537 struct siginfo.
5538 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5539 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5540 * linux-low.h: Include <signal.h>.
5541 (struct siginfo): Remove forward declaration.
5542 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5543 struct siginfo.
5544
d226c142
MF
55452012-03-21 Mike Frysinger <vapier@gentoo.org>
5546
5547 * .gitignore: Ignore more files.
5548
122f36ef
PA
55492012-03-19 Pedro Alves <palves@redhat.com>
5550 Jan Kratochvil <jan.kratochvil@redhat.com>
5551
5552 * server.c (cont_thread, general_thread): Add describing comments.
5553 (start_inferior): Clear `cont_thread'.
5554 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5555 of a process.
5556
fc3e5175
YQ
55572012-03-15 Yao Qi <yao@codesourcery.com>
5558
5559 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5560 handling to ...
5561 (cmd_qtdp): ... here.
5562
8d0d92cd
YQ
55632012-03-15 Yao Qi <yao@codesourcery.com>
5564
5565 * tracepoint.c (struct tracepoint_action_ops): New.
5566 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5567 (m_tracepoint_action_download): New.
5568 (r_tracepoint_action_download): New.
5569 (x_tracepoint_action_download): New.
5570 (l_tracepoint_action_download): New.
5571 (add_tracepoint_action): Install `action->ops' according type.
5572 (download_tracepoint_1): Move code `download' function pointer
5573 of various tracepoint_action_ops.
5574
87b0bb13
JK
55752012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5576
5577 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5578 linux_ptrace_attach_warnings.
5579
5f572dec
JK
55802012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5581
5582 * Makefile.in (linux-ptrace.o): New.
5583 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5584 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5585 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5586 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5587 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5588 of these targets.
5589 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5590
f4647387
YQ
55912012-03-08 Yao Qi <yao@codesourcery.com>
5592 Pedro Alves <palves@redhat.com>
5593
5594 Fix PR server/13392.
5595 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5596 offset of JMP insn.
5597 * tracepoint.c (remove_tracepoint): New.
5598 (cmd_qtdp): Call remove_tracepoint when failed to install.
5599
9b224c5e
PA
56002012-03-07 Pedro Alves <palves@redhat.com>
5601
5602 * linux-low.c (get_detach_signal): New.
5603 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5604 Pass on pending signals to PTRACE_DETACH. Check the result of the
5605 ptrace call.
5606 * server.c (program_signals, program_signals_p): New.
5607 (handle_general_set): Handle QProgramSignals.
5608 * server.h (program_signals, program_signals_p): Declare.
5609
e237a7e2
JK
56102012-03-05 Pedro Alves <palves@redhat.com>
5611 Jan Kratochvil <jan.kratochvil@redhat.com>
5612
5613 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5614 New comment why.
5615
5808517f
YQ
56162012-03-03 Yao Qi <yao@codesourcery.com>
5617
5618 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5619 agent_look_up_symbols.
5620
58b4daa5
YQ
56212012-03-03 Yao Qi <yao@codesourcery.com>
5622
5623 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5624 (linux-x86-low.o): Likewise.
5625 * server.h: Remove in_process_agent_loaded.
5626 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5627 common/agent.c.
5628 Update callers.
5629
8ffcbaaf
YQ
56302012-03-03 Yao Qi <yao@codesourcery.com>
5631
5632 * tracepoint.c (gdb_agent_capability): New global.
5633 (in_process_agent_loaded_ust): Renamed to
5634 `in_process_agent_supports_ust'.
5635 Update callers.
5636 (in_process_agent_supports_ust): Call agent_capability_check.
5637 (clear_installed_tracepoints): Assert that agent supports
5638 agent.
5639
d1feda86
YQ
56402012-03-03 Yao Qi <yao@codesourcery.com>
5641
5642 * linux-low.c (linux_supports_agent): New.
5643 (linux_target_ops): Initialize field `supports_agent' with
5644 linux_supports_agent.
5645 * target.h (struct target_ops) <supports_agent>: New.
5646 (target_supports_agent): New macro.
5647 * server.c (handle_general_set): Handle packet 'QAgent'.
5648 (handle_query): Send `QAgent+'.
5649 * Makefile.in (server.o): Depends on agent.h.
5650
2fa291ac
YQ
56512012-03-03 Yao Qi <yao@codesourcery.com>
5652
5653 * Makefile.in (OBS): Add agent.o.
5654 Add new rule for agent.o.
5655 Track dependence of tracepoint.c on agent.h.
5656 * tracepoint.c (run_inferior_command_1):
5657 (run_inferior_command): Call agent_run_command.
5658 (gdb_ust_connect_sync_socket): Deleted. Move it to
5659 common/agent.c.
5660 (resume_thread, stop_thread): Likewise.
5661 (gdb_ust_socket_init): Renamed to ...
5662 (gdb_agent_socket_init): ... New.
5663 (gdb_ust_thread): Renamed to ...
5664 (gdb_agent_helper_thread): ... New.
5665 (gdb_ust_init): Move some code to ...
5666 (gdb_agent_init): ... here. New.
5667 [HAVE_UST]: Call gdb_ust_init.
5668 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5669 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5670 * config.in, configure: Regenerated.
5671
05044653
PA
56722012-03-02 Pedro Alves <palves@redhat.com>
5673
5674 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5675 * linux-low.c (struct simple_pid_list): New.
5676 (stopped_pids): New a struct simple_pid_list pointer.
5677 (add_to_pid_list, pull_pid_from_list): New.
5678 (handle_extended_wait): Don't assume the first signal new children
5679 report is SIGSTOP. Adjust call to pull_pid_from_list.
5680 (linux_wait_for_lwp): Adjust.
5681
8d00225b
YQ
56822012-03-02 Yao Qi <yao@codesourcery.com>
5683
5684 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5685 debug log.
5686
19560ba5
YQ
56872012-03-02 Yao Qi <yao@codesourcery.com>
5688
5689 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5690 `stop_pc' and `tpoint'. Update caller.
5691
1faeff08
MR
56922012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5693
5694 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5695 * linux-low.c (use_linux_regsets): New macro.
5696 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5697 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5698 (linux_register_in_regsets): New function.
5699 (usr_fetch_inferior_registers): Skip registers covered by
5700 regsets.
5701 (usr_store_inferior_registers): Likewise.
5702 (usr_fetch_inferior_registers): New macro.
5703 (usr_store_inferior_registers): Likewise.
5704 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5705 (linux_store_registers): Likewise.
5706 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5707 prototype.
5708 (init_registers_mips64_dsp_linux): Likewise.
5709 (init_registers_mips_linux): New macro.
5710 (init_registers_mips_dsp_linux): Likewise.
5711 (mips_dsp_num_regs): Likewise.
5712 (DSP_BASE, DSP_CONTROL): New fallback macros.
5713 (mips_base_regs): New macro.
5714 (mips_regmap): Use it. Fix the size.
5715 (mips_dsp_regmap): New variable.
5716 (mips_dsp_regset_bitmap): Likewise.
5717 (mips_arch_setup): New function.
5718 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5719 than mips_regmap.
5720 (mips_cannot_store_register): Likewise.
5721 (the_low_target): Update .arch_setup, .num_regs and .regmap
5722 initializers. Add .regset_bitmap initializer.
5723 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5724 initializer.
5725 * linux-bfin-low.c (the_low_target): Likewise.
5726 * linux-cris-low.c (the_low_target): Likewise.
5727 * linux-crisv32-low.c (the_low_target): Likewise.
5728 * linux-ia64-low.c (the_low_target): Likewise.
5729 * linux-m32r-low.c (the_low_target): Likewise.
5730 * linux-m68k-low.c (the_low_target): Likewise.
5731 * linux-ppc-low.c (the_low_target): Likewise.
5732 * linux-s390-low.c (the_low_target): Likewise.
5733 * linux-sh-low.c (the_low_target): Likewise.
5734 * linux-sparc-low.c (the_low_target): Likewise.
5735 * linux-tic6x-low.c (the_low_target): Likewise.
5736 * linux-x86-low.c (the_low_target): Likewise.
5737 * linux-xtensa-low.c (the_low_target): Likewise.
5738 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5739 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5740 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5741 srv_xmlfiles.
5742 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5743 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5744
c03e6ccc
YQ
57452012-02-29 Yao Qi <yao@codesourcery.com>
5746 Pedro Alves <palves@redhat.com>
5747
5748 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5749 `step_over_finished' is true.
5750
644cebc9
PA
57512012-02-27 Pedro Alves <palves@redhat.com>
5752
5753 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5754 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5755
c14d7ab2
PA
57562012-02-27 Pedro Alves <palves@redhat.com>
5757
5758 PR server/9684
5759 * linux-low.c (pid_is_stopped): New.
5760 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5761
412c89dd
LM
57622012-02-25 Luis Machado <lgustavo@codesourcery.com>
5763
5764 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5765 of conditions.
5766
b745defe
MR
57672012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5768
5769 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5770
9f3a5c85
LM
57712012-02-24 Luis Machado <lgustavo@codesourcery>
5772
5773 * server.c (handle_query): Advertise support for target-side
5774 breakpoint condition evaluation.
5775 (process_point_options): New function.
5776 (process_serial_event): When inserting a breakpoint, check for
5777 a target-side condition that should be evaluated.
5778
5779 * mem-break.c: Include regcache.h and ax.h.
5780 (point_cond_list_t): New data structure.
5781 (breakpoint) <cond_list>: New field.
5782 (find_gdb_breakpoint_at): Make non-static.
5783 (delete_gdb_breakpoint_at): Clear any target-side
5784 conditions.
5785 (clear_gdb_breakpoint_conditions): New function.
5786 (add_condition_to_breakpoint): Likewise.
5787 (add_breakpoint_condition): Likewise.
5788 (gdb_condition_true_at_breakpoint): Likewise.
5789 (gdb_breakpoint_here): Return result directly instead
5790 of going through a local variable.
5791
5792 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5793 (clear_gdb_breakpoint_conditions): Likewise.
5794 (add_breakpoint_condition): Likewise.
5795 (gdb_condition_true_at_breakpoint): Likewise.
5796
5797 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5798 (need_step_over_p): Take target-side breakpoint condition into
5799 consideration.
5800
5e1dc496
LM
58012012-02-24 Luis Machado <lgustavo@codesourcery>
5802
5803 * server.h: Include tracepoint.h.
5804 (agent_mem_read, agent_get_trace_state_variable_value,
5805 agent_set_trace_state_variable_value,
5806 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5807 get_set_tsv_func_addr): New prototypes.
5808
5809 * ax.h: New include file.
5810 * ax.c: New source file.
5811
5812 * tracepoint.c: Include ax.h.
5813 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5814 agent_expr, eval_result_type): Move to ax.h.
5815 (parse_agent_expr): Rename to ...
5816 (gdb_parse_agent_expr): ... this, make it non-static and move
5817 to ax.h.
5818 (unparse_agent_expr) Rename to ...
5819 (gdb_unparse_agent_expr): ... this, make it non-static and move
5820 to ax.h.
5821 (eval_agent_expr): Rename to ...
5822 (eval_tracepoint_agent_expr): ... this.
5823 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5824 forward declarations.
5825 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5826 (agent_get_trace_state_variable_value): New function.
5827 (agent_set_trace_state_variable_value): New function.
5828 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5829 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5830 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5831 (condition_true_at_tracepoint): Likewise.
5832 (parse_agent_expr): Rename to ...
5833 (gdb_parse_agent_expr): ... this and move to ax.c.
5834 (unparse_agent_expr): Rename to ...
5835 (gdb_unparse_agent_expr): ... this and move to ax.c.
5836 (gdb_agent_op_name): Move to ax.c.
5837 (eval_agent_expr): Rename to ...
5838 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5839 and move to ax.c.
5840 (eval_tracepoint_agent_expr): New function.
5841 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5842 non-static.
5e1dc496
LM
5843 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5844 ax.c.
5845 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5846 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5847 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5848 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5849 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5850 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5851 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5852 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5853 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5854 (compile_bytecodes): Remove forward declaration.
5855 (is_goto_target): Move to ax.c.
5856 (compile_bytecodes): Move to ax.c and call
5857 agent_get_trace_state_variable_value (...) and
5858 agent_set_trace_state_variable_value (...).
5859
5860 * Makefile.in: Update ax.c and IPA dependencies.
5861
277e4e52
PA
58622012-02-24 Pedro Alves <palves@redhat.com>
5863
5864 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5865 (cmd_bigqtbuffer_circular): ... this. Only handle
5866 'QTBuffer:circular:'.
5867 (handle_tracepoint_general_set): Adjust.
5868
bf4c19f7
YQ
58692012-02-16 Yao Qi <yao@codesourcery.com>
5870
5871 * inferiors.c: Move code to ...
5872 * dll.c: .... here. New.
5873 * server.h: Declare clear_dlls.
5874 * Makefile.in (SFILES): Add dll.c.
5875 (OBS): Add dll.o
5876 (dll.o): New rule.
5877
d73f2619
YQ
58782012-02-11 Yao Qi <yao@codesourcery.com>
5879
5880 * server.c: (handle_monitor_command): Add a new parameter
5881 `own_buf'.
5882 (handle_query): Update caller.
5883
f8255c2a
JB
58842012-02-09 Joel Brobecker <brobecker@adacore.com>
5885
5886 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5887 * configure, config.in: Regenerate.
5888 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5889 is not defined.
5890
da84f473
PA
58912012-02-02 Pedro Alves <palves@redhat.com>
5892
5893 Try SIGKILL first, then PTRACE_KILL.
5894 * linux-low.c (linux_kill_one_lwp): New.
5895 (linux_kill_one_lwp): Rename to ...
5896 (kill_one_lwp_callback): ... this. Use the new
5897 linux_kill_one_lwp.
5898
e886a173
PA
58992012-02-02 Pedro Alves <palves@redhat.com>
5900
5901 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5902 inferior.
5903
be07f1a2
PA
59042012-01-27 Pedro Alves <palves@redhat.com>
5905
5906 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5907 (elf_64_file_p): Make static.
5908 (linux_pid_exe_is_elf_64_file): New.
5909 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5910 Delete declarations.
5911 (linux_pid_exe_is_elf_64_file): Declare.
5912 * linux-x86-low.c (x86_arch_setup): Use
5913 linux_pid_exe_is_elf_64_file.
5914
d8301ad1
JK
59152012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5916
5917 * linux-low.c (linux_wait_for_event_1): Rename to ...
5918 (linux_wait_for_event): ... here and merge it with former
5919 linux_wait_for_event - new variable wait_ptid, use it.
5920 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5921
01b17894
PA
59222012-01-23 Pedro Alves <palves@redhat.com>
5923
5924 * server.c (main): Avoid yet another case of infinite loop while
5925 detaching/killing after a longjmp.
5926
e825046f
JK
59272012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5928
5929 Code cleanup.
5930 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5931
b9e7b9c3
UW
59322012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5933
5934 * hostio.c (handle_readlink): New function.
5935 (handle_vFile): Call it to handle "vFile:readlink" packets.
5936
901f9912
UW
59372012-01-20 Pedro Alves <palves@redhat.com>
5938 Ulrich Weigand <ulrich.weigand@linaro.org>
5939
5940 * server.c (handle_v_requests): Only support vAttach and vRun to
5941 start multiple processes when in extended protocol mode.
5942
fc1ab1a0
PA
59432012-01-17 Pedro Alves <palves@redhat.com>
5944
5945 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5946 memalign plus mprotect to allocate the scratch buffer.
5947
7d5d4e98
PA
59482012-01-13 Pedro Alves <palves@redhat.com>
5949
5950 * server.c (attach_inferior): Clear `cont_thread'.
5951
f128d5e9
PA
59522012-01-13 Pedro Alves <palves@redhat.com>
5953
5954 * server.c (main): Avoid infinite loop while detaching/killing
5955 after a longjmp.
5956
06db92f0
DE
59572012-01-09 Doug Evans <dje@google.com>
5958
5959 * server.c (start_inferior): Set last_ptid in --wrapper case.
5960
32d92999
YQ
59612012-01-06 Yao Qi <yao@codesourcery.com>
5962
5963 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5964 defined.
5965 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5966
5e0a92a9
YQ
59672012-01-04 Yao Qi <yao@codesourcery.com>
5968
5969 * tracepoint.c (cmd_qtdp): Print debug message
5970 for static tracepoint.
5971
ae639e8c
YQ
59722012-01-04 Yao Qi <yao@codesourcery.com>
5973
5974 * tracepoint.c (trace_vdebug): Differentiate debug message
5975 between gdbserver and IPA.
5976
f72429c5
YQ
59772012-01-03 Yao Qi <yao@codesourcery.com>
5978
5979 * tracepoint.c (tracepoint_was_hit): Don't collect for
5980 static tracepoint.
5981
12c3e59c
JB
59822012-01-02 Joel Brobecker <brobecker@adacore.com>
5983
5984 * terminal.h: Reformat copyright header.
5985
67827812
JB
59862012-01-02 Joel Brobecker <brobecker@adacore.com>
5987
5988 * server.c (gdbserver_version): Update copyright year.
5989 * gdbreplay.c (gdbreplay_version): Likewise.
5990
3e52c33d
JK
59912011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5992
5993 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5994
5995 Revert:
5996 2011-12-18 Hui Zhu <teawater@gmail.com>
5997 * linux-low.c (linux_create_inferior): Save return value to ret.
5998
66f1260e
HZ
59992011-12-18 Hui Zhu <teawater@gmail.com>
6000
6001 * linux-low.c (linux_create_inferior): Save return value to ret.
6002
e77616d7
DE
60032011-12-16 Doug Evans <dje@google.com>
6004
e7b06c57
DE
6005 * linux-low.c (linux_create_inferior): If stdio connection,
6006 redirect stdin from /dev/null, stdout to stderr.
6007 * remote-utils.c (remote_is_stdio): New static global.
6008 (remote_connection_is_stdio): New function.
6009 (remote_prepare): Handle stdio connection.
6010 (remote_open): Ditto.
6011 (remote_close): Don't close stdin for stdio connections.
6012 (read_prim,write_prim): New functions. Replace all calls to
6013 read/write to these.
6014 * server.c (main): Watch for "-" argument. Move call to
6015 remote_prepare before start_inferior.
6016 * server.h (STDIO_CONNECTION_NAME): New macro.
6017 (remote_connection_is_stdio): Declare.
6018
e77616d7
DE
6019 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
6020 in debugging output.
6021
82067193
YQ
60222011-12-15 Yao Qi <yao@codesourcery.com>
6023
6024 * tracepoint.c: Include sys/syscall.h.
6025 (gdb_ust_thread): Remove preprocessor conditional.
6026
82bfbe7e
PA
60272011-12-14 Pedro Alves <pedro@codesourcery.com>
6028
6029 * linux-low.c (linux_detach_one_lwp): Call
6030 the_low_target.prepare_to_resume before detaching.
6031
712c6575
YQ
60322011-12-14 Yao Qi <yao@codesourcery.com>
6033
6034 * tracepoint.c (gdb_ust_thread): Don't ignore return value
6035 of write.
6036
d54d1edf
YQ
60372011-12-14 Yao Qi <yao@codesourcery.com>
6038
6039 * i386-low.c (i386_low_stopped_data_address): Initialize local
6040 variable `control'.
6041
6210a125
PA
60422011-12-13 Pedro Alves <pedro@codesourcery.com>
6043
6044 PR remote/13492
6045
6046 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
6047 DR_CONTROL unless necessary. Extend comments.
6048 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
6049 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
6050
2ece8244
YQ
60512011-12-13 Yao Qi <yao@codesourcery.com>
6052
6053 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
6054 macros.
6055 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
6056
784867a5
JK
60572011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
6058
6059 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
6060 Print new debug message for such case.
6061
6bf36717
JK
60622011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6063
6064 Fix overlapping memcpy.
6065 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6066 the read_inferior_memory transfer.
6067 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6068 write_inferior_memory transfer.
6069 (set_fast_tracepoint_jump): New variable buf. Use it for the
6070 read_inferior_memory and write_inferior_memory transfers.
6071 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6072 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6073 Use it for the write_inferior_memory transfer.
6074 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6075 buffers.
6076
50275556
MR
60772011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6078
6079 * linux-low.c (fetch_register, store_register): Make code
6080 consistent, fix formatting.
6081
7325beb4
MR
60822011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6083
6084 * linux-low.c (usr_store_inferior_registers): Factor out code
6085 to handle individual registers into...
6086 (store_register): ... this new function.
6087
c642a434
UW
60882011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6089
6090 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6091 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6092 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6093 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6094 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6095 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6096 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6097 (srv_xmlfiles): Add new XML files.
6098
6099 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6100 and <sys/uio.h>.
6101 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6102 (init_registers_s390_linux32v1): Add prototype.
6103 (init_registers_s390_linux32v2): Likewise.
6104 (init_registers_s390_linux64v1): Likewise.
6105 (init_registers_s390_linux64v2): Likewise.
6106 (init_registers_s390x_linux64v1): Likewise.
6107 (init_registers_s390x_linux64v2): Likewise.
6108 (s390_num_regs): Increment to 52.
6109 (s390_regmap): Add orig_r2 register.
6110 (s390_num_regs_3264): Increment to 68.
6111 (s390_regmap_3264): Add orig_r2 register.
6112 (s390_collect_ptrace_register): Handle orig_r2 register.
6113 (s390_supply_ptrace_register): Likewise.
6114 (s390_fill_last_break): New function.
6115 (s390_store_last_break): Likewise.
6116 (s390_fill_system_call): New function.
6117 (s390_store_system_call): Likewise.
6118 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6119 register sets.
6120 (s390_check_regset): New function.
6121 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6122 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6123 Update target_regsets for available register sets.
6124
2268b414
JK
61252011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6126 Jan Kratochvil <jan.kratochvil@redhat.com>
6127
6128 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6129 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6130 New.
6131 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6132 * linux-low.h (struct process_info_private): New member r_debug.
6133 * server.c (handle_qxfer_libraries): Call
6134 the_target->qxfer_libraries_svr4.
6135 (handle_qxfer_libraries_svr4): New function.
6136 (qxfer_packets): New entry "libraries-svr4".
6137 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6138 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6139 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6140 PACKET_qXfer_libraries_svr4.
6141
d6db1fab
UW
61422011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6143
6144 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6145 PSW address/mask between 8-byte and 16-byte formats.
6146 (s390_supply_ptrace_register): Likewise.
6147 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6148 basic addressing mode bit.
6149
242f5f1c
SS
61502011-11-24 Stan Shebs <stan@codesourcery.com>
6151
6152 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6153
f196051f
SS
61542011-11-17 Stan Shebs <stan@codesourcery.com>
6155
6156 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6157 (tracing_start_time): New global.
6158 (tracing_stop_time): New global.
6159 (tracing_user_name): New global.
6160 (tracing_notes): New global.
6161 (tracing_stop_note): New global.
6162 (cmd_qtstart): Set traceframe_usage, start_time.
6163 (stop_tracing): Set stop_time.
6164 (cmd_qtstatus): Report additional status.
6165 (cmd_qtp): New function.
6166 (handle_tracepoint_query): Call it.
6167 (cmd_qtnotes): New function.
6168 (handle_tracepoint_general_set): Call it.
6169 (get_timestamp): Rename from tsv_get_timestamp.
6170
405f8e94
SS
61712011-11-14 Stan Shebs <stan@codesourcery.com>
6172 Kwok Cheung Yeung <kcy@codesourcery.com>
6173
6174 * linux-x86-low.c (small_jump_insn): New.
6175 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6176 trampoline and error message, build a trampoline and issue a small
6177 jump instruction to it.
6178 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6179 trampoline and error message.
6180 (x86_get_min_fast_tracepoint_insn_len): New.
6181 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6182 * linux-low.h (struct linux_target_ops): Add arguments to
6183 install_fast_tracepoint_jump_pad operation, add new operation.
6184 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6185 arguments.
6186 (linux_get_min_fast_tracepoint_insn_len): New function.
6187 (linux_target_op): Add new operation.
6188 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6189 (gdb_trampoline_buffer_end): Ditto.
6190 (gdb_trampoline_buffer_error): Ditto.
6191 (struct ipa_sym_addresses): Add fields for new IPA variables.
6192 (symbol_list): Add entries for new IPA variables.
6193 (struct tracepoint): Add fields to hold the address range of the
6194 trampoline used by the tracepoint.
6195 (trampoline_buffer_head): New static variable.
6196 (trampoline_buffer_tail): Ditto.
6197 (claim_trampoline_space): New function.
6198 (have_fast_tracepoint_trampoline_buffer): New function.
6199 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6200 structure.
6201 (install_fast_tracepoint): Ditto, also add error buffer argument.
6202 (cmd_qtminftpilen): New function.
6203 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6204 (fast_tracepoint_from_trampoline_address): New function.
6205 (fast_tracepoint_collecting): Handle trampoline as part of jump
6206 pad space.
6207 (set_trampoline_buffer_space): New function.
6208 (initialize_tracepoint): Initialize new IPA variables.
6209 * target.h (struct target_ops): Add arguments to
6210 install_fast_tracepoint_jump_pad operation, add new
6211 get_min_fast_tracepoint_insn_len operation.
6212 (target_get_min_fast_tracepoint_insn_len): New.
6213 (install_fast_tracepoint_jump_pad): Add arguments.
6214 * server.h (IPA_BUFSIZ): Define.
6215 * linux-i386-ipa.c: Include extra header files.
6216 (initialize_fast_tracepoint_trampoline_buffer): New function.
6217 (initialize_low_tracepoint): Call it.
6218 * server.h (set_trampoline_buffer_space): Declare.
6219 (claim_trampoline_space): Ditto.
6220 (have_fast_tracepoint_trampoline_buffer): Ditto.
6221
1e4d1764
YQ
62222011-11-14 Yao Qi <yao@codesourcery.com>
6223
6224 * server.c (handle_query): Handle InstallInTrace for qSupported.
6225 * tracepoint.c (add_tracepoint): Sort list.
6226 (install_tracepoint, download_tracepoint): New.
6227 (cmd_qtdp): Call them to install and download tracepoints.
6228 (sort_tracepoints): Removed.
6229 (cmd_qtstart): Update.
6230
5c73ff4e
YQ
62312011-11-14 Yao Qi <yao@codesourcery.com>
6232
6233 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6234 * mem-break.h: Declare.
6235 * tracepoint.c (cmd_qtstart): Move some code to ...
6236 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6237 New.
6238 (download_tracepoints): Move some code to ...
6239 (download_tracepoint_1): ... here. New.
6240
86a30030
YQ
62412011-11-08 Yao Qi <yao@codesourcery.com>
6242
6243 * remote-utils.c (relocate_instruction): A comment fix.
6244
8d26e50c
JB
62452011-11-07 Joel Brobecker <brobecker@adacore.com>
6246
6247 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6248 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6249 dr_status_mirror and dr_control_mirror from debug_reg_state.
6250 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6251 (i386_initial_stuff): Remove use of deleted globals.
6252 (i386_get_thread_context, i386_set_thread_context,
6253 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6254 from debug_reg_state.
6255
a59306a3
YQ
62562011-11-05 Yao Qi <yao@codesourcery.com>
6257
6258 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6259 address as TPOINT's.
6260
3065dfb6
SS
62612011-11-02 Stan Shebs <stan@codesourcery.com>
6262
6263 * tracepoint.c (agent_mem_read_string): New function.
6264 (eval_agent_expr): Call it for tracenz.
6265 * server.c (handle_query): Report support for tracenz.
6266
fd0d8c7c
YQ
62672011-11-02 Yao Qi <yao@codesourcery.com>
6268
6269 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6270
609086b1
YQ
62712011-11-02 Yao Qi <yao@codesourcery.com>
6272
6273 * target.h: Fix a typo in comment.
6274
b9fd1791
PA
62752011-10-31 Pedro Alves <pedro@codesourcery.com>
6276
6277 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6278 clobber the breakpoints' shadows with fast tracepoint jumps.
6279 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6280 * target.c (write_inferior_memory): Also pass MYADDR down to
6281 check_mem_write.
6282
03583c20
UW
62832011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6284
6285 * configure.ac: Check support for personality routine.
6286 * configure: Regenerate.
6287 * config.in: Likewise.
6288 * linux-low.c: Include <sys/personality.h>.
6289 Define ADDR_NO_RANDOMIZE if necessary.
6290 (linux_create_inferior): Disable address space randomization when
6291 forking inferior, if requested.
6292 (linux_supports_disable_randomization): New function.
6293 (linux_target_ops): Install it.
6294 * server.h (disable_randomization): Declare.
6295 * server.c (disable_randomization): New global variable.
6296 (handle_general_set): Handle QDisableRandomization.
6297 (handle_query): Likewise for qSupported.
6298 (main): Support --disable-randomization and --no-disable-randomization
6299 command line arguments.
6300 * target.h (struct target_ops): Add supports_disable_randomization.
6301 (target_supports_disable_randomization): New macro.
6302
723b724b
MF
63032011-09-29 Mike Frysinger <vapier@gentoo.org>
6304
6305 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6306 ifdef check.
6307 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6308 [!PT_GETDSBT] (target_loadmap): New definition.
6309 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6310 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6311 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6312 and PT_GETDSBT to LINUX_LOADMAP.
6313 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6314 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6315
55329a5c 63162011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6317
6318 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6319 (arm_linux_hwbp_cap): New static variable.
6320 (arm_linux_get_hwbp_cap): Replace by ...
6321 (arm_linux_init_hwbp_cap): ... this new function.
6322 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6323 (arm_linux_get_hw_watchpoint_count): Likewise.
6324 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6325 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6326 (arm_prepare_to_resume): Use perror_with_name instead of error.
6327
55329a5c 63282011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6329
6330 * linux-arm-low.c: Include <signal.h>.
6331 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6332 (struct arm_linux_hwbp_cap): New data type.
6333 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6334 (struct arm_linux_hw_breakpoint): New data type.
6335 (MAX_BPTS, MAX_WPTS): Define.
6336 (struct arch_process_info, struct arch_lwp_info): New data types.
6337 (arm_linux_get_hwbp_cap): New function.
6338 (arm_linux_get_hw_breakpoint_count): Likewise.
6339 (arm_linux_get_hw_watchpoint_count): Likewise.
6340 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6341 (arm_hwbp_control_initialize): Likewise.
6342 (arm_hwbp_control_is_enabled): Likewise.
6343 (arm_hwbp_control_is_initialized): Likewise.
6344 (arm_hwbp_control_disable): Likewise.
6345 (arm_linux_hw_breakpoint_equal): Likewise.
6346 (arm_linux_hw_point_initialize): Likewise.
6347 (struct update_registers_data): New data structure.
6348 (update_registers_callback: New function.
6349 (arm_insert_point): Likewise.
6350 (arm_remove_point): Likewise.
6351 (arm_stopped_by_watchpoint): Likewise.
6352 (arm_stopped_data_address): Likewise.
6353 (arm_new_process): Likewise.
6354 (arm_new_thread): Likewise.
6355 (arm_prepare_to_resume): Likewise.
6356 (the_low_target): Register arm_insert_point, arm_remove_point,
6357 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6358 arm_new_thread, and arm_prepare_to_resume.
6359
6b9801d4
SS
63602011-09-15 Stan Shebs <stan@codesourcery.com>
6361
6362 * server.h (struct emit_ops): Add compare-goto fields.
6363 * tracepoint.c (gdb_agent_op_sizes): New table.
6364 (emit_eq_goto): New function.
6365 (emit_ne_goto): New function.
6366 (emit_lt_goto): New function.
6367 (emit_le_goto): New function.
6368 (emit_gt_goto): New function.
6369 (emit_ge_goto): New function.
6370 (is_goto_target): New function.
6371 (compile_bytecodes): Recognize special cases of compare-goto
6372 combinations and call specialized emitters for them.
6373 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6374 (amd64_emit_ne_goto): New function.
6375 (amd64_emit_lt_goto): New function.
6376 (amd64_emit_le_goto): New function.
6377 (amd64_emit_gt_goto): New function.
6378 (amd64_emit_ge_goto): New function.
6379 (amd64_emit_ops): Add the new functions.
6380 (i386_emit_eq_goto): New function.
6381 (i386_emit_ne_goto): New function.
6382 (i386_emit_lt_goto): New function.
6383 (i386_emit_le_goto): New function.
6384 (i386_emit_gt_goto): New function.
6385 (i386_emit_ge_goto): New function.
6386 (i386_emit_ops): Add the new functions.
6387
bf15cbda
SS
63882011-09-08 Stan Shebs <stan@codesourcery.com>
6389
6390 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6391 (i386_emit_epilogue): Restore %ebx.
6392
943ca1dd
JZ
63932011-08-31 Jie Zhang <jzhang918@gmail.com>
6394
6395 * server.c (step_thread): Remove definition.
6396 (process_serial_event): Don't handle Hs.
6397 * server.h (step_thread): Remove declaration.
6398 * target.c (set_desired_inferior): Remove use of step_thread.
6399
e3deef73
LM
64002011-08-24 Luis Machado <lgustavo@codesourcery.com>
6401
6402 * linux-low.c: Include linux-procfs.h.
6403 (linux_attach_lwp_1): Update comments.
6404 (linux_attach): Scan for existing threads when attaching to a
6405 process that is the tgid.
6406 * Makefile.in: Update dependencies.
6407
13da1c97
LM
64082011-08-24 Luis Machado <lgustavo@codesourcery.com>
6409
6410 * configure.srv: Add linux-procfs.o dependencies.
6411
881127c9
YQ
64122011-08-14 Yao Qi <yao@codesourcery.com>
6413
6414 * target.h (struct target_ops): Fix indent.
6415 * win32-low.c (win32_target_ops): Fix comment.
6416
58dbd541
YQ
64172011-08-14 Andrew Jenner <andrew@codesourcery.com>
6418 Yao Qi <yao@codesourcery.com>
6419
6420 * Makefile.in (clean): Remove tic6x-*.c files.
6421 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6422 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6423 (tic6x-c64xp-linux.c): Likewise.
6424 * configure.srv: Add support for tic6x-*-uclinux.
6425 * linux-tic6x-low.c: New.
6426 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6427
78d85199
YQ
64282011-08-14 Andrew Stubbs <ams@codesourcery.com>
6429 Yao Qi <yao@codesourcery.com>
6430
6431 * target.h (struct target_ops): Add read_loadmap.
6432 * linux-low.c (struct target_loadseg): New type.
6433 (struct target_loadmap): New type.
6434 (linux_read_loadmap): New function.
6435 (linux_target_ops): Add linux_read_loadmap.
6436 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6437 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6438 to NULL.
78d85199 6439
a959a88d
EZ
64402011-08-05 Eli Zaretskii <eliz@gnu.org>
6441
6442 * win32-low.c: Include <stdint.h>.
6443
1ced966e
PA
64442011-07-22 Pedro Alves <pedro@codesourcery.com>
6445
6446 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6447 to the inferior here.
6448 (i386_remove_aligned_watchpoint): Ditto.
6449 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6450 fit part of the watchpoint in the debug registers.
6451 (i386_update_inferior_debug_regs): New.
6452 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6453 registers, and only update the inferior on success.
6454 (i386_low_remove_watchpoint): Ditto.
6455
d26e3629
KY
64562011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6457
6458 * linux-low.c (compare_ints, unique, list_threads, show_process,
6459 linux_core_of_thread): Delete.
6460 (linux_target_ops): Change linux_core_of_thread to
6461 linux_common_core_of_thread.
6462 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6463 * utils.c (malloc_failure): Change type of argument.
6464 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6465 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6466 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6467 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6468 (IPA_OBJS): Add common-utils-ipa.o.
6469 (ptid_h, linux_osdata_h): New macros.
6470 (server_h): Add common/common-utils.h, common/xml-utils.h,
6471 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6472 common/ptid.h.
6473 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6474 ptid.o, buffer.o): New rules.
6475 (linux-low.o): Add common/linux-osdata.h as a dependency.
6476 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6477 * configure.ac: Add AC_HEADER_DIRENT check.
6478 * config.in: Regenerate.
6479 * configure: Regenerate.
6480 * remote-utils.c (xml_escape_text): Delete.
6481 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6482 buffer_xml_printf): Move to common/buffer.c.
6483 * server.c (main): Remove call to initialize_inferiors.
6484 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6485 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6486 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6487 internal_error, gdb_assert, gdb_assert_fail): Delete.
6488 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6489 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6490 common/buffer.h.
6491 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6492 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6493 initialize_inferiors): Delete.
6494
2275a1a7
PA
64952011-07-20 Pedro Alves <pedro@codesourcery.com>
6496
6497 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6498 symbol error.
6499
0a5b1e09
PA
65002011-05-31 Pedro Alves <pedro@codesourcery.com>
6501
6502 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6503 assertion.
6504 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6505
6938fd34
YQ
65062011-05-26 Yao Qi <yao@codesourcery.com>
6507
6508 * Makefile.in (thread-db.o): Track dependence to
6509 common/gdb_thread_db.h.
6510 * thread-db.c: include gdb_thread_db.h from right place.
6511
b481f9e0
TT
65122011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6513
6514 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6515 __FILE__ and __LINE__ to internal_error.
6516
98a5dd13
DE
65172011-05-13 Doug Evans <dje@google.com>
6518
6519 * thread-db.c (try_thread_db_load_from_sdir): New function.
6520 (try_thread_db_load_from_dir): New function.
6521 (thread_db_load_search): Handle $sdir, ignore $pdir.
6522 Remove trying of system directories if search of
6523 libthread-db-search-path fails, that is now done via $sdir.
6524
d248b706
KY
65252011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6526
6527 * server.c (handle_query): Add EnableDisableTracepoints to the list
6528 of supported features.
43aaf8b6 6529 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6530 tracepoints.
43aaf8b6
PA
6531 (cmd_qtenable_disable): New.
6532 (cmd_qtstart): Install tracepoints even if disabled.
6533 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6534 receiving a QTEnable or QTDisable packet.
6535 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6536 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6537 tracepoints.
6538 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6539
84e578fb
DE
65402011-05-10 Doug Evans <dje@google.com>
6541
6542 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6543
71f55dd8
DE
65442011-05-04 Doug Evans <dje@google.com>
6545
6546 * linux-low.c (linux_join): Skip process lookup.
6547 * spu-low.c (spu_join): Ditto.
6548 * server.c (join_inferiors_callback): Delete.
6549 (process_serial_event): For 'D' packet (detach) call join_inferior
6550 directly.
6551
4d393d60
JM
65522011-05-04 Joseph Myers <joseph@codesourcery.com>
6553
6554 * README: Don't mention xscale*-*-linux*.
6555 * configure.srv (xscale*-*-linux*): Don't handle target.
6556
b00ad6ff
NF
65572011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6558
6559 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6560 casting pointers.
6561 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6562 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6563 (i386_emit_void_call_2): Likewise.
6564
af96c192
YQ
65652011-04-26 Yao Qi <yao@codesourcery.com>
6566
43aaf8b6
PA
6567 * linux-low.c: Move common macros to linux-ptrace.h.
6568 Include linux-ptrace.h.
af96c192
YQ
6569 * Makefile.in (linux_ptrace_h): New.
6570 (linux-low.o): Depends on linux-ptrace.h.
6571
03f2bd59
JK
65722011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6573
6574 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6575 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6576 (remote_prepare): New function with most of the TCP code from ...
6577 (remote_open): ... here. Detect PORT here unconditionally. Move also
6578 setting transport_is_reliable.
6579 * server.c (run_once): New variable.
6580 (gdbserver_usage): Document it.
6581 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6582 the first run if RUN_ONCE.
6583 * server.h (run_once, remote_prepare): New declarations.
6584
7a9dd1b2
TT
65852011-04-19 Tom Tromey <tromey@redhat.com>
6586
6587 * win32-low.c (handle_load_dll): Remove duplicate "the".
6588
81239425
PM
65892011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6590
6591 Remove support for old Cygwin 1.5 versions.
6592 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6593 function to avoid warning.
6594 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6595 warning.
6596
9e0627f1
PM
65972011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6598
6599 * gdbserver/server.h (Macro _): Define it if not available.
6600
588eebee
MS
66012011-03-14 Michael Snyder <msnyder@vmware.com>
6602
348af9f7 6603 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6604
43f70d4c
JB
66052011-03-10 Joel Brobecker <brobecker@adacore.com>
6606
6607 * Makefile.in (maintainer-clean realclean distclean): Remove
6608 "make ... subdir_do" command.
6609
348af9f7
MS
66102011-03-10 Michael Snyder <msnyder@vmware.com>
6611
6612 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6613
6614 * server.c (handle_v_run): Free alloced buffer on early return.
6615
e637a4f5
YQ
66162011-03-09 Yao Qi <yao@codesourcery.com>
6617
6618 Revert:
6619 2011-03-04 Yao Qi <yao@codesourcery.com>
6620
6621 * Makefile.in: Remove GNU make feature --directory.
6622
6623 2011-03-05 Yao Qi <yao@codesourcery.com>
6624
6625 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6626 (subdir_do): New make target. Copied from gdb/Makefile.
6627 (maintainer-clean, realclean, distclean, clean): Call corresponding
6628 make targets in common/Makefile.
6629
6630 2011-02-11 Yao Qi <yao@codesourcery.com>
6631
6632 * configure.ac: Call AC_PROG_RANLIB.
6633 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6634 * configure: Regenerate.
6635
e6edda56
JK
66362011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6637
6638 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6639
e5141119
JB
66402011-03-06 Yao Qi <yao@codesourcery.com>
6641
6642 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6643
64794aa4
JB
66442011-03-05 Yao Qi <yao@codesourcery.com>
6645
6646 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6647 (subdir_do): New make target. Copied from gdb/Makefile.
6648 (maintainer-clean, realclean, distclean, clean): Call corresponding
6649 make targets in common/Makefile.
6650
7a762829
YQ
66512011-03-04 Yao Qi <yao@codesourcery.com>
6652
6653 * Makefile.in: Remove GNU make feature --directory.
6654
348af9f7
MS
66552011-03-04 Michael Snyder <msnyder@vmware.com>
6656
6657 * server.c (queue_stop_reply): Call xmalloc not malloc.
6658
66592011-03-02 Michael Snyder <msnyder@vmware.com>
6660
6661 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6662
9f72fee2
MS
66632011-02-28 Michael Snyder <msnyder@vmware.com>
6664
588eebee
MS
6665 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6666 (cmd_qtframe): Ditto.
6667 (cmd_qtbuffer): Ditto.
6668 (cmd_bigqtbuffer): Ditto.
6669
9f72fee2
MS
6670 * utils.c (decimal2str): Initialize 'width' to nine, then
6671 don't mess with it.
6672
8040bd49
UW
66732011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6674
6675 * hostio.c (require_data): Free *data, not data.
6676
7e52cbd0
JK
66772011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6678
6679 * hostio.c (require_data): Use free, not xfree.
6680
9130f83e
MS
66812011-02-27 Michael Snyder <msnyder@vmware.com>
6682
4b812f4e
MS
6683 * server.c (handle_query): Discard unused value.
6684
9130f83e
MS
6685 * hostio.c (require_data): Free malloc memory before returning
6686 error.
6687
69d37113
MS
66882011-02-26 Michael Snyder <msnyder@vmware.com>
6689
6690 * linux-low.c (list_threads): Call closedir for dirent.
6691
35f5825a
MS
66922011-02-27 Michael Snyder <msnyder@vmware.com>
6693
2a589cef
MS
6694 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6695 a case statement falls through.
6696
0adea5f7
MS
6697 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6698
35f5825a
MS
6699 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6700 in comparison.
6701
238f1c74
MS
67022011-02-26 Michael Snyder <msnyder@vmware.com>
6703
6704 * utils.c (decimal2str): Eliminate dead code and dead param.
6705 (pulongest): Drop dead param from call to decimal2str.
6706 (plongest): Ditto.
6707
633ff500
JB
67082011-02-24 Joel Brobecker <brobecker@adacore.com>
6709
6710 Revert the following patch (not approved yet):
6711 2011-02-21 Hui Zhu <teawater@gmail.com>
6712 * tracepoint.c (tp_printf): New function.
6713 (eval_agent_expr): Handle gdb_agent_op_printf.
6714
f9c6ff72
HZ
67152011-02-21 Hui Zhu <teawater@gmail.com>
6716
6717 * tracepoint.c (tp_printf): New function.
6718 (eval_agent_expr): Handle gdb_agent_op_printf.
6719
94d5e490
TT
67202011-02-18 Tom Tromey <tromey@redhat.com>
6721
6722 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6723 (tracepoint.o): Likewise.
6724 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6725 (gdb_agent_op_names): Likewise.
6726
c7f96d2b
TT
67272011-02-18 Tom Tromey <tromey@redhat.com>
6728
6729 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6730 gdb_agent_op_rot>: New constants.
6731 (gdb_agent_op_names): Add pick and roll.
6732 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6733 cases.
6734
0feedb2c
JK
67352011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6736
6737 * aclocal.m4: Regenerated with aclocal-1.11.1.
6738
b3b9301e
PA
67392011-02-14 Pedro Alves <pedro@codesourcery.com>
6740
6741 * server.c (handle_qxfer_traceframe_info): New.
6742 (qxfer_packets): Register "traceframe-info".
6743 (handle_query): Report support for qXfer:traceframe-info:read+.
6744 * tracepoint.c (match_blocktype): New.
6745 (traceframe_find_block_type): Rename to ...
6746 (traceframe_walk_blocks): ... this. Add callback filter argument,
6747 and use it.
6748 (traceframe_find_block_type): New, reimplemented on top of
6749 traceframe_walk_blocks.
6750 (build_traceframe_info_xml): New.
6751 (traceframe_read_info): New.
6752 * server.h (traceframe_read_info): Declare.
6753
4f3e6fb7
YQ
67542011-02-11 Yao Qi <yao@codesourcery.com>
6755
6756 * configure.ac: Call AC_PROG_RANLIB.
6757 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6758 * configure: Regenerate.
6759
764880b7
PA
67602011-02-07 Pedro Alves <pedro@codesourcery.com>
6761
6762 * server.c (gdb_read_memory): Change return semantics to allow
6763 partial transfers.
6764 (handle_search_memory_1): Adjust.
6765 (process_serial_event) <'m' packet>: Handle partial transfers.
6766 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6767
1c79eb8a
PA
67682011-01-28 Pedro Alves <pedro@codesourcery.com>
6769
6770 * regcache.c (init_register_cache): Initialize
6771 regcache->register_status.
6772 (free_register_cache): Release regcache->register_status.
6773 (regcache_cpy): Copy register_status.
6774 (registers_to_string): Print 'x's for unavailable registers.
6775 (supply_register): Mark the register's status valid or
6776 unavailable, depending on whether a buffer was passed in or not.
6777 (supply_register_zeroed): New.
6778 (supply_regblock): Mark the registers' status valid or
6779 unavailable, depending on whether a buffer was passed in or not.
6780 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6781 (struct regcache): New `register_status' field.
6782 (supply_register_zeroed): Declare.
6783 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6784 supply_register_zeroed, rather than passing a NULL buffer to
6785 supply_register.
6786 * tracepoint.c (fetch_traceframe_registers): Update comment.
6787
85724a0e
PA
67882011-01-28 Pedro Alves <pedro@codesourcery.com>
6789
6790 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6791 buffer explicit.
6792
d08aafef
PA
67932011-01-25 Pedro Alves <pedro@codesourcery.com>
6794
6795 * server.h (decode_xfer_write): Change prototype.
6796 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6797 and don't extract the annex here.
6798 * server.c (decode_xfer_read): Remove `annex' parameter,
6799 and don't extract the annex here.
6800 (decode_xfer): New.
6801 (struct qxfer): New.
6802 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6803 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6804 (handle_qxfer_statictrace): New functions, abstracted out from
6805 handle_query, and made to use the struct qxfer interface.
6806 (handle_threads_qxfer_proper): Rename to ...
6807 (handle_qxfer_threads_proper): ... this.
6808 (handle_threads_qxfer): Rename to ...
6809 (handle_qxfer_threads): ... this. Adjust.
6810 (qxfer_packets): New array.
6811 (handle_qxfer): New function.
6812 (handle_query): Use handle_qxfer.
6813
493e2a69
MS
68142011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6815
6816 * gdbreplay.c: Shorten lines of >= 80 columns.
6817 * linux-low.c: Ditto.
6818 * linux-ppc-low.c: Ditto.
6819 * linux-s390-low.c: Ditto.
6820 * linux-sparc-low.c: Ditto.
6821 * linux-x86-low.c: Ditto.
6822 * linux-xtensa-low.c: Ditto.
6823 * mem-break.c: Ditto.
6824 * nto-low.c: Ditto.
6825 * regcache.h: Ditto.
6826 * remote-utils.c: Ditto.
6827 * server.c: Ditto.
6828 * server.h: Ditto.
6829 * thread-db.c: Ditto.
6830 * tracepoint.c: Ditto.
6831 * utils.c: Ditto.
6832 * win32-low.h: Ditto.
6833
44944448
JB
68342011-01-05 Joel Brobecker <brobecker@adacore.com>
6835
6836 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6837 update.
6838
71ce852c
JB
68392011-01-01 Joel Brobecker <brobecker@adacore.com>
6840
6841 * server.c (gdbserver_version): Update copyright year in version
6842 output.
6843 * gdbreplay.c (gdbreplay_version): Ditto.
6844
eb826dc6
MF
68452010-12-29 Jie Zhang <jie.zhang@analog.com>
6846
6847 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6848 * linux-bfin-low.c: New file.
6849 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6850 PT_DATA_ADDR for BFIN targets.
6851 * Makefile.in (SFILES): Add linux-bfin-low.c.
6852 (clean): Remove reg-bfin.c.
6853 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6854 * README: Mention supported Blackfin targets.
6855
39ab222a
MF
68562010-12-23 Mike Frysinger <vapier@gentoo.org>
6857
6858 * .gitignore: New file.
6859
a1f2ce7d
MF
68602010-11-16 Mike Frysinger <vapier@gentoo.org>
6861
6862 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6863
f474844c
JZ
68642010-10-22 Jie Zhang <jie@codesourcery.com>
6865
6866 * Makefile.in: Add FLAGS_TO_PASS variable.
6867 (install): Remove dependency of install-only and recursively
6868 invoke make for install-only.
6869
f1048712
DE
68702010-10-04 Doug Evans <dje@google.com>
6871
6872 * Makefile.in (uninstall): Use $(DESTDIR).
6873
b53a1623
PA
68742010-09-24 Pedro Alves <pedro@codesourcery.com>
6875
e6ee044d
PA
6876 PR gdb/11842
6877
b53a1623
PA
6878 * linux-x86-low.c (compat_siginfo_from_siginfo)
6879 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6880 si_code is < 0. Check for si_code == SI_TIMER before checking for
6881 si_code < 0.
6882
fa1bd1e4
JB
68832010-09-13 Joel Brobecker <brobecker@adacore.com>
6884
6885 * lynx-i386-low.c: New file.
6886 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6887
47fac8f8
JB
68882010-09-13 Joel Brobecker <brobecker@adacore.com>
6889
6890 * lynx-low.c (ptrace_request_to_str): Remove handling for
6891 request values that have been removed in LynxOS 5.x.
6892
1adfc54d
JB
68932010-09-13 Joel Brobecker <brobecker@adacore.com>
6894
6895 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6896 <ptrace.h>
6897
c2a66c29
NS
68982010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6899
6900 * configure.ac: Add --enable-inprocess-agent option.
6901 * configure: Rebuilt.
6902
32fcada3
YQ
69032010-09-06 Yao Qi <yao@codesourcery.com>
6904
6905 * linux-low.c (linux_kill): Remove unused variable.
6906 (linux_stabilize_threads): Likewise.
6907 * server.c (start_inferior): Likewise.
6908 (queue_stop_reply_callback): Likewise.
6909 * tracepoint.c (do_action_at_tracepoint): Likewise.
6910
0cccb683
YQ
69112010-09-06 Yao Qi <yao@codesourcery.com>
6912
6913 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6914 on return.
6915
423ec54c
JK
69162010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6917
6918 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6919
12ac6819
PA
69202010-09-06 Pedro Alves <pedro@codesourcery.com>
6921
6922 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6923 "$(IPA_DEPFILES)".
6924
8ed54b31
JB
69252010-09-01 Joel Brobecker <brobecker@adacore.com>
6926
6927 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6928 gdbserver/lynx-ppc-low.c: New files.
6929 * Makefile.in (lynx_low_h): New variable.
6930 (lynx-low.o, lynx-ppc-low.o): New rules.
6931 * configure.ac: On LynxOS, link with -lnetinet.
6932 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6933 * configure: regenerate.
6934
bb0116a4
JB
69352010-09-01 Joel Brobecker <brobecker@adacore.com>
6936
6937 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6938 * configure.ac: Add check for vasprintf and vsnprintf.
6939 * configure, config.in: Regenerate.
6940 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6941
a778ab81 69422010-09-01 Joel Brobecker <brobecker@adacore.com>
6943
6944 * gdbreplay.c: Move include of alloca.h up, next to include of
6945 malloc.h.
6946 * server.h: Add include of malloc.h.
6947 * mem-break.c: Remove include of malloc.h.
6948 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6949
8b034a19 69502010-09-01 Joel Brobecker <brobecker@adacore.com>
6951
6952 * Makefile.in (memmem.o): Build with -Wno-error.
6953
69542010-09-01 Joel Brobecker <brobecker@adacore.com>
6955
6956 * utils.c (xsnprintf): Make non-static.
6957 * server.h: Add xsnprintf declaration.
6958 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6959 replace calls to snprintf by calls to xsnprintf throughout.
6960
69612010-09-01 Joel Brobecker <brobecker@adacore.com>
6962
6963 * configure.ac: Add configure check for alloca.
6964 * configure, config.in: Regenerate.
6965 * server.h: Include alloca.h if it exists.
6966 * gdbreplay.c: Include alloca.h if it exists.
6967
1a981360
PA
69682010-08-28 Pedro Alves <pedro@codesourcery.com>
6969
6970 * linux-low.c (__SIGRTMIN): Define if not already defined.
6971 (linux_create_inferior): Check for __ANDROID__ rather than
6972 __SIGRTMIN.
6973 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6974 are already deferred.
6975 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6976 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6977 stopped and already has a pending signal to report.
6978 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6979 a pending signal to report or is moving out of a jump pad.
6980 (linux_init_signals): Check for __ANDROID__ rather than
6981 __SIGRTMIN.
6982
b4d51a55
PA
69832010-08-28 Pedro Alves <pedro@codesourcery.com>
6984
6985 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6986 debug_threads check. Avoid a linear search when not doing debug
6987 output.
6988
ec48365d
PA
69892010-08-27 Pedro Alves <pedro@codesourcery.com>
6990
6991 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6992 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6993 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6994 (process_event): Change local fd's type to gdb_fildes_t.
6995 (create_file_handler): Adjust prototype.
6996 (delete_file_handler): Adjust prototype.
6997 (handle_file_event): Adjust prototype. Use pfildes.
6998 (create_file_event): Adjsut prototype.
6999 * remote-utils.c (remote_desc, listen_desc): Change type to
7000 gdb_fildes_t.
7001 * server.h: New gdb_fildes_t typedef.
7002 [USE_WIN32API]: Include winsock2.h.
7003 (delete_file_handler, add_file_handler): Adjust prototypes.
7004 (pfildes): Declare.
7005 * utils.c (pfildes): New.
7006
854d88f0
PA
70072010-08-27 Pedro Alves <pedro@codesourcery.com>
7008
7009 * configure.ac (build_warnings): Add -Wno-char-subscripts.
7010 * configure: Regenerate.
7011
0146f85b
PA
70122010-08-27 Pedro Alves <pedro@codesourcery.com>
7013
7014 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
7015 (linux_done_accessing_memory): ... this.
7016 (linux_target_ops): Adjust.
7017 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
7018 * nto-low.c (nto_target_ops): Adjust comment.
7019 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
7020 * spu-low.c (spu_target_ops): Adjust comment.
7021 * target.h (target_ops): Rename unprepare_to_access_memory field
7022 to done_accessing_memory.
7023 (unprepare_to_access_memory): Rename to ...
7024 (done_accessing_memory): ... this.
7025
90d74c30
PA
70262010-08-26 Pedro Alves <pedro@codesourcery.com>
7027
7028 * linux-low.c (linux_prepare_to_access_memory): New.
7029 (linux_unprepare_to_access_memory): New.
7030 (linux_target_ops): Install them.
7031 * server.c (read_memory): Rename to ...
7032 (gdb_read_memory): ... this. Use
7033 prepare_to_access_memory/prepare_to_access_memory.
7034 (write_memory): Rename to ...
7035 (gdb_write_memory): ... this. Use
7036 prepare_to_access_memory/prepare_to_access_memory.
7037 (handle_search_memory_1): Adjust.
7038 (process_serial_event): Adjust.
7039 * target.h (struct target_ops): New fields
7040 prepare_to_access_memory and unprepare_to_access_memory.
7041 (prepare_to_access_memory, unprepare_to_access_memory): New.
7042 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
7043 prepare_to_access_memory/prepare_to_access_memory.
7044 * nto-low.c (nto_target_ops): Adjust.
7045 * spu-low.c (spu_target_ops): Adjust.
7046 * win32-low.c (win32_target_ops): Adjust.
7047
fd467969
PA
70482010-08-26 Pedro Alves <pedro@codesourcery.com>
7049
7050 * Makefile.in (WARN_CFLAGS): Get it from configure.
7051 (WERROR_CFLAGS): New.
7052 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
7053 * configure.ac: Introduce --enable-werror, which adds -Werror to
7054 the compiler command line. Enabled by default. Disable with
7055 --disable-werror. Add -Wdeclaration-after-statement
7056 Wpointer-arith and -Wformat-nonliteral to warning flags.
7057 * configure: Regenerate.
7058
331e2f5f
PA
70592010-08-26 Pedro Alves <pedro@codesourcery.com>
7060
7061 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7062
e581f2b4
PA
70632010-08-26 Pedro Alves <pedro@codesourcery.com>
7064
7065 * gdbreplay.c (remote_error): New.
7066 (gdbchar): New.
7067 (expect): Use gdbchar. Check for error reading from GDB.
7068 Clarify sync error output.
7069 (play): Check for errors writing to GDB.
7070 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7071 * remote-utils.c (getpkt): Check for errors writing to the remote
7072 descriptor.
7073
3c11dd79
PA
70742010-08-25 Pedro Alves <pedro@codesourcery.com>
7075
7076 * linux-low.c (linux_wait_1): Move non-debugging code out of
7077 `debug_threads' control.
7078
d20a8ad9
PA
70792010-08-25 Pedro Alves <pedro@codesourcery.com>
7080
7081 * linux-low.c (linux_wait_1): Don't set last_status here.
7082 * server.c (push_event, queue_stop_reply_callback): Assert we're
7083 not pushing a TARGET_WAITKIND_IGNORE event.
7084 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7085 (myresume, handle_target_event): Set the thread's last_resume_kind
7086 and last_status from the target returned status.
7087
964e4306
PA
70882010-08-25 Pedro Alves <pedro@codesourcery.com>
7089
7090 PR threads/10729
7091
7092 * linux-x86-low.c (update_debug_registers_callback): New.
7093 (i386_dr_low_set_addr): Use it.
7094 (i386_dr_low_get_addr): New.
7095 (i386_dr_low_set_control): Use update_debug_registers_callback.
7096 (i386_dr_low_get_control): New.
7097 (i386_dr_low_get_status): Adjust.
7098 * linux-low.c (linux_stop_lwp): New.
7099 * linux-low.h (linux_stop_lwp): Declare.
7100
7101 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7102 argument instead of a i386_debug_reg_state.
7103 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7104 a i386_debug_reg_state.
7105 (i386_insert_aligned_watchpoint): Adjust.
7106 (i386_remove_aligned_watchpoint): Adjust.
7107 (i386_low_stopped_data_address): Read the debug registers from the
7108 inferior instead of from the mirrors.
7109 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7110 (i386_dr_low_get_addr): Declare.
7111 (i386_dr_low_get_control): Declare.
7112 (i386_dr_low_get_status): Change prototype.
7113
7114 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7115 (i386_dr_low_get_addr): New.
7116 (i386_dr_low_get_control): New.
7117 (i386_dr_low_get_status): Adjust prototype. Return
7118 dr_status_mirror.
7119 (i386_initial_stuff): Clear dr_status_mirror and
7120 dr_control_mirror.
7121 (i386_get_thread_context): Adjust.
7122 (i386_set_thread_context): Adjust.
7123 (i386_thread_added): Adjust.
7124
5f21a75b
PA
71252010-08-24 Pedro Alves <pedro@codesourcery.com>
7126
7127 * linux-low.h (linux_thread_area): Delete declaration.
7128
3e4c1235
TS
71292010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7130
7131 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7132 after its termination.
7133
1971b033
PA
71342010-08-09 Pedro Alves <pedro@codesourcery.com>
7135
7136 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7137 (gdb_wants_all_stopped): Delete.
7138 (linux_wait_1): Don't call them.
7139 * server.c (handle_v_cont): Tag all threads as want-stopped.
7140 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7141 stopped as "client-wants-stopped".
7142
310444ac
PA
71432010-07-31 Pedro Alves <pedro@codesourcery.com>
7144
7145 * Makefile.in (signals_h): New.
7146 (server_h): Depend on it.
7147 (server.o): Don't depend on $(signals_def).
7148 (signals.o): Depend on $(signals_def).
7149
a19cae16
JK
71502010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7151
7152 * Makefile.in (signals_def): New.
7153 (server_h): Append include/gdb/signals.h and signals_def.
7154 (server.o): Append signals_def.
7155
30d50328
JK
71562010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7157
7158 * server.c (handle_target_event): Use target_signal_to_host for
7159 resume_info.sig initialization.
7160 * target.h (struct thread_resume) <sig>: New comment.
7161
5c3216e2
OS
71622010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7163
c6f46ca0
OS
7164 * server.c (handle_query): strcpy() the returned string from paddress()
7165 instead of sprintf().
5c3216e2
OS
7166 * utils.c (paddress): Return phex_nz().
7167
6bd31874
JB
71682010-07-07 Joel Brobecker <brobecker@adacore.com>
7169
7170 * server.c (handle_v_cont): Call mourn_inferior if process
7171 just exited.
7172 (myresume): Likewise.
7173
0fb4aa4b
PA
71742010-07-01 Pedro Alves <pedro@codesourcery.com>
7175
7176 Static tracepoints, and integration with UST.
7177
7178 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7179 * mem-break.c (uninsert_all_breakpoints)
7180 (reinsert_all_breakpoints): New.
7181 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7182 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7183 (gdb_agent_ust_loaded, helper_thread_id)
7184 (gdb_agent_helper_thread_id): New macros.
7185 (struct ipa_sym_addresses): Add addr_ust_loaded,
7186 addr_helper_thread_id, addr_cmd_buf.
7187 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7188 (in_process_agent_loaded_ust): New.
7189 (write_e_ust_not_loaded): New.
7190 (maybe_write_ipa_ust_not_loaded): New.
7191 (struct collect_static_trace_data_action): New.
7192 (enum tracepoint_type) <static_tracepoint>: New.
7193 (struct tracepoint) <handle>: Mention static tracepoints.
7194 (struct static_tracepoint_ctx): New.
7195 (CMD_BUF_SIZE): New.
7196 (add_tracepoint_action): Handle static tracepoint actions.
7197 (unprobe_marker_at): New.
7198 (clear_installed_tracepoints): Handle static tracepoints.
7199 (cmd_qtdp): Handle static tracepoints.
7200 (probe_marker_at): New.
7201 (cmd_qtstart): Handle static tracepoints.
7202 (response_tracepoint): Handle static tracepoints.
7203 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7204 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7205 (get_context_regcache): Handle static tracepoints.
7206 (do_action_at_tracepoint): Handle static tracepoint actions.
7207 (traceframe_find_block_type): Handle static trace data blocks.
7208 (traceframe_read_sdata): New.
7209 (download_tracepoints): Download static tracepoint actions.
7210 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7211 (GDB_PROBE_NAME): New.
7212 (ust_ops): New.
7213 (GET_UST_SYM): New.
7214 (USTF): New.
7215 (dlsym_ust): New.
7216 (ust_marker_to_static_tracepoint): New.
7217 (gdb_probe): New.
7218 (collect_ust_data_at_tracepoint): New.
7219 (gdb_ust_probe): New.
7220 (UNIX_PATH_MAX, SOCK_DIR): New.
7221 (gdb_ust_connect_sync_socket): New.
7222 (resume_thread, stop_thread): New.
7223 (run_inferior_command): New.
7224 (init_named_socket): New.
7225 (gdb_ust_socket_init): New.
7226 (cstr_to_hexstr): New.
7227 (next_st): New.
7228 (first_marker, next_marker): New.
7229 (response_ust_marker): New.
7230 (cmd_qtfstm, cmd_qtsstm): New.
7231 (unprobe_marker_at, probe_marker_at): New.
7232 (cmd_qtstmat, gdb_ust_thread): New.
7233 (gdb_ust_init): New.
7234 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7235 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7236 (ST_REGENTRY): New.
7237 (x86_64_st_collect_regmap): New.
7238 (X86_64_NUM_ST_COLLECT_GREGS): New.
7239 (AMD64_RIP_REGNUM): New.
7240 (supply_static_tracepoint_registers): New.
7241 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7242 (ST_REGENTRY): New.
7243 (i386_st_collect_regmap): New.
7244 (i386_NUM_ST_COLLECT_GREGS): New.
7245 (supply_static_tracepoint_registers): New.
7246 * server.c (handle_query): Handle qXfer:statictrace:read.
7247 <qSupported>: Report support for StaticTracepoints, and
7248 qXfer:statictrace:read features.
7249 * server.h (traceframe_read_sdata)
7250 (supply_static_tracepoint_registers): Declare.
7251 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7252 (unpack_varlen_hex): Include in IPA build.
7253 * Makefile.in (ustlibs, ustinc): New.
7254 (IPA_OBJS): Add remote-utils-ipa.o.
7255 ($(IPA_LIB)): Link -ldl and -lpthread.
7256 (UST_CFLAGS): New.
7257 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7258 * config.in, configure: Regenerate.
7259
9e4344e5
PA
72602010-06-20 Ian Lance Taylor <iant@google.com>
7261 Pedro Alves <pedro@codesourcery.com>
7262
7263 * linux-x86-low.c (always_true): Delete.
7264 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7265 trying to fool the compiler with always_true.
7266
c6beb2cb
PA
72672010-06-20 Pedro Alves <pedro@codesourcery.com>
7268
7269 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7270 conditions in gdbserver.
7271
d2ed6730
UW
72722010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7273
7274 * spu-low.c (spu_read_memory): Wrap around local store limit.
7275 (spu_write_memory): Likewise.
7276
4e29fb54
PA
72772010-06-15 Pedro Alves <pedro@codesourcery.com>
7278
7279 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7280 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7281 LONGEST uses.
7282 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7283 uses.
7284 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7285 uses with LONGEST uses.
7286
6a271cae
PA
72872010-06-14 Stan Shebs <stan@codesourcery.com>
7288 Pedro Alves <pedro@codesourcery.com>
7289
7290 Bytecode compiler.
7291
7292 * linux-x86-low.c: Include limits.h.
7293 (add_insns): New.
7294 (always_true): New.
7295 (EMIT_ASM): New.
7296 (EMIT_ASM32): New.
7297 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7298 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7299 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7300 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7301 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7302 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7303 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7304 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7305 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7306 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7307 (amd64_emit_void_call_2): New.
7308 (amd64_emit_ops): New.
7309 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7310 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7311 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7312 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7313 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7314 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7315 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7316 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7317 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7318 (i386_emit_stack_adjust, i386_emit_int_call_1)
7319 (i386_emit_void_call_2): New.
7320 (i386_emit_ops): New.
7321 (x86_emit_ops): New.
7322 (the_low_target): Install x86_emit_ops.
7323 * server.h (struct emit_ops): New.
7324 (get_raw_reg_func_addr): Declare.
7325 (current_insn_ptr, emit_error): Declare.
7326 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7327 (set_trace_state_variable_value): New defines.
7328 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7329 addr_get_trace_state_variable_value and
7330 addr_set_trace_state_variable_value.
7331 (symbol_list): New fields for get_raw_reg,
7332 get_trace_state_variable_value and set_trace_state_variable_value.
7333 (condfn): New typedef.
7334 (struct tracepoint): New field `compiled_cond'.
7335 (do_action_at_tracepoint): Clear compiled_cond.
7336 (get_trace_state_variable_value, set_trace_state_variable_value):
7337 Export in the IPA.
7338 (condition_true_at_tracepoint): If there's a compiled condition,
7339 run that.
7340 (current_insn_ptr, emit_error): New globals.
7341 (struct bytecode_address): New.
7342 (get_raw_reg_func_addr): New.
7343 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7344 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7345 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7346 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7347 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7348 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7349 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7350 (compile_tracepoint_condition, compile_bytecodes): New.
7351 * target.h (emit_ops): Forward declare.
7352 (struct target_ops): New field emit_ops.
7353 (target_emit_ops): New.
7354 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7355 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7356 * linux-low.c (linux_emit_ops): New.
7357 (linux_target_ops): Install it.
7358 * linux-low.h (struct linux_target_ops): New field emit_ops.
7359
92b72907
UW
73602010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7361
7362 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7363 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7364
fa593d66
PA
73652010-06-01 Pedro Alves <pedro@codesourcery.com>
7366 Stan Shebs <stan@codesourcery.com>
7367
7368 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7369 (all): Depend on $(extra_libraries).
7370 (install-only): Install the IPA.
7371 (IPA_OBJS, IPA_LIB): New.
7372 (clean): Remove the IPA lib.
7373 (IPAGENT_CFLAGS): New.
7374 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7375 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7376 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7377 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7378 * configure.ac: Check for atomic builtins support in the compiler.
7379 (IPA_DEPFILES, extra_libraries): Define.
7380 * configure.srv (ipa_obj): Add description.
7381 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7382 (i[34567]86-*-linux*): Set ipa_obj.
7383 (x86_64-*-linux*): Set ipa_obj.
7384 * linux-low.c (stabilizing_threads): New.
7385 (supports_fast_tracepoints): New.
7386 (linux_detach): Stabilize threads before detaching.
7387 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7388 the lwp is either not stabilizing, or is moving out of a jump pad.
7389 (linux_fast_tracepoint_collecting): New.
7390 (maybe_move_out_of_jump_pad): New.
7391 (enqueue_one_deferred_signal): New.
7392 (dequeue_one_deferred_signal): New.
7393 (linux_wait_for_event_1): If moving out of a jump pad, defer
7394 pending signals to later.
7395 (linux_stabilize_threads): New.
7396 (linux_wait_1): Check if threads need moving out of jump pads, and
7397 do it if so.
7398 (stuck_in_jump_pad_callback): New.
7399 (move_out_of_jump_pad_callback): New.
7400 (lwp_running): New.
7401 (linux_resume_one_lwp): Handle moving out of jump pads.
7402 (linux_set_resume_request): Dequeue deferred signals.
7403 (need_step_over_p): Also step over fast tracepoint jumps.
7404 (start_step_over): Also uninsert fast tracepoint jumps.
7405 (finish_step_over): Also reinsert fast tracepoint jumps.
7406 (linux_install_fast_tracepoint_jump): New.
7407 (linux_target_ops): Install linux_stabilize_threads and
7408 linux_install_fast_tracepoint_jump_pad.
7409 * linux-low.h (linux_target_ops) <get_thread_area,
7410 install_fast_tracepoint_jump_pad>: New fields.
7411 (struct lwp_info) <collecting_fast_tracepoint,
7412 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7413 (linux_get_thread_area): Declare.
7414 * linux-x86-low.c (jump_insn): New.
7415 (x86_get_thread_area): New.
7416 (append_insns): New.
7417 (push_opcode): New.
7418 (amd64_install_fast_tracepoint_jump_pad): New.
7419 (i386_install_fast_tracepoint_jump_pad): New.
7420 (x86_install_fast_tracepoint_jump_pad): New.
7421 (the_low_target): Install x86_get_thread_area and
7422 x86_install_fast_tracepoint_jump_pad.
7423 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7424 (struct fast_tracepoint_jump): New.
7425 (fast_tracepoint_jump_insn): New.
7426 (fast_tracepoint_jump_shadow): New.
7427 (find_fast_tracepoint_jump_at): New.
7428 (fast_tracepoint_jump_here): New.
7429 (delete_fast_tracepoint_jump): New.
7430 (set_fast_tracepoint_jump): New.
7431 (uninsert_fast_tracepoint_jumps_at): New.
7432 (reinsert_fast_tracepoint_jumps_at): New.
7433 (set_breakpoint_at): Use write_inferior_memory.
7434 (uninsert_raw_breakpoint): Use write_inferior_memory.
7435 (check_mem_read): Mask out fast tracepoint jumps.
7436 (check_mem_write): Mask out fast tracepoint jumps.
7437 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7438 (set_fast_tracepoint_jump): Declare.
7439 (delete_fast_tracepoint_jump)
7440 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7441 (reinsert_fast_tracepoint_jumps_at): Declare.
7442 * regcache.c: Don't compile many functions when building the
7443 in-process agent library.
7444 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7445 the register buffer in the heap.
7446 (free_register_cache): If the register buffer isn't owned by the
7447 regcache, don't free it.
7448 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7449 pre-existing register caches.
7450 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7451 type.
7452 (convert_ascii_to_int): : Constify `from' parameter type.
7453 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7454 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7455 the needed buffer in-place.
7456 (relocate_instruction): New.
7457 * server.c (handle_query) <qSymbols>: If the target supports
7458 tracepoints, give it a chance of looking up symbols. Report
7459 support for fast tracepoints.
7460 (handle_status): Stabilize threads.
7461 (process_serial_event): Adjust.
7462 * server.h (struct fast_tracepoint_jump): Forward declare.
7463 (struct process_info) <fast_tracepoint_jumps>: New field.
7464 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7465 (decode_X_packet, decode_M_packet): Adjust.
7466 (relocate_instruction): Declare.
7467 (in_process_agent_loaded): Declare.
7468 (tracepoint_look_up_symbols): Declare.
7469 (struct fast_tpoint_collect_status): Declare.
7470 (fast_tracepoint_collecting): Declare.
7471 (force_unlock_trace_buffer): Declare.
7472 (handle_tracepoint_bkpts): Declare.
7473 (initialize_low_tracepoint)
7474 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7475 * target.h (struct target_ops) <stabilize_threads,
7476 install_fast_tracepoint_jump_pad>: New fields.
7477 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7478 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7479 [HAVE_STDINT_H]: Include stdint.h.
7480 (trace_debug_1): Rename to ...
7481 (trace_vdebug): ... this.
7482 (trace_debug): Rename to ...
7483 (trace_debug_1): ... this. Add `level' parameter.
7484 (trace_debug): New.
7485 (ATTR_USED, ATTR_NOINLINE): New.
7486 (IP_AGENT_EXPORT): New.
7487 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7488 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7489 (about_to_request_buffer_space, trace_buffer_is_full)
7490 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7491 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7492 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7493 (traceframe_write_count, traceframes_created)
7494 (trace_state_variables)
7495 New renaming defines.
7496 (struct ipa_sym_addresses): New.
7497 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7498 (symbol_list): New.
7499 (ipa_sym_addrs): New.
7500 (all_tracepoint_symbols_looked_up): New.
7501 (in_process_agent_loaded): New.
7502 (write_e_ipa_not_loaded): New.
7503 (maybe_write_ipa_not_loaded): New.
7504 (tracepoint_look_up_symbols): New.
7505 (debug_threads) [IN_PROCESS_AGENT]: New.
7506 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7507 (UNKNOWN_SIDE_EFFECTS): New.
7508 (stop_tracing): New.
7509 (flush_trace_buffer): New.
7510 (stop_tracing_bkpt): New.
7511 (flush_trace_buffer_bkpt): New.
7512 (read_inferior_integer): New.
7513 (read_inferior_uinteger): New.
7514 (read_inferior_data_pointer): New.
7515 (write_inferior_data_pointer): New.
7516 (write_inferior_integer): New.
7517 (write_inferior_uinteger): New.
7518 (struct collect_static_trace_data_action): Delete.
7519 (enum tracepoint_type): New.
7520 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7521 <actions_str, step_actions, step_actions_str>: Only include in
7522 GDBserver.
fa593d66
PA
7523 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7524 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7525 (tracepoints): Use IP_AGENT_EXPORT.
7526 (last_tracepoint): Don't include in the IPA.
7527 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7528 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7529 (alloced_trace_state_variables): New.
7530 (trace_state_variables): Use IP_AGENT_EXPORT.
7531 (traceframe_t): Delete unused variable.
7532 (circular_trace_buffer): Don't include in the IPA.
7533 (trace_buffer_start): Delete.
7534 (struct trace_buffer_control): New.
7535 (trace_buffer_free): Delete.
7536 (struct ipa_trace_buffer_control): New.
7537 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7538 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7539 New.
7540 (trace_buffer_ctrl): New.
7541 (TRACE_BUFFER_CTRL_CURR): New.
7542 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7543 Reimplement as macros.
7544 (trace_buffer_wrap): Delete.
7545 (traceframe_write_count, traceframe_read_count)
7546 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7547 (struct tracepoint_hit_ctx) <type>: New field.
7548 (struct fast_tracepoint_ctx): New.
7549 (memory_barrier): New.
7550 (cmpxchg): New.
7551 (record_tracepoint_error): Update atomically in the IPA.
7552 (clear_inferior_trace_buffer): New.
7553 (about_to_request_buffer_space): New.
7554 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7555 updating the same buffer.
7556 (add_tracepoint): Default the tracepoint's type to trap
7557 tracepoint, and orig_size to -1.
7558 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7559 internal variables.
7560 (create_trace_state_variable): New parameter `gdb'. Handle it.
7561 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7562 (cmd_qtdp): Handle fast tracepoints.
7563 (cmd_qtdv): Adjust.
7564 (max_jump_pad_size): New.
7565 (gdb_jump_pad_head): New.
7566 (get_jump_space_head): New.
7567 (claim_jump_space): New.
7568 (sort_tracepoints): New.
7569 (MAX_JUMP_SIZE): New.
7570 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7571 IPA.
7572 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7573 support. Upload fast traceframes, and delete internal IPA
7574 breakpoints.
7575 (stop_tracing_handler): New.
7576 (flush_trace_buffer_handler): New.
7577 (cmd_qtstop): Upload fast tracepoints.
7578 (response_tracepoint): Handle fast tracepoints.
7579 (tracepoint_finished_step): Upload fast traceframes. Set the
7580 tracepoint hit context's tracepoint type.
7581 (handle_tracepoint_bkpts): New.
7582 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7583 type. Add comment about fast tracepoints.
7584 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7585 non-existing action_str field.
7586 (get_context_regcache): Handle fast tracepoints.
7587 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7588 to the regcache.
7589 (fast_tracepoint_from_jump_pad_address): New.
7590 (fast_tracepoint_from_ipa_tpoint_address): New.
7591 (collecting_t): New.
7592 (force_unlock_trace_buffer): New.
7593 (fast_tracepoint_collecting): New.
7594 (collecting): New.
7595 (gdb_collect): New.
7596 (write_inferior_data_ptr): New.
7597 (target_tp_heap): New.
7598 (target_malloc): New.
7599 (download_agent_expr): New.
7600 (UALIGN): New.
7601 (download_tracepoints): New.
7602 (download_trace_state_variables): New.
7603 (upload_fast_traceframes): New.
7604 (IPA_FIRST_TRACEFRAME): New.
7605 (IPA_NEXT_TRACEFRAME_1): New.
7606 (IPA_NEXT_TRACEFRAME): New.
7607 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7608 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7609 (gdb_jump_pad_buffer_end): New.
7610 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7611 (initialize_tracepoint): Adjust.
7612 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7613 buffer. Initialize the low module.
7614 * utils.c (PREFIX, TOOLNAME): New.
7615 (malloc_failure): Use PREFIX.
7616 (error): In the IPA, an error causes an exit.
7617 (fatal, warning): Use PREFIX.
7618 (internal_error): Use TOOLNAME.
7619 (NUMCELLS): Increase to 10.
7620 * configure, config.in: Regenerate.
7621
d149dd1d
PA
76222010-06-01 Pedro Alves <pedro@codesourcery.com>
7623
7624 * server.c (handle_query) <qSupported>: Do two passes over the
7625 qSupported string to avoid nesting strtok.
7626
f6528abd
JK
76272010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7628
7629 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7630 (CDEPS): New.
7631 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7632 -Wl,--dynamic-list.
7633 * configure: Regenerate.
7634 * proc-service.list: New.
7635
ca2a87a0
JK
76362010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7637
7638 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7639 New comment.
7640
363a6e9f
OS
76412010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7642
7643 * gdbreplay.c (remote_open): Check error return from socket() call by
7644 its equality to -1 not by it being negative.
7645 * remote-utils.c (remote_open): Likewise.
7646
d23b6cb1
PA
76472010-05-23 Pedro Alves <pedro@codesourcery.com>
7648
7649 * config.h: Regenerate.
7650
28d3cf85
MK
76512010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7652
7653 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7654 doesn't provide PTRACE_GET_THREAD_AREA.
7655
fea36a59
MK
76562010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7657
7658 * linux-m68k-low.c: Include <asm/ptrace.h>
7659 (ps_get_thread_area): Implement.
7660
24b066ba
DE
76612010-05-03 Doug Evans <dje@google.com>
7662
7663 * event-loop.c (struct callback_event): New struct.
7664 (callback_list): New global.
7665 (append_callback_event, delete_callback_event): New functions.
7666 (process_callback): New function.
7667 (start_event_loop): Call it.
7668 * remote-utils.c (NOT_SCHEDULED): Define.
7669 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7670 moved out of readchar.
7671 (readchar): Rewrite. Call reschedule before returning.
7672 (reset_readchar): New function.
7673 (remote_close): Call it.
7674 (process_remaining, reschedule): New functions.
7675 * server.h (callback_handler_func): New typedef.
7676 (append_callback_event, delete_callback_event): Declare.
7677
9836d6ea
PA
76782010-05-03 Pedro Alves <pedro@codesourcery.com>
7679
7680 * proc-service.c (ps_pglobal_lookup): Use
7681 thread_db_look_up_one_symbol.
7682 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7683 parameter. Use it instead of all_symbols_looked_up.
7684 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7685 field.
7686 (all_symbols_looked_up): Don't declare.
7687 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7688 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7689 field.
7690 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7691 Set all_symbols_looked_up here.
7692 (thread_db_look_up_one_symbol): New.
7693 (thread_db_get_tls_address): Adjust.
7694 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7695 thread_db object on the heap, and tentatively set it in the
7696 process structure.
7697 (thread_db_init): Don't set all_symbols_looked_up here.
7698 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7699
7984d532
PA
77002010-05-03 Pedro Alves <pedro@codesourcery.com>
7701
7702 * linux-low.c (linux_kill, linux_detach): Adjust.
7703 (status_pending_p_callback): Remove redundant statement. Check
7704 for !TARGET_WAITIKIND_IGNORE, instead of
7705 TARGET_WAITKIND_STOPPED.
7706 (handle_tracepoints): Make sure LWP is locked. Adjust.
7707 (linux_wait_for_event_1): Adjust.
7708 (linux_cancel_breakpoints): New.
7709 (unsuspend_one_lwp): New.
7710 (unsuspend_all_lwps): New.
7711 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7712 (send_sigstop_callback): Change return type to int, add new
7713 `except' parameter and handle it.
7714 (suspend_and_send_sigstop_callback): New.
7715 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7716 pass them down. If SUSPEND, also increment the lwp's suspend
7717 count.
7718 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7719 (need_step_over_p): Don't consider suspended LWPs.
7720 (start_step_over): Adjust.
7721 (proceed_one_lwp): Change return type to int, add new `except'
7722 parameter and handle it.
7723 (unsuspend_and_proceed_one_lwp): New.
7724 (proceed_all_lwps): Use find_inferior instead of
7725 for_each_inferior.
7726 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7727 also decrement the suspend count of LWPs. Pass `except' down,
7728 instead of hacking its suspend count.
7729 (linux_pause_all): Add `freeze' parameter. Adjust.
7730 (linux_unpause_all): New.
7731 (linux_target_ops): Install linux_unpause_all.
7732 * server.c (handle_status): Adjust.
7733 * target.h (struct target_ops): New fields `unpause_all' and
7734 `cancel_breakpoints'. Add new parameter to `pause_all'.
7735 (pause_all): Add new `freeze' parameter.
7736 (unpause_all): New.
7737 (cancel_breakpoints): New.
7738 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7739 cancel breakpoints.
7740 (cmd_qtstart): Pause threads.
7741 (stop_tracing): Pause threads, and cancel breakpoints.
7742 * win32-low.c (win32_target_ops): Adjust.
7743
e471f25b
PA
77442010-05-03 Pedro Alves <pedro@codesourcery.com>
7745
7746 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7747 the inferior right away from here...
7748 (linux_wait_1): ... to here, and adjust to check the thread's
7749 last_resume_kind instead of the lwp's step or stop_expected flags.
7750
1915ef4f
PA
77512010-05-02 Pedro Alves <pedro@codesourcery.com>
7752
7753 * README: Use consistent `GDB' and `GDBserver' spellings.
7754
f9e39928
PA
77552010-05-02 Pedro Alves <pedro@codesourcery.com>
7756
7757 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7758 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7759 (linux_detach_one_lwp): Assume the lwp is stopped.
7760 (any_thread_of): Delete.
7761 (linux_detach): Stop all lwps here. Don't blindly delete all
7762 breakpoints.
7763 (delete_lwp_callback): New.
7764 (linux_mourn): Delete all lwps of the process that is gone.
7765 (linux_wait_1): Don't delete the last lwp of the process here.
7766 * mem-break.h (mark_breakpoints_out): Declare.
7767 * mem-break.c (mark_breakpoints_out): New.
7768 (free_all_breakpoints): Use it.
7769 * server.c (handle_target_event): If the process is gone, mark
7770 breakpoints out.
7771 * thread-db.c (struct thread_db) <create_bp>: New field.
7772 (thread_db_enable_reporting): Fix prototype. Store a thread event
7773 breakpoint reference in the thread_db struct.
7774 (thread_db_load_search): Clear the thread_db object.
7775 (try_thread_db_load_1): Ditto.
7776 (switch_to_process): New.
7777 (disable_thread_event_reporting): Use it.
7778 (remove_thread_event_breakpoints): New.
7779 (thread_db_detach, thread_db_mourn): Use it.
7780
1e7fc18c
PA
77812010-05-01 Pedro Alves <pedro@codesourcery.com>
7782
7783 * linux-low.c (linux_enable_event_reporting): New.
7784 (linux_wait_for_event_1, handle_extended_wait): Use it.
7785
02fc4de7
PA
77862010-04-30 Pedro Alves <pedro@codesourcery.com>
7787
7788 * linux-low.c (linux_kill_one_lwp, linux_kill)
7789 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7790 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7791 SIGSTOP even if the LWP is stopped.
7792 (send_sigstop_callback): New.
7793 (stop_all_lwps): Use send_sigstop_callback instead.
7794 (linux_resume_one_thread): Adjust.
7795 (proceed_one_lwp): Still proceed an LWP that the client has
7796 requested to stop, if we haven't reported it as stopped yet. Make
7797 sure that LWPs the client want stopped, have a pending SIGSTOP.
7798
bc3b5632
DE
77992010-04-26 Doug Evans <dje@google.com>
7800
ae1ada35
DE
7801 * server.c (handle_general_set): Make static.
7802
bc3b5632
DE
7803 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7804 Print received char after testing for error/eof instead of before.
7805 (input_interrupt): Tweak comment.
7806
65730243
DE
78072010-04-23 Doug Evans <dje@google.com>
7808
7809 * server.c (start_inferior): Print inferior argv if --debug.
7810
a8ae7dc0
AR
78112010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7812
7813 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7814 * nto-x86-low.c: Include server.h
7815
1c07cc19
PM
78162010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7817
7818 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7819 be consistent with other sources of this directory.
7820 (init_registers_amd64): Correct name of source file of this function
7821 in the comment.
7822
e0a61e09
PM
78232010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7824
7825 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7826 64-bit executables.
7827
54709339
PM
78282010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7829
7830 * win32-i386-low.c: Add 64-bit support.
7831 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7832 (init_registers_amd64): Declare.
7833 (mappings): Add 64-bit version of array.
7834 (init_windows_x86): New function.
7835 (the_low_target): Change init_arch field to init_windows_x86.
7836
e8f0053d
PM
78372010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7838
7839 * win32-low.c: Adapt to support also 64-bit architecture.
7840 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7841 (get_image_name): Use SIZE_T type for local variable `done'.
7842 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7843 (toolhelp_get_dll_name): Idem.
7844 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7845 Use uintptr_t typecast to avoid warning.
7846 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7847 (handle_exception): Use phex_nz to avoid warning.
7848 (win32_wait): Remove unused local variable `process'.
7849
c481e77e
PM
78502010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7851
7852 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7853 `amd64-avx.o'.
7854
12ea4b69
PM
78552010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7856
7857 * configure.ac: Use `ws2_32' library for srv_mingw.
7858 * configure: Regenerate.
7859 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7860 * remote-utils.c: Likewise.
7861
f6d1620c
L
78622010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7863
7864 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7865 if __x86_64__ is defined.
7866
8e642873
PM
78672010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7868
7869 * configure: Regenerate.
7870
711e434b
PM
78712010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7872
7873 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7874 * target.h (target_ops): New get_tib_address field.
7875 * win32-low.h (win32_thread_info): Add thread_local_base field.
7876 * win32-low.c (child_add_thread): Add tlb argument.
7877 Set thread_local_base field to TLB.
7878 (get_child_debug_event): Adapt to child_add_thread change.
7879 (win32_get_tib_address): New function.
7880 (win32_target_ops): Set get_tib_address field to
7881 win32_get_tib_address.
7882 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7883
505106cd
PA
78842010-04-12 Pedro Alves <pedro@codesourcery.com>
7885
505106cd
PA
7886 * linux-low.c (linux_mourn): Also remove the process.
7887 * server.c (handle_target_event): Don't remove the process here.
7888 * nto-low.c (nto_mourn): New.
7889 (nto_target_ops): Install it.
7890 * spu-low.c (spu_mourn): New.
7891 (spu_target_ops): Install it.
7892 * win32-low.c (win32_mourn): New.
7893 (win32_target_ops): Install it.
7894
e8470a06
PA
78952010-04-12 Pedro Alves <pedro@codesourcery.com>
7896
7897 * server.h (buffer_xml_printf): Remove redundant `;'.
7898
45ba0d02
PA
78992010-04-12 Pedro Alves <pedro@codesourcery.com>
7900
7901 * regcache.c (set_register_cache): Invalidate regcaches before
7902 changing the register cache layout.
7903 (regcache_invalidate_one): Allow a NULL regcache.
7904 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7905 regcaches before changing the register cache layout or the target
7906 regsets.
7907
59e04013
L
79082010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7909
7910 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7911 variable warning on Linux/x86-64.
7912
8336d594
PA
79132010-04-11 Pedro Alves <pedro@codesourcery.com>
7914
7915 GDBserver disconnected tracing support.
7916
7917 * linux-low.c (linux_remove_process): Delete.
7918 (add_lwp): Don't set last_resume_kind here.
7919 (linux_kill): Use `mourn'.
7920 (linux_detach): Use `thread_db_detach', and `mourn'.
7921 (linux_mourn): New.
7922 (linux_attach_lwp_1): Adjust comment.
7923 (linux_attach): last_resume_kind moved the thread_info; adjust.
7924 (status_pending_p_callback): Adjust.
7925 (linux_wait_for_event_1): Adjust.
7926 (count_events_callback, select_singlestep_lwp_callback)
7927 (select_event_lwp_callback, cancel_breakpoints_callback)
7928 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7929 (proceed_one_lwp): Adjust.
7930 (linux_async): Add debug output.
7931 (linux_thread_stopped): New.
7932 (linux_pause_all): New.
7933 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7934 linux_pause_all.
7935 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7936 (thread_db_free): Delete declaration.
7937 (thread_db_detach, thread_db_mourn): Declare.
7938 * thread-db.c (thread_db_init): Use thread_db_mourn.
7939 (thread_db_free): Delete, split in two.
7940 (disable_thread_event_reporting): New.
7941 (thread_db_detach): New.
7942 (thread_db_mourn): New.
7943
7944 * server.h (struct thread_info) <last_resume_kind>: New field.
7945 <attached>: Add comment.
7946 <gdb_detached>: New field.
7947 (handler_func): Change return type to int.
7948 (handle_serial_event, handle_target_event): Ditto.
7949 (gdb_connected): Declare.
7950 (tracing): Delete.
7951 (disconnected_tracing): Declare.
7952 (stop_tracing): Declare.
7953
7954 * server.c (handle_query) <qSupported>: Report support for
7955 disconnected tracing.
7956 (queue_stop_reply_callback): Account for running threads.
7957 (gdb_wants_thread_stopped): New.
7958 (gdb_wants_all_threads_stopped): New.
7959 (gdb_reattached_process): New.
7960 (handle_status): Clear the `gdb_detached' flag of all processes.
7961 In all-stop, stop all threads.
7962 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7963 (process_serial_event): If the remote connection breaks, or if an
7964 exit was forced with "monitor exit", force an event loop exit.
7965 Handle disconnected tracing on detach.
7966 (handle_serial_event): Adjust.
7967 (handle_target_event): If GDB isn't connected, forward events back
7968 to the inferior, unless the last process exited, in which case,
7969 exit gdbserver. Adjust interface.
7970
7971 * remote-utils.c (remote_open): Don't block in accept. Instead
7972 register an event loop source on the listen socket file
7973 descriptor. Refactor bits into ...
7974 (listen_desc): ... this new global.
7975 (gdb_connected): ... this new function.
7976 (enable_async_notification): ... this new function.
7977 (handle_accept_event): ... this new function.
7978 (remote_close): Clear remote_desc.
7979
7980 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7981
7982 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7983 New fields.
7984 (mourn_inferior): Define.
7985 (target_process_qsupported): Avoid the dangling else problem.
7986 (thread_stopped): Define.
7987 (pause_all): Define.
7988 (target_waitstatus_to_string): Declare.
7989 * target.c (target_waitstatus_to_string): New.
7990
7991 * tracepoint.c (tracing): Make extern.
7992 (disconnected_tracing): New.
7993 (stop_tracing): Make extern. Handle tracing stops due to GDB
7994 disconnecting.
7995 (cmd_qtdisconnected): New.
7996 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7997 (handle_tracepoint_general_set): Handle QTDisconnected.
7998
7999 * event-loop.c (event_handler_func): Change return type to int.
8000 (process_event): Bail out if the event handler wants the event
8001 loop to stop.
8002 (handle_file_event): Ditto.
8003 (start_event_loop): Bail out if the event handler wants the event
8004 loop to stop.
8005
8006 * nto-low.c (nto_target_ops): Adjust.
8007 * spu-low.c (spu_wait): Don't remove the process here.
8008 (spu_target_ops): Adjust.
8009 * win32-low.c (win32_wait): Don't remove the process here.
8010 (win32_target_ops): Adjust.
8011
5d267c4c
PA
80122010-04-11 Pedro Alves <pedro@codesourcery.com>
8013
8014 * regcache.c (realloc_register_cache): Invalidate inferior's
8015 regcache before recreating it.
8016
623ccd72
PA
80172010-04-09 Pedro Alves <pedro@codesourcery.com>
8018
8019 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
8020
219f2f23
PA
80212010-04-09 Stan Shebs <stan@codesourcery.com>
8022 Pedro Alves <pedro@codesourcery.com>
8023
8024 * server.h (LONGEST): New.
8025 (struct thread_info) <while_stepping>: New field.
8026 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
8027 Declare.
8028 (initialize_tracepoint, handle_tracepoint_general_set)
8029 (handle_tracepoint_query, tracepoint_finished_step)
8030 (tracepoint_was_hit, release_while_stepping_state_list):
8031 (current_traceframe): Declare.
8032 * server.c (handle_general_set): Handle tracepoint packets.
8033 (read_memory): New.
8034 (write_memory): New.
8035 (handle_search_memory_1): Use read_memory.
8036 (handle_query): Report support for conditional tracepoints, trace
8037 state variables, and tracepoint sources. Handle tracepoint
8038 queries.
8039 (main): Initialize the tracepoints module.
8040 (process_serial_event): Handle traceframe reads/writes.
8041
8042 * linux-low.c (handle_tracepoints): New.
8043 (linux_wait_1): Call it.
8044 (linux_resume_one_lwp): Handle while-stepping.
8045 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
8046 (linux_target_ops): Install them.
8047 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
8048 New field.
8049 * linux-x86-low.c (x86_supports_tracepoints): New.
8050 (the_low_target). Install it.
8051
8052 * mem-break.h (delete_breakpoint): Declare.
8053 * mem-break.c (delete_breakpoint): Make external.
8054
8055 * target.h (struct target_ops): Add `supports_tracepoints',
8056 `read_pc', and `write_pc' fields.
8057 (target_supports_tracepoints): Define.
8058 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
8059 (phex_nz): New.
8060
8061 * regcache.h (struct regcache) <registers_owned>: New field.
8062 (init_register_cache, regcache_cpy): Declare.
8063 (regcache_read_pc, regcache_write_pc): Declare.
8064 (register_cache_size): Declare.
8065 (supply_regblock): Declare.
8066 * regcache.c (init_register_cache): New.
8067 (new_register_cache): Use it.
8068 (regcache_cpy): New.
8069 (register_cache_size): New.
8070 (supply_regblock): New.
8071 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8072
219f2f23
PA
8073 * tracepoint.c: New.
8074
8075 * Makefile.in (OBS): Add tracepoint.o.
8076 (tracepoint.o): New rule.
8077
3a13a53b
L
80782010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8079
8080 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8081 (i386-mmx.o): New.
8082 (i386-mmx.c): Likewise.
8083 (i386-mmx-linux.o): Likewise.
8084 (i386-mmx-linux.c): Likewise.
8085
8086 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8087 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8088 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8089 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8090
8091 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8092 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8093 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8094
1570b33e
L
80952010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8096
8097 * Makefile.in (clean): Updated.
8098 (i386-avx.o): New.
8099 (i386-avx.c): Likewise.
8100 (i386-avx-linux.o): Likewise.
8101 (i386-avx-linux.c): Likewise.
8102 (amd64-avx.o): Likewise.
8103 (amd64-avx.c): Likewise.
8104 (amd64-avx-linux.o): Likewise.
8105 (amd64-avx-linux.c): Likewise.
8106
8107 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8108 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8109 (srv_amd64_regobj): Add amd64-avx.o.
8110 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8111 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8112 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8113 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8114 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8115 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8116 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8117
8118 * i387-fp.c: Include "i386-xstate.h".
8119 (i387_xsave): New.
8120 (i387_cache_to_xsave): Likewise.
8121 (i387_xsave_to_cache): Likewise.
8122 (x86_xcr0): Likewise.
8123
8124 * i387-fp.h (i387_cache_to_xsave): Likewise.
8125 (i387_xsave_to_cache): Likewise.
8126 (x86_xcr0): Likewise.
8127
8128 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8129 * linux-crisv32-low.c (target_regsets): Likewise.
8130 * linux-m68k-low.c (target_regsets): Likewise.
8131 * linux-mips-low.c (target_regsets): Likewise.
8132 * linux-ppc-low.c (target_regsets): Likewise.
8133 * linux-s390-low.c (target_regsets): Likewise.
8134 * linux-sh-low.c (target_regsets): Likewise.
8135 * linux-sparc-low.c (target_regsets): Likewise.
8136 * linux-xtensa-low.c (target_regsets): Likewise.
8137
8138 * linux-low.c: Include <sys/uio.h>.
8139 (regsets_fetch_inferior_registers): Support nt_type.
8140 (regsets_store_inferior_registers): Likewise.
8141 (linux_process_qsupported): New.
8142 (linux_target_ops): Add linux_process_qsupported.
8143
8144 * linux-low.h (regset_info): Add nt_type.
8145 (linux_target_ops): Add process_qsupported.
8146
8147 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8148 and <sys/uio.h>.
8149 (init_registers_i386_avx_linux): New.
8150 (init_registers_amd64_avx_linux): Likewise.
8151 (xmltarget_i386_linux_no_xml): Likewise.
8152 (xmltarget_amd64_linux_no_xml): Likewise.
8153 (PTRACE_GETREGSET): Likewise.
8154 (PTRACE_SETREGSET): Likewise.
8155 (x86_fill_xstateregset): Likewise.
8156 (x86_store_xstateregset): Likewise.
8157 (use_xml): Likewise.
8158 (x86_linux_update_xmltarget): Likewise.
8159 (x86_linux_process_qsupported): Likewise.
8160 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8161 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8162 init_registers_i386_linux here. Call
8163 x86_linux_update_xmltarget.
8164 (the_low_target): Add x86_linux_process_qsupported.
8165
8166 * server.c (handle_query): Call target_process_qsupported.
8167
8168 * target.h (target_ops): Add process_qsupported.
8169 (target_process_qsupported): New.
8170
fc7238bb
PA
81712010-04-03 Pedro Alves <pedro@codesourcery.com>
8172
8173 * inferiors.c (add_thread): Set last_status kind to
8174 TARGET_WAITKIND_IGNORE.
8175 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8176 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8177 (linux_wait_1): Move `thread' local definition to block that uses
8178 it. Don't NULL initialize `event_child'.
8179 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8180 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8181 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8182
bdabb078
PA
81832010-04-01 Pedro Alves <pedro@codesourcery.com>
8184
8185 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8186 an extended waitstatus, or by a watchpoint.
8187 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8188 thread was stepping or has been stopped by a watchpoint.
8189
d3bbe7a0
PA
81902010-04-01 Pedro Alves <pedro@codesourcery.com>
8191
8192 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8193 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8194 of another, then delete the previous, and validate all
8195 breakpoints.
8196 (validate_inserted_breakpoint): New.
8197 (delete_disabled_breakpoints): New.
8198 (validate_breakpoints): New.
8199 (check_mem_read): Validate breakpoints before trusting their
8200 shadow. Delete disabled breakpoints.
8201 (check_mem_write): Validate breakpoints before trusting they
8202 should be inserted. Delete disabled breakpoints.
8203 * mem-break.h (validate_breakpoints):
8204 * server.c (handle_query): Validate breakpoints when we see a
8205 qSymbol query.
8206
8b07ae33
PA
82072010-04-01 Pedro Alves <pedro@codesourcery.com>
8208
8209 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8210 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8211 if we could tell there's a GDB breakpoint at stop_pc.
8212 (need_step_over_p): Don't do a step over if we find a GDB
8213 breakpoint at the resume PC.
8214
8215 * mem-break.c (struct raw_breakpoint): New.
8216 (enum bkpt_type): New type `gdb_breakpoint'.
8217 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8218 fields. New field `raw'.
8219 (find_raw_breakpoint_at): New.
8220 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8221 breakpoint instead.
8222 (set_breakpoint_at): Adjust.
8223 (delete_raw_breakpoint): New.
8224 (release_breakpoint): New.
8225 (delete_breakpoint): Rename to...
8226 (delete_breakpoint_1): ... this. Add proc parameter. Use
8227 release_breakpoint. Return ENOENT.
8228 (delete_breakpoint): Reimplement.
8229 (find_breakpoint_at): Delete.
8230 (find_gdb_breakpoint_at): New.
8231 (delete_breakpoint_at): Delete.
8232 (set_gdb_breakpoint_at): New.
8233 (delete_gdb_breakpoint_at): New.
8234 (gdb_breakpoint_here): New.
8235 (set_reinsert_breakpoint): Use release_breakpoint.
8236 (uninsert_breakpoint): Rename to ...
8237 (uninsert_raw_breakpoint): ... this.
8238 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8239 (reinsert_raw_breakpoint): Change parameter type to
8240 raw_breakpoint.
8241 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8242 instead.
8243 (check_breakpoints): Adjust. Use release_breakpoint.
8244 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8245 (breakpoint_inserted_here): Ditto.
8246 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8247 Don't trust the breakpoint's shadow if it is not inserted.
8248 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8249 (delete_all_breakpoints): Adjust.
8250 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8251 use delete_breakpoint_1.
8252
8253 * mem-break.h (breakpoints_supported): Delete declaration.
8254 (set_gdb_breakpoint_at): Declare.
8255 (gdb_breakpoint_here): Declare.
8256 (delete_breakpoint_at): Delete.
8257 (delete_gdb_breakpoint_at): Declare.
8258
8259 * server.h (struct raw_breakpoint): Forward declare.
8260 (struct process_info): New field `raw_breakpoints'.
8261
8262 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8263 breakpoints.
8264
6bf5e0ba
PA
82652010-03-24 Pedro Alves <pedro@codesourcery.com>
8266
8267 * linux-low.c (status_pending_p_callback): Fix comment.
8268 (linux_wait_for_event_1): Move most of the internal breakpoint
8269 handling from here...
8270 (linux_wait_1): ... to here.
8271 (count_events_callback): New.
8272 (select_singlestep_lwp_callback): New.
8273 (select_event_lwp_callback): New.
8274 (cancel_breakpoints_callback): New.
8275 (select_event_lwp): New.
8276 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8277 priority to all LWPs that have had events that should be reported
8278 to the client. Cancel breakpoints when about to reporting the
8279 event to the client, not while stopping lwps. No longer cancel
8280 finished single-steps here.
8281 (cancel_finished_single_step): Delete.
8282 (cancel_finished_single_steps): Delete.
8283
414a389f
PA
82842010-03-24 Pedro Alves <pedro@codesourcery.com>
8285
8286 * mem-break.c (enum bkpt_type): New.
8287 (struct breakpoint): New field `type'.
8288 (set_breakpoint_at): Change return type to struct breakpoint
8289 pointer. Set type to `other_breakpoint' by default.
8290 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8291 in the breakpoint list.
8292 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8293 (reinsert_breakpoint): Rename to ...
8294 (reinsert_raw_breakpoint): ... this.
8295 (reinsert_breakpoints_at): Adjust.
8296 * mem-break.h (struct breakpoint): Declare.
8297 (set_breakpoint_at): Change return type to struct breakpoint
8298 pointer.
8299
2280c721
PA
83002010-03-24 Pedro Alves <pedro@codesourcery.com>
8301
8302 * server.c (handle_query): Assign, not compare.
8303
d50171e4
PA
83042010-03-24 Pedro Alves <pedro@codesourcery.com>
8305
8306 Teach linux gdbserver to step-over-breakpoints.
8307
8308 * linux-low.c (can_hardware_single_step): New.
8309 (supports_breakpoints): New.
8310 (handle_extended_wait): If stopping threads, read the stop pc of
8311 the new cloned LWP.
8312 (get_pc): New.
8313 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8314 low target doesn't support retrieving the PC.
8315 (add_lwp): Set last_resume_kind to resume_continue.
8316 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8317 (linux_attach): Don't clear stop_expected. Set the lwp's
8318 last_resume_kind to resume_stop.
8319 (linux_detach_one_lwp): Don't check for removed breakpoints.
8320 (check_removed_breakpoint): Delete.
8321 (status_pending_p): Rename to ...
8322 (status_pending_p_callback): ... this. Don't check for removed
8323 breakpoints. Don't consider threads that are stopped from GDB's
8324 perspective.
8325 (linux_wait_for_lwp): Always read the stop_pc here.
8326 (cancel_breakpoint): New.
8327 (step_over_bkpt): New global.
8328 (linux_wait_for_event_1): Implement stepping over breakpoints.
8329 (gdb_wants_lwp_stopped): New.
8330 (gdb_wants_all_stopped): New.
8331 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8332 single-step traps here. Store the thread's last reported target
8333 wait status.
8334 (send_sigstop): Don't clear stop_expected. Always set it,
8335 instead.
8336 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8337 (cancel_finished_single_step): New.
8338 (cancel_finished_single_steps): New.
8339 (wait_for_sigstop): Don't cancel finished single-step traps here.
8340 (linux_resume_one_lwp): Don't check for removed breakpoints.
8341 Don't set `step' on non-hardware step archs.
8342 (linux_set_resume_request): Ignore resume_stop requests if already
8343 stopping or stopped. Set the lwp's last_resume_kind.
8344 (resume_status_pending_p): Don't check for removed breakpoints.
8345 (need_step_over_p): New.
8346 (start_step_over): New.
8347 (finish_step_over): New.
8348 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8349 requests. Clear the thread's last reported target waitstatus.
8350 Don't use the `suspended' flag. Don't consider pending breakpoints.
8351 (linux_resume): Start a step-over if necessary.
8352 (proceed_one_lwp): New.
8353 (proceed_all_lwps): New.
8354 (unstop_all_lwps): New.
8355 * linux-low.h (struct lwp_info): Rewrite comment for the
8356 `suspended' flag. Add the `stop_pc' field. Delete the
8357 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8358 Add `'last_resume_kind' and `need_step_over' fields.
8359 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8360 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8361 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8362 (set_raw_breakpoint_at): New.
8363 (set_breakpoint_at): Rewrite to use it.
8364 (reinsert_breakpoint_handler): Delete.
8365 (set_reinsert_breakpoint): New.
8366 (reinsert_breakpoint_by_bp): Delete.
8367 (delete_reinsert_breakpoints): New.
8368 (uninsert_breakpoint): Rewrite.
8369 (uninsert_breakpoints_at): New.
8370 (reinsert_breakpoint): Rewrite.
8371 (reinsert_breakpoints_at): New.
8372 (check_breakpoints): Rewrite.
8373 (breakpoint_here): New.
8374 (breakpoint_inserted_here): New.
8375 (check_mem_read): Adjust.
8376 * mem-break.h (breakpoints_supported, breakpoint_here)
8377 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8378 (reinsert_breakpoint_by_bp): Delete declaration.
8379 (delete_reinsert_breakpoints): Declare.
8380 (reinsert_breakpoint): Delete declaration.
8381 (reinsert_breakpoints_at): Declare.
8382 (uninsert_breakpoint): Delete declaration.
8383 (uninsert_breakpoints_at): Declare.
8384 (check_breakpoints): Adjust prototype.
8385 * server.h: Adjust include order.
8386 (struct thread_info): Declare here. Add a `last_status' field.
8387
30ba68cb
MS
83882010-03-23 Michael Snyder <msnyder@vmware.com>
8389
8390 * server.c (crc32): New function.
8391 (handle_query): Add handling for 'qCRC:' request.
8392
b9a881c2
PA
83932010-03-23 Pedro Alves <pedro@codesourcery.com>
8394
8395 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8396 lwp had been stopped by a watchpoint.
8397
e92d13d5
PA
83982010-03-16 Pedro Alves <pedro@codesourcery.com>
8399
8400 * server.h (internal_error): Declare.
8401 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8402 * utils.c (internal_error): New function.
8403
64daa791
AS
84042010-03-15 Andreas Schwab <schwab@redhat.com>
8405
8406 * configure.srv: Fix typo setting srv_regobj.
8407
f52cd8cd
PA
84082010-03-15 Pedro Alves <pedro@codesourcery.com>
8409
8410 * linux-low.c (fetch_register): Avoid passing a non string literal
8411 format to `error'.
8412 (usr_store_inferior_registers): Ditto.
8413
93ae6fdc
PA
84142010-03-14 Pedro Alves <pedro@codesourcery.com>
8415
8416 * linux-low.c (linux_write_memory): Bail out early if peeking
8417 memory failed.
8418
c3adc08c
PA
84192010-03-14 Pedro Alves <pedro@codesourcery.com>
8420
8421 * linux-low.h (struct lwp_info): New fields
8422 `stopped_by_watchpoint' and `stopped_data_address'.
8423 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8424 here, and cache them in the lwp object.
8425 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8426 directly.
8427 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8428 field.
8429 (linux_stopped_by_watchpoint): Rewrite.
8430 (linux_stopped_data_address): Rewrite.
8431
bce522a2
PA
84322010-03-06 Simo Melenius <simo.melenius@iki.fi>
8433
8434 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8435 switching the current inferior, not before.
8436
90884b2b
L
84372010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8438
8439 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8440 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8441 i386-linux.c and amd64-linux.c.
8442 (reg-i386.o): Removed.
8443 (reg-i386.c): Likewise.
8444 (reg-i386-linux.o): Likewise.
8445 (reg-i386-linux.c): Likewise.
8446 (reg-x86-64.o): Likewise.
8447 (reg-x86-64.c): Likewise.
8448 (reg-x86-64-linux.o): Likewise.
8449 (reg-x86-64-linux.c): Likewise.
8450 (i386.o): New.
8451 (i386.c): Likewise.
8452 (i386-linux.o): Likewise.
8453 (i386-linux.c): Likewise.
8454 (amd64.o): Likewise.
8455 (amd64.c): Likewise.
8456 (amd64-linux.o): Likewise.
8457 (amd64-linux.c): Likewise.
8458
8459 * configure.srv (srv_i386_regobj): New.
8460 (srv_i386_linux_regobj): Likewise.
8461 (srv_amd64_regobj): Likewise.
8462 (srv_amd64_linux_regobj): Likewise.
8463 (srv_i386_32bit_xmlfiles): Likewise.
8464 (srv_i386_64bit_xmlfiles): Likewise.
8465 (srv_i386_xmlfiles): Likewise.
8466 (srv_amd64_xmlfiles): Likewise.
8467 (srv_i386_linux_xmlfiles): Likewise.
8468 (srv_amd64_linux_xmlfiles): Likewise.
8469 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8470 srv_xmlfiles to $srv_i386_xmlfiles.
8471 (i[34567]86-*-mingw32ce*): Likewise.
8472 (i[34567]86-*-mingw*): Likewise.
8473 (i[34567]86-*-nto*): Likewise.
8474 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8475 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8476 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8477 (x86_64-*-linux*): Likewise.
8478
8479 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8480 (init_registers_amd64_linux): New.
8481 (x86_arch_setup): Replace init_registers_x86_64_linux with
8482 init_registers_amd64_linux.
8483
193f13e6
MK
84842010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8485
8486 * configure.ac: Check for libdl. If it is not available link against
8487 static libthread_db.
8488 * configure: Regenerate.
8489
85d721b8
PA
84902010-02-22 Pedro Alves <pedro@codesourcery.com>
8491
8492 PR9605
8493
8494 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8495 handing a read watchpoint.
8496 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8497
6076632b
DE
84982010-02-12 Doug Evans <dje@google.com>
8499
8500 * linux-low.c (linux_supports_tracefork_flag): Document.
8501 (linux_look_up_symbols): Add comment.
8502
3327ccf7
L
85032010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8504
8505 * regcache.c (supply_register): Clear regcache if buf is NULL.
8506
0718675c 85072010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8508 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8509
8510 * inferiors.c (find_inferior): Add function documentation.
8511 (unloaded_dll): Handle the case where the unloaded dll has not
8512 been previously registered in the dll list.
8513
177321bd
DJ
85142010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8515
8516 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8517 (thumb2_breakpoint): New.
8518 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8519
2b009048
DJ
85202010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8521
8522 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8523 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8524 breakpoints.
8525
3be029c7
PA
85262010-01-21 Pedro Alves <pedro@codesourcery.com>
8527
8528 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8529
18f5de3b
JK
85302010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8531
8532 * linux-s390-low.c (s390_collect_ptrace_register)
8533 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8534
3743bb4f
DE
85352010-01-21 Doug Evans <dje@google.com>
8536
14ce3065
DE
8537 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8538 (PTRACE_ARG4_TYPE): New macro.
8539 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8540 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8541 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8542 (usr_store_inferior_registers): Ditto.
8543 (linux_read_memory, linux_write_memory): Ditto.
8544 (linux_test_for_tracefork): Ditto.
8545
3743bb4f
DE
8546 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8547 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8548
8b315be5
PA
85492010-01-21 Pedro Alves <pedro@codesourcery.com>
8550
8551 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8552 target.
8553
85492558
PA
85542010-01-21 Pedro Alves <pedro@codesourcery.com>
8555
8556 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8557 prototype to take a regcache. Adjust.
8558
442ea881
PA
85592010-01-20 Pedro Alves <pedro@codesourcery.com>
8560
8561 * regcache.h (struct thread_info): Forward declare.
8562 (struct regcache): New.
8563 (new_register_cache): Adjust prototype.
8564 (get_thread_regcache): Declare.
8565 (free_register_cache): Adjust prototype.
8566 (registers_to_string, registers_from_string): Ditto.
8567 (supply_register, supply_register_by_name, collect_register)
8568 (collect_register_as_string, collect_register_by_name): Ditto.
8569 * regcache.c (struct inferior_regcache_data): Delete.
8570 (get_regcache): Rename to ...
8571 (get_thread_regcache): ... this. Adjust. Switch inferior before
8572 fetching registers.
8573 (regcache_invalidate_one): Adjust.
8574 (regcache_invalidate): Fix prototype.
8575 (new_register_cache): Return the new register cache.
8576 (free_register_cache): Change prototype.
8577 (realloc_register_cache): Adjust.
8578 (registers_to_string): Change prototype to take a regcache. Adjust.
8579 (registers_from_string): Ditto.
8580 (register_data): Ditto.
8581 (supply_register): Ditto.
8582 (supply_register_by_name): Ditto.
8583 (collect_register): Ditto.
8584 (collect_register_as_string): Ditto.
8585 (collect_register_by_name): Ditto.
8586 * server.c (process_serial_event): Adjust.
8587 * linux-low.h (regset_fill_func, regset_store_func): Change
8588 prototype.
8589 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8590 Change prototype.
8591 * linux-low.c (get_stop_pc): Adjust.
8592 (check_removed_breakpoint): Adjust.
8593 (linux_wait_for_event): Adjust.
8594 (linux_resume_one_lwp): Adjust.
8595 (fetch_register): Add regcache parameter. Adjust.
8596 (usr_store_inferior_registers): Ditto.
8597 (regsets_fetch_inferior_registers): Ditto.
8598 (regsets_store_inferior_registers): Ditto.
8599 (linux_fetch_registers, linux_store_registers): Ditto.
8600 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8601 regcache. Adjust.
43aaf8b6
PA
8602 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8603 Ditto.
442ea881
PA
8604 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8605 prototype to take a regcache.
8606 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8607 * remote-utils.c (convert_ascii_to_int, outreg)
8608 (prepare_resume_reply): Change prototype to take a regcache.
8609 Adjust.
8610 * target.h (struct target_ops) <fetch_registers, store_registers>:
8611 Change prototype to take a regcache.
8612 (fetch_inferior_registers, store_inferior_registers): Change
8613 prototype to take a regcache. Adjust.
8614 * proc-service.c (ps_lgetregs): Adjust.
8615 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8616 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8617 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8618 take a regcache. Adjust.
8619 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8620 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8621 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8622 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8623 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8624 (cris_cannot_fetch_register):
8625 (cris_breakpoint_at): Change prototype to take a regcache.
8626 Adjust.
8627 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8628 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8629 to take a regcache. Adjust.
8630 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8631 Adjust.
8632 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8633 take a regcache. Adjust.
8634 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8635 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8636 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8637 * linux-mips-low.c (mips_get_pc):
8638 (mips_set_pc): Change prototype to take a regcache. Adjust.
8639 (mips_reinsert_addr): Adjust.
8640 (mips_collect_register): Change prototype to take a regcache.
8641 Adjust.
8642 (mips_supply_register):
8643 (mips_collect_register_32bit, mips_supply_register_32bit)
8644 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8645 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8646 * linux-ppc-low.c (ppc_supply_ptrace_register)
8647 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8648 (parse_spufs_run): Adjust.
8649 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8650 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8651 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8652 take a regcache. Adjust.
8653 * linux-s390-low.c (s390_collect_ptrace_register)
8654 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8655 (s390_set_pc): Change prototype to take a regcache. Adjust.
8656 (s390_arch_setup): Adjust.
8657 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8658 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8659 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8660 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8661 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8662 regcache. Adjust.
8663 (sparc_breakpoint_at): Adjust.
8664 * linux-xtensa-low.c (xtensa_fill_gregset):
8665 (xtensa_store_gregset):
8666 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8667 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8668 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8669 prototype to take a regcache. Adjust.
8670 * win32-arm-low.c (arm_fetch_inferior_register)
8671 (arm_store_inferior_register): Change prototype to take a
8672 regcache. Adjust.
8673 * win32-i386-low.c (i386_fetch_inferior_register)
8674 (i386_store_inferior_register): Change prototype to take a
8675 regcache. Adjust.
8676 * win32-low.c (child_fetch_inferior_registers)
8677 (child_store_inferior_registers): Change prototype to take a
8678 regcache. Adjust.
8679 (win32_wait): Adjust.
8680 (win32_fetch_inferior_registers): Change prototype to take a
8681 regcache. Adjust.
8682 (win32_store_inferior_registers): Adjust.
8683 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8684 store_inferior_register>: Change prototype to take a regcache.
8685
60c3d7b0
DE
86862010-01-20 Doug Evans <dje@google.com>
8687
8688 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8689 #ifdef.
8690 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8691 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8692
dc146f7c
VP
86932010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8694
8695 * linux-low.c (linux_core_of_thread): New.
8696 (compare_ints, show_process, list_threads): New.
8697 (linux_qxfer_osdata): Report threads and cores.
8698 (linux_target_op): Register linux_core_of_thread.
8699 * remote-utils.c (prepare_resume_reply): Report the core.
8700 (buffer_xml_printf): Support %d specifier.
8701 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8702 New.
8703 (handle_query): Handle qXfer:threads. Announce availability
8704 thereof.
8705 * target.h (struct target_ops): New field core_of_thread.
8706
7803799a
UW
87072010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8708
8709 * Makefile.in (clean): Remove new generated files.
8710 (reg-s390.o, reg-s390.c): Remove rules.
8711 (reg-s390x.o, reg-s390x.c): Likewise.
8712 (s390-linux32.o, s390-linux32.c): Add rules.
8713 (s390-linux64.o, s390-linux64.c): Likewise.
8714 (s390x-linux64.o, s390x-linux64.c): Likewise.
8715 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8716 * linux-s390-low.c: Include <elf.h>.
8717 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8718 (init_registers_s390): Remove prototype.
8719 (init_registers_s390x): Likewise.
8720 (init_registers_s390_linux32): Add prototype.
8721 (init_registers_s390_linux64): Likewise.
8722 (init_registers_s390x_linux64): Likewise.
8723 (s390_num_regs_3264): New define.
8724 (s390_regmap_3264): New global variable.
8725 (s390_cannot_fetch_register): Remove obsolete check.
8726 (s390_cannot_store_register): Likewise.
8727 (s390_collect_ptrace_register): Handle upper/lower register halves.
8728 (s390_supply_ptrace_register): Likewise.
8729 (s390_fill_gregset): Update to register number changes.
8730 (s390_get_hwcap): New routine.
8731 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8732 Install appropriate regmap and register set.
8733
6e7ffa39
JB
87342010-01-01 Joel Brobecker <brobecker@adacore.com>
8735
8736 * server.c (gdbserver_version): Update copyright year to 2010.
8737 * gdbreplay.c (gdbreplay_version): Likewise.
8738
957f3f49
DE
87392009-12-28 Doug Evans <dje@google.com>
8740
8741 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8742 elf/external.h. Include <elf.h> instead but only if necessary.
8743
ca5c370d
PA
87442009-12-28 Pedro Alves <pedro@codesourcery.com>
8745
8746 * linux-low.c (linux_remove_process): Remove `detaching'
8747 parameter. Don't release/detach from thread_db here.
8748 (linux_kill): Release/detach from thread_db here, ...
8749 (linux_detach): ... and here, before actually detaching.
8750 (linux_wait_1): ... and here, when a process exits.
8751 * thread-db.c (any_thread_of): New.
8752 (thread_db_free): Switch the current inferior to a thread of the
8753 passed in process.
8754
4ee62156
DE
87552009-12-21 Doug Evans <dje@google.com>
8756
d90e6a88
DE
8757 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8758
c5f62d5f
DE
8759 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8760 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8761 warning ifndef __NR_tkill. Move setting of errno there too.
8762 Delete unnecessary resetting of errno after syscall.
8763 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8764
10e86dd7
DE
8765 * configure.ac: Check for dladdr.
8766 * config.in: Regenerate.
8767 * configure: Regenerate.
8768 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8769 (try_thread_db_load): Update.
8770
4ee62156
DE
8771 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8772
00f515da
DE
87732009-12-18 Doug Evans <dje@google.com>
8774
e9464885
DE
8775 * event-loop.c: Include unistd.h if it exists.
8776
07d4f67e
DE
8777 * linux-low.c (my_waitpid): Move definition away from being in
8778 between linux_tracefork_child/linux_test_for_tracefork.
8779
00f515da
DE
8780 * gdb_proc_service.h (psaddr_t): Fix type.
8781 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8782 signature to match glibc.
8783
1de1badb
DE
87842009-12-16 Doug Evans <dje@google.com>
8785
8786 * linux-low.c (linux_read_memory): Fix argument to read.
8787
aeeb81d1
PA
87882009-11-26 Pedro Alves <pedro@codesourcery.com>
8789
8790 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8791 events, don't leave current_inferior pointing at null.
8792
10357975
PA
87932009-11-26 Pedro Alves <pedro@codesourcery.com>
8794
8795 * win32-low.c (LOG): Delete.
8796 (OUTMSG): Output to stderr.
8797 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8798 on compile time LOG macro.
8799 (win32_wait): Fix debug output.
8800
cf6e3471
PA
88012009-11-26 Pedro Alves <pedro@codesourcery.com>
8802
8803 * win32-low.c (win32_add_one_solib): If the dll name is
8804 "ntdll.dll", prepend the system directory to the dll path.
8805
0c85e18e
MK
88062009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8807
8808 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8809
9ac544ce 88102009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8811 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8812
8813 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8814 * configure.ac: Check for __mcoldfire__ and set
8815 gdb_cv_m68k_is_coldfire.
8816 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8817 reg-cf.o and reg-m68k.o.
8818 * configure: Regenerated.
8819
fd7dd3e6
PA
88202009-11-16 Pedro Alves <pedro@codesourcery.com>
8821
8822 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8823 Pass it to thread_db_free.
8824 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8825 proper `detaching' argument to linux_remove_process.
8826 * linux-low.h (thread_db_free): Add `detaching' parameter.
8827 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8828 to thread_db_free.
8829 (thread_db_free): Add `detaching' parameter. Only
8830 call td_ta_clear_event if detaching from process.
8831
75aa492e
MK
88322009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8833
8834 * thread-db.c (thread_db_free): Fix typo.
8835
21e1bee4
PP
88362009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8837
8838 PR gdb/10838
8839 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8840
8838b45e
NS
88412009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8842
8843 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8844 with an i686 compiler.
8845 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8846 needed.
8847 * configure: Rebuilt.
8848
8a35fb51
SL
88492009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8850
8851 PR gdb/10783
8852
8853 * server.c (handle_search_memory_1): Correct read_addr initialization
8854 in loop for searching subsequent chunks.
8855
96f15937
PP
88562009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8857
8858 * configure.ac: New --with-libthread-db option.
8859 * thread-db.c: Allow direct dependence on libthread_db.
8860 (thread_db_free): Adjust.
8861 * config.in: Regenerate.
8862 * configure: Likewise.
889bf7c5 8863
5f7d1694
PP
88642009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8865
8866 PR gdb/10757
8867 * thread-db.c (attach_thread): New function.
8868 (maybe_attach_thread): Return success/failure.
8869 (find_new_threads_callback): Adjust.
889bf7c5
PA
8870 (thread_db_find_new_threads): Loop until no new threads.
8871
88e3b899
PA
88722009-10-13 Pedro Alves <pedro@codesourcery.com>
8873
8874 * proc-service.c (ps_lgetregs): Formatting.
8875
cdbfd419
PP
88762009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8877
8878 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8879 * configure.ac: Adjust.
8880 * linux-low.h (struct process_info_private): Move members to struct
8881 thread_db.
8882 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8883 * linux-low.c (linux_remove_process): Adjust.
8884 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8885 * server.c (handle_query): Move code ...
8886 (handle_monitor_command): ... here. New function.
8887 * target.h (struct target_ops): New member.
8888 * thread-db.c (struct thread_db): New.
8889 (libthread_db_search_path): New variable.
8890 (thread_db_create_event, thread_db_enable_reporting)
8891 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8892 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8893 (try_thread_db_load_1, dladdr_to_soname): New functions.
8894 (try_thread_db_load, thread_db_load_search): New functions.
8895 (thread_db_init): Search for libthread_db.
8896 (thread_db_free): New function.
8897 (thread_db_handle_monitor_command): Likewise.
8898 * config.in: Regenerate.
8899 * configure: Regenerate.
889bf7c5 8900
4168d2d6
UW
89012009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8902
8903 * spu-low.c (spu_kill): Wait for inferior to terminate.
8904 Call clear_inferiors.
8905 (spu_detach): Call clear_inferiors.
8906
81ecdfbb
RW
89072009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8908
8909 * aclocal.m4: Regenerate.
8910 * config.in: Likewise.
8911 * configure: Likewise.
8912
0b9ff2c0
UW
89132009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8914
8915 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8916 (parse_spufs_run): New function.
8917 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8918 (ppc_breakpoint_at): Handle SPU breakpoints.
8919
efcbbd14
UW
89202009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8921
8922 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8923 (SPUFS_MAGIC): Define.
8924 (spu_enumerate_spu_ids): New function.
8925 (linux_qxfer_spu): New function.
8926 (linux_target_ops): Install linux_qxfer_spu.
8927
f4d9bade
UW
89282009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8929
8930 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8931 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8932 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8933 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8934 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8935 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8936 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8937 (init_registers_powerpc_cell32l): Add prototype.
8938 (init_registers_powerpc_cell64l): Likewise.
8939 (ppc_arch_setup): Detect Cell/B.E. architecture.
8940
96e946ca
RW
89412009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8942
8943 * Makefile.in (datarootdir): New variable.
8944
58d6951d
DJ
89452009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8946
8947 * linux-low.c (linux_write_memory): Update debugging output.
8948 * Makefile.in (clean): Add new descriptions.
8949 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8950 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8951 * configure.srv: Add new files for arm*-*-linux*.
8952 * linux-arm-low.c: Add new declarations.
8953 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8954 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8955 (HWCAP_VFPv3D16): New.
8956 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8957 instead of __IWMMXT__.
8958 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8959 (arm_arch_setup): New.
8960 (target_regsets): Remove #ifdef. Add VFP regset.
8961 (the_low_target): Use arm_arch_setup.
8962
12b42a12
DJ
89632009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8964
8965 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8966 the main thread again.
8967
ac8c974e
AR
89682009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8969
8970 Adding Neutrino gdbserver.
8971 * configure: Regenerated.
8972 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8973 * configure.srv (i[34567]86-*-nto*): New target.
8974 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8975 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8976 (nto_comctrl) [__QNX__]: New function.
8977 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8978
4424e0c3 89792009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8980
8981 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8982 srv_tgtobj.
8983
912cf4ba
PA
89842009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8985 Pedro Alves <pedro@codesourcery.com>
8986
8987 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8988 don't support CONTEXT_EXTENDED_REGISTERS.
8989 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8990 (the_low_target): Install them.
8991 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8992 failing with ERROR_PIPE_NOT_CONNECTED.
8993
aa5ca48f
DE
89942009-06-30 Doug Evans <dje@google.com>
8995 Pierre Muller <muller@ics.u-strasbg.fr>
8996
8997 Add h/w watchpoint support to x86-linux, win32-i386.
8998 * Makefile.in (SFILES): Add i386-low.c
8999 (i386_low_h): Define.
9000 (i386-low.o): Add dependencies.
9001 (linux-x86-low.o): Add i386-low.h dependency.
9002 (win32-i386-low.o): Ditto.
9003 * i386-low.c: New file.
9004 * i386-low.h: New file.
9005 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
9006 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
9007 * linux-low.c (linux_add_process): Initialize arch_private.
9008 (linux_remove_process): Free arch_private.
9009 (add_lwp): Initialize arch_private.
9010 (delete_lwp): Free arch_private.
9011 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
9012 provided.
9013 * linux-low.h (process_info_private): New member arch_private.
9014 (lwp_info): New member arch_private.
9015 (linux_target_ops): New members new_process, new_thread,
9016 prepare_to_resume.
9017 (ptid_of): New macro.
9018 * linux-x86-low.c: Include stddef.h, i386-low.h.
9019 (arch_process_info): New struct.
9020 (arch_lwp_info): New struct.
9021 (x86_linux_dr_get, x86_linux_dr_set): New functions.
9022 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9023 (i386_dr_low_get_status): New function.
9024 (x86_insert_point, x86_remove_point): New functions.
9025 (x86_stopped_by_watchpoint): New function.
9026 (x86_stopped_data_address): New function.
9027 (x86_linux_new_process, x86_linux_new_thread): New functions.
9028 (x86_linux_prepare_to_resume): New function.
9029 (the_low_target): Add entries for insert_point, remove_point,
9030 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
9031 prepare_to_resume.
9032 * server.c (debug_hw_points): New global.
9033 (monitor_show_help): Document set debug-hw-points.
9034 (handle_query): Process "set debug-hw-points".
9035 * server.h (debug_hw_points): Declare.
9036 (paddress): Declare.
9037 * utils.c (NUMCELLS, CELLSIZE): New macros.
9038 (get_sell, xsnprintf, paddress): New functions.
9039 * win32-arm-low.c (the_low_target): Add entries for insert_point,
9040 remove_point, stopped_by_watchpoint, stopped_data_address.
9041 * win32-i386-low.c: Include i386-low.h.
9042 (debug_reg_state): Replaces dr.
9043 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
9044 (i386_dr_low_get_status): New function.
9045 (i386_insert_point, i386_remove_point): New functions.
9046 (i386_stopped_by_watchpoint): New function.
9047 (i386_stopped_data_address): New function.
9048 (i386_initial_stuff): Update.
9049 (get_thread_context,set_thread_context,i386_thread_added): Update.
9050 (the_low_target): Add entries for insert_point,
9051 remove_point, stopped_by_watchpoint, stopped_data_address.
9052 * win32-low.c (win32_insert_watchpoint): New function.
9053 (win32_remove_watchpoint): New function.
9054 (win32_stopped_by_watchpoint): New function.
9055 (win32_stopped_data_address): New function.
9056 (win32_target_ops): Add entries for insert_watchpoint,
9057 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
9058 * win32-low.h (win32_target_ops): New members insert_point,
9059 remove_point, stopped_by_watchpoint, stopped_data_address.
9060
d993e290
PA
90612009-06-25 Pedro Alves <pedro@codesourcery.com>
9062
9063 * server.c (process_serial_event): Re-return unsupported, not
9064 error, if the type isn't recognized. Re-allow supporting only
9065 insert or remove packets. Also call require_running for
9066 breakpoints. Add missing break statement to default case. Tidy.
9067 * target.h (struct target_ops): Rename insert_watchpoint to
9068 insert_point, and remove_watchpoint to remove_point.
9069
9070 * linux-low.h (struct linux_target_ops): Likewise.
9071 * linux-low.c (linux_insert_watchpoint): Rename to ...
9072 (linux_insert_point): ... this. Adjust.
9073 (linux_remove_watchpoint): Rename to ...
9074 (linux_remove_point): ... this. Adjust.
9075 (linux_target_ops): Adjust.
9076 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9077 (cris_insert_point): ... this.
9078 (cris_remove_watchpoint): Rename to ...
9079 (cris_remove_point): ... this.
9080 (the_low_target): Adjust.
9081
0f54c268
PM
90822009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9083
9084 * server.c (handle_v_kill): Pass signal_pid to
9085 kill_inferior if multi_process is zero.
9086
c6314022
AR
90872009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9088
9089 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9090 * target.h (target_ops): Comment for *_watchpoint to make it clear
9091 the functions can get types '0' and '1'.
9092
4463ce24
AR
90932009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9094
9095 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9096 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9097 * regcache.c (get_regcache): Likewise.
9098 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9099 * win32-low.c (child_fetch_inferior_registers): Remove check for
9100 regno 0.
9101
cf8fd78b
PA
91022009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9103 Pedro Alves <pedro@codesourcery.com>
9104
9105 * target.h (struct target_ops) <supports_multi_process>: New
9106 callback.
9107 (target_supports_multi_process): New.
9108 * server.c (handle_query): Even if GDB reports support, only
9109 enable multi-process if the target also supports it. Report
9110 multi-process support only if the target backend supports it.
9111 * linux-low.c (linux_supports_multi_process): New function.
9112 (linux_target_ops): Install it as target_supports_multi_process
9113 callback.
9114
47c0c975
DE
91152009-05-24 Doug Evans <dje@google.com>
9116
e09875d4
DE
9117 Global renaming of find_thread_pid to find_thread_ptid.
9118 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9119 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9120 All callers updated.
9121
e27d73f6
DE
9122 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9123 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9124 directly.
9125
47c0c975
DE
9126 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9127 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9128 (linux_resume_one_lwp): Ditto.
9129
2acc282a
DE
91302009-05-23 Doug Evans <dje@google.com>
9131
9132 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9133 from struct inferior_list_entry * to struct lwp_info *.
9134 All callers updated.
9135
9f1036c1
DE
91362009-05-13 Doug Evans <dje@google.com>
9137
9138 * linux-x86-low.c: Don't include assert.h.
9139 (x86_siginfo_fixup): Use fatal, not assert.
9140 (x86_arch_setup): Fix comment.
9141
d0722149
DE
91422009-05-12 Doug Evans <dje@google.com>
9143
9144 Biarch support for i386/amd64 gdbserver.
9145 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9146 Add linux-x86-low.c.
9147 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9148 (linux-x86-low.o): Add.
9149 * linux-x86-64-low.c: Delete.
9150 * linux-i386-low.c: Delete.
9151 * linux-x86-low.c: New file.
9152 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9153 linux-x86-low.o.
9154 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9155 linux-x86-low.o.
9156 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9157 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9158 (linux_child_pid_to_exec_file): New function.
9159 (elf_64_header_p, elf_64_file_p): New functions.
9160 (siginfo_fixup): New function.
9161 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9162 give target a chance to convert layout.
9163 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9164 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9165
fdeb2a12
DE
91662009-05-07 Doug Evans <dje@google.com>
9167
9168 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9169 (regsets_store_inferior_registers): Ditto.
9170
a6dbe5df
PA
91712009-05-06 Pedro Alves <pedro@codesourcery.com>
9172
9173 PR server/10048
9174
9175 * linux-low.c (must_set_ptrace_flags): Delete.
9176 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9177 of the global.
9178 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9179 `lwp->must_set_ptrace_flags' instead.
ba42693b 9180 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9181 (linux_wait_1): ... not here.
9182
5091eb23
DE
91832009-04-30 Doug Evans <dje@google.com>
9184
9f767825
DE
9185 * inferiors.c (started_inferior_callback): New function.
9186 (attached_inferior_callback): New function.
9187 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9188 * server.c (print_started_pid, print_attached_pid): New functions.
9189 (detach_or_kill_for_exit): New function.
9190 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9191 * server.h (have_started_inferiors_p): Declare.
9192 (have_attached_inferiors_p): Declare.
9193
5091eb23
DE
9194 * inferiors.c (remove_process): Fix memory leak, free process.
9195 * linux-low.c (linux_remove_process): New function.
9196 (linux_kill): Call it instead of remove_process.
9197 (linux_detach, linux_wait_1): Ditto.
9198
155c8968
PA
91992009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9200
9201 * configure.srv: Add x86 Windows CE target.
9202
7fe519cb
UW
92032009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9204
9205 * inferiors.c (get_thread_process): Make global.
9206 * server.h (get_thread_process): Add prototype.
9207 * thread-db.c (find_one_thread): Use get_thread_process
9208 instead of current_process.
9209 (thread_db_get_tls_address): Do not crash if called when
9210 thread layer is not yet initialized.
9211
5472f405
UW
92122009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9213
9214 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9215 * spu-low.c (current_tid): Rename to ...
9216 (current_ptid): ... this.
9217 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9218 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9219 ptid_get_lwp (current_ptid) instead of current_tid.
9220 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9221 instead of current_tid. Use find_process_pid to verify pid
9222 argument is valid. Pass proper argument to remove_process.
9223 (spu_thread_alive): Compare current_ptid instead of current_tid.
9224 (spu_resume): Likewise.
9225
55ac2b99
PA
92262009-04-02 Pedro Alves <pedro@codesourcery.com>
9227
9228 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9229 variable.
9230
95954743
PA
92312009-04-01 Pedro Alves <pedro@codesourcery.com>
9232
9233 Implement the multiprocess extensions, and add linux multiprocess
9234 support.
9235
9236 * server.h (ULONGEST): Declare.
9237 (struct ptid, ptid_t): New.
9238 (minus_one_ptid, null_ptid): Declare.
9239 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9240 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9241 (struct inferior_list_entry): Change `id' type from unsigned from
9242 to ptid_t.
9243 (struct sym_cache, struct breakpoint, struct
9244 process_info_private): Forward declare.
9245 (struct process_info): Declare.
9246 (current_process): Declare.
9247 (all_processes): Declare.
9248 (initialize_inferiors): Declare.
9249 (add_thread): Adjust to use ptid_t.
9250 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9251 (add_process, remove_process, find_thread_pid): Declare.
9252 (find_inferior_id): Adjust to use ptid_t.
9253 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9254 (multi_process): Declare.
9255 (push_event): Adjust to use ptid_t.
9256 (read_ptid, write_ptid): Declare.
9257 (prepare_resume_reply): Adjust to use ptid_t.
9258 (clear_symbol_cache): Declare.
9259 * inferiors.c (all_processes): New.
9260 (null_ptid, minus_one_ptid): New.
9261 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9262 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9263 (add_thread): Change unsigned long to ptid. Remove gdb_id
9264 parameter. Adjust.
9265 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9266 (gdb_id_to_thread): Rename to ...
9267 (find_thread_pid): ... this. Change unsigned long to ptid.
9268 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9269 (loaded_dll, pull_pid_from_list): Adjust.
9270 (add_process, remove_process, find_process_pid)
9271 (get_thread_process, current_process, initialize_inferiors): New.
9272 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9273 (struct target_waitstatus) <related_pid>: Ditto.
9274 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9275 return type to int.
9276 (struct target_ops) <join>: Add `pid' argument.
9277 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9278 (struct target_ops) <wait>: Add `ptid' field. Change return type
9279 to ptid.
9280 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9281 (mywait): Add `ptid' argument. Change return type to ptid_t.
9282 (target_pid_to_str): Declare.
9283 * target.c (set_desired_inferior): Adjust to use ptids.
9284 (mywait): Add new `ptid' argument. Adjust.
9285 (target_pid_to_str): New.
9286 * mem-break.h (free_all_breakpoints): Declare.
9287 * mem-break.c (breakpoints): Delelete.
9288 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9289 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9290 to use per-process breakpoint list.
9291 (free_all_breakpoints): New.
9292 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9293 (symbol_cache, all_symbols_looked_up): Delete.
9294 (hexchars): New.
9295 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9296 read_ptid): New.
9297 (prepare_resume_reply): Change ptid argument's type from unsigned
9298 long to ptid_t. Adjust. Implement W;process and X;process.
9299 (free_sym_cache, clear_symbol_cache): New.
9300 (look_up_one_symbol): Adjust to per-process symbol cache. *
9301 * server.c (cont_thread, general_thread, step_thread): Change type
9302 to ptid_t.
9303 (attached): Delete.
9304 (multi_process): New.
9305 (last_ptid): Change type to ptid_t.
9306 (struct vstop_notif) <ptid>: Change type to ptid_t.
9307 (queue_stop_reply, push_event): Change `ptid' argument's type to
9308 ptid_t.
9309 (discard_queued_stop_replies): Add `pid' argument.
9310 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9311 changes. Don't reference the `attached' global.
9312 (attach_inferior): Adjust to mywait interface changes.
9313 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9314 features. Handle and report "multiprocess+". Handle
9315 "qAttached:PID".
9316 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9317 changes.
9318 (handle_v_kill): New.
9319 (handle_v_stopped): Adjust to use target_pid_to_str.
9320 (handle_v_requests): Allow multiple attaches and runs when
9321 multiprocess extensions are in effect. Handle "vKill".
9322 (myresume): Adjust to use ptids.
9323 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9324 (handle_status): Adjust to discard_queued_stop_replies interface
9325 change.
9326 (first_thread_of, kill_inferior_callback)
9327 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9328 (main): Call initialize_inferiors. Adjust to use ptids, killing
9329 and detaching from all inferiors. Handle multiprocess packet
9330 variants.
9331 * linux-low.h: Include gdb_proc_service.h.
9332 (struct process_info_private): New.
9333 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9334 <lwpid_of>: Use ptid_get_lwp.
9335 (get_lwp_thread): Adjust.
9336 (struct lwp_info): Add `dead' member.
9337 (find_lwp_pid): Declare.
9338 * linux-low.c (thread_db_active): Delete.
9339 (new_inferior): Adjust comment.
9340 (inferior_pid): Delete.
9341 (linux_add_process): New.
9342 (handle_extended_wait): Adjust.
9343 (add_lwp): Change unsigned long to ptid.
9344 (linux_create_inferior): Add process to processes table. Adjust
9345 to use ptids. Don't set new_inferior here.
9346 (linux_attach_lwp): Rename to ...
9347 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9348 it. Adjust to use ptids.
9349 (linux_attach_lwp): New.
9350 (linux_attach): Add process to processes table. Don't set
9351 new_inferior here.
9352 (struct counter): New.
9353 (second_thread_of_pid_p, last_thread_of_process_p): New.
9354 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9355 multiple processes.
9356 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9357 processes. Remove process from process table.
9358 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9359 to multiple processes.
9360 (any_thread_of): New.
9361 (linux_detach): Add `pid' argument, and handle it. Remove process
9362 from processes table.
9363 (linux_join): Add `pid' argument. Handle it.
9364 (linux_thread_alive): Change unsighed long argument to ptid_t.
9365 Consider dead lwps as not being alive.
9366 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9367 threads we're not interested in.
9368 (same_lwp, find_lwp_pid): New.
9369 (linux_wait_for_lwp): Change `pid' argument's type from int to
9370 ptid_t. Adjust.
9371 (linux_wait_for_event): Rename to ...
9372 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9373 from int to ptid_t. Adjust.
9374 (linux_wait_for_event): New.
9375 (linux_wait_1): Add `ptid' argument. Change return type to
9376 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9377 that exit from the process table.
9378 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9379 Adjust.
9380 (mark_lwp_dead): New.
9381 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9382 stopping all threads, mark its main lwp as dead.
9383 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9384 ptids.
9385 (fetch_register, usr_store_inferior_registers)
9386 (regsets_fetch_inferior_registers)
9387 (regsets_store_inferior_registers, linux_read_memory)
9388 (linux_write_memory): Inline `inferior_pid'.
9389 (linux_look_up_symbols): Adjust to use per-process
9390 `thread_db_active'.
9391 (linux_request_interrupt): Adjust to use ptids.
9392 (linux_read_auxv): Inline `inferior_pid'.
9393 (initialize_low): Don't reference thread_db_active.
9394 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9395 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9396 (ps_getpid): Return the pid of the current inferior.
9397 * thread-db.c (proc_handle, thread_agent): Delete.
9398 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9399 per-process data.
9400 (find_one_thread): Change argument type to ptid_t. Adjust to
9401 per-process data.
9402 (maybe_attach_thread): Adjust to per-process data and ptids.
9403 (thread_db_find_new_threads): Ditto.
9404 (thread_db_init): Ditto.
9405 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9406 processes table. Adjust to use ptids.
9407 (spu_kill, spu_detach): Adjust interface. Remove process from
9408 processes table.
9409 (spu_join, spu_thread_alive): Adjust interface.
9410 (spu_wait): Adjust interface. Remove process from processes
9411 table. Adjust to use ptids.
9412 * win32-low.c (current_inferior_tid): Delete.
9413 (current_inferior_ptid): New.
9414 (debug_event_ptid): New.
9415 (thread_rec): Take a ptid. Adjust.
9416 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9417 (child_delete_thread): Ditto.
9418 (do_initial_child_stuff): Add `attached' argument. Add process to
9419 processes table.
9420 (child_fetch_inferior_registers, child_store_inferior_registers):
9421 Adjust.
9422 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9423 (win32_attach): Pass 1 to do_initial_child_stuff.
9424 (win32_kill): Adjust interface. Remove process from processes
9425 table.
9426 (win32_detach): Ditto.
9427 (win32_join): Adjust interface.
9428 (win32_thread_alive): Take a ptid.
9429 (win32_resume): Adjust to use ptids.
9430 (get_child_debug_event): Ditto.
9431 (win32_wait): Adjust interface. Remove exiting process from
9432 processes table.
9433
bd99dc85
PA
94342009-04-01 Pedro Alves <pedro@codesourcery.com>
9435
9436 Non-stop mode support.
9437
9438 * server.h (non_stop): Declare.
9439 (gdb_client_data, handler_func): Declare.
9440 (delete_file_handler, add_file_handler, start_event_loop):
9441 Declare.
9442 (handle_serial_event, handle_target_event, push_event)
9443 (putpkt_notif): Declare.
9444 * target.h (enum resume_kind): New.
9445 (struct thread_resume): Replace `step' field by `kind' field.
9446 (TARGET_WNOHANG): Define.
9447 (struct target_ops) <wait>: Add `options' argument.
9448 <supports_non_stop, async, start_non_stop>: New fields.
9449 (target_supports_non_stop, target_async): New.
9450 (start_non_stop): Declare.
9451 (mywait): Add `options' argument.
9452 * target.c (mywait): Add `options' argument. Print child exit
9453 notifications here.
9454 (start_non_stop): New.
9455 * server.c (non_stop, own_buf, mem_buf): New globals.
9456 (struct vstop_notif): New.
9457 (notif_queue): New global.
9458 (queue_stop_reply, push_event, discard_queued_stop_replies)
9459 (send_next_stop_reply): New.
9460 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9461 interface changes.
9462 (attach_inferior): In non-stop mode, don't wait for the target
9463 here.
9464 (handle_general_set): Handle QNonStop.
9465 (handle_query): When handling qC, return the current general
9466 thread, instead of the first thread of the list.
9467 (handle_query): If the backend supports non-stop mode, include
9468 QNonStop+ in the qSupported query response.
9469 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9470 and non-stop mode.
9471 (handle_v_attach, handle_v_run): Handle non-stop mode.
9472 (handle_v_stopped): New.
9473 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9474 (myresume): Adjust to use resume_kind. Handle non-stop.
9475 (queue_stop_reply_callback): New.
9476 (handle_status): Handle non-stop mode.
9477 (main): Clear non_stop flag on reconnection. Use the event-loop.
9478 Refactor serial protocol handling from here ...
9479 (process_serial_event): ... to this new function. When GDB
9480 selects any thread, select one here. In non-stop mode, wait until
9481 GDB acks all pending events before exiting.
9482 (handle_serial_event, handle_target_event): New.
9483 * remote-utils.c (remote_open): Install remote_desc in the event
9484 loop.
9485 (remote_close): Remove remote_desc from the event loop.
9486 (putpkt_binary): Rename to...
9487 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9488 (putpkt_binary): New as wrapper around putpkt_binary_1.
9489 (putpkt_notif): New.
9490 (prepare_resume_reply): In non-stop mode, don't change the
9491 general_thread.
9492 * event-loop.c: New.
9493 * Makefile.in (OBJ): Add event-loop.o.
9494 (event-loop.o): New rule.
9495
9496 * linux-low.h (pid_of): Moved here.
9497 (lwpid_of): New.
9498 (get_lwp_thread): Use lwpid_of.
9499 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9500 * linux-low.c (pid_of): Delete.
9501 (inferior_pid): Use lwpid_of.
9502 (linux_event_pipe): New.
9503 (target_is_async_p): New.
9504 (delete_lwp): New.
9505 (handle_extended_wait): Use lwpid_of.
9506 (add_lwp): Don't set lwpid field.
9507 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9508 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9509 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9510 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9511 first. Adjust to linux_wait_for_event interface changes. Use
9512 lwpid_of.
9513 (linux_detach): Don't delete the main lwp here.
9514 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9515 (status_pending_p): Don't consider explicitly suspended lwps.
9516 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9517 pointer. Add OPTIONS argument. Change return type to int. Use
9518 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9519 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9520 pointer. Add status pointer argument. Return a pid instead of a
9521 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9522 changes. In non-stop mode, don't switch to a random thread.
9523 (linux_wait): Rename to...
9524 (linux_wait_1): ... this. Add target_options argument, and handle
9525 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9526 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9527 clean exit and signal exit code. Don't stop all threads in
9528 non-stop mode. In all-stop mode, only stop all threads when
9529 reporting a stop to GDB. Handle explicit thread stop requests.
9530 (async_file_flush, async_file_mark): New.
9531 (linux_wait): New.
9532 (send_sigstop): Use lwpid_of.
9533 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9534 interface changes. In non-stop mode, don't switch to a random
9535 thread.
9536 (linux_resume_one_lwp): Use lwpid_of.
9537 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9538 (linux_resume_one_thread): ... this. Handle resume_stop. In
9539 non-stop mode, don't look for pending flag in all threads.
9540 (resume_status_pending_p): Don't consider explicitly suspended
9541 threads.
9542 (my_waitpid): Reimplement. Emulate __WALL.
9543 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9544 Use lwpid_of.
9545 (sigchld_handler, linux_supports_non_stop, linux_async)
9546 (linux_start_non_stop): New.
9547 (linux_target_ops): Register linux_supports_non_stop, linux_async
9548 and linux_start_non_stop.
9549 (initialize_low): Install SIGCHLD handler.
9550 * thread-db.c (thread_db_create_event, find_one_thread)
9551 (thread_db_get_tls_address): Use lwpid_of.
9552 * win32-low.c (win32_detach): Adjust to use resume_kind.
9553 (win32_wait): Add `options' argument.
9554 * spu-low.c (spu_resume): Adjust to use resume_kind.
9555 (spu_wait): Add `options' argument.
9556
5b1c542e
PA
95572009-04-01 Pedro Alves <pedro@codesourcery.com>
9558
9559 Decouple target code from remote protocol.
9560
9561 * target.h (enum target_waitkind): New.
9562 (struct target_waitstatus): New.
9563 (struct target_ops) <wait>: Return an unsigned long. Take a
9564 target_waitstatus pointer instead of a char pointer.
9565 (mywait): Likewise.
9566 * target.c (mywait): Change prototype to return an unsigned long.
9567 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9568 * server.h (thread_from_wait, old_thread_from_wait): Delete
9569 declarations.
9570 (prepare_resume_reply): Change prototype to take a
9571 target_waitstatus.
9572 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9573 (last_status, last_ptid): New.
9574 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9575 pid instead of a signal.
9576 (attach_inferior): Remove "status" and "signal" parameters.
9577 Adjust.
9578 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9579 not as an address.
9580 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9581 (handle_v_requests, myresume): Remove "status" and "signal"
9582 parameters. Adjust.
9583 (handle_status): New.
9584 (main): Delete local `status'. Adjust.
9585 * remote-utils.c: Include target.h.
9586 (prepare_resume_reply): Change prototype to take a
9587 target_waitstatus. Adjust.
9588
9589 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9590 interface.
9591 * spu-low.c (spu_wait): Adjust.
9592 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9593 Delete.
9594 (win32_wait): Adjust.
9595
2bd7c093
PA
95962009-04-01 Pedro Alves <pedro@codesourcery.com>
9597
9598 * target.h (struct thread_resume): Delete leave_stopped member.
9599 (struct target_ops): Add a `n' argument to the `resume' callback.
9600 * server.c (start_inferior): Adjust.
9601 (handle_v_cont, myresume): Adjust.
9602 * linux-low.c (check_removed_breakpoint): Adjust to resume
9603 interface change, and to removed leave_stopped field.
9604 (resume_ptr): Delete.
9605 (struct thread_resume_array): New.
9606 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9607 resume interface change.
9608 (linux_continue_one_thread, linux_queue_one_thread)
9609 (resume_status_pending_p): Check if the resume field is NULL
9610 instead of checking the leave_stopped member.
9611 (linux_resume): Adjust to the target resume interface change.
9612 * spu-low.c (spu_resume): Adjust to the target resume interface
9613 change.
9614 * win32-low.c (win32_detach, win32_resume): Ditto.
9615
c35fafde
PA
96162009-04-01 Pedro Alves <pedro@codesourcery.com>
9617
9618 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9619 flag.
9620 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9621 pending.
9622 (linux_continue_one_thread): Only preserve the stepping flag if
9623 there's a pending breakpoint.
9624
0a59d50b
PA
96252009-03-31 Pedro Alves <pedro@codesourcery.com>
9626
9627 * server.c (main): After the inferior having exited, call
9628 remote_close before exiting gdbserver.
9629
f04c6d38
TJB
96302009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9631
9632 Fix size of FPSCR in Power 7 processors.
9633 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9634 (PPC_FEATURE_HAS_DFP): New #define.
9635 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9636 size of the FPSCR.
9637
78e5cee6
PA
96382009-03-23 Pedro Alves <pedro@codesourcery.com>
9639
9640 * server.c (handle_query) Whitespace and formatting.
9641
1b3f6016
PA
96422009-03-22 Pedro Alves <pedro@codesourcery.com>
9643
9644 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9645 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9646 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9647 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9648 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9649 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9650 Makefile.in, configure.ac: Fix whitespace throughout.
9651 * configure: Regenerate.
9652
a07b2135
PA
96532009-03-22 Pedro Alves <pedro@codesourcery.com>
9654
9655 * inferiors.c (find_inferior): Make it safe for the callback
9656 function to delete the currently iterated inferior.
9657
67cc2626
PA
96582009-03-22 Pedro Alves <pedro@codesourcery.com>
9659
9660 * Makefile.in (linuw_low_h): Move higher.
9661 (thread-db.o): Depend on $(linux_low_h).
9662
54a0b537
PA
96632009-03-17 Pedro Alves <pedro@codesourcery.com>
9664
9665 Rename "process" to "lwp" throughout.
9666
9667 * linux-low.c (all_processes): Rename to...
9668 (all_lwps): ... this.
9669 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9670 (add_process): Rename to ...
9671 (add_lwp): ... this. Adjust.
9672 (linux_create_inferior): Adjust.
9673 (linux_attach_lwp): Adjust.
9674 (linux_attach): Adjust.
9675 (linux_kill_one_process): Rename to ...
9676 (linux_kill_one_lwp): ... this. Adjust.
9677 (linux_kill): Adjust.
9678 (linux_detach_one_process): Rename to ...
9679 (linux_detach_one_lwp): ... this. Adjust.
9680 (linux_detach): Adjust.
9681 (check_removed_breakpoint): Adjust.
9682 (status_pending_p): Adjust.
9683 (linux_wait_for_process): Rename to ...
9684 (linux_wait_for_lwp): ... this. Adjust.
9685 (linux_wait_for_event): Adjust.
9686 (send_sigstop): Adjust.
9687 (wait_for_sigstop): Adjust.
9688 (stop_all_processes): Rename to ...
9689 (stop_all_lwps): ... this.
9690 (linux_resume_one_process): Rename to ...
9691 (linux_resume_one_lwp): ... this. Adjust.
9692 (linux_set_resume_request, linux_continue_one_thread)
9693 (linux_queue_one_thread, resume_status_pending_p)
9694 (usr_store_inferior_registers, regsets_store_inferior_registers)
9695 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9696 Adjust.
9697 * linux-low.h (get_process): Rename to ...
9698 (get_lwp): ... this. Adjust.
9699 (get_thread_process): Rename to ...
9700 (get_thread_lwp): ... this. Adjust.
9701 (get_process_thread): Rename to ...
9702 (get_lwp_thread): ... this. Adjust.
9703 (struct process_info): Rename to ...
9704 (struct lwp_info): ... this.
9705 (all_processes): Rename to ...
9706 (all_lwps): ... this.
9707 * proc-service.c (ps_lgetregs): Adjust.
9708 * thread-db.c (thread_db_create_event, find_one_thread)
9709 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9710
0b16c5cf
PA
97112009-03-14 Pedro Alves <pedro@codesourcery.com>
9712
9713 * server.c (handle_query): Handle "qAttached".
9714
32de4b9d
NS
97152009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9716
9717 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9718 GPLv3, update license URL.
9719
2aecd87f
DE
97202009-03-01 Doug Evans <dje@google.com>
9721
93efd302 9722 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9723 (server_h): Add gdb_signals.h.
9724 (signals.o): Update.
9725 * server.h (target_signal_from_host,target_signal_to_host_p)
9726 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9727
86b1f9c5
PM
97282009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9729
9730 * remote-utils.c (getpkt): Also generate remote-debug
9731 information if noack_mode is set.
9732
4aa995e1
PA
97332009-02-06 Pedro Alves <pedro@codesourcery.com>
9734
9735 * server.c (handle_query): Report qXfer:siginfo:read and
9736 qXfer:siginfo:write as supported and handle them.
9737 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9738 * linux-low.c (linux_xfer_siginfo): New.
9739 (linux_target_ops): Set it.
9740
62709adf
PA
97412009-01-26 Pedro Alves <pedro@codesourcery.com>
9742
9743 * server.c (gdbserver_usage): Mention --remote-debug.
9744 (main): Accept '--remote-debug' switch.
9745
aef93bd7
DE
97462009-01-18 Doug Evans <dje@google.com>
9747
9748 * regcache.c (new_register_cache): No need to check result of xcalloc.
9749 * server.c (handle_search_memory): Back out calls to xmalloc,
9750 result is checked and error is returned to user upon failure.
9751 (handle_query): Ditto. Add more checks for result of malloc.
9752 (handle_v_cont): Check result of malloc, report error back to
9753 user upon failure.
9754 (handle_v_run): Ditto. Call freeargv.
9755 * server.h (freeargv): Declare.
9756 * utils.c (freeargv): New fn.
9757
54363045
DE
97582009-01-15 Doug Evans <dje@google.com>
9759
f626972c
DE
9760 * gdbreplay.c (perror_with_name): Make arg const char *.
9761 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9762 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9763 * utils.c (perror_with_name): Make arg const char *.
54363045 9764
18aae699
PA
97652009-01-14 Pedro Alves <pedro@codesourcery.com>
9766
9767 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9768 when handling a EXIT_PROCESS_DEBUG_EVENT.
9769
ff703abe
JB
97702009-01-06 Joel Brobecker <brobecker@adacore.com>
9771
9772 * gdbreplay.c (gdbreplay_version): Update copyright year.
9773 * server.c (gdbserver_version): Likewise.
9774
f21cc1a2 97752009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9776
9777 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9778 (handle_extended_wait): Improve comment.
0e21c1ec 9779
bca929d3
DE
97802008-12-13 Doug Evans <dje@google.com>
9781
9782 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9783 * server.h (ATTR_MALLOC): New macro.
9784 (xmalloc,xcalloc,xstrdup): Declare.
9785 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9786 * inferiors.c: Ditto.
9787 * linux-low.c: Ditto.
9788 * mem-break.c: Ditto.
9789 * regcache.c: Ditto.
9790 * remote-utils.c: Ditto.
9791 * server.c: Ditto.
9792 * target.c: Ditto.
9793 * win32-low.c: Ditto.
9794
97438e3f
DE
97952008-12-12 Doug Evans <dje@google.com>
9796
896c7fbb
DE
9797 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9798 in debugging printf.
9799
97438e3f
DE
9800 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9801
e3b886f8
DE
98022008-12-09 Doug Evans <dje@google.com>
9803
9804 * linux-low.h (struct process_info): Delete member tid, unused.
9805 * thread-db.c (find_one_thread): Update.
9806 (maybe_attach_thread): Update.
9807
07e059b5
VP
98082008-12-02 Pedro Alves <pedro@codesourcery.com>
9809
889bf7c5
PA
9810 * target.h (struct target_ops): Add qxfer_osdata member.
9811 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9812 and dirent.h.
9813 (linux_qxfer_osdata): New functions.
9814 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9815 callback.
9816 * server.c (handle_query): Handle "qXfer:osdata:read:".
9817 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9818 (buffer_xml_printf): New functions.
9819 * server.h (struct buffer): New.
9820 (buffer_grow_str, buffer_grow_str0): New macros.
9821 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9822 (buffer_xml_printf): Declare.
07e059b5 9823
4cab47ab
DE
98242008-11-24 Doug Evans <dje@google.com>
9825
9826 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9827
f142445f
DJ
98282008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9829
9830 * server.c (handle_v_run): Always use the supplied argument list.
9831
d0107bb6 98322008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9833
d0107bb6
BW
9834 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9835 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9836
2c4ad781
TJB
98372008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9838
9839 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9840 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9841 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9842 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9843 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9844 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9845 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9846 XML target descriptions.
9847 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9848 when inferior is running on an ISA 2.05 or later processor. Add
9849 special case to return offset for full 64-bit slot of FPSCR when
9850 in 32-bits.
9851
dfb64f85
DJ
98522008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9853
9854 * Makefile.in (SFILES, clean): Added sparc64 files.
9855 (reg-sparc64.o, reg-sparc64.c): New.
9856 * configure.srv (sparc*-*-linux*): New configuration.
9857 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9858 syscall arguments for SPARC.
9859 (regsets_store_inferior_registers): Likewise.
9860 * linux-sparc-low.c: New file.
9861
66b6e1dd
DE
98622008-10-21 Doug Evans <dje@google.com>
9863
9864 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9865 (READLINE_DIR,READLINE_DEP): Delete.
9866 (INTERNAL_CFLAGS): Update.
9867 (LINTFLAGS): Update.
9868
9b710a42
PA
98692008-10-10 Pedro Alves <pedro@codesourcery.com>
9870
9871 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9872 whole argv from the last run, not just argv[0].
9873
5822d809
PA
98742008-09-08 Pedro Alves <pedro@codesourcery.com>
9875
9876 * regcache.c (new_register_cache): Return NULL if the register
9877 cache size isn't known yet.
9878 (free_register_cache): Avoid dereferencing a NULL regcache.
9879
74aac56f
DJ
98802008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9881
9882 * configure.srv: Merge MIPS and MIPS64.
9883
400b20f5
MR
98842008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9885
9886 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9887
677c5bb1
LM
98882008-08-18 Luis Machado <luisgpm@br.ibm.com>
9889
9890 * Makefile.in: Add required vsx dependencies.
9891
9892 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9893 Declare init_registers_powerpc_vsx32l.
9894 Declare init_registers_powerpc_vsx64l.
9895 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9896 (ppc_arch_setup): Check for VSX in hwcap.
9897 (ppc_fill_vsxregset): New function.
9898 (ppc_store_vsxregset): New function.
9899 Add new VSX entry in regset_info target_regsets.
9900
9901 * configure.srv: Add new VSX dependencies.
9902
a6f3e723
SL
99032008-08-12 Pedro Alves <pedro@codesourcery.com>
9904
9905 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9906 (remote_open): Set or clear transport_is_reliable.
9907 (putpkt_binary): Don't expect acks in noack mode.
9908 (getpkt): Don't send ack/nac in noack mode.
9909 * server.c (handle_general_set): Handle QStartNoAckMode.
9910 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9911 qSupported.
9912 (main): Reset noack_mode on every connection.
9913 * server.h (noack_mode): Declare.
9914
a417dc56
RW
99152008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9916
9917 * Makefile.in (GDBREPLAY_OBS): New variable.
9918 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9919
3221518c
UW
99202008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9921 Daniel Jacobowitz <dan@codesourcery.com>
9922
9923 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9924 (usr_store_inferior_registers): Likewise.
9925 (regsets_store_inferior_registers): Likewise.
9926
ec56be1b
PA
99272008-07-31 Rolf Jansen <rj@surtec.com>
9928 Pedro Alves <pedro@codesourcery.com>
9929
9930 * configure.ac: Check for memmem declaration.
9931 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9932 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9933 (disable_packet_qfThreadInfo): Unconditionally compile.
9934 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9935 * configure, config.in: Regenerate.
9936
2fe5e3ff
DE
99372008-07-28 Doug Kwan <dougkwan@google.com>
9938
9939 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9940 (linux_write_memory): Remove declaration of errno.
9941
836acd6d
UW
99422008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9943
9944 * linux-low.c (handle_extended_wait): Do not use "status"
9945 variable uninitialized.
9946
aeba519e
PA
99472008-07-07 Pedro Alves <pedro@codesourcery.com>
9948
9949 * server.c (handle_v_attach): Inhibit reporting dll changes.
9950
db42f210
PA
99512008-06-27 Pedro Alves <pedro@codesourcery.com>
9952
9953 * remote-utils.c (prepare_resume_reply): If requested, don't
9954 output "thread:TID" in the T stop reply.
9955
9956 * server.c (disable_packet_vCont, disable_packet_Tthread)
9957 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9958 (handle_query): If requested, disable support for qC, qfThreadInfo
9959 and qsThreadInfo.
9960 (handle_v_requests): If requested, disable support for vCont.
9961 (gdbserver_show_disableable): New.
9962 (main): Handle --disable-packet and --disable-packet=LIST.
9963
9964 * server.h (disable_packet_vCont, disable_packet_Tthread)
9965 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9966
8e4c5421
CD
99672008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9968
9969 * server.c (gdbserver_usage): Mention --version.
9970
6e23a804
DJ
99712008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9972
9973 * Makefile.in (gdbreplay.o): New rule.
9974
90aa6a40
JM
99752008-06-06 Joseph Myers <joseph@codesourcery.com>
9976
9977 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9978 message, not gdbserver.
9979
c16158bc 99802008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9981 Nathan Sidwell <nathan@codesourcery.com>
9982 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9983
9984 * acinclude.m4: Include ../../config/acx.m4.
9985 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9986 * configure, config.in: Regenerate.
9987 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9988 * server.c (gdbserver_version): Print PKGVERSION.
9989 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9990 (main): Adjust gdbserver_usage calls.
9991 * gdbreplay.c (version, host_name): Add declarations.
9992 (gdbreplay_version, gdbreplay_usage): New.
9993 (main): Accept --version and --help options.
9994
aeb75bf5
DJ
99952008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9996
9997 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9998 (arm_breakpoint_at): Handle Thumb.
9999 (the_low_target): Add comment.
10000
76b233dd
UW
100012008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
10002
10003 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
10004
08388c79
DE
100052008-05-09 Doug Evans <dje@google.com>
10006
a3c83fae
DE
10007 * server.h (decode_search_memory_packet): Declare.
10008 * remote-utils.c (decode_search_memory_packet): New fn.
10009 * server.c (handle_search_memory_1): New fn.
08388c79
DE
10010 (handle_search_memory): New fn.
10011 (handle_query): Process qSearch:memory packets.
10012
bb9c3d36
UW
100132008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
10014
10015 * regcache.c (registers_length): Remove.
10016 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
10017 full register packet.
10018 * regcache.h (registers_length): Remove prototype.
10019 * server.h (PBUFSIZ): Define to 16384.
10020
7284e1be
UW
100212008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
10022
10023 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
10024 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
10025 powerpc-64l.o, and powerpc-altivec64l.o.
10026 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
10027 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
10028 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
10029 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
10030 rs6000/power-linux.xml, and rs6000/power64-linux.xml
10031 to srv_xmlfiles.
10032
10033 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
10034 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
10035 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
10036 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
10037 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
10038 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
10039 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
10040 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
10041 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
10042 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
10043 (clean): Update.
10044
10045 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
10046 (init_registers_powerpc_32l): ... this new prototype.
10047 (init_registers_powerpc_32): Remove, replace by ...
10048 (init_registers_powerpc_altivec32l): ... this new prototype.
10049 (init_registers_powerpc_e500): Remove, replace by ...
10050 (init_registers_powerpc_e500l): ... this new prototype.
10051 (init_registers_ppc64): Remove, replace by ...
10052 (init_registers_powerpc_64l): ... this new prototype.
10053 (init_registers_powerpc_64): Remove, replace by ...
10054 (init_registers_powerpc_altivec64l): ... this new prototype.
10055 (ppc_num_regs): Set to 73.
10056 (PT_ORIG_R3, PT_TRAP): Define if necessary.
10057 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
10058 (ppc_cannot_store_register): Handle orig_r3 and trap.
10059 (ppc_arch_setup): Update init_registers_... calls.
10060 (ppc_fill_gregset): Handle orig_r3 and trap.
10061
10062 * inferiors.c (clear_inferiors): Reset current_inferior.
10063
fdc59709
PB
100642008-04-23 Paolo Bonzini <bonzini@gnu.org>
10065
889bf7c5
PA
10066 * acinclude.m4: Add override.m4.
10067 * configure: Regenerate.
fdc59709 10068
c9b2f845
UW
100692008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10070
10071 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10072 initial call to init_register_ppc64.
10073
550512b8
UW
100742008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10075
43aaf8b6
PA
10076 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10077 single powerpc*-*-linux* case.
550512b8
UW
10078 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10079
b6430ec3
UW
100802008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10081
10082 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10083 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10084 from reg_xmlfiles.
10085 * linux-ppc-low.c: Include <elf.h>.
10086 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10087 (ppc_hwcap): New global variable.
10088 (ppc_regmap): Remove __SPE__ #ifdef sections.
10089 (ppc_regmap_e500): New global variable.
10090 (ppc_cannot_store_register): Update __SPE__ special case.
10091 (ppc_get_hwcap): New function.
10092 (ppc_arch_setup): Use it to determine whether inferior supports
10093 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10094 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10095 Do not access registers if target does not support AltiVec.
10096 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10097 Do not access registers if target does not support SPE.
10098 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10099
52fa2412
UW
101002008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10101
10102 * linux-low.c (disabled_regsets, num_regsets): New.
10103 (use_regsets_p): Delete.
10104 (linux_wait_for_process): Clear disabled_regsets.
10105 (regsets_fetch_inferior_registers): Check and set it.
10106 (regsets_store_inferior_registers): Likewise.
10107 (linux_fetch_registers, linux_store_registers): Do not use
10108 use_regsets_p.
10109 (initialize_low): Allocate disabled_regsets.
10110
e28b3332
DJ
101112008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10112
10113 * Makefile.in (LIBOBJS): New.
10114 (OBS): Use LIBOBJS.
10115 (memmem.o): New rule.
10116 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10117 * configure: Regenerated.
10118
4536995d
UW
101192008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10120
10121 * server.c (handle_query): Never return "unsupported" for
10122 qXfer:features:read queries.
10123
221c031f
UW
101242008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10125
10126 * server.c (get_features_xml): Fix inverted condition.
10127 (handle_query): Always support qXfer:feature:read.
10128
ccd213ac
DJ
101292008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10130
10131 * server.c (wrapper_argv): New.
10132 (start_inferior): Handle wrapper_argv. If set, expect an extra
10133 trap.
10134 (gdbserver_usage): Document --wrapper.
10135 (main): Parse --wrapper.
10136
6fe305f7
UW
101372008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10138
10139 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10140 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10141 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10142 (ppc_set_pc): Likewise.
10143 (ppc_arch_setup): New function.
10144 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10145 of collect_register.
889bf7c5 10146 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10147
5b0a002e
UW
101482008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10149
10150 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10151 instead of linux-ppc64-low.o.
10152 * linux-ppc64-low.c: Remove file.
10153 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10154 (linux-ppc64-low.o): Remove rule.
10155
10156 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10157 (init_registers_powerpc_64): Likewise.
10158 (ppc_regmap): Conditionally define depending on __powerpc64__.
10159 (ppc_cannot_store_register): Do not special-case "fpscr" when
10160 compiled on __powerpc64__.
10161 (ppc_collect_ptrace_register): New function.
10162 (ppc_supply_ptrace_register): New function.
10163 (ppc_breakpoint): Change type to "unsigned int".
10164 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10165 (the_low_target): Conditionally provide initializers for the
889bf7c5 10166 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10167 collect_ptrace_register and supply_ptrace_register members.
10168
9b4b61c8
UW
101692008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10170
10171 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10172 * server.c (gdbserver_xmltarget): Define.
10173 (get_features_xml): Use it to replace "target.xml" and arch_string.
10174
10175 * configure.srv: Remove srv_xmltarget. Add XML files that were
10176 mentioned there to srv_xmlfiles instead. Remove conditional tests
10177 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10178 srv_xmlfiles and srv_regobj to include all possible choices.
10179 * configure.ac (srv_xmltarget): Remove.
10180 (srv_xmlfiles): Do not add "target.xml".
10181 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10182 checks for supplementary target information.
10183 * configure: Regenerate.
10184 * Makefile.in (XML_TARGET): Remove.
10185 (target.xml): Remove rule.
10186 (clean): Do not clean up target.xml.
10187 (.PRECIOUS): Do not mention target.xml.
10188
10189 * target.h (struct target_ops): Remove arch_string member.
10190 * linux-low.c (linux_arch_string): Remove.
10191 (linux_target_ops): Remove arch_string initializer.
10192 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10193 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10194 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10195 * spu-low.c (spu_arch_string): Remove.
10196 (spu_target_ops): Remove arch_string initializer.
10197 * win32-low.c (win32_arch_string): Remove.
10198 (win32_target_ops): Remove arch_string initializer.
10199 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10200 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10201 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10202
ee1a7ae4
UW
102032008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10204
10205 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10206 by collect_ptrace_register and supply_ptrace_register hooks.
10207 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10208 instead of checking for the_low_target.left_pad_xfer.
10209 (usr_store_inferior_registers): Use collect_ptrace_register callback
10210 instead of checking for the_low_target.left_pad_xfer.
10211
10212 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10213 (s390_supply_ptrace_register): Likewise.
10214 (s390_fill_gregset): Call s390_collect_ptrace_register.
10215 (the_low_target): Update.
10216
10217 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10218 (ppc_supply_ptrace_register): Likewise.
10219 (the_low_target): Update.
10220
10221 * linux-i386-low.c (the_low_target): Update.
10222 * linux-x86-64-low.c (the_low_target): Update.
10223
d61ddec4
UW
102242008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10225
10226 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10227 reg-s390.o and reg-s390x.o.
10228
10229 * linux-low.c (new_inferior): New global variable.
10230 (linux_create_inferior, linux_attach): Set it.
10231 (linux_wait_for_process): Call the_low_target.arch_setup after the
10232 target has stopped for the first time.
10233 (initialize_low): Do not call the_low_target.arch_setup.
10234
10235 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10236 (s390_set_pc): Likewise.
10237 (s390_arch_setup): New function.
10238 (the_low_target): Use s390_arch_setup as arch_setup routine.
10239
10240 * regcache.c (realloc_register_cache): New function.
10241 (set_register_cache): Call it for each existing regcache.
10242
d05b4ac3
UW
102432008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10244
10245 * server.h (init_registers): Remove prototype.
10246
10247 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10248 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10249 instead of init_registers ().
10250 * linux-arm-low.c (init_registers_arm): Add prototype.
10251 (init_registers_arm_with_iwmmxt): Likewise.
10252 (the_low_target): Add initializer for arch_setup field.
10253 * linux-cris-low.c (init_registers_cris): Add prototype.
10254 (the_low_target): Add initializer for arch_setup field.
10255 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10256 (the_low_target): Add initializer for arch_setup field.
10257 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10258 (the_low_target): Add initializer for arch_setup field.
10259 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10260 (the_low_target): Add initializer for arch_setup field.
10261 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10262 (the_low_target): Add initializer for arch_setup field.
10263 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10264 (the_low_target): Add initializer for arch_setup field.
10265 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10266 (init_registers_mips64_linux): Likewise.
10267 (the_low_target): Add initializer for arch_setup field.
10268 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10269 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10270 (the_low_target): Add initializer for arch_setup field.
10271 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10272 (init_registers_powerpc_64): Likewise.
10273 (the_low_target): Add initializer for arch_setup field.
10274 * linux-s390-low.c (init_registers_s390): Add prototype.
10275 (init_registers_s390x): Likewise.
10276 (the_low_target): Add initializer for arch_setup field.
10277 * linux-sh-low.c (init_registers_sh): Add prototype.
10278 (the_low_target): Add initializer for arch_setup field.
10279 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10280 (the_low_target): Add initializer for arch_setup field.
10281 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10282 (the_low_target): Add initializer for arch_setup field.
10283
10284 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10285 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10286 instead of init_registers ().
10287 * win32-arm-low.c (init_registers_arm): Add prototype.
10288 (the_low_target): Add initializer for arch_setup field.
10289 * win32-i386-low.c (init_registers_i386): Add prototype.
10290 (the_low_target): Add initializer for arch_setup field.
10291
10292 * spu-low.c (init_registers_spu): Add prototype.
10293 (initialize_low): Call initialie_registers_spu () instead of
10294 initialize_registers ().
10295
fd96d250
PA
102962008-02-19 Pedro Alves <pedro@codesourcery.com>
10297
10298 * server.c (handle_v_requests): When handling the vRun and vAttach
10299 packets, if already debugging a process, don't kill it. Return an
10300 error instead.
10301
d41b6bb4
DJ
103022008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10303
10304 * server.c (handle_query): Correct length check.
10305
5ac588cf
PA
103062008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10307
10308 * win32-low.c (do_initial_child_stuff): Add process handle
10309 parameter. Set current_process_handle and current_process_id from the
10310 parameters. Clear globals.
10311 (win32_create_inferior): Don't set current_process_handle and
10312 current_process_id here. Instead pass them on the call to
10313 do_initial_child_stuff.
10314 (win32_attach): Likewise.
10315 (win32_clear_inferiors): New.
10316 (win32_kill): Don't close the current process handle or the
10317 current thread handle here. Instead call win32_clear_inferiors.
10318 (win32_detach): Don't open a new handle to the process. Call
10319 win32_clear_inferiors.
10320 (win32_join): Don't rely on current_process_handle; open a new
10321 handle using the process id.
10322 (win32_wait): Call win32_clear_inferiors when the inferior process
10323 has exited.
10324
ecd7ecbc
DJ
103252008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10326
10327 * server.c (monitor_show_help): Add "exit".
10328
1525d545
MG
103292008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10330
ecd7ecbc 10331 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10332 (clean): Add reg-xtensa.c.
10333 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10334 * configure.srv (xtensa*-*-linux*) New target.
10335 * linux-xtensa-low.c: New.
10336 * xtensa-xtregs.c: New.
1525d545 10337
59a016f0
PA
103382008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10339
10340 * hostio.c: Don't include errno.h.
10341 (errno_to_fileio_errno): Move to hostio-errno.
10342 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10343 error number outputting to the target->hostio_last_error callback.
10344 (hostio_packet_error): Use FILEIO_EINVAL directly.
10345 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10346 calls to hostio_error.
10347 * hostio-errno.c: New.
10348 * server.h (hostio_last_error_from_errno): Declare.
10349 * target.h (target_ops): Add hostio_last_error member.
10350 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10351 as hostio_last_error handler.
889bf7c5 10352 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10353 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10354 (wince_hostio_last_error): New functions.
10355 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10356 as hostio_last_error handler.
10357 (win32_target_ops) [!_WIN32_WCE]: Register
10358 hostio_last_error_from_errno as hostio_last_error handler.
10359 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10360 (hostio-errno.o): New rule.
10361 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10362 * configure.srv (srv_hostio_err_objs): New variable. Default to
10363 hostio-errno.o.
10364 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10365 * configure: Regenerate.
10366
2d717e4f
DJ
103672008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10368
10369 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10370 (linux_kill, linux_detach): Clean up the process list.
10371 * remote-utils.c (remote_open): Improve port number parsing.
10372 (putpkt_binary, input_interrupt): Only send interrupts if the target
10373 is running.
10374 * server.c (extended_protocol): Make static.
10375 (attached): Define earlier.
10376 (exit_requested, response_needed, program_argv): New variables.
10377 (target_running): New.
10378 (start_inferior): Clear attached here.
10379 (attach_inferior): Set attached here.
10380 (require_running): Define.
10381 (handle_query): Use require_running and target_running. Implement
10382 "monitor exit".
10383 (handle_v_attach, handle_v_run): New.
10384 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10385 (gdbserver_usage): Update.
10386 (main): Redo argument parsing. Handle --debug and --multi. Handle
10387 --attach along with other options or after the port. Save
10388 program_argv. Support no initial program. Resynchronize
10389 communication with GDB after an error. Handle "monitor exit".
10390 Use require_running and target_running. Always allow the extended
10391 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10392 restart in extended mode.
10393 * README: Refer to the GDB manual. Update --attach usage.
10394
7407e2de
AS
103952007-12-20 Andreas Schwab <schwab@suse.de>
10396
10397 * linux-low.c (STACK_SIZE): Define.
10398 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10399 (linux_test_for_tracefork): Likewise.
10400
b65d95c5
DJ
104012007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10402
10403 * linux-low.c (linux_wait_for_event): Update messages. Do not
10404 reinsert auto-delete breakpoints.
10405 * mem-break.c (struct breakpoint): Change return type of handler to
10406 int.
10407 (set_breakpoint_at): Update handler type.
10408 (reinsert_breakpoint_handler): Return 1 instead of calling
10409 delete_breakpoint.
10410 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10411 setting a new one.
10412 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10413 * mem-break.h (set_breakpoint_at): Update handler type.
10414 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10415 * win32-low.c (auto_delete_breakpoint): New.
10416 (get_child_debug_event): Use it.
10417
4e799345
DJ
104182007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10419
10420 * configure.ac: Check for pread and pwrite.
10421 * hostio.c (handle_pread): Fall back to lseek and read.
10422 (handle_pwrite): Fall back to lseek and write.
10423 * config.in, configure: Regenerated.
10424
27524b67
DJ
104252007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10426
10427 * server.c (myresume): Add own_buf argument.
10428 (main): Update calls.
10429
a20d5e98
DJ
104302007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10431
10432 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10433 * remote-utils.c (remote_open): Do not call disable_async_io.
10434 (block_async_io): Delete.
10435 (unblock_async_io): Make static.
10436 (initialize_async_io): New.
10437 * server.c (handle_v_cont): Handle async I/O here.
10438 (myresume): Likewise. Move other common resume tasks here...
10439 (main): ... from here. Call initialize_async_io. Disable async
10440 I/O before the main loop.
10441 * server.h (initialize_async_io): Declare.
10442 (block_async_io, unblock_async_io): Delete prototypes.
10443 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10444
b79d787e
DJ
104452007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10446
10447 * remote-utils.c (readchar): Allow binary data in received messages.
10448
d97903b2
PA
104492007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10450
10451 * win32-low.c (attaching): New global.
10452 (win32_create_inferior): Clear the `attaching' global.
10453 (win32_attach): Set the `attaching' global.
10454 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10455 attaching. Only set a breakpoint at the entry point if not
10456 attaching.
10457
311de423
PA
104582007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10459
10460 * server.c (main): Don't report dll events on the initial
10461 connection on attaches.
10462
6c2d16d2
PA
104632007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10464
10465 * server.c (main): Relax numerical bases supported for the pid of
10466 the --attach command line argument.
10467
5ca906e6
PA
104682007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10469
10470 * win32-low.c (win32_attach): Call OpenProcess before
10471 DebugActiveProcess, not after. Add last error output to error
10472 call.
10473
9c6c8194
PA
104742007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10475
10476 * win32-low.c (win32_get_thread_context)
10477 (win32_set_thread_context): New functions.
10478 (thread_rec): Use win32_get_thread_context.
10479 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10480 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10481 field.
10482
4d5d1aaa
PA
104832007-12-03 Leo Zayas
10484 Pedro Alves <pedro_alves@portugalmail.pt>
10485
10486 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10487 global variables.
10488 (child_add_thread): Minor cleanup.
10489 (child_continue): Resume artificially suspended threads before
10490 calling ContinueDebugEvent.
10491 (suspend_one_thread): New.
10492 (fake_breakpoint_event): New.
10493 (get_child_debug_event): Change return type to int. Check here if
10494 gdb sent an interrupt request. If a soft interrupt was requested,
10495 fake a breakpoint event. Return 0 if there is no event to handle,
10496 and 1 otherwise.
10497 (win32_wait): Don't check here if gdb sent an interrupt request.
10498 Ensure there is a valid event to handle.
10499 (win32_request_interrupt): Add soft interruption method as last
10500 resort.
10501
c436e841
PA
105022007-12-03 Leo Zayas
10503 Pedro Alves <pedro_alves@portugalmail.pt>
10504
10505 * win32-low.h (win32_thread_info): Add descriptions to the
10506 structure members. Replace `suspend_count' counter by a
10507 `suspended' flag.
10508 * win32-low.c (thread_rec): Update condition of when to get the
10509 context from the inferior. Rely on ContextFlags being set if it
10510 has already been retrieved. Only suspend the inferior thread if
10511 we haven't already. Warn if that fails.
10512 (continue_one_thread): s/suspend_count/suspended/. Only call
10513 ResumeThread once. Warn if that fails.
10514
e7b5fa67
PA
105152007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10516
10517 * win32-low.c (win32_wait): Don't read from the inferior when it
10518 has already exited.
10519
a385171d
PA
105202007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10521
10522 * Makefile.in (win32_low_h): New variable.
10523 (win32-low.o): Add dependency on $(win32_low_h).
10524 (win32-arm-low.o, win32-i386-low.o): New rules.
10525
f80c84b3
DJ
105262007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10527
10528 * hostio.c: Correct copyright year.
10529
a6b151f1
DJ
105302007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10531
10532 * Makefile.in (OBS): Add hostio.o.
10533 (hostio.o): New rule.
10534 * server.h (handle_vFile): Declare.
10535 * hostio.c: New file.
10536 * server.c (handle_v_requests): Take packet_len and new_packet_len
10537 for binary packets. Call handle_vFile.
10538 (main): Update call to handle_v_requests.
10539
f9387fc3
DJ
105402007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10541
10542 * linux-low.c: Include <sched.h>.
10543
51c2684e
DJ
105442007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10545
10546 * linux-low.c (linux_tracefork_grandchild): New.
10547 (linux_tracefork_child): Use clone.
10548 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10549
75f83163
JB
105502007-10-31 Joel Brobecker <brobecker@adacore.com>
10551
10552 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10553
da5898ce
DJ
105542007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10555
10556 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10557
24a09b5f
DJ
105582007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10559
10560 * inferiors.c (change_inferior_id): Delete.
10561 (add_pid_to_list, pull_pid_from_list): New.
10562 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10563 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10564 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10565 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10566 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10567 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10568 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10569 (using_threads): Always set to 1.
10570 (handle_extended_wait): New.
10571 (add_process): Do not set TID.
10572 (linux_create_inferior): Set must_set_ptrace_flags.
10573 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10574 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10575 (linux_thread_alive): Rename TID argument to LWPID.
10576 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10577 (linux_wait_for_event): Do not use TID or check using_threads. Update
10578 call to dead_thread_notify. Call handle_extended_wait.
10579 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10580 (send_sigstop): Delete sigstop_sent.
10581 (wait_for_sigstop): Avoid TID.
10582 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10583 (linux_test_for_tracefork): New.
10584 (linux_lookup_signals): Use thread_db_active and
10585 linux_supports_tracefork_flag.
10586 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10587 * linux-low.h (get_process_thread): Avoid TID.
10588 (struct process_ifo): Move thread_known and tid to the end. Remove
10589 sigstop_sent.
10590 (linux_attach_lwp, thread_db_init): Update prototypes.
10591 * server.h (change_inferior_id): Delete prototype.
10592 (add_pid_to_list, pull_pid_from_list): New prototypes.
10593 * thread-db.c (thread_db_use_events): New.
10594 (find_first_thread): Rename to...
10595 (find_one_thread): ...this. Update callers and messages. Do not
10596 call fatal. Check thread_db_use_events. Do not call
10597 change_inferior_id or new_thread_notify.
10598 (maybe_attach_thread): Update. Do not call new_thread_notify.
10599 (thread_db_init): Set thread_db_use_events. Check use_events.
10600 * utils.c (fatal, warning): Correct message prefix.
10601
30ed0a8f
DJ
106022007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10603
10604 * Makefile.in (clean): Remove new files.
10605 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10606 (powerpc-64.o, powerpc-64.c): New rules.
10607 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10608 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10609 with SPE.
10610 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10611 SPE targets.
10612 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10613 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10614 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10615 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10616 (target_regsets): Add AltiVec and SPE register sets.
10617 * configure.ac: Check for AltiVec and SPE.
10618 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10619 (ppc_fill_vrregset, ppc_store_vrregset): New.
10620 (target_regsets): Add AltiVec register set.
10621 * configure: Regenerated.
10622
fd462a61
DJ
106232007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10624
10625 * linux-low.c (O_LARGEFILE): Define.
10626 (linux_read_memory): Use /proc/PID/mem.
10627 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10628 * configure, config.in: Regenerated.
10629
69f223ed
DJ
106302007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10631
10632 * linux-low.c (linux_wait_for_event): Do not pass signals while
10633 single-stepping.
10634
aec18585
PA
106352007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10636
10637 * win32-low.c (create_process): New.
10638 (win32_create_inferior): Use create_process instead of
10639 CreateProcess. If create_process failed retry appending an ".exe"
10640 suffix. Store the GetLastError result immediatelly after
10641 create_process calls and use it on the call to error.
10642
34d86ddd
PA
106432007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10644
10645 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10646
5a0e3bd0
JB
106472007-08-23 Joel Brobecker <brobecker@adacore.com>
10648
10649 * configure.ac: Switch license to GPLv3.
10650
f88c79e6
MS
106512007-08-01 Michael Snyder <msnyder@access-company.com>
10652
10653 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10654
6b3d9b83
PA
106552007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10656
10657 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10658 typedef.
10659 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10660 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10661 CloseToolhelp32Snapshot.
10662 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10663 CloseToolhelp32Snapshot.
10664
c588c53c
MS
106652007-07-27 Michael Snyder <michael.snyder@access-company.com>
10666
10667 * server.c (main): Check for inferior exit before main loop.
10668
aa0403d9
PA
106692007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10670
10671 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10672 instead of on tmp_desc.
10673
255e7678
DJ
106742007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10675 Daniel Jacobowitz <dan@codesourcery.com>
10676
10677 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10678 (add_thread): Minor cleanups.
10679 (clear_inferiors): Move lower in the file. Clear the DLL
10680 list.
10681 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10682 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10683 (xml_escape_text): New.
10684 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10685 for qSupported.
10686 (handle_v_cont): Report errors.
10687 (gdbserver_version): Update.
10688 (main): Correct size of own_buf. Do not report initial DLL events.
10689 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10690 (unloaded_dll, xml_escape_text): New.
10691 * win32-low.c (enum target_waitkind): Update comments.
10692 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10693 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10694 (win32_EnumProcessModules, win32_GetModuleInformation)
10695 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10696 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10697 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10698 (win32_Module32First, win32_Module32Next, load_toolhelp)
10699 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10700 (get_child_debug_event): Handle DLL events.
10701 (win32_wait): Likewise.
10702
0d37add9
DJ
107032007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10704
10705 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10706 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10707
45e2715e
PA
107082007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10709
10710 * win32-low.c (handle_output_debug_string): Ignore event if not
10711 waiting.
10712
c5674cf1
PA
107132007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10714
10715 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10716
2bbe3cc1
DJ
107172007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10718
10719 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10720
ae13219e
DJ
107212007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10722
10723 * inferiors.c (change_inferior_id): Add comment.
10724 * linux-low.c (check_removed_breakpoint): Add an early
10725 prototype. Improve debug output.
10726 (linux_attach): Doc update.
10727 (linux_detach_one_process, linux_detach): Clean up before releasing
10728 each process.
10729 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10730 * linux-low.h (struct process_info): Doc improvement.
10731 * mem-break.c (delete_all_breakpoints): New.
10732 * mem-break.h (delete_all_breakpoints): New prototype.
10733 * thread-db.c (find_first_thread): New.
10734 (thread_db_create_event): Call it instead of
10735 thread_db_find_new_threads. Clean up unused variables.
10736 (maybe_attach_thread): Remove first thread handling.
10737 (thread_db_find_new_threads): Use find_first_thread.
10738 (thread_db_get_tls_address): Likewise.
10739
4105de34
DJ
107402007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10741
10742 * thread-db.c (thread_db_find_new_threads): Add prototype.
10743 (thread_db_create_event): Check for the main thread before adding
10744 a new thread.
10745 (maybe_attach_thread): Only enable event reporting if TID == 0.
10746 (thread_db_get_tls_address): Check for new threads.
10747
2b876972
DJ
107482007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10749
10750 * linux-low.c (linux_create_inferior): Try execv before execvp.
10751 * spu-low.c (spu_create_inferior): Likewise.
10752
7a245884
DJ
107532007-06-13 Mike Frysinger <vapier@gentoo.org>
10754
10755 * linux-low.c (linux_create_inferior): Change execv to execvp.
10756 * spu-low.c (spu_create_inferior): Likewies.
10757
117ce543
DJ
107582007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10759
10760 * Makefile.in (clean): Clean new files instead of deleted ones.
10761 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10762 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10763 rules.
10764 * configure.srv: Specify XML files and new regformats for MIPS and
10765 MIPS64 GNU/Linux.
10766 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10767 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10768 an entry for the restart register.
10769 (mips_cannot_fetch_register, mips_cannot_store_register)
10770 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10771 register names to match the XML descriptions.
10772 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10773 restart register instead of $0.
10774
0e7f50da
UW
107752007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10776 Markus Deuling <deuling@de.ibm.com>
10777
10778 * remote-utils.c (decode_xfer_write): New function.
10779 * server.h (decode_xfer_write): Add prototype.
10780 * server.c (handle_query): Add PACKET_LEN argument. Support
10781 qXfer:spu:read and qXfer:spu:write packets.
10782 (main): Pass packet_len to handle_query.
10783 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10784 * target.h (target_ops): Add qxfer_spu.
10785
374c1d38
UW
107862007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10787
10788 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10789 accessing non-seekable spufs files.
10790
bb63802a
UW
107912007-05-16 Markus Deuling <deuling@de.ibm.com>
10792
889bf7c5 10793 * server.c (handle_query): Add reply for qC packet.
bb63802a 10794
7390519e
PA
107952007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10796 Leo Zayas <lerele@champenstudios@com>
10797
10798 * server.h (check_remote_input_interrupt_request): New function.
10799 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10800 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10801 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10802 (check_remote_input_interrupt_request): New function.
10803 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10804 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10805 winapi_GenerateConsoleCtrlEvent): New typedefs.
10806 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10807 to 250 ms.
10808 (win32_wait): Check for remote interrupt request
10809 with check_remote_input_interrupt_request.
10810 (win32_request_interrupt): New function.
10811 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10812
34b34921
PA
108132007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10814
10815 * win32-low.c (debug_registers_changed,
10816 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10817 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10818 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10819 (thread_rec): Get context using the low target.
10820 (child_add_thread): Call thread_added on the low target,
10821 which does the same thing.
10822 (regptr): Delete.
10823 (do_initial_child_stuff): Remove debug registers references.
10824 Set context using the low target. Resume threads after
10825 setting the contexts.
10826 (child_continue): Remove dead variable. Remove debug
10827 registers references.
10828 (child_fetch_inferior_registers): Go through the low target.
10829 (do_child_store_inferior_registers): Remove.
10830 (child_store_inferior_registers): Go through the low target.
10831 (win32_resume): Remove debug registers references.
10832 Set context using the low target.
10833 (handle_exception): Change return type to void. Don't record
10834 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10835 first chance exception.
889bf7c5 10836 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10837 goto loop. Always return after waiting for debug event.
10838 (win32_wait): Convert to switch statement. Handle spurious
10839 events.
10840
10841 * win32-i386-low.c (debug_registers_changed,
10842 debug_registers_used): New.
10843 (initial_stuff): Rename to ...
10844 (i386_initial_stuff): ... this. Clear debug registers
10845 state variables.
10846 (store_debug_registers): Delete.
10847 (i386_get_thread_context): New.
10848 (load_debug_registers): Delete.
10849 (i386_set_thread_context): New.
10850 (i386_thread_added): New.
10851 (single_step): Rename to ...
10852 (i386_single_step): ... this.
10853 (do_fetch_inferior_registers): Rename to ...
10854 (i386_fetch_inferior_register): ... this.
10855 (i386_store_inferior_register): New.
10856 (the_low_target): Adapt to new interface.
10857
10858 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10859 (arm_get_thread_context): New.
10860 (arm_set_thread_context): New.
10861 (regptr): New.
10862 (do_fetch_inferior_registers): Rename to ...
10863 (arm_fetch_inferior_register): ... this.
10864 (arm_store_inferior_register): New.
10865 (arm_wince_breakpoint): Reimplement as unsigned long.
10866 (arm_wince_breakpoint_len): Define.
10867 (the_low_target): Adapt to new interface.
10868
10869 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10870 load_debug_registers. Add get_thread_context, set_thread_context,
10871 thread_added and store_inferior_register. Rename
10872 fetch_inferior_registers to fetch_inferior_register.
10873 (regptr): Remove declaration.
10874
dd6953e1
PA
108752007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10876
10877 * linux-low.c (linux_detach): Change return type to int. Return 0.
10878 * spu-low.c (spu_detach): Likewise.
10879
444d6139
PA
108802007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10881
10882 * target.h (target_ops): Change return type of detach to int.
10883 Add join.
10884 (join_inferior): New.
10885 * server.c (main): Don't skip detach support on mingw32.
10886 If the inferior doesn't support detaching return error.
10887 Call join_inferior instead of using waitpid.
10888 * linux-low.c (linux_join): New.
10889 (linux_target_op): Add linux_join.
10890 * spu-low.c (spu_join): New.
10891 (spu_target_ops): Add spu_join.
10892 * win32-low.c (win32_detach): Adapt to new interface.
10893 Reopen current_process_handle before detaching. Issue a child
10894 resume before detaching.
10895 (win32_join): New.
10896 (win32_target_op): Add win32_join.
10897
1d5315fe
PA
108982007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10899
10900 * win32-low.c (win32-attach): Fix return value.
10901 * target.h (target_ops): Describe ATTACH return values.
10902
bf914831
PA
109032007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10904
10905 * win32-low.c (GETPROCADDRESS): Define.
10906 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10907 (winapi_DebugSetProcessKillOnExit): Likewise.
10908 (win32_create_inferior): Force usage of ansi CreateProcessA.
10909 (win32_attach): Use GETPROCADDRESS.
10910 (win32_detach): Likewise.
10911
f72f3e60
PA
109122007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10913
10914 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10915
ed50f18f
PA
109162007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10917
10918 * win32-low.c: Commit leftover changes from 2007-03-29.
10919
0c2ead7e
DJ
109202007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10921
10922 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10923 fields short instead of int. Add explicit padding.
10924 (i387_cache_to_fsave): Remove unnecessary casts.
10925 (i387_fsave_to_cache): Doc fix.
10926 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10927
73725ff3
DJ
109282007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10929
10930 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10931 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10932
d99f33d8
PA
109332007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10934
10935 * configure.srv (arm*-*-mingw32ce*): Move near the other
10936 arm targets.
10937
68070c10
PA
109382007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10939
2482afc6 10940 * configure.ac: Add errno checking.
68070c10
PA
10941 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10942 sys/file.h and malloc.h.
10943 (AC_CHECK_DECLS): Add perror.
10944 (srv_mingwce): Handle.
2482afc6 10945 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10946 win32-i386-low.o to srv_tgtobj.
10947 (i[34567]86-*-mingw*): Likewise.
10948 (arm*-*-mingw32ce*): Add case.
10949 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10950 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10951 [__MINGW32CE__] (strerror): New function.
10952 [__MINGW32CE__] (errno): Define to GetLastError.
10953 [__MINGW32CE__] (COUNTOF): New macro.
10954 (remote_open): Remove extra close call.
10955 * mem-break.c (delete_breakpoint_at): New function.
10956 * mem-break.h (delete_breakpoint_at): Declare.
10957 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10958 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10959 [USE_WIN32API] (read, write): Add char* casts.
10960 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10961 * server.h: Include wincecompat.h on Windows CE.
10962 [HAVE_ERRNO_H]: Check.
10963 (perror): Declare if not declared.
10964 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10965 (perror_with_name): Remove errno declaration.
10966 * wincecompat.h: New.
10967 * wincecompat.c: New.
10968 * win32-low.h: New.
10969 * win32-arm-low.c: New.
10970 * win32-i386-low.c: New.
10971 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10972 (OUTMSG2): Make it safe.
10973 (_T): New macro.
10974 (COUNTOF): New macro.
10975 (NUM_REGS): Get it from the low target.
10976 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10977 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10978 (thread_rec): Let low target handle debug registers.
10979 (child_add_thread): Likewise.
10980 (child_init_thread_list): Likewise.
10981 (continue_one_thread): Likewise.
10982 (regptr): New.
10983 (do_child_fetch_inferior_registers): Move to ...
10984 * win32-i386-low.c: ... here, and rename to ...
10985 (do_fetch_inferior_registers): ... this.
889bf7c5 10986 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10987 Go through the low target.
10988 (do_child_store_inferior_registers): Use regptr.
10989 (strwinerror): New function.
10990 (win32_create_inferior): Handle Windows CE.
10991 Use strwinerror instead of strerror on Windows error
10992 codes. Add program to the error output.
10993 Don't close the main thread handle on Windows CE.
10994 (win32_attach): Use coredll.dll on Windows CE.
10995 (win32_kill): Close current process and current
10996 thread handles.
10997 (win32_detach): Use coredll.dll on Windows CE.
10998 (win32_resume): Let low target handle debug registers, and
10999 step request.
11000 (handle_exception): Add/Remove initial breakpoint. Avoid
11001 non-existant WSTOPSIG on Windows CE.
11002 (win32_read_inferior_memory): Cast to remove warning.
11003 (win32_arch_string): Go through the low target.
11004 (initialize_low): Call set_breakpoint_data with the low
11005 target's breakpoint.
11006 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
11007 FOP_REGNUM, mappings): Move to ...
11008 * win32-i386-low.c: ... here.
11009 * win32-low.c (win32_thread_info): Move to ...
11010 * win32-low.h: ... here.
11011 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
11012 win32-arm-low.c and wincecompat.c.
11013 (all:): Add $EXEEXT.
11014 (install-only:): Likewise.
11015 (gdbserver:): Likewise.
11016 (gdbreplay:): Likewise.
11017 * config.in: Regenerate.
11018 * configure: Regenerate.
11019
41093d81
PA
110202007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11021
11022 * win32-low.c: Rename typedef thread_info to
11023 win32_thread_info throughout.
11024
544afa54
PA
110252007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
11026
11027 * win32-i386-low.c: Rename to ...
11028 * win32-low.c: ... this.
11029 * configure.srv: Replace win32-i386-low.o with win32-low.o.
11030 * Makefile.in: Likewise.
11031
bce7165d
PA
110322007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
11033
11034 * remote-utils.c (monitor_output): Constify msg parameter.
11035 * server.h (monitor_output): Likewise.
11036 * win32-i386-low.c (handle_output_debug_string): New.
11037 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
11038 handle_output_debug_string.
11039 (get_child_debug_event): Likewise.
11040
506c7aa0
DJ
110412007-03-27 Mat Hostetter <mat@lcs.mit.edu>
11042
11043 * server.c (main): Correct strtoul check.
11044
42c81e2a
DJ
110452007-03-27 Jon Ringle <jon@ringle.org>
11046
11047 * linux-low.c: Check __ARCH_HAS_MMU__ also.
11048
9453113a
DJ
110492007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
11050
11051 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
11052
64a69107
DJ
110532007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
11054
11055 * terminal.h: Check HAVE_SGTTY_H.
11056
110572007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
11058
11059 * remote-utils.c (remote_open): Print out the assigned port number.
11060
c74d0ad8
DJ
110612007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11062
11063 * remote-utils.c (monitor_output): New function.
11064 * server.c (debug_threads): Define here.
11065 (monitor_show_help): New function.
11066 (handle_query): Handle qRcmd.
11067 (main): Do not handle 'd' packet.
11068 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11069 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11070 of debug_threads.
11071
de7c3b4a
PA
110722007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11073
11074 * Makefile.in (EXEEXT): New.
11075 (clean): Use $(EXEEXT).
11076
ef57601b
PA
110772007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11078
11079 * target.h (target_ops): Rename send_signal to request_interrupt,
11080 and remove enum target_signal parameter.
11081 * linux-low.c (linux_request_interrupt): Rename from
11082 linux_send_signal, and always send SIGINT.
11083 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11084 and always send SIGINT.
11085 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11086 of send_signal.
11087 (input_interrupt): Likewise.
11088
820f2bda
PA
110892007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11090
11091 * server.c (get_features_xml): Check if target implemented
11092 arch_string.
11093 * win32-i386-low.c (win32_arch_string): New.
11094 (win32_target_ops): Add win32_arch_string as arch_string member.
11095
ab39bf24
UW
110962007-02-22 Markus Deuling <deuling@de.ibm.com>
11097
11098 * spu-low.c (spu_arch_string): New.
11099 (spu_target_ops): Add spu_arch_string.
11100
61ff6e04
DJ
111012007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11102
11103 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11104 * configure.ac: Do not check for terminal.h.
11105 * configure, config.in: Regenerated.
11106
fb1e4ffc
DJ
111072007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11108
11109 * Makefile.in (OBS): Add $(XML_BUILTIN).
11110 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11111 (clean): Update.
11112 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11113 (arm-with-iwmmxt.c): New.
11114 * config.in, configure: Regenerate.
11115 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11116 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11117 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11118 (arm*-*-linux*): Add iWMMXt and regset support.
11119 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11120 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11121 (arm_store_wmmxregset, target_regsets): New.
11122 * server.c (get_features_xml): Take annex argument. Check builtin
11123 XML documents.
11124 (handle_query): Handle multiple annexes.
11125
0f48aa01
DJ
111262007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11127
11128 * remote-utils.c [USE_WIN32API] (read, write): Define.
11129 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11130 write.
11131
23181151
DJ
111322007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11133
11134 * linux-i386-low.c (the_low_target): Set arch_string.
11135 * linux-x86-64-low.c (the_low_target): Likewise.
11136 * linux-low.c (linux_arch_string): New.
11137 (linux_target_ops): Add it.
11138 * linux-low.h (struct linux_target_ops): Add arch_string.
11139 * server.c (write_qxfer_response): Use const void * for DATA.
11140 (get_features_xml): New.
11141 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11142 * target.h (struct target_ops): Add arch_string method.
11143
9d606399
DJ
111442007-01-03 Denis Pilat <denis.pilat@st.com>
11145 Daniel Jacobowitz <dan@codesourcery.com>
11146
11147 * linux-low.c (linux_kill): Handle being called with no threads.
11148 * win32-i386-low.c (win32_kill): Likewise.
11149 (get_child_debug_event): Clear current_process_handle.
11150
111512006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11152 Daniel Jacobowitz <dan@codesourcery.com>
11153
11154 * remote-utils.c (remote_open): Check the type of specified
11155 serial port devices before opening them.
11156 * server.c (main): Kill the inferior if an error occurs during
11157 the first remote_open.
11158
a5e13d24
DJ
111592006-12-05 Markus Deuling <deuling@de.ibm.com>
11160
11161 * README: Update supported targets.
11162
186947f7
DJ
111632006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11164
11165 * Makefile.in (clean): Remove reg-mips64.c.
11166 (reg-mips64.c, reg-mips64.o): New rules.
11167 * configure.srv: Handle mips64. Include regset support for mips.
11168 * linux-mips-low.c (union mips_register): New.
11169 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11170 (mips_breakpoint, mips_breakpoint_at): Use int.
11171 (mips_collect_register, mips_supply_register)
11172 (mips_collect_register_32bit, mips_supply_register_32bit)
11173 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11174 (mips_store_fpregset, target_regsets): New.
11175 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11176
a13e2c95
UW
111772006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11178
11179 * configure.srv: Add target "spu*-*-*".
11180 * Makefile.in (clean): Remove reg-spu.c.
11181 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11182 * spu-low.c: New file.
11183
cb7283db
DJ
111842006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11185
11186 * configure.ac: Correct td_thr_tls_get_addr test.
11187 * configure: Regenerated.
11188
89be2091
DJ
111892006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11190
11191 * linux-low.c (linux_wait_for_event): Reformat. Use the
11192 pass_signals array.
11193 * remote-utils.c (decode_address_to_semicolon): New.
11194 * server.c (pass_signals, handle_general_set): New.
11195 (handle_query): Mention QPassSignals for qSupported.
11196 (main): Call handle_general_set.
11197 * server.h (pass_signals, decode_address_to_semicolon): New.
11198
000ef4f0
DJ
111992006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11200
11201 * server.c (handle_query): Correct error handling for read_auxv.
11202
b7149293
UW
112032005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11204
11205 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11206 and srv_linux_thread_db to yes.
11207 * linux-s390-low.c (s390_fill_gregset): New function.
11208 (target_regsets): Define data structure.
11209
dae5f5cf
DJ
112102006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11211
11212 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11213 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11214 * config.in, configure: Regenerated.
11215 * inferiors.c (gdb_id_to_thread): New function.
11216 (gdb_id_to_thread_id): Use it.
11217 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11218 * linux-low.h (struct process_info): Add th member.
11219 (thread_db_get_tls_address): New prototype.
11220 * remote-utils.c (decode_address): Make non-static.
11221 * server.c (handle_query): Handle qGetTLSAddr.
11222 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11223 * target.h (struct target_ops): Add get_tls_address.
11224 * thread-db.c (maybe_attach_thread): Save the thread handle.
11225 (thread_db_get_tls_address): New.
11226
32ca6d61
DJ
112272006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11228
11229 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11230 (linux_resume_one_process): Take a siginfo_t *. Update all
11231 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11232 (struct pending_signals): Add a siginfo_t.
11233 (linux_wait_for_process): Always set last_status.
11234 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11235 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11236 * linux-low.h (struct process_info): Add last_status.
11237
5ffff7c1
DJ
112382006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11239
11240 * remote-utils.c (try_rle): New function.
11241 (putpkt_binary): Use it.
11242
8695c747
DJ
112432006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11244
11245 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11246 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11247 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11248 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11249 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11250 point registers.
11251
290fadea
RS
112522006-08-08 Richard Sandiford <richard@codesourcery.com>
11253
11254 * server.c (terminal_fd): New variable.
11255 (old_foreground_pgrp): Likewise.
11256 (restore_old_foreground_pgrp): New function.
11257 (start_inferior): Record the terminal file descriptor in terminal_fd
11258 and its original foreground group in old_foreground_pgrp. Register
11259 restore_old_foreground_pgrp with atexit().
11260
9f2e1e63
DJ
112612006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11262
11263 * server.c (handle_query): Correct qPart to qXfer.
11264
b80864fb
DJ
112652006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11266
11267 * configure.ac: Check for more headers which are missing on
11268 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11269 * configure.srv: Add Cygwin and mingw32.
11270 * remote-utils.c: Don't include headers unconditionally which
11271 are missing on mingw32. Include <winsock.h> for mingw32.
11272 (remote_open): Adjust for mingw32 support. Flush
11273 standard error after writing to it.
11274 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11275 (unblock_async_io, enable_async_io, disable_async_io)
11276 (readchar, getpkt): Update for Winsock support.
11277 (prepare_resume_reply): Expect a protocol signal number.
11278 * server.c: Disable <sys/wait.h> on mingw32.
11279 (start_inferior): Adjust for mingw32 support. Flush
11280 standard error after writing to it.
11281 (attach_inferior): Likewise. Use protocol signal
11282 numbers.
11283 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11284 and names.
11285 * win32-i386-low.c: New file.
11286 * Makefile.in (XM_CLIBS): Set.
11287 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11288 (win32-i386-low.o): New dependency rule.
11289 * linux-low.c (linux_wait): Use target signal numbers.
11290 * target.h (struct target_ops): Doc fix.
11291 * server.h (target_signal_to_name): New prototype.
11292 * gdbreplay.c: Don't include headers unconditionally which
11293 are missing on mingw32. Include <winsock.h> for mingw32.
11294 (remote_close, remote_open): Adjust for Winsock support.
11295 * configure, config.in: Regenerated.
11296
0876f84a
DJ
112972006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11298
11299 * server.c (decode_xfer_read, write_qxfer_response): New.
11300 (handle_query): Take a packet length argument. Handle
11301 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11302 the qSupported response.
11303 (main): Update call to handle_query.
11304
01f9e8fa
DJ
113052006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11306
11307 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11308 (putpkt_binary): Renamed from putpkt and adjusted for binary
11309 data.
11310 (putpkt): New wrapper for putpkt_binary.
11311 (readchar): Don't mask off the high bit.
11312 (decode_X_packet): New function.
11313 * server.c (main): Call putpkt_binary if a handler sets the packet
11314 length. Save the length of the incoming packet. Handle 'X'.
11315 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11316
be2a5f71
DJ
113172006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11318
11319 * server.c (handle_query): Handle qSupported.
11320
ea025f5f
DJ
113212006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11322
11323 * remote-utils.c (all_symbols_looked_up): New variable.
11324 (look_up_one_symbol): Check it.
11325 * server.h (look_up_one_symbol): New declaration.
11326 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11327
9308fc88
DJ
113282006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11329
11330 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11331 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11332 (PTRACE_GET_THREAD_AREA): Define.
11333 (ps_get_thread_area): New function.
11334
52fb6437
NS
113352006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11336
11337 * configure.srv (m68k*-*-uclinux*): New target.
11338 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11339 (linux_resume_one_process): Remove extraneous cast.
11340 (linux_read_offsets): New.
11341 (linux_target_op): Add linux_read_offsets on mmuless systems.
11342 * server.c (handle_query): Add qOffsets logic.
11343 * target.h (struct target_ops): Add read_offsets.
11344
21b0f40c
DJ
113452006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11346
11347 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11348 (PTRACE_GET_THREAD_AREA): Define.
11349 (ps_get_thread_area): New function.
11350 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11351 (linux-x86-64-low.o): Update.
11352
0050a760
DJ
113532006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11354
11355 * configure.ac: Remove checks for prfpregset_t.
11356 * gdb_proc_service.h: New file.
11357 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11358 new "gdb_proc_service.h".
11359 * proc-service.c: Likewise.
11360 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11361 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11362 * Makefile.in (gdb_proc_service_h): Updated.
11363 * configure, config.in: Regenerated.
11364
b92a518e
DJ
113652006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11366
11367 * remote-utils.c (prepare_resume_reply): Move declaration
11368 of gdb_id_from_wait to the top of the block.
11369
545587ee
DJ
113702006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11371
11372 * linux-low.c (regsets_store_inferior_registers): Read the regset
11373 from the target before filling it.
11374
9db87ebd
DJ
113752006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11376
11377 * server.c (attach_inferior): Return SIGTRAP for a successful
11378 attach.
11379
dd24457d
DJ
113802006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11381
11382 * Makefile.in (OBS): Add version.o.
11383 (STAGESTUFF): Delete.
11384 (version.o): Add dependencies.
11385 (version.c): Replace rule.
11386 (clean): Remove version.c.
11387 * server.c (gdbserver_version): New.
11388 (gdbserver_usage): Use printf.
11389 (main): Handle --version and --help.
11390 * server.h (version, host_name): Add declarations.
11391
6f0f660e
EZ
113922005-12-23 Eli Zaretskii <eliz@gnu.org>
11393
889bf7c5
PA
11394 * linux-arm-low.c:
11395 * linux-arm-low.c:
11396 * inferiors.c:
11397 * i387-fp.h:
11398 * i387-fp.c:
11399 * gdbreplay.c:
11400 * regcache.c:
11401 * proc-service.c:
11402 * mem-break.h:
11403 * mem-break.c:
11404 * linux-x86-64-low.c:
11405 * linux-sh-low.c:
11406 * linux-s390-low.c:
11407 * linux-ppc64-low.c:
11408 * linux-ppc-low.c:
11409 * linux-mips-low.c:
11410 * linux-m68k-low.c:
11411 * linux-m32r-low.c:
11412 * linux-low.h:
11413 * linux-low.c:
11414 * linux-ia64-low.c:
11415 * linux-i386-low.c:
11416 * linux-crisv32-low.c:
11417 * thread-db.c:
11418 * terminal.h:
11419 * target.h:
11420 * target.c:
11421 * server.h:
11422 * server.c:
11423 * remote-utils.c:
11424 * regcache.h:
11425 * utils.c:
11426 * Makefile.in:
11427 * configure.ac:
6f0f660e
EZ
11428 * gdbserver.1: Add (C) after Copyright. Update the FSF
11429 address.
11430
9d1fb177
DJ
114312005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11432
11433 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11434 (arm_breakpoint_at): Recognize both breakpoints.
11435 (the_low_target): Use the correct breakpoint instruction.
11436
011a70c2
DJ
114372005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11438
11439 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11440 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11441 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11442 (the_low_target): Update.
11443
7fb85e41
AS
114442005-10-25 Andreas Schwab <schwab@suse.de>
11445
11446 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11447
11448 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11449 (ia64_num_regs): Reduce to 462.
11450
3db0444b
DJ
114512005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11452
11453 * acinclude.m4: Correct quoting.
11454 * aclocal.m4: Regenerated.
11455
11456 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11457 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11458 (thread_db_init): Call thread_db_err_str.
11459 * configure.ac: Check for TD_VERSION.
11460 * config.in, configure: Regenerated.
11461
bee0189a
DJ
114622005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11463
11464 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11465
e9d25b98
DJ
114662005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11467
11468 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11469 is not available. Define HAVE_PTRACE_GETREGS if it is.
11470 * config.in, configure: Regenerated.
11471 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11472 * linux-i386-low.c, linux-m68k-low.c: Update to use
11473 HAVE_PTRACE_GETREGS.
11474 * linux-low.c (regsets_fetch_inferior_registers)
11475 (regsets_store_inferior_registers): Only return 0 if we processed
11476 GENERAL_REGS.
11477 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11478 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11479
a06660f7
DJ
114802005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11481
11482 * inferiors.c (struct thread_info): Add gdb_id.
11483 (add_thread): Add gdb_id argument.
11484 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11485 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11486 calls to add_thread.
11487 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11488 * server.c (handle_query): Use thread_to_gdb_id.
11489 (handle_v_cont, main): Use gdb_id_to_thread_id.
11490 * server.h (add_thread): Update prototype.
11491 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11492 prototypes.
11493
5a1f5858
DJ
114942005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11495
11496 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11497 left-padded registers.
11498 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11499 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11500
e122f1f5
SE
115012005-07-01 Steve Ellcey <sje@cup.hp.com>
11502
11503 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11504 * configure: Regenerate.
11505 * config.in: Regenerate.
11506 * server.h (NEED_DECLARATION_STRERROR):
11507 Replace with !HAVE_DECL_STRERROR.
11508
d592fa2f
DJ
115092005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11510
11511 * linux-low.c (linux_wait, linux_send_signal): Don't test
11512 an unsigned long variable for > 0 if it could be MAX_ULONG.
11513 * server.c (myresume): Likewise.
11514 * target.c (set_desired_inferior): Likewise.
11515
ccbd4912
MK
115162005-06-13 Mark Kettenis <kettenis@gnu.org>
11517
11518 * configure.ac: Simplify and improve check for socklen_t.
11519 * configure, config.in: Regenerate.
11520
f450004a
DJ
115212005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11522
11523 * acconfig.h: Remove.
11524 * configure.ac: Add a test for socklen_t. Use three-argument
11525 AC_DEFINE throughout.
11526 * config.in: Regenerated using autoheader 2.59.
11527 * configure: Regenerated.
11528
11529 * gdbreplay.c (socklen_t): Provide a default.
11530 (remote_open): Use socklen_t.
11531 * remote-utils.c (socklen_t): Provide a default.
11532 (remote_open): Use socklen_t.
11533 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11534 unsigned char.
11535
11536 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11537 char for buffers.
11538 * linux-low.c (linux_read_memory, linux_write_memory)
11539 (linux_read_auxv): Likewise.
11540 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11541 (check_mem_write): Likewise.
11542 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11543 Likewise.
11544 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11545 (registers_from_string, register_data): Likewise.
11546 * server.c (handle_query, main): Likewise.
11547 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11548 (decode_M_packet): Likewise.
11549 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11550 * target.h (struct target_ops): Update read_memory, write_memory,
11551 and read_auxv.
11552 (read_inferior_memory, write_inferior_memory): Update.
11553 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11554 to unsigned char *.
11555 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11556 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11557 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11558 linux-s390-low.c, linux-sh-low.c: Update for changes in
11559 read_inferior_memory and the_low_target->breakpoint.
11560
eee84df1
DJ
115612005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11562
11563 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11564 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11565 * configure.srv: Add powerpc64-*-linux*.
11566 * linux-ppc64-low.c: New file.
11567
45b134e5
OF
115682005-05-23 Orjan Friberg <orjanf@axis.com>
11569
11570 * linux-cris-low.c: New file with support for CRIS.
11571 * linux-crisv32-low.c: Ditto for CRISv32.
11572 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11573 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11574 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11575 reg-crisv32.o, and reg-crisv32.c to make rules.
11576 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11577 recognized targets.
11578
48d93c75
UW
115792005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11580
11581 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11582 of sizeof (PTRACE_XFER_TYPE).
11583 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11584
e013ee27
OF
115852005-05-12 Orjan Friberg <orjanf@axis.com>
11586
889bf7c5 11587 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11588 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11589 pointers for hardware watchpoint support.
11590 * linux-low.h (struct linux_target_ops): Ditto.
11591 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11592 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11593 to linux_target_ops.
11594 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11595 reply packet.
11596 * server.c (main): Recognize 'Z' and 'z' packets.
11597
b0ded00b
UW
115982005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11599
11600 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11601 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11602 (the_low_target): Add new members.
11603
8643e2ad
DJ
116042005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11605
11606 * proc-service.c (ps_lgetregs): Search all_processes instead of
11607 all_threads.
11608
fc620387
DJ
116092005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11610
11611 * server.c (start_inferior): Change return type to int.
11612 (attach_inferior): Change sigptr to int *.
11613 (handle_v_cont, handle_v_requests): Change signal to int *.
11614 (main): Change signal to int.
11615
116162005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11617
11618 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11619 * configure.srv: Add m32r*-*-linux*.
11620 * linux-m32r-low.c: New file.
11621
e0e76420
DJ
116222005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11623
11624 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11625
a1928bad
DJ
116262005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11627
11628 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11629 Take unsigned long arguments for PIDs.
11630 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11631 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11632 (wait_for_sigstop, linux_resume_one_process)
11633 (regsets_fetch_inferior_registers, linux_send_signal)
11634 (linux_read_auxv): Likewise. Update the types of variables holding
11635 PIDs. Update format string specifiers.
11636 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11637 * remote-utils.c (prepare_resume_reply): Likewise.
11638 * server.c (cont_thread, general_thread, step_thread)
11639 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11640 unsigned long.
11641 (handle_query): Update format specifiers.
11642 (handle_v_cont, main): Use strtoul for thread IDs.
11643 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11644 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11645 (general_thread, step_thread, thread_from_wait)
11646 (old_thread_from_wait): Update.
11647 * target.h (struct thread_resume): Use unsigned long for THREAD.
11648 (struct target_ops): Use unsigned long for arguments to attach and
11649 thread_alive.
11650
dcdb98d2
DJ
116512005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11652
11653 * acinclude.m4: Include bfd/bfd.m4 directly.
11654 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11655 <agriffis@toolchain.org>.
11656 * aclocal.m4, configure: Regenerated.
11657
bec39cab
AC
116582005-01-07 Andrew Cagney <cagney@gnu.org>
11659
11660 * configure.ac: Rename configure.in, require autoconf 2.59.
11661 * configure: Re-generate.
11662
434c4c77
DJ
116632004-12-08 Daniel Jacobowitz <dan@debian.org>
11664
11665 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11666 LIBS when finished.
11667 * aclocal.m4: Regenerated.
11668 * configure: Regenerated.
11669
db1d3e1b
AS
116702004-11-21 Andreas Schwab <schwab@suse.de>
11671
11672 * linux-m68k-low.c (m68k_num_gregs): Define.
11673 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11674 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11675 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11676 (m68k_breakpoint_at): New. Add to the_low_target.
11677
11678 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11679 srv_linux_thread_db to yes.
11680
43360365
JB
116812004-10-20 Joel Brobecker <brobecker@gnat.com>
11682
11683 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11684 (ARCH_SET_FS): Likewise.
11685 (ARCH_GET_FS): Likewise.
11686 (ARCH_GET_GS): Likewise.
11687
fd500816
DJ
116882004-10-16 Daniel Jacobowitz <dan@debian.org>
11689
11690 * linux-i386-low.c (ps_get_thread_area): New.
11691 * linux-x86-64-low.c (ps_get_thread_area): New.
11692 * linux-low.c: Include <sys/syscall.h>.
11693 (linux_kill_one_process): Don't kill the first thread here.
11694 (linux_kill): Kill the first thread here.
11695 (kill_lwp): New function.
11696 (send_sigstop, linux_send_signal): Use it.
11697 * proc-service.c: Clean up #ifdefs.
11698 (fpregset_info): Delete.
11699 (ps_lgetregs): Update and enable implementation.
11700 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11701 implementations.
11702 * remote-utils.c (struct sym_cache, symbol_cache): New.
11703 (input_interrupt): Print a clearer message.
11704 (async_io_enabled): New variable.
11705 (enable_async_io, disable_async_io): Use it. Update comments.
11706 (look_up_one_symbol): Use the symbol cache.
11707 * thread-db.c (thread_db_look_up_symbols): New function.
11708 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11709
f6de3c42
DJ
117102004-10-16 Daniel Jacobowitz <dan@debian.org>
11711
11712 * configure.in: Test for -rdynamic.
11713 * configure: Regenerated.
11714 * Makefile (INTERNAL_LDFLAGS): New.
11715 (gdbserver, gdbreplay): Use it.
11716
2c0fc042
AC
117172004-09-02 Andrew Cagney <cagney@gnu.org>
11718
11719 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11720
075b3282
DJ
117212004-03-23 Daniel Jacobowitz <drow@mvista.com>
11722
11723 * linux-low.c (linux_wait): Clear all_processes list also.
11724
fa6a77dc
DJ
117252004-03-12 Daniel Jacobowitz <drow@mvista.com>
11726
11727 * linux-low.c: Include <errno.h>. Remove extern declaration of
11728 errno.
11729
6d782a97
DJ
117302004-03-12 Daniel Jacobowitz <drow@mvista.com>
11731
11732 * gdbreplay.c, server.h, utils.c: Update copyright years.
11733
3a7fb99b
DJ
117342004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11735
11736 * server.c (main): Print child status or termination signal from
11737 variable 'signal', not 'sig'.
11738
c3e735a6
DJ
117392004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11740
11741 * linux-low.c (linux_read_memory): Change return type to
11742 int. Check for and return error from ptrace().
11743 * target.c (read_inferior_memory): Change return type to int. Pass
11744 back return status from the_target->read_memory().
11745 * target.h (struct target_ops): Adapt *read_memory() prototype.
11746 Update comment.
11747 (read_inferior_memory): Adapt prototype.
11748 * server.c (main): Return an error packet if
11749 read_inferior_memory() returns an error.
11750
a59d1c82
DJ
117512004-03-04 Daniel Jacobowitz <drow@mvista.com>
11752
11753 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11754 Unify with other clean targets.
11755
dc3f8883
DJ
117562004-02-29 Daniel Jacobowitz <drow@mvista.com>
11757
11758 * server.c (handle_v_cont): Call set_desired_inferior.
11759
89a208da
DJ
117602004-02-29 Daniel Jacobowitz <drow@mvista.com>
11761
11762 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11763
62ea82f5
DJ
117642004-02-29 Daniel Jacobowitz <drow@mvista.com>
11765
11766 * linux-low.c (linux_wait): Unblock async I/O.
11767 (linux_resume): Block and enable async I/O.
11768 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11769 * server.h (block_async_io, unblock_async_io): Add prototypes.
11770
6910d122
DJ
117712004-02-29 Daniel Jacobowitz <drow@mvista.com>
11772
11773 * remote-utils.c (remote_open): Print a status notice after
11774 opening a TCP port.
11775 * server.c (attach_inferior): Print a status notice after
11776 attaching.
11777
117782004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11779
11780 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11781
c89dc5d4
DJ
117822004-02-26 Daniel Jacobowitz <drow@mvista.com>
11783
11784 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11785 error packet.
11786 * server.c, target.h: Update copyright years.
11787
4b8dad4a
RM
117882004-02-25 Roland McGrath <roland@redhat.com>
11789
11790 * target.h (struct target_ops): New member `read_auxv'.
11791 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11792 * linux-low.c (linux_read_auxv): New function.
11793 (linux_target_ops): Initialize `read_auxv' member to that.
11794
d7446758
JB
117952004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11796
11797 Committed by Jim Blandy <jimb@redhat.com>.
11798
11799 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11800 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11801 instead of GPR_SIZE to distiguish s390 and s390x targets.
11802
5544ad89
DJ
118032004-01-31 Daniel Jacobowitz <drow@mvista.com>
11804
11805 * linux-low.c: Update copyright year.
11806 (check_removed_breakpoint): Clear pending_is_breakpoint.
11807 (linux_set_resume_request, linux_queue_one_thread)
11808 (resume_status_pending_p): New functions.
11809 (linux_continue_one_thread): Use process->resume.
11810 (linux_resume): Only resume threads if there are no pending events.
11811 * linux-low.h (struct process_info): Add resume request
11812 pointer.
11813
2a68b70e
DJ
118142004-01-30 Daniel Jacobowitz <drow@mvista.com>
11815
11816 * regcache.c (new_register_cache): Clear the allocated register
11817 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11818
64386c31
DJ
118192003-10-13 Daniel Jacobowitz <drow@mvista.com>
11820
11821 * linux-low.c (linux_resume): Take a struct thread_resume *
11822 argument.
11823 (linux_wait): Update call.
11824 (resume_ptr): New static variable.
11825 (linux_continue_one_thread): Renamed from
11826 linux_continue_one_process. Use resume_ptr.
11827 (linux_resume): Use linux_continue_one_thread.
11828 * server.c (handle_v_cont, handle_v_requests): New functions.
11829 (myresume): New function.
11830 (main): Handle 'v' case.
11831 * target.h (struct thread_resume): New type.
11832 (struct target_ops): Change argument of "resume" to struct
11833 thread_resume *.
11834 (myresume): Delete macro.
11835
c938e9b0
L
118362003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11837
11838 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11839 (uninstall): Support DESTDIR.
11840
7f313d07
BC
11841Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11842
11843 * configure.srv: Add xscale*linux copy of arm*linux entry.
11844
3b2fc2ea
DJ
118452003-07-24 Daniel Jacobowitz <drow@mvista.com>
11846
11847 * linux-arm-low.c (arm_reinsert_addr): New function.
11848 (the_low_target): Add arm_reinsert_addr.
11849
1c0a559e
MK
118502003-07-08 Mark Kettenis <kettenis@gnu.org>
11851
11852 * mem-break.c: Remove whitespace at end of file.
11853
43d5792c
DJ
118542003-06-28 Daniel Jacobowitz <drow@mvista.com>
11855
11856 * configure.in: Check whether we need to prototype strerror.
11857 * server.h: Optionally prototype strerror.
11858 * gdbreplay.c (perror_with_name): Use strerror.
11859 * linux-low.c (linux_attach_lwp): Use strerror.
11860 * utils.c (perror_with_name): Use strerror.
11861 * config.in, configure: Regenerated.
11862
c8a86edf
DJ
118632003-06-28 Daniel Jacobowitz <drow@mvista.com>
11864
11865 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11866 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11867
73d37363
DJ
118682003-06-20 Daniel Jacobowitz <drow@mvista.com>
11869
11870 * Makefile.in (SFILES): Update.
11871 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11872 low-sun3.c: Remove files.
11873
6ad8ae5c
DJ
118742003-06-17 Daniel Jacobowitz <drow@mvista.com>
11875
11876 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11877 (linux_detach_one_process, linux_detach): New functions.
11878 (linux_target_ops): Add linux_detach.
11879 * server.c (main): Handle 'D' packet.
11880 * target.h (struct target_ops): Add "detach" member.
11881 (detach_inferior): Define.
11882
1581182a
MK
118832003-06-13 Mark Kettenis <kettenis@gnu.org>
11884
11885 From Kelley Cook <kelleycook@wideopenwest.com>:
11886 * configure.srv: Accept i[34567]86 variants.
11887
e5379b03
DJ
118882003-06-05 Daniel Jacobowitz <drow@mvista.com>
11889
11890 * linux-low.c (linux_wait_for_event): Correct comment typos.
11891 (linux_resume_one_process): Call check_removed_breakpoint.
11892 (linux_send_signal): New function.
11893 (linux_target_ops): Add linux_send_signal.
11894 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11895 of kill.
11896 * target.h (struct target_ops): Add send_signal.
11897
2ff29de4
JB
118982003-05-29 Jim Blandy <jimb@redhat.com>
11899
11900 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11901 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11902 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11903 away part of the register's value.
11904
254787d4
DJ
119052003-03-26 Daniel Jacobowitz <drow@mvista.com>
11906
11907 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11908 (linux_wait_for_event, linux_init_signals): Likewise.
11909
94e10508
DJ
119102003-03-17 Daniel Jacobowitz <drow@mvista.com>
11911
11912 * configure.in: Check for stdlib.h.
11913 * configure: Regenerated.
11914 * config.in: Regenerated.
11915
4c0711e0
DJ
119162003-01-04 Andreas Schwab <schwab@suse.de>
11917
11918 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11919
ef66e766
AC
119202003-01-02 Andrew Cagney <ac131313@redhat.com>
11921
11922 * Makefile.in: Remove obsolete code.
11923
a1358604
DJ
119242002-11-20 Daniel Jacobowitz <drow@mvista.com>
11925
11926 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11927 defined(PT_FPR0_HI).
11928
23ce3b1c
DJ
119292002-11-17 Stuart Hughes <seh@zee2.com>
11930
11931 * linux-arm-low.c (arm_num_regs): Increase.
11932 (arm_regmap): Include status register.
11933
119342002-11-17 Daniel Jacobowitz <drow@mvista.com>
11935
11936 * linux-low.c (register_addr): Remove incorrect -1 check.
11937
a9fa9f7d
DJ
119382002-08-29 Daniel Jacobowitz <drow@mvista.com>
11939
11940 * linux-low.c (linux_create_inferior): Call setpgid. Return
11941 the new PID.
11942 (unstopped_p, linux_signal_pid): Remove.
11943 (linux_target_ops): Remove linux_signal_pid.
11944 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11945 global instead of target method.
11946 * target.h (struct target_ops): Remove signal_pid. Update comment
11947 for create_inferior.
11948 * server.c (signal_pid): New variable.
11949 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11950 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11951 (attach_inferior): Set signal_pid.
11952
17574093
DJ
119532002-08-23 Daniel Jacobowitz <drow@mvista.com>
11954
11955 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11956
119572002-08-20 Jim Blandy <jimb@redhat.com>
11958
11959 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11960 default for this.
11961
119622002-08-01 Andrew Cagney <cagney@redhat.com>
11963
11964 * Makefile.in: Make chill references obsolete.
11965
119662002-07-24 Kevin Buettner <kevinb@redhat.com>
11967
11968 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11969 * configure: Regenerate.
11970 * config.in: Regenerate.
11971
119722002-07-09 David O'Brien <obrien@FreeBSD.org>
11973
11974 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11975 (perror_with_name, remote_close, remote_open, expect, play): Static.
11976
119772002-07-04 Michal Ludvig <mludvig@suse.cz>
11978
4b8dad4a 11979 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11980 byte offsets instead of an array of indexes.
11981 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11982
119832002-06-13 Daniel Jacobowitz <drow@mvista.com>
11984
11985 * regcache.c: Add comment.
11986
119872002-06-11 Daniel Jacobowitz <drow@mvista.com>
11988
11989 * thread-db.c: New file.
11990 * proc-service.c: New file.
11991 * acinclude.m4: New file.
11992 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11993 proc-service.o, and thread-db.o.
11994 (linux-low.o): Add USE_THREAD_DB.
11995 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11996 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11997 * aclocal.m4: Regenerated.
11998 * config.in: Regenerated.
11999 * configure: Regenerated.
12000 * configure.in: Check for proc_service.h, sys/procfs.h,
12001 thread_db.h, and linux/elf.h headrs.
12002 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
12003 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
12004 Check for -lthread_db and thread support.
12005 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
12006 PowerPC, and SuperH.
12007 * i387-fp.c: Constify arguments.
12008 * i387-fp.h: Likewise.
12009 * inferiors.c: (struct thread_info): Renamed from
12010 `struct inferior_info'. Remove PID member. Use generic inferior
12011 list header. All uses updated.
12012 (inferiors, signal_pid): Removed.
12013 (all_threads): New variable.
12014 (get_thread): Define.
12015 (add_inferior_to_list): New function.
12016 (for_each_inferior): New function.
12017 (change_inferior_id): New function.
12018 (add_inferior): Removed.
12019 (remove_inferior): New function.
12020 (add_thread): New function.
12021 (free_one_thread): New function.
12022 (remove_thread): New function.
12023 (clear_inferiors): Use for_each_inferior and free_one_thread.
12024 (find_inferior): New function.
12025 (find_inferior_id): New function.
12026 (inferior_target_data): Update argument type.
12027 (set_inferior_target_data): Likewise.
12028 (inferior_regcache_data): Likewise.
12029 (set_inferior_regcache_data): Likewise.
12030 * linux-low.c (linux_bp_reinsert): Remove.
12031 (all_processes, stopping_threads, using_thrads)
12032 (struct pending_signals, debug_threads, pid_of): New.
12033 (inferior_pid): Replace with macro.
12034 (struct inferior_linux_data): Remove.
12035 (get_stop_pc, add_process): New functions.
12036 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
12037 Use add_process and add_thread.
12038 (linux_attach_lwp): New function, based on old linux_attach. Use
12039 add_process and add_thread. Set stop_expected for new threads.
12040 (linux_attach): New function.
12041 (linux_kill_one_process): New function.
12042 (linux_kill): Kill all LWPs.
12043 (linux_thread_alive): Use find_inferior_id.
12044 (check_removed_breakpoints, status_pending_p): New functions.
12045 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
12046 Update. Use WNOHANG. Wait for cloned processes also. Update process
12047 struct for the found process.
12048 (linux_wait_for_event): New function.
12049 (linux_wait): Use it. Support LWPs.
12050 (send_sigstop, wait_for_sigstop, stop_all_processes)
12051 (linux_resume_one_process, linux_continue_one_process): New functions.
12052 (linux_resume): Support LWPs.
12053 (REGISTER_RAW_SIZE): Remove.
12054 (fetch_register): Use register_size instead. Call supply_register.
12055 (usr_store_inferior_registers): Likewise. Call collect_register.
12056 Fix recursive case.
12057 (regsets_fetch_inferior_registers): Improve error message.
12058 (regsets_store_inferior_registers): Add debugging.
12059 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
12060 (unstopped_p, linux_signal_pid): New functions.
12061 (linux_target_ops): Add linux_signal_pid.
12062 (linux_init_signals): New function.
12063 (initialize_low): Call it. Initialize using_threads.
12064 * regcache.c (inferior_regcache_data): Add valid
12065 flag.
12066 (get_regcache): Fetch registers lazily. Add fetch argument
12067 and update all callers.
12068 (regcache_invalidate_one, regcache_invalidate): New
12069 functions.
12070 (new_register_cache): Renamed from create_register_cache.
12071 Return the new regcache.
12072 (free_register_cache): Change argument to a void *.
12073 (registers_to_string, registers_from_string): Call get_regcache
12074 with fetch flag set.
12075 (register_data): Make static. Pass fetch flag to get_regcache.
12076 (supply_register): Call get_regcache with fetch flag clear.
12077 (collect_register): Call get_regcache with fetch flag set.
12078 (collect_register_as_string): New function.
12079 * regcache.h: Update.
12080 * remote-utils.c (putpkt): Flush after debug output and use
12081 stderr.
12082 Handle input interrupts while waiting for an ACK.
12083 (input_interrupt): Use signal_pid method.
12084 (getpkt): Flush after debug output and use stderr.
12085 (outreg): Use collect_register_as_string.
12086 (new_thread_notify, dead_thread_notify): New functions.
12087 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12088 and general_thread.
12089 (look_up_one_symbol): Flush after debug output.
12090 * server.c (step_thread, server_waiting): New variables.
12091 (start_inferior): Don't use signal_pid. Update call to mywait.
12092 (attach_inferior): Update call to mywait.
12093 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12094 (main): Don't fetch/store registers explicitly. Use
12095 set_desired_inferior. Support proposed ``Hs'' packet. Update
12096 calls to mywait.
12097 * server.h: Update.
12098 (struct inferior_list, struct_inferior_list_entry): New.
12099 * target.c (set_desired_inferior): New.
12100 (write_inferior_memory): Constify.
12101 (mywait): New function.
12102 * target.h: Update.
12103 (struct target_ops): New signal_pid method.
12104 (mywait): Removed macro, added prototype.
12105
12106 * linux-low.h (regset_func): Removed.
12107 (regset_fill_func, regset_store_func): New.
12108 (enum regset_type): New.
12109 (struct regset_info): Add type field. Use new operation types.
12110 (struct linux_target_ops): stop_pc renamed to get_pc.
12111 Add decr_pc_after_break and breakpoint_at.
12112 (get_process, get_thread_proess, get_process_thread)
12113 (strut process_info, all_processes, linux_attach_lwp)
12114 (thread_db_init): New.
12115
12116 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12117 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12118 (the_low_target): Add new members.
12119 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12120 (i386_store_fpxregset): Constify.
12121 (target_regsets): Add new kind identifier.
12122 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12123 (i386_set_pc): Add debugging.
12124 (i386_breakpoint_at): New function.
12125 (the_low_target): Add new members.
12126 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12127 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12128 (mips_breakpoint_at): New.
12129 (the_low_target): Add new members.
12130 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12131 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12132 (the_low_target): Add new members.
12133 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12134 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12135 (the_low_target): Add new members.
12136 * linux-x86-64-low.c (target_regsets): Add new kind
12137 identifier.
12138
121392002-05-15 Daniel Jacobowitz <drow@mvista.com>
12140
12141 From Martin Pool <mbp@samba.org>:
12142 * server.c (gdbserver_usage): New function.
12143 (main): Call it.
12144
121452002-05-14 Daniel Jacobowitz <drow@mvista.com>
12146
12147 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12148 stop_at -> stop_pc.
12149
121502002-05-04 Andrew Cagney <ac131313@redhat.com>
12151
12152 * Makefile.in: Remove obsolete code.
12153
121542002-04-24 Michal Ludvig <mludvig@suse.cz>
12155
12156 * linux-low.c (regsets_fetch_inferior_registers),
12157 (regsets_store_inferior_registers): Removed cast to int from
12158 ptrace() calls.
12159 * regcache.h: Added declaration of struct inferior_info.
12160
121612002-04-20 Daniel Jacobowitz <drow@mvista.com>
12162
12163 * inferiors.c (struct inferior_info): Add regcache_data.
12164 (add_inferior): Call create_register_cache.
12165 (clear_inferiors): Call free_register_cache.
12166 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12167 * regcache.c (struct inferior_regcache_data): New.
12168 (registers): Remove.
12169 (get_regcache): New function.
12170 (create_register_cache, free_register_cache): New functions.
12171 (set_register_cache): Don't initialize the register cache here.
12172 (registers_to_string, registers_from_string, register_data): Call
12173 get_regcache.
12174 * regcache.h: Add prototypes.
12175 * server.h: Likewise.
12176
121772002-04-20 Daniel Jacobowitz <drow@mvista.com>
12178
12179 * mem-break.c: New file.
12180 * mem-break.h: New file.
12181 * Makefile.in: Add mem-break.o rule; update server.h
12182 dependencies.
12183 * inferiors.c (struct inferior_info): Add target_data
12184 member.
12185 (clear_inferiors): Free target_data member if set.
12186 (inferior_target_data, set_inferior_target_data): New functions.
12187 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12188 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12189 * linux-low.c (linux_bp_reinsert): New variable.
12190 (struct inferior_linux_data): New.
12191 (linux_create_inferior): Use set_inferior_target_data.
12192 (linux_attach): Likewise. Call add_inferior.
12193 (linux_wait_for_one_inferior): New function.
12194 (linux_wait): Call it.
12195 (linux_write_memory): Add const.
12196 (initialize_low): Call set_breakpoint_data.
12197 * linux-low.h (struct linux_target_ops): Add breakpoint
12198 handling members.
12199 * server.c (attach_inferior): Remove extra add_inferior
12200 call.
12201 * server.h: Include mem-break.h. Update inferior.c
12202 prototypes.
12203 * target.c (read_inferior_memory)
12204 (write_inferior_memory): New functions.
12205 * target.h (read_inferior_memory)
12206 (write_inferior_memory): Change macros to prototypes.
12207 (struct target_ops): Update comments. Add const to write_memory
12208 definition.
12209
122102002-04-11 Daniel Jacobowitz <drow@mvista.com>
12211
12212 * linux-low.c (usr_store_inferior_registers): Support
12213 registers which are allowed to fail to store.
12214 * linux-low.h (linux_target_ops): Likewise.
12215 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12216 (ppc_cannot_store_register): FPSCR may not be storable.
12217
122182002-04-09 Daniel Jacobowitz <drow@mvista.com>
12219
12220 * server.h: Include <string.h> if HAVE_STRING_H.
12221 * ChangeLog: Correct paths in last ChangeLog entry.
12222
122232002-04-09 Daniel Jacobowitz <drow@mvista.com>
12224
12225 * linux-low.h: Remove obsolete prototypes.
12226 (struct linux_target_ops): New.
12227 (extern the_low_target): New.
12228 * linux-low.c (num_regs, regmap): Remove declarations.
12229 (register_addr): Use the_low_target explicitly.
12230 (fetch_register): Likewise.
12231 (usr_fetch_inferior_registers): Likewise.
12232 (usr_store_inferior_registers): Likewise.
12233 * linux-arm-low.c (num_regs): Remove.
12234 (arm_num_regs): Define.
12235 (arm_regmap): Renamed from regmap, made static.
12236 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12237 made static.
12238 (arm_cannot_store_register): Renamed from cannot_store_register,
12239 made static.
12240 (the_low_target): New.
12241 * linux-i386-low.c (num_regs): Remove.
12242 (i386_num_regs): Define.
12243 (i386_regmap): Renamed from regmap, made static.
12244 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12245 made static.
12246 (i386_cannot_store_register): Renamed from cannot_store_register,
12247 made static.
12248 (the_low_target): New.
12249 * linux-ia64-low.c (num_regs): Remove.
12250 (ia64_num_regs): Define.
12251 (ia64_regmap): Renamed from regmap, made static.
12252 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12253 made static.
12254 (ia64_cannot_store_register): Renamed from cannot_store_register,
12255 made static.
12256 (the_low_target): New.
12257 * linux-m68k-low.c (num_regs): Remove.
12258 (m68k_num_regs): Define.
12259 (m68k_regmap): Renamed from regmap, made static.
12260 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12261 made static.
12262 (m68k_cannot_store_register): Renamed from cannot_store_register,
12263 made static.
12264 (the_low_target): New.
12265 * linux-mips-low.c (num_regs): Remove.
12266 (mips_num_regs): Define.
12267 (mips_regmap): Renamed from regmap, made static.
12268 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12269 made static.
12270 (mips_cannot_store_register): Renamed from cannot_store_register,
12271 made static.
12272 (the_low_target): New.
12273 * linux-ppc-low.c (num_regs): Remove.
12274 (ppc_num_regs): Define.
12275 (ppc_regmap): Renamed from regmap, made static.
12276 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12277 made static.
12278 (ppc_cannot_store_register): Renamed from cannot_store_register,
12279 made static.
12280 (the_low_target): New.
12281 * linux-s390-low.c (num_regs): Remove.
12282 (s390_num_regs): Define.
12283 (s390_regmap): Renamed from regmap, made static.
12284 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12285 made static.
12286 (s390_cannot_store_register): Renamed from cannot_store_register,
12287 made static.
12288 (the_low_target): New.
12289 * linux-sh-low.c (num_regs): Remove.
12290 (sh_num_regs): Define.
12291 (sh_regmap): Renamed from regmap, made static.
12292 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12293 made static.
12294 (sh_cannot_store_register): Renamed from cannot_store_register,
12295 made static.
12296 (the_low_target): New.
12297 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12298 (the_low_target): New.
12299
123002002-04-09 Daniel Jacobowitz <drow@mvista.com>
12301
12302 * Makefile.in: Add stamp-h target.
12303 * configure.in: Create stamp-h.
12304 * configure: Regenerated.
12305
123062002-04-09 Daniel Jacobowitz <drow@mvista.com>
12307
12308 * inferiors.c: New file.
12309 * target.c: New file.
12310 * target.h: New file.
12311 * Makefile.in: Add target.o and inferiors.o. Update
12312 dependencies.
12313 * linux-low.c (inferior_pid): New static variable,
12314 moved from server.c.
12315 (linux_create_inferior): Renamed from create_inferior.
12316 Call add_inferior. Return 0 on success instead of a PID.
12317 (linux_attach): Renamed from myattach.
12318 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12319 (linux_thread_alive): Renamed from mythread_alive.
12320 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12321 child dies.
12322 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12323 (regsets_store_inferior_registers): Correct error message.
12324 Add missing ``return 0''.
12325 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12326 (linux_store_registers): Renamed from store_inferior_registers.
12327 (linux_read_memory): Renamed from read_inferior_memory.
12328 (linux_write_memory): Renamed from write_inferior_memory.
12329 (linux_target_ops): New structure.
12330 (initialize_low): Call set_target_ops ().
12331 * remote-utils.c (unhexify): New function.
12332 (hexify): New function.
12333 (input_interrupt): Send signals to ``signal_pid''.
12334 * server.c (inferior_pid): Remove.
12335 (start_inferior): Update create_inferior call.
12336 (attach_inferior): Call add_inferior.
12337 (handle_query): New function.
12338 (main): Call handle_query for `q' packets.
12339 * server.h: Include "target.h". Remove obsolete prototypes.
12340 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12341
123422002-04-09 Daniel Jacobowitz <drow@mvista.com>
12343
12344 * Makefile.in: Add WARN_CFLAGS. Update configury
12345 dependencies.
12346 * configure.in: Check for <string.h>
12347 * configure: Regenerate.
12348 * config.in: Regenerate.
12349 * gdbreplay.c: Include needed system headers.
12350 (remote_open): Remove strchr prototype.
12351 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12352 * regcache.c (supply_register): Change buf argument to const void *.
12353 (supply_register_by_name): Likewise.
12354 (collect_register): Change buf argument to void *.
12355 (collect_register_by_name): Likewise.
12356 * regcache.h: Add missing prototypes.
12357 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12358 * server.c (handle_query): New function.
12359 (attached): New static variable, moved out of main.
12360 (main): Quiet longjmp clobber warnings.
12361 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12362 * utils.c (error): Remove NORETURN.
12363 (fatal): Likewise.