]> git.ipfire.org Git - thirdparty/binutils-gdb.git/blame - gdb/gdbserver/ChangeLog
Add casts to memory allocation related calls
[thirdparty/binutils-gdb.git] / gdb / gdbserver / ChangeLog
CommitLineData
224c3ddb
SM
12015-09-25 Simon Marchi <simon.marchi@ericsson.com>
2
3 * ax.c (gdb_parse_agent_expr): Add cast to allocation result
4 assignment.
5 (gdb_unparse_agent_expr): Likewise.
6 * hostio.c (require_data): Likewise.
7 (handle_pread): Likewise.
8 * linux-low.c (disable_regset): Likewise.
9 (fetch_register): Likewise.
10 (store_register): Likewise.
11 (get_dynamic): Likewise.
12 (linux_qxfer_libraries_svr4): Likewise.
13 * mem-break.c (delete_fast_tracepoint_jump): Likewise.
14 (set_fast_tracepoint_jump): Likewise.
15 (uninsert_fast_tracepoint_jumps_at): Likewise.
16 (reinsert_fast_tracepoint_jumps_at): Likewise.
17 (validate_inserted_breakpoint): Likewise.
18 (clone_agent_expr): Likewise.
19 * regcache.c (init_register_cache): Likewise.
20 * remote-utils.c (putpkt_binary_1): Likewise.
21 (decode_M_packet): Likewise.
22 (decode_X_packet): Likewise.
23 (look_up_one_symbol): Likewise.
24 (relocate_instruction): Likewise.
25 (monitor_output): Likewise.
26 * server.c (handle_search_memory): Likewise.
27 (handle_qxfer_exec_file): Likewise.
28 (handle_qxfer_libraries): Likewise.
29 (handle_qxfer): Likewise.
30 (handle_query): Likewise.
31 (handle_v_cont): Likewise.
32 (handle_v_run): Likewise.
33 (captured_main): Likewise.
34 * target.c (write_inferior_memory): Likewise.
35 * thread-db.c (try_thread_db_load_from_dir): Likewise.
36 * tracepoint.c (init_trace_buffer): Likewise.
37 (add_tracepoint_action): Likewise.
38 (add_traceframe): Likewise.
39 (add_traceframe_block): Likewise.
40 (cmd_qtdpsrc): Likewise.
41 (cmd_qtdv): Likewise.
42 (cmd_qtstatus): Likewise.
43 (response_source): Likewise.
44 (response_tsv): Likewise.
45 (cmd_qtnotes): Likewise.
46 (gdb_collect): Likewise.
47 (initialize_tracepoint): Likewise.
48
afbe19f8
PL
492015-09-21 Pierre Langlois <pierre.langlois@arm.com>
50
51 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
52 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
53 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
54 <NOP>: New.
55 (enum aarch64_condition_codes): New enum.
56 (w0): New static global.
57 (fp): Likewise.
58 (lr): Likewise.
59 (struct aarch64_memory_operand) <type>: New
60 MEMORY_OPERAND_POSTINDEX type.
61 (postindex_memory_operand): New helper function.
62 (emit_ret): New function.
63 (emit_load_store_pair): New function, factored out of emit_stp
64 with support for MEMORY_OPERAND_POSTINDEX.
65 (emit_stp): Rewrite using emit_load_store_pair.
66 (emit_ldp): New function.
67 (emit_load_store): Likewise.
68 (emit_ldr): Mention post-index instruction in comment.
69 (emit_ldrh): New function.
70 (emit_ldrb): New function.
71 (emit_ldrsw): Mention post-index instruction in comment.
72 (emit_str): Likewise.
73 (emit_subs): New function.
74 (emit_cmp): Likewise.
75 (emit_and): Likewise.
76 (emit_orr): Likewise.
77 (emit_orn): Likewise.
78 (emit_eor): Likewise.
79 (emit_mvn): Likewise.
80 (emit_lslv): Likewise.
81 (emit_lsrv): Likewise.
82 (emit_asrv): Likewise.
83 (emit_mul): Likewise.
84 (emit_sbfm): Likewise.
85 (emit_sbfx): Likewise.
86 (emit_ubfm): Likewise.
87 (emit_ubfx): Likewise.
88 (emit_csinc): Likewise.
89 (emit_cset): Likewise.
90 (emit_nop): Likewise.
91 (emit_ops_insns): New helper function.
92 (emit_pop): Likewise.
93 (emit_push): Likewise.
94 (aarch64_emit_prologue): New function.
95 (aarch64_emit_epilogue): Likewise.
96 (aarch64_emit_add): Likewise.
97 (aarch64_emit_sub): Likewise.
98 (aarch64_emit_mul): Likewise.
99 (aarch64_emit_lsh): Likewise.
100 (aarch64_emit_rsh_signed): Likewise.
101 (aarch64_emit_rsh_unsigned): Likewise.
102 (aarch64_emit_ext): Likewise.
103 (aarch64_emit_log_not): Likewise.
104 (aarch64_emit_bit_and): Likewise.
105 (aarch64_emit_bit_or): Likewise.
106 (aarch64_emit_bit_xor): Likewise.
107 (aarch64_emit_bit_not): Likewise.
108 (aarch64_emit_equal): Likewise.
109 (aarch64_emit_less_signed): Likewise.
110 (aarch64_emit_less_unsigned): Likewise.
111 (aarch64_emit_ref): Likewise.
112 (aarch64_emit_if_goto): Likewise.
113 (aarch64_emit_goto): Likewise.
114 (aarch64_write_goto_address): Likewise.
115 (aarch64_emit_const): Likewise.
116 (aarch64_emit_call): Likewise.
117 (aarch64_emit_reg): Likewise.
118 (aarch64_emit_pop): Likewise.
119 (aarch64_emit_stack_flush): Likewise.
120 (aarch64_emit_zero_ext): Likewise.
121 (aarch64_emit_swap): Likewise.
122 (aarch64_emit_stack_adjust): Likewise.
123 (aarch64_emit_int_call_1): Likewise.
124 (aarch64_emit_void_call_2): Likewise.
125 (aarch64_emit_eq_goto): Likewise.
126 (aarch64_emit_ne_goto): Likewise.
127 (aarch64_emit_lt_goto): Likewise.
128 (aarch64_emit_le_goto): Likewise.
129 (aarch64_emit_gt_goto): Likewise.
130 (aarch64_emit_ge_got): Likewise.
131 (aarch64_emit_ops_impl): New static global variable.
132 (aarch64_emit_ops): New target function, return
133 &aarch64_emit_ops_impl.
134 (struct linux_target_ops): Install it.
135
bb903df0
PL
1362015-09-21 Pierre Langlois <pierre.langlois@arm.com>
137
138 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
139 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
140 aarch64-ipa.o.
141 * linux-aarch64-ipa.c: New file.
142 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
143 and endian.h.
144 (aarch64_get_thread_area): New target method.
145 (extract_signed_bitfield): New helper function.
146 (aarch64_decode_ldr_literal): New function.
147 (enum aarch64_opcodes): New enum.
148 (struct aarch64_register): New struct.
149 (struct aarch64_operand): New struct.
150 (x0): New static global.
151 (x1): Likewise.
152 (x2): Likewise.
153 (x3): Likewise.
154 (x4): Likewise.
155 (w2): Likewise.
156 (ip0): Likewise.
157 (sp): Likewise.
158 (xzr): Likewise.
159 (aarch64_register): New helper function.
160 (register_operand): Likewise.
161 (immediate_operand): Likewise.
162 (struct aarch64_memory_operand): New struct.
163 (offset_memory_operand): New helper function.
164 (preindex_memory_operand): Likewise.
165 (enum aarch64_system_control_registers): New enum.
166 (ENCODE): New macro.
167 (emit_insn): New helper function.
168 (emit_b): New function.
169 (emit_bcond): Likewise.
170 (emit_cb): Likewise.
171 (emit_tb): Likewise.
172 (emit_blr): Likewise.
173 (emit_stp): Likewise.
174 (emit_ldp_q_offset): Likewise.
175 (emit_stp_q_offset): Likewise.
176 (emit_load_store): Likewise.
177 (emit_ldr): Likewise.
178 (emit_ldrsw): Likewise.
179 (emit_str): Likewise.
180 (emit_ldaxr): Likewise.
181 (emit_stxr): Likewise.
182 (emit_stlr): Likewise.
183 (emit_data_processing_reg): Likewise.
184 (emit_data_processing): Likewise.
185 (emit_add): Likewise.
186 (emit_sub): Likewise.
187 (emit_mov): Likewise.
188 (emit_movk): Likewise.
189 (emit_mov_addr): Likewise.
190 (emit_mrs): Likewise.
191 (emit_msr): Likewise.
192 (emit_sevl): Likewise.
193 (emit_wfe): Likewise.
194 (append_insns): Likewise.
195 (can_encode_int32_in): New helper function.
196 (aarch64_relocate_instruction): New function.
197 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
198 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
199 (struct linux_target_ops): Install aarch64_get_thread_area,
200 aarch64_install_fast_tracepoint_jump_pad and
201 aarch64_get_min_fast_tracepoint_insn_len.
202
787749ea
PL
2032015-09-21 Pierre Langlois <pierre.langlois@arm.com>
204
205 * Makefile.in (aarch64-insn.o): New rule.
206 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
207
9812b2e6
YQ
2082015-09-21 Yao Qi <yao.qi@linaro.org>
209
210 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
211
18fe412b
YQ
2122015-09-21 Yao Qi <yao.qi@linaro.org>
213
214 * tracepoint.c (max_jump_pad_size): Remove.
215
a0cc84cd
YQ
2162015-09-18 Yao Qi <yao.qi@linaro.org>
217
218 * linux-aarch64-low.c: Don't include sys/uio.h.
219 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
220
d78908cf
WW
2212015-09-16 Wei-cheng Wang <cole945@gmail.com>
222
223 * tracepoint.c (eval_result_type): Change prototype.
224 (condition_true_at_tracepoint): Fix argument to compiled_cond.
225
d57e0d50
PA
2262015-09-15 Pedro Alves <palves@redhat.com>
227
228 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
229 Check whether to report exec events instead of checking whether
230 multiprocess is enabled.
231
5a676acc
PA
2322015-09-15 Pedro Alves <palves@redhat.com>
233
234 PR remote/18965
235 * remote-utils.c (prepare_resume_reply): Merge
236 TARGET_WAITKIND_VFORK_DONE switch case with the
237 TARGET_WAITKIND_FORKED case.
238
7c5d0fad
YQ
2392015-09-15 Yao Qi <yao.qi@linaro.org>
240
241 * server.c (handle_query): Check string comparison using
242 "else if" instead of "if".
243
750ce8d1
YQ
2442015-09-15 Yao Qi <yao.qi@linaro.org>
245
246 * server.c (vCont_supported): New global variable.
247 (handle_query): Set vCont_supported to 1 if "vContSupported+"
248 matches. Append ";vContSupported+" to own_buf.
249 (handle_v_requests): Append ";s;S" to own_buf if target supports
250 hardware single step or vCont_supported is false.
251 (capture_main): Set vCont_supported to zero.
252
70b90b91
YQ
2532015-09-15 Yao Qi <yao.qi@linaro.org>
254
255 * linux-low.c (linux_supports_conditional_breakpoints): Rename
256 it to ...
257 (linux_supports_hardware_single_step): ... New function.
258 (linux_target_ops): Update.
259 * lynx-low.c (lynx_target_ops): Set field
260 supports_hardware_single_step to target_can_do_hardware_single_step.
261 * nto-low.c (nto_target_ops): Likewise.
262 * spu-low.c (spu_target_ops): Likewise.
263 * win32-low.c (win32_target_ops): Likewise.
264 * target.c (target_can_do_hardware_single_step): New function.
265 * target.h (struct target_ops) <supports_conditional_breakpoints>:
266 Remove. <supports_hardware_single_step>: New field.
267 (target_supports_conditional_breakpoints): Remove.
268 (target_supports_hardware_single_step): New macro.
269 (target_can_do_hardware_single_step): Declare.
270 * server.c (handle_query): Use target_supports_hardware_single_step
271 instead of target_supports_conditional_breakpoints.
272
ade90bde
YQ
2732015-09-15 Yao Qi <yao.qi@linaro.org>
274
275 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
276 function.
277 (struct linux_target_ops the_low_target): Install
278 aarch64_linux_siginfo_fixup.
279
94585166
DB
2802015-09-11 Don Breazeal <donb@codesourcery.com>
281 Luis Machado <lgustavo@codesourcery.com>
282
283 * linux-low.c (linux_mourn): Static declaration.
284 (linux_arch_setup): Move in front of
285 handle_extended_wait.
286 (linux_arch_setup_thread): New function.
287 (handle_extended_wait): Handle exec events. Call
288 linux_arch_setup_thread. Make event_lwp argument a
289 pointer-to-a-pointer.
290 (check_zombie_leaders): Do not check stopped threads.
291 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
292 (linux_low_filter_event): Add lwp and thread for exec'ing
293 non-leader thread if leader thread has been deleted.
294 Refactor code into linux_arch_setup_thread and call it.
295 Pass child lwp pointer by reference to handle_extended_wait.
296 (linux_wait_for_event_filtered): Update comment.
297 (linux_wait_1): Prevent clobbering exec event status.
298 (linux_supports_exec_events): New function.
299 (linux_target_ops) <supports_exec_events>: Initialize new member.
300 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
301 new member.
302 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
303 * server.c (report_exec_events): New global variable.
304 (handle_query): Handle qSupported query for exec-events feature.
305 (captured_main): Initialize report_exec_events.
306 * server.h (report_exec_events): Declare new global variable.
307 * target.h (struct target_ops) <supports_exec_events>: New
308 member.
309 (target_supports_exec_events): New macro.
310 * win32-low.c (win32_target_ops) <supports_exec_events>:
311 Initialize new member.
312
0568462b
MM
3132015-09-09 Markus Metzger <markus.t.metzger@intel.com>
314
315 * linux-low.c (linux_low_enable_btrace): Remove.
316 (linux_target_ops): Replace linux_low_enable_btrace with
317 linux_enable_btrace.
318
39edd165
YQ
3192015-09-03 Yao Qi <yao.qi@linaro.org>
320
321 * linux-aarch64-low.c (aarch64_insert_point): Call
322 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
323 returns true.
324
1db33b5a
UW
3252015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
326
327 * linux-low.c (check_stopped_by_breakpoint): Use
328 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
329
ab290430
PA
3302015-08-27 Pedro Alves <palves@redhat.com>
331
332 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
333
8d749320
SM
3342015-08-26 Simon Marchi <simon.marchi@ericsson.com>
335
6711b7f8
SM
336 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
337 the XNEW-family equivalent.
8d749320
SM
338 (compile_bytecodes): Likewise.
339 * dll.c (loaded_dll): Likewise.
340 * event-loop.c (append_callback_event): Likewise.
341 (create_file_handler): Likewise.
342 (create_file_event): Likewise.
343 * hostio.c (handle_open): Likewise.
344 * inferiors.c (add_thread): Likewise.
345 (add_process): Likewise.
346 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
347 * linux-arm-low.c (arm_new_process): Likewise.
348 (arm_new_thread): Likewise.
349 * linux-low.c (add_to_pid_list): Likewise.
350 (linux_add_process): Likewise.
351 (handle_extended_wait): Likewise.
352 (add_lwp): Likewise.
353 (enqueue_one_deferred_signal): Likewise.
354 (enqueue_pending_signal): Likewise.
355 (linux_resume_one_lwp_throw): Likewise.
356 (linux_resume_one_thread): Likewise.
357 (linux_read_memory): Likewise.
358 (linux_write_memory): Likewise.
359 * linux-mips-low.c (mips_linux_new_process): Likewise.
360 (mips_linux_new_thread): Likewise.
361 (mips_add_watchpoint): Likewise.
362 * linux-x86-low.c (initialize_low_arch): Likewise.
363 * lynx-low.c (lynx_add_process): Likewise.
364 * mem-break.c (set_raw_breakpoint_at): Likewise.
365 (set_breakpoint): Likewise.
366 (add_condition_to_breakpoint): Likewise.
367 (add_commands_to_breakpoint): Likewise.
368 (clone_agent_expr): Likewise.
369 (clone_one_breakpoint): Likewise.
370 * regcache.c (new_register_cache): Likewise.
371 * remote-utils.c (look_up_one_symbol): Likewise.
372 * server.c (queue_stop_reply): Likewise.
373 (start_inferior): Likewise.
374 (queue_stop_reply_callback): Likewise.
375 (handle_target_event): Likewise.
376 * spu-low.c (fetch_ppc_memory): Likewise.
377 (store_ppc_memory): Likewise.
378 * target.c (set_target_ops): Likewise.
379 * thread-db.c (thread_db_load_search): Likewise.
380 (try_thread_db_load_1): Likewise.
381 * tracepoint.c (add_tracepoint): Likewise.
382 (add_tracepoint_action): Likewise.
383 (create_trace_state_variable): Likewise.
384 (cmd_qtdpsrc): Likewise.
385 (cmd_qtro): Likewise.
386 (add_while_stepping_state): Likewise.
387 * win32-low.c (child_add_thread): Likewise.
388 (get_image_name): Likewise.
389
ed8b7b42
YQ
3902015-08-25 Yao Qi <yao.qi@linaro.org>
391
392 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
393
db3cb7cb
YQ
3942015-08-25 Yao Qi <yao.qi@linaro.org>
395
396 * Makefile.in (aarch64-linux.o): New rule.
397 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
398 srv_tgtobj.
399 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
400 (aarch64_init_debug_reg_state): Make it extern.
401 (aarch64_linux_prepare_to_resume): Remove.
402
f6011a1c
YQ
4032015-08-25 Yao Qi <yao.qi@linaro.org>
404
405 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
406 lwp_arch_private_info and ptid_of_lwp.
407
88e2cf7e
YQ
4082015-08-25 Yao Qi <yao.qi@linaro.org>
409
410 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
411 Find proc_info by find_process_pid. All callers updated.
412
5e35436e
YQ
4132015-08-25 Yao Qi <yao.qi@linaro.org>
414
415 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
416 Remove.
417 (debug_reg_change_callback): Remove.
418 (aarch64_notify_debug_reg_change): Remove.
419
4a8a7965
YQ
4202015-08-25 Yao Qi <yao.qi@linaro.org>
421
422 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
423 Call current_lwp_ptid.
424
32a271ee
YQ
4252015-08-25 Yao Qi <yao.qi@linaro.org>
426
427 * linux-aarch64-low.c (debug_reg_change_callback): Use
428 debug_printf.
429
0d51c8d7
YQ
4302015-08-25 Yao Qi <yao.qi@linaro.org>
431
432 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
433
31a43dd5
YQ
4342015-08-25 Yao Qi <yao.qi@linaro.org>
435
436 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
437
8ee52567
YQ
4382015-08-25 Yao Qi <yao.qi@linaro.org>
439
440 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
441 the code.
442
ff3f0f45
YQ
4432015-08-25 Yao Qi <yao.qi@linaro.org>
444
445 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
446 Remove.
447 (debug_reg_change_callback): Remove argument entry and add argument
448 lwp. Remove local variable thread. Don't print thread id in the
449 debugging output. Don't check whether pid of thread equals to pid.
450 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
451 iterate_over_lwps instead find_inferior.
452
3d40fbb5
PA
4532015-08-24 Pedro Alves <palves@redhat.com>
454
455 * inferiors.c (get_first_process): New function.
456 * inferiors.h (get_first_process): New declaration.
457 * remote-utils.c (read_ptid): Default to the first process in the
458 list, instead of to the current thread's process.
459
438e1e42
PA
4602015-08-24 Pedro Alves <palves@redhat.com>
461
462 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
463 * event-loop.c: Likewise.
464 * remote-utils.c: Likewise.
465 * tracepoint.c: Likewise.
466
a8c6d4fc
PA
4672015-08-24 Pedro Alves <palves@redhat.com>
468
469 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
470 ptid_get_lwp.
471
99b0bb12
PA
4722015-08-21 Pedro Alves <palves@redhat.com>
473
474 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
475 instead of literal 1.
476
f8904751
PA
4772015-08-21 Pedro Alves <palves@redhat.com>
478
479 * tdesc.c (default_description): Explicitly zero-initialize.
480
465a859e
PA
4812015-08-21 Pedro Alves <palves@redhat.com>
482
483 PR gdb/18749
484 * inferiors.c (remove_thread): Discard any pending stop reply for
485 this thread.
486 * server.c (remove_all_on_match_pid): Rename to ...
487 (remove_all_on_match_ptid): ... this. Work with a filter ptid
488 instead of a pid.
489 (discard_queued_stop_replies): Change parameter to a ptid. Now
490 extern.
491 (handle_v_kill, kill_inferior_callback, captured_main)
492 (process_serial_event): Adjust.
493 * server.h (discard_queued_stop_replies): Declare.
494
f0db101d
PA
4952015-08-21 Pedro Alves <palves@redhat.com>
496
497 * linux-low.c (wait_for_sigstop): Always switch to no thread
498 selected if the previously current thread dies.
499 * lynx-low.c (lynx_request_interrupt): Use the first thread's
500 process instead of the current thread's.
501 * remote-utils.c (input_interrupt): Don't check if there's no
502 current thread.
503 * server.c (gdb_read_memory, gdb_write_memory): If setting the
504 current thread to the general thread fails, error out.
505 (handle_qxfer_auxv, handle_qxfer_libraries)
506 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
507 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
508 (handle_query): Check if there's a thread selected instead of
509 checking whether there's any thread in the thread list.
510 (handle_qxfer_threads, handle_qxfer_btrace)
511 (handle_qxfer_btrace_conf): Don't error out early if there's no
512 thread in the thread list.
513 (handle_v_cont, myresume): Don't set the current thread to the
514 continue thread.
515 (process_serial_event) <Hg handling>: Also set thread_id if the
516 previous general thread is still alive.
517 (process_serial_event) <g/G handling>: If setting the current
518 thread to the general thread fails, error out.
519 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
520 thread's lwp instead of the current thread's.
521 * target.c (set_desired_thread): If the desired thread was not
522 found, leave the current thread pointing to NULL. Return an int
523 (boolean) indicating success.
524 * target.h (set_desired_thread): Change return type to int.
525
40045d91
MF
5262015-08-20 Max Filippov <jcmvbkbc@gmail.com>
527
528 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
529 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
530 #includes.
531 (ps_get_thread_area): New function.
532
45face3b
GB
5332015-08-19 Gary Benson <gbenson@redhat.com>
534
535 * hostio.c (handle_pread): Do not attempt to read more data
536 than hostio_reply_with_data can fit in a packet.
537
16d5f642
JB
5382015-08-18 Joel Brobecker <brobecker@adacore.com>
539
540 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
541
a738da3a
MF
5422015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
543
544 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
545
33ebda9d
PA
5462015-08-06 Pedro Alves <palves@redhat.com>
547
548 * tracepoint.c (expr_eval_result): Now an int.
549
a44892be
PA
5502015-08-06 Pedro Alves <palves@redhat.com>
551
552 * gdbthread.h (struct regcache): Forward declare.
553 (struct thread_info) <regcache_data>: Now a struct regcache
554 pointer.
555 * inferiors.c (inferior_regcache_data)
556 (set_inferior_regcache_data): Now work with struct regcache
557 pointers.
558 * inferiors.h (struct regcache): Forward declare.
559 (inferior_regcache_data, set_inferior_regcache_data): Now work
560 with struct regcache pointers.
561 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
562 (free_register_cache_thread): Remove struct regcache pointer
563 casts.
564
608a1e46
PA
5652015-08-06 Pedro Alves <palves@redhat.com>
566
567 * server.c (captured_main): On error, print the exception message
568 to stderr, and if run_once is set, throw a quit.
569
f0ce0d3a
PA
5702015-08-06 Pedro Alves <palves@redhat.com>
571
572 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
573 the current thread.
574
bf47e248
PA
5752015-08-06 Pedro Alves <palves@redhat.com>
576
577 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
578 reading beyond the passed in buffer length.
579
b6b9ffcc
PL
5802015-08-06 Pierre Langlois <pierre.langlois@arm.com>
581
582 * tracepoint.c (symbol_list) <required>: Remove.
583
863d01bd
PA
5842015-08-06 Pedro Alves <palves@redhat.com>
585
586 * linux-low.c (handle_extended_wait): Set the fork child's suspend
587 count if stopping and suspending threads.
588 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
589 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
590 (linux_detach): Complete an ongoing step-over.
591 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
592 throughout.
593 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
594 (linux_wait_1): If passing a signal to the inferior after
595 finishing a step-over, unsuspend and re-resume all lwps. If we
596 see a single-step event but the thread should be continuing, don't
597 pass the trap to gdb.
598 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
599 internal_error instead of gdb_assert.
600 (enqueue_pending_signal): New function.
601 (check_ptrace_stopped_lwp_gone): Add debug output.
602 (start_step_over): Use internal_error instead of gdb_assert.
603 (complete_ongoing_step_over): New function.
604 (linux_resume_one_thread): Don't resume a suspended thread.
605 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
606 it stepping.
607
00db26fa
PA
6082015-08-06 Pedro Alves <palves@redhat.com>
609
610 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
611 (linux_thread_alive): Use lwp_is_marked_dead.
612 (extended_event_reported): Delete.
613 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
614 instead of extended_event_reported.
615 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
616 as well.
617 (lwp_is_marked_dead): New function.
618 (lwp_running): Use lwp_is_marked_dead.
619 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
620 comment.
621
ad071a30
PA
6222015-08-06 Pedro Alves <palves@redhat.com>
623
624 * linux-low.c (linux_wait_1): Move fork event output out of the
625 !report_to_gdb check. Pass event_child->waitstatus to
626 target_waitstatus_to_string instead of ourstatus.
627
524b57e6
YQ
6282015-08-04 Yao Qi <yao.qi@linaro.org>
629
630 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
631 if current_thread is 32 bit.
632
6085d6f6
YQ
6332015-08-04 Yao Qi <yao.qi@linaro.org>
634
635 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
636 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
637 * server.c (extended_protocol): Remove "static".
638 * server.h (extended_protocol): Declare it.
639
8a7e4587
YQ
6402015-08-04 Yao Qi <yao.qi@linaro.org>
641
642 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
643 both aarch64 and aarch32.
644 (aarch64_set_pc): Likewise.
645
3b53ae99
YQ
6462015-08-04 Yao Qi <yao.qi@linaro.org>
647
648 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
649 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
650 arm-with-neon.xml to srv_xmlfiles.
651 * linux-aarch64-low.c: Include linux-aarch32-low.h.
652 (is_64bit_tdesc): New function.
653 (aarch64_linux_read_description): New function.
654 (aarch64_arch_setup): Call aarch64_linux_read_description.
655 (regs_info): Rename to regs_info_aarch64.
656 (aarch64_regs_info): Return right regs_info.
657 (initialize_low_arch): Call initialize_low_arch_aarch32.
658
bd9e6534
YQ
6592015-08-04 Yao Qi <yao.qi@linaro.org>
660
661 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
662 * linux-aarch32-low.c: New file.
663 * linux-aarch32-low.h: New file.
664 * linux-arm-low.c (arm_fill_gregset): Move it to
665 linux-aarch32-low.c.
666 (arm_store_gregset): Likewise.
667 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
668 (arm_store_vfpregset): Call arm_store_vfpregset_num.
669 (arm_arch_setup): Check if PTRACE_GETREGSET works.
670 (regs_info): Rename to regs_info_arm.
671 (arm_regs_info): Return regs_info_aarch32 if
672 have_ptrace_getregset is 1 and target description is
673 arm_with_neon or arm_with_vfpv3.
674 (initialize_low_arch): Don't call init_registers_arm_with_neon.
675 Call initialize_low_arch_aarch32 instead.
676
ded48a5e
YQ
6772015-08-04 Yao Qi <yao.qi@linaro.org>
678
679 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
680 * linux-low.c: ... here.
681 * linux-low.h (have_ptrace_getregset): Declare it.
682
96e9210f
PA
6832015-08-04 Pedro Alves <palves@redhat.com>
684
685 * thread-db.c (struct thread_db): Use new typedefs.
686 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
687 CHK calls.
688 (disable_thread_event_reporting): Cast result of dlsym to
689 destination function pointer type.
690 (thread_db_mourn): Use td_ta_delete_ftype.
691
af60a1ef
SL
6922015-08-03 Sandra Loosemore <sandra@codesourcery.com>
693
694 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
695 arch variant.
696 (CDX_BREAKPOINT): Define for R2.
697 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
698 (the_low_target): Add comments.
699
e8b41681
YQ
7002015-07-30 Yao Qi <yao.qi@linaro.org>
701
702 * linux-arm-low.c (arm_hwcap): Remove it.
703 (arm_read_description): New local variable arm_hwcap. Don't
704 set arm_hwcap to zero.
705
89abb039
YQ
7062015-07-30 Yao Qi <yao.qi@linaro.org>
707
708 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
709 Use regcache->tdesc instead.
710 (arm_store_wmmxregset): Likewise.
711 (arm_fill_vfpregset): Likewise.
712 (arm_store_vfpregset): Likewise.
713
deca266c
YQ
7142015-07-30 Yao Qi <yao.qi@linaro.org>
715
716 * linux-arm-low.c: Include arch/arm.h.
717 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
718 (arm_store_gregset): Likewise.
719
aa58a496
SM
7202015-07-29 Simon Marchi <simon.marchi@ericsson.com>
721
722 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
723 ptrace's 4th parameter.
724
50904b25
YQ
7252015-07-27 Yao Qi <yao.qi@linaro.org>
726
727 * configure.srv (case aarch64*-*-linux*): Don't set
728 srv_linux_usrregs.
729
5826e159
PA
7302015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
731
732 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
733 sys/ptrace.h.
734 * linux-arm-low.c: Likewise.
735 * linux-cris-low.c: Likewise.
736 * linux-crisv32-low.c: Likewise.
737 * linux-low.c: Likewise.
738 * linux-m68k-low.c: Likewise.
739 * linux-mips-low.c: Likewise.
740 * linux-nios2-low.c: Likewise.
741 * linux-s390-low.c: Likewise.
742 * linux-sparc-low.c: Likewise.
743 * linux-tic6x-low.c: Likewise.
744 * linux-tile-low.c: Likewise.
745 * linux-x86-low.c: Likewise.
746
54019719
PA
7472015-07-24 Pedro Alves <palves@redhat.com>
748
749 * config.in: Regenerate.
750 * configure: Regenerate.
751
eb7aa561
PA
7522015-07-24 Pedro Alves <palves@redhat.com>
753
754 * acinclude.m4: Include ../ptrace.m4.
755 * configure.ac: Call GDB_AC_PTRACE.
756 * config.in, configure: Regenerate.
757
55d7b841
YQ
7582015-07-24 Yao Qi <yao.qi@linaro.org>
759
760 * linux-low.c (linux_create_inferior): Remove setting to
761 proc->priv->new_inferior.
762 (linux_attach): Likewise.
763 (linux_low_filter_event): Likewise.
764 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
765
c06cbd92
YQ
7662015-07-24 Yao Qi <yao.qi@linaro.org>
767
768 * linux-low.c (linux_arch_setup): New function.
769 (linux_low_filter_event): If proc->tdesc is NULL and
770 proc->attached is true, call the_low_target.arch_setup.
771 Otherwise, keep status pending, and return.
772 (linux_resume_one_lwp_throw): Don't call get_pc if
773 thread->while_stepping isn't NULL. Don't call
774 get_thread_regcache if proc->tdesc is NULL.
775 (need_step_over_p): Return 0 if proc->tdesc is NULL.
776 (linux_target_ops): Install arch_setup.
777 * server.c (start_inferior): Call the_target->arch_setup.
778 * target.h (struct target_ops) <arch_setup>: New field.
779 (target_arch_setup): New marco.
780 * lynx-low.c (lynx_target_ops): Update.
781 * nto-low.c (nto_target_ops): Update.
782 * spu-low.c (spu_target_ops): Update.
783 * win32-low.c (win32_target_ops): Update.
784
5ae3ebba
YQ
7852015-07-24 Yao Qi <yao.qi@linaro.org>
786
787 * linux-low.c (linux_add_process): Don't set
788 proc->priv->new_inferior.
789 (linux_create_inferior): Set proc->priv->new_inferior to 1.
790 (linux_attach): Likewise.
791
eb97750b
YQ
7922015-07-24 Yao Qi <yao.qi@linaro.org>
793
794 * server.c (start_inferior): Code refactor.
795
51aee833
YQ
7962015-07-24 Yao Qi <yao.qi@linaro.org>
797
798 * server.c (process_serial_event): Set general_thread.
799
af1b22f3
YQ
8002015-07-21 Yao Qi <yao.qi@linaro.org>
801
802 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
803 aarch64_linux_get_debug_reg_capacity.
804
554717a3
YQ
8052015-07-17 Yao Qi <yao.qi@linaro.org>
806
807 * Makefile.in (aarch64-linux-hw-point.o): New rule.
808 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
809 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
810 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
811 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
812 (AARCH64_HWP_ALIGNMENT): Likewise.
813 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
814 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
815 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
816 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
817 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
818 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
819 (struct aarch64_debug_reg_state): Likewise.
820 (struct arch_lwp_info): Likewise.
821 (aarch64_align_watchpoint): Likewise.
822 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
823 (aarch64_watchpoint_length): Likewise.
824 (aarch64_point_encode_ctrl_reg): Likewise
825 (aarch64_point_is_aligned): Likewise.
826 (aarch64_align_watchpoint): Likewise.
827 (aarch64_linux_set_debug_regs):
828 (aarch64_dr_state_insert_one_point): Likewise.
829 (aarch64_dr_state_remove_one_point): Likewise.
830 (aarch64_handle_breakpoint): Likewise.
831 (aarch64_handle_aligned_watchpoint): Likewise.
832 (aarch64_handle_unaligned_watchpoint): Likewise.
833 (aarch64_handle_watchpoint): Likewise.
834
c67ca4de
YQ
8352015-07-17 Yao Qi <yao.qi@linaro.org>
836
837 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
838 and don't aarch64_get_debug_reg_state. All callers update.
839 (aarch64_handle_aligned_watchpoint): Likewise.
840 (aarch64_handle_unaligned_watchpoint): Likewise.
841 (aarch64_handle_watchpoint): Likewise.
842 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
843 (aarch64_remove_point): Likewise.
844
25abf979
YQ
8452015-07-17 Yao Qi <yao.qi@linaro.org>
846
847 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
848 debug_printf.
849 (aarch64_handle_unaligned_watchpoint): Likewise.
850
db1ff28b
JK
8512015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
852
853 Revert the previous 3 commits:
854 Move gdb_regex* to common/
855 Move linux_find_memory_regions_full & co.
856 gdbserver build-id attribute generator
857
700ca40f
JK
8582015-07-15 Aleksandar Ristovski <aristovski@qnx.com
859 Jan Kratochvil <jan.kratochvil@redhat.com>
860
861 gdbserver build-id attribute generator.
862 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
863 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
864 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
865 (find_phdr): New.
866 (get_dynamic): Use find_pdhr to traverse program headers.
867 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
868 (compare_mapping_entry_range, struct find_memory_region_callback_data)
869 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
870 (get_hex_build_id): New.
871 (linux_qxfer_libraries_svr4): Add optional build-id attribute
872 to reply XML document.
873
9904185c
JK
8742015-07-15 Aleksandar Ristovski <aristovski@qnx.com
875 Jan Kratochvil <jan.kratochvil@redhat.com>
876
877 * target.c: Include target/target-utils.h and fcntl.h.
878 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
879 (target_fileio_read_stralloc): New functions.
880
6e5b4429
JK
8812015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
882
883 * Makefile.in (OBS): Add gdb_regex.o.
884 (gdb_regex.o): New.
885 * config.in: Rebuilt.
886 * configure: Rebuilt.
887
ddc98fbf
JK
8882015-07-15 Aleksandar Ristovski <aristovski@qnx.com
889 Jan Kratochvil <jan.kratochvil@redhat.com>
890
891 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
892 * Makefile.in (OBS): Add target-utils.o.
893 (linux-maps.o, target-utils.o): New.
894 * configure.srv (srv_linux_obj): Add linux-maps.o.
895
e57bb7a0
PL
8962015-07-15 Pierre Langlois <pierre.langlois@arm.com>
897
898 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
899 function, return 1.
900 (the_low_target): Install it.
901
586b02a9
PA
9022015-07-14 Pedro Alves <palves@redhat.com>
903
904 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
905 Instead, ignore ECHILD, and throw an error for other errnos.
906
58c1b36c
PA
9072015-07-10 Pedro Alves <palves@redhat.com>
908
909 * event-loop.c (struct callback_event) <data>: Change type to
910 gdb_client_data instance instead of gdb_client_data pointer.
911 (append_callback_event): Adjust.
912
421530db
PL
9132015-07-10 Pierre Langlois <pierre.langlois@arm.com>
914
915 * linux-aarch64-low.c: Add comments for each linux_target_ops
916 method. Remove comments already covered in target_ops and
917 linux_target_ops definitions.
918 (the_low_target): Add comments for each unimplemented method.
919
c2d65f38
YQ
9202015-07-09 Yao Qi <yao.qi@linaro.org>
921
922 * linux-aarch64-low.c (aarch64_regmap): Remove.
923 (aarch64_usrregs_info): Remove.
924 (regs_info): Set field usrregs to NULL.
925
b20a6524
MM
9262015-07-02 Markus Metzger <markus.t.metzger@intel.com>
927
928 * linux-low.c: Include "rsp-low.h"
929 (linux_low_encode_pt_config, linux_low_encode_raw): New.
930 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
931 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
932 (handle_btrace_enable_pt): New.
933 (handle_btrace_general_set): Support "pt".
934 (handle_btrace_conf_general_set): Support "pt:size".
935
96c97461
PL
9362015-06-29 Pierre Langlois <pierre.langlois@arm.com>
937
938 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
939 Z_PACKET_SW_BP.
940
37d66942
PL
9412015-06-29 Pierre Langlois <pierre.langlois@arm.com>
942
943 * linux-aarch64-low.c: Remove comment about endianness.
944 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
945 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
946 memcmp.
947
dc06243f
GB
9482015-06-24 Gary Benson <gbenson@redhat.com>
949
950 * linux-i386-ipa.c (stdint.h): Do not include.
951 * lynx-i386-low.c (stdint.h): Likewise.
952 * lynx-ppc-low.c (stdint.h): Likewise.
953 * mem-break.c (stdint.h): Likewise.
954 * thread-db.c (stdint.h): Likewise.
955 * tracepoint.c (stdint.h): Likewise.
956 * win32-low.c (stdint.h): Likewise.
957
124e13d9
SM
9582015-06-18 Simon Marchi <simon.marchi@ericsson.com>
959
960 * server.c (write_qxfer_response): Update call to
961 remote_escape_output.
962
909c2cda
JK
9632015-06-15 Aleksandar Ristovski <aristovski@qnx.com
964 Jan Kratochvil <jan.kratochvil@redhat.com>
965
966 Merge multiple hex conversions.
967 * gdbreplay.c (tohex): Rename to 'fromhex'.
968 (logchar): Use fromhex.
969
24c05f46
JK
9702015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
971
972 * server.c (handle_qxfer_libraries): Set `version' attribute for
973 <library-list>.
974
14d2069a
GB
9752015-06-10 Gary Benson <gbenson@redhat.com>
976
977 * target.h (struct target_ops) <multifs_open>: New field.
978 <multifs_unlink>: Likewise.
979 <multifs_readlink>: Likewise.
980 * linux-low.c (nat/linux-namespaces.h): New include.
981 (linux_target_ops): Initialize the_target->multifs_open,
982 the_target->multifs_unlink and the_target->multifs_readlink.
983 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
984 * hostio.c (hostio_fs_pid): New static variable.
985 (hostio_handle_new_gdb_connection): New function.
986 (handle_setfs): Likewise.
987 (handle_open): Use the_target->multifs_open as appropriate.
988 (handle_unlink): Use the_target->multifs_unlink as appropriate.
989 (handle_readlink): Use the_target->multifs_readlink as
990 appropriate.
991 (handle_vFile): Handle vFile:setfs packets.
992 * server.c (handle_query): Call hostio_handle_new_gdb_connection
993 after target_handle_new_gdb_connection.
994
4b8b5e72
GB
9952015-06-10 Gary Benson <gbenson@redhat.com>
996
997 * configure.ac (AC_CHECK_FUNCS): Add setns.
998 * config.in: Regenerate.
999 * configure: Likewise.
1000 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
1001 (linux-namespaces.o): New rule.
1002 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
1003
3ac2e371
GB
10042015-06-09 Gary Benson <gbenson@redhat.com>
1005
1006 * hostio.c (handle_open): Process mode argument with
1007 fileio_to_host_mode.
1008
ca9b78ce
YQ
10092015-06-01 Yao Qi <yao.qi@linaro.org>
1010
1011 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
1012 * linux-x86-low.c: Likewise.
1013
bfacd19d
DB
10142015-05-28 Don Breazeal <donb@codesourcery.com>
1015
1016 * linux-low.c (handle_extended_wait): Initialize
1017 thread_info.last_resume_kind for new fork children.
1018
452003ef
PA
10192015-05-15 Pedro Alves <palves@redhat.com>
1020
1021 * target.h (target_handle_new_gdb_connection): Rewrite using if
1022 wrapped in do/while.
1023
1041a03c
JB
10242015-05-14 Joel Brobecker <brobecker@adacore.com>
1025
1026 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
1027 * configure, config.in: Regenerate.
1028 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
1029 Declare typedef.
1030
c269dbdb
DB
10312015-05-12 Don Breazeal <donb@codesourcery.com>
1032
1033 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
1034 PTRACE_EVENT_VFORK_DONE.
1035 (linux_low_ptrace_options, extended_event_reported): Add vfork
1036 events.
1037 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
1038 and "vforkdone" for RSP 'T' Stop Reply Packet.
1039 * server.h (report_vfork_events): Declare
1040 global variable.
1041
3a8a0396
DB
10422015-05-12 Don Breazeal <donb@codesourcery.com>
1043
1044 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
1045 (the_low_target) <new_fork>: Initialize new member.
1046 * linux-arm-low.c (arm_new_fork): New function.
1047 (the_low_target) <new_fork>: Initialize new member.
1048 * linux-low.c (handle_extended_wait): Call new target function
1049 new_fork.
1050 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1051 * linux-mips-low.c (mips_add_watchpoint): New function
1052 extracted from mips_insert_point.
1053 (the_low_target) <new_fork>: Initialize new member.
1054 (mips_linux_new_fork): New function.
1055 (mips_insert_point): Call mips_add_watchpoint.
1056 * linux-x86-low.c (x86_linux_new_fork): New function.
1057 (the_low_target) <new_fork>: Initialize new member.
1058
de0d863e
DB
10592015-05-12 Don Breazeal <donb@codesourcery.com>
1060
1061 * linux-low.c (handle_extended_wait): Implement return value,
1062 rename argument 'event_child' to 'event_lwp', handle
1063 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1064 (linux_low_ptrace_options): New function.
1065 (linux_low_filter_event): Call linux_low_ptrace_options,
1066 use different argument fo linux_enable_event_reporting,
1067 use return value from handle_extended_wait.
1068 (extended_event_reported): New function.
1069 (linux_wait_1): Call extended_event_reported and set
1070 status to report fork events.
1071 (linux_write_memory): Add pid to debug message.
1072 (reset_lwp_ptrace_options_callback): New function.
1073 (linux_handle_new_gdb_connection): New function.
1074 (linux_target_ops): Initialize new structure member.
1075 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1076 * lynx-low.c: Initialize new structure member.
1077 * remote-utils.c (prepare_resume_reply): Implement stop reason
1078 "fork" for "T" stop message.
1079 * server.c (handle_query): Call handle_new_gdb_connection.
1080 * server.h (report_fork_events): Declare global flag.
1081 * target.h (struct target_ops) <handle_new_gdb_connection>:
1082 New member.
1083 (target_handle_new_gdb_connection): New macro.
1084 * win32-low.c: Initialize new structure member.
1085
ddcbc397
DB
10862015-05-12 Don Breazeal <donb@codesourcery.com>
1087
1088 * mem-break.c (APPEND_TO_LIST): Define macro.
1089 (clone_agent_expr): New function.
1090 (clone_one_breakpoint): New function.
1091 (clone_all_breakpoints): New function.
1092 * mem-break.h: Declare new functions.
1093
89245bc0
DB
10942015-05-12 Don Breazeal <donb@codesourcery.com>
1095
1096 * linux-low.c (linux_supports_fork_events): New function.
1097 (linux_supports_vfork_events): New function.
1098 (linux_target_ops): Initialize new structure members.
1099 (initialize_low): Call linux_check_ptrace_features.
1100 * lynx-low.c (lynx_target_ops): Initialize new structure
1101 members.
1102 * server.c (report_fork_events, report_vfork_events):
1103 New global flags.
1104 (handle_query): Add new features to qSupported packet and
1105 response.
1106 (captured_main): Initialize new global variables.
1107 * target.h (struct target_ops) <supports_fork_events>:
1108 New member.
1109 <supports_vfork_events>: New member.
1110 (target_supports_fork_events): New macro.
1111 (target_supports_vfork_events): New macro.
1112 * win32-low.c (win32_target_ops): Initialize new structure
1113 members.
1114
835205d0
GB
11152015-05-12 Gary Benson <gbenson@redhat.com>
1116
1117 * server.c (handle_qxfer_exec_file): Use current process
1118 if annex is empty.
1119
21e94bd9
SL
11202015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1121
1122 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1123 Remove HAVE_PTRACE_GETREGS conditionals.
1124 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1125 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1126
45614f15
YQ
11272015-05-08 Yao Qi <yao.qi@linaro.org>
1128
1129 * linux-low.c (linux_supports_conditional_breakpoints): New
1130 function.
1131 (linux_target_ops): Install new target method.
1132 * lynx-low.c (lynx_target_ops): Install NULL hook for
1133 supports_conditional_breakpoints.
1134 * nto-low.c (nto_target_ops): Likewise.
1135 * spu-low.c (spu_target_ops): Likewise.
1136 * win32-low.c (win32_target_ops): Likewise.
1137 * server.c (handle_query): Check
1138 target_supports_conditional_breakpoints.
1139 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1140 New field.
1141 (target_supports_conditional_breakpoints): New macro.
1142
80ad801e
PA
11432015-05-06 Pedro Alves <palves@redhat.com>
1144
1145 PR server/18081
1146 * server.c (start_inferior): If the process exits, mourn it.
1147
819843c7
GB
11482015-04-21 Gary Benson <gbenson@redhat.com>
1149
1150 * hostio.c (fileio_open_flags_to_host): Factored out to
1151 fileio_to_host_openflags in common/fileio.c. Single use
1152 updated.
1153
a2d5a9d7
MF
11542015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1155
1156 * linux-xtensa-low.c (xtensa_fill_gregset)
1157 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1158 XCHAL_HAVE_LOOP.
1159
deb44829
MF
11602015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1161
1162 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1163 (regs_info): Replace usrregs pointer with NULL.
1164
e57f1de3
GB
11652015-04-17 Gary Benson <gbenson@redhat.com>
1166
1167 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1168 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1169 * server.c (handle_qxfer_exec_file): New function.
1170 (qxfer_packets): Add exec-file entry.
1171 (handle_query): Report qXfer:exec-file:read as supported packet.
1172
62828379
RN
11732015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1174
1175 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1176
b88bb450
GB
11772015-04-09 Gary Benson <gbenson@redhat.com>
1178
1179 * hostio-errno.c (errno_to_fileio_error): Remove function.
1180 Update caller to use remote_fileio_to_fio_error.
1181
c8f4bfdd
YQ
11822015-04-09 Yao Qi <yao.qi@linaro.org>
1183
1184 * linux-low.c (linux_insert_point): Call
1185 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1186 (linux_remove_point): Call remove_memory_breakpoint if type is
1187 raw_bkpt_type_sw.
1188 * linux-x86-low.c (x86_insert_point): Don't call
1189 insert_memory_breakpoint.
1190 (x86_remove_point): Don't call remove_memory_breakpoint.
1191
41f98f02
PA
11922015-04-01 Pedro Alves <palves@redhat.com>
1193 Cleber Rosa <crosa@redhat.com>
1194
1195 * server.c (gdbserver_usage): Reorganize and extend the usage
1196 message.
1197
2bf6fb9d
PA
11982015-03-24 Pedro Alves <palves@redhat.com>
1199
1200 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1201 output. Also dump TRAP_TRACE.
1202 (linux_low_filter_event): In debug output, distinguish a
1203 resume_stop SIGSTOP from a delayed SIGSTOP.
1204
369f6daa
GB
12052015-03-24 Gary Benson <gbenson@redhat.com>
1206
1207 * linux-x86-low.c (x86_linux_new_thread): Moved to
1208 nat/x86-linux.c.
1209 (x86_linux_prepare_to_resume): Likewise.
1210
8e5d4070
GB
12112015-03-24 Gary Benson <gbenson@redhat.com>
1212
1213 * Makefile.in (x86-linux-dregs.o): New rule.
1214 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1215 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1216 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1217 (x86_linux_dr_get): Likewise.
1218 (x86_linux_dr_set): Likewise.
1219 (update_debug_registers_callback): Likewise.
1220 (x86_linux_dr_set_addr): Likewise.
1221 (x86_linux_dr_get_addr): Likewise.
1222 (x86_linux_dr_set_control): Likewise.
1223 (x86_linux_dr_get_control): Likewise.
1224 (x86_linux_dr_get_status): Likewise.
1225 (x86_linux_update_debug_registers): Likewise.
1226
2b95d440
GB
12272015-03-24 Gary Benson <gbenson@redhat.com>
1228
1229 * linux-x86-low.c (x86_linux_update_debug_registers):
1230 New function, factored out from...
1231 (x86_linux_prepare_to_resume): ...this.
1232
14b0bc68
GB
12332015-03-24 Gary Benson <gbenson@redhat.com>
1234
1235 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1236 (x86_linux_dr_set): Likewise.
1237 (update_debug_registers_callback): Likewise.
1238 (x86_linux_dr_set_addr): Likewise.
1239 (x86_linux_dr_get_addr): Likewise.
1240 (x86_linux_dr_set_control): Likewise.
1241 (x86_linux_dr_get_control): Likewise.
1242 (x86_linux_dr_get_status): Likewise.
1243 (x86_linux_prepare_to_resume): Likewise.
1244
5dfe6ca8
GB
12452015-03-24 Gary Benson <gbenson@redhat.com>
1246
1247 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1248 Use perror_with_name. Pass string through gettext.
1249 (x86_linux_dr_set): Likewise.
1250
d33472ad
GB
12512015-03-24 Gary Benson <gbenson@redhat.com>
1252
1253 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1254 (x86_linux_dr_set_addr): ...this.
1255 (x86_dr_low_get_addr): Rename to...
1256 (x86_linux_dr_get_addr): ...this.
1257 (x86_dr_low_set_control): Rename to...
1258 (x86_linux_dr_set_control): ...this.
1259 (x86_dr_low_get_control): Rename to...
1260 (x86_linux_dr_get_control): ...this.
1261 (x86_dr_low_get_status): Rename to...
1262 (x86_linux_dr_get_status): ...this.
1263 (x86_dr_low): Update with new function names.
1264
4b134ca1
GB
12652015-03-24 Gary Benson <gbenson@redhat.com>
1266
1267 * Makefile.in (x86-linux.o): New rule.
1268 * configure.srv: Add x86-linux.o to relevant targets.
1269 * linux-low.c (lwp_set_arch_private_info): New function.
1270 (lwp_arch_private_info): Likewise.
1271 * linux-x86-low.c: Include nat/x86-linux.h.
1272 (arch_lwp_info): Removed structure.
1273 (update_debug_registers_callback):
1274 Use lwp_set_debug_registers_changed.
1275 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1276 and lwp_set_debug_registers_changed.
1277 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1278
34c703da
GB
12792015-03-24 Gary Benson <gbenson@redhat.com>
1280
1281 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1282 * linux-arm-low.c (arm_new_thread): Likewise.
1283 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1284 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1285 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1286 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1287
cff068da
GB
12882015-03-24 Gary Benson <gbenson@redhat.com>
1289
1290 * linux-low.c (ptid_of_lwp): New function.
1291 (lwp_is_stopped): Likewise.
1292 (lwp_stop_reason): Likewise.
1293 * linux-x86-low.c (update_debug_registers_callback):
1294 Use lwp_is_stopped.
1295 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1296 lwp_stop_reason.
1297
b2f7c7e8
GB
12982015-03-24 Gary Benson <gbenson@redhat.com>
1299
1300 * linux-low.h (linux_stop_lwp): Remove declaration.
1301
6d4ee8c6
GB
13022015-03-24 Gary Benson <gbenson@redhat.com>
1303
1304 * linux-low.h: Include nat/linux-nat.h.
1305 * linux-low.c (iterate_over_lwps_args): New structure.
1306 (iterate_over_lwps_filter): New function.
1307 (iterate_over_lwps): Likewise.
1308 * linux-x86-low.c (update_debug_registers_callback):
1309 Update signature to what iterate_over_lwps expects.
1310 Remove PID check that iterate_over_lwps now performs.
1311 (x86_dr_low_set_addr): Use iterate_over_lwps.
1312 (x86_dr_low_set_control): Likewise.
1313
70a0bb6b
GB
13142015-03-24 Gary Benson <gbenson@redhat.com>
1315
1316 * linux-x86-low.c (x86_debug_reg_state): New function.
1317 (x86_linux_prepare_to_resume): Use the above.
1318
7b669087
GB
13192015-03-24 Gary Benson <gbenson@redhat.com>
1320
1321 * linux-low.c (current_lwp_ptid): New function.
1322 * linux-x86-low.c: Include nat/linux-nat.h.
1323 (x86_dr_low_get_addr): Use current_lwp_ptid.
1324 (x86_dr_low_get_control): Likewise.
1325 (x86_dr_low_get_status): Likewise.
1326
eef49a3d
PA
13272015-03-20 Pedro Alves <palves@redhat.com>
1328
1329 * tracepoint.c (cmd_qtstatus): Make "str" const.
1330
b2333d22
PA
13312015-03-20 Pedro Alves <palves@redhat.com>
1332
1333 * server.c (handle_general_set): Make "req_str" const.
1334
23f238d3
PA
13352015-03-19 Pedro Alves <palves@redhat.com>
1336
1337 * linux-low.c (linux_resume_one_lwp): Rename to ...
1338 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1339 instead call perror_with_name.
1340 (check_ptrace_stopped_lwp_gone): New function.
1341 (linux_resume_one_lwp): Reimplement as wrapper around
1342 linux_resume_one_lwp_throw that swallows errors if the LWP is
1343 gone.
1344
91baf43f
PA
13452015-03-19 Pedro Alves <palves@redhat.com>
1346
1347 * linux-low.c (count_events_callback, select_event_lwp_callback):
1348 No longer check whether the thread has resume_stop as last resume
1349 kind.
1350
8bf3b159
PA
13512015-03-19 Pedro Alves <palves@redhat.com>
1352
1353 * linux-low.c (count_events_callback, select_event_lwp_callback):
1354 Use the lwp's status_pending_p field, not the thread's.
1355
b90fc188
PA
13562015-03-19 Pedro Alves <palves@redhat.com>
1357
1358 * linux-low.c (select_event_lwp_callback): Update comments to
1359 no longer mention SIGTRAP.
1360
464b0089
GB
13612015-03-18 Gary Benson <gbenson@redhat.com>
1362
1363 * server.c (handle_query): Do not report vFile:fstat as supported.
1364
aa9e327f
GB
13652015-03-11 Gary Benson <gbenson@redhat.com>
1366
1367 * hostio.c (sys/types.h): New include.
1368 (sys/stat.h): Likewise.
1369 (common-remote-fileio.h): Likewise.
1370 (handle_fstat): New function.
1371 (handle_vFile): Handle vFile:fstat packets.
aa9e327f 1372
791c0056
GB
13732015-03-11 Gary Benson <gbenson@redhat.com>
1374
1375 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1376 struct stat.st_blocks and struct stat.st_blksize.
1377 * configure: Regenerate.
1378 * config.in: Likewise.
1379 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1380 (OBS): Add common-remote-fileio.o.
1381 (common-remote-fileio.o): New rule.
1382
9a9df970
PA
13832015-03-09 Pedro Alves <palves@redhat.com>
1384
1385 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1386 'struct sockaddr' pointer in 'accept' call.
1387
9eb1356e
PA
13882015-03-09 Pedro Alves <palves@redhat.com>
1389
1390 Revert:
1391 2015-03-07 Pedro Alves <palves@redhat.com>
1392 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1393 or <winsock2.h> here. Instead include "gdb_socket.h".
1394 (remote_open): Use union gdb_sockaddr_u.
1395 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1396 or <winsock2.h> here. Instead include "gdb_socket.h".
1397 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1398 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1399 or <sys/un.h>.
1400 (init_named_socket, gdb_agent_helper_thread): Use union
1401 gdb_sockaddr_u.
1402
aac331e4
PA
14032015-03-07 Pedro Alves <palves@redhat.com>
1404
1405 * configure.ac (build_warnings): Move
1406 -Wdeclaration-after-statement to the C-specific set.
1407 * configure: Regenerate.
1408
366c75fc
PA
14092015-03-07 Pedro Alves <palves@redhat.com>
1410
1411 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1412 or <winsock2.h> here. Instead include "gdb_socket.h".
1413 (remote_open): Use union gdb_sockaddr_u.
1414 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1415 or <winsock2.h> here. Instead include "gdb_socket.h".
1416 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1417 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1418 or <sys/un.h>.
1419 (init_named_socket, gdb_agent_helper_thread): Use union
1420 gdb_sockaddr_u.
1421
492d29ea
PA
14222015-03-07 Pedro Alves <palves@redhat.com>
1423
1424 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1425 instead.
1426
60a191ed
YQ
14272015-03-06 Yao Qi <yao.qi@linaro.org>
1428
1429 * linux-aarch64-low.c (aarch64_insert_point): Use
1430 show_debug_regs as a boolean.
1431 (aarch64_remove_point): Likewise.
1432
f5771b1d
PA
14332015-03-05 Pedro Alves <palves@redhat.com>
1434
1435 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1436 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1437 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1438 * nto-low.c (nto_target_ops): Likewise.
1439 * spu-low.c (spu_target_ops): Likewise.
1440 * win32-low.c (win32_target_ops): Likewise.
1441
3e572f71
PA
14422015-03-04 Pedro Alves <palves@redhat.com>
1443
72f4393d 1444 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
3e572f71
PA
1445 Decide whether a breakpoint triggered based on the SIGTRAP's
1446 siginfo.si_code.
72f4393d
L
1447 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1448 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
3e572f71
PA
1449 (linux_low_filter_event): Check for breakpoints before checking
1450 watchpoints.
1451 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1452 siginfo.si_code.
72f4393d
L
1453 (linux_stopped_by_sw_breakpoint)
1454 (linux_supports_stopped_by_sw_breakpoint)
1455 (linux_stopped_by_hw_breakpoint)
1456 (linux_supports_stopped_by_hw_breakpoint): New functions.
1457 (linux_target_ops): Install new target methods.
3e572f71 1458
1ec68e26
PA
14592015-03-04 Pedro Alves <palves@redhat.com>
1460
1461 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1462 * server.c (swbreak_feature, hwbreak_feature): New globals.
1463 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1464 (captured_main): Clear swbreak_feature and hwbreak_feature.
1465 * server.h (swbreak_feature, hwbreak_feature): Declare.
1466 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1467 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1468 supports_stopped_by_hw_breakpoint>: New fields.
1469 (target_supports_stopped_by_sw_breakpoint)
1470 (target_stopped_by_sw_breakpoint)
1471 (target_supports_stopped_by_hw_breakpoint)
1472 (target_stopped_by_hw_breakpoint): Declare.
1473
15c66dd6
PA
14742015-03-04 Pedro Alves <palves@redhat.com>
1475
1476 enum lwp_stop_reason -> enum target_stop_reason
1477 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1478 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1479 (linux_wait_1, stuck_in_jump_pad_callback)
1480 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1481 (linux_stopped_by_watchpoint):
1482 * linux-low.h (enum lwp_stop_reason): Delete.
1483 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1484 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1485
98fc70d6
YQ
14862015-03-04 Yao Qi <yao.qi@linaro.org>
1487
1488 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1489
dd2ac174
GB
14902015-03-03 Gary Benson <gbenson@redhat.com>
1491
1492 * hostio.c (handle_vFile): Fix prefix lengths.
1493
d68e53f4
MM
14942015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1495
1496 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1497 ptr_bits.
1498
bf2d68ab
AA
14992015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1500
1501 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1502 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1503 (clean): Add "rm -f" for above C files.
1504 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1505 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1506 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1507 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1508 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1509 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1510 (init_registers_s390x_vx_linux64)
1511 (init_registers_s390x_tevx_linux64)
1512 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1513 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1514 declarations.
1515 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1516 (s390_store_vxrs_high): New functions.
1517 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1518 NT_S390_VXRS_HIGH.
1519 (s390_arch_setup): Add logic for selecting one of the new target
1520 descriptions. Activate the new vector regsets if applicable.
1521 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1522 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1523 and init_registers_s390x_tevx_linux64.
1524
c966a859
PA
15252015-03-01 Pedro Alves <palves@redhat.com>
1526
1527 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1528 parameter.
1529
4180215b
PA
15302015-02-27 Pedro Alves <palves@redhat.com>
1531
1532 * linux-x86-low.c (u_debugreg_offset): New function.
1533 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1534
749bab01
PA
15352015-02-27 Pedro Alves <palves@redhat.com>
1536
1537 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1538 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1539 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1540 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1541 (ps_lsetfpregs, ps_getpid)
1542 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1543 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1544 (ps_lsetxregs, ps_plog): Declare.
1545
3c14e5a3
PA
15462015-02-27 Pedro Alves <palves@redhat.com>
1547
1548 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1549 IP_AGENT_EXPORT_FUNC.
1550 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1551 IP_AGENT_EXPORT_FUNC.
1552 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1553 (IP_AGENT_EXPORT): Delete.
1554 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1555 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1556 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1557 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1558 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1559 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1560 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1561 (traceframe_read_count, traceframe_write_count)
1562 (traceframes_created, trace_state_variables, get_raw_reg)
1563 (get_trace_state_variable_value, set_trace_state_variable_value)
1564 (ust_loaded, helper_thread_id, cmd_buf): Use
1565 IPA_SYM_EXPORTED_NAME.
1566 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1567 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1568 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1569 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1570 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1571 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1572 EXTERN_C_PUSH/EXTERN_C_POP.
1573 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1574 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1575 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1576 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1577 (traceframe_write_count, traceframe_read_count)
1578 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1579 (about_to_request_buffer_space, get_trace_state_variable_value)
1580 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1581 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1582 EXTERN_C_PUSH/EXTERN_C_POP.
1583 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1584 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1585 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1586 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1587 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1588 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1589 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1590 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1591 Define.
1592 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1593 (IP_AGENT_EXPORT_VAR_DECL): Define.
1594 (tracing): Declare.
1595 (gdb_agent_get_raw_reg): Declare.
1596
fe978cb0
PA
15972015-02-27 Tom Tromey <tromey@redhat.com>
1598 Pedro Alves <palves@redhat.com>
1599
1600 Rename symbols whose names are reserved C++ keywords throughout.
1601
3bc3d82a
PA
16022015-02-27 Pedro Alves <palves@redhat.com>
1603
1604 * Makefile.in (COMPILER): New, get it from autoconf.
1605 (CXX): Get from autoconf instead.
1606 (COMPILE.pre): Use COMPILER.
1607 (CC-LD): Rename to ...
1608 (CC_LD): ... this. Use COMPILER.
1609 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1610 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1611 * acinclude.m4: Include build-with-cxx.m4.
1612 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1613 Disable -Werror by default if building in C++ mode.
1614 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1615 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1616 the C++ compiler. Save/restore CXXFLAGS too.
1617 * configure: Regenerate.
1618
07697489
PA
16192015-02-27 Pedro Alves <palves@redhat.com>
1620
1621 * acinclude.m4: Include libiberty.m4.
1622 * configure.ac: Call libiberty_INIT.
1623 * config.in, configure: Regenerate.
1624
9beb7c4e
PA
16252015-02-26 Pedro Alves <palves@redhat.com>
1626
1627 * linux-low.c (linux_wait_1): When incrementing the PC past a
1628 program breakpoint always use the_low_target.breakpoint_len as
1629 increment, rather than the maximum between that and
1630 the_low_target.decr_pc_after_break.
1631
8090aef2
PA
16322015-02-23 Pedro Alves <palves@redhat.com>
1633
1634 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1635 thread was doing a step-over; always adjust the PC if
1636 we stepped over a permanent breakpoint.
1637 (linux_wait_1): If we stepped over breakpoint that was on top of a
1638 permanent breakpoint, manually advance the PC past it.
1639
bc9540e8
PA
16402015-02-23 Pedro Alves <palves@redhat.com>
1641
1642 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1643 modes.
1644 (x86_fill_gregset, x86_store_gregset): Use it when handling
1645 $orig_eax.
1646
2db9a427
PA
16472015-02-20 Pedro Alves <palves@redhat.com>
1648
1649 * thread-db.c: Include "nat/linux-procfs.h".
1650 (thread_db_init): Skip listing new threads if the kernel supports
1651 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1652
afa8d396
PA
16532015-02-20 Pedro Alves <palves@redhat.com>
1654
1655 * linux-low.c (status_pending_p_callback): Use ptid_match.
1656
c9587f88
AT
16572015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1658
1659 PR breakpoints/16812
1660 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1661 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1662 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1663
b05ec7a5
AT
16642015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1665
1666 PR breakpoints/15956
1667 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1668
d33501a5
MM
16692015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1670
1671 * linux-low.c (linux_low_btrace_conf): Print size.
1672 * server.c (handle_btrace_conf_general_set): New.
1673 (hanle_general_set): Call handle_btrace_conf_general_set.
1674 (handle_query): Report Qbtrace-conf:bts:size as supported.
1675
f4abbc16
MM
16762015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1677
1678 * linux-low.c (linux_low_enable_btrace): Update parameters.
1679 (linux_low_btrace_conf): New.
1680 (linux_target_ops)<to_btrace_conf>: Initialize.
1681 * server.c (current_btrace_conf): New.
1682 (handle_btrace_enable): Rename to ...
1683 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1684 to target_enable_btrace. Update comment. Update users.
1685 (handle_qxfer_btrace_conf): New.
1686 (qxfer_packets): Add btrace-conf entry.
1687 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1688 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1689 (target_ops)<read_btrace_conf>: New.
1690 (target_enable_btrace): Update parameters.
1691 (target_read_btrace_conf): New.
1692
043c3577
MM
16932015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1694
1695 * server.c (handle_btrace_general_set): Remove call to
1696 target_supports_btrace.
1697 (supported_btrace_packets): New.
1698 (handle_query): Call supported_btrace_packets.
1699 * target.h: include btrace-common.h.
1700 (btrace_target_info): Removed.
1701 (supports_btrace, target_supports_btrace): Update parameters.
1702
734b0e4b
MM
17032015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1704
1705 * Makefile.in (SFILES): Add common/btrace-common.c.
1706 (OBS): Add common/btrace-common.o.
1707 (btrace-common.o): Add build rules.
1708 * linux-low: Include btrace-common.h.
1709 (linux_low_read_btrace): Use struct btrace_data. Call
1710 btrace_data_init and btrace_data_fini.
1711
d6c146e9
PA
17122015-02-06 Pedro Alves <palves@redhat.com>
1713
1714 * thread-db.c (find_new_threads_callback): Add debug output.
1715
20ba1ce6
PA
17162015-02-04 Pedro Alves <palves@redhat.com>
1717
1718 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1719 (resume_stopped_resumed_lwps): New function.
1720 (linux_wait_for_event_filtered): Use it.
1721
8cc73a39
SDJ
17222015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1723
1724 * Makefile.in (SFILES): Add linux-personality.c.
1725 (linux-personality.o): New rule.
1726 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1727 list of objects to be built.
1728 * linux-low.c: Include nat/linux-personality.h.
1729 (linux_create_inferior): Remove code to disable address space
1730 randomization (moved to ../nat/linux-personality.c). Create
1731 cleanup to disable address space randomization.
1732
fb23d554
SDJ
17332015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1734
1735 * Makefile.in (posix-strerror.o): New rule.
1736 (mingw-strerror.o): Likewise.
1737 * configure: Regenerated.
1738 * configure.ac: Source file ../common/common.host. Initialize new
1739 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1740
cdf43629
YQ
17412015-01-14 Yao Qi <yao@codesourcery.com>
1742
1743 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1744 (ppc-linux.o): New rule.
1745 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1746 * configure.ac: AC_CHECK_FUNCS(getauxval).
1747 * config.in: Re-generated.
1748 * configure: Re-generated.
1749 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1750 ppc64_64bit_inferior_p
1751
514c5338
YQ
17522015-01-14 Yao Qi <yao@codesourcery.com>
1753
1754 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1755 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1756 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1757 (PT_ORIG_R3, PT_TRAP): Likewise.
1758 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1759 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1760 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1761
3368c1e5
JB
17622015-01-10 Joel Brobecker <brobecker@adacore.com>
1763
1764 * i387-fp.c (i387_cache_to_xsave): In look over
1765 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1766 zmmh_low_space field by use of zmmh_high_space.
1767
582511be
PA
17682015-01-09 Pedro Alves <palves@redhat.com>
1769
1770 * linux-low.c (step_over_bkpt): Move higher up in the file.
1771 (handle_extended_wait): Don't store the stop_pc here.
1772 (get_stop_pc): Adjust comments and rename to ...
1773 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1774 stopped for a software breakpoint or hardware breakpoint.
1775 (thread_still_has_status_pending_p): New function.
1776 (status_pending_p_callback): Use
1777 thread_still_has_status_pending_p. If the event is no longer
1778 interesting, resume the LWP.
1779 (handle_tracepoints): Add assert.
1780 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1781 (wstatus_maybe_breakpoint): New function.
1782 (cancel_breakpoint): Delete function.
1783 (check_stopped_by_watchpoint): New function, factored out from
1784 linux_low_filter_event.
1785 (lp_status_maybe_breakpoint): Delete function.
1786 (linux_low_filter_event): Remove filter_ptid argument.
1787 Leave thread group exits pending here. Store the LWP's stop PC.
1788 Always leave events pending.
1789 (linux_wait_for_event_filtered): Pull all events out of the
1790 kernel, and leave them all pending.
1791 (count_events_callback, select_event_lwp_callback): Consider all
1792 events.
1793 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1794 (select_event_lwp): Only give preference to the stepping LWP in
1795 all-stop mode. Adjust comments.
1796 (ignore_event): New function.
1797 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1798 references to cancel_breakpoints. Adjust to renames. Also give
1799 equal priority to all LWPs that have had events in non-stop mode.
1800 If reporting a software breakpoint event, unadjust the LWP's PC.
1801 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1802 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1803 Adjust.
1804 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1805 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1806 (linux_stopped_by_watchpoint): Adjust.
1807 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1808 * linux-low.h (enum lwp_stop_reason): New.
1809 (struct lwp_info) <stop_pc>: Adjust comment.
1810 <stopped_by_watchpoint>: Delete field.
1811 <stop_reason>: New field.
1812 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1813 * mem-break.c (software_breakpoint_inserted_here)
1814 (hardware_breakpoint_inserted_here): New function.
1815 * mem-break.h (software_breakpoint_inserted_here)
1816 (hardware_breakpoint_inserted_here): Declare.
1817 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1818 (cancel_breakpoints): Delete.
1819 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1820 (upload_fast_traceframes): Remove references to
1821 cancel_breakpoints.
1822
a33e3959
PA
18232015-01-09 Pedro Alves <palves@redhat.com>
1824
1825 * thread-db.c (find_new_threads_callback): Ignore thread if the
1826 kernel thread ID is -1.
1827
8784d563
PA
18282015-01-09 Pedro Alves <palves@redhat.com>
1829
1830 * linux-low.c (linux_attach_fail_reason_string): Move to
1831 nat/linux-ptrace.c, and rename.
1832 (linux_attach_lwp): Update comment.
1833 (attach_proc_task_lwp_callback): New function.
1834 (linux_attach): Adjust to rename and use
1835 linux_proc_attach_tgid_threads.
1836 (linux_attach_fail_reason_string): Delete declaration.
1837
76f2b779
JB
18382015-01-01 Joel Brobecker <brobecker@adacore.com>
1839
1840 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1841 * server.c (gdbserver_version): Likewise.
1842
fafcc06a
SDJ
18432014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1844
1845 * remote-utils.c: Include ctype.h.
1846 (input_interrupt): Explicitly handle the case when the char
1847 received is the NUL byte. Improve the printing of non-ASCII
1848 characters.
1849
beed38b8
JB
18502014-12-16 Joel Brobecker <brobecker@adacore.com>
1851
1852 * linux-low.c (linux_low_filter_event): Update call to
1853 linux_enable_event_reporting following the addition of
1854 a new parameter to that function.
1855
bf330350
CU
18562014-12-16 Catalin Udma <catalin.udma@freescale.com>
1857
1858 PR server/17457
1859 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1860 (AARCH64_FPCR_REGNO): Likewise.
1861 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1862 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1863 (aarch64_store_fpregset): Likewise.
1864
5227d625
JB
18652014-12-15 Joel Brobecker <brobecker@adacore.com>
1866
1867 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1868 Remove FIXME comment about assumption about N.
1869
f93b65a0
JB
18702014-12-13 Joel Brobecker <brobecker@adacore.com>
1871
1872 * configure.ac: If large-file support is disabled in GDBserver,
1873 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1874 * configure: Regenerate.
1875
e5a9158d
AA
18762014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1877
1878 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1879 warning upon ENODATA from ptrace.
1880 * linux-s390-low.c (s390_store_tdb): New.
1881 (s390_regsets): Add regset for NT_S390_TDB.
1882
feea5f36
AA
18832014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1884
1885 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1886 without a fill_function.
1887 * linux-s390-low.c (s390_fill_last_break): Remove.
1888 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1889 (s390_arch_setup): Use regset's size instead of fill_function for
1890 loop end condition.
1891
098dbe61
AA
18922014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1893
1894 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1895 the regset's store function when ptrace returned an error.
1896 * regcache.c (get_thread_regcache): Invalidate register cache
1897 before fetching inferior's registers.
1898
28eef672
AA
18992014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1900
1901 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1902 while-loop as for-loop.
1903 (regsets_store_inferior_registers): Likewise.
1904
bdca27a2
YQ
19052014-11-28 Yao Qi <yao@codesourcery.com>
1906
1907 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1908 * config.in, configure: Re-generate.
1909 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1910 is defined.
1911
9c232dda
YQ
19122014-11-21 Yao Qi <yao@codesourcery.com>
1913
1914 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1915 (AC_CHECK_HEADERS): Remove malloc.h.
1916 * configure: Re-generated.
1917 * config.in: Re-generated.
1918 * server.h: Don't include alloca.h and malloc.h.
1919 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1920 Don't include malloc.h.
1921
43968415
JB
19222014-11-17 Joel Brobecker <brobecker@adacore.com>
1923
1924 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1925 corresponding ERRNO check in same block.
1926
40e91bc7
PA
19272014-11-12 Pedro Alves <palves@redhat.com>
1928
1929 * server.c (cont_thread): Update comment.
1930 (start_inferior, attach_inferior): No longer clear cont_thread.
1931 (handle_v_cont): No longer set cont_thread.
1932 (captured_main): Clear cont_thread each time a GDB connects.
1933
c2c118cf
PA
19342014-11-12 Pedro Alves <palves@redhat.com>
1935
1936 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1937 thread, and don't resume all threads if the Hc thread has exited.
1938
78708b7c
PA
19392014-11-12 Pedro Alves <palves@redhat.com>
1940
1941 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1942 the process group instead of to a specific LWP.
1943
a2abc7de
PA
19442014-10-15 Pedro Alves <palves@redhat.com>
1945
1946 PR server/17487
1947 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1948 parameter.
1949 (arm_set_thread_context): Delete.
1950 (the_low_target): Adjust.
1951 * win32-i386-low.c (debug_registers_changed)
1952 (debug_registers_used): Delete.
1953 (update_debug_registers_callback): New function.
1954 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1955 needing to update their debug registers.
1956 (win32_get_current_dr): New function.
1957 (x86_dr_low_get_addr, x86_dr_low_get_control)
1958 (x86_dr_low_get_status): Fetch the debug register from the thread
1959 record's context.
1960 (i386_initial_stuff): Adjust.
1961 (i386_get_thread_context): Remove current_event parameter. Don't
1962 clear debug_registers_changed nor copy DR values to
1963 debug_reg_state.
1964 (i386_set_thread_context): Delete.
1965 (i386_prepare_to_resume): New function.
1966 (i386_thread_added): Mark the thread as needing to update irs
1967 debug registers.
1968 (the_low_target): Remove i386_set_thread_context and install
1969 i386_prepare_to_resume.
1970 * win32-low.c (win32_get_thread_context): Adjust.
1971 (win32_set_thread_context): Use SetThreadContext
1972 directly.
1973 (win32_prepare_to_resume): New function.
1974 (win32_require_context): New function, factored out from ...
1975 (thread_rec): ... this.
1976 (continue_one_thread): Call win32_prepare_to_resume on each thread
1977 we're about to continue.
1978 (win32_resume): Call win32_prepare_to_resume on the event thread.
1979 * win32-low.h (struct win32_thread_info)
1980 <debug_registers_changed>: New field.
1981 (struct win32_target_ops): Change prototype of set_thread_context,
1982 delete set_thread_context and add prepare_to_resume.
1983 (win32_require_context): New declaration.
1984
a442d071
GB
19852014-10-08 Gary Benson <gbenson@redhat.com>
1986
1987 * server.h: Do not include common-exceptions.h.
1988
6f1947e8
GB
19892014-10-08 Gary Benson <gbenson@redhat.com>
1990
1991 * server.h: Do not include cleanups.h.
1992
63b434a4
JH
19932014-09-30 James Hogan <james.hogan@imgtec.com>
1994
1995 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1996 mips64-dsp-linux.c.
1997
c4d9ceb6
YQ
19982014-09-23 Yao Qi <yao@codesourcery.com>
1999
2000 * linux-low.c (lp_status_maybe_breakpoint): New function.
2001 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
2002 (count_events_callback): Likewise.
2003 (select_event_lwp_callback): Likewise.
2004 (cancel_breakpoints_callback): Likewise.
2005
89a5711c
DB
20062014-09-19 Don Breazeal <donb@codesourcery.com>
2007
2008 * linux-low.c (handle_extended_wait): Call
2009 linux_ptrace_get_extended_event.
2010 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
2011 linux_is_extended_waitstatus.
2012
bffc0964
JB
20132014-09-16 Joel Brobecker <brobecker@adacore.com>
2014
2015 * Makefile.in (CPPFLAGS): Define.
2016 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
2017 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
2018
0bfdf32f
GB
20192014-09-16 Gary Benson <gbenson@redhat.com>
2020
2021 * inferiors.h (current_inferior): Renamed as...
2022 (current_thread): New variable. All uses updated.
2023 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
2024 (maybe_move_out_of_jump_pad): Likewise.
2025 (cancel_breakpoint): Likewise.
2026 (linux_low_filter_event): Likewise.
2027 (wait_for_sigstop): Likewise.
2028 (linux_resume_one_lwp): Likewise.
2029 (need_step_over_p): Likewise.
2030 (start_step_over): Likewise.
2031 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
2032 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
2033 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
2034 and save_inferior as saved_thread.
2035 * regcache.c (get_thread_regcache): Renamed saved_inferior as
2036 saved_thread.
2037 (regcache_invalidate_thread): Likewise.
2038 * remote-utils.c (prepare_resume_reply): Likewise.
2039 * thread-db.c (thread_db_get_tls_address): Likewise.
2040 (disable_thread_event_reporting): Likewise.
2041 (remove_thread_event_breakpoints): Likewise.
2042 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
2043 as saved_thread.
2044 * target.h (set_desired_inferior): Renamed as...
2045 (set_desired_thread): New declaration. All uses updated.
2046 * server.c (myresume): Updated comment to reference thread instead
2047 of inferior.
2048 (handle_serial_event): Likewise.
2049 (handle_target_event): Likewise.
2050
361c8ade
GB
20512014-09-12 Tom Tromey <tromey@redhat.com>
2052 Gary Benson <gbenson@redhat.com>
2053
2054 * regcache.h: Include common-regcache.h.
2055 (regcache_read_pc): Don't declare.
2056 * regcache.c (get_thread_regcache_for_ptid): New function.
2057
bd9269f7
GB
20582014-09-11 Tom Tromey <tromey@redhat.com>
2059 Gary Benson <gbenson@redhat.com>
2060
2061 * symbol.c: New file.
2062 * Makefile.in (SFILES): Add symbol.c.
2063 (OBS): Add symbol.o.
2064
f8c1d06b
GB
20652014-09-11 Gary Benson <gbenson@redhat.com>
2066
2067 * target.c (target_stop_ptid, target_continue_ptid): New
2068 functions.
2069
721ec300
GB
20702014-09-11 Tom Tromey <tromey@redhat.com>
2071 Gary Benson <gbenson@redhat.com>
2072
2073 * target.h: Include target/target.h.
2074 * target.c (target_read_memory, target_read_uint32)
2075 (target_write_memory): New functions.
2076
c5e92cca
GB
20772014-09-11 Gary Benson <gbenson@redhat.com>
2078
2079 * server.h (debug_hw_points): Don't declare.
2080 * server.c (debug_hw_points): Don't define. Replace all uses
2081 with show_debug_regs.
2082 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2083 all uses with show_debug_regs.
2084
2e4bb98a
EBM
20852014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2086
2087 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2088 endianness into account.
2089 (ppc_supply_ptrace_register): Likewise.
2090
ac740bc7
JH
20912014-09-03 James Hogan <james.hogan@imgtec.com>
2092
2093 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2094 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2095
97ea6506
GB
20962014-09-03 Gary Benson <gbenson@redhat.com>
2097
2098 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2099 ALL_DEBUG_ADDRESS_REGISTERS.
2100
df7e5265
GB
21012014-09-02 Gary Benson <gbenson@redhat.com>
2102
2103 * i386-low.h: Renamed as...
2104 * x86-low.h: New file. All type, function and variable name
2105 prefixes changed from "i386_" to "x86_". All references updated.
2106 * i386-low.c: Renamed as...
2107 * x86-low.c: New file. All type, function and variable name
2108 prefixes changed from "i386_" to "x86_". All references updated.
2109
ed859da7
GB
21102014-09-02 Gary Benson <gbenson@redhat.com>
2111
2112 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2113 (x86_linux_new_thread): Likewise.
2114
860789c7
GB
21152014-08-29 Gary Benson <gbenson@redhat.com>
2116
2117 * server.h (setjmp.h): Do not include.
2118 (toplevel): Do not declare.
2119 (common-exceptions.h): Include.
2120 (cleanups.h): Likewise.
2121 * server.c (toplevel): Do not define.
2122 (exit_code): New static global.
2123 (detach_or_kill_for_exit_cleanup): New function.
2124 (main): New function. Original main renamed to...
2125 (captured_main): New function.
2126 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2127
ff55e1b5
GB
21282014-08-29 Gary Benson <gbenson@redhat.com>
2129
2130 * Makefile.in (SFILES): Add common/common-exceptions.c.
2131 (OBS): Add common-exceptions.o.
2132 (common-exceptions.o): New rule.
2133 * utils.c (prepare_to_throw_exception): New function.
2134
e9bcb658
GB
21352014-08-29 Gary Benson <gbenson@redhat.com>
2136
2137 * config.in: Regenerate.
2138 * configure: Likewise.
2139
e3180625
GB
21402014-08-29 Gary Benson <gbenson@redhat.com>
2141
2142 * Makefile.in (SFILES): Add common/cleanups.c.
2143 (OBS): cleanups.o.
2144 (cleanups.o): New rule.
2145
e3d6ba5d
GB
21462014-08-29 Gary Benson <gbenson@redhat.com>
2147
2148 * utils.c (internal_vwarning): New function.
2149
7096e886
GB
21502014-08-28 Gary Benson <gbenson@redhat.com>
2151
2152 * utils.h (fatal): Remove declaration.
2153 * utils.c (fatal): Remove function.
2154
14ce3192
GB
21552014-08-28 Gary Benson <gbenson@redhat.com>
2156
2157 * tracepoint.c (gdb_agent_init): Replace fatal with
2158 perror_with_name.
2159 (initialize_tracepoint): Likewise.
2160
50278d59
GB
21612014-08-28 Gary Benson <gbenson@redhat.com>
2162
2163 * remote-utils.c (remote_prepare): Replace fatal with error.
2164
aa96c426
GB
21652014-08-28 Gary Benson <gbenson@redhat.com>
2166
2167 * linux-low.c (linux_async): Replace fatal with warning.
2168 Tidy up and return.
2169 (linux_start_non_stop): Return -1 if linux_async failed.
2170
f7160e97
GB
21712014-08-28 Gary Benson <gbenson@redhat.com>
2172
2173 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2174 gdb_assert.
2175 (i386_dr_low_get_addr): Remove vague comment.
2176 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2177 gdb_assert.
2178
38e08fca
GB
21792014-08-28 Gary Benson <gbenson@redhat.com>
2180
2181 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2182 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2183 internal_error.
2184 (linux_resume_one_lwp): Likewise.
2185 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2186 gdb_assert.
2187 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2188 with internal_error.
2189 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2190 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2191 (find_register_by_name): Replace fatal with internal_error.
2192 (find_regno): Likewise.
2193 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2194 * thread-db.c (thread_db_create_event): Likewise.
2195 (thread_db_load_search): Likewise.
2196 (try_thread_db_load_1): Likewise.
2197 * tracepoint.c (get_jump_space_head): Replace fatal with
2198 internal_error.
2199 (claim_trampoline_space): Likewise.
2200 (have_fast_tracepoint_trampoline_buffer): Likewise.
2201 (cmd_qtstart): Likewise.
2202 (stop_tracing): Likewise.
2203 (fast_tracepoint_collecting): Likewise.
2204 (target_malloc): Likewise.
2205 (download_tracepoint): Likewise.
2206 (download_trace_state_variables): Replace check with gdb_assert.
2207 (upload_fast_traceframes): Replace fatal with internal_error.
2208
34abf635
GB
22092014-08-19 Tom Tromey <tromey@redhat.com>
2210 Gary Benson <gbenson@redhat.com>
2211
2212 * Makefile.in (SFILES): Add common/common-debug.c.
2213 (OBS): Add common-debug.o.
2214 (common-debug.o): New rule.
2215 * debug.h (debug_printf): Don't declare.
2216 * debug.c (debug_printf): Renamed and rewritten as...
2217 (debug_vprintf): New function.
2218
f6e94d78
GB
22192014-08-19 Gary Benson <gbenson@redhat.com>
2220
2221 * utils.h: Do not include print-utils.h.
2222
9239eeab
GB
22232014-08-19 Tom Tromey <tromey@redhat.com>
2224 Gary Benson <gbenson@redhat.com>
2225
2226 * server.h: Add static assertion.
2227 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2228
ef87c8bb
GB
22292014-08-19 Tom Tromey <tromey@redhat.com>
2230 Gary Benson <gbenson@redhat.com>
2231
2232 * Makefile.in (SFILES): Add common/errors.c.
2233 (OBS): Add errors.o.
2234 (IPA_OBS): Add errors-ipa.o.
2235 (errors.o): New rule.
2236 (errors-ipa.o): Likewise.
2237 * utils.h (perror_with_name, error, warning): Don't declare.
2238 * utils.c (warning): Renamed and rewritten as...
2239 (vwarning): New function.
2240 (error): Renamed and rewritten as...
2241 (verror): New function.
2242 (internal_error): Renamed and rewritten as...
2243 (internal_verror): New function.
2244
bb974a24
GB
22452014-08-07 Gary Benson <gbenson@redhat.com>
2246
2247 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2248 * configure: Regenerate.
2249 * config.in: Likewise.
2250 * server.h: Do not include errno.h.
2251 * event-loop.c: Likewise.
2252 * hostio-errno.c: Likewise.
2253 * linux-low.c: Likewise.
2254 * remote-utils.c: Likewise.
2255 * spu-low.c: Likewise.
2256 * utils.c: Likewise.
2257 * gdbreplay.c: Unconditionally include errno.h.
2258
6d3d12eb
GB
22592014-08-07 Gary Benson <gbenson@redhat.com>
2260
2261 * server.h: Do not include string.h.
2262 * event-loop.c: Likewise.
2263 * linux-low.c: Likewise.
2264 * regcache.c: Likewise.
2265 * remote-utils.c: Likewise.
2266 * spu-low.c: Likewise.
2267 * utils.c: Likewise.
2268
dccbb609
GB
22692014-08-07 Gary Benson <gbenson@redhat.com>
2270
2271 * server.h: Do not include gdb_assert.h.
2272
e76df0d0
GB
22732014-08-07 Gary Benson <gbenson@redhat.com>
2274
2275 * server.h: Do not include common-utils.h.
2276
4cb9c816
GB
22772014-08-07 Gary Benson <gbenson@redhat.com>
2278
2279 * server.h: Do not include ptid.h.
2280 * notif.h: Likewise.
2281
3995eeee
GB
22822014-08-07 Gary Benson <gbenson@redhat.com>
2283
2284 * server.h: Do not include gdb_locale.h.
2285
cb9f1a9b
GB
22862014-08-07 Gary Benson <gbenson@redhat.com>
2287
2288 * server.h: Do not include gdb/signals.h.
2289 * win32-low.c: Likewise.
2290
a5fceff8
GB
22912014-08-07 Gary Benson <gbenson@redhat.com>
2292
2293 * server.h: Do not include pathmax.h.
2294
b9391142
GB
22952014-08-07 Gary Benson <gbenson@redhat.com>
2296
2297 * server.h: Do not include libiberty.h.
2298 * linux-bfin-low.c: Likewise.
2299
0e443c87
GB
23002014-08-07 Gary Benson <gbenson@redhat.com>
2301
2302 * server.h: Do not include ansidecl.h.
2303
8ebb3f56
GB
23042014-08-07 Gary Benson <gbenson@redhat.com>
2305
2306 * linux-x86-low.c: Do not include stddef.h.
2307 * lynx-ppc-low.c: Likewise.
2308 * tracepoint.c: Likewise.
2309
8980bdf6
GB
23102014-08-07 Gary Benson <gbenson@redhat.com>
2311
2312 * server.h: Do not include stdarg.h.
2313 * nto-low.c: Likewise.
2314
d7096f71
GB
23152014-08-07 Gary Benson <gbenson@redhat.com>
2316
2317 * server.h: Do not include stdlib.h.
2318 * inferiors.c: Likewise.
2319 * linux-low.c: Likewise.
2320 * regcache.c: Likewise.
2321 * spu-low.c: Likewise.
2322 * tracepoint.c: Likewise.
2323 * utils.c: Likewise.
2324
d02f550d
GB
23252014-08-07 Gary Benson <gbenson@redhat.com>
2326
2327 * server.h: Do not include stdio.h.
2328 * linux-low.c: Likewise.
2329 * remote-utils.c: Likewise.
2330 * spu-low.c: Likewise.
2331 * utils.c: Likewise.
2332 * wincecompat.c: Likewise.
2333
87f6c4e3
GB
23342014-08-06 Gary Benson <gbenson@redhat.com>
2335
2336 * regcache.c (init_register_cache): Move conditionals inside if.
2337
7089dca4
GB
23382014-08-06 Gary Benson <gbenson@redhat.com>
2339
2340 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2341
462f517e
GB
23422014-07-31 Gary Benson <gbenson@redhat.com>
2343
2344 * ax.h: Do not include server.h.
2345 * gdbthread.h: Likewise.
2346 * lynx-low.h: Likewise.
2347 * notif.h: Likewise.
2348
976411d6
GB
23492014-07-30 Gary Benson <gbenson@redhat.com>
2350
2351 * server.h: Include common-defs.h.
2352 Do not include config.h or build-gnulib-gdbserver/config.h.
2353
d41f6d8e
GB
23542014-07-30 Gary Benson <gbenson@redhat.com>
2355
2356 * hostio-errno.c: Move server.h to top of includes list.
2357 * inferiors.c: Likewise.
2358 * linux-x86-low.c: Likewise.
2359 * notif.c: Include server.h.
2360
314c6a35
TT
23612014-07-24 Tom Tromey <tromey@redhat.com>
2362 Gary Benson <gbenson@redhat.com>
2363
2364 * server.h (CORE_ADDR): Now unsigned.
2365
69ff6be5
PA
23662014-07-16 Pedro Alves <palves@redhat.com>
2367
2368 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2369
ce9e3fe7
PA
23702014-07-15 Pedro Alves <palves@redhat.com>
2371
2372 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2373 copy.
2374
e76126e8
PA
23752014-07-11 Pedro Alves <palves@redhat.com>
2376
2377 * linux-low.c (kill_wait_lwp): New function, based on
2378 kill_one_lwp_callback, but use my_waitpid directly.
2379 (kill_one_lwp_callback, linux_kill): Use it.
2380
8e9db26e
PA
23812014-06-23 Pedro Alves <palves@redhat.com>
2382
2383 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2384 before setting DR0..DR3.
2385
698b3e08
GB
23862014-06-20 Gary Benson <gbenson@redhat.com>
2387
2388 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2389 * configure: Regenerated.
2390 * config.in: Likewise.
2391
125f8a3d
GB
23922014-06-20 Gary Benson <gbenson@redhat.com>
2393
2394 * Makefile.in (SFILES): Update locations for files moved
2395 from common to nat.
2396 (object file files): Reordered.
2397
42995dbd
GB
23982014-06-20 Gary Benson <gbenson@redhat.com>
2399
2400 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2401 (i386_dr_low_set_addr): Likewise.
2402 (i386_dr_low_get_addr): Likewise.
2403 (i386_dr_low_can_set_control): Likewise.
2404 (i386_dr_low_set_control): Likewise.
2405 (i386_dr_low_get_control): Likewise.
2406 (i386_dr_low_get_status): Likewise.
2407 (i386_get_debug_register_length): Likewise.
2408 * linux-x86-low.c (i386_dr_low_set_addr):
2409 Changed signature. Made static.
2410 (i386_dr_low_get_addr): Likewise.
2411 (i386_dr_low_set_control): Likewise.
2412 (i386_dr_low_get_control): Likewise.
2413 (i386_dr_low_get_status): Likewise.
2414 (i386_dr_low): New global variable.
2415 * win32-i386-low.c (i386_dr_low_set_addr):
2416 Changed signature. Made static.
2417 (i386_dr_low_get_addr): Likewise.
2418 (i386_dr_low_set_control): Likewise.
2419 (i386_dr_low_get_control): Likewise.
2420 (i386_dr_low_get_status): Likewise.
2421 (i386_dr_low): New global variable.
2422
e1d2394b
MS
24232014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2424
2425 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2426 * Makefile.in (AR, AR_FLAGS): Define.
2427 * configure: Regenerate.
2428
3a8ee006
GB
24292014-06-19 Gary Benson <gbenson@redhat.com>
2430
2431 * Makefile.in (i386-dregs.o): New rule.
2432 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2433 * i386-low.c (target.h): Remove include.
2434 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2435 (DR_CONTROL_SHIFT): Likewise.
2436 (DR_CONTROL_SIZE): Likewise.
2437 (DR_RW_EXECUTE): Likewise.
2438 (DR_RW_WRITE): Likewise.
2439 (DR_RW_READ): Likewise.
2440 (DR_RW_IORW): Likewise.
2441 (DR_LEN_1): Likewise.
2442 (DR_LEN_2): Likewise.
2443 (DR_LEN_4): Likewise.
2444 (DR_LEN_8): Likewise.
2445 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2446 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2447 (DR_ENABLE_SIZE): Likewise.
2448 (DR_LOCAL_SLOWDOWN): Likewise.
2449 (DR_GLOBAL_SLOWDOWN): Likewise.
2450 (DR_CONTROL_RESERVED): Likewise.
2451 (I386_DR_CONTROL_MASK): Likewise.
2452 (I386_DR_VACANT): Likewise.
2453 (I386_DR_LOCAL_ENABLE): Likewise.
2454 (I386_DR_GLOBAL_ENABLE): Likewise.
2455 (I386_DR_DISABLE): Likewise.
2456 (I386_DR_SET_RW_LEN): Likewise.
2457 (I386_DR_GET_RW_LEN): Likewise.
2458 (I386_DR_WATCH_HIT): Likewise.
2459 (i386_wp_op_t): Likewise.
2460 (i386_show_dr): Likewise.
2461 (i386_length_and_rw_bits): Likewise.
2462 (i386_insert_aligned_watchpoint): Likewise.
2463 (i386_remove_aligned_watchpoint): Likewise.
2464 (i386_handle_nonaligned_watchpoint): Likewise.
2465 i386_update_inferior_debug_regs(): Likewise.
2466 (i386_dr_insert_watchpoint): Likewise.
2467 (i386_dr_remove_watchpoint): Likewise.
2468 (i386_dr_region_ok_for_watchpoint): Likewise.
2469 (i386_dr_stopped_data_address): Likewise.
2470 (i386_dr_stopped_by_watchpoint): Likewise.
2471
8f26655c
GB
24722014-06-19 Gary Benson <gbenson@redhat.com>
2473
2474 * i386-low.c (i386_dr_show): Renamed to
2475 i386_show_dr and made static. All uses updated.
2476 (i386_dr_length_and_rw_bits): Renamed to
2477 i386_length_and_rw_bits and made static.
2478 All uses updated.
2479 (i386_dr_insert_aligned_watchpoint): Renamed to
2480 i386_insert_aligned_watchpoint and made static.
2481 All uses updated.
2482 (i386_dr_remove_aligned_watchpoint): Renamed to
2483 i386_remove_aligned_watchpoint and made static.
2484 All uses updated.
2485 (i386_dr_update_inferior_debug_regs): Renamed to
2486 i386_update_inferior_debug_regs and made static.
2487 All uses updated.
2488
b9228891
GB
24892014-06-18 Gary Benson <gbenson@redhat.com>
2490
5171def3
GB
2491 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2492 (i386_dr_low_can_set_control): Likewise.
2493 (i386_get_debug_register_length): Likewise.
2494 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2495 (i386_dr_low_can_set_control): Likewise.
2496 (i386_get_debug_register_length): Likewise.
2497
24982014-06-17 Gary Benson <gbenson@redhat.com>
2499
b9228891
GB
2500 * i386-low.h (i386-dregs.h): New include.
2501 (DR_FIRSTADDR): Now in i386-dregs.h.
2502 (DR_LASTADDR): Likewise.
2503 (DR_NADDR): Likewise.
2504 (DR_STATUS): Likewise.
2505 (DR_CONTROL): Likewise.
2506 (i386_debug_reg_state): Likewise.
2507 (i386_dr_insert_watchpoint): Likewise.
2508 (i386_dr_remove_watchpoint): Likewise.
2509 (i386_dr_region_ok_for_watchpoint): Likewise.
2510 (i386_dr_stopped_data_address): Likewise.
2511 (i386_dr_stopped_by_watchpoint): Likewise.
2512 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2513
4be83cc2
GB
25142014-06-18 Gary Benson <gbenson@redhat.com>
2515
2516 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2517 i386_dr_insert_watchpoint.
2518 (i386_low_remove_watchpoint): Renamed to
2519 i386_dr_remove_watchpoint.
2520 (i386_low_region_ok_for_watchpoint): Renamed to
2521 i386_dr_region_ok_for_watchpoint.
2522 (i386_low_stopped_data_address): Renamed to
2523 i386_dr_stopped_data_address.
2524 (i386_low_stopped_by_watchpoint): Renamed to
2525 i386_dr_stopped_by_watchpoint.
2526 * i386-low.c (i386_show_dr): Renamed to
2527 i386_dr_show and made nonstatic. All uses updated.
2528 (i386_length_and_rw_bits): Renamed to
2529 i386_dr_length_and_rw_bits and made nonstatic.
2530 All uses updated.
2531 (i386_insert_aligned_watchpoint): Renamed to
2532 i386_dr_insert_aligned_watchpoint and made nonstatic.
2533 All uses updated.
2534 (i386_remove_aligned_watchpoint): Renamed to
2535 i386_dr_remove_aligned_watchpoint and made nonstatic.
2536 All uses updated.
2537 (i386_update_inferior_debug_regs): Renamed to
2538 i386_dr_update_inferior_debug_regs and made nonstatic.
2539 All uses updated.
2540 (i386_low_insert_watchpoint): Renamed to
2541 i386_dr_insert_watchpoint. All uses updated.
2542 (i386_low_remove_watchpoint): Renamed to
2543 i386_dr_remove_watchpoint. All uses updated.
2544 (i386_low_region_ok_for_watchpoint): Renamed to
2545 i386_dr_region_ok_for_watchpoint. All uses updated.
2546 (i386_low_stopped_data_address): Renamed to
2547 i386_dr_stopped_data_address. All uses updated.
2548 (i386_low_stopped_by_watchpoint): Renamed to
2549 i386_dr_stopped_by_watchpoint. All uses updated.
2550
131aa0d4
GB
25512014-06-18 Gary Benson <gbenson@redhat.com>
2552
2553 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2554 (i386_dr_low_can_set_control): Likewise.
2555 (i386_insert_aligned_watchpoint): New check.
2556
d9305f7f
GB
25572014-06-18 Gary Benson <gbenson@redhat.com>
2558
2559 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2560 Renamed to state.
2561
e927c9fc
GB
25622014-06-18 Gary Benson <gbenson@redhat.com>
2563
2564 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2565 instead of fatal and error.
2566 (i386_handle_nonaligned_watchpoint): Likewise.
2567
1b6d4134
GB
25682014-06-18 Gary Benson <gbenson@redhat.com>
2569
2570 * i386-low.c (i386_get_debug_register_length): New macro.
2571 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2572 (i386_show_dr): Use debug_printf instead of fprintf. Use
2573 phex to format values.
2574
6e62758f
GB
25752014-06-18 Gary Benson <gbenson@redhat.com>
2576
2577 * i386-low.h: Comment changes.
2578 * i386-low.c: Likewise.
2579
fc6e2f03
GB
25802014-06-18 Gary Benson <gbenson@redhat.com>
2581
2582 * i386-low.c: Whitespace changes.
2583
f9d1eeed
TT
25842014-06-12 Tom Tromey <tromey@redhat.com>
2585
2586 * utils.c (freeargv): Remove.
2587
0b04e523
TT
25882014-06-12 Tom Tromey <tromey@redhat.com>
2589
2590 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2591 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2592 (parse_debug_format_options): Likewise.
2593 (gdbserver_usage): Likewise.
2594 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2595 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2596 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2597 against libiberty.
2598 ($(LIBGNU)): Depend on libiberty.
2599 (all-lib): Recurse into all subdirs.
2600 (install-only): Invoke "install" target in subdirs.
2601 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2602 targets.
2603 * configure: Rebuild.
2604 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2605 for vasprintf, vsnprintf, or gettimeofday.
2606 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2607 srv_tgtobj.
2608
270c9937
JB
26092014-06-05 Joel Brobecker <brobecker@adacore.com>
2610
2611 * development.sh: Delete.
2612 * Makefile.in (config.status): Adjust dependency on development.sh.
2613 * configure.ac: Adjust development.sh source call.
2614 * configure: Regenerate.
2615
0a261ed8
PA
26162014-06-02 Pedro Alves <palves@redhat.com>
2617
2618 * ax.c (gdb_free_agent_expr): New function.
2619 * ax.h (gdb_free_agent_expr): New declaration.
2620 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2621 list.
2622 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2623 static.
2624 (clear_breakpoint_conditions_and_commands): New function.
2625 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2626 (clear_breakpoint_conditions_and_commands): New declaration.
2627
e9dae05e
RR
26282014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2629
2630 * linux-aarch64-low.c (asm/ptrace.h): Include.
2631
5876f503
JK
26322014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2633
2634 Fix TLS access for -static -pthread.
2635 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2636 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2637 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2638
802e8e6d
PA
26392014-05-20 Pedro Alves <palves@redhat.com>
2640
2641 * linux-aarch64-low.c (aarch64_insert_point)
2642 (aarch64_remove_point): No longer check whether the type is
2643 supported here. Adjust to new interface.
2644 (the_low_target): Install aarch64_supports_z_point_type as
2645 supports_z_point_type method.
2646 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2647 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2648 instead of a Z packet char. Adjust.
2649 (arm_supports_z_point_type): New function.
2650 (arm_insert_point, arm_remove_point): Adjust to new interface.
2651 (the_low_target): Install arm_supports_z_point_type.
2652 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2653 (cris_insert_point, cris_remove_point): Adjust to new interface.
2654 Don't check whether the type is supported here.
2655 (the_low_target): Install cris_supports_z_point_type.
2656 * linux-low.c (linux_supports_z_point_type): New function.
2657 (linux_insert_point, linux_remove_point): Adjust to new interface.
2658 * linux-low.h (struct linux_target_ops) <insert_point,
2659 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2660 raw_breakpoint pointer parameter.
2661 <supports_z_point_type>: New method.
2662 * linux-mips-low.c (mips_supports_z_point_type): New function.
2663 (mips_insert_point, mips_remove_point): Adjust to new interface.
2664 Use mips_supports_z_point_type.
2665 (the_low_target): Install mips_supports_z_point_type.
2666 * linux-ppc-low.c (the_low_target): Install NULL as
2667 supports_z_point_type method.
2668 * linux-s390-low.c (the_low_target): Install NULL as
2669 supports_z_point_type method.
2670 * linux-sparc-low.c (the_low_target): Install NULL as
2671 supports_z_point_type method.
2672 * linux-x86-low.c (x86_supports_z_point_type): New function.
2673 (x86_insert_point): Adjust to new insert_point interface. Use
2674 insert_memory_breakpoint. Adjust to new
2675 i386_low_insert_watchpoint interface.
2676 (x86_remove_point): Adjust to remove_point interface. Use
2677 remove_memory_breakpoint. Adjust to new
2678 i386_low_remove_watchpoint interface.
2679 (the_low_target): Install x86_supports_z_point_type.
2680 * lynx-low.c (lynx_target_ops): Install NULL as
2681 supports_z_point_type callback.
2682 * nto-low.c (nto_supports_z_point_type): New.
2683 (nto_insert_point, nto_remove_point): Adjust to new interface.
2684 (nto_target_ops): Install nto_supports_z_point_type.
2685 * mem-break.c: Adjust intro comment.
2686 (struct raw_breakpoint) <raw_type, size>: New fields.
2687 <inserted>: Update comment.
2688 <shlib_disabled>: Delete field.
2689 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2690 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2691 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2692 (raw_bkpt_type_to_target_hw_bp_type): New function.
2693 (find_enabled_raw_code_breakpoint_at): New function.
2694 (find_raw_breakpoint_at): New type and size parameters. Use them.
2695 (insert_memory_breakpoint): New function, based off
2696 set_raw_breakpoint_at.
2697 (remove_memory_breakpoint): New function.
2698 (set_raw_breakpoint_at): Reimplement.
2699 (set_breakpoint): New, based on set_breakpoint_at.
2700 (set_breakpoint_at): Reimplement.
2701 (delete_raw_breakpoint): Go through the_target->remove_point
2702 instead of assuming memory breakpoints.
2703 (find_gdb_breakpoint_at): Delete.
2704 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2705 (find_gdb_breakpoint): New function.
2706 (set_gdb_breakpoint_at): Delete.
2707 (z_type_supported): New function.
2708 (set_gdb_breakpoint_1): New function, loosely based off
2709 set_gdb_breakpoint_at.
2710 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2711 (delete_gdb_breakpoint_at): Delete.
2712 (delete_gdb_breakpoint_1): New function, loosely based off
2713 delete_gdb_breakpoint_at.
2714 (delete_gdb_breakpoint): New function.
2715 (clear_gdb_breakpoint_conditions): Rename to ...
2716 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2717 breakpoint.
2718 (add_condition_to_breakpoint): Make static.
2719 (add_breakpoint_condition): Take a struct breakpoint pointer
2720 instead of an address. Adjust.
2721 (gdb_condition_true_at_breakpoint): Rename to ...
2722 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2723 z_type parameter.
2724 (gdb_condition_true_at_breakpoint): Reimplement.
2725 (add_breakpoint_commands): Take a struct breakpoint pointer
2726 instead of an address. Adjust.
2727 (gdb_no_commands_at_breakpoint): Rename to ...
2728 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2729 parameter. Return true if no breakpoint was found. Change debug
2730 output.
2731 (gdb_no_commands_at_breakpoint): Reimplement.
2732 (run_breakpoint_commands): Rename to ...
2733 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2734 and change return type to boolean.
2735 (run_breakpoint_commands): New function.
2736 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2737 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2738 breakpoint. Go through the_target->remove_point instead of
2739 assuming memory breakpoint.
2740 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2741 software and hardware breakpoints.
2742 (reinsert_raw_breakpoint): Go through the_target->insert_point
2743 instead of assuming memory breakpoint.
2744 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2745 software and hardware breakpoints.
2746 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2747 Check both software and hardware breakpoints.
2748 (validate_inserted_breakpoint): Assert the breakpoint is a
2749 software breakpoint. Set the inserted flag to -1 instead of
2750 setting shlib_disabled.
2751 (delete_disabled_breakpoints): Adjust.
2752 (validate_breakpoints): Only validate software breakpoints.
2753 Adjust to inserted flag change.
2754 (check_mem_read, check_mem_write): Skip breakpoint types other
2755 than software breakpoints. Adjust to inserted flag change.
2756 * mem-break.h (enum raw_bkpt_type): New enum.
2757 (raw_breakpoint, struct process_info): Forward declare.
2758 (Z_packet_to_target_hw_bp_type): Delete declaration.
2759 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2760 (set_gdb_breakpoint, delete_gdb_breakpoint)
2761 (clear_breakpoint_conditions): New declarations.
2762 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2763 (breakpoint_inserted_here): Update comment.
2764 (add_breakpoint_condition, add_breakpoint_commands): Replace
2765 address parameter with a breakpoint pointer parameter.
2766 (gdb_breakpoint_here): Update comment.
2767 (delete_gdb_breakpoint_at): Delete.
2768 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2769 * server.c (process_point_options): Take a struct breakpoint
2770 pointer instead of an address. Adjust.
2771 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2772 delete_gdb_breakpoint.
2773 * spu-low.c (spu_target_ops): Install NULL as
2774 supports_z_point_type method.
2775 * target.h: Include mem-break.h.
2776 (struct target_ops) <prepare_to_access_memory>: Update comment.
2777 <supports_z_point_type>: New field.
2778 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2779 instead of a char. Also take a raw breakpoint pointer.
2780 * win32-arm-low.c (the_low_target): Install NULL as
2781 supports_z_point_type.
2782 * win32-i386-low.c (i386_supports_z_point_type): New function.
2783 (i386_insert_point, i386_remove_point): Adjust to new interface.
2784 (the_low_target): Install i386_supports_z_point_type.
2785 * win32-low.c (win32_supports_z_point_type): New function.
2786 (win32_insert_point, win32_remove_point): Adjust to new interface.
2787 (win32_target_ops): Install win32_supports_z_point_type.
2788 * win32-low.h (struct win32_target_ops):
2789 <supports_z_point_type>: New method.
2790 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2791 instead of a char. Also take a raw breakpoint pointer.
2792
932539e3
PA
27932014-05-20 Pedro Alves <palves@redhat.com>
2794
2795 * mem-break.h: Include break-common.h.
2796 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2797 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2798 (Z_packet_to_target_hw_bp_type): New declaration.
2799 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2800 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2801 (Z_PACKET_ACCESS_WP): Delete macros.
2802 (Z_packet_to_hw_type): Delete function.
2803 * i386-low.h: Don't include break-common.h here.
2804 (Z_packet_to_hw_type): Delete declaration.
2805 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2806 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2807 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2808 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2809 * linux-aarch64-low.c: Don't include break-common.h here.
2810 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2811 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2812 (Z_packet_to_target_hw_bp_type): Delete function.
2813 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2814 function.
2815 (mips_insert_point, mips_remove_point): Use
2816 Z_packet_to_target_hw_bp_type.
2817
4ff0d3d8
PA
28182014-05-20 Pedro Alves <palves@redhat.com>
2819
2820 * linux-aarch64-low.c: Include break-common.h.
2821 (enum target_point_type): Delete.
2822 (Z_packet_to_point_type): Rename to ...
2823 (Z_packet_to_target_hw_bp_type): ... this, and return a
2824 target_hw_bp_type instead.
2825 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2826 instead of an enum target_point_type.
2827 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2828 breakpoint type.
2829 (aarch64_dr_state_insert_one_point)
2830 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2831 (aarch64_handle_aligned_watchpoint)
2832 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2833 Take an enum target_hw_bp_type instead of an enum
2834 target_point_type.
2835 (aarch64_supports_z_point_type): New function.
2836 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2837 use Z_packet_to_target_hw_bp_type.
2838
786dc519
JB
28392014-05-20 Joel Brobecker <brobecker@adacore.com>
2840
2841 * configure.ac: Only use -Werror by default when DEVELOPMENT
2842 is true.
2843 * configure: Regenerate.
2844
9e0aa64f
JK
28452014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2846
2847 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2848 * linux-x86-low.c (X86_64_USER_REGS): New.
2849 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2850
2b577b92
YQ
28512014-04-28 Yao Qi <yao@codesourcery.com>
2852
2853 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2854 name.
2855
94611da2
PA
28562014-04-25 Pedro Alves <palves@redhat.com>
2857
2858 PR server/16255
2859 * linux-low.c (linux_attach_fail_reason_string): New function.
2860 (linux_attach_lwp): Delete.
2861 (linux_attach_lwp_1): Rename to ...
2862 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2863 argument. Remove "initial" parameter. Return int instead of
2864 void. Don't error or warn here.
2865 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2866 failure to attach to the tgid. Call warning when failing to
2867 attach to an lwp.
2868 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2869 argument. Remove "initial" parameter. Return int instead of
2870 void. Don't error or warn here.
2871 (linux_attach_fail_reason_string): New declaration.
2872 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2873 interface change. Use linux_attach_fail_reason_string.
2874
01f9f808
MS
28752014-04-24 Michael Sturm <michael.sturm@mintel.com>
2876 Walfred Tedeschi <walfred.tedeschi@intel.com>
2877
2878 * Makefile.in: Added rules to handle new files
2879 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2880 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2881 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2882 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2883 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2884 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2885 x32-avx512-linux.o.
2886 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2887 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2888 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2889 i386/x32-avx512.xml.
2890 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2891 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2892 i386/x32-avx512-linux.xml.
2893 * i387-fp.c (num_avx512_k_registers): New constant for number
2894 of K registers.
2895 (num_avx512_zmmh_low_registers): New constant for number of
2896 lower ZMM registers (0-15).
2897 (num_avx512_zmmh_high_registers): New constant for number of
2898 higher ZMM registers (16-31).
2899 (num_avx512_ymmh_registers): New contant for number of higher
2900 YMM registers (ymm16-31 added by avx521 on x86_64).
2901 (num_avx512_xmm_registers): New constant for number of higher
2902 XMM registers (xmm16-31 added by AVX512 on x86_64).
2903 (struct i387_xsave): Add space for AVX512 registers.
2904 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2905 Add code to handle AVX512 registers.
2906 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2907 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2908 prototypei from generated file.
2909 (tdesc_amd64_avx512_linux): Likewise.
2910 (init_registers_x32_avx512_linux): Likewise.
2911 (tdesc_x32_avx512_linux): Likewise.
2912 (init_registers_i386_avx512_linux): Likewise.
2913 (tdesc_i386_avx512_linux): Likewise.
2914 (x86_64_regmap): Add AVX512 registers.
2915 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2916 mask.
2917 (initialize_low_arch): Add code to initialize AVX512 registers.
2918
51aa91f9
PA
29192014-04-23 Pedro Alves <palves@redhat.com>
2920
2921 * mem-break.c (find_gdb_breakpoint_at): Make static.
2922 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2923
a4165e94
PA
29242014-04-23 Pedro Alves <palves@redhat.com>
2925
2926 * i386-low.c: Don't include break-common.h here.
2927 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2928 prototype to take target_hw_bp_type as argument instead of a Z
2929 packet char.
2930 * i386-low.h: Include break-common.h here.
2931 (Z_packet_to_hw_type): Declare.
2932 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2933 prototypes.
2934 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2935 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2936 (x86_remove_point): Convert the packet number to a
2937 target_hw_bp_type before calling i386_low_remove_watchpoint.
2938 * win32-i386-low.c (i386_insert_point): Convert the packet number
2939 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2940 (i386_remove_point): Convert the packet number to a
2941 target_hw_bp_type before calling i386_low_remove_watchpoint.
2942
b8acf843
PA
29432014-04-23 Pedro Alves <palves@redhat.com>
2944
2945 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2946
d708bcd1
PA
29472014-04-10 Pedro Alves <palves@redhat.com>
2948
2949 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2950 Check if the condition or command is NULL before checking if the
2951 breakpoint is known. On success, return true.
2952 * mem-break.h (add_breakpoint_condition): Document return.
2953 (add_breakpoint_commands): Add describing comment.
2954 * server.c (skip_to_semicolon): New function.
2955 (process_point_options): Use it.
2956
2eec7d5b
PA
29572014-04-09 Pedro Alves <palves@redhat.com>
2958
2959 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2960 to lwpid_of.
2961
fa96cb38
PA
29622014-02-27 Pedro Alves <palves@redhat.com>
2963
2964 PR 12702
2965 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2966 macros.
2967 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2968 output.
2969 (last_thread_of_process_p): Take a PID argument instead of a
2970 thread pointer.
2971 (linux_wait_for_lwp): Delete.
2972 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2973 functions.
2974 (linux_low_filter_event): New function, party factored out from
2975 linux_wait_for_event.
2976 (linux_wait_for_event): Rename to ...
2977 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2978 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2979 sigsuspend. Check for zombie leaders.
2980 (linux_wait_for_event): Reimplement as wrapper around
2981 linux_wait_for_event_filtered.
2982 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2983 a normal or signal exit is seen, it's the whole process exiting.
2984 (wait_for_sigstop): No longer a for_each_inferior callback.
2985 Rewrite on top of linux_wait_for_event_filtered.
2986 (stop_all_lwps): Call wait_for_sigstop directly.
2987 * server.c (resume, handle_target_event): Handle
2988 TARGET_WAITKIND_NO_RESUMED.
2989
d763de10
JB
29902014-02-26 Joel Brobecker <brobecker@adacore.com>
2991
2992 * win32-low.c (psapi_get_dll_name,
2993 * win32_CreateToolhelp32Snapshot): Delete.
2994 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2995 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2996 Delete.
2997 (handle_load_dll): Add function description.
2998 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2999
850a0f76
JB
30002014-02-26 Joel Brobecker <brobecker@adacore.com>
3001
3002 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
3003 Add comment.
3004 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
3005 base address when calling win32_add_one_solib.
3006 (handle_load_dll): Delete local variable load_addr.
3007 Remove 0x1000 offset applied to DLL base address when calling
3008 win32_add_one_solib.
3009 (handle_unload_dll): Add comment.
3010
f25b3fc3
JB
30112014-02-26 Joel Brobecker <brobecker@adacore.com>
3012
3013 * win32-low.c (win32_add_all_dlls): Renames
3014 win32_ensure_ntdll_loaded. Rewrite function documentation.
3015 Adjust implementation to always load all DLLs.
3016 Add 0x1000 offset to DLL base address when calling
3017 win32_add_one_solib.
3018 (child_initialization_done): New static global.
3019 (do_initial_child_stuff): Set child_initialization_done to
3020 zero during child initialization, and 1 after. Replace call
3021 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
3022 Add comment.
3023 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
3024 (handle_unload_dll): Add function documentation.
3025 (get_child_debug_event): Ignore load and unload DLL events
3026 during child initialization.
3027
d86d4aaf
DE
30282014-02-20 Doug Evans <dje@google.com>
3029
3bc32da3 3030 Remove global all_lwps.
d86d4aaf
DE
3031 * inferiors.h (ptid_of): Move here from linux-low.h.
3032 (pid_of, lwpid_of): Ditto.
3033 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
3034 parameter is a struct thread_info * now.
3035 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
3036 directly. Pass &all_threads to find_inferior instead of &all_lwps.
3037 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
3038 directly.
3039 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
3040 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
3041 * linux-arm-low.c (update_registers_callback): Update, "entry"
3042 parameter is a struct thread_info * now.
3043 Fetch lwpid from current_inferior directly.
3044 (arm_insert_point): Pass &all_threads to find_inferior instead of
3045 &all_lwps.
3046 (arm_remove_point): Ditto.
3047 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3048 (arm_prepare_to_resume): Fetch pid from thread.
3049 (arm_read_description): Fetch lwpid from current_inferior directly.
3050 * linux-low.c (all_lwps): Delete.
3051 (delete_lwp): Delete call to remove_inferior.
3052 (handle_extended_wait): Fetch lwpid from thread.
3053 (add_lwp): Don't set lwp->entry.id. Remove call to
3054 add_inferior_to_list.
3055 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3056 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3057 (kill_one_lwp_callback): Ditto.
3058 (linux_kill): Don't dereference NULL pointer.
3059 Fetch ptid,lwpid from thread.
3060 (get_detach_signal): Fetch ptid from thread.
3061 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3062 Simplify call to regcache_invalidate_thread.
3063 (delete_lwp_callback): Update, "entry" parameter is a
3064 struct thread_info * now. Fetch pid from thread.
3065 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3066 (status_pending_p_callback): Update, "entry" parameter is a
3067 struct thread_info * now. Fetch ptid from thread.
3068 (find_lwp_pid): Update, "entry" parameter is a
3069 struct thread_info * now.
3070 (linux_wait_for_lwp): Fetch pid from thread.
3071 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3072 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3073 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3074 (dequeue_one_deferred_signal): Ditto.
3075 (cancel_breakpoint): Fetch ptid from current_inferior.
3076 (linux_wait_for_event): Pass &all_threads to find_inferior,
3077 not &all_lwps. Fetch ptid, lwpid from thread.
3078 (count_events_callback): Update, "entry" parameter is a
3079 struct thread_info * now.
3080 (select_singlestep_lwp_callback): Ditto.
3081 (select_event_lwp_callback): Ditto.
3082 (cancel_breakpoints_callback): Ditto.
3083 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3084 not &all_lwps.
3085 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3086 (unsuspend_one_lwp): Update, "entry" parameter is a
3087 struct thread_info * now.
3088 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3089 not &all_lwps.
3090 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3091 Fetch lwpid from thread, not lwp.
3092 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3093 Pass &all_threads to find_inferior, not &all_lwps.
3094 (send_sigstop): Fetch lwpid from thread, not lwp.
3095 (send_sigstop_callback): Update, "entry" parameter is a
3096 struct thread_info * now.
3097 (suspend_and_send_sigstop_callback): Ditto.
3098 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3099 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3100 struct thread_info * now.
3101 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3102 from thread, lwp.
3103 (lwp_running): Update, "entry" parameter is a
3104 struct thread_info * now.
3105 (stop_all_lwps): Fetch ptid from thread.
3106 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3107 (linux_resume_one_lwp): Fetch lwpid from thread.
3108 (linux_set_resume_request): Update, "entry" parameter is a
3109 struct thread_info * now. Fetch pid, lwpid from thread.
3110 (resume_status_pending_p): Update, "entry" parameter is a
3111 struct thread_info * now.
3112 (need_step_over_p): Ditto. Fetch lwpid from thread.
3113 (start_step_over): Fetch lwpid from thread.
3114 (linux_resume_one_thread): Update, "entry" parameter is a
3115 struct thread_info * now. Fetch lwpid from thread.
3116 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3117 (proceed_one_lwp): Update, "entry" parameter is a
3118 struct thread_info * now. Fetch lwpid from thread.
3119 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3120 struct thread_info * now.
3121 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3122 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3123 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3124 directly.
3125 (regsets_store_inferior_registers): Ditto.
3126 (fetch_register, store_register): Ditto.
3127 (linux_read_memory, linux_write_memory): Ditto.
3128 (linux_request_interrupt): Ditto.
3129 (linux_read_auxv): Ditto.
3130 (linux_xfer_siginfo): Ditto.
3131 (linux_qxfer_spu): Ditto.
3132 (linux_qxfer_libraries_svr4): Ditto.
3133 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3134 moved to inferiors.h.
3135 (get_lwp): Delete.
3136 (get_thread_lwp): Update.
3137 (struct lwp_info): Delete member "entry". Simplify comment for
3138 member "thread".
3139 (all_lwps): Delete.
3140 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3141 current_inferior directly.
3142 (update_watch_registers_callback): Update, "entry" parameter is a
3143 struct thread_info * now. Fetch pid from thread.
3144 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3145 (mips_insert_point): Fetch lwpid from current_inferior.
3146 Pass &all_threads to find_inferior, not &all_lwps.
3147 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3148 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3149 directly.
3150 (mips_stopped_data_address): Ditto.
3151 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3152 directly.
3153 * linux-tile-low.c (tile_arch_setup): Ditto.
3154 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3155 (update_debug_registers_callback): Update, "entry" parameter is a
3156 struct thread_info * now. Fetch pid from thread.
3157 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3158 Pass &all_threads to find_inferior, not &all_lwps.
3159 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3160 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3161 Pass &all_threads to find_inferior, not &all_lwps.
3162 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3163 (i386_dr_low_get_status): Ditto.
3164 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3165 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3166 (x86_linux_read_description): Ditto.
3167 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3168
3b8361aa
DE
31692014-02-20 Doug Evans <dje@google.com>
3170
3171 * inferiors.c (get_first_inferior): Fix buglet.
3172
f7667f0d
DE
31732014-02-19 Doug Evans <dje@google.com>
3174
3175 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3176 * inferiors.c (add_thread): Change result type to struct thread_info *.
3177 All callers updated.
3178 (add_lwp): Call add_thread here instead of in callers.
3179 All callers updated.
3180 * linux-low.h (get_lwp_thread): Rewrite.
3181 (struct lwp_info): New member "thread".
3182
b3312d80
DE
31832014-02-19 Doug Evans <dje@google.com>
3184
3185 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3186 All callers updated.
3187
ecc6f45c
DE
31882014-02-19 Doug Evans <dje@google.com>
3189
3190 * inferiors.c (add_thread): Fix whitespace.
3191
649ebbca
DE
31922014-02-19 Doug Evans <dje@google.com>
3193
3194 * dll.c (clear_dlls): Replace accessing list implemention details
3195 with API function.
3196 * gdbthread.h (get_first_thread): Declare.
3197 * inferiors.c (for_each_inferior_with_data): New function.
3198 (get_first_thread): New function.
3199 (find_thread_ptid): Simplify.
3200 (get_first_inferior): New function.
3201 (clear_list): Delete.
3202 (one_inferior_p): New function.
3203 (clear_inferior_list): New function.
3204 (clear_inferiors): Update.
3205 * inferiors.h (for_each_inferior_with_data): Declare.
3206 (clear_inferior_list): Declare.
3207 (one_inferior_p): Declare.
3208 (get_first_inferior): Declare.
3209 * linux-low.c (linux_wait_for_event): Replace accessing list
3210 implemention details with API function.
3211 * server.c (target_running): Ditto.
3212 (accumulate_file_name_length): New function.
3213 (emit_dll_description): New function.
3214 (handle_qxfer_libraries): Replace accessing list implemention
3215 details with API function.
3216 (handle_qxfer_threads_worker): New function.
3217 (handle_qxfer_threads_proper): Replace accessing list implemention
3218 details with API function.
3219 (handle_query): Ditto.
3220 (visit_actioned_threads_callback_ftype): New typedef.
3221 (visit_actioned_threads_data): New struct.
3222 (visit_actioned_threads): Rewrite to be find_inferior callback.
3223 (resume): Call find_inferior.
3224 (handle_status): Replace accessing list implemention
3225 details with API function.
3226 (process_serial_event): Replace accessing list implemention details
3227 with API function.
3228 * target.c (set_desired_inferior): Replace accessing list implemention
3229 details with API function.
3230 * tracepoint.c (same_process_p): New function.
3231 (gdb_agent_about_to_close): Replace accessing list implemention
3232 details with API function.
3233 * win32-low.c (child_delete_thread): Replace accessing list
3234 implemention details with API function.
3235 (match_dll_by_basename): New function.
3236 (dll_is_loaded_by_basename): New function.
3237 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3238 details call to dll_is_loaded_by_basename.
3239
80894984
DE
32402014-02-19 Doug Evans <dje@google.com>
3241
3242 * dll.h (struct dll_info): Add comment.
3243 * gdbthread.h (struct thread_info): Add comment.
3244 (current_ptid): Simplify.
3245 * inferiors.c (add_process): Update.
3246 (remove_process): Update.
3247 * inferiors.h (struct process_info): Rename member "head" to "entry".
3248 * linux-low.c (delete_lwp): Update.
3249 (add_lwp): Update.
3250 (last_thread_of_process_p): Update.
3251 (kill_one_lwp_callback, linux_kill): Update.
3252 (status_pending_p_callback): Update.
3253 (wait_for_sigstop): Update. Simplify read of ptid.
3254 (start_step_over): Update.
3255 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3256 (get_lwp_thread): Update.
3257 (struct lwp_info): Rename member "head" to "entry".
3258 * regcache.h (inferior_list_entry): Delete.
3259 * server.c (kill_inferior_callback): Update.
3260 (detach_or_kill_inferior_callback): Update.
3261 (print_started_pid): Update.
3262 (print_attached_pid): Update.
3263 (process_serial_event): Simplify read of ptid.
3264 * thread-db.c (thread_db_create_event): Update.
3265 (thread_db_get_tls_address): Update.
3266 * win32-low.c (current_inferior_ptid): Simplify.
3267
46917d26
TT
32682014-02-19 Tom Tromey <tromey@redhat.com>
3269
3270 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3271 argument.
3272 (target_supports_btrace): Update.
3273
0759a81e
YQ
32742014-02-14 Yao Qi <yao@codesourcery.com>
3275
3276 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3277 (rsp-low-ipa.o): New target.
3278
a7191e8b
TT
32792014-02-12 Tom Tromey <tromey@redhat.com>
3280
3281 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3282 convert_ascii_to_int.
3283 * regcache.c (registers_to_string): Likewise.
3284 * remote-utils.c (decode_M_packet): Likewise.
3285 * server.c (process_serial_event): Likewise.
3286
ff0e980e
TT
32872014-02-12 Tom Tromey <tromey@redhat.com>
3288
3289 * server.c (handle_query, handle_v_run): Use hex2bin, not
3290 unhexify.
3291 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3292
e9371aff
TT
32932014-02-12 Tom Tromey <tromey@redhat.com>
3294
3295 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3296 convert_int_to_ascii.
3297 * regcache.c (registers_to_string, collect_register_as_string):
3298 Likewise.
3299 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3300 Likewise.
3301 * server.c (process_serial_event): Likewise.
3302 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3303 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3304
971dc0b8
TT
33052014-02-12 Tom Tromey <tromey@redhat.com>
3306
3307 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3308 bin2hex, not hexify.
3309 * tracepoint.c (cmd_qtstatus): Likewise.
3310
0a822afb
TT
33112014-02-12 Tom Tromey <tromey@redhat.com>
3312
3313 * remote-utils.c (monitor_output): Pass explicit length to
3314 hexify.
3315
9c3d6531
TT
33162014-02-12 Tom Tromey <tromey@redhat.com>
3317
3318 * tracepoint.c: Include rsp-low.h.
3319 * server.c: Include rsp-low.h.
3320 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3321 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3322 declare.
3323 * remote-utils.c: Include rsp-low.h.
3324 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3325 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3326 (convert_int_to_ascii, convert_ascii_to_int): Move to
3327 common/rsp-low.c.
3328 * regcache.c: Include rsp-low.h.
3329 * ax.c: Include rsp-low.h.
3330 * Makefile.in (SFILES): Add common/rsp-low.c.
3331 (OBS): Add rsp-low.o.
3332 (rsp-low.o): New target.
3333
01fd3ea5
TT
33342014-02-12 Tom Tromey <tromey@redhat.com>
3335
3336 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3337 Include print-utils.h.
3338 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3339 (plongest, thirty_two, phex_nz): Remove.
3340 * Makefile.in (SFILES): Add common/print-utils.c.
3341 (OBS): Add print-utils.o.
3342 (print-utils-ipa.o): New target.
3343 (print-utils.o): New target.
3344 (IPA_OBJS): Add print-utils-ipa.o.
3345
e99dc820
TT
33462014-02-06 Tom Tromey <tromey@redhat.com>
3347
3348 * Makefile.in (SFILES): Fix indentation.
3349
ee1e2d4f
DE
33502014-02-05 Doug Evans <dje@google.com>
3351
3352 * linux-low.c (linux_wait_for_event): Improve comment.
3353 (linux_wait_1): Keep current_inferior in sync with event_child.
3354
f5a02773
DE
33552014-01-22 Doug Evans <dje@google.com>
3356
3357 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3358
87ce2a04
DE
33592014-01-22 Doug Evans <dje@google.com>
3360
3361 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3362 * configure: Regenerate.
3363 * config.in: Regenerate.
3364 * Makefile.in (SFILES): Add debug.c.
3365 (OBS): Add debug.o.
3366 * debug.c: New file.
3367 * debug.h: New file.
3368 * linux-aarch64-low.c (*): Update all debugging printfs to use
3369 debug_printf instead of fprintf.
3370 * linux-arm-low.c (*): Ditto.
3371 * linux-cris-low.c (*): Ditto.
3372 * linux-crisv32-low.c (*): Ditto.
3373 * linux-m32r-low.c (*): Ditto.
3374 * linux-sparc-low.c (*): Ditto.
3375 * linux-x86.c (*): Ditto.
3376 * linux-low.c (*): Ditto.
3377 (linux_wait_1): Add calls to debug_enter, debug_exit.
3378 (linux_wait): Remove redundant debugging printf.
3379 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3380 (linux_resume, unstop_all_lwps): Ditto.
3381 * mem-break.c (*): Update all debugging printfs to use
3382 debug_printf instead of fprintf.
3383 * remote-utils.c (*): Ditto.
3384 * thread-db.c (*): Ditto.
3385 * server.c #include <ctype.h>, "gdb_vecs.h".
3386 (debug_threads): Moved to debug.c.
3387 (*): Update all debugging printfs to use debug_printf instead of
3388 fprintf.
3389 (start_inferior): Replace call to fflush with call to debug_flush.
3390 (monitor_show_help): Mention set debug-format.
3391 (parse_debug_format_options): New function.
3392 (handle_monitor_command): Handle "monitor set debug-format".
3393 (gdbserver_usage): Mention --debug-format.
3394 (main): Parse --debug-format.
3395 * server.h (debug_threads): Declaration moved to debug.h.
3396 #include "debug.h".
3397 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3398 trace_debug_1 that uses debug_printf.
3399 (tracepoint_look_up_symbols): Update all debugging printfs to use
3400 debug_printf instead of fprintf.
3401
e671835b
BS
34022014-01-20 Baruch Siach <baruch@tkos.co.il>
3403
3404 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3405 sys/ptrace.h.
3406
b5737fa9
PA
34072014-01-17 Pedro Alves <palves@redhat.com>
3408
ea38d2a9 3409 PR build/16445
c7faa97a
PA
3410 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3411 defined after including gdb_proc_service.h.
b5737fa9 3412
40ed484e
DE
34132014-01-16 Doug Evans <dje@google.com>
3414
3415 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3416 (match_dll): Use it.
3417
969c39fb
MM
34182014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3419
3420 * target.h (target_ops) <read_btrace>: Change parameters and
3421 return type to allow error reporting.
3422 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3423 trace reading errors on.
3424 * linux-low.c (linux_low_read_btrace): Pass trace reading
3425 errors on.
3426 (linux_low_disable_btrace): New.
3427
ab7f45ba
DE
34282014-01-15 Doug Evans <dje@google.com>
3429
3430 * inferiors.c (thread_id_to_gdb_id): Delete.
3431 * inferiors.h (thread_id_to_gdb_id): Delete.
3432
66af0f44
EZ
34332014-01-13 Eli Zaretskii <eliz@gnu.org>
3434
3435 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3436 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3437 versions.
3438
9939e131
PA
34392014-01-08 Pedro Alves <palves@redhat.com>
3440
3441 * server.c (handle_status): Don't discard previous queued stop
3442 replies or thread's pending status here.
3443 (main) <disconnection>: Do it here instead.
3444
b7ea362b
PA
34452014-01-08 Pedro Alves <palves@redhat.com>
3446
3447 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3448 * server.c (visit_actioned_threads, handle_pending_status): New
3449 function.
3450 (handle_v_cont): Factor out parts to ...
3451 (resume): ... this new function. If in all-stop, and a thread
3452 being resumed has a pending status, report it without actually
3453 resuming.
3454 (myresume): Adjust to use the new 'resume' function.
3455 (clear_pending_status_callback, set_pending_status_callback)
3456 (find_status_pending_thread_callback): New functions.
3457 (handle_status): Handle the case of multiple threads having
3458 interesting statuses to report. Report threads' real last signal
3459 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3460 with an interesting thread to report the status for, instead of
3461 always reporting the status of the first thread.
3462
28498c42
JB
34632014-01-01 Joel Brobecker <brobecker@adacore.com>
3464
3465 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3466 * gdbreplay.c (gdbreplay_version): Likewise.
3467
f45c82da
YZ
34682013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3469
3470 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3471 iov.iov_len with the real length in use.
3472
379a5e2d
JB
34732013-12-13 Joel Brobecker <brobecker@adacore.com>
3474
3475 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3476 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3477 for all targets that use win32-low.c.
3478 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3479 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3480
4210d83e
PA
34812013-12-13 Pedro Alves <palves@redhat.com>
3482
3483 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3484 if equal to TARGET_WAITKIND_LOADED.
3485 * win32-low.c (cached_status): New static global.
3486 (win32_wait): Add declaration.
3487 (do_initial_child_stuff): Flush all initial pending debug events
3488 up to the initial breakpoint.
3489 (win32_wait): If CACHED_STATUS was set, return that instead
3490 of doing a real wait. Remove the code resuming the execution
3491 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3492 during the initial phase. Also remove the code changing
3493 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3494 TARGET_WAITKIND_STOPPED.
3495
e7f0d979
YQ
34962013-12-11 Yao Qi <yao@codesourcery.com>
3497
3498 * notif.c (handle_notif_ack): Return 0 if no notification
3499 matches.
3500
ebcf782c
DE
35012013-11-20 Doug Evans <dje@google.com>
3502
3503 * linux-low.c (linux_set_resume_request): Fix comment.
3504
20ad9378
DE
35052013-11-20 Doug Evans <dje@google.com>
3506
3507 * linux-low.c (resume_status_pending_p): Tweak comment.
3508
a196ebeb
WT
35092013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3510
3511 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3512 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3513 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3514 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3515 (srv_amd64_regobj): Add amd64-mpx.o.
3516 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3517 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3518 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3519 * i387-fp.c (num_pl_bnd_register) Added constant.
3520 (num_pl_bnd_cfg_registers) Added constant.
3521 (struct i387_xsave) Added reserved area and MPX fields.
3522 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3523 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3524 function.
3525 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3526 (init_registers_amd64_mpx_linux): Declare new function.
3527 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3528 (x86_64_regmap): Add MPX registers.
3529 (x86_linux_read_description): Add MPX case.
3530 (initialize_low_arch): Initialize MPX targets.
3531
0080a2f6
TT
35322013-11-18 Tom Tromey <tromey@redhat.com>
3533
3534 * configure: Rebuild.
3535 * configure.ac: Don't check for stdlib.h.
3536 * gdbreplay.c: Unconditionally include stdlib.h.
3537
2978b111
TT
35382013-11-18 Tom Tromey <tromey@redhat.com>
3539
3540 * config.in: Rebuild.
3541 * configure: Rebuild.
3542 * configure.ac: Don't use AC_HEADER_DIRENT.
3543
a3d08894
TT
35442013-11-18 Tom Tromey <tromey@redhat.com>
3545
3546 * server.h: Don't check HAVE_STRING_H.
3547 * gdbreplay.c: Don't check HAVE_STRING_H.
3548 * configure: Rebuild.
3549
0a5dd17d
TT
35502013-11-18 Tom Tromey <tromey@redhat.com>
3551
3552 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3553 LIBGNU.
3554
1bd2f0ba
TT
35552013-11-08 Tom Tromey <tromey@redhat.com>
3556
3557 * configure, config.in: Rebuild.
3558 * configure.ac: Remove unused configury.
3559
3266f10b
TT
35602013-11-08 Tom Tromey <tromey@redhat.com>
3561
3562 * acinclude.m4: Include common.m4, codeset.m4.
3563 * configure, config.in: Rebuild.
3564 * configure.ac: Use GDB_AC_COMMON.
3565
6682d959
AA
35662013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3567
3568 * linux-s390-low.c (HWCAP_S390_TE): New define.
3569 (s390_arch_setup): Consider the TE field in the HWCAP for
3570 determining 'have_regset_tdb'.
3571
fd0a4d76
SDJ
35722013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3573
3574 PR gdb/16014
3575 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3576 call to sizeof.
3577
1a3d890b
PA
35782013-10-02 Pedro Alves <palves@redhat.com>
3579
3580 * server.c (process_serial_event): Don't output "GDBserver
3581 exiting" if GDB is connected through stdio.
3582 * target.c (mywait): Likewise, be silent if GDB is connected
3583 through stdio.
3584
97ad4581
JB
35852013-10-01 Joel Brobecker <brobecker@adacore.com>
3586
3587 * lynx-low.c (lynx_add_threads_after_attach): New function.
3588 (lynx_attach): Remove call to add_thread. Add call to
3589 lynx_add_threads_after_attach instead.
3590
5b4e221c
MF
35912013-09-28 Mike Frysinger <vapier@gentoo.org>
3592
3593 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3594 * config.in, configure: Regenerated.
3595
ee47b2f8
YQ
35962013-09-18 Yao Qi <yao@codesourcery.com>
3597
3598 PR server/15959
3599 * server.c (start_inferior): Clear 'resume_info'.
3600
d6707650 36012013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3602
d6707650
JW
3603 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3604 for each register.
3605
9243dd0e 36062013-09-16 Jiong Wang <jiwang@tilera.com>
0f63d4db 3607
9243dd0e
JW
3608 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3609 linux-tile-low.o to srv_tgtobj.
3610
c623a6ef
WN
36112013-09-16 Will Newton <will.newton@linaro.org>
3612
3613 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3614 out regs.
3615
fb71d39e
PA
36162013-09-06 Pedro Alves <palves@redhat.com>
3617
3618 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3619 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3620 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3621 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3622 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3623 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3624
8e7e9910
PA
36252013-09-06 Pedro Alves <palves@redhat.com>
3626
3627 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3628 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3629
7c3a12ca
PA
36302013-09-06 Pedro Alves <palves@redhat.com>
3631
3632 * linux-amd64-ipa.c: Include tracepoint.h.
3633 * linux-i386-ipa.c: Include tracepoint.h.
3634
8eb3d7b6
RW
36352013-09-06 Ricard Wanderlof <ricardw@axis.com>
3636
3637 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3638 (ps_get_thread_area): New function.
3639
eddddb9d
RW
36402013-09-06 Ricard Wanderlof <ricardw@axis.com>
3641
3642 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3643 (initialize_low_arch): Call init_registers_crisv32 rather than
3644 init_register_crisv32.
3645
533b0600
PA
36462013-09-05 Pedro Alves <palves@redhat.com>
3647
3648 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3649 to ...
3650 * hostio.h: ... this new file.
3651 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3652 win32-low.c: Include hostio.h.
3653
0ce3d3b5
PA
36542013-09-05 Pedro Alves <palves@redhat.com>
3655
3656 * server.h (gdb_client_data, handler_func, callback_handler_func)
3657 (delete_file_handler, add_file_handler, append_callback_event)
3658 (delete_callback_event, start_event_loop, initialize_event_loop):
3659 Move to event-loop.h and include it.
3660 * event-loop.h: New file.
3661
799cdc37
PA
36622013-09-05 Pedro Alves <palves@redhat.com>
3663
3664 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3665 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3666 (loaded_dll, unloaded_dll): Move to ...
3667 * dll.h: ... this new file.
3668 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3669
6a6bbd9d
PA
36702013-09-05 Pedro Alves <palves@redhat.com>
3671
3672 * server.h (current_process, get_thread_process, all_processes)
3673 (add_inferior_to_list, for_each_inferior, current_inferior)
3674 (remove_inferior, add_process, remove_process, find_process_pid)
3675 (have_started_inferiors_p, have_attached_inferiors_p)
3676 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3677 (clear_inferiors, find_inferior, find_inferior_id)
3678 (inferior_target_data, set_inferior_target_data)
3679 (inferior_regcache_data, set_inferior_regcache_data): Move to
3680 inferiors.h, and include it.
3681 * inferiors.h: New file.
3682
f699aaba
PA
36832013-09-05 Pedro Alves <palves@redhat.com>
3684
3685 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3686 Move ...
72f4393d 3687 * ax.h: ... here.
f699aaba 3688
c144c7a0
PA
36892013-09-05 Pedro Alves <palves@redhat.com>
3690
3691 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3692 tracepoint.h.
3693 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3694 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3695 (handle_tracepoint_general_set, handle_tracepoint_query)
3696 (tracepoint_finished_step, tracepoint_was_hit)
3697 (release_while_stepping_state_list, current_traceframe)
3698 (in_readonly_region, traceframe_read_mem)
3699 (fetch_traceframe_registers, traceframe_read_sdata)
3700 (traceframe_read_info, struct fast_tpoint_collect_status)
3701 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3702 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3703 (supply_fast_tracepoint_registers)
3704 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3705 (ipa_tdesc, claim_trampoline_space)
3706 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3707 (agent_mem_read, agent_get_trace_state_variable_value)
3708 (agent_set_trace_state_variable_value, agent_tsv_read)
3709 (agent_mem_read_string, get_raw_reg_func_addr)
3710 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3711 * tracepoint.h: ... this new file.
3712
ff42e6ab
PA
37132013-09-05 Pedro Alves <palves@redhat.com>
3714
3715 * server.h (perror_with_name, error, fatal, warning, paddress)
3716 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3717 include it.
3718 * utils.h: New file.
3719
541af0f4
PA
37202013-09-05 Pedro Alves <palves@redhat.com>
3721
3722 * server.h (remote_debug, noack_mode, transport_is_reliable)
3723 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3724 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3725 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3726 (write_enn, initialize_async_io, enable_async_io)
3727 (disable_async_io, check_remote_input_interrupt_request)
3728 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3729 (dead_thread_notify, prepare_resume_reply)
3730 (decode_address_to_semicolon, decode_address, decode_m_packet)
3731 (decode_M_packet, decode_X_packet, decode_xfer_write)
3732 (decode_search_memory_packet, unhexify, hexify)
3733 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3734 (look_up_one_symbol, relocate_instruction)
3735 (monitor_output): Move to remote-utils.h, and include it.
3736 * remote-utils.h: New file.
3737
eebdf26b
PA
37382013-09-05 Pedro Alves <palves@redhat.com>
3739
3740 * server.h (_): Delete.
3741
3aafd2ff
PA
37422013-09-02 Pedro Alves <palves@redhat.com>
3743
3744 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3745 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3746 allocated.
3747 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3748
cee83bcb
PM
37492013-09-02 Pierre Muller <muller@sourceware.org>
3750
3751 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3752 or WriteProcessMemory complete successfully and handle
3753 ERROR_PARTIAL_COPY error.
3754
9a13b2fa
PA
37552013-09-02 Pedro Alves <palves@redhat.com>
3756
3757 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3758 error instead of EIO.
3759
602e3198
JK
37602013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3761
3762 PR server/15604
3763 * linux-low.c: Include filestuff.h.
3764 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3765 * lynx-low.c: Include filestuff.h.
3766 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3767 * server.c: Include filestuff.h.
3768 (main): Call notice_open_fds.
3769 * spu-low.c: Include filestuff.h.
3770 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3771
96d7229d
LM
37722013-08-22 Luis Machado <lgustavo@codesourcery.com>
3773
3774 * Makefile.in: Explain why ../target and ../nat are not
3775 listed as include file search paths.
3776 (linux-waitpid.o): New object file rule.
3777 * configure.srv (srv_native_linux_obj): New variable.
3778 Replace all occurrences of linux native object files with
3779 $srv_native_linux_obj.
3780 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3781 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3782 (linux_enable_event_reporting): Remove declaration.
3783 (my_waitpid): Moved to common/linux-waitpid.c.
3784 (linux_wait_for_event): Pass ptid when calling
3785 linux_enable_event_reporting.
3786 (linux_supports_tracefork_flag): Remove.
3787 (linux_enable_event_reporting): Likewise.
3788 (linux_tracefork_grandchild): Remove.
3789 (STACK_SIZE): Moved to common/linux-ptrace.c.
3790 (linux_tracefork_child): Remove.
3791 (linux_test_for_tracefork): Remove.
3792 (linux_look_up_symbols): Call linux_supports_traceclone.
3793 (initialize_low): Remove call to linux_test_for_tracefork.
3794 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3795 common/linux-ptrace.h.
3796 (PTRACE_TYPE_ARG4): Likewise.
3797 Include linux-ptrace.h.
3798
32940073
PA
37992013-08-21 Pedro Alves <palves@redhat.com>
3800
3801 * config.in: Renegerate.
3802
33b60d58 38032013-08-19 Luis Machado <lgustavo@codesourcery.com>
a261b8f5 3804
33b60d58
LM
3805 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3806 (SFILES): Remove $(srcdir)/common/target-common.c and
3807 add $(srcdir)/target/waitstatus.c.
3808 (OBS): Remove target-common.o and add waitstatus.o.
3809 (server_h): Remove $(srcdir)/../common/target-common.h and
3810 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3811 and $(srcdir)/../target/waitstatus.h.
3812 (target-common.o): Remove.
3813 (waitstatus.o): New target object file.
3814 * target.h: Do not include target-common.h and
3815 include target/resume.h, target/wait.h and
3816 target/waitstatus.h.
3817
b8e1b30e
LM
38182013-08-13 Luis Machado <lgustavo@codesourcery.com>
3819
3820 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3821 to PTRACE_TYPE_ARG3.
3822 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3823 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3824 PTRACE_TYPE_ARG4.
3825 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3826 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3827
7a60ad40
YQ
38282013-07-27 Jie Zhang <jie@codesourcery.com>
3829 Daniel Jacobowitz <dan@codesourcery.com>
3830 Yao Qi <yao@codesourcery.com>
3831
3832 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3833 (mips-linux-watch.o): New rule.
3834 (mips_linux_watch_h): New variable.
3835 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3836 srv_tgtobj.
3837 * linux-mips-low.c: Include mips-linux-watch.h.
3838 (struct arch_process_info, struct arch_lwp_info): New.
3839 (update_watch_registers_callback): New function.
3840 (mips_linux_new_process, mips_linux_new_thread) New functions.
3841 (mips_linux_prepare_to_resume, mips_insert_point): New
3842 functions.
3843 (mips_remove_point, mips_stopped_by_watchpoint): New
3844 functions.
3845 (rsp_bp_type_to_target_hw_bp_type): New function.
3846 (mips_stopped_data_address): New function.
3847 (the_low_target): Add watchpoint support functions.
3848
de6f69ad
YQ
38492013-07-27 Yao Qi <yao@codesourcery.com>
3850
3851 * i386-low.c: Include break-common.h.
3852 (enum target_hw_bp_type): Remove.
3853
3360c0bf
LM
38542013-07-24 Luis Machado <lgustavo@codesourcery.com>
3855
3856 * Makefile.in (SFILES): /common/target-common.c.
3857 (OBS): Add target-common.o.
3858 (server_h): Add $(srcdir)/../common/target-common.h.
3859 (target-common.o): New target.
3860 * server.c (queue_stop_reply_callback): Free
3861 status string after use.
3862 * target.c (target_waitstatus_to_string): Remove.
3863 * target.h: Include target-common.h.
3864 (resume_kind): Likewise.
3865 (target_waitkind): Likewise.
3866 (target_waitstatus): Likewise.
3867 (TARGET_WNOHANG): Likewise.
3868
bd885420
YQ
38692013-07-04 Yao Qi <yao@codesourcery.com>
3870
3871 * Makefile.in (host_alias): Use @host_noncanonical@.
3872 (target_alias): Use @target_noncanonical@.
3873 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3874 ACX_NONCANONICAL_HOST.
3875 * configure: Regenerated.
3876
3877 Revert:
3878 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3879
3880 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3881 * configure: Rebuild.
3882 * Makefile.in (version_host, version_target): Get from configure.
3883 (version.c): Use $(version_host) and $(version_target).
3884
17ef446e
PA
38852013-07-03 Pedro Alves <palves@redhat.com>
3886
3887 * Makefile.in (config.status): Depend on development.sh.
3888 * acinclude.m4: Include libmcheck.m4.
3889 * configure: Regenerate.
3890
7a9a7487
MG
38912013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3892
3893 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3894 attribute inside the parentheses.
3895 (winapi_DebugSetProcessKillOnExit): Ditto.
3896 (winapi_DebugBreakProcess): Ditto.
3897 (winapi_GenerateConsoleCtrlEvent): Ditto.
a261b8f5 3898
49b64de6
MG
38992013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3900
3901 * notif.h (notif_event): Add a dummy member to avoid compiler
3902 errors.
3903
d5749ee7
PA
39042013-07-01 Pedro Alves <palves@redhat.com>
3905
3906 * hostio.c (HOSTIO_PATH_MAX): Define.
3907 (require_filename, handle_open, handle_unlink, handle_readlink):
3908 Use it.
3909
d8d2a3ee
PA
39102013-07-01 Pedro Alves <palves@redhat.com>
3911
3912 * server.h: Include "pathmax.h".
3913 * linux-low.c: Don't include sys/param.h.
3914 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3915 MAXPATHLEN.
3916 * win32-low.c: Don't include sys/param.h.
3917 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3918
bc7dea8d
PA
39192013-07-01 Pedro Alves <palves@redhat.com>
3920
3921 * event-loop.c: Don't check HAVE_UNISTD_H before including
3922 <unistd.h>.
3923 * gdbreplay.c: Likewise.
3924 * remote-utils.c: Likewise.
3925 * server.c: Likewise.
3926 * configure.ac: Don't check for unistd.h.
3927 * configure: Regenerate.
3928
d6c2da54
TT
39292013-06-28 Tom Tromey <tromey@redhat.com>
3930
3931 * Makefile.in (version.c): Use version.in, not
3932 common/version.in.
3933
257b6bec
MG
39342013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3935
3936 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3937 * configure: Rebuild.
3938 * Makefile.in (version_host, version_target): Get from configure.
3939 (version.c): Use $(version_host) and $(version_target).
3940
86ebe149
DK
39412013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3942
3943 Fix trace-status to output user name without trailing colon.
3944 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3945
f30aa5af
DK
39462013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3947
3948 Fix trace-status to output proper start-time and stop-time.
3949 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3950 output start time and stop time in hex as gdb expects.
3951
28a93511
YQ
39522013-06-26 Pedro Alves <pedro@codesourcery.com>
3953
3954 * tracepoint.c (build_traceframe_info_xml): Output trace state
3955 variables present in the trace buffer.
3956
01208463
TT
39572013-06-24 Tom Tromey <tromey@redhat.com>
3958
3959 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3960 create-version.sh.
3961 (version.o): Remove.
3962 * gdbreplay.c: Include version.h.
3963 (version, host_name): Don't declare.
3964 * server.h: Include version.h.
3965 (version, host_name): Don't declare.
3966
760256f9
PA
39672013-06-12 Pedro Alves <palves@redhat.com>
3968
3969 * linux-x86-low.c (linux_is_elf64): Delete global.
3970 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3971 with local linux_pid_exe_is_elf_64_file use.
3972
030031ee
PA
39732013-06-11 Pedro Alves <palves@redhat.com>
3974
3975 * linux-low.c (regset_disabled, disable_regset): New functions.
3976 (regsets_fetch_inferior_registers)
3977 (regsets_store_inferior_registers): Use them.
3978 (initialize_regsets_info); Don't allocate the disabled_regsets
3979 array here.
3980 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3981 comment.
3982
5da6eb0a
PA
39832013-06-11 Pedro Alves <palves@redhat.com>
3984
3985 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3986 xmalloc.
3987
7e5aaa09
PA
39882013-06-11 Pedro Alves <palves@redhat.com>
3989
3990 * linux-x86-low.c (initialize_low_arch): Call
3991 init_registers_x32_avx_linux.
3992
d878444c
JK
39932013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3994
3995 Fix compatibility with Android Bionic.
3996 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3997 it is not empty.
3998
3aee8918
PA
39992013-06-07 Pedro Alves <palves@redhat.com>
4000
5f2b57b5 4001 PR server/14823
3aee8918
PA
4002 * Makefile.in (OBS): Add tdesc.o.
4003 (IPA_OBJS): Add tdesc-ipa.o.
4004 (tdesc-ipa.o): New rule.
4005 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
4006 interface.
4007 * linux-low.c (new_inferior): Delete.
4008 (disabled_regsets, num_regsets): Delete.
4009 (linux_add_process): Adjust to set the new per-process
4010 new_inferior flag.
4011 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
4012 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
4013 was a stop. When calling arch_setup, switch the current inferior
4014 to the thread that got an event.
4015 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
4016 (regsets_fetch_inferior_registers)
4017 (regsets_store_inferior_registers): New regsets_info parameter.
4018 Adjust to use it.
4019 (linux_register_in_regsets): New regs_info parameter. Adjust to
4020 use it.
4021 (register_addr, fetch_register, store_register): New usrregs_info
4022 parameter. Adjust to use it.
4023 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
4024 parameter regs_info. Adjust to use it.
4025 (linux_fetch_registers): Get the current inferior's regs_info, and
4026 adjust to use it.
4027 (linux_store_registers): Ditto.
4028 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
4029 (initialize_low): Don't initialize the target_regsets here. Call
4030 initialize_low_arch.
4031 * linux-low.h (target_regsets): Delete declaration.
4032 (struct regsets_info): New.
4033 (struct usrregs_info): New.
4034 (struct regs_info): New.
4035 (struct process_info_private) <new_inferior>: New field.
4036 (struct linux_target_ops): Delete the num_regs, regmap, and
4037 regset_bitmap fields. New field regs_info.
4038 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
4039 * i387-fp.c (num_xmm_registers): Delete.
4040 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
4041 calls to new interface.
4042 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
4043 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
4044 Infer the number of xmm registers from the regcache's target
4045 description.
4046 * i387-fp.h (num_xmm_registers): Delete.
4047 * inferiors.c (add_thread): Don't install the thread's regcache
4048 here.
4049 * proc-service.c (gregset_info): Fetch the current inferior's
4050 regs_info. Adjust to use it.
4051 * regcache.c: Include tdesc.h.
4052 (register_bytes, reg_defs, num_registers)
4053 (gdbserver_expedite_regs): Delete.
4054 (get_thread_regcache): If the thread doesn't have a regcache yet,
4055 create one, instead of aborting gdbserver.
4056 (regcache_invalidate_one): Rename to ...
4057 (regcache_invalidate_thread): ... this.
4058 (regcache_invalidate_one): New.
4059 (regcache_invalidate): Only invalidate registers of the current
4060 process.
4061 (init_register_cache): Add target_desc parameter, and use it.
4062 (new_register_cache): Ditto. Assert the target description has a
4063 non zero registers_size.
4064 (regcache_cpy): Add assertions. Adjust.
4065 (realloc_register_cache, set_register_cache): Delete.
4066 (registers_to_string, registers_from_string): Adjust.
4067 (find_register_by_name, find_regno, find_register_by_number)
4068 (register_cache_size): Add target_desc parameter, and use it.
4069 (free_register_cache_thread, free_register_cache_thread_one)
4070 (regcache_release, register_cache_size): New.
4071 (register_size): Add target_desc parameter, and use it.
4072 (register_data, supply_register, supply_register_zeroed)
4073 (supply_regblock, supply_register_by_name, collect_register)
4074 (collect_register_as_string, collect_register_by_name): Adjust.
4075 * regcache.h (struct target_desc): Forward declare.
4076 (struct regcache) <tdesc>: New field.
4077 (init_register_cache, new_register_cache): Add target_desc
4078 parameter.
4079 (regcache_invalidate_thread): Declare.
4080 (regcache_invalidate_one): Delete declaration.
4081 (regcache_release): Declare.
4082 (find_register_by_number, register_cache_size, register_size)
4083 (find_regno): Add target_desc parameter.
4084 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4085 declarations.
4086 * remote-utils.c: Include tdesc.h.
4087 (outreg, prepare_resume_reply): Adjust.
4088 * server.c: Include tdesc.h.
4089 (gdbserver_xmltarget): Delete declaration.
4090 (get_features_xml, process_serial_event): Adjust.
4091 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4092 declare.
4093 (struct process_info) <tdesc>: New field.
4094 (ipa_tdesc): Declare.
4095 * tdesc.c: New file.
4096 * tdesc.h: New file.
4097 * tracepoint.c: Include tdesc.h.
4098 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4099 (get_context_regcache): Adjust to pass ipa_tdesc down.
4100 (do_action_at_tracepoint): Adjust to get the register cache size
4101 from the context regcache's description.
4102 (traceframe_walk_blocks): Adjust to get the register cache size
4103 from the current trace frame's description.
4104 (traceframe_get_pc): Adjust to get current trace frame's
4105 description and pass it down.
4106 (gdb_collect): Adjust to get the register cache size from the
4107 IPA's description.
4108 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4109 (gdbserver_xmltarget): Delete.
4110 (initialize_low_tracepoint): Set the ipa's target description.
4111 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4112 (initialize_low_tracepoint): Set the ipa's target description.
4113 * linux-x86-low.c: Include tdesc.h.
4114 [__x86_64__] (is_64bit_tdesc): New.
4115 (ps_get_thread_area, x86_get_thread_area): Use it.
4116 (i386_cannot_store_register): Rename to ...
4117 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4118 (i386_cannot_fetch_register): Rename to ...
4119 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4120 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4121 to new interface.
4122 (target_regsets): Rename to ...
4123 (x86_regsets): ... this.
4124 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4125 interface.
4126 (x86_siginfo_fixup): Use is_64bit_tdesc.
4127 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4128 (tdesc_x32_avx_linux, tdesc_x32_linux)
4129 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4130 Declare.
4131 (x86_linux_update_xmltarget): Delete.
4132 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4133 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4134 (AMD64_LINUX_USER64_CS): New.
4135 (x86_linux_read_description): New, based on
4136 x86_linux_update_xmltarget.
4137 (same_process_callback): New.
4138 (x86_arch_setup_process_callback): New.
4139 (x86_linux_update_xmltarget): New.
4140 (x86_regsets_info): New.
4141 (amd64_linux_regs_info): New.
4142 (i386_linux_usrregs_info): New.
4143 (i386_linux_regs_info): New.
4144 (x86_linux_regs_info): New.
4145 (x86_arch_setup): Reimplement.
4146 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4147 (x86_emit_ops): Ditto.
4148 (the_low_target): Adjust. Install x86_linux_regs_info,
4149 x86_cannot_fetch_register, and x86_cannot_store_register.
4150 (initialize_low_arch): New.
4151 * linux-ia64-low.c (tdesc_ia64): Declare.
4152 (ia64_fetch_register): Adjust.
4153 (ia64_usrregs_info, regs_info): New globals.
4154 (ia64_regs_info): New function.
4155 (the_low_target): Adjust.
4156 (initialize_low_arch): New function.
4157 * linux-sparc-low.c (tdesc_sparc64): Declare.
4158 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4159 Adjust.
4160 (sparc_arch_setup): New function.
4161 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4162 (the_low_target): Adjust.
4163 (initialize_low_arch): New function.
4164 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4165 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4166 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4167 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4168 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4169 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4170 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4171 (tdesc_powerpc_isa205_vsx64l): Declare.
4172 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4173 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4174 (ppc_set_pc, ppc_get_hwcap): Adjust.
4175 (ppc_usrregs_info): Forward declare.
4176 (!__powerpc64__) ppc_regmap_adjusted: New global.
4177 (ppc_arch_setup): Adjust to the current process'es target
4178 description.
4179 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4180 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4181 (ppc_store_evrregset): Adjust.
4182 (target_regsets): Rename to ...
4183 (ppc_regsets): ... this, and make static.
4184 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4185 (ppc_regs_info): New function.
4186 (the_low_target): Adjust.
4187 (initialize_low_arch): New function.
4188 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4189 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4190 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4191 (tdesc_s390x_linux64v2): Declare.
4192 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4193 (s390_fill_gregset, s390_store_last_break): Adjust.
4194 (target_regsets): Rename to ...
4195 (s390_regsets): ... this, and make static.
4196 (s390_get_pc, s390_set_pc): Adjust.
4197 (s390_get_hwcap): New target_desc parameter, and use it.
4198 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4199 (s390_arch_setup): Adjust to set the current process'es target
4200 description. Don't adjust the regmap.
4201 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4202 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4203 (regs_info_3264): New globals.
4204 (s390_regs_info): New function.
4205 (the_low_target): Adjust.
4206 (initialize_low_arch): New function.
4207 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4208 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4209 [__mips64] (init_registers_mips_linux)
4210 (init_registers_mips_dsp_linux): Delete defines.
4211 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4212 (have_dsp): New global.
4213 (mips_read_description): New, based on mips_arch_setup.
4214 (mips_arch_setup): Reimplement.
4215 (get_usrregs_info): New function.
4216 (mips_cannot_fetch_register, mips_cannot_store_register)
4217 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4218 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4219 (target_regsets): Rename to ...
4220 (mips_regsets): ... this, and make static.
4221 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4222 (dsp_regs_info, regs_info): New globals.
4223 (mips_regs_info): New function.
4224 (the_low_target): Adjust.
4225 (initialize_low_arch): New function.
4226 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4227 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4228 Declare.
4229 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4230 (arm_read_description): New, with bits factored from
4231 arm_arch_setup.
4232 (arm_arch_setup): Reimplement.
4233 (target_regsets): Rename to ...
4234 (arm_regsets): ... this, and make static.
4235 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4236 (arm_regs_info): New function.
4237 (the_low_target): Adjust.
4238 (initialize_low_arch): New function.
4239 * linux-m68k-low.c (tdesc_m68k): Declare.
4240 (target_regsets): Rename to ...
4241 (m68k_regsets): ... this, and make static.
4242 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4243 (m68k_regs_info): New function.
4244 (m68k_arch_setup): New function.
4245 (the_low_target): Adjust.
4246 (initialize_low_arch): New function.
4247 * linux-sh-low.c (tdesc_sharch): Declare.
4248 (target_regsets): Rename to ...
4249 (sh_regsets): ... this, and make static.
4250 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4251 (sh_regs_info, sh_arch_setup): New functions.
4252 (the_low_target): Adjust.
4253 (initialize_low_arch): New function.
4254 * linux-bfin-low.c (tdesc_bfin): Declare.
4255 (bfin_arch_setup): New function.
4256 (bfin_usrregs_info, regs_info): New globals.
4257 (bfin_regs_info): New function.
4258 (the_low_target): Adjust.
4259 (initialize_low_arch): New function.
4260 * linux-cris-low.c (tdesc_cris): Declare.
4261 (cris_arch_setup): New function.
4262 (cris_usrregs_info, regs_info): New globals.
4263 (cris_regs_info): New function.
4264 (the_low_target): Adjust.
4265 (initialize_low_arch): New function.
4266 * linux-cris-low.c (tdesc_crisv32): Declare.
4267 (cris_arch_setup): New function.
4268 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4269 (cris_regs_info): New function.
4270 (the_low_target): Adjust.
4271 (initialize_low_arch): New function.
4272 * linux-m32r-low.c (tdesc_m32r): Declare.
4273 (m32r_arch_setup): New function.
4274 (m32r_usrregs_info, regs_info): New globals.
4275 (m32r_regs_info): Adjust.
4276 (initialize_low_arch): New function.
4277 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4278 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4279 (tic6x_usrregs_info): Forward declare.
4280 (tic6x_read_description): New function, based on ...
4281 (tic6x_arch_setup): ... this. Reimplement.
4282 (target_regsets): Rename to ...
4283 (tic6x_regsets): ... this, and make static.
4284 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4285 (tic6x_regs_info): New function.
4286 (the_low_target): Adjust.
4287 (initialize_low_arch): New function.
4288 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4289 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4290 (target_regsets): Rename to ...
4291 (xtensa_regsets): ... this, and make static.
4292 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4293 globals.
4294 (xtensa_arch_setup, xtensa_regs_info): New functions.
4295 (the_low_target): Adjust.
4296 (initialize_low_arch): New function.
4297 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4298 (nios2_arch_setup): Set the current process'es tdesc.
4299 (target_regsets): Rename to ...
4300 (nios2_regsets): ... this.
4301 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4302 (nios2_regs_info): New function.
4303 (the_low_target): Adjust.
4304 (initialize_low_arch): New function.
a261b8f5
PA
4305 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4306 (aarch64_arch_setup): Set the current process'es tdesc.
4307 (target_regsets): Rename to ...
4308 (aarch64_regsets): ... this.
4309 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4310 (aarch64_regs_info): New function.
4311 (the_low_target): Adjust.
4312 (initialize_low_arch): New function.
3aee8918
PA
4313 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4314 globals.
4315 (target_regsets): Rename to ...
4316 (tile_regsets): ... this.
4317 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4318 (tile_regs_info): New function.
4319 (tile_arch_setup): Set the current process'es tdesc.
4320 (the_low_target): Adjust.
4321 (initialize_low_arch): New function.
4322 * spu-low.c (tdesc_spu): Declare.
4323 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4324 * win32-arm-low.c (tdesc_arm): Declare.
4325 (arm_arch_setup): New function.
4326 (the_low_target): Install arm_arch_setup instead of
4327 init_registers_arm.
4328 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4329 (init_windows_x86): Rename to ...
4330 (i386_arch_setup): ... this. Set `win32_tdesc'.
4331 (the_low_target): Adjust.
4332 * win32-low.c (win32_tdesc): New global.
4333 (child_add_thread): Don't create the thread cache here.
4334 (do_initial_child_stuff): Set the new process'es tdesc.
4335 * win32-low.h (struct target_desc): Forward declare.
4336 (win32_tdesc): Declare.
4337 * lynx-i386-low.c (tdesc_i386): Declare global.
4338 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4339 * lynx-low.c (lynx_tdesc): New global.
4340 (lynx_add_process): Set the new process'es tdesc.
4341 * lynx-low.h (struct target_desc): Forward declare.
4342 (lynx_tdesc): Declare global.
4343 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4344 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4345 * nto-low.c (nto_tdesc): New global.
4346 (do_attach): Set the new process'es tdesc.
4347 * nto-low.h (struct target_desc): Forward declare.
4348 (nto_tdesc): Declare.
4349 * nto-x86-low.c (tdesc_i386): Declare.
4350 (nto_x86_arch_setup): Set `nto_tdesc'.
4351
b1fbec62
GB
43522013-06-04 Gary Benson <gbenson@redhat.com>
4353
4354 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4355 to qSupported response when appropriate.
4356 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4357 with nonzero-length annex.
4358 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4359 arguments supplied in annex.
4360
d1ec4ce7
DE
43612013-05-31 Doug Evans <dje@google.com>
4362
ac44adcb 4363 PR server/15594
d1ec4ce7
DE
4364 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4365 64 bits in 64-cross-32 environment.
4366
9b25f2d3
PA
43672013-05-28 Pedro Alves <palves@redhat.com>
4368
4369 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4370 (aarch64-without-fpu.c): Delete rule.
4371 * configure.srv (aarch64*-*-linux*): Remove references to
4372 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4373 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4374 declaration.
4375
6740dc9c
PA
43762013-05-24 Pedro Alves <palves@redhat.com>
4377
4378 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4379 instead of strchr/decode_address. Error if the range isn't split
4380 with a ','. Don't assume there's be a ':' in the action.
4381
c2d6af84
PA
43822013-05-23 Yao Qi <yao@codesourcery.com>
4383 Pedro Alves <palves@redhat.com>
4384
4385 * linux-low.c (lwp_in_step_range): New function.
4386 (linux_wait_1): If the thread was range stepping and stopped
4387 outside the stepping range, report the stop to GDB. Otherwise,
4388 continue stepping. Add range stepping debug output.
4389 (linux_set_resume_request): Copy the step range from the resume
4390 request to the lwp.
4391 (linux_supports_range_stepping): New.
4392 (linux_target_ops) <supports_range_stepping>: Set to
4393 linux_supports_range_stepping.
4394 * linux-low.h (struct linux_target_ops)
4395 <supports_range_stepping>: New field.
4396 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4397 * linux-x86-low.c (x86_supports_range_stepping): New.
4398 (the_low_target) <supports_range_stepping>: Set to
4399 x86_supports_range_stepping.
4400 * server.c (handle_v_cont): Handle 'r' action.
4401 (handle_v_requests): Append ";r" if the target supports range
4402 stepping.
4403 * target.h (struct thread_resume) <step_range_start,
4404 step_range_end>: New fields.
4405 (struct target_ops) <supports_range_stepping>:
4406 New field.
4407 (target_supports_range_stepping): New macro.
4408
58794e1a
JB
44092013-05-17 Joel Brobecker <brobecker@adacore.com>
4410
4411 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4412 confusion in comment.
4413
d631c5a7
JB
44142013-05-17 Joel Brobecker <brobecker@adacore.com>
4415
4416 * lynx-low.c (struct process_info_private): New type.
4417 (lynx_add_process): New function.
4418 (lynx_create_inferior, lynx_attach): Replace calls to
4419 add_process by calls to lynx_add_process.
4420 (lynx_resume): If PTID is null, then try using
4421 current_process()->private->last_wait_event_ptid.
4422 Add comments.
4423 (lynx_clear_inferiors): Delete. The contents of that function
4424 has been inlined in lynx_mourn;
4425 (lynx_wait_1): Save the ptid in the process's private data.
4426 (lynx_mourn): Free the process' private data. Replace call
4427 to lynx_clear_inferiors by call to clear_inferiors.
4428
96f7a20f
YQ
44292013-05-17 Yao Qi <yao@codesourcery.com>
4430
4431 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4432 the right place.
4433
db0dfaa0
LM
44342013-05-16 Luis Machado <lgustavo@codesourcery.com>
4435
4436 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4437 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4438 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4439 PT_TEXT_END_ADDR guards. Update comments.
4440 (linux_target_op) <read_offsets>: Conditionally define to
4441 linux_read_offsets if the target is UCLIBC and if it defines
4442 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4443
68f5f838
SL
44442013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4445 Andrew Jenner <andrew@codesourcery.com>
4446
4447 * Makefile.in (SFILES): Add linux-nios2-low.c.
4448 (clean): Add action to delete nios2-linux.c.
4449 (nios2-linux.c): New rule.
4450 * configure.srv: Add nios2*-*-linux*.
4451 * linux-nios2-low.c: New.
4452
1ebff1fd
HAQ
44532013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4454
4455 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4456
f6150862
HZ
44572013-04-25 Hui Zhu <hui@codesourcery.com>
4458
4459 PR gdb/15186
f6150862
HZ
4460 * ax.c (ax_printf): Add fflush.
4461
614c279d
TT
44622013-04-22 Tom Tromey <tromey@redhat.com>
4463
4464 * Makefile.in (SFILES): Add filestuff.c.
4465 (OBS): Add filestuff.o.
4466 (filestuff.o): New target.
4467 * config.in, configure: Rebuild.
4468 * configure.ac: Check for fdwalk, pipe2.
4469
7d4e5717
PA
44702013-04-17 Pedro Alves <palves@redhat.com>
4471
4472 * configure.ac (USE_THREAD_DB): Delete variable.
4473 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4474 Don't AC_SUBST USE_THREAD_DB.
4475 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4476 * config.in, configure: Regenerate.
4477
d5c93e41
PA
44782013-04-16 Pedro Alves <palves@redhat.com>
4479
4480 * linux-low.h (struct lwp_info) <thread_known>: Move under
4481 the USE_THREAD_DB #ifdef.
4482
04f5fe89
PA
44832013-04-16 Pedro Alves <palves@redhat.com>
4484
4485 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4486 (linux-low.o): Delete rule.
4487 * linux-low.h: Always include "gdb_thread_db.h" instead of
4488 conditionally including thread_db.h.
4489 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4490 HAVE_THREAD_DB_H.
4491
480b27bf
JK
44922013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4493
4494 * Makefile.in (install-only): Fix make install regression.
4495
43662968
JK
44962013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4497
4498 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4499 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4500 installation.
4501 * gdbserver.1: Remove.
4502
3e74e146
PA
45032013-03-22 Pedro Alves <palves@redhat.com>
4504
4505 * linux-low.c (handle_extended_wait): Don't call
4506 linux_enable_event_reporting.
4507
a8347a2a
TT
45082013-03-15 Tony Theodore <tonyt@logyst.com>
4509
4510 PR build/9098:
4511 * Makefile.in (SHELL): Use @SHELL@.
4512
eeb56fa7
SDJ
45132013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4514
4515 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4516 compiler warning.
4517
4fa7e2ff
JB
45182013-03-13 Joel Brobecker <brobecker@adacore.com>
4519
4520 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4521 Remove extraneous NULL element.
4522
8ddb1965
YQ
45232013-03-13 Yao Qi <yao@codesourcery.com>
4524
4525 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4526 'V' block in trace frame.
4527
9accd112
MM
45282013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4529
4530 * target.h (struct target_ops): Add btrace ops.
4531 (target_supports_btrace): New macro.
4532 (target_enable_btrace): New macro.
4533 (target_disable_btrace): New macro.
4534 (target_read_btrace): New macro.
4535 * gdbthread.h (struct thread_info): Add btrace field.
4536 * server.c: Include btrace-common.h.
4537 (handle_btrace_general_set): New function.
4538 (handle_btrace_enable): New function.
4539 (handle_btrace_disable): New function.
4540 (handle_general_set): Call handle_btrace_general_set.
4541 (handle_qxfer_btrace): New function.
4542 (struct qxfer qxfer_packets[]): Add btrace entry.
4543 * inferiors.c (remove_thread): Disable btrace.
4544 * linux-low: Include linux-btrace.h.
4545 (linux_low_enable_btrace): New function.
4546 (linux_low_read_btrace): New function.
4547 (linux_target_ops): Add btrace ops.
4548 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4549 Add srv_linux_btrace=yes.
4550 (x86_64-*-linux*): Add linux-btrace.o.
4551 Add srv_linux_btrace=yes.
4552 * configure.ac: Define HAVE_LINUX_BTRACE.
4553 * config.in: Regenerated.
4554 * configure: Regenerated.
4555
5cc22e4c
MM
45562013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4557
4558 * server.c (handle_qxfer): Preserve error message if -3 is
4559 returned.
4560 (qxfer): Document the -3 return value.
4561
7c97f91e
MM
45622013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4563
4564 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4565 (linux_btrace_h): New variable.
4566 (linux-btrace.o): New rule.
4567
be9a119c 45682013-03-08 Stan Shebs <stan@codesourcery.com>
f6f899bf
HAQ
4569 Hafiz Abid Qadeer <abidh@codesourcery.com>
4570
4571 * tracepoint.c (trace_buffer_size): New global.
4572 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4573 (init_trace_buffer): Change to one-argument function. Allocate
4574 trace buffer memory.
4575 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4576 handle QTBuffer:size packet.
4577 (cmd_bigqtbuffer_size): New function.
4578 (initialize_tracepoint): Call init_trace_buffer with
4579 DEFAULT_TRACE_BUFFER_SIZE.
4580 * server.c (handle_query): Add QTBuffer:size in the
4581 supported packets.
4582
e64f7499
YQ
45832013-03-07 Yao Qi <yao@codesourcery.com>
4584
4585 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4586 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4587 of -1.
4588 (cmd_qtsp): Adjust condition. Do post increment.
4589 Set cur_action and cur_step_action back to 0.
4590
f0ae6fc3
PA
45912013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4592
4593 PR server/15236
4594 * linux-low.c (linux_write_memory): Return early success if LEN is
4595 zero.
4596
b5b0b0af
CV
45972013-03-05 Corinna Vinschen <vinschen@redhat.de>
4598
334ad4a8 4599 * configure.srv: Add x86_64-*-cygwin* as target.
b5b0b0af 4600
589bc927
TT
46012013-02-28 Tom Tromey <tromey@redhat.com>
4602
4603 * configure.ac: Invoke AC_SYS_LARGEFILE.
4604 * configure, config.in: Rebuild.
4605
dfe07582
CV
46062013-02-28 Corinna Vinschen <vinschen@redhat.com>
4607
4608 * win32-low.c: Throughout, fix format strings and casts of
4609 printf-like functions to avoid type related warnings on all
4610 platforms.
4611 (get_child_debug_event): Print dwDebugEventCode as hex since
4612 that's how it's usually documented.
4613
736cd585
YQ
46142013-02-28 Yao Qi <yao@codesourcery.com>
4615
4616 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4617 pulongest.
4618
e1f58301
JW
46192013-02-27 Jiong Wang <jiwang@tilera.com>
4620
4621 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4622 (reg-tilegx32.c): New rule.
4623 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4624 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4625 different register info initializer according to elf class.
4626 (init_registers_tilgx32): New function. The tilegx32 register info
4627 initializer.
4628 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4629 (tile_store_gregset): Likewise.
4630
d171ca78
YQ
46312013-02-27 Yao Qi <yao@codesourcery.com>
4632
4633 * server.c (process_point_options): Print debug message when
4634 debug_threads is true.
4635
282bbdf3
YQ
46362013-02-26 Yao Qi <yao@codesourcery.com>
4637
4638 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4639
aca22551
PA
46402013-02-19 Pedro Alves <palves@redhat.com>
4641 Kai Tietz <ktietz@redhat.com>
4642
4643 PR gdb/15161
4644
4645 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4646 instead of strtoul to extract address from packet.
4647 (process_serial_event) <'z'>: Likewise.
4648
4f3cee1c
YQ
46492013-02-18 Yao Qi <yao@codesourcery.com>
4650
4651 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4652
8e1d55a3
PA
46532013-02-14 Pedro Alves <palves@redhat.com>
4654
4655 Plug memory leak.
4656
4657 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4658 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4659
458820da
PA
46602013-02-14 Pedro Alves <palves@redhat.com>
4661
4662 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4663
baea0dae
PA
46642013-02-14 Pedro Alves <palves@redhat.com>
4665
4666 * tracepoint.c (save_string): Delete.
4667 (add_tracepoint_action): Use savestring instead of save_string.
4668
0b1afbb3
PA
46692013-02-12 Pedro Alves <palves@redhat.com>
4670
4671 * linux-xtensa-low.c: Ditto.
4672 * xtensa-xtregs.c: Ditto.
4673
8a4ac37e
PA
46742013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4675
4676 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4677 thread_db.
4678
148de6bb
MS
46792013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4680
4681 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4682 aarch64_num_wp_regs and aarch64_num_bp_regs to
4683 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4684
55fac6e0
MS
46852013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4686
4687 * linux-aarch64-low.c (ps_get_thread_area): Replace
4688 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4689
176eb98c
MS
46902013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4691 Marcus Shawcroft <marcus.shawcroft@arm.com>
4692 Nigel Stephens <nigel.stephens@arm.com>
4693 Yufeng Zhang <yufeng.zhang@arm.com>
4694
4695 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4696 (aarch64.c, aarch64-without-fpu.c): New targets.
4697 * configure.srv (aarch64*-*-linux*): New.
4698 * linux-aarch64-low.c: New file.
4699
56f7af9c
MS
47002013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4701
43aaf8b6 4702 * linux-low.c (handle_extended_wait, linux_create_inferior)
56f7af9c
MS
4703 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4704 (dequeue_one_deferred_signal, linux_resume_one_thread)
4705 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4706 (linux_tracefork_grandchild, linux_test_for_tracefork)
4707 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4708 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4709 where the argument is 0.
4710
60f662b0
YQ
47112013-01-25 Yao Qi <yao@codesourcery.com>
4712
4713 * event-loop.c: Include "queue.h".
4714 (gdb_event_p): New typedef.
4715 (struct gdb_event) <next_event>: Remove.
4716 (event_queue): Change to QUEUE(gdb_event_p).
4717 (async_queue_event): Remove.
4718 (gdb_event_xfree): New.
4719 (initialize_event_loop): New.
4720 (process_event): Use API from QUEUE.
4721 (wait_for_event): Likewise.
4722 * server.c (main): Call initialize_event_loop.
4723 * server.h (initialize_event_loop): Declare.
4724
5ae4861a
YQ
47252013-01-18 Yao Qi <yao@codesourcery.com>
4726
4727 * ax.h (struct eval_agent_expr_context): New.
4728 (gdb_eval_agent_expr): Update declaration.
4729 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4730 TFRAME. Add new argument CTX.
4731 * server.h (struct eval_agent_expr_context): Declare.
4732 (agent_mem_read, agent_tsv_read): Update declaration.
4733 (agent_mem_read_string): Likewise.
4734 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4735 (add_traceframe_block): Add new argument TPOINT.
4736 Increase TPOINT->traceframe_usage.
4737 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4738 eval_tracepoint_agent_expr.
4739 (condition_true_at_tracepoint): Likewise.
4740 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4741 (agent_mem_read_string, agent_tsv_read): Likewise.
4742
85e00e85
YQ
47432013-01-16 Yao Qi <yao@codesourcery.com>
4744
4745 * linux-low.c (linux_resume_one_lwp): Don't check
4746 'lwp->bp_reinsert != 0'.
4747
4039cf45
JB
47482013-01-07 Joel Brobecker <brobecker@adacore.com>
4749 Pedro Alves <palves@redhat.com>
4750
4751 * lynx-low.c (ptrace_request_to_str): Define a temporary
4752 macro and use it to simplify this function's implementation.
4753
9044dee2
JB
47542013-01-07 Joel Brobecker <brobecker@adacore.com>
4755
4756 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4757 sets errno.
4758
e6352c8f
JB
47592013-01-07 Joel Brobecker <brobecker@adacore.com>
4760
4761 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4762
50681a27
JB
47632013-01-07 Joel Brobecker <brobecker@adacore.com>
4764
4765 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4766
3f6e77ef
JB
47672013-01-07 Joel Brobecker <brobecker@adacore.com>
4768
4769 * lynx-low.c (lynx_resume): Use the resume_info parameter
4770 to determine the ptid for the lynx_ptrace call, unless
4771 it is equal to minus_one_ptid, in which case we use the
4772 ptid of the current_inferior.
4773 (lynx_wait_1): After having received a thread create/exit
4774 event, resume the inferior's execution using the signaling
4775 thread's ptid, rather than the old ptid.
4776
7fda33ae
JB
47772013-01-07 Joel Brobecker <brobecker@adacore.com>
4778
4779 * lynx-low.c (lynx_resume): Delete variable ret.
4780
b9786c74
JB
47812013-01-01 Joel Brobecker <brobecker@adacore.com>
4782
4783 * gdbreplay.c (gdbreplay_version): Update copyright year.
4784 * server.c (gdbserver_version): Likewise.
4785
8b93d60f
JB
47862012-12-17 Joel Brobecker <brobecker@adacore.com>
4787
4788 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4789 new thread.
4790
037335a7
JB
47912012-12-17 Joel Brobecker <brobecker@adacore.com>
4792
4793 * lynx-low.c (ptrace_request_to_str): Add handling for
4794 PTRACE_GETTRACESIG.
4795
52d4cbd8
JB
47962012-12-17 Joel Brobecker <brobecker@adacore.com>
4797
4798 * lynx-low.c (lynx_attach): Delete variable new_process.
4799
ab8f6ca9
JB
48002012-12-17 Joel Brobecker <brobecker@adacore.com>
4801
4802 * lynx-low.c (lynx_create_inferior): Delete variable
4803 new_process.
4804
78cbc024
JB
48052012-12-17 Joel Brobecker <brobecker@adacore.com>
4806
4807 * lynx-low.c (ptrace_request_to_str): Do not handle
4808 PTRACE_GETTHREADLIST if this macro does not exist.
4809
14a00470
YQ
48102012-12-15 Yao Qi <yao@codesourcery.com>
4811
4812 * Makefile.in (OBS): Add notif.o.
4813 * notif.c, notif.h: New.
4814 * server.c: Include "notif.h".
4815 (struct vstop_notif) <next>: Remove.
4816 <base>: New field.
4817 (queue_stop_reply): Update.
4818 (push_event, send_next_stop_reply): Remove.
4819 (discard_queued_stop_replies): Update.
4820 (notif_stop): New variable.
4821 (handle_v_stopped): Remove.
4822 (handle_v_requests): Don't call handle_v_stopped. Call
4823 handle_ack_notif instead.
4824 (queue_stop_reply_callback): Call notif_event_enque instead
4825 of queue_stop_reply.
4826 (handle_status): Don't call send_next_stop_reply, call
4827 notif_write_event instead.
4828 (kill_inferior_callback): Likewise.
4829 (detach_or_kill_inferior_callback): Likewise.
4830 (main): Call initialize_notif.
4831 (process_serial_event): Call QUEUE_is_empty.
4832 (handle_target_event): Call notif_push instead of push event.
4833 * server.h (push_event): Remove declaration.
4834
61c125b9
TT
48352012-12-10 Tom Tromey <tromey@redhat.com>
4836
4837 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4838 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4839 macros.
4840 (.c.o): Rewrite.
4841 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4842 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4843 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4844 (amd64-linux-ipa.o, ax.o): Rewrite.
4845 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4846 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4847 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4848 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4849 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4850 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4851 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4852 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4853 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4854 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4855 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4856 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4857 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4858 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4859 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4860 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4861 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4862 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4863 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4864 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4865 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4866 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4867 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4868 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4869 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4870 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4871 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4872 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4873 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4874 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4875 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4876 (reg-tilegx.o): Remove.
4877 (all_object_files): New macro.
4878 Include .deps files.
4879 * aclocal.m4, configure: Rebuild.
4880 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4881 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4882 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4883
e90e9ad9
TT
48842012-12-05 Tom Tromey <tromey@redhat.com>
4885
4886 PR gdb/14917:
4887 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4888
02d403bf 48892012-11-28 Markus Metzger <markus.t.metzger@intel.com>
945bf713
MM
4890
4891 * configure.ac: Check for linux/perf_event.h.
4892 * config.in: Regenerated.
4893 * configure: Regenerated.
4894
0270a750
PA
48952012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4896
4897 * hostio.c (handle_readlink): Decrease buffer size
4898 parameter passed to readlink by one byte.
4899
8c29b58e
YQ
49002012-11-26 Yao Qi <yao@codesourcery.com>
4901
4902 * configure.ac (build_warnings): Append '-Wempty-body'.
4903 * configure: Regenerated.
4904 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4905 body.
4906
8bdce1ff
PM
49072012-11-15 Pierre Muller <muller@sourceware.org>
4908
4909 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4910 * config.in: Regenerate.
4911 * configure: Regenerate.
4912 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4913 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4914 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4915 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4916 header.
4917 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4918 instead of <sys/wait.h> header.
4919 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4920
02d403bf 49212012-11-13 Markus Metzger <markus.t.metzger@intel.com>
3ba6ad0f
MM
4922
4923 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4924 (various make rules): Remove -DGDBSERVER
4925
fbd5db48
YQ
49262012-11-09 Yao Qi <yao@codesourcery.com>
4927
4928 * spu-low.c (current_ptid): Move it to ..
4929 * gdbthread.h: ... here. New.
4930 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4931 * server.c (myresume, process_serial_event): Likewise.
4932 * thread-db.c (thread_db_find_new_threads): Likewise.
4933 * tracepoint.c (run_inferior_command): Likewise.
4934
b3dc46ff
AB
49352012-10-01 Andrew Burgess <aburgess@broadcom.com>
4936
4937 * server.c (handle_search_memory_1): Include access length in
4938 warning message.
4939
07c04788
HPN
49402012-09-05 Michael Brandt <michael.brandt@axis.com>
4941
4942 * linux-crisv32-low.c: Fix compile errors.
4943
918d227b
YQ
49442012-09-04 Yao Qi <yao@codesourcery.com>
4945
4946 * tracepoint.c (cmd_qtsv): Adjust debug message.
4947 Don't check CUR_TPOINT.
4948
18c1b81a
YQ
49492012-08-28 Yao Qi <yao@codesourcery.com>
4950
4951 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4952 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4953 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4954 Remove declarations of xmalloc, xreallloc, xstrdup and
4955 freeargv.
4956 * Makefile.in (libiberty_h): New.
4957 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4958 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4959
dc82f37b
YQ
49602012-08-23 Yao Qi <yao@codesourcery.com>
4961
4962 * server.h: Remove declaration of 'xsnprintf'.
4963
406b1477
KS
49642012-08-22 Keith Seitz <keiths@redhat.com>
4965
4966 * server.h: Include build-gnulib-gbserver/config.h.
4967 * gdbreplay.c: Likewise.
4968
e6712ff1
DE
49692012-08-08 Doug Evans <dje@google.com>
4970
4971 * Makefile.in (SFILES): Add gdb_vecs.c.
4972 (OBS): Add gdb_vecs.o.
4973 (gdb_vecs_h, host_defs_h): New variables.
4974 (thread-db.o): Add $(gdb_vecs_h) dependency.
4975 (gdb_vecs.o): New rule.
4976 * thread-db.c: #include "gdb_vecs.h".
4977 (thread_db_load_search): Use a vector to iterate over path elements.
4978 Handle text appearing after "$pdir".
4979
4980 * configure.ac: Add check for strstr.
4981 * config.in: Regenerate.
4982 * configure: Regenerate.
4983
7c3270ae
UW
49842012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4985
4986 * hostio.c (handle_pread): If pread fails, fall back to attempting
4987 lseek/read.
4988 (handle_pwrite): Likewise for pwrite.
4989
b62e2b27
UW
49902012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4991
4992 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4993 between unsupported TYPE and unimplementable ADDR/LEN combination.
4994 (arm_insert_point): Act on new return value.
4995
78a99e91
PA
49962012-07-31 Pedro Alves <palves@redhat.com>
4997
4998 * server.c (process_point_options): Only skip tokens if we find
4999 one that is unrecognized. Don't treat 'X' specially while
5000 skipping unrecognized tokens.
5001
fcf303ab
UW
50022012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
5003
5004 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
5005 to 4-byte-align HW breakpoint addresses for Thumb.
5006
7255706c
YQ
50072012-07-27 Yao Qi <yao@codesourcery.com>
5008
5009 PR remote/14161.
5010
5011 * server.h: Declare gdb_agent_about_to_close.
5012 * target.c (kill_inferior): Include "agent.h".
5013 New. Send command 'kill'.
5014 * target.h (kill_inferior): Removed macro.
5015 * tracepoint.c (gdb_agent_about_to_close): New.
5016 (gdb_agent_helper_thread): Handle command 'close'.
5017 Wait endlessly until the inferior stops.
5018 Install gdb_agent_remove_socket to atexit hook.
5019 (agent_socket_name): New static variable.
5020 (gdb_agent_socket_init): Replace local variable 'name' with
5021 'agent_socket_name'.
5022 (gdb_agent_remove_socket): New.
5023
5a3f286f
YQ
50242012-07-27 Yao Qi <yao@codesourcery.com>
5025
5026 * server.c (process_point_options): Stop at 'X' when parsing.
5027
961bd387
ME
50282012-07-19 Michael Eager <eager@eagercon.com>
5029
a261b8f5 5030 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
961bd387
ME
5031 to hw_execute.
5032 * linux-x86-low.c (x86_insert_point, x86_remove_point):
5033 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
5034 hardware breakpoint.
5035
aa7c7447
JK
50362012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
5037
5038 * gdbserver/linux-low.c (initialize_low): Call
5039 linux_ptrace_init_warnings.
5040
7f216e7c
DE
50412012-07-02 Doug Evans <dje@google.com>
5042
5043 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
5044 pointer to int.
5045
d3ce09f5
SS
50462012-07-02 Stan Shebs <stan@codesourcery.com>
5047
5048 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5049 (ax.o): Add it to build rule.
5050 (ax-ipa.o): Ditto.
5051 (OBS): Add format.o.
5052 (IPA_OBS): Add format.o.
5053 * server.c (handle_query): Claim support for breakpoint commands.
5054 (process_point_options): Add command case.
5055 (process_serial_event): Leave running if there are printfs in
5056 effect.
5057 * mem-break.h (any_persistent_commands): Declare.
5058 (add_breakpoint_commands): Declare.
5059 (gdb_no_commands_at_breakpoint): Declare.
5060 (run_breakpoint_commands): Declare.
5061 * mem-break.c (struct point_command_list): New struct.
5062 (struct breakpoint): New field command_list.
5063 (any_persistent_commands): New function.
5064 (add_commands_to_breakpoint): New function.
5065 (add_breakpoint_commands): New function.
5066 (gdb_no_commands_at_breakpoint): New function.
5067 (run_breakpoint_commands): New function.
5068 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5069 locally.
5070 * ax.c: Include format.h.
5071 (ax_printf): New function.
5072 (gdb_eval_agent_expr): Add printf opcode.
5073
2f8f6aed
YQ
50742012-06-13 Yao Qi <yao@codesourcery.com>
5075
5076 * server.c (start_inferior): Remove duplicated writes to fields
5077 'last_resume_kind' and 'last_status' of 'current_inferior'.
5078
0c9070b3
YQ
50792012-06-12 Yao Qi <yao@codesourcery.com>
5080 Pedro Alves <palves@redhat.com>
5081
5082 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5083 comment.
5084 * server.c (handle_v_cont): Extend comment.
5085
c52daf70
YQ
50862012-06-11 Yao Qi <yao@codesourcery.com>
5087
5088 * linux-low.c (linux_attach): Add 'static'.
5089
d38bbb0a
YQ
50902012-06-06 Yao Qi <yao@codesourcery.com>
5091
5092 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5093
89dc0afd
JK
50942012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5095
5096 Fix gcc -flto compilation warning.
5097 * server.c (main): Make variable multi_mode and attach volatile.
5098
75f62ce7
TJB
50992012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5100
5101 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5102 if the platform doesn't know about it.
5103
65f479b6
PA
51042012-05-30 Jeff Kenton <jkenton@tilera.com>
5105
5106 * Makefile.in (SFILES): Add linux-tile-low.c.
5107 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5108 * configure.srv: Handle tilegx-*-linux*.
5109 * linux-tile-low.c: New file.
5110
0c5bf5a9
JK
51112012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5112
5113 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5114
a493e3e2
PA
51152012-05-24 Pedro Alves <palves@redhat.com>
5116
5117 PR gdb/7205
5118
43aaf8b6 5119 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
a493e3e2 5120
2ea28649
PA
51212012-05-24 Pedro Alves <palves@redhat.com>
5122
5123 PR gdb/7205
5124
5125 Replace target_signal with gdb_signal throughout.
5126
8d409d16
MR
51272012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5128
5129 * linux-low.c (linux_store_registers): Avoid the copying sequence
5130 when no data has been retrieved by ptrace.
5131
23512c01
MGD
51322012-05-22 Will Deacon <will.deacon@arm.com>
5133
5134 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5135 Include asm/ptrace.h.
5136 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5137 already defined.
5138
4934b29e
MR
51392012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5140
5141 * linux-low.c (linux_store_registers): Don't re-retrieve data
5142 with ptrace that has already been obtained from /proc. Always
5143 copy any data retrieved with ptrace to the buffer supplied.
5144
bde24c0a
PA
51452012-05-11 Yao Qi <yao@codesourcery.com>
5146 Pedro Alves <palves@redhat.com>
5147
5148 * linux-low.c (enum stopping_threads_kind): New.
5149 (stopping_threads): Change type to `enum stopping_threads_kind'.
5150 (handle_extended_wait): If stopping and suspending threads, leave
5151 the new_lwp suspended too.
5152 (linux_wait_for_event): Adjust.
5153 (stop_all_lwps): Set `stopping_threads' to
5154 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5155 whether we're suspending threads or just stopping them. Assert no
5156 recursion happens.
5157
623b6bdf
YQ
51582012-04-29 Yao Qi <yao@codesourcery.com>
5159
5160 * server.h: Move some code to ...
5161 * gdbthread.h: ... here. New.
5162 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5163 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5164 (nto-low.o, win32-low.o): Likewise.
5165 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5166 * regcache.c, remote-utils.c, server.c: Likewise.
5167 * target.c, tracepoint.c, win32-low.c: Likewise.
5168
f15f9948
TJB
51692012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5170
5171 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5172 (PTRACE_ARG4_TYPE): Likewise.
5173 (PTRACE_XFER_TYPE): Likewise.
5174 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5175 ptrace to PTRACE_ARG3_TYPE.
5176 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5177 (PTRACE_ARG4_TYPE): Likewise.
5178 (PTRACE_XFER_TYPE): Likewise.
5179 (linux_detach_one_lwp): Cast fourth argument of
5180 ptrace to long then PTRACE_ARG4_TYPE.
5181 (regsets_fetch_inferior_registers): Cast third argument of
5182 ptrace to long then PTRACE_ARG3_TYPE.
5183 (regsets_store_inferior_registers): Likewise.
5184
38ea300a
PA
51852012-04-20 Pedro Alves <palves@redhat.com>
5186
5187 * configure: Regenerate.
5188
c971b7fa
PA
51892012-04-19 Pedro Alves <palves@redhat.com>
5190
43aaf8b6 5191 * Makefile.in (GNULIB_BUILDDIR): New.
c971b7fa 5192 (LIBGNU, INCGNU, GNULIB_H): Adjust.
43aaf8b6
PA
5193 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5194 (all, install-only, uninstall, clean-info, all-lib, clean): No
5195 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5196 (maintainer-clean realclean distclean): Use subdir_do.
5197 (subdir_do): New.
5198 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
c971b7fa 5199 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
43aaf8b6
PA
5200 * acinclude.m4: Include acx_configure_dir.m4.
5201 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5202 calls. Call AC_PROG_RANLIB. Configure gnulib using
5203 ACX_CONFIGURE_DIR.
5204 (GNULIB): New.
5205 (GNULIB_STDINT_H): Adjust.
5206 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5207 * gdbreplay.c: Include build-gnulib/config.h.
5208 * server.h: Likewise.
5209 * aclocal.m4: Regenerate.
5210 * config.in: Regenerate.
5211 * configure: Regenerate.
c971b7fa 5212
809277f8
PA
52132012-04-19 Pedro Alves <palves@redhat.com>
5214
5215 * Makefile.in (LIBGNU, INCGNU): Adjust.
5216 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5217 (all, install-only, uninstall, clean-info, all-lib, clean)
5218 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5219 * configure.ac: Adjust AC_OUTPUT output.
5220 * aclocal.m4: Regenerate.
5221 * configure: Regenerate.
5222
fd9bb8b8
PA
52232012-04-19 Pedro Alves <palves@redhat.com>
5224
5225 * Makefile.in (generated_files): New.
5226 (server_h): Remove the explicit dependency on config.h, and depend
5227 on $generated_files.
5228
1c298c66
PA
52292012-04-19 Pedro Alves <palves@redhat.com>
5230
5231 * Makefile.in (INCGNU): Add -Ignulib.
5232
57c4b50b
PA
52332012-04-19 Pedro Alves <palves@redhat.com>
5234
5235 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5236 (INCGNU): ... this, and spell out -I here.
5237 (GNULIB_LIB): Rename to ...
5238 (LIBGNU): ... this.
5239 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5240
1030e047
PA
52412012-04-19 Pedro Alves <palves@redhat.com>
5242
5243 * config.in: Regenerate.
5244
447d4319
PA
52452012-04-19 Pedro Alves <palves@redhat.com>
5246
5247 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5248 * server.h (memmem): Remove declaration.
5249 * config.in: Regenerate.
5250 * configure: Regenerate.
5251
aad9eab9
YQ
52522012-04-19 Yao Qi <yao@codesourcery.com>
5253
5254 * Makefile.in (SFILES): Add common/vec.c.
5255 (OBS): Add vec.o.
5256 (vec.o): New rule.
5257
3e10640f
YQ
52582012-04-19 Yao Qi <yao@codesourcery.com>
5259
5260 * remote-utils.c (prepare_resume_reply): Replace with macro
5261 target_core_of_thread.
5262 * server.c (handle_qxfer_threads_proper): Likewise.
5263 * target.h (traget_core_of_thread): New macro.
5264
71622373
PA
52652012-04-18 Pedro Alves <palves@redhat.com>
5266
5267 * aclocal.m4: Regenerate.
5268 * configure: Regenerate.
5269
80d26939
YQ
52702012-04-16 Yao Qi <yao@codesourcery.com>
5271
5272 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5273 duplicated on address.
5274
42476b70
YQ
52752012-04-16 Yao Qi <yao@codesourcery.com>
5276
5277 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5278 (struct tracepoint_action_ops) <send>: New field.
5279 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5280 (agent_expr_send, x_tracepoint_action_send): New.
5281 (l_tracepoint_action_send): New.
5282 (cmd_qtdp): Download and install tracepoint
5283 according to `use_agent'.
5284 (run_inferior_command): Add one more parameter `len'.
5285 Update callers.
5286 (tracepoint_send_agent): New.
5287 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5288
7bc83639
YQ
52892012-04-16 Yao Qi <yao@codesourcery.com>
5290
5291 * tracepoint.c (download_tracepoints): Moved to ...
5292 (cmd_qtstart): ... here.
5293
5f18041e
YQ
52942012-04-14 Yao Qi <yao@codesourcery.com>
5295
5296 * tracepoint.c: Include inttypes.h.
5297 (struct collect_memory_action): Use sized types.
5298 (struct tracepoint): Likewise.
5299 (cmd_qtdp, stop_tracing): Update print specifiers.
5300 (cmd_qtp, response_tracepoint): Likewise.
5301 (collect_data_at_tracepoint): Likewise.
5302 (collect_data_at_step): Likewise.
5303
55a8c076
YQ
53042012-04-14 Yao Qi <yao@codesourcery.com>
5305
5306 Import gnulib module inttypes.
5307 * aclocal.m4, config.in, configure: Regenerated.
5308
dc750257
YQ
53092012-04-14 Yao Qi <yao@codesourcery.com>
5310
5311 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5312 Makefile and config.status at last.
5313
0ab5faf9
YQ
53142012-04-13 Yao Qi <yao@codesourcery.com>
5315
5316 * tracepoint.c: Include stdint.h unconditionally.
5317
18f5fd81
TJB
53182012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5319
5320 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5321 on BFD_HAVE_SYS_PROCFS_TYPE.
5322 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5323 * configure: Regenerate.
5324 * config.in: Likewise.
5325
4d47af5c
L
53262012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5327
5328 * Makefile.in (clean): Also remove x32.c x32-linux.c
5329 x32-avx.c x32-avx-linux.c.
5330 (x32.o): New target.
5331 (x32.c): Likewise.
5332 (x32-linux.o): Likewise.
5333 (x32-linux.c): Likewise.
5334 (x32-avx.o): Likewise.
5335 (x32-avx.c): Likewise.
5336 (x32-avx-linux.o): Likewise.
5337 (x32-avx-linux.c): Likewise.
5338
5339 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5340 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5341 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5342 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5343 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5344 i386/x32-avx-linux.xml.
5345
5346 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5347 (init_registers_x32_avx_linux): Likwise.
5348 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5349 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5350
ecedbe58
PA
53512012-04-13 Pedro Alves <palves@redhat.com>
5352
5353 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5354 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5355 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5356 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5357 the sub-make.
5358
c92b5177
L
53592012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5360
5361 * linux-x86-low.c (compat_x32_clock_t): New.
5362 (compat_x32_siginfo_t): Likewise.
5363 (compat_x32_siginfo_from_siginfo): Likewise.
5364 (siginfo_from_compat_x32_siginfo): Likewise.
5365 (linux_is_elf64): Likewise.
5366 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5367 and siginfo_from_compat_x32_siginfo for x32.
5368 (x86_arch_setup): Set linux_is_elf64.
5369
214d508e
L
53702012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5371
5372 PR gdb/13969
5373 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5374 e_machine field.
5375 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5376 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5377 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5378 compatible with process.
5379
c9a1864a
YQ
53802012-04-12 Yao Qi <yao@codesourcery.com>
5381
5382 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5383 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5384 (install-only, install-info, clean): Handle sub dir gnulib.
5385 (all-lib, am--refresh): New targets.
5386 (memmem.o): Remove target.
5387 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5388 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5389 (AC_REPLACE_FUNCS): Remove memmem.
5390 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5391 (AC_OUTPUT): Generate Makefile in gnulib/.
5392 * aclocal.m4, config.in, configure: Regenerated.
5393
367ba2c2
MR
53942012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5395
5396 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5397
9d236627
PA
53982012-04-05 Pedro Alves <palves@redhat.com>
5399
5400 -Werror=strict-aliasing
5401
5402 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5403 pointer.
5404
111217b3
PA
54052012-04-04 Pedro Alves <palves@redhat.com>
5406
5407 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5408 (sparc_store_gregset_from_stack, sparc_store_gregset)
5409 (sparc_breakpoint_at): Fix formatting.
5410
8365dcf5
TJB
54112012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5412
5413 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5414 are available.
5415 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5416 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5417 * config.in: Regenerate.
5418 * configure: Likewise.
5419
689cc2ae
PA
54202012-03-29 Pedro Alves <palves@redhat.com>
5421
5422 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5423 Correct ptrace arguments.
5424
c14dfd32
PA
54252012-03-28 Pedro Alves <palves@redhat.com>
5426
5427 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5428 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5429 (IA64_FR1_REGNUM): New defines.
5430 (ia64_fetch_register): New.
5431 (the_low_target): Install it.
5432 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5433 field.
5434 * linux-low.c (linux_fetch_registers): Try the
5435 the_low_target.fetch_register hook first.
5436
5437 * linux-arm-low.c (the_low_target): Adjust.
5438 * linux-bfin-low.c (the_low_target): Adjust.
5439 * linux-cris-low.c (the_low_target): Adjust.
5440 * linux-crisv32-low.c (the_low_target): Adjust.
5441 * linux-m32r-low.c (the_low_target): Adjust.
5442 * linux-m68k-low.c (the_low_target): Adjust.
5443 * linux-mips-low.c (the_low_target): Adjust.
5444 * linux-ppc-low.c (the_low_target): Adjust.
5445 * linux-s390-low.c (the_low_target): Adjust.
5446 * linux-sh-low.c (the_low_target): Adjust.
5447 * linux-sparc-low.c (the_low_target): Adjust.
5448 * linux-tic6x-low.c (the_low_target): Adjust.
5449 * linux-x86-low.c (the_low_target): Adjust.
5450 * linux-xtensa-low.c (the_low_target): Adjust.
5451
63c88e13
PA
54522012-03-26 Pedro Alves <palves@redhat.com>
5453
5454 * server.c (handle_qxfer_libraries): Don't bail early if
5455 the_target->qxfer_libraries_svr4 is not NULL.
5456
fb723180
PA
54572012-03-26 Pedro Alves <palves@redhat.com>
5458
5459 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5460
0afae3cf
PA
54612012-03-23 Pedro Alves <palves@redhat.com>
5462
5463 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5464 "library-list-svr4" element's start tag when the the DSO list is
5465 empty.
5466
485f1ee4
PA
54672012-03-23 Pedro Alves <palves@redhat.com>
5468
5469 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5470 a variable whose type size is the same as the inferior's pointer
5471 size.
5472
a5362b9a
TS
54732012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5474
5475 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5476 struct siginfo.
5477 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5478 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5479 * linux-low.h: Include <signal.h>.
5480 (struct siginfo): Remove forward declaration.
5481 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5482 struct siginfo.
5483
d226c142
MF
54842012-03-21 Mike Frysinger <vapier@gentoo.org>
5485
5486 * .gitignore: Ignore more files.
5487
122f36ef
PA
54882012-03-19 Pedro Alves <palves@redhat.com>
5489 Jan Kratochvil <jan.kratochvil@redhat.com>
5490
5491 * server.c (cont_thread, general_thread): Add describing comments.
5492 (start_inferior): Clear `cont_thread'.
5493 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5494 of a process.
5495
fc3e5175
YQ
54962012-03-15 Yao Qi <yao@codesourcery.com>
5497
5498 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5499 handling to ...
5500 (cmd_qtdp): ... here.
5501
8d0d92cd
YQ
55022012-03-15 Yao Qi <yao@codesourcery.com>
5503
5504 * tracepoint.c (struct tracepoint_action_ops): New.
5505 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5506 (m_tracepoint_action_download): New.
5507 (r_tracepoint_action_download): New.
5508 (x_tracepoint_action_download): New.
5509 (l_tracepoint_action_download): New.
5510 (add_tracepoint_action): Install `action->ops' according type.
5511 (download_tracepoint_1): Move code `download' function pointer
5512 of various tracepoint_action_ops.
5513
87b0bb13
JK
55142012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5515
5516 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5517 linux_ptrace_attach_warnings.
5518
5f572dec
JK
55192012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5520
5521 * Makefile.in (linux-ptrace.o): New.
5522 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5523 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5524 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5525 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5526 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5527 of these targets.
5528 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5529
f4647387
YQ
55302012-03-08 Yao Qi <yao@codesourcery.com>
5531 Pedro Alves <palves@redhat.com>
5532
5533 Fix PR server/13392.
5534 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5535 offset of JMP insn.
5536 * tracepoint.c (remove_tracepoint): New.
5537 (cmd_qtdp): Call remove_tracepoint when failed to install.
5538
9b224c5e
PA
55392012-03-07 Pedro Alves <palves@redhat.com>
5540
5541 * linux-low.c (get_detach_signal): New.
5542 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5543 Pass on pending signals to PTRACE_DETACH. Check the result of the
5544 ptrace call.
5545 * server.c (program_signals, program_signals_p): New.
5546 (handle_general_set): Handle QProgramSignals.
5547 * server.h (program_signals, program_signals_p): Declare.
5548
e237a7e2
JK
55492012-03-05 Pedro Alves <palves@redhat.com>
5550 Jan Kratochvil <jan.kratochvil@redhat.com>
5551
5552 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5553 New comment why.
5554
5808517f
YQ
55552012-03-03 Yao Qi <yao@codesourcery.com>
5556
5557 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5558 agent_look_up_symbols.
5559
58b4daa5
YQ
55602012-03-03 Yao Qi <yao@codesourcery.com>
5561
5562 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5563 (linux-x86-low.o): Likewise.
5564 * server.h: Remove in_process_agent_loaded.
5565 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5566 common/agent.c.
5567 Update callers.
5568
8ffcbaaf
YQ
55692012-03-03 Yao Qi <yao@codesourcery.com>
5570
5571 * tracepoint.c (gdb_agent_capability): New global.
5572 (in_process_agent_loaded_ust): Renamed to
5573 `in_process_agent_supports_ust'.
5574 Update callers.
5575 (in_process_agent_supports_ust): Call agent_capability_check.
5576 (clear_installed_tracepoints): Assert that agent supports
5577 agent.
5578
d1feda86
YQ
55792012-03-03 Yao Qi <yao@codesourcery.com>
5580
5581 * linux-low.c (linux_supports_agent): New.
5582 (linux_target_ops): Initialize field `supports_agent' with
5583 linux_supports_agent.
5584 * target.h (struct target_ops) <supports_agent>: New.
5585 (target_supports_agent): New macro.
5586 * server.c (handle_general_set): Handle packet 'QAgent'.
5587 (handle_query): Send `QAgent+'.
5588 * Makefile.in (server.o): Depends on agent.h.
5589
2fa291ac
YQ
55902012-03-03 Yao Qi <yao@codesourcery.com>
5591
5592 * Makefile.in (OBS): Add agent.o.
5593 Add new rule for agent.o.
5594 Track dependence of tracepoint.c on agent.h.
5595 * tracepoint.c (run_inferior_command_1):
5596 (run_inferior_command): Call agent_run_command.
5597 (gdb_ust_connect_sync_socket): Deleted. Move it to
5598 common/agent.c.
5599 (resume_thread, stop_thread): Likewise.
5600 (gdb_ust_socket_init): Renamed to ...
5601 (gdb_agent_socket_init): ... New.
5602 (gdb_ust_thread): Renamed to ...
5603 (gdb_agent_helper_thread): ... New.
5604 (gdb_ust_init): Move some code to ...
5605 (gdb_agent_init): ... here. New.
5606 [HAVE_UST]: Call gdb_ust_init.
5607 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5608 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5609 * config.in, configure: Regenerated.
5610
05044653
PA
56112012-03-02 Pedro Alves <palves@redhat.com>
5612
5613 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5614 * linux-low.c (struct simple_pid_list): New.
5615 (stopped_pids): New a struct simple_pid_list pointer.
5616 (add_to_pid_list, pull_pid_from_list): New.
5617 (handle_extended_wait): Don't assume the first signal new children
5618 report is SIGSTOP. Adjust call to pull_pid_from_list.
5619 (linux_wait_for_lwp): Adjust.
5620
8d00225b
YQ
56212012-03-02 Yao Qi <yao@codesourcery.com>
5622
5623 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5624 debug log.
5625
19560ba5
YQ
56262012-03-02 Yao Qi <yao@codesourcery.com>
5627
5628 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5629 `stop_pc' and `tpoint'. Update caller.
5630
1faeff08
MR
56312012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5632
5633 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5634 * linux-low.c (use_linux_regsets): New macro.
5635 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5636 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5637 (linux_register_in_regsets): New function.
5638 (usr_fetch_inferior_registers): Skip registers covered by
5639 regsets.
5640 (usr_store_inferior_registers): Likewise.
5641 (usr_fetch_inferior_registers): New macro.
5642 (usr_store_inferior_registers): Likewise.
5643 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5644 (linux_store_registers): Likewise.
5645 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5646 prototype.
5647 (init_registers_mips64_dsp_linux): Likewise.
5648 (init_registers_mips_linux): New macro.
5649 (init_registers_mips_dsp_linux): Likewise.
5650 (mips_dsp_num_regs): Likewise.
5651 (DSP_BASE, DSP_CONTROL): New fallback macros.
5652 (mips_base_regs): New macro.
5653 (mips_regmap): Use it. Fix the size.
5654 (mips_dsp_regmap): New variable.
5655 (mips_dsp_regset_bitmap): Likewise.
5656 (mips_arch_setup): New function.
5657 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5658 than mips_regmap.
5659 (mips_cannot_store_register): Likewise.
5660 (the_low_target): Update .arch_setup, .num_regs and .regmap
5661 initializers. Add .regset_bitmap initializer.
5662 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5663 initializer.
5664 * linux-bfin-low.c (the_low_target): Likewise.
5665 * linux-cris-low.c (the_low_target): Likewise.
5666 * linux-crisv32-low.c (the_low_target): Likewise.
5667 * linux-ia64-low.c (the_low_target): Likewise.
5668 * linux-m32r-low.c (the_low_target): Likewise.
5669 * linux-m68k-low.c (the_low_target): Likewise.
5670 * linux-ppc-low.c (the_low_target): Likewise.
5671 * linux-s390-low.c (the_low_target): Likewise.
5672 * linux-sh-low.c (the_low_target): Likewise.
5673 * linux-sparc-low.c (the_low_target): Likewise.
5674 * linux-tic6x-low.c (the_low_target): Likewise.
5675 * linux-x86-low.c (the_low_target): Likewise.
5676 * linux-xtensa-low.c (the_low_target): Likewise.
5677 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5678 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5679 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5680 srv_xmlfiles.
5681 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5682 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5683
c03e6ccc
YQ
56842012-02-29 Yao Qi <yao@codesourcery.com>
5685 Pedro Alves <palves@redhat.com>
5686
5687 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5688 `step_over_finished' is true.
5689
644cebc9
PA
56902012-02-27 Pedro Alves <palves@redhat.com>
5691
5692 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5693 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5694
c14d7ab2
PA
56952012-02-27 Pedro Alves <palves@redhat.com>
5696
5697 PR server/9684
5698 * linux-low.c (pid_is_stopped): New.
5699 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5700
412c89dd
LM
57012012-02-25 Luis Machado <lgustavo@codesourcery.com>
5702
5703 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5704 of conditions.
5705
b745defe
MR
57062012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5707
5708 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5709
9f3a5c85
LM
57102012-02-24 Luis Machado <lgustavo@codesourcery>
5711
5712 * server.c (handle_query): Advertise support for target-side
5713 breakpoint condition evaluation.
5714 (process_point_options): New function.
5715 (process_serial_event): When inserting a breakpoint, check for
5716 a target-side condition that should be evaluated.
5717
5718 * mem-break.c: Include regcache.h and ax.h.
5719 (point_cond_list_t): New data structure.
5720 (breakpoint) <cond_list>: New field.
5721 (find_gdb_breakpoint_at): Make non-static.
5722 (delete_gdb_breakpoint_at): Clear any target-side
5723 conditions.
5724 (clear_gdb_breakpoint_conditions): New function.
5725 (add_condition_to_breakpoint): Likewise.
5726 (add_breakpoint_condition): Likewise.
5727 (gdb_condition_true_at_breakpoint): Likewise.
5728 (gdb_breakpoint_here): Return result directly instead
5729 of going through a local variable.
5730
5731 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5732 (clear_gdb_breakpoint_conditions): Likewise.
5733 (add_breakpoint_condition): Likewise.
5734 (gdb_condition_true_at_breakpoint): Likewise.
5735
5736 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5737 (need_step_over_p): Take target-side breakpoint condition into
5738 consideration.
5739
5e1dc496
LM
57402012-02-24 Luis Machado <lgustavo@codesourcery>
5741
5742 * server.h: Include tracepoint.h.
5743 (agent_mem_read, agent_get_trace_state_variable_value,
5744 agent_set_trace_state_variable_value,
5745 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5746 get_set_tsv_func_addr): New prototypes.
5747
5748 * ax.h: New include file.
5749 * ax.c: New source file.
5750
5751 * tracepoint.c: Include ax.h.
5752 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5753 agent_expr, eval_result_type): Move to ax.h.
5754 (parse_agent_expr): Rename to ...
5755 (gdb_parse_agent_expr): ... this, make it non-static and move
5756 to ax.h.
5757 (unparse_agent_expr) Rename to ...
5758 (gdb_unparse_agent_expr): ... this, make it non-static and move
5759 to ax.h.
5760 (eval_agent_expr): Rename to ...
5761 (eval_tracepoint_agent_expr): ... this.
5762 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5763 forward declarations.
5764 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5765 (agent_get_trace_state_variable_value): New function.
5766 (agent_set_trace_state_variable_value): New function.
5767 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5768 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5769 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5770 (condition_true_at_tracepoint): Likewise.
5771 (parse_agent_expr): Rename to ...
5772 (gdb_parse_agent_expr): ... this and move to ax.c.
5773 (unparse_agent_expr): Rename to ...
5774 (gdb_unparse_agent_expr): ... this and move to ax.c.
5775 (gdb_agent_op_name): Move to ax.c.
5776 (eval_agent_expr): Rename to ...
5777 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5778 and move to ax.c.
5779 (eval_tracepoint_agent_expr): New function.
5780 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
43aaf8b6 5781 non-static.
5e1dc496
LM
5782 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5783 ax.c.
5784 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5785 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5786 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5787 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5788 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5789 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5790 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5791 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5792 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5793 (compile_bytecodes): Remove forward declaration.
5794 (is_goto_target): Move to ax.c.
5795 (compile_bytecodes): Move to ax.c and call
5796 agent_get_trace_state_variable_value (...) and
5797 agent_set_trace_state_variable_value (...).
5798
5799 * Makefile.in: Update ax.c and IPA dependencies.
5800
277e4e52
PA
58012012-02-24 Pedro Alves <palves@redhat.com>
5802
5803 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5804 (cmd_bigqtbuffer_circular): ... this. Only handle
5805 'QTBuffer:circular:'.
5806 (handle_tracepoint_general_set): Adjust.
5807
bf4c19f7
YQ
58082012-02-16 Yao Qi <yao@codesourcery.com>
5809
5810 * inferiors.c: Move code to ...
5811 * dll.c: .... here. New.
5812 * server.h: Declare clear_dlls.
5813 * Makefile.in (SFILES): Add dll.c.
5814 (OBS): Add dll.o
5815 (dll.o): New rule.
5816
d73f2619
YQ
58172012-02-11 Yao Qi <yao@codesourcery.com>
5818
5819 * server.c: (handle_monitor_command): Add a new parameter
5820 `own_buf'.
5821 (handle_query): Update caller.
5822
f8255c2a
JB
58232012-02-09 Joel Brobecker <brobecker@adacore.com>
5824
5825 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5826 * configure, config.in: Regenerate.
5827 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5828 is not defined.
5829
da84f473
PA
58302012-02-02 Pedro Alves <palves@redhat.com>
5831
5832 Try SIGKILL first, then PTRACE_KILL.
5833 * linux-low.c (linux_kill_one_lwp): New.
5834 (linux_kill_one_lwp): Rename to ...
5835 (kill_one_lwp_callback): ... this. Use the new
5836 linux_kill_one_lwp.
5837
e886a173
PA
58382012-02-02 Pedro Alves <palves@redhat.com>
5839
5840 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5841 inferior.
5842
be07f1a2
PA
58432012-01-27 Pedro Alves <palves@redhat.com>
5844
5845 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5846 (elf_64_file_p): Make static.
5847 (linux_pid_exe_is_elf_64_file): New.
5848 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5849 Delete declarations.
5850 (linux_pid_exe_is_elf_64_file): Declare.
5851 * linux-x86-low.c (x86_arch_setup): Use
5852 linux_pid_exe_is_elf_64_file.
5853
d8301ad1
JK
58542012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5855
5856 * linux-low.c (linux_wait_for_event_1): Rename to ...
5857 (linux_wait_for_event): ... here and merge it with former
5858 linux_wait_for_event - new variable wait_ptid, use it.
5859 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5860
01b17894
PA
58612012-01-23 Pedro Alves <palves@redhat.com>
5862
5863 * server.c (main): Avoid yet another case of infinite loop while
5864 detaching/killing after a longjmp.
5865
e825046f
JK
58662012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5867
5868 Code cleanup.
5869 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5870
b9e7b9c3
UW
58712012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5872
5873 * hostio.c (handle_readlink): New function.
5874 (handle_vFile): Call it to handle "vFile:readlink" packets.
5875
901f9912
UW
58762012-01-20 Pedro Alves <palves@redhat.com>
5877 Ulrich Weigand <ulrich.weigand@linaro.org>
5878
5879 * server.c (handle_v_requests): Only support vAttach and vRun to
5880 start multiple processes when in extended protocol mode.
5881
fc1ab1a0
PA
58822012-01-17 Pedro Alves <palves@redhat.com>
5883
5884 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5885 memalign plus mprotect to allocate the scratch buffer.
5886
7d5d4e98
PA
58872012-01-13 Pedro Alves <palves@redhat.com>
5888
5889 * server.c (attach_inferior): Clear `cont_thread'.
5890
f128d5e9
PA
58912012-01-13 Pedro Alves <palves@redhat.com>
5892
5893 * server.c (main): Avoid infinite loop while detaching/killing
5894 after a longjmp.
5895
06db92f0
DE
58962012-01-09 Doug Evans <dje@google.com>
5897
5898 * server.c (start_inferior): Set last_ptid in --wrapper case.
5899
32d92999
YQ
59002012-01-06 Yao Qi <yao@codesourcery.com>
5901
5902 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5903 defined.
5904 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5905
5e0a92a9
YQ
59062012-01-04 Yao Qi <yao@codesourcery.com>
5907
5908 * tracepoint.c (cmd_qtdp): Print debug message
5909 for static tracepoint.
5910
ae639e8c
YQ
59112012-01-04 Yao Qi <yao@codesourcery.com>
5912
5913 * tracepoint.c (trace_vdebug): Differentiate debug message
5914 between gdbserver and IPA.
5915
f72429c5
YQ
59162012-01-03 Yao Qi <yao@codesourcery.com>
5917
5918 * tracepoint.c (tracepoint_was_hit): Don't collect for
5919 static tracepoint.
5920
12c3e59c
JB
59212012-01-02 Joel Brobecker <brobecker@adacore.com>
5922
5923 * terminal.h: Reformat copyright header.
5924
67827812
JB
59252012-01-02 Joel Brobecker <brobecker@adacore.com>
5926
5927 * server.c (gdbserver_version): Update copyright year.
5928 * gdbreplay.c (gdbreplay_version): Likewise.
5929
3e52c33d
JK
59302011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5931
5932 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5933
5934 Revert:
5935 2011-12-18 Hui Zhu <teawater@gmail.com>
5936 * linux-low.c (linux_create_inferior): Save return value to ret.
5937
66f1260e
HZ
59382011-12-18 Hui Zhu <teawater@gmail.com>
5939
5940 * linux-low.c (linux_create_inferior): Save return value to ret.
5941
e77616d7
DE
59422011-12-16 Doug Evans <dje@google.com>
5943
e7b06c57
DE
5944 * linux-low.c (linux_create_inferior): If stdio connection,
5945 redirect stdin from /dev/null, stdout to stderr.
5946 * remote-utils.c (remote_is_stdio): New static global.
5947 (remote_connection_is_stdio): New function.
5948 (remote_prepare): Handle stdio connection.
5949 (remote_open): Ditto.
5950 (remote_close): Don't close stdin for stdio connections.
5951 (read_prim,write_prim): New functions. Replace all calls to
5952 read/write to these.
5953 * server.c (main): Watch for "-" argument. Move call to
5954 remote_prepare before start_inferior.
5955 * server.h (STDIO_CONNECTION_NAME): New macro.
5956 (remote_connection_is_stdio): Declare.
5957
e77616d7
DE
5958 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5959 in debugging output.
5960
82067193
YQ
59612011-12-15 Yao Qi <yao@codesourcery.com>
5962
5963 * tracepoint.c: Include sys/syscall.h.
5964 (gdb_ust_thread): Remove preprocessor conditional.
5965
82bfbe7e
PA
59662011-12-14 Pedro Alves <pedro@codesourcery.com>
5967
5968 * linux-low.c (linux_detach_one_lwp): Call
5969 the_low_target.prepare_to_resume before detaching.
5970
712c6575
YQ
59712011-12-14 Yao Qi <yao@codesourcery.com>
5972
5973 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5974 of write.
5975
d54d1edf
YQ
59762011-12-14 Yao Qi <yao@codesourcery.com>
5977
5978 * i386-low.c (i386_low_stopped_data_address): Initialize local
5979 variable `control'.
5980
6210a125
PA
59812011-12-13 Pedro Alves <pedro@codesourcery.com>
5982
5983 PR remote/13492
5984
5985 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5986 DR_CONTROL unless necessary. Extend comments.
5987 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5988 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5989
2ece8244
YQ
59902011-12-13 Yao Qi <yao@codesourcery.com>
5991
5992 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5993 macros.
5994 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5995
784867a5
JK
59962011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5997
5998 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5999 Print new debug message for such case.
6000
6bf36717
JK
60012011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6002
6003 Fix overlapping memcpy.
6004 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
6005 the read_inferior_memory transfer.
6006 (delete_fast_tracepoint_jump): New variable buf. Use it for the
6007 write_inferior_memory transfer.
6008 (set_fast_tracepoint_jump): New variable buf. Use it for the
6009 read_inferior_memory and write_inferior_memory transfers.
6010 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
6011 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
6012 Use it for the write_inferior_memory transfer.
6013 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
6014 buffers.
6015
50275556
MR
60162011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6017
6018 * linux-low.c (fetch_register, store_register): Make code
6019 consistent, fix formatting.
6020
7325beb4
MR
60212011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
6022
6023 * linux-low.c (usr_store_inferior_registers): Factor out code
6024 to handle individual registers into...
6025 (store_register): ... this new function.
6026
c642a434
UW
60272011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
6028
6029 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
6030 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
6031 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
6032 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
6033 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
6034 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
6035 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
6036 (srv_xmlfiles): Add new XML files.
6037
6038 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
6039 and <sys/uio.h>.
6040 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
6041 (init_registers_s390_linux32v1): Add prototype.
6042 (init_registers_s390_linux32v2): Likewise.
6043 (init_registers_s390_linux64v1): Likewise.
6044 (init_registers_s390_linux64v2): Likewise.
6045 (init_registers_s390x_linux64v1): Likewise.
6046 (init_registers_s390x_linux64v2): Likewise.
6047 (s390_num_regs): Increment to 52.
6048 (s390_regmap): Add orig_r2 register.
6049 (s390_num_regs_3264): Increment to 68.
6050 (s390_regmap_3264): Add orig_r2 register.
6051 (s390_collect_ptrace_register): Handle orig_r2 register.
6052 (s390_supply_ptrace_register): Likewise.
6053 (s390_fill_last_break): New function.
6054 (s390_store_last_break): Likewise.
6055 (s390_fill_system_call): New function.
6056 (s390_store_system_call): Likewise.
6057 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6058 register sets.
6059 (s390_check_regset): New function.
6060 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6061 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6062 Update target_regsets for available register sets.
6063
2268b414
JK
60642011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6065 Jan Kratochvil <jan.kratochvil@redhat.com>
6066
6067 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6068 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6069 New.
6070 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6071 * linux-low.h (struct process_info_private): New member r_debug.
6072 * server.c (handle_qxfer_libraries): Call
6073 the_target->qxfer_libraries_svr4.
6074 (handle_qxfer_libraries_svr4): New function.
6075 (qxfer_packets): New entry "libraries-svr4".
6076 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6077 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6078 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6079 PACKET_qXfer_libraries_svr4.
6080
d6db1fab
UW
60812011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6082
6083 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6084 PSW address/mask between 8-byte and 16-byte formats.
6085 (s390_supply_ptrace_register): Likewise.
6086 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6087 basic addressing mode bit.
6088
242f5f1c
SS
60892011-11-24 Stan Shebs <stan@codesourcery.com>
6090
6091 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6092
f196051f
SS
60932011-11-17 Stan Shebs <stan@codesourcery.com>
6094
6095 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6096 (tracing_start_time): New global.
6097 (tracing_stop_time): New global.
6098 (tracing_user_name): New global.
6099 (tracing_notes): New global.
6100 (tracing_stop_note): New global.
6101 (cmd_qtstart): Set traceframe_usage, start_time.
6102 (stop_tracing): Set stop_time.
6103 (cmd_qtstatus): Report additional status.
6104 (cmd_qtp): New function.
6105 (handle_tracepoint_query): Call it.
6106 (cmd_qtnotes): New function.
6107 (handle_tracepoint_general_set): Call it.
6108 (get_timestamp): Rename from tsv_get_timestamp.
6109
405f8e94
SS
61102011-11-14 Stan Shebs <stan@codesourcery.com>
6111 Kwok Cheung Yeung <kcy@codesourcery.com>
6112
6113 * linux-x86-low.c (small_jump_insn): New.
6114 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6115 trampoline and error message, build a trampoline and issue a small
6116 jump instruction to it.
6117 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6118 trampoline and error message.
6119 (x86_get_min_fast_tracepoint_insn_len): New.
6120 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6121 * linux-low.h (struct linux_target_ops): Add arguments to
6122 install_fast_tracepoint_jump_pad operation, add new operation.
6123 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6124 arguments.
6125 (linux_get_min_fast_tracepoint_insn_len): New function.
6126 (linux_target_op): Add new operation.
6127 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6128 (gdb_trampoline_buffer_end): Ditto.
6129 (gdb_trampoline_buffer_error): Ditto.
6130 (struct ipa_sym_addresses): Add fields for new IPA variables.
6131 (symbol_list): Add entries for new IPA variables.
6132 (struct tracepoint): Add fields to hold the address range of the
6133 trampoline used by the tracepoint.
6134 (trampoline_buffer_head): New static variable.
6135 (trampoline_buffer_tail): Ditto.
6136 (claim_trampoline_space): New function.
6137 (have_fast_tracepoint_trampoline_buffer): New function.
6138 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6139 structure.
6140 (install_fast_tracepoint): Ditto, also add error buffer argument.
6141 (cmd_qtminftpilen): New function.
6142 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6143 (fast_tracepoint_from_trampoline_address): New function.
6144 (fast_tracepoint_collecting): Handle trampoline as part of jump
6145 pad space.
6146 (set_trampoline_buffer_space): New function.
6147 (initialize_tracepoint): Initialize new IPA variables.
6148 * target.h (struct target_ops): Add arguments to
6149 install_fast_tracepoint_jump_pad operation, add new
6150 get_min_fast_tracepoint_insn_len operation.
6151 (target_get_min_fast_tracepoint_insn_len): New.
6152 (install_fast_tracepoint_jump_pad): Add arguments.
6153 * server.h (IPA_BUFSIZ): Define.
6154 * linux-i386-ipa.c: Include extra header files.
6155 (initialize_fast_tracepoint_trampoline_buffer): New function.
6156 (initialize_low_tracepoint): Call it.
6157 * server.h (set_trampoline_buffer_space): Declare.
6158 (claim_trampoline_space): Ditto.
6159 (have_fast_tracepoint_trampoline_buffer): Ditto.
6160
1e4d1764
YQ
61612011-11-14 Yao Qi <yao@codesourcery.com>
6162
6163 * server.c (handle_query): Handle InstallInTrace for qSupported.
6164 * tracepoint.c (add_tracepoint): Sort list.
6165 (install_tracepoint, download_tracepoint): New.
6166 (cmd_qtdp): Call them to install and download tracepoints.
6167 (sort_tracepoints): Removed.
6168 (cmd_qtstart): Update.
6169
5c73ff4e
YQ
61702011-11-14 Yao Qi <yao@codesourcery.com>
6171
6172 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6173 * mem-break.h: Declare.
6174 * tracepoint.c (cmd_qtstart): Move some code to ...
6175 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6176 New.
6177 (download_tracepoints): Move some code to ...
6178 (download_tracepoint_1): ... here. New.
6179
86a30030
YQ
61802011-11-08 Yao Qi <yao@codesourcery.com>
6181
6182 * remote-utils.c (relocate_instruction): A comment fix.
6183
8d26e50c
JB
61842011-11-07 Joel Brobecker <brobecker@adacore.com>
6185
6186 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6187 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6188 dr_status_mirror and dr_control_mirror from debug_reg_state.
6189 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6190 (i386_initial_stuff): Remove use of deleted globals.
6191 (i386_get_thread_context, i386_set_thread_context,
6192 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6193 from debug_reg_state.
6194
a59306a3
YQ
61952011-11-05 Yao Qi <yao@codesourcery.com>
6196
6197 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6198 address as TPOINT's.
6199
3065dfb6
SS
62002011-11-02 Stan Shebs <stan@codesourcery.com>
6201
6202 * tracepoint.c (agent_mem_read_string): New function.
6203 (eval_agent_expr): Call it for tracenz.
6204 * server.c (handle_query): Report support for tracenz.
6205
fd0d8c7c
YQ
62062011-11-02 Yao Qi <yao@codesourcery.com>
6207
6208 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6209
609086b1
YQ
62102011-11-02 Yao Qi <yao@codesourcery.com>
6211
6212 * target.h: Fix a typo in comment.
6213
b9fd1791
PA
62142011-10-31 Pedro Alves <pedro@codesourcery.com>
6215
6216 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6217 clobber the breakpoints' shadows with fast tracepoint jumps.
6218 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6219 * target.c (write_inferior_memory): Also pass MYADDR down to
6220 check_mem_write.
6221
03583c20
UW
62222011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6223
6224 * configure.ac: Check support for personality routine.
6225 * configure: Regenerate.
6226 * config.in: Likewise.
6227 * linux-low.c: Include <sys/personality.h>.
6228 Define ADDR_NO_RANDOMIZE if necessary.
6229 (linux_create_inferior): Disable address space randomization when
6230 forking inferior, if requested.
6231 (linux_supports_disable_randomization): New function.
6232 (linux_target_ops): Install it.
6233 * server.h (disable_randomization): Declare.
6234 * server.c (disable_randomization): New global variable.
6235 (handle_general_set): Handle QDisableRandomization.
6236 (handle_query): Likewise for qSupported.
6237 (main): Support --disable-randomization and --no-disable-randomization
6238 command line arguments.
6239 * target.h (struct target_ops): Add supports_disable_randomization.
6240 (target_supports_disable_randomization): New macro.
6241
723b724b
MF
62422011-09-29 Mike Frysinger <vapier@gentoo.org>
6243
6244 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6245 ifdef check.
6246 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6247 [!PT_GETDSBT] (target_loadmap): New definition.
6248 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6249 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6250 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6251 and PT_GETDSBT to LINUX_LOADMAP.
6252 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6253 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6254
55329a5c 62552011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
71487fd7
UW
6256
6257 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6258 (arm_linux_hwbp_cap): New static variable.
6259 (arm_linux_get_hwbp_cap): Replace by ...
6260 (arm_linux_init_hwbp_cap): ... this new function.
6261 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6262 (arm_linux_get_hw_watchpoint_count): Likewise.
6263 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6264 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6265 (arm_prepare_to_resume): Use perror_with_name instead of error.
6266
55329a5c 62672011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
09b4ad9f
UW
6268
6269 * linux-arm-low.c: Include <signal.h>.
6270 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6271 (struct arm_linux_hwbp_cap): New data type.
6272 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6273 (struct arm_linux_hw_breakpoint): New data type.
6274 (MAX_BPTS, MAX_WPTS): Define.
6275 (struct arch_process_info, struct arch_lwp_info): New data types.
6276 (arm_linux_get_hwbp_cap): New function.
6277 (arm_linux_get_hw_breakpoint_count): Likewise.
6278 (arm_linux_get_hw_watchpoint_count): Likewise.
6279 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6280 (arm_hwbp_control_initialize): Likewise.
6281 (arm_hwbp_control_is_enabled): Likewise.
6282 (arm_hwbp_control_is_initialized): Likewise.
6283 (arm_hwbp_control_disable): Likewise.
6284 (arm_linux_hw_breakpoint_equal): Likewise.
6285 (arm_linux_hw_point_initialize): Likewise.
6286 (struct update_registers_data): New data structure.
6287 (update_registers_callback: New function.
6288 (arm_insert_point): Likewise.
6289 (arm_remove_point): Likewise.
6290 (arm_stopped_by_watchpoint): Likewise.
6291 (arm_stopped_data_address): Likewise.
6292 (arm_new_process): Likewise.
6293 (arm_new_thread): Likewise.
6294 (arm_prepare_to_resume): Likewise.
6295 (the_low_target): Register arm_insert_point, arm_remove_point,
6296 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6297 arm_new_thread, and arm_prepare_to_resume.
6298
6b9801d4
SS
62992011-09-15 Stan Shebs <stan@codesourcery.com>
6300
6301 * server.h (struct emit_ops): Add compare-goto fields.
6302 * tracepoint.c (gdb_agent_op_sizes): New table.
6303 (emit_eq_goto): New function.
6304 (emit_ne_goto): New function.
6305 (emit_lt_goto): New function.
6306 (emit_le_goto): New function.
6307 (emit_gt_goto): New function.
6308 (emit_ge_goto): New function.
6309 (is_goto_target): New function.
6310 (compile_bytecodes): Recognize special cases of compare-goto
6311 combinations and call specialized emitters for them.
6312 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6313 (amd64_emit_ne_goto): New function.
6314 (amd64_emit_lt_goto): New function.
6315 (amd64_emit_le_goto): New function.
6316 (amd64_emit_gt_goto): New function.
6317 (amd64_emit_ge_goto): New function.
6318 (amd64_emit_ops): Add the new functions.
6319 (i386_emit_eq_goto): New function.
6320 (i386_emit_ne_goto): New function.
6321 (i386_emit_lt_goto): New function.
6322 (i386_emit_le_goto): New function.
6323 (i386_emit_gt_goto): New function.
6324 (i386_emit_ge_goto): New function.
6325 (i386_emit_ops): Add the new functions.
6326
bf15cbda
SS
63272011-09-08 Stan Shebs <stan@codesourcery.com>
6328
6329 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6330 (i386_emit_epilogue): Restore %ebx.
6331
943ca1dd
JZ
63322011-08-31 Jie Zhang <jzhang918@gmail.com>
6333
6334 * server.c (step_thread): Remove definition.
6335 (process_serial_event): Don't handle Hs.
6336 * server.h (step_thread): Remove declaration.
6337 * target.c (set_desired_inferior): Remove use of step_thread.
6338
e3deef73
LM
63392011-08-24 Luis Machado <lgustavo@codesourcery.com>
6340
6341 * linux-low.c: Include linux-procfs.h.
6342 (linux_attach_lwp_1): Update comments.
6343 (linux_attach): Scan for existing threads when attaching to a
6344 process that is the tgid.
6345 * Makefile.in: Update dependencies.
6346
13da1c97
LM
63472011-08-24 Luis Machado <lgustavo@codesourcery.com>
6348
6349 * configure.srv: Add linux-procfs.o dependencies.
6350
881127c9
YQ
63512011-08-14 Yao Qi <yao@codesourcery.com>
6352
6353 * target.h (struct target_ops): Fix indent.
6354 * win32-low.c (win32_target_ops): Fix comment.
6355
58dbd541
YQ
63562011-08-14 Andrew Jenner <andrew@codesourcery.com>
6357 Yao Qi <yao@codesourcery.com>
6358
6359 * Makefile.in (clean): Remove tic6x-*.c files.
6360 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6361 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6362 (tic6x-c64xp-linux.c): Likewise.
6363 * configure.srv: Add support for tic6x-*-uclinux.
6364 * linux-tic6x-low.c: New.
6365 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6366
78d85199
YQ
63672011-08-14 Andrew Stubbs <ams@codesourcery.com>
6368 Yao Qi <yao@codesourcery.com>
6369
6370 * target.h (struct target_ops): Add read_loadmap.
6371 * linux-low.c (struct target_loadseg): New type.
6372 (struct target_loadmap): New type.
6373 (linux_read_loadmap): New function.
6374 (linux_target_ops): Add linux_read_loadmap.
6375 * server.c (handle_query): Support qXfer:fdpic:read packet.
43aaf8b6
PA
6376 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6377 to NULL.
78d85199 6378
a959a88d
EZ
63792011-08-05 Eli Zaretskii <eliz@gnu.org>
6380
6381 * win32-low.c: Include <stdint.h>.
6382
1ced966e
PA
63832011-07-22 Pedro Alves <pedro@codesourcery.com>
6384
6385 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6386 to the inferior here.
6387 (i386_remove_aligned_watchpoint): Ditto.
6388 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6389 fit part of the watchpoint in the debug registers.
6390 (i386_update_inferior_debug_regs): New.
6391 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6392 registers, and only update the inferior on success.
6393 (i386_low_remove_watchpoint): Ditto.
6394
d26e3629
KY
63952011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6396
6397 * linux-low.c (compare_ints, unique, list_threads, show_process,
6398 linux_core_of_thread): Delete.
6399 (linux_target_ops): Change linux_core_of_thread to
6400 linux_common_core_of_thread.
6401 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6402 * utils.c (malloc_failure): Change type of argument.
6403 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6404 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6405 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6406 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6407 (IPA_OBJS): Add common-utils-ipa.o.
6408 (ptid_h, linux_osdata_h): New macros.
6409 (server_h): Add common/common-utils.h, common/xml-utils.h,
6410 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6411 common/ptid.h.
6412 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6413 ptid.o, buffer.o): New rules.
6414 (linux-low.o): Add common/linux-osdata.h as a dependency.
6415 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6416 * configure.ac: Add AC_HEADER_DIRENT check.
6417 * config.in: Regenerate.
6418 * configure: Regenerate.
6419 * remote-utils.c (xml_escape_text): Delete.
6420 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6421 buffer_xml_printf): Move to common/buffer.c.
6422 * server.c (main): Remove call to initialize_inferiors.
6423 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6424 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6425 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6426 internal_error, gdb_assert, gdb_assert_fail): Delete.
6427 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6428 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6429 common/buffer.h.
6430 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6431 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6432 initialize_inferiors): Delete.
6433
2275a1a7
PA
64342011-07-20 Pedro Alves <pedro@codesourcery.com>
6435
6436 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6437 symbol error.
6438
0a5b1e09
PA
64392011-05-31 Pedro Alves <pedro@codesourcery.com>
6440
6441 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6442 assertion.
6443 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6444
6938fd34
YQ
64452011-05-26 Yao Qi <yao@codesourcery.com>
6446
6447 * Makefile.in (thread-db.o): Track dependence to
6448 common/gdb_thread_db.h.
6449 * thread-db.c: include gdb_thread_db.h from right place.
6450
b481f9e0
TT
64512011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6452
6453 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6454 __FILE__ and __LINE__ to internal_error.
6455
98a5dd13
DE
64562011-05-13 Doug Evans <dje@google.com>
6457
6458 * thread-db.c (try_thread_db_load_from_sdir): New function.
6459 (try_thread_db_load_from_dir): New function.
6460 (thread_db_load_search): Handle $sdir, ignore $pdir.
6461 Remove trying of system directories if search of
6462 libthread-db-search-path fails, that is now done via $sdir.
6463
d248b706
KY
64642011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6465
6466 * server.c (handle_query): Add EnableDisableTracepoints to the list
6467 of supported features.
43aaf8b6 6468 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
d248b706 6469 tracepoints.
43aaf8b6
PA
6470 (cmd_qtenable_disable): New.
6471 (cmd_qtstart): Install tracepoints even if disabled.
6472 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6473 receiving a QTEnable or QTDisable packet.
6474 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6475 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6476 tracepoints.
6477 (gdb_probe): Skip data collection if static tracepoint is disabled.
d248b706 6478
84e578fb
DE
64792011-05-10 Doug Evans <dje@google.com>
6480
6481 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6482
71f55dd8
DE
64832011-05-04 Doug Evans <dje@google.com>
6484
6485 * linux-low.c (linux_join): Skip process lookup.
6486 * spu-low.c (spu_join): Ditto.
6487 * server.c (join_inferiors_callback): Delete.
6488 (process_serial_event): For 'D' packet (detach) call join_inferior
6489 directly.
6490
4d393d60
JM
64912011-05-04 Joseph Myers <joseph@codesourcery.com>
6492
6493 * README: Don't mention xscale*-*-linux*.
6494 * configure.srv (xscale*-*-linux*): Don't handle target.
6495
b00ad6ff
NF
64962011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6497
6498 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6499 casting pointers.
6500 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6501 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6502 (i386_emit_void_call_2): Likewise.
6503
af96c192
YQ
65042011-04-26 Yao Qi <yao@codesourcery.com>
6505
43aaf8b6
PA
6506 * linux-low.c: Move common macros to linux-ptrace.h.
6507 Include linux-ptrace.h.
af96c192
YQ
6508 * Makefile.in (linux_ptrace_h): New.
6509 (linux-low.o): Depends on linux-ptrace.h.
6510
03f2bd59
JK
65112011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6512
6513 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6514 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6515 (remote_prepare): New function with most of the TCP code from ...
6516 (remote_open): ... here. Detect PORT here unconditionally. Move also
6517 setting transport_is_reliable.
6518 * server.c (run_once): New variable.
6519 (gdbserver_usage): Document it.
6520 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6521 the first run if RUN_ONCE.
6522 * server.h (run_once, remote_prepare): New declarations.
6523
7a9dd1b2
TT
65242011-04-19 Tom Tromey <tromey@redhat.com>
6525
6526 * win32-low.c (handle_load_dll): Remove duplicate "the".
6527
81239425
PM
65282011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6529
6530 Remove support for old Cygwin 1.5 versions.
6531 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6532 function to avoid warning.
6533 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6534 warning.
6535
9e0627f1
PM
65362011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6537
6538 * gdbserver/server.h (Macro _): Define it if not available.
6539
588eebee
MS
65402011-03-14 Michael Snyder <msnyder@vmware.com>
6541
348af9f7 6542 * hostio.c (handle_close): Remove unnecessary null test.
588eebee 6543
43f70d4c
JB
65442011-03-10 Joel Brobecker <brobecker@adacore.com>
6545
6546 * Makefile.in (maintainer-clean realclean distclean): Remove
6547 "make ... subdir_do" command.
6548
348af9f7
MS
65492011-03-10 Michael Snyder <msnyder@vmware.com>
6550
6551 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6552
6553 * server.c (handle_v_run): Free alloced buffer on early return.
6554
e637a4f5
YQ
65552011-03-09 Yao Qi <yao@codesourcery.com>
6556
6557 Revert:
6558 2011-03-04 Yao Qi <yao@codesourcery.com>
6559
6560 * Makefile.in: Remove GNU make feature --directory.
6561
6562 2011-03-05 Yao Qi <yao@codesourcery.com>
6563
6564 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6565 (subdir_do): New make target. Copied from gdb/Makefile.
6566 (maintainer-clean, realclean, distclean, clean): Call corresponding
6567 make targets in common/Makefile.
6568
6569 2011-02-11 Yao Qi <yao@codesourcery.com>
6570
6571 * configure.ac: Call AC_PROG_RANLIB.
6572 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6573 * configure: Regenerate.
6574
e6edda56
JK
65752011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6576
6577 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6578
e5141119
JB
65792011-03-06 Yao Qi <yao@codesourcery.com>
6580
6581 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6582
64794aa4
JB
65832011-03-05 Yao Qi <yao@codesourcery.com>
6584
6585 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6586 (subdir_do): New make target. Copied from gdb/Makefile.
6587 (maintainer-clean, realclean, distclean, clean): Call corresponding
6588 make targets in common/Makefile.
6589
7a762829
YQ
65902011-03-04 Yao Qi <yao@codesourcery.com>
6591
6592 * Makefile.in: Remove GNU make feature --directory.
6593
348af9f7
MS
65942011-03-04 Michael Snyder <msnyder@vmware.com>
6595
6596 * server.c (queue_stop_reply): Call xmalloc not malloc.
6597
65982011-03-02 Michael Snyder <msnyder@vmware.com>
6599
6600 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6601
9f72fee2
MS
66022011-02-28 Michael Snyder <msnyder@vmware.com>
6603
588eebee
MS
6604 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6605 (cmd_qtframe): Ditto.
6606 (cmd_qtbuffer): Ditto.
6607 (cmd_bigqtbuffer): Ditto.
6608
9f72fee2
MS
6609 * utils.c (decimal2str): Initialize 'width' to nine, then
6610 don't mess with it.
6611
8040bd49
UW
66122011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6613
6614 * hostio.c (require_data): Free *data, not data.
6615
7e52cbd0
JK
66162011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6617
6618 * hostio.c (require_data): Use free, not xfree.
6619
9130f83e
MS
66202011-02-27 Michael Snyder <msnyder@vmware.com>
6621
4b812f4e
MS
6622 * server.c (handle_query): Discard unused value.
6623
9130f83e
MS
6624 * hostio.c (require_data): Free malloc memory before returning
6625 error.
6626
69d37113
MS
66272011-02-26 Michael Snyder <msnyder@vmware.com>
6628
6629 * linux-low.c (list_threads): Call closedir for dirent.
6630
35f5825a
MS
66312011-02-27 Michael Snyder <msnyder@vmware.com>
6632
2a589cef
MS
6633 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6634 a case statement falls through.
6635
0adea5f7
MS
6636 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6637
35f5825a
MS
6638 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6639 in comparison.
6640
238f1c74
MS
66412011-02-26 Michael Snyder <msnyder@vmware.com>
6642
6643 * utils.c (decimal2str): Eliminate dead code and dead param.
6644 (pulongest): Drop dead param from call to decimal2str.
6645 (plongest): Ditto.
6646
633ff500
JB
66472011-02-24 Joel Brobecker <brobecker@adacore.com>
6648
6649 Revert the following patch (not approved yet):
6650 2011-02-21 Hui Zhu <teawater@gmail.com>
6651 * tracepoint.c (tp_printf): New function.
6652 (eval_agent_expr): Handle gdb_agent_op_printf.
6653
f9c6ff72
HZ
66542011-02-21 Hui Zhu <teawater@gmail.com>
6655
6656 * tracepoint.c (tp_printf): New function.
6657 (eval_agent_expr): Handle gdb_agent_op_printf.
6658
94d5e490
TT
66592011-02-18 Tom Tromey <tromey@redhat.com>
6660
6661 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6662 (tracepoint.o): Likewise.
6663 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6664 (gdb_agent_op_names): Likewise.
6665
c7f96d2b
TT
66662011-02-18 Tom Tromey <tromey@redhat.com>
6667
6668 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6669 gdb_agent_op_rot>: New constants.
6670 (gdb_agent_op_names): Add pick and roll.
6671 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6672 cases.
6673
0feedb2c
JK
66742011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6675
6676 * aclocal.m4: Regenerated with aclocal-1.11.1.
6677
b3b9301e
PA
66782011-02-14 Pedro Alves <pedro@codesourcery.com>
6679
6680 * server.c (handle_qxfer_traceframe_info): New.
6681 (qxfer_packets): Register "traceframe-info".
6682 (handle_query): Report support for qXfer:traceframe-info:read+.
6683 * tracepoint.c (match_blocktype): New.
6684 (traceframe_find_block_type): Rename to ...
6685 (traceframe_walk_blocks): ... this. Add callback filter argument,
6686 and use it.
6687 (traceframe_find_block_type): New, reimplemented on top of
6688 traceframe_walk_blocks.
6689 (build_traceframe_info_xml): New.
6690 (traceframe_read_info): New.
6691 * server.h (traceframe_read_info): Declare.
6692
4f3e6fb7
YQ
66932011-02-11 Yao Qi <yao@codesourcery.com>
6694
6695 * configure.ac: Call AC_PROG_RANLIB.
6696 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6697 * configure: Regenerate.
6698
764880b7
PA
66992011-02-07 Pedro Alves <pedro@codesourcery.com>
6700
6701 * server.c (gdb_read_memory): Change return semantics to allow
6702 partial transfers.
6703 (handle_search_memory_1): Adjust.
6704 (process_serial_event) <'m' packet>: Handle partial transfers.
6705 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6706
1c79eb8a
PA
67072011-01-28 Pedro Alves <pedro@codesourcery.com>
6708
6709 * regcache.c (init_register_cache): Initialize
6710 regcache->register_status.
6711 (free_register_cache): Release regcache->register_status.
6712 (regcache_cpy): Copy register_status.
6713 (registers_to_string): Print 'x's for unavailable registers.
6714 (supply_register): Mark the register's status valid or
6715 unavailable, depending on whether a buffer was passed in or not.
6716 (supply_register_zeroed): New.
6717 (supply_regblock): Mark the registers' status valid or
6718 unavailable, depending on whether a buffer was passed in or not.
6719 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6720 (struct regcache): New `register_status' field.
6721 (supply_register_zeroed): Declare.
6722 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6723 supply_register_zeroed, rather than passing a NULL buffer to
6724 supply_register.
6725 * tracepoint.c (fetch_traceframe_registers): Update comment.
6726
85724a0e
PA
67272011-01-28 Pedro Alves <pedro@codesourcery.com>
6728
6729 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6730 buffer explicit.
6731
d08aafef
PA
67322011-01-25 Pedro Alves <pedro@codesourcery.com>
6733
6734 * server.h (decode_xfer_write): Change prototype.
6735 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6736 and don't extract the annex here.
6737 * server.c (decode_xfer_read): Remove `annex' parameter,
6738 and don't extract the annex here.
6739 (decode_xfer): New.
6740 (struct qxfer): New.
6741 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6742 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6743 (handle_qxfer_statictrace): New functions, abstracted out from
6744 handle_query, and made to use the struct qxfer interface.
6745 (handle_threads_qxfer_proper): Rename to ...
6746 (handle_qxfer_threads_proper): ... this.
6747 (handle_threads_qxfer): Rename to ...
6748 (handle_qxfer_threads): ... this. Adjust.
6749 (qxfer_packets): New array.
6750 (handle_qxfer): New function.
6751 (handle_query): Use handle_qxfer.
6752
493e2a69
MS
67532011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6754
6755 * gdbreplay.c: Shorten lines of >= 80 columns.
6756 * linux-low.c: Ditto.
6757 * linux-ppc-low.c: Ditto.
6758 * linux-s390-low.c: Ditto.
6759 * linux-sparc-low.c: Ditto.
6760 * linux-x86-low.c: Ditto.
6761 * linux-xtensa-low.c: Ditto.
6762 * mem-break.c: Ditto.
6763 * nto-low.c: Ditto.
6764 * regcache.h: Ditto.
6765 * remote-utils.c: Ditto.
6766 * server.c: Ditto.
6767 * server.h: Ditto.
6768 * thread-db.c: Ditto.
6769 * tracepoint.c: Ditto.
6770 * utils.c: Ditto.
6771 * win32-low.h: Ditto.
6772
44944448
JB
67732011-01-05 Joel Brobecker <brobecker@adacore.com>
6774
6775 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6776 update.
6777
71ce852c
JB
67782011-01-01 Joel Brobecker <brobecker@adacore.com>
6779
6780 * server.c (gdbserver_version): Update copyright year in version
6781 output.
6782 * gdbreplay.c (gdbreplay_version): Ditto.
6783
eb826dc6
MF
67842010-12-29 Jie Zhang <jie.zhang@analog.com>
6785
6786 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6787 * linux-bfin-low.c: New file.
6788 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6789 PT_DATA_ADDR for BFIN targets.
6790 * Makefile.in (SFILES): Add linux-bfin-low.c.
6791 (clean): Remove reg-bfin.c.
6792 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6793 * README: Mention supported Blackfin targets.
6794
39ab222a
MF
67952010-12-23 Mike Frysinger <vapier@gentoo.org>
6796
6797 * .gitignore: New file.
6798
a1f2ce7d
MF
67992010-11-16 Mike Frysinger <vapier@gentoo.org>
6800
6801 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6802
f474844c
JZ
68032010-10-22 Jie Zhang <jie@codesourcery.com>
6804
6805 * Makefile.in: Add FLAGS_TO_PASS variable.
6806 (install): Remove dependency of install-only and recursively
6807 invoke make for install-only.
6808
f1048712
DE
68092010-10-04 Doug Evans <dje@google.com>
6810
6811 * Makefile.in (uninstall): Use $(DESTDIR).
6812
b53a1623
PA
68132010-09-24 Pedro Alves <pedro@codesourcery.com>
6814
e6ee044d
PA
6815 PR gdb/11842
6816
b53a1623
PA
6817 * linux-x86-low.c (compat_siginfo_from_siginfo)
6818 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6819 si_code is < 0. Check for si_code == SI_TIMER before checking for
6820 si_code < 0.
6821
fa1bd1e4
JB
68222010-09-13 Joel Brobecker <brobecker@adacore.com>
6823
6824 * lynx-i386-low.c: New file.
6825 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6826
47fac8f8
JB
68272010-09-13 Joel Brobecker <brobecker@adacore.com>
6828
6829 * lynx-low.c (ptrace_request_to_str): Remove handling for
6830 request values that have been removed in LynxOS 5.x.
6831
1adfc54d
JB
68322010-09-13 Joel Brobecker <brobecker@adacore.com>
6833
6834 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6835 <ptrace.h>
6836
c2a66c29
NS
68372010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6838
6839 * configure.ac: Add --enable-inprocess-agent option.
6840 * configure: Rebuilt.
6841
32fcada3
YQ
68422010-09-06 Yao Qi <yao@codesourcery.com>
6843
6844 * linux-low.c (linux_kill): Remove unused variable.
6845 (linux_stabilize_threads): Likewise.
6846 * server.c (start_inferior): Likewise.
6847 (queue_stop_reply_callback): Likewise.
6848 * tracepoint.c (do_action_at_tracepoint): Likewise.
6849
0cccb683
YQ
68502010-09-06 Yao Qi <yao@codesourcery.com>
6851
6852 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6853 on return.
6854
423ec54c
JK
68552010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6856
6857 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6858
12ac6819
PA
68592010-09-06 Pedro Alves <pedro@codesourcery.com>
6860
6861 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6862 "$(IPA_DEPFILES)".
6863
8ed54b31
JB
68642010-09-01 Joel Brobecker <brobecker@adacore.com>
6865
6866 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6867 gdbserver/lynx-ppc-low.c: New files.
6868 * Makefile.in (lynx_low_h): New variable.
6869 (lynx-low.o, lynx-ppc-low.o): New rules.
6870 * configure.ac: On LynxOS, link with -lnetinet.
6871 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6872 * configure: regenerate.
6873
bb0116a4
JB
68742010-09-01 Joel Brobecker <brobecker@adacore.com>
6875
6876 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6877 * configure.ac: Add check for vasprintf and vsnprintf.
6878 * configure, config.in: Regenerate.
6879 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6880
a778ab81 68812010-09-01 Joel Brobecker <brobecker@adacore.com>
6882
6883 * gdbreplay.c: Move include of alloca.h up, next to include of
6884 malloc.h.
6885 * server.h: Add include of malloc.h.
6886 * mem-break.c: Remove include of malloc.h.
6887 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6888
8b034a19 68892010-09-01 Joel Brobecker <brobecker@adacore.com>
6890
6891 * Makefile.in (memmem.o): Build with -Wno-error.
6892
68932010-09-01 Joel Brobecker <brobecker@adacore.com>
6894
6895 * utils.c (xsnprintf): Make non-static.
6896 * server.h: Add xsnprintf declaration.
6897 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6898 replace calls to snprintf by calls to xsnprintf throughout.
6899
69002010-09-01 Joel Brobecker <brobecker@adacore.com>
6901
6902 * configure.ac: Add configure check for alloca.
6903 * configure, config.in: Regenerate.
6904 * server.h: Include alloca.h if it exists.
6905 * gdbreplay.c: Include alloca.h if it exists.
6906
1a981360
PA
69072010-08-28 Pedro Alves <pedro@codesourcery.com>
6908
6909 * linux-low.c (__SIGRTMIN): Define if not already defined.
6910 (linux_create_inferior): Check for __ANDROID__ rather than
6911 __SIGRTMIN.
6912 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6913 are already deferred.
6914 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6915 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6916 stopped and already has a pending signal to report.
6917 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6918 a pending signal to report or is moving out of a jump pad.
6919 (linux_init_signals): Check for __ANDROID__ rather than
6920 __SIGRTMIN.
6921
b4d51a55
PA
69222010-08-28 Pedro Alves <pedro@codesourcery.com>
6923
6924 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6925 debug_threads check. Avoid a linear search when not doing debug
6926 output.
6927
ec48365d
PA
69282010-08-27 Pedro Alves <pedro@codesourcery.com>
6929
6930 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6931 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6932 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6933 (process_event): Change local fd's type to gdb_fildes_t.
6934 (create_file_handler): Adjust prototype.
6935 (delete_file_handler): Adjust prototype.
6936 (handle_file_event): Adjust prototype. Use pfildes.
6937 (create_file_event): Adjsut prototype.
6938 * remote-utils.c (remote_desc, listen_desc): Change type to
6939 gdb_fildes_t.
6940 * server.h: New gdb_fildes_t typedef.
6941 [USE_WIN32API]: Include winsock2.h.
6942 (delete_file_handler, add_file_handler): Adjust prototypes.
6943 (pfildes): Declare.
6944 * utils.c (pfildes): New.
6945
854d88f0
PA
69462010-08-27 Pedro Alves <pedro@codesourcery.com>
6947
6948 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6949 * configure: Regenerate.
6950
0146f85b
PA
69512010-08-27 Pedro Alves <pedro@codesourcery.com>
6952
6953 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6954 (linux_done_accessing_memory): ... this.
6955 (linux_target_ops): Adjust.
6956 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6957 * nto-low.c (nto_target_ops): Adjust comment.
6958 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6959 * spu-low.c (spu_target_ops): Adjust comment.
6960 * target.h (target_ops): Rename unprepare_to_access_memory field
6961 to done_accessing_memory.
6962 (unprepare_to_access_memory): Rename to ...
6963 (done_accessing_memory): ... this.
6964
90d74c30
PA
69652010-08-26 Pedro Alves <pedro@codesourcery.com>
6966
6967 * linux-low.c (linux_prepare_to_access_memory): New.
6968 (linux_unprepare_to_access_memory): New.
6969 (linux_target_ops): Install them.
6970 * server.c (read_memory): Rename to ...
6971 (gdb_read_memory): ... this. Use
6972 prepare_to_access_memory/prepare_to_access_memory.
6973 (write_memory): Rename to ...
6974 (gdb_write_memory): ... this. Use
6975 prepare_to_access_memory/prepare_to_access_memory.
6976 (handle_search_memory_1): Adjust.
6977 (process_serial_event): Adjust.
6978 * target.h (struct target_ops): New fields
6979 prepare_to_access_memory and unprepare_to_access_memory.
6980 (prepare_to_access_memory, unprepare_to_access_memory): New.
6981 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6982 prepare_to_access_memory/prepare_to_access_memory.
6983 * nto-low.c (nto_target_ops): Adjust.
6984 * spu-low.c (spu_target_ops): Adjust.
6985 * win32-low.c (win32_target_ops): Adjust.
6986
fd467969
PA
69872010-08-26 Pedro Alves <pedro@codesourcery.com>
6988
6989 * Makefile.in (WARN_CFLAGS): Get it from configure.
6990 (WERROR_CFLAGS): New.
6991 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6992 * configure.ac: Introduce --enable-werror, which adds -Werror to
6993 the compiler command line. Enabled by default. Disable with
6994 --disable-werror. Add -Wdeclaration-after-statement
6995 Wpointer-arith and -Wformat-nonliteral to warning flags.
6996 * configure: Regenerate.
6997
331e2f5f
PA
69982010-08-26 Pedro Alves <pedro@codesourcery.com>
6999
7000 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
7001
e581f2b4
PA
70022010-08-26 Pedro Alves <pedro@codesourcery.com>
7003
7004 * gdbreplay.c (remote_error): New.
7005 (gdbchar): New.
7006 (expect): Use gdbchar. Check for error reading from GDB.
7007 Clarify sync error output.
7008 (play): Check for errors writing to GDB.
7009 * linux-low.c (sigchld_handler): Really ignore `write' errors.
7010 * remote-utils.c (getpkt): Check for errors writing to the remote
7011 descriptor.
7012
3c11dd79
PA
70132010-08-25 Pedro Alves <pedro@codesourcery.com>
7014
7015 * linux-low.c (linux_wait_1): Move non-debugging code out of
7016 `debug_threads' control.
7017
d20a8ad9
PA
70182010-08-25 Pedro Alves <pedro@codesourcery.com>
7019
7020 * linux-low.c (linux_wait_1): Don't set last_status here.
7021 * server.c (push_event, queue_stop_reply_callback): Assert we're
7022 not pushing a TARGET_WAITKIND_IGNORE event.
7023 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
7024 (myresume, handle_target_event): Set the thread's last_resume_kind
7025 and last_status from the target returned status.
7026
964e4306
PA
70272010-08-25 Pedro Alves <pedro@codesourcery.com>
7028
7029 PR threads/10729
7030
7031 * linux-x86-low.c (update_debug_registers_callback): New.
7032 (i386_dr_low_set_addr): Use it.
7033 (i386_dr_low_get_addr): New.
7034 (i386_dr_low_set_control): Use update_debug_registers_callback.
7035 (i386_dr_low_get_control): New.
7036 (i386_dr_low_get_status): Adjust.
7037 * linux-low.c (linux_stop_lwp): New.
7038 * linux-low.h (linux_stop_lwp): Declare.
7039
7040 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
7041 argument instead of a i386_debug_reg_state.
7042 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
7043 a i386_debug_reg_state.
7044 (i386_insert_aligned_watchpoint): Adjust.
7045 (i386_remove_aligned_watchpoint): Adjust.
7046 (i386_low_stopped_data_address): Read the debug registers from the
7047 inferior instead of from the mirrors.
7048 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7049 (i386_dr_low_get_addr): Declare.
7050 (i386_dr_low_get_control): Declare.
7051 (i386_dr_low_get_status): Change prototype.
7052
7053 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7054 (i386_dr_low_get_addr): New.
7055 (i386_dr_low_get_control): New.
7056 (i386_dr_low_get_status): Adjust prototype. Return
7057 dr_status_mirror.
7058 (i386_initial_stuff): Clear dr_status_mirror and
7059 dr_control_mirror.
7060 (i386_get_thread_context): Adjust.
7061 (i386_set_thread_context): Adjust.
7062 (i386_thread_added): Adjust.
7063
5f21a75b
PA
70642010-08-24 Pedro Alves <pedro@codesourcery.com>
7065
7066 * linux-low.h (linux_thread_area): Delete declaration.
7067
3e4c1235
TS
70682010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7069
7070 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7071 after its termination.
7072
1971b033
PA
70732010-08-09 Pedro Alves <pedro@codesourcery.com>
7074
7075 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7076 (gdb_wants_all_stopped): Delete.
7077 (linux_wait_1): Don't call them.
7078 * server.c (handle_v_cont): Tag all threads as want-stopped.
7079 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7080 stopped as "client-wants-stopped".
7081
310444ac
PA
70822010-07-31 Pedro Alves <pedro@codesourcery.com>
7083
7084 * Makefile.in (signals_h): New.
7085 (server_h): Depend on it.
7086 (server.o): Don't depend on $(signals_def).
7087 (signals.o): Depend on $(signals_def).
7088
a19cae16
JK
70892010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7090
7091 * Makefile.in (signals_def): New.
7092 (server_h): Append include/gdb/signals.h and signals_def.
7093 (server.o): Append signals_def.
7094
30d50328
JK
70952010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7096
7097 * server.c (handle_target_event): Use target_signal_to_host for
7098 resume_info.sig initialization.
7099 * target.h (struct thread_resume) <sig>: New comment.
7100
5c3216e2
OS
71012010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7102
c6f46ca0
OS
7103 * server.c (handle_query): strcpy() the returned string from paddress()
7104 instead of sprintf().
5c3216e2
OS
7105 * utils.c (paddress): Return phex_nz().
7106
6bd31874
JB
71072010-07-07 Joel Brobecker <brobecker@adacore.com>
7108
7109 * server.c (handle_v_cont): Call mourn_inferior if process
7110 just exited.
7111 (myresume): Likewise.
7112
0fb4aa4b
PA
71132010-07-01 Pedro Alves <pedro@codesourcery.com>
7114
7115 Static tracepoints, and integration with UST.
7116
7117 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7118 * mem-break.c (uninsert_all_breakpoints)
7119 (reinsert_all_breakpoints): New.
7120 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7121 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7122 (gdb_agent_ust_loaded, helper_thread_id)
7123 (gdb_agent_helper_thread_id): New macros.
7124 (struct ipa_sym_addresses): Add addr_ust_loaded,
7125 addr_helper_thread_id, addr_cmd_buf.
7126 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7127 (in_process_agent_loaded_ust): New.
7128 (write_e_ust_not_loaded): New.
7129 (maybe_write_ipa_ust_not_loaded): New.
7130 (struct collect_static_trace_data_action): New.
7131 (enum tracepoint_type) <static_tracepoint>: New.
7132 (struct tracepoint) <handle>: Mention static tracepoints.
7133 (struct static_tracepoint_ctx): New.
7134 (CMD_BUF_SIZE): New.
7135 (add_tracepoint_action): Handle static tracepoint actions.
7136 (unprobe_marker_at): New.
7137 (clear_installed_tracepoints): Handle static tracepoints.
7138 (cmd_qtdp): Handle static tracepoints.
7139 (probe_marker_at): New.
7140 (cmd_qtstart): Handle static tracepoints.
7141 (response_tracepoint): Handle static tracepoints.
7142 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7143 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7144 (get_context_regcache): Handle static tracepoints.
7145 (do_action_at_tracepoint): Handle static tracepoint actions.
7146 (traceframe_find_block_type): Handle static trace data blocks.
7147 (traceframe_read_sdata): New.
7148 (download_tracepoints): Download static tracepoint actions.
7149 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7150 (GDB_PROBE_NAME): New.
7151 (ust_ops): New.
7152 (GET_UST_SYM): New.
7153 (USTF): New.
7154 (dlsym_ust): New.
7155 (ust_marker_to_static_tracepoint): New.
7156 (gdb_probe): New.
7157 (collect_ust_data_at_tracepoint): New.
7158 (gdb_ust_probe): New.
7159 (UNIX_PATH_MAX, SOCK_DIR): New.
7160 (gdb_ust_connect_sync_socket): New.
7161 (resume_thread, stop_thread): New.
7162 (run_inferior_command): New.
7163 (init_named_socket): New.
7164 (gdb_ust_socket_init): New.
7165 (cstr_to_hexstr): New.
7166 (next_st): New.
7167 (first_marker, next_marker): New.
7168 (response_ust_marker): New.
7169 (cmd_qtfstm, cmd_qtsstm): New.
7170 (unprobe_marker_at, probe_marker_at): New.
7171 (cmd_qtstmat, gdb_ust_thread): New.
7172 (gdb_ust_init): New.
7173 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7174 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7175 (ST_REGENTRY): New.
7176 (x86_64_st_collect_regmap): New.
7177 (X86_64_NUM_ST_COLLECT_GREGS): New.
7178 (AMD64_RIP_REGNUM): New.
7179 (supply_static_tracepoint_registers): New.
7180 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7181 (ST_REGENTRY): New.
7182 (i386_st_collect_regmap): New.
7183 (i386_NUM_ST_COLLECT_GREGS): New.
7184 (supply_static_tracepoint_registers): New.
7185 * server.c (handle_query): Handle qXfer:statictrace:read.
7186 <qSupported>: Report support for StaticTracepoints, and
7187 qXfer:statictrace:read features.
7188 * server.h (traceframe_read_sdata)
7189 (supply_static_tracepoint_registers): Declare.
7190 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7191 (unpack_varlen_hex): Include in IPA build.
7192 * Makefile.in (ustlibs, ustinc): New.
7193 (IPA_OBJS): Add remote-utils-ipa.o.
7194 ($(IPA_LIB)): Link -ldl and -lpthread.
7195 (UST_CFLAGS): New.
7196 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7197 * config.in, configure: Regenerate.
7198
9e4344e5
PA
71992010-06-20 Ian Lance Taylor <iant@google.com>
7200 Pedro Alves <pedro@codesourcery.com>
7201
7202 * linux-x86-low.c (always_true): Delete.
7203 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7204 trying to fool the compiler with always_true.
7205
c6beb2cb
PA
72062010-06-20 Pedro Alves <pedro@codesourcery.com>
7207
7208 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7209 conditions in gdbserver.
7210
d2ed6730
UW
72112010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7212
7213 * spu-low.c (spu_read_memory): Wrap around local store limit.
7214 (spu_write_memory): Likewise.
7215
4e29fb54
PA
72162010-06-15 Pedro Alves <pedro@codesourcery.com>
7217
7218 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7219 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7220 LONGEST uses.
7221 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7222 uses.
7223 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7224 uses with LONGEST uses.
7225
6a271cae
PA
72262010-06-14 Stan Shebs <stan@codesourcery.com>
7227 Pedro Alves <pedro@codesourcery.com>
7228
7229 Bytecode compiler.
7230
7231 * linux-x86-low.c: Include limits.h.
7232 (add_insns): New.
7233 (always_true): New.
7234 (EMIT_ASM): New.
7235 (EMIT_ASM32): New.
7236 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7237 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7238 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7239 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7240 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7241 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7242 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7243 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7244 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7245 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7246 (amd64_emit_void_call_2): New.
7247 (amd64_emit_ops): New.
7248 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7249 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7250 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7251 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7252 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7253 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7254 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7255 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7256 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7257 (i386_emit_stack_adjust, i386_emit_int_call_1)
7258 (i386_emit_void_call_2): New.
7259 (i386_emit_ops): New.
7260 (x86_emit_ops): New.
7261 (the_low_target): Install x86_emit_ops.
7262 * server.h (struct emit_ops): New.
7263 (get_raw_reg_func_addr): Declare.
7264 (current_insn_ptr, emit_error): Declare.
7265 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7266 (set_trace_state_variable_value): New defines.
7267 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7268 addr_get_trace_state_variable_value and
7269 addr_set_trace_state_variable_value.
7270 (symbol_list): New fields for get_raw_reg,
7271 get_trace_state_variable_value and set_trace_state_variable_value.
7272 (condfn): New typedef.
7273 (struct tracepoint): New field `compiled_cond'.
7274 (do_action_at_tracepoint): Clear compiled_cond.
7275 (get_trace_state_variable_value, set_trace_state_variable_value):
7276 Export in the IPA.
7277 (condition_true_at_tracepoint): If there's a compiled condition,
7278 run that.
7279 (current_insn_ptr, emit_error): New globals.
7280 (struct bytecode_address): New.
7281 (get_raw_reg_func_addr): New.
7282 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7283 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7284 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7285 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7286 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7287 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7288 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7289 (compile_tracepoint_condition, compile_bytecodes): New.
7290 * target.h (emit_ops): Forward declare.
7291 (struct target_ops): New field emit_ops.
7292 (target_emit_ops): New.
7293 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7294 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7295 * linux-low.c (linux_emit_ops): New.
7296 (linux_target_ops): Install it.
7297 * linux-low.h (struct linux_target_ops): New field emit_ops.
7298
92b72907
UW
72992010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7300
7301 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7302 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7303
fa593d66
PA
73042010-06-01 Pedro Alves <pedro@codesourcery.com>
7305 Stan Shebs <stan@codesourcery.com>
7306
7307 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7308 (all): Depend on $(extra_libraries).
7309 (install-only): Install the IPA.
7310 (IPA_OBJS, IPA_LIB): New.
7311 (clean): Remove the IPA lib.
7312 (IPAGENT_CFLAGS): New.
7313 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7314 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7315 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7316 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7317 * configure.ac: Check for atomic builtins support in the compiler.
7318 (IPA_DEPFILES, extra_libraries): Define.
7319 * configure.srv (ipa_obj): Add description.
7320 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7321 (i[34567]86-*-linux*): Set ipa_obj.
7322 (x86_64-*-linux*): Set ipa_obj.
7323 * linux-low.c (stabilizing_threads): New.
7324 (supports_fast_tracepoints): New.
7325 (linux_detach): Stabilize threads before detaching.
7326 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7327 the lwp is either not stabilizing, or is moving out of a jump pad.
7328 (linux_fast_tracepoint_collecting): New.
7329 (maybe_move_out_of_jump_pad): New.
7330 (enqueue_one_deferred_signal): New.
7331 (dequeue_one_deferred_signal): New.
7332 (linux_wait_for_event_1): If moving out of a jump pad, defer
7333 pending signals to later.
7334 (linux_stabilize_threads): New.
7335 (linux_wait_1): Check if threads need moving out of jump pads, and
7336 do it if so.
7337 (stuck_in_jump_pad_callback): New.
7338 (move_out_of_jump_pad_callback): New.
7339 (lwp_running): New.
7340 (linux_resume_one_lwp): Handle moving out of jump pads.
7341 (linux_set_resume_request): Dequeue deferred signals.
7342 (need_step_over_p): Also step over fast tracepoint jumps.
7343 (start_step_over): Also uninsert fast tracepoint jumps.
7344 (finish_step_over): Also reinsert fast tracepoint jumps.
7345 (linux_install_fast_tracepoint_jump): New.
7346 (linux_target_ops): Install linux_stabilize_threads and
7347 linux_install_fast_tracepoint_jump_pad.
7348 * linux-low.h (linux_target_ops) <get_thread_area,
7349 install_fast_tracepoint_jump_pad>: New fields.
7350 (struct lwp_info) <collecting_fast_tracepoint,
7351 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7352 (linux_get_thread_area): Declare.
7353 * linux-x86-low.c (jump_insn): New.
7354 (x86_get_thread_area): New.
7355 (append_insns): New.
7356 (push_opcode): New.
7357 (amd64_install_fast_tracepoint_jump_pad): New.
7358 (i386_install_fast_tracepoint_jump_pad): New.
7359 (x86_install_fast_tracepoint_jump_pad): New.
7360 (the_low_target): Install x86_get_thread_area and
7361 x86_install_fast_tracepoint_jump_pad.
7362 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7363 (struct fast_tracepoint_jump): New.
7364 (fast_tracepoint_jump_insn): New.
7365 (fast_tracepoint_jump_shadow): New.
7366 (find_fast_tracepoint_jump_at): New.
7367 (fast_tracepoint_jump_here): New.
7368 (delete_fast_tracepoint_jump): New.
7369 (set_fast_tracepoint_jump): New.
7370 (uninsert_fast_tracepoint_jumps_at): New.
7371 (reinsert_fast_tracepoint_jumps_at): New.
7372 (set_breakpoint_at): Use write_inferior_memory.
7373 (uninsert_raw_breakpoint): Use write_inferior_memory.
7374 (check_mem_read): Mask out fast tracepoint jumps.
7375 (check_mem_write): Mask out fast tracepoint jumps.
7376 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7377 (set_fast_tracepoint_jump): Declare.
7378 (delete_fast_tracepoint_jump)
7379 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7380 (reinsert_fast_tracepoint_jumps_at): Declare.
7381 * regcache.c: Don't compile many functions when building the
7382 in-process agent library.
7383 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7384 the register buffer in the heap.
7385 (free_register_cache): If the register buffer isn't owned by the
7386 regcache, don't free it.
7387 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7388 pre-existing register caches.
7389 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7390 type.
7391 (convert_ascii_to_int): : Constify `from' parameter type.
7392 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7393 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7394 the needed buffer in-place.
7395 (relocate_instruction): New.
7396 * server.c (handle_query) <qSymbols>: If the target supports
7397 tracepoints, give it a chance of looking up symbols. Report
7398 support for fast tracepoints.
7399 (handle_status): Stabilize threads.
7400 (process_serial_event): Adjust.
7401 * server.h (struct fast_tracepoint_jump): Forward declare.
7402 (struct process_info) <fast_tracepoint_jumps>: New field.
7403 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7404 (decode_X_packet, decode_M_packet): Adjust.
7405 (relocate_instruction): Declare.
7406 (in_process_agent_loaded): Declare.
7407 (tracepoint_look_up_symbols): Declare.
7408 (struct fast_tpoint_collect_status): Declare.
7409 (fast_tracepoint_collecting): Declare.
7410 (force_unlock_trace_buffer): Declare.
7411 (handle_tracepoint_bkpts): Declare.
7412 (initialize_low_tracepoint)
7413 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7414 * target.h (struct target_ops) <stabilize_threads,
7415 install_fast_tracepoint_jump_pad>: New fields.
7416 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7417 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7418 [HAVE_STDINT_H]: Include stdint.h.
7419 (trace_debug_1): Rename to ...
7420 (trace_vdebug): ... this.
7421 (trace_debug): Rename to ...
7422 (trace_debug_1): ... this. Add `level' parameter.
7423 (trace_debug): New.
7424 (ATTR_USED, ATTR_NOINLINE): New.
7425 (IP_AGENT_EXPORT): New.
7426 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7427 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7428 (about_to_request_buffer_space, trace_buffer_is_full)
7429 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7430 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7431 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7432 (traceframe_write_count, traceframes_created)
7433 (trace_state_variables)
7434 New renaming defines.
7435 (struct ipa_sym_addresses): New.
7436 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7437 (symbol_list): New.
7438 (ipa_sym_addrs): New.
7439 (all_tracepoint_symbols_looked_up): New.
7440 (in_process_agent_loaded): New.
7441 (write_e_ipa_not_loaded): New.
7442 (maybe_write_ipa_not_loaded): New.
7443 (tracepoint_look_up_symbols): New.
7444 (debug_threads) [IN_PROCESS_AGENT]: New.
7445 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7446 (UNKNOWN_SIDE_EFFECTS): New.
7447 (stop_tracing): New.
7448 (flush_trace_buffer): New.
7449 (stop_tracing_bkpt): New.
7450 (flush_trace_buffer_bkpt): New.
7451 (read_inferior_integer): New.
7452 (read_inferior_uinteger): New.
7453 (read_inferior_data_pointer): New.
7454 (write_inferior_data_pointer): New.
7455 (write_inferior_integer): New.
7456 (write_inferior_uinteger): New.
7457 (struct collect_static_trace_data_action): Delete.
7458 (enum tracepoint_type): New.
7459 (struct tracepoint) <type>: New field `type'.
43aaf8b6
PA
7460 <actions_str, step_actions, step_actions_str>: Only include in
7461 GDBserver.
fa593d66
PA
7462 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7463 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7464 (tracepoints): Use IP_AGENT_EXPORT.
7465 (last_tracepoint): Don't include in the IPA.
7466 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7467 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7468 (alloced_trace_state_variables): New.
7469 (trace_state_variables): Use IP_AGENT_EXPORT.
7470 (traceframe_t): Delete unused variable.
7471 (circular_trace_buffer): Don't include in the IPA.
7472 (trace_buffer_start): Delete.
7473 (struct trace_buffer_control): New.
7474 (trace_buffer_free): Delete.
7475 (struct ipa_trace_buffer_control): New.
7476 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7477 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7478 New.
7479 (trace_buffer_ctrl): New.
7480 (TRACE_BUFFER_CTRL_CURR): New.
7481 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7482 Reimplement as macros.
7483 (trace_buffer_wrap): Delete.
7484 (traceframe_write_count, traceframe_read_count)
7485 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7486 (struct tracepoint_hit_ctx) <type>: New field.
7487 (struct fast_tracepoint_ctx): New.
7488 (memory_barrier): New.
7489 (cmpxchg): New.
7490 (record_tracepoint_error): Update atomically in the IPA.
7491 (clear_inferior_trace_buffer): New.
7492 (about_to_request_buffer_space): New.
7493 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7494 updating the same buffer.
7495 (add_tracepoint): Default the tracepoint's type to trap
7496 tracepoint, and orig_size to -1.
7497 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7498 internal variables.
7499 (create_trace_state_variable): New parameter `gdb'. Handle it.
7500 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7501 (cmd_qtdp): Handle fast tracepoints.
7502 (cmd_qtdv): Adjust.
7503 (max_jump_pad_size): New.
7504 (gdb_jump_pad_head): New.
7505 (get_jump_space_head): New.
7506 (claim_jump_space): New.
7507 (sort_tracepoints): New.
7508 (MAX_JUMP_SIZE): New.
7509 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7510 IPA.
7511 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7512 support. Upload fast traceframes, and delete internal IPA
7513 breakpoints.
7514 (stop_tracing_handler): New.
7515 (flush_trace_buffer_handler): New.
7516 (cmd_qtstop): Upload fast tracepoints.
7517 (response_tracepoint): Handle fast tracepoints.
7518 (tracepoint_finished_step): Upload fast traceframes. Set the
7519 tracepoint hit context's tracepoint type.
7520 (handle_tracepoint_bkpts): New.
7521 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7522 type. Add comment about fast tracepoints.
7523 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7524 non-existing action_str field.
7525 (get_context_regcache): Handle fast tracepoints.
7526 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7527 to the regcache.
7528 (fast_tracepoint_from_jump_pad_address): New.
7529 (fast_tracepoint_from_ipa_tpoint_address): New.
7530 (collecting_t): New.
7531 (force_unlock_trace_buffer): New.
7532 (fast_tracepoint_collecting): New.
7533 (collecting): New.
7534 (gdb_collect): New.
7535 (write_inferior_data_ptr): New.
7536 (target_tp_heap): New.
7537 (target_malloc): New.
7538 (download_agent_expr): New.
7539 (UALIGN): New.
7540 (download_tracepoints): New.
7541 (download_trace_state_variables): New.
7542 (upload_fast_traceframes): New.
7543 (IPA_FIRST_TRACEFRAME): New.
7544 (IPA_NEXT_TRACEFRAME_1): New.
7545 (IPA_NEXT_TRACEFRAME): New.
7546 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7547 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7548 (gdb_jump_pad_buffer_end): New.
7549 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7550 (initialize_tracepoint): Adjust.
7551 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7552 buffer. Initialize the low module.
7553 * utils.c (PREFIX, TOOLNAME): New.
7554 (malloc_failure): Use PREFIX.
7555 (error): In the IPA, an error causes an exit.
7556 (fatal, warning): Use PREFIX.
7557 (internal_error): Use TOOLNAME.
7558 (NUMCELLS): Increase to 10.
7559 * configure, config.in: Regenerate.
7560
d149dd1d
PA
75612010-06-01 Pedro Alves <pedro@codesourcery.com>
7562
7563 * server.c (handle_query) <qSupported>: Do two passes over the
7564 qSupported string to avoid nesting strtok.
7565
f6528abd
JK
75662010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7567
7568 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7569 (CDEPS): New.
7570 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7571 -Wl,--dynamic-list.
7572 * configure: Regenerate.
7573 * proc-service.list: New.
7574
ca2a87a0
JK
75752010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7576
7577 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7578 New comment.
7579
363a6e9f
OS
75802010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7581
7582 * gdbreplay.c (remote_open): Check error return from socket() call by
7583 its equality to -1 not by it being negative.
7584 * remote-utils.c (remote_open): Likewise.
7585
d23b6cb1
PA
75862010-05-23 Pedro Alves <pedro@codesourcery.com>
7587
7588 * config.h: Regenerate.
7589
28d3cf85
MK
75902010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7591
7592 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7593 doesn't provide PTRACE_GET_THREAD_AREA.
7594
fea36a59
MK
75952010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7596
7597 * linux-m68k-low.c: Include <asm/ptrace.h>
7598 (ps_get_thread_area): Implement.
7599
24b066ba
DE
76002010-05-03 Doug Evans <dje@google.com>
7601
7602 * event-loop.c (struct callback_event): New struct.
7603 (callback_list): New global.
7604 (append_callback_event, delete_callback_event): New functions.
7605 (process_callback): New function.
7606 (start_event_loop): Call it.
7607 * remote-utils.c (NOT_SCHEDULED): Define.
7608 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7609 moved out of readchar.
7610 (readchar): Rewrite. Call reschedule before returning.
7611 (reset_readchar): New function.
7612 (remote_close): Call it.
7613 (process_remaining, reschedule): New functions.
7614 * server.h (callback_handler_func): New typedef.
7615 (append_callback_event, delete_callback_event): Declare.
7616
9836d6ea
PA
76172010-05-03 Pedro Alves <pedro@codesourcery.com>
7618
7619 * proc-service.c (ps_pglobal_lookup): Use
7620 thread_db_look_up_one_symbol.
7621 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7622 parameter. Use it instead of all_symbols_looked_up.
7623 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7624 field.
7625 (all_symbols_looked_up): Don't declare.
7626 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7627 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7628 field.
7629 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7630 Set all_symbols_looked_up here.
7631 (thread_db_look_up_one_symbol): New.
7632 (thread_db_get_tls_address): Adjust.
7633 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7634 thread_db object on the heap, and tentatively set it in the
7635 process structure.
7636 (thread_db_init): Don't set all_symbols_looked_up here.
7637 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7638
7984d532
PA
76392010-05-03 Pedro Alves <pedro@codesourcery.com>
7640
7641 * linux-low.c (linux_kill, linux_detach): Adjust.
7642 (status_pending_p_callback): Remove redundant statement. Check
7643 for !TARGET_WAITIKIND_IGNORE, instead of
7644 TARGET_WAITKIND_STOPPED.
7645 (handle_tracepoints): Make sure LWP is locked. Adjust.
7646 (linux_wait_for_event_1): Adjust.
7647 (linux_cancel_breakpoints): New.
7648 (unsuspend_one_lwp): New.
7649 (unsuspend_all_lwps): New.
7650 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7651 (send_sigstop_callback): Change return type to int, add new
7652 `except' parameter and handle it.
7653 (suspend_and_send_sigstop_callback): New.
7654 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7655 pass them down. If SUSPEND, also increment the lwp's suspend
7656 count.
7657 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7658 (need_step_over_p): Don't consider suspended LWPs.
7659 (start_step_over): Adjust.
7660 (proceed_one_lwp): Change return type to int, add new `except'
7661 parameter and handle it.
7662 (unsuspend_and_proceed_one_lwp): New.
7663 (proceed_all_lwps): Use find_inferior instead of
7664 for_each_inferior.
7665 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7666 also decrement the suspend count of LWPs. Pass `except' down,
7667 instead of hacking its suspend count.
7668 (linux_pause_all): Add `freeze' parameter. Adjust.
7669 (linux_unpause_all): New.
7670 (linux_target_ops): Install linux_unpause_all.
7671 * server.c (handle_status): Adjust.
7672 * target.h (struct target_ops): New fields `unpause_all' and
7673 `cancel_breakpoints'. Add new parameter to `pause_all'.
7674 (pause_all): Add new `freeze' parameter.
7675 (unpause_all): New.
7676 (cancel_breakpoints): New.
7677 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7678 cancel breakpoints.
7679 (cmd_qtstart): Pause threads.
7680 (stop_tracing): Pause threads, and cancel breakpoints.
7681 * win32-low.c (win32_target_ops): Adjust.
7682
e471f25b
PA
76832010-05-03 Pedro Alves <pedro@codesourcery.com>
7684
7685 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7686 the inferior right away from here...
7687 (linux_wait_1): ... to here, and adjust to check the thread's
7688 last_resume_kind instead of the lwp's step or stop_expected flags.
7689
1915ef4f
PA
76902010-05-02 Pedro Alves <pedro@codesourcery.com>
7691
7692 * README: Use consistent `GDB' and `GDBserver' spellings.
7693
f9e39928
PA
76942010-05-02 Pedro Alves <pedro@codesourcery.com>
7695
7696 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7697 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7698 (linux_detach_one_lwp): Assume the lwp is stopped.
7699 (any_thread_of): Delete.
7700 (linux_detach): Stop all lwps here. Don't blindly delete all
7701 breakpoints.
7702 (delete_lwp_callback): New.
7703 (linux_mourn): Delete all lwps of the process that is gone.
7704 (linux_wait_1): Don't delete the last lwp of the process here.
7705 * mem-break.h (mark_breakpoints_out): Declare.
7706 * mem-break.c (mark_breakpoints_out): New.
7707 (free_all_breakpoints): Use it.
7708 * server.c (handle_target_event): If the process is gone, mark
7709 breakpoints out.
7710 * thread-db.c (struct thread_db) <create_bp>: New field.
7711 (thread_db_enable_reporting): Fix prototype. Store a thread event
7712 breakpoint reference in the thread_db struct.
7713 (thread_db_load_search): Clear the thread_db object.
7714 (try_thread_db_load_1): Ditto.
7715 (switch_to_process): New.
7716 (disable_thread_event_reporting): Use it.
7717 (remove_thread_event_breakpoints): New.
7718 (thread_db_detach, thread_db_mourn): Use it.
7719
1e7fc18c
PA
77202010-05-01 Pedro Alves <pedro@codesourcery.com>
7721
7722 * linux-low.c (linux_enable_event_reporting): New.
7723 (linux_wait_for_event_1, handle_extended_wait): Use it.
7724
02fc4de7
PA
77252010-04-30 Pedro Alves <pedro@codesourcery.com>
7726
7727 * linux-low.c (linux_kill_one_lwp, linux_kill)
7728 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7729 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7730 SIGSTOP even if the LWP is stopped.
7731 (send_sigstop_callback): New.
7732 (stop_all_lwps): Use send_sigstop_callback instead.
7733 (linux_resume_one_thread): Adjust.
7734 (proceed_one_lwp): Still proceed an LWP that the client has
7735 requested to stop, if we haven't reported it as stopped yet. Make
7736 sure that LWPs the client want stopped, have a pending SIGSTOP.
7737
bc3b5632
DE
77382010-04-26 Doug Evans <dje@google.com>
7739
ae1ada35
DE
7740 * server.c (handle_general_set): Make static.
7741
bc3b5632
DE
7742 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7743 Print received char after testing for error/eof instead of before.
7744 (input_interrupt): Tweak comment.
7745
65730243
DE
77462010-04-23 Doug Evans <dje@google.com>
7747
7748 * server.c (start_inferior): Print inferior argv if --debug.
7749
a8ae7dc0
AR
77502010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7751
7752 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7753 * nto-x86-low.c: Include server.h
7754
1c07cc19
PM
77552010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7756
7757 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7758 be consistent with other sources of this directory.
7759 (init_registers_amd64): Correct name of source file of this function
7760 in the comment.
7761
e0a61e09
PM
77622010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7763
7764 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7765 64-bit executables.
7766
54709339
PM
77672010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7768
7769 * win32-i386-low.c: Add 64-bit support.
7770 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7771 (init_registers_amd64): Declare.
7772 (mappings): Add 64-bit version of array.
7773 (init_windows_x86): New function.
7774 (the_low_target): Change init_arch field to init_windows_x86.
7775
e8f0053d
PM
77762010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7777
7778 * win32-low.c: Adapt to support also 64-bit architecture.
7779 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7780 (get_image_name): Use SIZE_T type for local variable `done'.
7781 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7782 (toolhelp_get_dll_name): Idem.
7783 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7784 Use uintptr_t typecast to avoid warning.
7785 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7786 (handle_exception): Use phex_nz to avoid warning.
7787 (win32_wait): Remove unused local variable `process'.
7788
c481e77e
PM
77892010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7790
7791 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7792 `amd64-avx.o'.
7793
12ea4b69
PM
77942010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7795
7796 * configure.ac: Use `ws2_32' library for srv_mingw.
7797 * configure: Regenerate.
7798 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7799 * remote-utils.c: Likewise.
7800
f6d1620c
L
78012010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7802
7803 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7804 if __x86_64__ is defined.
7805
8e642873
PM
78062010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7807
7808 * configure: Regenerate.
7809
711e434b
PM
78102010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7811
7812 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7813 * target.h (target_ops): New get_tib_address field.
7814 * win32-low.h (win32_thread_info): Add thread_local_base field.
7815 * win32-low.c (child_add_thread): Add tlb argument.
7816 Set thread_local_base field to TLB.
7817 (get_child_debug_event): Adapt to child_add_thread change.
7818 (win32_get_tib_address): New function.
7819 (win32_target_ops): Set get_tib_address field to
7820 win32_get_tib_address.
7821 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7822
505106cd
PA
78232010-04-12 Pedro Alves <pedro@codesourcery.com>
7824
505106cd
PA
7825 * linux-low.c (linux_mourn): Also remove the process.
7826 * server.c (handle_target_event): Don't remove the process here.
7827 * nto-low.c (nto_mourn): New.
7828 (nto_target_ops): Install it.
7829 * spu-low.c (spu_mourn): New.
7830 (spu_target_ops): Install it.
7831 * win32-low.c (win32_mourn): New.
7832 (win32_target_ops): Install it.
7833
e8470a06
PA
78342010-04-12 Pedro Alves <pedro@codesourcery.com>
7835
7836 * server.h (buffer_xml_printf): Remove redundant `;'.
7837
45ba0d02
PA
78382010-04-12 Pedro Alves <pedro@codesourcery.com>
7839
7840 * regcache.c (set_register_cache): Invalidate regcaches before
7841 changing the register cache layout.
7842 (regcache_invalidate_one): Allow a NULL regcache.
7843 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7844 regcaches before changing the register cache layout or the target
7845 regsets.
7846
59e04013
L
78472010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7848
7849 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7850 variable warning on Linux/x86-64.
7851
8336d594
PA
78522010-04-11 Pedro Alves <pedro@codesourcery.com>
7853
7854 GDBserver disconnected tracing support.
7855
7856 * linux-low.c (linux_remove_process): Delete.
7857 (add_lwp): Don't set last_resume_kind here.
7858 (linux_kill): Use `mourn'.
7859 (linux_detach): Use `thread_db_detach', and `mourn'.
7860 (linux_mourn): New.
7861 (linux_attach_lwp_1): Adjust comment.
7862 (linux_attach): last_resume_kind moved the thread_info; adjust.
7863 (status_pending_p_callback): Adjust.
7864 (linux_wait_for_event_1): Adjust.
7865 (count_events_callback, select_singlestep_lwp_callback)
7866 (select_event_lwp_callback, cancel_breakpoints_callback)
7867 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7868 (proceed_one_lwp): Adjust.
7869 (linux_async): Add debug output.
7870 (linux_thread_stopped): New.
7871 (linux_pause_all): New.
7872 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7873 linux_pause_all.
7874 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7875 (thread_db_free): Delete declaration.
7876 (thread_db_detach, thread_db_mourn): Declare.
7877 * thread-db.c (thread_db_init): Use thread_db_mourn.
7878 (thread_db_free): Delete, split in two.
7879 (disable_thread_event_reporting): New.
7880 (thread_db_detach): New.
7881 (thread_db_mourn): New.
7882
7883 * server.h (struct thread_info) <last_resume_kind>: New field.
7884 <attached>: Add comment.
7885 <gdb_detached>: New field.
7886 (handler_func): Change return type to int.
7887 (handle_serial_event, handle_target_event): Ditto.
7888 (gdb_connected): Declare.
7889 (tracing): Delete.
7890 (disconnected_tracing): Declare.
7891 (stop_tracing): Declare.
7892
7893 * server.c (handle_query) <qSupported>: Report support for
7894 disconnected tracing.
7895 (queue_stop_reply_callback): Account for running threads.
7896 (gdb_wants_thread_stopped): New.
7897 (gdb_wants_all_threads_stopped): New.
7898 (gdb_reattached_process): New.
7899 (handle_status): Clear the `gdb_detached' flag of all processes.
7900 In all-stop, stop all threads.
7901 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7902 (process_serial_event): If the remote connection breaks, or if an
7903 exit was forced with "monitor exit", force an event loop exit.
7904 Handle disconnected tracing on detach.
7905 (handle_serial_event): Adjust.
7906 (handle_target_event): If GDB isn't connected, forward events back
7907 to the inferior, unless the last process exited, in which case,
7908 exit gdbserver. Adjust interface.
7909
7910 * remote-utils.c (remote_open): Don't block in accept. Instead
7911 register an event loop source on the listen socket file
7912 descriptor. Refactor bits into ...
7913 (listen_desc): ... this new global.
7914 (gdb_connected): ... this new function.
7915 (enable_async_notification): ... this new function.
7916 (handle_accept_event): ... this new function.
7917 (remote_close): Clear remote_desc.
7918
7919 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7920
7921 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7922 New fields.
7923 (mourn_inferior): Define.
7924 (target_process_qsupported): Avoid the dangling else problem.
7925 (thread_stopped): Define.
7926 (pause_all): Define.
7927 (target_waitstatus_to_string): Declare.
7928 * target.c (target_waitstatus_to_string): New.
7929
7930 * tracepoint.c (tracing): Make extern.
7931 (disconnected_tracing): New.
7932 (stop_tracing): Make extern. Handle tracing stops due to GDB
7933 disconnecting.
7934 (cmd_qtdisconnected): New.
7935 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7936 (handle_tracepoint_general_set): Handle QTDisconnected.
7937
7938 * event-loop.c (event_handler_func): Change return type to int.
7939 (process_event): Bail out if the event handler wants the event
7940 loop to stop.
7941 (handle_file_event): Ditto.
7942 (start_event_loop): Bail out if the event handler wants the event
7943 loop to stop.
7944
7945 * nto-low.c (nto_target_ops): Adjust.
7946 * spu-low.c (spu_wait): Don't remove the process here.
7947 (spu_target_ops): Adjust.
7948 * win32-low.c (win32_wait): Don't remove the process here.
7949 (win32_target_ops): Adjust.
7950
5d267c4c
PA
79512010-04-11 Pedro Alves <pedro@codesourcery.com>
7952
7953 * regcache.c (realloc_register_cache): Invalidate inferior's
7954 regcache before recreating it.
7955
623ccd72
PA
79562010-04-09 Pedro Alves <pedro@codesourcery.com>
7957
7958 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7959
219f2f23
PA
79602010-04-09 Stan Shebs <stan@codesourcery.com>
7961 Pedro Alves <pedro@codesourcery.com>
7962
7963 * server.h (LONGEST): New.
7964 (struct thread_info) <while_stepping>: New field.
7965 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7966 Declare.
7967 (initialize_tracepoint, handle_tracepoint_general_set)
7968 (handle_tracepoint_query, tracepoint_finished_step)
7969 (tracepoint_was_hit, release_while_stepping_state_list):
7970 (current_traceframe): Declare.
7971 * server.c (handle_general_set): Handle tracepoint packets.
7972 (read_memory): New.
7973 (write_memory): New.
7974 (handle_search_memory_1): Use read_memory.
7975 (handle_query): Report support for conditional tracepoints, trace
7976 state variables, and tracepoint sources. Handle tracepoint
7977 queries.
7978 (main): Initialize the tracepoints module.
7979 (process_serial_event): Handle traceframe reads/writes.
7980
7981 * linux-low.c (handle_tracepoints): New.
7982 (linux_wait_1): Call it.
7983 (linux_resume_one_lwp): Handle while-stepping.
7984 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7985 (linux_target_ops): Install them.
7986 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7987 New field.
7988 * linux-x86-low.c (x86_supports_tracepoints): New.
7989 (the_low_target). Install it.
7990
7991 * mem-break.h (delete_breakpoint): Declare.
7992 * mem-break.c (delete_breakpoint): Make external.
7993
7994 * target.h (struct target_ops): Add `supports_tracepoints',
7995 `read_pc', and `write_pc' fields.
7996 (target_supports_tracepoints): Define.
7997 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7998 (phex_nz): New.
7999
8000 * regcache.h (struct regcache) <registers_owned>: New field.
8001 (init_register_cache, regcache_cpy): Declare.
8002 (regcache_read_pc, regcache_write_pc): Declare.
8003 (register_cache_size): Declare.
8004 (supply_regblock): Declare.
8005 * regcache.c (init_register_cache): New.
8006 (new_register_cache): Use it.
8007 (regcache_cpy): New.
8008 (register_cache_size): New.
8009 (supply_regblock): New.
8010 (regcache_read_pc, regcache_write_pc): New.
889bf7c5 8011
219f2f23
PA
8012 * tracepoint.c: New.
8013
8014 * Makefile.in (OBS): Add tracepoint.o.
8015 (tracepoint.o): New rule.
8016
3a13a53b
L
80172010-04-08 H.J. Lu <hongjiu.lu@intel.com>
8018
8019 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
8020 (i386-mmx.o): New.
8021 (i386-mmx.c): Likewise.
8022 (i386-mmx-linux.o): Likewise.
8023 (i386-mmx-linux.c): Likewise.
8024
8025 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
8026 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
8027 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
8028 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
8029
8030 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
8031 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
8032 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
8033
1570b33e
L
80342010-04-07 H.J. Lu <hongjiu.lu@intel.com>
8035
8036 * Makefile.in (clean): Updated.
8037 (i386-avx.o): New.
8038 (i386-avx.c): Likewise.
8039 (i386-avx-linux.o): Likewise.
8040 (i386-avx-linux.c): Likewise.
8041 (amd64-avx.o): Likewise.
8042 (amd64-avx.c): Likewise.
8043 (amd64-avx-linux.o): Likewise.
8044 (amd64-avx-linux.c): Likewise.
8045
8046 * configure.srv (srv_i386_regobj): Add i386-avx.o.
8047 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8048 (srv_amd64_regobj): Add amd64-avx.o.
8049 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8050 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8051 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8052 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8053 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8054 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8055 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8056
8057 * i387-fp.c: Include "i386-xstate.h".
8058 (i387_xsave): New.
8059 (i387_cache_to_xsave): Likewise.
8060 (i387_xsave_to_cache): Likewise.
8061 (x86_xcr0): Likewise.
8062
8063 * i387-fp.h (i387_cache_to_xsave): Likewise.
8064 (i387_xsave_to_cache): Likewise.
8065 (x86_xcr0): Likewise.
8066
8067 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8068 * linux-crisv32-low.c (target_regsets): Likewise.
8069 * linux-m68k-low.c (target_regsets): Likewise.
8070 * linux-mips-low.c (target_regsets): Likewise.
8071 * linux-ppc-low.c (target_regsets): Likewise.
8072 * linux-s390-low.c (target_regsets): Likewise.
8073 * linux-sh-low.c (target_regsets): Likewise.
8074 * linux-sparc-low.c (target_regsets): Likewise.
8075 * linux-xtensa-low.c (target_regsets): Likewise.
8076
8077 * linux-low.c: Include <sys/uio.h>.
8078 (regsets_fetch_inferior_registers): Support nt_type.
8079 (regsets_store_inferior_registers): Likewise.
8080 (linux_process_qsupported): New.
8081 (linux_target_ops): Add linux_process_qsupported.
8082
8083 * linux-low.h (regset_info): Add nt_type.
8084 (linux_target_ops): Add process_qsupported.
8085
8086 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8087 and <sys/uio.h>.
8088 (init_registers_i386_avx_linux): New.
8089 (init_registers_amd64_avx_linux): Likewise.
8090 (xmltarget_i386_linux_no_xml): Likewise.
8091 (xmltarget_amd64_linux_no_xml): Likewise.
8092 (PTRACE_GETREGSET): Likewise.
8093 (PTRACE_SETREGSET): Likewise.
8094 (x86_fill_xstateregset): Likewise.
8095 (x86_store_xstateregset): Likewise.
8096 (use_xml): Likewise.
8097 (x86_linux_update_xmltarget): Likewise.
8098 (x86_linux_process_qsupported): Likewise.
8099 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8100 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8101 init_registers_i386_linux here. Call
8102 x86_linux_update_xmltarget.
8103 (the_low_target): Add x86_linux_process_qsupported.
8104
8105 * server.c (handle_query): Call target_process_qsupported.
8106
8107 * target.h (target_ops): Add process_qsupported.
8108 (target_process_qsupported): New.
8109
fc7238bb
PA
81102010-04-03 Pedro Alves <pedro@codesourcery.com>
8111
8112 * inferiors.c (add_thread): Set last_status kind to
8113 TARGET_WAITKIND_IGNORE.
8114 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8115 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8116 (linux_wait_1): Move `thread' local definition to block that uses
8117 it. Don't NULL initialize `event_child'.
8118 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8119 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8120 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8121
bdabb078
PA
81222010-04-01 Pedro Alves <pedro@codesourcery.com>
8123
8124 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8125 an extended waitstatus, or by a watchpoint.
8126 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8127 thread was stepping or has been stopped by a watchpoint.
8128
d3bbe7a0
PA
81292010-04-01 Pedro Alves <pedro@codesourcery.com>
8130
8131 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8132 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8133 of another, then delete the previous, and validate all
8134 breakpoints.
8135 (validate_inserted_breakpoint): New.
8136 (delete_disabled_breakpoints): New.
8137 (validate_breakpoints): New.
8138 (check_mem_read): Validate breakpoints before trusting their
8139 shadow. Delete disabled breakpoints.
8140 (check_mem_write): Validate breakpoints before trusting they
8141 should be inserted. Delete disabled breakpoints.
8142 * mem-break.h (validate_breakpoints):
8143 * server.c (handle_query): Validate breakpoints when we see a
8144 qSymbol query.
8145
8b07ae33
PA
81462010-04-01 Pedro Alves <pedro@codesourcery.com>
8147
8148 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8149 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8150 if we could tell there's a GDB breakpoint at stop_pc.
8151 (need_step_over_p): Don't do a step over if we find a GDB
8152 breakpoint at the resume PC.
8153
8154 * mem-break.c (struct raw_breakpoint): New.
8155 (enum bkpt_type): New type `gdb_breakpoint'.
8156 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8157 fields. New field `raw'.
8158 (find_raw_breakpoint_at): New.
8159 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8160 breakpoint instead.
8161 (set_breakpoint_at): Adjust.
8162 (delete_raw_breakpoint): New.
8163 (release_breakpoint): New.
8164 (delete_breakpoint): Rename to...
8165 (delete_breakpoint_1): ... this. Add proc parameter. Use
8166 release_breakpoint. Return ENOENT.
8167 (delete_breakpoint): Reimplement.
8168 (find_breakpoint_at): Delete.
8169 (find_gdb_breakpoint_at): New.
8170 (delete_breakpoint_at): Delete.
8171 (set_gdb_breakpoint_at): New.
8172 (delete_gdb_breakpoint_at): New.
8173 (gdb_breakpoint_here): New.
8174 (set_reinsert_breakpoint): Use release_breakpoint.
8175 (uninsert_breakpoint): Rename to ...
8176 (uninsert_raw_breakpoint): ... this.
8177 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8178 (reinsert_raw_breakpoint): Change parameter type to
8179 raw_breakpoint.
8180 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8181 instead.
8182 (check_breakpoints): Adjust. Use release_breakpoint.
8183 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8184 (breakpoint_inserted_here): Ditto.
8185 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8186 Don't trust the breakpoint's shadow if it is not inserted.
8187 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8188 (delete_all_breakpoints): Adjust.
8189 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8190 use delete_breakpoint_1.
8191
8192 * mem-break.h (breakpoints_supported): Delete declaration.
8193 (set_gdb_breakpoint_at): Declare.
8194 (gdb_breakpoint_here): Declare.
8195 (delete_breakpoint_at): Delete.
8196 (delete_gdb_breakpoint_at): Declare.
8197
8198 * server.h (struct raw_breakpoint): Forward declare.
8199 (struct process_info): New field `raw_breakpoints'.
8200
8201 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8202 breakpoints.
8203
6bf5e0ba
PA
82042010-03-24 Pedro Alves <pedro@codesourcery.com>
8205
8206 * linux-low.c (status_pending_p_callback): Fix comment.
8207 (linux_wait_for_event_1): Move most of the internal breakpoint
8208 handling from here...
8209 (linux_wait_1): ... to here.
8210 (count_events_callback): New.
8211 (select_singlestep_lwp_callback): New.
8212 (select_event_lwp_callback): New.
8213 (cancel_breakpoints_callback): New.
8214 (select_event_lwp): New.
8215 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8216 priority to all LWPs that have had events that should be reported
8217 to the client. Cancel breakpoints when about to reporting the
8218 event to the client, not while stopping lwps. No longer cancel
8219 finished single-steps here.
8220 (cancel_finished_single_step): Delete.
8221 (cancel_finished_single_steps): Delete.
8222
414a389f
PA
82232010-03-24 Pedro Alves <pedro@codesourcery.com>
8224
8225 * mem-break.c (enum bkpt_type): New.
8226 (struct breakpoint): New field `type'.
8227 (set_breakpoint_at): Change return type to struct breakpoint
8228 pointer. Set type to `other_breakpoint' by default.
8229 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8230 in the breakpoint list.
8231 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8232 (reinsert_breakpoint): Rename to ...
8233 (reinsert_raw_breakpoint): ... this.
8234 (reinsert_breakpoints_at): Adjust.
8235 * mem-break.h (struct breakpoint): Declare.
8236 (set_breakpoint_at): Change return type to struct breakpoint
8237 pointer.
8238
2280c721
PA
82392010-03-24 Pedro Alves <pedro@codesourcery.com>
8240
8241 * server.c (handle_query): Assign, not compare.
8242
d50171e4
PA
82432010-03-24 Pedro Alves <pedro@codesourcery.com>
8244
8245 Teach linux gdbserver to step-over-breakpoints.
8246
8247 * linux-low.c (can_hardware_single_step): New.
8248 (supports_breakpoints): New.
8249 (handle_extended_wait): If stopping threads, read the stop pc of
8250 the new cloned LWP.
8251 (get_pc): New.
8252 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8253 low target doesn't support retrieving the PC.
8254 (add_lwp): Set last_resume_kind to resume_continue.
8255 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8256 (linux_attach): Don't clear stop_expected. Set the lwp's
8257 last_resume_kind to resume_stop.
8258 (linux_detach_one_lwp): Don't check for removed breakpoints.
8259 (check_removed_breakpoint): Delete.
8260 (status_pending_p): Rename to ...
8261 (status_pending_p_callback): ... this. Don't check for removed
8262 breakpoints. Don't consider threads that are stopped from GDB's
8263 perspective.
8264 (linux_wait_for_lwp): Always read the stop_pc here.
8265 (cancel_breakpoint): New.
8266 (step_over_bkpt): New global.
8267 (linux_wait_for_event_1): Implement stepping over breakpoints.
8268 (gdb_wants_lwp_stopped): New.
8269 (gdb_wants_all_stopped): New.
8270 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8271 single-step traps here. Store the thread's last reported target
8272 wait status.
8273 (send_sigstop): Don't clear stop_expected. Always set it,
8274 instead.
8275 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8276 (cancel_finished_single_step): New.
8277 (cancel_finished_single_steps): New.
8278 (wait_for_sigstop): Don't cancel finished single-step traps here.
8279 (linux_resume_one_lwp): Don't check for removed breakpoints.
8280 Don't set `step' on non-hardware step archs.
8281 (linux_set_resume_request): Ignore resume_stop requests if already
8282 stopping or stopped. Set the lwp's last_resume_kind.
8283 (resume_status_pending_p): Don't check for removed breakpoints.
8284 (need_step_over_p): New.
8285 (start_step_over): New.
8286 (finish_step_over): New.
8287 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8288 requests. Clear the thread's last reported target waitstatus.
8289 Don't use the `suspended' flag. Don't consider pending breakpoints.
8290 (linux_resume): Start a step-over if necessary.
8291 (proceed_one_lwp): New.
8292 (proceed_all_lwps): New.
8293 (unstop_all_lwps): New.
8294 * linux-low.h (struct lwp_info): Rewrite comment for the
8295 `suspended' flag. Add the `stop_pc' field. Delete the
8296 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8297 Add `'last_resume_kind' and `need_step_over' fields.
8298 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8299 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8300 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8301 (set_raw_breakpoint_at): New.
8302 (set_breakpoint_at): Rewrite to use it.
8303 (reinsert_breakpoint_handler): Delete.
8304 (set_reinsert_breakpoint): New.
8305 (reinsert_breakpoint_by_bp): Delete.
8306 (delete_reinsert_breakpoints): New.
8307 (uninsert_breakpoint): Rewrite.
8308 (uninsert_breakpoints_at): New.
8309 (reinsert_breakpoint): Rewrite.
8310 (reinsert_breakpoints_at): New.
8311 (check_breakpoints): Rewrite.
8312 (breakpoint_here): New.
8313 (breakpoint_inserted_here): New.
8314 (check_mem_read): Adjust.
8315 * mem-break.h (breakpoints_supported, breakpoint_here)
8316 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8317 (reinsert_breakpoint_by_bp): Delete declaration.
8318 (delete_reinsert_breakpoints): Declare.
8319 (reinsert_breakpoint): Delete declaration.
8320 (reinsert_breakpoints_at): Declare.
8321 (uninsert_breakpoint): Delete declaration.
8322 (uninsert_breakpoints_at): Declare.
8323 (check_breakpoints): Adjust prototype.
8324 * server.h: Adjust include order.
8325 (struct thread_info): Declare here. Add a `last_status' field.
8326
30ba68cb
MS
83272010-03-23 Michael Snyder <msnyder@vmware.com>
8328
8329 * server.c (crc32): New function.
8330 (handle_query): Add handling for 'qCRC:' request.
8331
b9a881c2
PA
83322010-03-23 Pedro Alves <pedro@codesourcery.com>
8333
8334 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8335 lwp had been stopped by a watchpoint.
8336
e92d13d5
PA
83372010-03-16 Pedro Alves <pedro@codesourcery.com>
8338
8339 * server.h (internal_error): Declare.
8340 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8341 * utils.c (internal_error): New function.
8342
64daa791
AS
83432010-03-15 Andreas Schwab <schwab@redhat.com>
8344
8345 * configure.srv: Fix typo setting srv_regobj.
8346
f52cd8cd
PA
83472010-03-15 Pedro Alves <pedro@codesourcery.com>
8348
8349 * linux-low.c (fetch_register): Avoid passing a non string literal
8350 format to `error'.
8351 (usr_store_inferior_registers): Ditto.
8352
93ae6fdc
PA
83532010-03-14 Pedro Alves <pedro@codesourcery.com>
8354
8355 * linux-low.c (linux_write_memory): Bail out early if peeking
8356 memory failed.
8357
c3adc08c
PA
83582010-03-14 Pedro Alves <pedro@codesourcery.com>
8359
8360 * linux-low.h (struct lwp_info): New fields
8361 `stopped_by_watchpoint' and `stopped_data_address'.
8362 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8363 here, and cache them in the lwp object.
8364 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8365 directly.
8366 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8367 field.
8368 (linux_stopped_by_watchpoint): Rewrite.
8369 (linux_stopped_data_address): Rewrite.
8370
bce522a2
PA
83712010-03-06 Simo Melenius <simo.melenius@iki.fi>
8372
8373 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8374 switching the current inferior, not before.
8375
90884b2b
L
83762010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8377
8378 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8379 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8380 i386-linux.c and amd64-linux.c.
8381 (reg-i386.o): Removed.
8382 (reg-i386.c): Likewise.
8383 (reg-i386-linux.o): Likewise.
8384 (reg-i386-linux.c): Likewise.
8385 (reg-x86-64.o): Likewise.
8386 (reg-x86-64.c): Likewise.
8387 (reg-x86-64-linux.o): Likewise.
8388 (reg-x86-64-linux.c): Likewise.
8389 (i386.o): New.
8390 (i386.c): Likewise.
8391 (i386-linux.o): Likewise.
8392 (i386-linux.c): Likewise.
8393 (amd64.o): Likewise.
8394 (amd64.c): Likewise.
8395 (amd64-linux.o): Likewise.
8396 (amd64-linux.c): Likewise.
8397
8398 * configure.srv (srv_i386_regobj): New.
8399 (srv_i386_linux_regobj): Likewise.
8400 (srv_amd64_regobj): Likewise.
8401 (srv_amd64_linux_regobj): Likewise.
8402 (srv_i386_32bit_xmlfiles): Likewise.
8403 (srv_i386_64bit_xmlfiles): Likewise.
8404 (srv_i386_xmlfiles): Likewise.
8405 (srv_amd64_xmlfiles): Likewise.
8406 (srv_i386_linux_xmlfiles): Likewise.
8407 (srv_amd64_linux_xmlfiles): Likewise.
8408 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8409 srv_xmlfiles to $srv_i386_xmlfiles.
8410 (i[34567]86-*-mingw32ce*): Likewise.
8411 (i[34567]86-*-mingw*): Likewise.
8412 (i[34567]86-*-nto*): Likewise.
8413 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8414 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8415 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8416 (x86_64-*-linux*): Likewise.
8417
8418 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8419 (init_registers_amd64_linux): New.
8420 (x86_arch_setup): Replace init_registers_x86_64_linux with
8421 init_registers_amd64_linux.
8422
193f13e6
MK
84232010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8424
8425 * configure.ac: Check for libdl. If it is not available link against
8426 static libthread_db.
8427 * configure: Regenerate.
8428
85d721b8
PA
84292010-02-22 Pedro Alves <pedro@codesourcery.com>
8430
8431 PR9605
8432
8433 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8434 handing a read watchpoint.
8435 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8436
6076632b
DE
84372010-02-12 Doug Evans <dje@google.com>
8438
8439 * linux-low.c (linux_supports_tracefork_flag): Document.
8440 (linux_look_up_symbols): Add comment.
8441
3327ccf7
L
84422010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8443
8444 * regcache.c (supply_register): Clear regcache if buf is NULL.
8445
0718675c 84462010-02-02 Nicolas Roche <roche@sourceware.org>
3327ccf7 8447 Joel Brobecker <brobecker@adacore.com>
0718675c
JB
8448
8449 * inferiors.c (find_inferior): Add function documentation.
8450 (unloaded_dll): Handle the case where the unloaded dll has not
8451 been previously registered in the dll list.
8452
177321bd
DJ
84532010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8454
8455 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8456 (thumb2_breakpoint): New.
8457 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8458
2b009048
DJ
84592010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8460
8461 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8462 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8463 breakpoints.
8464
3be029c7
PA
84652010-01-21 Pedro Alves <pedro@codesourcery.com>
8466
8467 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8468
18f5de3b
JK
84692010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8470
8471 * linux-s390-low.c (s390_collect_ptrace_register)
8472 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8473
3743bb4f
DE
84742010-01-21 Doug Evans <dje@google.com>
8475
14ce3065
DE
8476 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8477 (PTRACE_ARG4_TYPE): New macro.
8478 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8479 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8480 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8481 (usr_store_inferior_registers): Ditto.
8482 (linux_read_memory, linux_write_memory): Ditto.
8483 (linux_test_for_tracefork): Ditto.
8484
3743bb4f
DE
8485 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8486 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8487
8b315be5
PA
84882010-01-21 Pedro Alves <pedro@codesourcery.com>
8489
8490 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8491 target.
8492
85492558
PA
84932010-01-21 Pedro Alves <pedro@codesourcery.com>
8494
8495 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8496 prototype to take a regcache. Adjust.
8497
442ea881
PA
84982010-01-20 Pedro Alves <pedro@codesourcery.com>
8499
8500 * regcache.h (struct thread_info): Forward declare.
8501 (struct regcache): New.
8502 (new_register_cache): Adjust prototype.
8503 (get_thread_regcache): Declare.
8504 (free_register_cache): Adjust prototype.
8505 (registers_to_string, registers_from_string): Ditto.
8506 (supply_register, supply_register_by_name, collect_register)
8507 (collect_register_as_string, collect_register_by_name): Ditto.
8508 * regcache.c (struct inferior_regcache_data): Delete.
8509 (get_regcache): Rename to ...
8510 (get_thread_regcache): ... this. Adjust. Switch inferior before
8511 fetching registers.
8512 (regcache_invalidate_one): Adjust.
8513 (regcache_invalidate): Fix prototype.
8514 (new_register_cache): Return the new register cache.
8515 (free_register_cache): Change prototype.
8516 (realloc_register_cache): Adjust.
8517 (registers_to_string): Change prototype to take a regcache. Adjust.
8518 (registers_from_string): Ditto.
8519 (register_data): Ditto.
8520 (supply_register): Ditto.
8521 (supply_register_by_name): Ditto.
8522 (collect_register): Ditto.
8523 (collect_register_as_string): Ditto.
8524 (collect_register_by_name): Ditto.
8525 * server.c (process_serial_event): Adjust.
8526 * linux-low.h (regset_fill_func, regset_store_func): Change
8527 prototype.
8528 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8529 Change prototype.
8530 * linux-low.c (get_stop_pc): Adjust.
8531 (check_removed_breakpoint): Adjust.
8532 (linux_wait_for_event): Adjust.
8533 (linux_resume_one_lwp): Adjust.
8534 (fetch_register): Add regcache parameter. Adjust.
8535 (usr_store_inferior_registers): Ditto.
8536 (regsets_fetch_inferior_registers): Ditto.
8537 (regsets_store_inferior_registers): Ditto.
8538 (linux_fetch_registers, linux_store_registers): Ditto.
8539 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8540 regcache. Adjust.
43aaf8b6
PA
8541 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8542 Ditto.
442ea881
PA
8543 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8544 prototype to take a regcache.
8545 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8546 * remote-utils.c (convert_ascii_to_int, outreg)
8547 (prepare_resume_reply): Change prototype to take a regcache.
8548 Adjust.
8549 * target.h (struct target_ops) <fetch_registers, store_registers>:
8550 Change prototype to take a regcache.
8551 (fetch_inferior_registers, store_inferior_registers): Change
8552 prototype to take a regcache. Adjust.
8553 * proc-service.c (ps_lgetregs): Adjust.
8554 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8555 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8556 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8557 take a regcache. Adjust.
8558 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8559 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8560 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8561 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8562 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8563 (cris_cannot_fetch_register):
8564 (cris_breakpoint_at): Change prototype to take a regcache.
8565 Adjust.
8566 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8567 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8568 to take a regcache. Adjust.
8569 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8570 Adjust.
8571 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8572 take a regcache. Adjust.
8573 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8574 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8575 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8576 * linux-mips-low.c (mips_get_pc):
8577 (mips_set_pc): Change prototype to take a regcache. Adjust.
8578 (mips_reinsert_addr): Adjust.
8579 (mips_collect_register): Change prototype to take a regcache.
8580 Adjust.
8581 (mips_supply_register):
8582 (mips_collect_register_32bit, mips_supply_register_32bit)
8583 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8584 (mips_store_fpregset): Ditto.
43aaf8b6
PA
8585 * linux-ppc-low.c (ppc_supply_ptrace_register)
8586 (ppc_supply_ptrace_register): Ditto.
442ea881
PA
8587 (parse_spufs_run): Adjust.
8588 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8589 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8590 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8591 take a regcache. Adjust.
8592 * linux-s390-low.c (s390_collect_ptrace_register)
8593 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8594 (s390_set_pc): Change prototype to take a regcache. Adjust.
8595 (s390_arch_setup): Adjust.
8596 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8597 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8598 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8599 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8600 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8601 regcache. Adjust.
8602 (sparc_breakpoint_at): Adjust.
8603 * linux-xtensa-low.c (xtensa_fill_gregset):
8604 (xtensa_store_gregset):
8605 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8606 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8607 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8608 prototype to take a regcache. Adjust.
8609 * win32-arm-low.c (arm_fetch_inferior_register)
8610 (arm_store_inferior_register): Change prototype to take a
8611 regcache. Adjust.
8612 * win32-i386-low.c (i386_fetch_inferior_register)
8613 (i386_store_inferior_register): Change prototype to take a
8614 regcache. Adjust.
8615 * win32-low.c (child_fetch_inferior_registers)
8616 (child_store_inferior_registers): Change prototype to take a
8617 regcache. Adjust.
8618 (win32_wait): Adjust.
8619 (win32_fetch_inferior_registers): Change prototype to take a
8620 regcache. Adjust.
8621 (win32_store_inferior_registers): Adjust.
8622 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8623 store_inferior_register>: Change prototype to take a regcache.
8624
60c3d7b0
DE
86252010-01-20 Doug Evans <dje@google.com>
8626
8627 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8628 #ifdef.
8629 (linux_wait_for_event1, linux_init_signals): Ditto.
ec8ebe72 8630 (W_STOPCODE): Provide definition if missing.
60c3d7b0 8631
dc146f7c
VP
86322010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8633
8634 * linux-low.c (linux_core_of_thread): New.
8635 (compare_ints, show_process, list_threads): New.
8636 (linux_qxfer_osdata): Report threads and cores.
8637 (linux_target_op): Register linux_core_of_thread.
8638 * remote-utils.c (prepare_resume_reply): Report the core.
8639 (buffer_xml_printf): Support %d specifier.
8640 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8641 New.
8642 (handle_query): Handle qXfer:threads. Announce availability
8643 thereof.
8644 * target.h (struct target_ops): New field core_of_thread.
8645
7803799a
UW
86462010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8647
8648 * Makefile.in (clean): Remove new generated files.
8649 (reg-s390.o, reg-s390.c): Remove rules.
8650 (reg-s390x.o, reg-s390x.c): Likewise.
8651 (s390-linux32.o, s390-linux32.c): Add rules.
8652 (s390-linux64.o, s390-linux64.c): Likewise.
8653 (s390x-linux64.o, s390x-linux64.c): Likewise.
8654 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8655 * linux-s390-low.c: Include <elf.h>.
8656 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8657 (init_registers_s390): Remove prototype.
8658 (init_registers_s390x): Likewise.
8659 (init_registers_s390_linux32): Add prototype.
8660 (init_registers_s390_linux64): Likewise.
8661 (init_registers_s390x_linux64): Likewise.
8662 (s390_num_regs_3264): New define.
8663 (s390_regmap_3264): New global variable.
8664 (s390_cannot_fetch_register): Remove obsolete check.
8665 (s390_cannot_store_register): Likewise.
8666 (s390_collect_ptrace_register): Handle upper/lower register halves.
8667 (s390_supply_ptrace_register): Likewise.
8668 (s390_fill_gregset): Update to register number changes.
8669 (s390_get_hwcap): New routine.
8670 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8671 Install appropriate regmap and register set.
8672
6e7ffa39
JB
86732010-01-01 Joel Brobecker <brobecker@adacore.com>
8674
8675 * server.c (gdbserver_version): Update copyright year to 2010.
8676 * gdbreplay.c (gdbreplay_version): Likewise.
8677
957f3f49
DE
86782009-12-28 Doug Evans <dje@google.com>
8679
8680 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8681 elf/external.h. Include <elf.h> instead but only if necessary.
8682
ca5c370d
PA
86832009-12-28 Pedro Alves <pedro@codesourcery.com>
8684
8685 * linux-low.c (linux_remove_process): Remove `detaching'
8686 parameter. Don't release/detach from thread_db here.
8687 (linux_kill): Release/detach from thread_db here, ...
8688 (linux_detach): ... and here, before actually detaching.
8689 (linux_wait_1): ... and here, when a process exits.
8690 * thread-db.c (any_thread_of): New.
8691 (thread_db_free): Switch the current inferior to a thread of the
8692 passed in process.
8693
4ee62156
DE
86942009-12-21 Doug Evans <dje@google.com>
8695
d90e6a88
DE
8696 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8697
c5f62d5f
DE
8698 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8699 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8700 warning ifndef __NR_tkill. Move setting of errno there too.
8701 Delete unnecessary resetting of errno after syscall.
8702 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8703
10e86dd7
DE
8704 * configure.ac: Check for dladdr.
8705 * config.in: Regenerate.
8706 * configure: Regenerate.
8707 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8708 (try_thread_db_load): Update.
8709
4ee62156
DE
8710 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8711
00f515da
DE
87122009-12-18 Doug Evans <dje@google.com>
8713
e9464885
DE
8714 * event-loop.c: Include unistd.h if it exists.
8715
07d4f67e
DE
8716 * linux-low.c (my_waitpid): Move definition away from being in
8717 between linux_tracefork_child/linux_test_for_tracefork.
8718
00f515da
DE
8719 * gdb_proc_service.h (psaddr_t): Fix type.
8720 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8721 signature to match glibc.
8722
1de1badb
DE
87232009-12-16 Doug Evans <dje@google.com>
8724
8725 * linux-low.c (linux_read_memory): Fix argument to read.
8726
aeeb81d1
PA
87272009-11-26 Pedro Alves <pedro@codesourcery.com>
8728
8729 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8730 events, don't leave current_inferior pointing at null.
8731
10357975
PA
87322009-11-26 Pedro Alves <pedro@codesourcery.com>
8733
8734 * win32-low.c (LOG): Delete.
8735 (OUTMSG): Output to stderr.
8736 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8737 on compile time LOG macro.
8738 (win32_wait): Fix debug output.
8739
cf6e3471
PA
87402009-11-26 Pedro Alves <pedro@codesourcery.com>
8741
8742 * win32-low.c (win32_add_one_solib): If the dll name is
8743 "ntdll.dll", prepend the system directory to the dll path.
8744
0c85e18e
MK
87452009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8746
8747 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8748
9ac544ce 87492009-11-17 Nathan Sidwell <nathan@codesourcery.com>
889bf7c5 8750 Vladimir Prus <vladimir@codesourcery.com>
9ac544ce
MK
8751
8752 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8753 * configure.ac: Check for __mcoldfire__ and set
8754 gdb_cv_m68k_is_coldfire.
8755 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8756 reg-cf.o and reg-m68k.o.
8757 * configure: Regenerated.
8758
fd7dd3e6
PA
87592009-11-16 Pedro Alves <pedro@codesourcery.com>
8760
8761 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8762 Pass it to thread_db_free.
8763 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8764 proper `detaching' argument to linux_remove_process.
8765 * linux-low.h (thread_db_free): Add `detaching' parameter.
8766 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8767 to thread_db_free.
8768 (thread_db_free): Add `detaching' parameter. Only
8769 call td_ta_clear_event if detaching from process.
8770
75aa492e
MK
87712009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8772
8773 * thread-db.c (thread_db_free): Fix typo.
8774
21e1bee4
PP
87752009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8776
8777 PR gdb/10838
8778 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8779
8838b45e
NS
87802009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8781
8782 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8783 with an i686 compiler.
8784 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8785 needed.
8786 * configure: Rebuilt.
8787
8a35fb51
SL
87882009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8789
8790 PR gdb/10783
8791
8792 * server.c (handle_search_memory_1): Correct read_addr initialization
8793 in loop for searching subsequent chunks.
8794
96f15937
PP
87952009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8796
8797 * configure.ac: New --with-libthread-db option.
8798 * thread-db.c: Allow direct dependence on libthread_db.
8799 (thread_db_free): Adjust.
8800 * config.in: Regenerate.
8801 * configure: Likewise.
889bf7c5 8802
5f7d1694
PP
88032009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8804
8805 PR gdb/10757
8806 * thread-db.c (attach_thread): New function.
8807 (maybe_attach_thread): Return success/failure.
8808 (find_new_threads_callback): Adjust.
889bf7c5
PA
8809 (thread_db_find_new_threads): Loop until no new threads.
8810
88e3b899
PA
88112009-10-13 Pedro Alves <pedro@codesourcery.com>
8812
8813 * proc-service.c (ps_lgetregs): Formatting.
8814
cdbfd419
PP
88152009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8816
8817 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8818 * configure.ac: Adjust.
8819 * linux-low.h (struct process_info_private): Move members to struct
8820 thread_db.
8821 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8822 * linux-low.c (linux_remove_process): Adjust.
8823 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8824 * server.c (handle_query): Move code ...
8825 (handle_monitor_command): ... here. New function.
8826 * target.h (struct target_ops): New member.
8827 * thread-db.c (struct thread_db): New.
8828 (libthread_db_search_path): New variable.
8829 (thread_db_create_event, thread_db_enable_reporting)
8830 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8831 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8832 (try_thread_db_load_1, dladdr_to_soname): New functions.
8833 (try_thread_db_load, thread_db_load_search): New functions.
8834 (thread_db_init): Search for libthread_db.
8835 (thread_db_free): New function.
8836 (thread_db_handle_monitor_command): Likewise.
8837 * config.in: Regenerate.
8838 * configure: Regenerate.
889bf7c5 8839
4168d2d6
UW
88402009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8841
8842 * spu-low.c (spu_kill): Wait for inferior to terminate.
8843 Call clear_inferiors.
8844 (spu_detach): Call clear_inferiors.
8845
81ecdfbb
RW
88462009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8847
8848 * aclocal.m4: Regenerate.
8849 * config.in: Likewise.
8850 * configure: Likewise.
8851
0b9ff2c0
UW
88522009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8853
8854 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8855 (parse_spufs_run): New function.
8856 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8857 (ppc_breakpoint_at): Handle SPU breakpoints.
8858
efcbbd14
UW
88592009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8860
8861 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8862 (SPUFS_MAGIC): Define.
8863 (spu_enumerate_spu_ids): New function.
8864 (linux_qxfer_spu): New function.
8865 (linux_target_ops): Install linux_qxfer_spu.
8866
f4d9bade
UW
88672009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8868
8869 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8870 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8871 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8872 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8873 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8874 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8875 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8876 (init_registers_powerpc_cell32l): Add prototype.
8877 (init_registers_powerpc_cell64l): Likewise.
8878 (ppc_arch_setup): Detect Cell/B.E. architecture.
8879
96e946ca
RW
88802009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8881
8882 * Makefile.in (datarootdir): New variable.
8883
58d6951d
DJ
88842009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8885
8886 * linux-low.c (linux_write_memory): Update debugging output.
8887 * Makefile.in (clean): Add new descriptions.
8888 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8889 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8890 * configure.srv: Add new files for arm*-*-linux*.
8891 * linux-arm-low.c: Add new declarations.
8892 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8893 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8894 (HWCAP_VFPv3D16): New.
8895 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8896 instead of __IWMMXT__.
8897 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8898 (arm_arch_setup): New.
8899 (target_regsets): Remove #ifdef. Add VFP regset.
8900 (the_low_target): Use arm_arch_setup.
8901
12b42a12
DJ
89022009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8903
8904 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8905 the main thread again.
8906
ac8c974e
AR
89072009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8908
8909 Adding Neutrino gdbserver.
8910 * configure: Regenerated.
8911 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8912 * configure.srv (i[34567]86-*-nto*): New target.
8913 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8914 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8915 (nto_comctrl) [__QNX__]: New function.
8916 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8917
4424e0c3 89182009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
7437790a
PA
8919
8920 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8921 srv_tgtobj.
8922
912cf4ba
PA
89232009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8924 Pedro Alves <pedro@codesourcery.com>
8925
8926 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8927 don't support CONTEXT_EXTENDED_REGISTERS.
8928 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8929 (the_low_target): Install them.
8930 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8931 failing with ERROR_PIPE_NOT_CONNECTED.
8932
aa5ca48f
DE
89332009-06-30 Doug Evans <dje@google.com>
8934 Pierre Muller <muller@ics.u-strasbg.fr>
8935
8936 Add h/w watchpoint support to x86-linux, win32-i386.
8937 * Makefile.in (SFILES): Add i386-low.c
8938 (i386_low_h): Define.
8939 (i386-low.o): Add dependencies.
8940 (linux-x86-low.o): Add i386-low.h dependency.
8941 (win32-i386-low.o): Ditto.
8942 * i386-low.c: New file.
8943 * i386-low.h: New file.
8944 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8945 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8946 * linux-low.c (linux_add_process): Initialize arch_private.
8947 (linux_remove_process): Free arch_private.
8948 (add_lwp): Initialize arch_private.
8949 (delete_lwp): Free arch_private.
8950 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8951 provided.
8952 * linux-low.h (process_info_private): New member arch_private.
8953 (lwp_info): New member arch_private.
8954 (linux_target_ops): New members new_process, new_thread,
8955 prepare_to_resume.
8956 (ptid_of): New macro.
8957 * linux-x86-low.c: Include stddef.h, i386-low.h.
8958 (arch_process_info): New struct.
8959 (arch_lwp_info): New struct.
8960 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8961 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8962 (i386_dr_low_get_status): New function.
8963 (x86_insert_point, x86_remove_point): New functions.
8964 (x86_stopped_by_watchpoint): New function.
8965 (x86_stopped_data_address): New function.
8966 (x86_linux_new_process, x86_linux_new_thread): New functions.
8967 (x86_linux_prepare_to_resume): New function.
8968 (the_low_target): Add entries for insert_point, remove_point,
8969 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8970 prepare_to_resume.
8971 * server.c (debug_hw_points): New global.
8972 (monitor_show_help): Document set debug-hw-points.
8973 (handle_query): Process "set debug-hw-points".
8974 * server.h (debug_hw_points): Declare.
8975 (paddress): Declare.
8976 * utils.c (NUMCELLS, CELLSIZE): New macros.
8977 (get_sell, xsnprintf, paddress): New functions.
8978 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8979 remove_point, stopped_by_watchpoint, stopped_data_address.
8980 * win32-i386-low.c: Include i386-low.h.
8981 (debug_reg_state): Replaces dr.
8982 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8983 (i386_dr_low_get_status): New function.
8984 (i386_insert_point, i386_remove_point): New functions.
8985 (i386_stopped_by_watchpoint): New function.
8986 (i386_stopped_data_address): New function.
8987 (i386_initial_stuff): Update.
8988 (get_thread_context,set_thread_context,i386_thread_added): Update.
8989 (the_low_target): Add entries for insert_point,
8990 remove_point, stopped_by_watchpoint, stopped_data_address.
8991 * win32-low.c (win32_insert_watchpoint): New function.
8992 (win32_remove_watchpoint): New function.
8993 (win32_stopped_by_watchpoint): New function.
8994 (win32_stopped_data_address): New function.
8995 (win32_target_ops): Add entries for insert_watchpoint,
8996 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8997 * win32-low.h (win32_target_ops): New members insert_point,
8998 remove_point, stopped_by_watchpoint, stopped_data_address.
8999
d993e290
PA
90002009-06-25 Pedro Alves <pedro@codesourcery.com>
9001
9002 * server.c (process_serial_event): Re-return unsupported, not
9003 error, if the type isn't recognized. Re-allow supporting only
9004 insert or remove packets. Also call require_running for
9005 breakpoints. Add missing break statement to default case. Tidy.
9006 * target.h (struct target_ops): Rename insert_watchpoint to
9007 insert_point, and remove_watchpoint to remove_point.
9008
9009 * linux-low.h (struct linux_target_ops): Likewise.
9010 * linux-low.c (linux_insert_watchpoint): Rename to ...
9011 (linux_insert_point): ... this. Adjust.
9012 (linux_remove_watchpoint): Rename to ...
9013 (linux_remove_point): ... this. Adjust.
9014 (linux_target_ops): Adjust.
9015 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
9016 (cris_insert_point): ... this.
9017 (cris_remove_watchpoint): Rename to ...
9018 (cris_remove_point): ... this.
9019 (the_low_target): Adjust.
9020
0f54c268
PM
90212009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
9022
9023 * server.c (handle_v_kill): Pass signal_pid to
9024 kill_inferior if multi_process is zero.
9025
c6314022
AR
90262009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
9027
9028 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
9029 * target.h (target_ops): Comment for *_watchpoint to make it clear
9030 the functions can get types '0' and '1'.
9031
4463ce24
AR
90322009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
9033
9034 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
9035 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
9036 * regcache.c (get_regcache): Likewise.
9037 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
9038 * win32-low.c (child_fetch_inferior_registers): Remove check for
9039 regno 0.
9040
cf8fd78b
PA
90412009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
9042 Pedro Alves <pedro@codesourcery.com>
9043
9044 * target.h (struct target_ops) <supports_multi_process>: New
9045 callback.
9046 (target_supports_multi_process): New.
9047 * server.c (handle_query): Even if GDB reports support, only
9048 enable multi-process if the target also supports it. Report
9049 multi-process support only if the target backend supports it.
9050 * linux-low.c (linux_supports_multi_process): New function.
9051 (linux_target_ops): Install it as target_supports_multi_process
9052 callback.
9053
47c0c975
DE
90542009-05-24 Doug Evans <dje@google.com>
9055
e09875d4
DE
9056 Global renaming of find_thread_pid to find_thread_ptid.
9057 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9058 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9059 All callers updated.
9060
e27d73f6
DE
9061 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9062 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9063 directly.
9064
47c0c975
DE
9065 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9066 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9067 (linux_resume_one_lwp): Ditto.
9068
2acc282a
DE
90692009-05-23 Doug Evans <dje@google.com>
9070
9071 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9072 from struct inferior_list_entry * to struct lwp_info *.
9073 All callers updated.
9074
9f1036c1
DE
90752009-05-13 Doug Evans <dje@google.com>
9076
9077 * linux-x86-low.c: Don't include assert.h.
9078 (x86_siginfo_fixup): Use fatal, not assert.
9079 (x86_arch_setup): Fix comment.
9080
d0722149
DE
90812009-05-12 Doug Evans <dje@google.com>
9082
9083 Biarch support for i386/amd64 gdbserver.
9084 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9085 Add linux-x86-low.c.
9086 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9087 (linux-x86-low.o): Add.
9088 * linux-x86-64-low.c: Delete.
9089 * linux-i386-low.c: Delete.
9090 * linux-x86-low.c: New file.
9091 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9092 linux-x86-low.o.
9093 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9094 linux-x86-low.o.
9095 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9096 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9097 (linux_child_pid_to_exec_file): New function.
9098 (elf_64_header_p, elf_64_file_p): New functions.
9099 (siginfo_fixup): New function.
9100 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9101 give target a chance to convert layout.
9102 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9103 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9104
fdeb2a12
DE
91052009-05-07 Doug Evans <dje@google.com>
9106
9107 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9108 (regsets_store_inferior_registers): Ditto.
9109
a6dbe5df
PA
91102009-05-06 Pedro Alves <pedro@codesourcery.com>
9111
9112 PR server/10048
9113
9114 * linux-low.c (must_set_ptrace_flags): Delete.
9115 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9116 of the global.
9117 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9118 `lwp->must_set_ptrace_flags' instead.
ba42693b 9119 (linux_wait_for_event_1): Set ptrace options here.
a6dbe5df
PA
9120 (linux_wait_1): ... not here.
9121
5091eb23
DE
91222009-04-30 Doug Evans <dje@google.com>
9123
9f767825
DE
9124 * inferiors.c (started_inferior_callback): New function.
9125 (attached_inferior_callback): New function.
9126 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9127 * server.c (print_started_pid, print_attached_pid): New functions.
9128 (detach_or_kill_for_exit): New function.
9129 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9130 * server.h (have_started_inferiors_p): Declare.
9131 (have_attached_inferiors_p): Declare.
9132
5091eb23
DE
9133 * inferiors.c (remove_process): Fix memory leak, free process.
9134 * linux-low.c (linux_remove_process): New function.
9135 (linux_kill): Call it instead of remove_process.
9136 (linux_detach, linux_wait_1): Ditto.
9137
155c8968
PA
91382009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9139
9140 * configure.srv: Add x86 Windows CE target.
9141
7fe519cb
UW
91422009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9143
9144 * inferiors.c (get_thread_process): Make global.
9145 * server.h (get_thread_process): Add prototype.
9146 * thread-db.c (find_one_thread): Use get_thread_process
9147 instead of current_process.
9148 (thread_db_get_tls_address): Do not crash if called when
9149 thread layer is not yet initialized.
9150
5472f405
UW
91512009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9152
9153 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9154 * spu-low.c (current_tid): Rename to ...
9155 (current_ptid): ... this.
9156 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9157 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9158 ptid_get_lwp (current_ptid) instead of current_tid.
9159 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9160 instead of current_tid. Use find_process_pid to verify pid
9161 argument is valid. Pass proper argument to remove_process.
9162 (spu_thread_alive): Compare current_ptid instead of current_tid.
9163 (spu_resume): Likewise.
9164
55ac2b99
PA
91652009-04-02 Pedro Alves <pedro@codesourcery.com>
9166
9167 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9168 variable.
9169
95954743
PA
91702009-04-01 Pedro Alves <pedro@codesourcery.com>
9171
9172 Implement the multiprocess extensions, and add linux multiprocess
9173 support.
9174
9175 * server.h (ULONGEST): Declare.
9176 (struct ptid, ptid_t): New.
9177 (minus_one_ptid, null_ptid): Declare.
9178 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9179 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9180 (struct inferior_list_entry): Change `id' type from unsigned from
9181 to ptid_t.
9182 (struct sym_cache, struct breakpoint, struct
9183 process_info_private): Forward declare.
9184 (struct process_info): Declare.
9185 (current_process): Declare.
9186 (all_processes): Declare.
9187 (initialize_inferiors): Declare.
9188 (add_thread): Adjust to use ptid_t.
9189 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9190 (add_process, remove_process, find_thread_pid): Declare.
9191 (find_inferior_id): Adjust to use ptid_t.
9192 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9193 (multi_process): Declare.
9194 (push_event): Adjust to use ptid_t.
9195 (read_ptid, write_ptid): Declare.
9196 (prepare_resume_reply): Adjust to use ptid_t.
9197 (clear_symbol_cache): Declare.
9198 * inferiors.c (all_processes): New.
9199 (null_ptid, minus_one_ptid): New.
9200 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9201 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9202 (add_thread): Change unsigned long to ptid. Remove gdb_id
9203 parameter. Adjust.
9204 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9205 (gdb_id_to_thread): Rename to ...
9206 (find_thread_pid): ... this. Change unsigned long to ptid.
9207 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9208 (loaded_dll, pull_pid_from_list): Adjust.
9209 (add_process, remove_process, find_process_pid)
9210 (get_thread_process, current_process, initialize_inferiors): New.
9211 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9212 (struct target_waitstatus) <related_pid>: Ditto.
9213 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9214 return type to int.
9215 (struct target_ops) <join>: Add `pid' argument.
9216 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9217 (struct target_ops) <wait>: Add `ptid' field. Change return type
9218 to ptid.
9219 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9220 (mywait): Add `ptid' argument. Change return type to ptid_t.
9221 (target_pid_to_str): Declare.
9222 * target.c (set_desired_inferior): Adjust to use ptids.
9223 (mywait): Add new `ptid' argument. Adjust.
9224 (target_pid_to_str): New.
9225 * mem-break.h (free_all_breakpoints): Declare.
9226 * mem-break.c (breakpoints): Delelete.
9227 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9228 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9229 to use per-process breakpoint list.
9230 (free_all_breakpoints): New.
9231 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9232 (symbol_cache, all_symbols_looked_up): Delete.
9233 (hexchars): New.
9234 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9235 read_ptid): New.
9236 (prepare_resume_reply): Change ptid argument's type from unsigned
9237 long to ptid_t. Adjust. Implement W;process and X;process.
9238 (free_sym_cache, clear_symbol_cache): New.
9239 (look_up_one_symbol): Adjust to per-process symbol cache. *
9240 * server.c (cont_thread, general_thread, step_thread): Change type
9241 to ptid_t.
9242 (attached): Delete.
9243 (multi_process): New.
9244 (last_ptid): Change type to ptid_t.
9245 (struct vstop_notif) <ptid>: Change type to ptid_t.
9246 (queue_stop_reply, push_event): Change `ptid' argument's type to
9247 ptid_t.
9248 (discard_queued_stop_replies): Add `pid' argument.
9249 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9250 changes. Don't reference the `attached' global.
9251 (attach_inferior): Adjust to mywait interface changes.
9252 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9253 features. Handle and report "multiprocess+". Handle
9254 "qAttached:PID".
9255 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9256 changes.
9257 (handle_v_kill): New.
9258 (handle_v_stopped): Adjust to use target_pid_to_str.
9259 (handle_v_requests): Allow multiple attaches and runs when
9260 multiprocess extensions are in effect. Handle "vKill".
9261 (myresume): Adjust to use ptids.
9262 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9263 (handle_status): Adjust to discard_queued_stop_replies interface
9264 change.
9265 (first_thread_of, kill_inferior_callback)
9266 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9267 (main): Call initialize_inferiors. Adjust to use ptids, killing
9268 and detaching from all inferiors. Handle multiprocess packet
9269 variants.
9270 * linux-low.h: Include gdb_proc_service.h.
9271 (struct process_info_private): New.
9272 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9273 <lwpid_of>: Use ptid_get_lwp.
9274 (get_lwp_thread): Adjust.
9275 (struct lwp_info): Add `dead' member.
9276 (find_lwp_pid): Declare.
9277 * linux-low.c (thread_db_active): Delete.
9278 (new_inferior): Adjust comment.
9279 (inferior_pid): Delete.
9280 (linux_add_process): New.
9281 (handle_extended_wait): Adjust.
9282 (add_lwp): Change unsigned long to ptid.
9283 (linux_create_inferior): Add process to processes table. Adjust
9284 to use ptids. Don't set new_inferior here.
9285 (linux_attach_lwp): Rename to ...
9286 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9287 it. Adjust to use ptids.
9288 (linux_attach_lwp): New.
9289 (linux_attach): Add process to processes table. Don't set
9290 new_inferior here.
9291 (struct counter): New.
9292 (second_thread_of_pid_p, last_thread_of_process_p): New.
9293 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9294 multiple processes.
9295 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9296 processes. Remove process from process table.
9297 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9298 to multiple processes.
9299 (any_thread_of): New.
9300 (linux_detach): Add `pid' argument, and handle it. Remove process
9301 from processes table.
9302 (linux_join): Add `pid' argument. Handle it.
9303 (linux_thread_alive): Change unsighed long argument to ptid_t.
9304 Consider dead lwps as not being alive.
9305 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9306 threads we're not interested in.
9307 (same_lwp, find_lwp_pid): New.
9308 (linux_wait_for_lwp): Change `pid' argument's type from int to
9309 ptid_t. Adjust.
9310 (linux_wait_for_event): Rename to ...
9311 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9312 from int to ptid_t. Adjust.
9313 (linux_wait_for_event): New.
9314 (linux_wait_1): Add `ptid' argument. Change return type to
9315 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9316 that exit from the process table.
9317 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9318 Adjust.
9319 (mark_lwp_dead): New.
9320 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9321 stopping all threads, mark its main lwp as dead.
9322 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9323 ptids.
9324 (fetch_register, usr_store_inferior_registers)
9325 (regsets_fetch_inferior_registers)
9326 (regsets_store_inferior_registers, linux_read_memory)
9327 (linux_write_memory): Inline `inferior_pid'.
9328 (linux_look_up_symbols): Adjust to use per-process
9329 `thread_db_active'.
9330 (linux_request_interrupt): Adjust to use ptids.
9331 (linux_read_auxv): Inline `inferior_pid'.
9332 (initialize_low): Don't reference thread_db_active.
9333 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9334 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9335 (ps_getpid): Return the pid of the current inferior.
9336 * thread-db.c (proc_handle, thread_agent): Delete.
9337 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9338 per-process data.
9339 (find_one_thread): Change argument type to ptid_t. Adjust to
9340 per-process data.
9341 (maybe_attach_thread): Adjust to per-process data and ptids.
9342 (thread_db_find_new_threads): Ditto.
9343 (thread_db_init): Ditto.
9344 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9345 processes table. Adjust to use ptids.
9346 (spu_kill, spu_detach): Adjust interface. Remove process from
9347 processes table.
9348 (spu_join, spu_thread_alive): Adjust interface.
9349 (spu_wait): Adjust interface. Remove process from processes
9350 table. Adjust to use ptids.
9351 * win32-low.c (current_inferior_tid): Delete.
9352 (current_inferior_ptid): New.
9353 (debug_event_ptid): New.
9354 (thread_rec): Take a ptid. Adjust.
9355 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9356 (child_delete_thread): Ditto.
9357 (do_initial_child_stuff): Add `attached' argument. Add process to
9358 processes table.
9359 (child_fetch_inferior_registers, child_store_inferior_registers):
9360 Adjust.
9361 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9362 (win32_attach): Pass 1 to do_initial_child_stuff.
9363 (win32_kill): Adjust interface. Remove process from processes
9364 table.
9365 (win32_detach): Ditto.
9366 (win32_join): Adjust interface.
9367 (win32_thread_alive): Take a ptid.
9368 (win32_resume): Adjust to use ptids.
9369 (get_child_debug_event): Ditto.
9370 (win32_wait): Adjust interface. Remove exiting process from
9371 processes table.
9372
bd99dc85
PA
93732009-04-01 Pedro Alves <pedro@codesourcery.com>
9374
9375 Non-stop mode support.
9376
9377 * server.h (non_stop): Declare.
9378 (gdb_client_data, handler_func): Declare.
9379 (delete_file_handler, add_file_handler, start_event_loop):
9380 Declare.
9381 (handle_serial_event, handle_target_event, push_event)
9382 (putpkt_notif): Declare.
9383 * target.h (enum resume_kind): New.
9384 (struct thread_resume): Replace `step' field by `kind' field.
9385 (TARGET_WNOHANG): Define.
9386 (struct target_ops) <wait>: Add `options' argument.
9387 <supports_non_stop, async, start_non_stop>: New fields.
9388 (target_supports_non_stop, target_async): New.
9389 (start_non_stop): Declare.
9390 (mywait): Add `options' argument.
9391 * target.c (mywait): Add `options' argument. Print child exit
9392 notifications here.
9393 (start_non_stop): New.
9394 * server.c (non_stop, own_buf, mem_buf): New globals.
9395 (struct vstop_notif): New.
9396 (notif_queue): New global.
9397 (queue_stop_reply, push_event, discard_queued_stop_replies)
9398 (send_next_stop_reply): New.
9399 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9400 interface changes.
9401 (attach_inferior): In non-stop mode, don't wait for the target
9402 here.
9403 (handle_general_set): Handle QNonStop.
9404 (handle_query): When handling qC, return the current general
9405 thread, instead of the first thread of the list.
9406 (handle_query): If the backend supports non-stop mode, include
9407 QNonStop+ in the qSupported query response.
9408 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9409 and non-stop mode.
9410 (handle_v_attach, handle_v_run): Handle non-stop mode.
9411 (handle_v_stopped): New.
9412 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9413 (myresume): Adjust to use resume_kind. Handle non-stop.
9414 (queue_stop_reply_callback): New.
9415 (handle_status): Handle non-stop mode.
9416 (main): Clear non_stop flag on reconnection. Use the event-loop.
9417 Refactor serial protocol handling from here ...
9418 (process_serial_event): ... to this new function. When GDB
9419 selects any thread, select one here. In non-stop mode, wait until
9420 GDB acks all pending events before exiting.
9421 (handle_serial_event, handle_target_event): New.
9422 * remote-utils.c (remote_open): Install remote_desc in the event
9423 loop.
9424 (remote_close): Remove remote_desc from the event loop.
9425 (putpkt_binary): Rename to...
9426 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9427 (putpkt_binary): New as wrapper around putpkt_binary_1.
9428 (putpkt_notif): New.
9429 (prepare_resume_reply): In non-stop mode, don't change the
9430 general_thread.
9431 * event-loop.c: New.
9432 * Makefile.in (OBJ): Add event-loop.o.
9433 (event-loop.o): New rule.
9434
9435 * linux-low.h (pid_of): Moved here.
9436 (lwpid_of): New.
9437 (get_lwp_thread): Use lwpid_of.
9438 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9439 * linux-low.c (pid_of): Delete.
9440 (inferior_pid): Use lwpid_of.
9441 (linux_event_pipe): New.
9442 (target_is_async_p): New.
9443 (delete_lwp): New.
9444 (handle_extended_wait): Use lwpid_of.
9445 (add_lwp): Don't set lwpid field.
9446 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9447 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9448 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9449 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9450 first. Adjust to linux_wait_for_event interface changes. Use
9451 lwpid_of.
9452 (linux_detach): Don't delete the main lwp here.
9453 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9454 (status_pending_p): Don't consider explicitly suspended lwps.
9455 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9456 pointer. Add OPTIONS argument. Change return type to int. Use
9457 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9458 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9459 pointer. Add status pointer argument. Return a pid instead of a
9460 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9461 changes. In non-stop mode, don't switch to a random thread.
9462 (linux_wait): Rename to...
9463 (linux_wait_1): ... this. Add target_options argument, and handle
9464 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9465 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9466 clean exit and signal exit code. Don't stop all threads in
9467 non-stop mode. In all-stop mode, only stop all threads when
9468 reporting a stop to GDB. Handle explicit thread stop requests.
9469 (async_file_flush, async_file_mark): New.
9470 (linux_wait): New.
9471 (send_sigstop): Use lwpid_of.
9472 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9473 interface changes. In non-stop mode, don't switch to a random
9474 thread.
9475 (linux_resume_one_lwp): Use lwpid_of.
9476 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9477 (linux_resume_one_thread): ... this. Handle resume_stop. In
9478 non-stop mode, don't look for pending flag in all threads.
9479 (resume_status_pending_p): Don't consider explicitly suspended
9480 threads.
9481 (my_waitpid): Reimplement. Emulate __WALL.
9482 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9483 Use lwpid_of.
9484 (sigchld_handler, linux_supports_non_stop, linux_async)
9485 (linux_start_non_stop): New.
9486 (linux_target_ops): Register linux_supports_non_stop, linux_async
9487 and linux_start_non_stop.
9488 (initialize_low): Install SIGCHLD handler.
9489 * thread-db.c (thread_db_create_event, find_one_thread)
9490 (thread_db_get_tls_address): Use lwpid_of.
9491 * win32-low.c (win32_detach): Adjust to use resume_kind.
9492 (win32_wait): Add `options' argument.
9493 * spu-low.c (spu_resume): Adjust to use resume_kind.
9494 (spu_wait): Add `options' argument.
9495
5b1c542e
PA
94962009-04-01 Pedro Alves <pedro@codesourcery.com>
9497
9498 Decouple target code from remote protocol.
9499
9500 * target.h (enum target_waitkind): New.
9501 (struct target_waitstatus): New.
9502 (struct target_ops) <wait>: Return an unsigned long. Take a
9503 target_waitstatus pointer instead of a char pointer.
9504 (mywait): Likewise.
9505 * target.c (mywait): Change prototype to return an unsigned long.
9506 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9507 * server.h (thread_from_wait, old_thread_from_wait): Delete
9508 declarations.
9509 (prepare_resume_reply): Change prototype to take a
9510 target_waitstatus.
9511 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9512 (last_status, last_ptid): New.
9513 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9514 pid instead of a signal.
9515 (attach_inferior): Remove "status" and "signal" parameters.
9516 Adjust.
9517 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9518 not as an address.
9519 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9520 (handle_v_requests, myresume): Remove "status" and "signal"
9521 parameters. Adjust.
9522 (handle_status): New.
9523 (main): Delete local `status'. Adjust.
9524 * remote-utils.c: Include target.h.
9525 (prepare_resume_reply): Change prototype to take a
9526 target_waitstatus. Adjust.
9527
9528 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9529 interface.
9530 * spu-low.c (spu_wait): Adjust.
9531 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9532 Delete.
9533 (win32_wait): Adjust.
9534
2bd7c093
PA
95352009-04-01 Pedro Alves <pedro@codesourcery.com>
9536
9537 * target.h (struct thread_resume): Delete leave_stopped member.
9538 (struct target_ops): Add a `n' argument to the `resume' callback.
9539 * server.c (start_inferior): Adjust.
9540 (handle_v_cont, myresume): Adjust.
9541 * linux-low.c (check_removed_breakpoint): Adjust to resume
9542 interface change, and to removed leave_stopped field.
9543 (resume_ptr): Delete.
9544 (struct thread_resume_array): New.
9545 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9546 resume interface change.
9547 (linux_continue_one_thread, linux_queue_one_thread)
9548 (resume_status_pending_p): Check if the resume field is NULL
9549 instead of checking the leave_stopped member.
9550 (linux_resume): Adjust to the target resume interface change.
9551 * spu-low.c (spu_resume): Adjust to the target resume interface
9552 change.
9553 * win32-low.c (win32_detach, win32_resume): Ditto.
9554
c35fafde
PA
95552009-04-01 Pedro Alves <pedro@codesourcery.com>
9556
9557 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9558 flag.
9559 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9560 pending.
9561 (linux_continue_one_thread): Only preserve the stepping flag if
9562 there's a pending breakpoint.
9563
0a59d50b
PA
95642009-03-31 Pedro Alves <pedro@codesourcery.com>
9565
9566 * server.c (main): After the inferior having exited, call
9567 remote_close before exiting gdbserver.
9568
f04c6d38
TJB
95692009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9570
9571 Fix size of FPSCR in Power 7 processors.
9572 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9573 (PPC_FEATURE_HAS_DFP): New #define.
9574 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9575 size of the FPSCR.
9576
78e5cee6
PA
95772009-03-23 Pedro Alves <pedro@codesourcery.com>
9578
9579 * server.c (handle_query) Whitespace and formatting.
9580
1b3f6016
PA
95812009-03-22 Pedro Alves <pedro@codesourcery.com>
9582
9583 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9584 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9585 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9586 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9587 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9588 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9589 Makefile.in, configure.ac: Fix whitespace throughout.
9590 * configure: Regenerate.
9591
a07b2135
PA
95922009-03-22 Pedro Alves <pedro@codesourcery.com>
9593
9594 * inferiors.c (find_inferior): Make it safe for the callback
9595 function to delete the currently iterated inferior.
9596
67cc2626
PA
95972009-03-22 Pedro Alves <pedro@codesourcery.com>
9598
9599 * Makefile.in (linuw_low_h): Move higher.
9600 (thread-db.o): Depend on $(linux_low_h).
9601
54a0b537
PA
96022009-03-17 Pedro Alves <pedro@codesourcery.com>
9603
9604 Rename "process" to "lwp" throughout.
9605
9606 * linux-low.c (all_processes): Rename to...
9607 (all_lwps): ... this.
9608 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9609 (add_process): Rename to ...
9610 (add_lwp): ... this. Adjust.
9611 (linux_create_inferior): Adjust.
9612 (linux_attach_lwp): Adjust.
9613 (linux_attach): Adjust.
9614 (linux_kill_one_process): Rename to ...
9615 (linux_kill_one_lwp): ... this. Adjust.
9616 (linux_kill): Adjust.
9617 (linux_detach_one_process): Rename to ...
9618 (linux_detach_one_lwp): ... this. Adjust.
9619 (linux_detach): Adjust.
9620 (check_removed_breakpoint): Adjust.
9621 (status_pending_p): Adjust.
9622 (linux_wait_for_process): Rename to ...
9623 (linux_wait_for_lwp): ... this. Adjust.
9624 (linux_wait_for_event): Adjust.
9625 (send_sigstop): Adjust.
9626 (wait_for_sigstop): Adjust.
9627 (stop_all_processes): Rename to ...
9628 (stop_all_lwps): ... this.
9629 (linux_resume_one_process): Rename to ...
9630 (linux_resume_one_lwp): ... this. Adjust.
9631 (linux_set_resume_request, linux_continue_one_thread)
9632 (linux_queue_one_thread, resume_status_pending_p)
9633 (usr_store_inferior_registers, regsets_store_inferior_registers)
9634 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9635 Adjust.
9636 * linux-low.h (get_process): Rename to ...
9637 (get_lwp): ... this. Adjust.
9638 (get_thread_process): Rename to ...
9639 (get_thread_lwp): ... this. Adjust.
9640 (get_process_thread): Rename to ...
9641 (get_lwp_thread): ... this. Adjust.
9642 (struct process_info): Rename to ...
9643 (struct lwp_info): ... this.
9644 (all_processes): Rename to ...
9645 (all_lwps): ... this.
9646 * proc-service.c (ps_lgetregs): Adjust.
9647 * thread-db.c (thread_db_create_event, find_one_thread)
9648 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9649
0b16c5cf
PA
96502009-03-14 Pedro Alves <pedro@codesourcery.com>
9651
9652 * server.c (handle_query): Handle "qAttached".
9653
32de4b9d
NS
96542009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9655
9656 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9657 GPLv3, update license URL.
9658
2aecd87f
DE
96592009-03-01 Doug Evans <dje@google.com>
9660
93efd302 9661 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
2aecd87f
DE
9662 (server_h): Add gdb_signals.h.
9663 (signals.o): Update.
9664 * server.h (target_signal_from_host,target_signal_to_host_p)
9665 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9666
86b1f9c5
PM
96672009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9668
9669 * remote-utils.c (getpkt): Also generate remote-debug
9670 information if noack_mode is set.
9671
4aa995e1
PA
96722009-02-06 Pedro Alves <pedro@codesourcery.com>
9673
9674 * server.c (handle_query): Report qXfer:siginfo:read and
9675 qXfer:siginfo:write as supported and handle them.
9676 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9677 * linux-low.c (linux_xfer_siginfo): New.
9678 (linux_target_ops): Set it.
9679
62709adf
PA
96802009-01-26 Pedro Alves <pedro@codesourcery.com>
9681
9682 * server.c (gdbserver_usage): Mention --remote-debug.
9683 (main): Accept '--remote-debug' switch.
9684
aef93bd7
DE
96852009-01-18 Doug Evans <dje@google.com>
9686
9687 * regcache.c (new_register_cache): No need to check result of xcalloc.
9688 * server.c (handle_search_memory): Back out calls to xmalloc,
9689 result is checked and error is returned to user upon failure.
9690 (handle_query): Ditto. Add more checks for result of malloc.
9691 (handle_v_cont): Check result of malloc, report error back to
9692 user upon failure.
9693 (handle_v_run): Ditto. Call freeargv.
9694 * server.h (freeargv): Declare.
9695 * utils.c (freeargv): New fn.
9696
54363045
DE
96972009-01-15 Doug Evans <dje@google.com>
9698
f626972c
DE
9699 * gdbreplay.c (perror_with_name): Make arg const char *.
9700 * server.h (target_signal_to_name): Make return type const char *.
0842e787 9701 * thread-db.c (thread_db_err_str): Make return type const char *.
f626972c 9702 * utils.c (perror_with_name): Make arg const char *.
54363045 9703
18aae699
PA
97042009-01-14 Pedro Alves <pedro@codesourcery.com>
9705
9706 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9707 when handling a EXIT_PROCESS_DEBUG_EVENT.
9708
ff703abe
JB
97092009-01-06 Joel Brobecker <brobecker@adacore.com>
9710
9711 * gdbreplay.c (gdbreplay_version): Update copyright year.
9712 * server.c (gdbserver_version): Likewise.
9713
f21cc1a2 97142009-01-05 Doug Evans <dje@google.com>
0e21c1ec
DE
9715
9716 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
f21cc1a2 9717 (handle_extended_wait): Improve comment.
0e21c1ec 9718
bca929d3
DE
97192008-12-13 Doug Evans <dje@google.com>
9720
9721 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9722 * server.h (ATTR_MALLOC): New macro.
9723 (xmalloc,xcalloc,xstrdup): Declare.
9724 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9725 * inferiors.c: Ditto.
9726 * linux-low.c: Ditto.
9727 * mem-break.c: Ditto.
9728 * regcache.c: Ditto.
9729 * remote-utils.c: Ditto.
9730 * server.c: Ditto.
9731 * target.c: Ditto.
9732 * win32-low.c: Ditto.
9733
97438e3f
DE
97342008-12-12 Doug Evans <dje@google.com>
9735
896c7fbb
DE
9736 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9737 in debugging printf.
9738
97438e3f
DE
9739 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9740
e3b886f8
DE
97412008-12-09 Doug Evans <dje@google.com>
9742
9743 * linux-low.h (struct process_info): Delete member tid, unused.
9744 * thread-db.c (find_one_thread): Update.
9745 (maybe_attach_thread): Update.
9746
07e059b5
VP
97472008-12-02 Pedro Alves <pedro@codesourcery.com>
9748
889bf7c5
PA
9749 * target.h (struct target_ops): Add qxfer_osdata member.
9750 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9751 and dirent.h.
9752 (linux_qxfer_osdata): New functions.
9753 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9754 callback.
9755 * server.c (handle_query): Handle "qXfer:osdata:read:".
9756 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9757 (buffer_xml_printf): New functions.
9758 * server.h (struct buffer): New.
9759 (buffer_grow_str, buffer_grow_str0): New macros.
9760 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9761 (buffer_xml_printf): Declare.
07e059b5 9762
4cab47ab
DE
97632008-11-24 Doug Evans <dje@google.com>
9764
9765 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9766
f142445f
DJ
97672008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9768
9769 * server.c (handle_v_run): Always use the supplied argument list.
9770
d0107bb6 97712008-11-19 Bob Wilson <bob.wilson@acm.org>
889bf7c5 9772
d0107bb6
BW
9773 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9774 (xtensa_regmap_table): Add entry for scompare1.
889bf7c5 9775
2c4ad781
TJB
97762008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9777
9778 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9779 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9780 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9781 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9782 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9783 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9784 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9785 XML target descriptions.
9786 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9787 when inferior is running on an ISA 2.05 or later processor. Add
9788 special case to return offset for full 64-bit slot of FPSCR when
9789 in 32-bits.
9790
dfb64f85
DJ
97912008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9792
9793 * Makefile.in (SFILES, clean): Added sparc64 files.
9794 (reg-sparc64.o, reg-sparc64.c): New.
9795 * configure.srv (sparc*-*-linux*): New configuration.
9796 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9797 syscall arguments for SPARC.
9798 (regsets_store_inferior_registers): Likewise.
9799 * linux-sparc-low.c: New file.
9800
66b6e1dd
DE
98012008-10-21 Doug Evans <dje@google.com>
9802
9803 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9804 (READLINE_DIR,READLINE_DEP): Delete.
9805 (INTERNAL_CFLAGS): Update.
9806 (LINTFLAGS): Update.
9807
9b710a42
PA
98082008-10-10 Pedro Alves <pedro@codesourcery.com>
9809
9810 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9811 whole argv from the last run, not just argv[0].
9812
5822d809
PA
98132008-09-08 Pedro Alves <pedro@codesourcery.com>
9814
9815 * regcache.c (new_register_cache): Return NULL if the register
9816 cache size isn't known yet.
9817 (free_register_cache): Avoid dereferencing a NULL regcache.
9818
74aac56f
DJ
98192008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9820
9821 * configure.srv: Merge MIPS and MIPS64.
9822
400b20f5
MR
98232008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9824
9825 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9826
677c5bb1
LM
98272008-08-18 Luis Machado <luisgpm@br.ibm.com>
9828
9829 * Makefile.in: Add required vsx dependencies.
9830
9831 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9832 Declare init_registers_powerpc_vsx32l.
9833 Declare init_registers_powerpc_vsx64l.
9834 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9835 (ppc_arch_setup): Check for VSX in hwcap.
9836 (ppc_fill_vsxregset): New function.
9837 (ppc_store_vsxregset): New function.
9838 Add new VSX entry in regset_info target_regsets.
9839
9840 * configure.srv: Add new VSX dependencies.
9841
a6f3e723
SL
98422008-08-12 Pedro Alves <pedro@codesourcery.com>
9843
9844 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9845 (remote_open): Set or clear transport_is_reliable.
9846 (putpkt_binary): Don't expect acks in noack mode.
9847 (getpkt): Don't send ack/nac in noack mode.
9848 * server.c (handle_general_set): Handle QStartNoAckMode.
9849 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9850 qSupported.
9851 (main): Reset noack_mode on every connection.
9852 * server.h (noack_mode): Declare.
9853
a417dc56
RW
98542008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9855
9856 * Makefile.in (GDBREPLAY_OBS): New variable.
9857 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9858
3221518c
UW
98592008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9860 Daniel Jacobowitz <dan@codesourcery.com>
9861
9862 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9863 (usr_store_inferior_registers): Likewise.
9864 (regsets_store_inferior_registers): Likewise.
9865
ec56be1b
PA
98662008-07-31 Rolf Jansen <rj@surtec.com>
9867 Pedro Alves <pedro@codesourcery.com>
9868
9869 * configure.ac: Check for memmem declaration.
9870 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9871 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9872 (disable_packet_qfThreadInfo): Unconditionally compile.
9873 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9874 * configure, config.in: Regenerate.
9875
2fe5e3ff
DE
98762008-07-28 Doug Kwan <dougkwan@google.com>
9877
9878 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9879 (linux_write_memory): Remove declaration of errno.
9880
836acd6d
UW
98812008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9882
9883 * linux-low.c (handle_extended_wait): Do not use "status"
9884 variable uninitialized.
9885
aeba519e
PA
98862008-07-07 Pedro Alves <pedro@codesourcery.com>
9887
9888 * server.c (handle_v_attach): Inhibit reporting dll changes.
9889
db42f210
PA
98902008-06-27 Pedro Alves <pedro@codesourcery.com>
9891
9892 * remote-utils.c (prepare_resume_reply): If requested, don't
9893 output "thread:TID" in the T stop reply.
9894
9895 * server.c (disable_packet_vCont, disable_packet_Tthread)
9896 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9897 (handle_query): If requested, disable support for qC, qfThreadInfo
9898 and qsThreadInfo.
9899 (handle_v_requests): If requested, disable support for vCont.
9900 (gdbserver_show_disableable): New.
9901 (main): Handle --disable-packet and --disable-packet=LIST.
9902
9903 * server.h (disable_packet_vCont, disable_packet_Tthread)
9904 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9905
8e4c5421
CD
99062008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9907
9908 * server.c (gdbserver_usage): Mention --version.
9909
6e23a804
DJ
99102008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9911
9912 * Makefile.in (gdbreplay.o): New rule.
9913
90aa6a40
JM
99142008-06-06 Joseph Myers <joseph@codesourcery.com>
9915
9916 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9917 message, not gdbserver.
9918
c16158bc 99192008-06-05 Vladimir Prus <vladimir@codesourcery.com>
889bf7c5
PA
9920 Nathan Sidwell <nathan@codesourcery.com>
9921 Joseph Myers <joseph@codesourcery.com>
c16158bc
JM
9922
9923 * acinclude.m4: Include ../../config/acx.m4.
9924 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9925 * configure, config.in: Regenerate.
9926 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9927 * server.c (gdbserver_version): Print PKGVERSION.
9928 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9929 (main): Adjust gdbserver_usage calls.
9930 * gdbreplay.c (version, host_name): Add declarations.
9931 (gdbreplay_version, gdbreplay_usage): New.
9932 (main): Accept --version and --help options.
9933
aeb75bf5
DJ
99342008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9935
9936 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9937 (arm_breakpoint_at): Handle Thumb.
9938 (the_low_target): Add comment.
9939
76b233dd
UW
99402008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9941
9942 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9943
08388c79
DE
99442008-05-09 Doug Evans <dje@google.com>
9945
a3c83fae
DE
9946 * server.h (decode_search_memory_packet): Declare.
9947 * remote-utils.c (decode_search_memory_packet): New fn.
9948 * server.c (handle_search_memory_1): New fn.
08388c79
DE
9949 (handle_search_memory): New fn.
9950 (handle_query): Process qSearch:memory packets.
9951
bb9c3d36
UW
99522008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9953
9954 * regcache.c (registers_length): Remove.
9955 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9956 full register packet.
9957 * regcache.h (registers_length): Remove prototype.
9958 * server.h (PBUFSIZ): Define to 16384.
9959
7284e1be
UW
99602008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9961
9962 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9963 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9964 powerpc-64l.o, and powerpc-altivec64l.o.
9965 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9966 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9967 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9968 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9969 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9970 to srv_xmlfiles.
9971
9972 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9973 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9974 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9975 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9976 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9977 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9978 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9979 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9980 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9981 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9982 (clean): Update.
9983
9984 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9985 (init_registers_powerpc_32l): ... this new prototype.
9986 (init_registers_powerpc_32): Remove, replace by ...
9987 (init_registers_powerpc_altivec32l): ... this new prototype.
9988 (init_registers_powerpc_e500): Remove, replace by ...
9989 (init_registers_powerpc_e500l): ... this new prototype.
9990 (init_registers_ppc64): Remove, replace by ...
9991 (init_registers_powerpc_64l): ... this new prototype.
9992 (init_registers_powerpc_64): Remove, replace by ...
9993 (init_registers_powerpc_altivec64l): ... this new prototype.
9994 (ppc_num_regs): Set to 73.
9995 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9996 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9997 (ppc_cannot_store_register): Handle orig_r3 and trap.
9998 (ppc_arch_setup): Update init_registers_... calls.
9999 (ppc_fill_gregset): Handle orig_r3 and trap.
10000
10001 * inferiors.c (clear_inferiors): Reset current_inferior.
10002
fdc59709
PB
100032008-04-23 Paolo Bonzini <bonzini@gnu.org>
10004
889bf7c5
PA
10005 * acinclude.m4: Add override.m4.
10006 * configure: Regenerate.
fdc59709 10007
c9b2f845
UW
100082008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10009
10010 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
10011 initial call to init_register_ppc64.
10012
550512b8
UW
100132008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
10014
43aaf8b6
PA
10015 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
10016 single powerpc*-*-linux* case.
550512b8
UW
10017 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
10018
b6430ec3
UW
100192008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
10020
10021 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
889bf7c5 10022 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
b6430ec3
UW
10023 from reg_xmlfiles.
10024 * linux-ppc-low.c: Include <elf.h>.
10025 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
10026 (ppc_hwcap): New global variable.
10027 (ppc_regmap): Remove __SPE__ #ifdef sections.
10028 (ppc_regmap_e500): New global variable.
10029 (ppc_cannot_store_register): Update __SPE__ special case.
10030 (ppc_get_hwcap): New function.
10031 (ppc_arch_setup): Use it to determine whether inferior supports
10032 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
10033 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
10034 Do not access registers if target does not support AltiVec.
10035 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
10036 Do not access registers if target does not support SPE.
10037 (target_regsets): Unconditionally include AltiVec and SPE regsets.
10038
52fa2412
UW
100392008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
10040
10041 * linux-low.c (disabled_regsets, num_regsets): New.
10042 (use_regsets_p): Delete.
10043 (linux_wait_for_process): Clear disabled_regsets.
10044 (regsets_fetch_inferior_registers): Check and set it.
10045 (regsets_store_inferior_registers): Likewise.
10046 (linux_fetch_registers, linux_store_registers): Do not use
10047 use_regsets_p.
10048 (initialize_low): Allocate disabled_regsets.
10049
e28b3332
DJ
100502008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10051
10052 * Makefile.in (LIBOBJS): New.
10053 (OBS): Use LIBOBJS.
10054 (memmem.o): New rule.
10055 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10056 * configure: Regenerated.
10057
4536995d
UW
100582008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10059
10060 * server.c (handle_query): Never return "unsupported" for
10061 qXfer:features:read queries.
10062
221c031f
UW
100632008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10064
10065 * server.c (get_features_xml): Fix inverted condition.
10066 (handle_query): Always support qXfer:feature:read.
10067
ccd213ac
DJ
100682008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10069
10070 * server.c (wrapper_argv): New.
10071 (start_inferior): Handle wrapper_argv. If set, expect an extra
10072 trap.
10073 (gdbserver_usage): Document --wrapper.
10074 (main): Parse --wrapper.
10075
6fe305f7
UW
100762008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10077
10078 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10079 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10080 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10081 (ppc_set_pc): Likewise.
10082 (ppc_arch_setup): New function.
10083 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10084 of collect_register.
889bf7c5 10085 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
6fe305f7 10086
5b0a002e
UW
100872008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10088
10089 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10090 instead of linux-ppc64-low.o.
10091 * linux-ppc64-low.c: Remove file.
10092 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10093 (linux-ppc64-low.o): Remove rule.
10094
10095 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10096 (init_registers_powerpc_64): Likewise.
10097 (ppc_regmap): Conditionally define depending on __powerpc64__.
10098 (ppc_cannot_store_register): Do not special-case "fpscr" when
10099 compiled on __powerpc64__.
10100 (ppc_collect_ptrace_register): New function.
10101 (ppc_supply_ptrace_register): New function.
10102 (ppc_breakpoint): Change type to "unsigned int".
10103 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10104 (the_low_target): Conditionally provide initializers for the
889bf7c5 10105 arch_setup member depending on __powerpc64__. Install
5b0a002e
UW
10106 collect_ptrace_register and supply_ptrace_register members.
10107
9b4b61c8
UW
101082008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10109
10110 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10111 * server.c (gdbserver_xmltarget): Define.
10112 (get_features_xml): Use it to replace "target.xml" and arch_string.
10113
10114 * configure.srv: Remove srv_xmltarget. Add XML files that were
10115 mentioned there to srv_xmlfiles instead. Remove conditional tests
10116 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10117 srv_xmlfiles and srv_regobj to include all possible choices.
10118 * configure.ac (srv_xmltarget): Remove.
10119 (srv_xmlfiles): Do not add "target.xml".
10120 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10121 checks for supplementary target information.
10122 * configure: Regenerate.
10123 * Makefile.in (XML_TARGET): Remove.
10124 (target.xml): Remove rule.
10125 (clean): Do not clean up target.xml.
10126 (.PRECIOUS): Do not mention target.xml.
10127
10128 * target.h (struct target_ops): Remove arch_string member.
10129 * linux-low.c (linux_arch_string): Remove.
10130 (linux_target_ops): Remove arch_string initializer.
10131 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10132 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10133 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10134 * spu-low.c (spu_arch_string): Remove.
10135 (spu_target_ops): Remove arch_string initializer.
10136 * win32-low.c (win32_arch_string): Remove.
10137 (win32_target_ops): Remove arch_string initializer.
10138 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10139 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10140 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10141
ee1a7ae4
UW
101422008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10143
10144 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10145 by collect_ptrace_register and supply_ptrace_register hooks.
10146 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10147 instead of checking for the_low_target.left_pad_xfer.
10148 (usr_store_inferior_registers): Use collect_ptrace_register callback
10149 instead of checking for the_low_target.left_pad_xfer.
10150
10151 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10152 (s390_supply_ptrace_register): Likewise.
10153 (s390_fill_gregset): Call s390_collect_ptrace_register.
10154 (the_low_target): Update.
10155
10156 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10157 (ppc_supply_ptrace_register): Likewise.
10158 (the_low_target): Update.
10159
10160 * linux-i386-low.c (the_low_target): Update.
10161 * linux-x86-64-low.c (the_low_target): Update.
10162
d61ddec4
UW
101632008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10164
10165 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10166 reg-s390.o and reg-s390x.o.
10167
10168 * linux-low.c (new_inferior): New global variable.
10169 (linux_create_inferior, linux_attach): Set it.
10170 (linux_wait_for_process): Call the_low_target.arch_setup after the
10171 target has stopped for the first time.
10172 (initialize_low): Do not call the_low_target.arch_setup.
10173
10174 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10175 (s390_set_pc): Likewise.
10176 (s390_arch_setup): New function.
10177 (the_low_target): Use s390_arch_setup as arch_setup routine.
10178
10179 * regcache.c (realloc_register_cache): New function.
10180 (set_register_cache): Call it for each existing regcache.
10181
d05b4ac3
UW
101822008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10183
10184 * server.h (init_registers): Remove prototype.
10185
10186 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10187 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10188 instead of init_registers ().
10189 * linux-arm-low.c (init_registers_arm): Add prototype.
10190 (init_registers_arm_with_iwmmxt): Likewise.
10191 (the_low_target): Add initializer for arch_setup field.
10192 * linux-cris-low.c (init_registers_cris): Add prototype.
10193 (the_low_target): Add initializer for arch_setup field.
10194 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10195 (the_low_target): Add initializer for arch_setup field.
10196 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10197 (the_low_target): Add initializer for arch_setup field.
10198 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10199 (the_low_target): Add initializer for arch_setup field.
10200 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10201 (the_low_target): Add initializer for arch_setup field.
10202 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10203 (the_low_target): Add initializer for arch_setup field.
10204 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10205 (init_registers_mips64_linux): Likewise.
10206 (the_low_target): Add initializer for arch_setup field.
10207 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10208 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10209 (the_low_target): Add initializer for arch_setup field.
10210 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10211 (init_registers_powerpc_64): Likewise.
10212 (the_low_target): Add initializer for arch_setup field.
10213 * linux-s390-low.c (init_registers_s390): Add prototype.
10214 (init_registers_s390x): Likewise.
10215 (the_low_target): Add initializer for arch_setup field.
10216 * linux-sh-low.c (init_registers_sh): Add prototype.
10217 (the_low_target): Add initializer for arch_setup field.
10218 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10219 (the_low_target): Add initializer for arch_setup field.
10220 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10221 (the_low_target): Add initializer for arch_setup field.
10222
10223 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10224 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10225 instead of init_registers ().
10226 * win32-arm-low.c (init_registers_arm): Add prototype.
10227 (the_low_target): Add initializer for arch_setup field.
10228 * win32-i386-low.c (init_registers_i386): Add prototype.
10229 (the_low_target): Add initializer for arch_setup field.
10230
10231 * spu-low.c (init_registers_spu): Add prototype.
10232 (initialize_low): Call initialie_registers_spu () instead of
10233 initialize_registers ().
10234
fd96d250
PA
102352008-02-19 Pedro Alves <pedro@codesourcery.com>
10236
10237 * server.c (handle_v_requests): When handling the vRun and vAttach
10238 packets, if already debugging a process, don't kill it. Return an
10239 error instead.
10240
d41b6bb4
DJ
102412008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10242
10243 * server.c (handle_query): Correct length check.
10244
5ac588cf
PA
102452008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10246
10247 * win32-low.c (do_initial_child_stuff): Add process handle
10248 parameter. Set current_process_handle and current_process_id from the
10249 parameters. Clear globals.
10250 (win32_create_inferior): Don't set current_process_handle and
10251 current_process_id here. Instead pass them on the call to
10252 do_initial_child_stuff.
10253 (win32_attach): Likewise.
10254 (win32_clear_inferiors): New.
10255 (win32_kill): Don't close the current process handle or the
10256 current thread handle here. Instead call win32_clear_inferiors.
10257 (win32_detach): Don't open a new handle to the process. Call
10258 win32_clear_inferiors.
10259 (win32_join): Don't rely on current_process_handle; open a new
10260 handle using the process id.
10261 (win32_wait): Call win32_clear_inferiors when the inferior process
10262 has exited.
10263
ecd7ecbc
DJ
102642008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10265
10266 * server.c (monitor_show_help): Add "exit".
10267
1525d545
MG
102682008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10269
ecd7ecbc 10270 * Makefile.in (SFILES): Add linux-xtensa-low.c.
1525d545
MG
10271 (clean): Add reg-xtensa.c.
10272 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
ecd7ecbc
DJ
10273 * configure.srv (xtensa*-*-linux*) New target.
10274 * linux-xtensa-low.c: New.
10275 * xtensa-xtregs.c: New.
1525d545 10276
59a016f0
PA
102772008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10278
10279 * hostio.c: Don't include errno.h.
10280 (errno_to_fileio_errno): Move to hostio-errno.
10281 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10282 error number outputting to the target->hostio_last_error callback.
10283 (hostio_packet_error): Use FILEIO_EINVAL directly.
10284 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10285 calls to hostio_error.
10286 * hostio-errno.c: New.
10287 * server.h (hostio_last_error_from_errno): Declare.
10288 * target.h (target_ops): Add hostio_last_error member.
10289 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10290 as hostio_last_error handler.
889bf7c5 10291 * spu-low.c (spu_target_ops): Likewise.
59a016f0
PA
10292 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10293 (wince_hostio_last_error): New functions.
10294 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10295 as hostio_last_error handler.
10296 (win32_target_ops) [!_WIN32_WCE]: Register
10297 hostio_last_error_from_errno as hostio_last_error handler.
10298 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10299 (hostio-errno.o): New rule.
10300 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10301 * configure.srv (srv_hostio_err_objs): New variable. Default to
10302 hostio-errno.o.
10303 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10304 * configure: Regenerate.
10305
2d717e4f
DJ
103062008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10307
10308 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10309 (linux_kill, linux_detach): Clean up the process list.
10310 * remote-utils.c (remote_open): Improve port number parsing.
10311 (putpkt_binary, input_interrupt): Only send interrupts if the target
10312 is running.
10313 * server.c (extended_protocol): Make static.
10314 (attached): Define earlier.
10315 (exit_requested, response_needed, program_argv): New variables.
10316 (target_running): New.
10317 (start_inferior): Clear attached here.
10318 (attach_inferior): Set attached here.
10319 (require_running): Define.
10320 (handle_query): Use require_running and target_running. Implement
10321 "monitor exit".
10322 (handle_v_attach, handle_v_run): New.
10323 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10324 (gdbserver_usage): Update.
10325 (main): Redo argument parsing. Handle --debug and --multi. Handle
10326 --attach along with other options or after the port. Save
10327 program_argv. Support no initial program. Resynchronize
10328 communication with GDB after an error. Handle "monitor exit".
10329 Use require_running and target_running. Always allow the extended
10330 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10331 restart in extended mode.
10332 * README: Refer to the GDB manual. Update --attach usage.
10333
7407e2de
AS
103342007-12-20 Andreas Schwab <schwab@suse.de>
10335
10336 * linux-low.c (STACK_SIZE): Define.
10337 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10338 (linux_test_for_tracefork): Likewise.
10339
b65d95c5
DJ
103402007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10341
10342 * linux-low.c (linux_wait_for_event): Update messages. Do not
10343 reinsert auto-delete breakpoints.
10344 * mem-break.c (struct breakpoint): Change return type of handler to
10345 int.
10346 (set_breakpoint_at): Update handler type.
10347 (reinsert_breakpoint_handler): Return 1 instead of calling
10348 delete_breakpoint.
10349 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10350 setting a new one.
10351 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10352 * mem-break.h (set_breakpoint_at): Update handler type.
10353 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10354 * win32-low.c (auto_delete_breakpoint): New.
10355 (get_child_debug_event): Use it.
10356
4e799345
DJ
103572007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10358
10359 * configure.ac: Check for pread and pwrite.
10360 * hostio.c (handle_pread): Fall back to lseek and read.
10361 (handle_pwrite): Fall back to lseek and write.
10362 * config.in, configure: Regenerated.
10363
27524b67
DJ
103642007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10365
10366 * server.c (myresume): Add own_buf argument.
10367 (main): Update calls.
10368
a20d5e98
DJ
103692007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10370
10371 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10372 * remote-utils.c (remote_open): Do not call disable_async_io.
10373 (block_async_io): Delete.
10374 (unblock_async_io): Make static.
10375 (initialize_async_io): New.
10376 * server.c (handle_v_cont): Handle async I/O here.
10377 (myresume): Likewise. Move other common resume tasks here...
10378 (main): ... from here. Call initialize_async_io. Disable async
10379 I/O before the main loop.
10380 * server.h (initialize_async_io): Declare.
10381 (block_async_io, unblock_async_io): Delete prototypes.
10382 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10383
b79d787e
DJ
103842007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10385
10386 * remote-utils.c (readchar): Allow binary data in received messages.
10387
d97903b2
PA
103882007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10389
10390 * win32-low.c (attaching): New global.
10391 (win32_create_inferior): Clear the `attaching' global.
10392 (win32_attach): Set the `attaching' global.
10393 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10394 attaching. Only set a breakpoint at the entry point if not
10395 attaching.
10396
311de423
PA
103972007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10398
10399 * server.c (main): Don't report dll events on the initial
10400 connection on attaches.
10401
6c2d16d2
PA
104022007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10403
10404 * server.c (main): Relax numerical bases supported for the pid of
10405 the --attach command line argument.
10406
5ca906e6
PA
104072007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10408
10409 * win32-low.c (win32_attach): Call OpenProcess before
10410 DebugActiveProcess, not after. Add last error output to error
10411 call.
10412
9c6c8194
PA
104132007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10414
10415 * win32-low.c (win32_get_thread_context)
10416 (win32_set_thread_context): New functions.
10417 (thread_rec): Use win32_get_thread_context.
10418 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10419 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10420 field.
10421
4d5d1aaa
PA
104222007-12-03 Leo Zayas
10423 Pedro Alves <pedro_alves@portugalmail.pt>
10424
10425 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10426 global variables.
10427 (child_add_thread): Minor cleanup.
10428 (child_continue): Resume artificially suspended threads before
10429 calling ContinueDebugEvent.
10430 (suspend_one_thread): New.
10431 (fake_breakpoint_event): New.
10432 (get_child_debug_event): Change return type to int. Check here if
10433 gdb sent an interrupt request. If a soft interrupt was requested,
10434 fake a breakpoint event. Return 0 if there is no event to handle,
10435 and 1 otherwise.
10436 (win32_wait): Don't check here if gdb sent an interrupt request.
10437 Ensure there is a valid event to handle.
10438 (win32_request_interrupt): Add soft interruption method as last
10439 resort.
10440
c436e841
PA
104412007-12-03 Leo Zayas
10442 Pedro Alves <pedro_alves@portugalmail.pt>
10443
10444 * win32-low.h (win32_thread_info): Add descriptions to the
10445 structure members. Replace `suspend_count' counter by a
10446 `suspended' flag.
10447 * win32-low.c (thread_rec): Update condition of when to get the
10448 context from the inferior. Rely on ContextFlags being set if it
10449 has already been retrieved. Only suspend the inferior thread if
10450 we haven't already. Warn if that fails.
10451 (continue_one_thread): s/suspend_count/suspended/. Only call
10452 ResumeThread once. Warn if that fails.
10453
e7b5fa67
PA
104542007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10455
10456 * win32-low.c (win32_wait): Don't read from the inferior when it
10457 has already exited.
10458
a385171d
PA
104592007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10460
10461 * Makefile.in (win32_low_h): New variable.
10462 (win32-low.o): Add dependency on $(win32_low_h).
10463 (win32-arm-low.o, win32-i386-low.o): New rules.
10464
f80c84b3
DJ
104652007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10466
10467 * hostio.c: Correct copyright year.
10468
a6b151f1
DJ
104692007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10470
10471 * Makefile.in (OBS): Add hostio.o.
10472 (hostio.o): New rule.
10473 * server.h (handle_vFile): Declare.
10474 * hostio.c: New file.
10475 * server.c (handle_v_requests): Take packet_len and new_packet_len
10476 for binary packets. Call handle_vFile.
10477 (main): Update call to handle_v_requests.
10478
f9387fc3
DJ
104792007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10480
10481 * linux-low.c: Include <sched.h>.
10482
51c2684e
DJ
104832007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10484
10485 * linux-low.c (linux_tracefork_grandchild): New.
10486 (linux_tracefork_child): Use clone.
10487 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10488
75f83163
JB
104892007-10-31 Joel Brobecker <brobecker@adacore.com>
10490
10491 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10492
da5898ce
DJ
104932007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10494
10495 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10496
24a09b5f
DJ
104972007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10498
10499 * inferiors.c (change_inferior_id): Delete.
10500 (add_pid_to_list, pull_pid_from_list): New.
10501 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10502 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10503 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10504 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10505 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10506 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10507 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10508 (using_threads): Always set to 1.
10509 (handle_extended_wait): New.
10510 (add_process): Do not set TID.
10511 (linux_create_inferior): Set must_set_ptrace_flags.
10512 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10513 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10514 (linux_thread_alive): Rename TID argument to LWPID.
10515 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10516 (linux_wait_for_event): Do not use TID or check using_threads. Update
10517 call to dead_thread_notify. Call handle_extended_wait.
10518 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10519 (send_sigstop): Delete sigstop_sent.
10520 (wait_for_sigstop): Avoid TID.
10521 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10522 (linux_test_for_tracefork): New.
10523 (linux_lookup_signals): Use thread_db_active and
10524 linux_supports_tracefork_flag.
10525 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10526 * linux-low.h (get_process_thread): Avoid TID.
10527 (struct process_ifo): Move thread_known and tid to the end. Remove
10528 sigstop_sent.
10529 (linux_attach_lwp, thread_db_init): Update prototypes.
10530 * server.h (change_inferior_id): Delete prototype.
10531 (add_pid_to_list, pull_pid_from_list): New prototypes.
10532 * thread-db.c (thread_db_use_events): New.
10533 (find_first_thread): Rename to...
10534 (find_one_thread): ...this. Update callers and messages. Do not
10535 call fatal. Check thread_db_use_events. Do not call
10536 change_inferior_id or new_thread_notify.
10537 (maybe_attach_thread): Update. Do not call new_thread_notify.
10538 (thread_db_init): Set thread_db_use_events. Check use_events.
10539 * utils.c (fatal, warning): Correct message prefix.
10540
30ed0a8f
DJ
105412007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10542
10543 * Makefile.in (clean): Remove new files.
10544 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10545 (powerpc-64.o, powerpc-64.c): New rules.
10546 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10547 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10548 with SPE.
10549 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10550 SPE targets.
10551 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10552 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10553 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10554 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10555 (target_regsets): Add AltiVec and SPE register sets.
10556 * configure.ac: Check for AltiVec and SPE.
10557 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10558 (ppc_fill_vrregset, ppc_store_vrregset): New.
10559 (target_regsets): Add AltiVec register set.
10560 * configure: Regenerated.
10561
fd462a61
DJ
105622007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10563
10564 * linux-low.c (O_LARGEFILE): Define.
10565 (linux_read_memory): Use /proc/PID/mem.
10566 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10567 * configure, config.in: Regenerated.
10568
69f223ed
DJ
105692007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10570
10571 * linux-low.c (linux_wait_for_event): Do not pass signals while
10572 single-stepping.
10573
aec18585
PA
105742007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10575
10576 * win32-low.c (create_process): New.
10577 (win32_create_inferior): Use create_process instead of
10578 CreateProcess. If create_process failed retry appending an ".exe"
10579 suffix. Store the GetLastError result immediatelly after
10580 create_process calls and use it on the call to error.
10581
34d86ddd
PA
105822007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10583
10584 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10585
5a0e3bd0
JB
105862007-08-23 Joel Brobecker <brobecker@adacore.com>
10587
10588 * configure.ac: Switch license to GPLv3.
10589
f88c79e6
MS
105902007-08-01 Michael Snyder <msnyder@access-company.com>
10591
10592 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10593
6b3d9b83
PA
105942007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10595
10596 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10597 typedef.
10598 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10599 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10600 CloseToolhelp32Snapshot.
10601 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10602 CloseToolhelp32Snapshot.
10603
c588c53c
MS
106042007-07-27 Michael Snyder <michael.snyder@access-company.com>
10605
10606 * server.c (main): Check for inferior exit before main loop.
10607
aa0403d9
PA
106082007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10609
10610 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10611 instead of on tmp_desc.
10612
255e7678
DJ
106132007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10614 Daniel Jacobowitz <dan@codesourcery.com>
10615
10616 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10617 (add_thread): Minor cleanups.
10618 (clear_inferiors): Move lower in the file. Clear the DLL
10619 list.
10620 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10621 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10622 (xml_escape_text): New.
10623 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10624 for qSupported.
10625 (handle_v_cont): Report errors.
10626 (gdbserver_version): Update.
10627 (main): Correct size of own_buf. Do not report initial DLL events.
10628 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10629 (unloaded_dll, xml_escape_text): New.
10630 * win32-low.c (enum target_waitkind): Update comments.
10631 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10632 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10633 (win32_EnumProcessModules, win32_GetModuleInformation)
10634 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10635 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10636 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10637 (win32_Module32First, win32_Module32Next, load_toolhelp)
10638 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10639 (get_child_debug_event): Handle DLL events.
10640 (win32_wait): Likewise.
10641
0d37add9
DJ
106422007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10643
10644 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10645 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10646
45e2715e
PA
106472007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10648
10649 * win32-low.c (handle_output_debug_string): Ignore event if not
10650 waiting.
10651
c5674cf1
PA
106522007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10653
10654 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10655
2bbe3cc1
DJ
106562007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10657
10658 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10659
ae13219e
DJ
106602007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10661
10662 * inferiors.c (change_inferior_id): Add comment.
10663 * linux-low.c (check_removed_breakpoint): Add an early
10664 prototype. Improve debug output.
10665 (linux_attach): Doc update.
10666 (linux_detach_one_process, linux_detach): Clean up before releasing
10667 each process.
10668 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10669 * linux-low.h (struct process_info): Doc improvement.
10670 * mem-break.c (delete_all_breakpoints): New.
10671 * mem-break.h (delete_all_breakpoints): New prototype.
10672 * thread-db.c (find_first_thread): New.
10673 (thread_db_create_event): Call it instead of
10674 thread_db_find_new_threads. Clean up unused variables.
10675 (maybe_attach_thread): Remove first thread handling.
10676 (thread_db_find_new_threads): Use find_first_thread.
10677 (thread_db_get_tls_address): Likewise.
10678
4105de34
DJ
106792007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10680
10681 * thread-db.c (thread_db_find_new_threads): Add prototype.
10682 (thread_db_create_event): Check for the main thread before adding
10683 a new thread.
10684 (maybe_attach_thread): Only enable event reporting if TID == 0.
10685 (thread_db_get_tls_address): Check for new threads.
10686
2b876972
DJ
106872007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10688
10689 * linux-low.c (linux_create_inferior): Try execv before execvp.
10690 * spu-low.c (spu_create_inferior): Likewise.
10691
7a245884
DJ
106922007-06-13 Mike Frysinger <vapier@gentoo.org>
10693
10694 * linux-low.c (linux_create_inferior): Change execv to execvp.
10695 * spu-low.c (spu_create_inferior): Likewies.
10696
117ce543
DJ
106972007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10698
10699 * Makefile.in (clean): Clean new files instead of deleted ones.
10700 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10701 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10702 rules.
10703 * configure.srv: Specify XML files and new regformats for MIPS and
10704 MIPS64 GNU/Linux.
10705 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10706 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10707 an entry for the restart register.
10708 (mips_cannot_fetch_register, mips_cannot_store_register)
10709 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10710 register names to match the XML descriptions.
10711 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10712 restart register instead of $0.
10713
0e7f50da
UW
107142007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10715 Markus Deuling <deuling@de.ibm.com>
10716
10717 * remote-utils.c (decode_xfer_write): New function.
10718 * server.h (decode_xfer_write): Add prototype.
10719 * server.c (handle_query): Add PACKET_LEN argument. Support
10720 qXfer:spu:read and qXfer:spu:write packets.
10721 (main): Pass packet_len to handle_query.
10722 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10723 * target.h (target_ops): Add qxfer_spu.
10724
374c1d38
UW
107252007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10726
10727 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10728 accessing non-seekable spufs files.
10729
bb63802a
UW
107302007-05-16 Markus Deuling <deuling@de.ibm.com>
10731
889bf7c5 10732 * server.c (handle_query): Add reply for qC packet.
bb63802a 10733
7390519e
PA
107342007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10735 Leo Zayas <lerele@champenstudios@com>
10736
10737 * server.h (check_remote_input_interrupt_request): New function.
10738 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10739 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10740 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10741 (check_remote_input_interrupt_request): New function.
10742 * server.h (check_remote_input_interrupt_request): Declare.
3ecf0694 10743 * win32-low.c (winapi_DebugBreakProcess,
7390519e
PA
10744 winapi_GenerateConsoleCtrlEvent): New typedefs.
10745 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10746 to 250 ms.
10747 (win32_wait): Check for remote interrupt request
10748 with check_remote_input_interrupt_request.
10749 (win32_request_interrupt): New function.
10750 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10751
34b34921
PA
107522007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10753
10754 * win32-low.c (debug_registers_changed,
10755 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10756 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10757 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10758 (thread_rec): Get context using the low target.
10759 (child_add_thread): Call thread_added on the low target,
10760 which does the same thing.
10761 (regptr): Delete.
10762 (do_initial_child_stuff): Remove debug registers references.
10763 Set context using the low target. Resume threads after
10764 setting the contexts.
10765 (child_continue): Remove dead variable. Remove debug
10766 registers references.
10767 (child_fetch_inferior_registers): Go through the low target.
10768 (do_child_store_inferior_registers): Remove.
10769 (child_store_inferior_registers): Go through the low target.
10770 (win32_resume): Remove debug registers references.
10771 Set context using the low target.
10772 (handle_exception): Change return type to void. Don't record
10773 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10774 first chance exception.
889bf7c5 10775 (get_child_debug_event): Change return type to void. Remove
34b34921
PA
10776 goto loop. Always return after waiting for debug event.
10777 (win32_wait): Convert to switch statement. Handle spurious
10778 events.
10779
10780 * win32-i386-low.c (debug_registers_changed,
10781 debug_registers_used): New.
10782 (initial_stuff): Rename to ...
10783 (i386_initial_stuff): ... this. Clear debug registers
10784 state variables.
10785 (store_debug_registers): Delete.
10786 (i386_get_thread_context): New.
10787 (load_debug_registers): Delete.
10788 (i386_set_thread_context): New.
10789 (i386_thread_added): New.
10790 (single_step): Rename to ...
10791 (i386_single_step): ... this.
10792 (do_fetch_inferior_registers): Rename to ...
10793 (i386_fetch_inferior_register): ... this.
10794 (i386_store_inferior_register): New.
10795 (the_low_target): Adapt to new interface.
10796
10797 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10798 (arm_get_thread_context): New.
10799 (arm_set_thread_context): New.
10800 (regptr): New.
10801 (do_fetch_inferior_registers): Rename to ...
10802 (arm_fetch_inferior_register): ... this.
10803 (arm_store_inferior_register): New.
10804 (arm_wince_breakpoint): Reimplement as unsigned long.
10805 (arm_wince_breakpoint_len): Define.
10806 (the_low_target): Adapt to new interface.
10807
10808 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10809 load_debug_registers. Add get_thread_context, set_thread_context,
10810 thread_added and store_inferior_register. Rename
10811 fetch_inferior_registers to fetch_inferior_register.
10812 (regptr): Remove declaration.
10813
dd6953e1
PA
108142007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10815
10816 * linux-low.c (linux_detach): Change return type to int. Return 0.
10817 * spu-low.c (spu_detach): Likewise.
10818
444d6139
PA
108192007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10820
10821 * target.h (target_ops): Change return type of detach to int.
10822 Add join.
10823 (join_inferior): New.
10824 * server.c (main): Don't skip detach support on mingw32.
10825 If the inferior doesn't support detaching return error.
10826 Call join_inferior instead of using waitpid.
10827 * linux-low.c (linux_join): New.
10828 (linux_target_op): Add linux_join.
10829 * spu-low.c (spu_join): New.
10830 (spu_target_ops): Add spu_join.
10831 * win32-low.c (win32_detach): Adapt to new interface.
10832 Reopen current_process_handle before detaching. Issue a child
10833 resume before detaching.
10834 (win32_join): New.
10835 (win32_target_op): Add win32_join.
10836
1d5315fe
PA
108372007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10838
10839 * win32-low.c (win32-attach): Fix return value.
10840 * target.h (target_ops): Describe ATTACH return values.
10841
bf914831
PA
108422007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10843
10844 * win32-low.c (GETPROCADDRESS): Define.
10845 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10846 (winapi_DebugSetProcessKillOnExit): Likewise.
10847 (win32_create_inferior): Force usage of ansi CreateProcessA.
10848 (win32_attach): Use GETPROCADDRESS.
10849 (win32_detach): Likewise.
10850
f72f3e60
PA
108512007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10852
10853 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10854
ed50f18f
PA
108552007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10856
10857 * win32-low.c: Commit leftover changes from 2007-03-29.
10858
0c2ead7e
DJ
108592007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10860
10861 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10862 fields short instead of int. Add explicit padding.
10863 (i387_cache_to_fsave): Remove unnecessary casts.
10864 (i387_fsave_to_cache): Doc fix.
10865 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10866
73725ff3
DJ
108672007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10868
10869 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10870 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10871
d99f33d8
PA
108722007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10873
10874 * configure.srv (arm*-*-mingw32ce*): Move near the other
10875 arm targets.
10876
68070c10
PA
108772007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10878
2482afc6 10879 * configure.ac: Add errno checking.
68070c10
PA
10880 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10881 sys/file.h and malloc.h.
10882 (AC_CHECK_DECLS): Add perror.
10883 (srv_mingwce): Handle.
2482afc6 10884 * configure.srv (i[34567]86-*-cygwin*): Add
68070c10
PA
10885 win32-i386-low.o to srv_tgtobj.
10886 (i[34567]86-*-mingw*): Likewise.
10887 (arm*-*-mingw32ce*): Add case.
10888 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10889 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10890 [__MINGW32CE__] (strerror): New function.
10891 [__MINGW32CE__] (errno): Define to GetLastError.
10892 [__MINGW32CE__] (COUNTOF): New macro.
10893 (remote_open): Remove extra close call.
10894 * mem-break.c (delete_breakpoint_at): New function.
10895 * mem-break.h (delete_breakpoint_at): Declare.
10896 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10897 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10898 [USE_WIN32API] (read, write): Add char* casts.
10899 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10900 * server.h: Include wincecompat.h on Windows CE.
10901 [HAVE_ERRNO_H]: Check.
10902 (perror): Declare if not declared.
10903 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10904 (perror_with_name): Remove errno declaration.
10905 * wincecompat.h: New.
10906 * wincecompat.c: New.
10907 * win32-low.h: New.
10908 * win32-arm-low.c: New.
10909 * win32-i386-low.c: New.
10910 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10911 (OUTMSG2): Make it safe.
10912 (_T): New macro.
10913 (COUNTOF): New macro.
10914 (NUM_REGS): Get it from the low target.
10915 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10916 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10917 (thread_rec): Let low target handle debug registers.
10918 (child_add_thread): Likewise.
10919 (child_init_thread_list): Likewise.
10920 (continue_one_thread): Likewise.
10921 (regptr): New.
10922 (do_child_fetch_inferior_registers): Move to ...
10923 * win32-i386-low.c: ... here, and rename to ...
10924 (do_fetch_inferior_registers): ... this.
889bf7c5 10925 * win32-low.c (child_fetch_inferior_registers):
68070c10
PA
10926 Go through the low target.
10927 (do_child_store_inferior_registers): Use regptr.
10928 (strwinerror): New function.
10929 (win32_create_inferior): Handle Windows CE.
10930 Use strwinerror instead of strerror on Windows error
10931 codes. Add program to the error output.
10932 Don't close the main thread handle on Windows CE.
10933 (win32_attach): Use coredll.dll on Windows CE.
10934 (win32_kill): Close current process and current
10935 thread handles.
10936 (win32_detach): Use coredll.dll on Windows CE.
10937 (win32_resume): Let low target handle debug registers, and
10938 step request.
10939 (handle_exception): Add/Remove initial breakpoint. Avoid
10940 non-existant WSTOPSIG on Windows CE.
10941 (win32_read_inferior_memory): Cast to remove warning.
10942 (win32_arch_string): Go through the low target.
10943 (initialize_low): Call set_breakpoint_data with the low
10944 target's breakpoint.
10945 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10946 FOP_REGNUM, mappings): Move to ...
10947 * win32-i386-low.c: ... here.
10948 * win32-low.c (win32_thread_info): Move to ...
10949 * win32-low.h: ... here.
10950 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10951 win32-arm-low.c and wincecompat.c.
10952 (all:): Add $EXEEXT.
10953 (install-only:): Likewise.
10954 (gdbserver:): Likewise.
10955 (gdbreplay:): Likewise.
10956 * config.in: Regenerate.
10957 * configure: Regenerate.
10958
41093d81
PA
109592007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10960
10961 * win32-low.c: Rename typedef thread_info to
10962 win32_thread_info throughout.
10963
544afa54
PA
109642007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10965
10966 * win32-i386-low.c: Rename to ...
10967 * win32-low.c: ... this.
10968 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10969 * Makefile.in: Likewise.
10970
bce7165d
PA
109712007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10972
10973 * remote-utils.c (monitor_output): Constify msg parameter.
10974 * server.h (monitor_output): Likewise.
10975 * win32-i386-low.c (handle_output_debug_string): New.
10976 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10977 handle_output_debug_string.
10978 (get_child_debug_event): Likewise.
10979
506c7aa0
DJ
109802007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10981
10982 * server.c (main): Correct strtoul check.
10983
42c81e2a
DJ
109842007-03-27 Jon Ringle <jon@ringle.org>
10985
10986 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10987
9453113a
DJ
109882007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10989
10990 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10991
64a69107
DJ
109922007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10993
10994 * terminal.h: Check HAVE_SGTTY_H.
10995
109962007-02-27 Mat Hostetter <mat@lcs.mit.edu>
6f8486da
DJ
10997
10998 * remote-utils.c (remote_open): Print out the assigned port number.
10999
c74d0ad8
DJ
110002007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
11001
11002 * remote-utils.c (monitor_output): New function.
11003 * server.c (debug_threads): Define here.
11004 (monitor_show_help): New function.
11005 (handle_query): Handle qRcmd.
11006 (main): Do not handle 'd' packet.
11007 * server.h (debug_threads, remote_debug, monitor_output): Declare.
11008 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
11009 of debug_threads.
11010
de7c3b4a
PA
110112007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11012
11013 * Makefile.in (EXEEXT): New.
11014 (clean): Use $(EXEEXT).
11015
ef57601b
PA
110162007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11017
11018 * target.h (target_ops): Rename send_signal to request_interrupt,
11019 and remove enum target_signal parameter.
11020 * linux-low.c (linux_request_interrupt): Rename from
11021 linux_send_signal, and always send SIGINT.
11022 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
11023 and always send SIGINT.
11024 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
11025 of send_signal.
11026 (input_interrupt): Likewise.
11027
820f2bda
PA
110282007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
11029
11030 * server.c (get_features_xml): Check if target implemented
11031 arch_string.
11032 * win32-i386-low.c (win32_arch_string): New.
11033 (win32_target_ops): Add win32_arch_string as arch_string member.
11034
ab39bf24
UW
110352007-02-22 Markus Deuling <deuling@de.ibm.com>
11036
11037 * spu-low.c (spu_arch_string): New.
11038 (spu_target_ops): Add spu_arch_string.
11039
61ff6e04
DJ
110402007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
11041
11042 * remote-utils.c: Remove HAVE_TERMINAL_H check.
11043 * configure.ac: Do not check for terminal.h.
11044 * configure, config.in: Regenerated.
11045
fb1e4ffc
DJ
110462007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11047
11048 * Makefile.in (OBS): Add $(XML_BUILTIN).
11049 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11050 (clean): Update.
11051 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11052 (arm-with-iwmmxt.c): New.
11053 * config.in, configure: Regenerate.
11054 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11055 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11056 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11057 (arm*-*-linux*): Add iWMMXt and regset support.
11058 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11059 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11060 (arm_store_wmmxregset, target_regsets): New.
11061 * server.c (get_features_xml): Take annex argument. Check builtin
11062 XML documents.
11063 (handle_query): Handle multiple annexes.
11064
0f48aa01
DJ
110652007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11066
11067 * remote-utils.c [USE_WIN32API] (read, write): Define.
11068 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11069 write.
11070
23181151
DJ
110712007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11072
11073 * linux-i386-low.c (the_low_target): Set arch_string.
11074 * linux-x86-64-low.c (the_low_target): Likewise.
11075 * linux-low.c (linux_arch_string): New.
11076 (linux_target_ops): Add it.
11077 * linux-low.h (struct linux_target_ops): Add arch_string.
11078 * server.c (write_qxfer_response): Use const void * for DATA.
11079 (get_features_xml): New.
11080 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11081 * target.h (struct target_ops): Add arch_string method.
11082
9d606399
DJ
110832007-01-03 Denis Pilat <denis.pilat@st.com>
11084 Daniel Jacobowitz <dan@codesourcery.com>
11085
11086 * linux-low.c (linux_kill): Handle being called with no threads.
11087 * win32-i386-low.c (win32_kill): Likewise.
11088 (get_child_debug_event): Clear current_process_handle.
11089
110902006-12-30 Denis PILAT <denis.pilat@st.com>
8264bb58
DJ
11091 Daniel Jacobowitz <dan@codesourcery.com>
11092
11093 * remote-utils.c (remote_open): Check the type of specified
11094 serial port devices before opening them.
11095 * server.c (main): Kill the inferior if an error occurs during
11096 the first remote_open.
11097
a5e13d24
DJ
110982006-12-05 Markus Deuling <deuling@de.ibm.com>
11099
11100 * README: Update supported targets.
11101
186947f7
DJ
111022006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11103
11104 * Makefile.in (clean): Remove reg-mips64.c.
11105 (reg-mips64.c, reg-mips64.o): New rules.
11106 * configure.srv: Handle mips64. Include regset support for mips.
11107 * linux-mips-low.c (union mips_register): New.
11108 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11109 (mips_breakpoint, mips_breakpoint_at): Use int.
11110 (mips_collect_register, mips_supply_register)
11111 (mips_collect_register_32bit, mips_supply_register_32bit)
11112 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11113 (mips_store_fpregset, target_regsets): New.
11114 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11115
a13e2c95
UW
111162006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11117
11118 * configure.srv: Add target "spu*-*-*".
11119 * Makefile.in (clean): Remove reg-spu.c.
11120 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11121 * spu-low.c: New file.
11122
cb7283db
DJ
111232006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11124
11125 * configure.ac: Correct td_thr_tls_get_addr test.
11126 * configure: Regenerated.
11127
89be2091
DJ
111282006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11129
11130 * linux-low.c (linux_wait_for_event): Reformat. Use the
11131 pass_signals array.
11132 * remote-utils.c (decode_address_to_semicolon): New.
11133 * server.c (pass_signals, handle_general_set): New.
11134 (handle_query): Mention QPassSignals for qSupported.
11135 (main): Call handle_general_set.
11136 * server.h (pass_signals, decode_address_to_semicolon): New.
11137
000ef4f0
DJ
111382006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11139
11140 * server.c (handle_query): Correct error handling for read_auxv.
11141
b7149293
UW
111422005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11143
11144 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11145 and srv_linux_thread_db to yes.
11146 * linux-s390-low.c (s390_fill_gregset): New function.
11147 (target_regsets): Define data structure.
11148
dae5f5cf
DJ
111492006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11150
11151 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11152 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11153 * config.in, configure: Regenerated.
11154 * inferiors.c (gdb_id_to_thread): New function.
11155 (gdb_id_to_thread_id): Use it.
11156 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11157 * linux-low.h (struct process_info): Add th member.
11158 (thread_db_get_tls_address): New prototype.
11159 * remote-utils.c (decode_address): Make non-static.
11160 * server.c (handle_query): Handle qGetTLSAddr.
11161 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11162 * target.h (struct target_ops): Add get_tls_address.
11163 * thread-db.c (maybe_attach_thread): Save the thread handle.
11164 (thread_db_get_tls_address): New.
11165
32ca6d61
DJ
111662006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11167
11168 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11169 (linux_resume_one_process): Take a siginfo_t *. Update all
11170 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11171 (struct pending_signals): Add a siginfo_t.
11172 (linux_wait_for_process): Always set last_status.
11173 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11174 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11175 * linux-low.h (struct process_info): Add last_status.
11176
5ffff7c1
DJ
111772006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11178
11179 * remote-utils.c (try_rle): New function.
11180 (putpkt_binary): Use it.
11181
8695c747
DJ
111822006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11183
11184 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11185 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11186 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11187 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11188 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11189 point registers.
11190
290fadea
RS
111912006-08-08 Richard Sandiford <richard@codesourcery.com>
11192
11193 * server.c (terminal_fd): New variable.
11194 (old_foreground_pgrp): Likewise.
11195 (restore_old_foreground_pgrp): New function.
11196 (start_inferior): Record the terminal file descriptor in terminal_fd
11197 and its original foreground group in old_foreground_pgrp. Register
11198 restore_old_foreground_pgrp with atexit().
11199
9f2e1e63
DJ
112002006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11201
11202 * server.c (handle_query): Correct qPart to qXfer.
11203
b80864fb
DJ
112042006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11205
11206 * configure.ac: Check for more headers which are missing on
11207 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11208 * configure.srv: Add Cygwin and mingw32.
11209 * remote-utils.c: Don't include headers unconditionally which
11210 are missing on mingw32. Include <winsock.h> for mingw32.
11211 (remote_open): Adjust for mingw32 support. Flush
11212 standard error after writing to it.
11213 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11214 (unblock_async_io, enable_async_io, disable_async_io)
11215 (readchar, getpkt): Update for Winsock support.
11216 (prepare_resume_reply): Expect a protocol signal number.
11217 * server.c: Disable <sys/wait.h> on mingw32.
11218 (start_inferior): Adjust for mingw32 support. Flush
11219 standard error after writing to it.
11220 (attach_inferior): Likewise. Use protocol signal
11221 numbers.
11222 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11223 and names.
11224 * win32-i386-low.c: New file.
11225 * Makefile.in (XM_CLIBS): Set.
11226 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11227 (win32-i386-low.o): New dependency rule.
11228 * linux-low.c (linux_wait): Use target signal numbers.
11229 * target.h (struct target_ops): Doc fix.
11230 * server.h (target_signal_to_name): New prototype.
11231 * gdbreplay.c: Don't include headers unconditionally which
11232 are missing on mingw32. Include <winsock.h> for mingw32.
11233 (remote_close, remote_open): Adjust for Winsock support.
11234 * configure, config.in: Regenerated.
11235
0876f84a
DJ
112362006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11237
11238 * server.c (decode_xfer_read, write_qxfer_response): New.
11239 (handle_query): Take a packet length argument. Handle
11240 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11241 the qSupported response.
11242 (main): Update call to handle_query.
11243
01f9e8fa
DJ
112442006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11245
11246 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11247 (putpkt_binary): Renamed from putpkt and adjusted for binary
11248 data.
11249 (putpkt): New wrapper for putpkt_binary.
11250 (readchar): Don't mask off the high bit.
11251 (decode_X_packet): New function.
11252 * server.c (main): Call putpkt_binary if a handler sets the packet
11253 length. Save the length of the incoming packet. Handle 'X'.
11254 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11255
be2a5f71
DJ
112562006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11257
11258 * server.c (handle_query): Handle qSupported.
11259
ea025f5f
DJ
112602006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11261
11262 * remote-utils.c (all_symbols_looked_up): New variable.
11263 (look_up_one_symbol): Check it.
11264 * server.h (look_up_one_symbol): New declaration.
11265 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11266
9308fc88
DJ
112672006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11268
11269 * Makefile.in (linux-arm-low.o): Update dependencies.
66f338c7 11270 * linux-arm-low.c: Include "gdb_proc_service.h".
9308fc88
DJ
11271 (PTRACE_GET_THREAD_AREA): Define.
11272 (ps_get_thread_area): New function.
11273
52fb6437
NS
112742006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11275
11276 * configure.srv (m68k*-*-uclinux*): New target.
11277 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11278 (linux_resume_one_process): Remove extraneous cast.
11279 (linux_read_offsets): New.
11280 (linux_target_op): Add linux_read_offsets on mmuless systems.
11281 * server.c (handle_query): Add qOffsets logic.
11282 * target.h (struct target_ops): Add read_offsets.
11283
21b0f40c
DJ
112842006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11285
11286 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11287 (PTRACE_GET_THREAD_AREA): Define.
11288 (ps_get_thread_area): New function.
11289 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11290 (linux-x86-64-low.o): Update.
11291
0050a760
DJ
112922006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11293
11294 * configure.ac: Remove checks for prfpregset_t.
11295 * gdb_proc_service.h: New file.
11296 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11297 new "gdb_proc_service.h".
11298 * proc-service.c: Likewise.
11299 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11300 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11301 * Makefile.in (gdb_proc_service_h): Updated.
11302 * configure, config.in: Regenerated.
11303
b92a518e
DJ
113042006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11305
11306 * remote-utils.c (prepare_resume_reply): Move declaration
11307 of gdb_id_from_wait to the top of the block.
11308
545587ee
DJ
113092006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11310
11311 * linux-low.c (regsets_store_inferior_registers): Read the regset
11312 from the target before filling it.
11313
9db87ebd
DJ
113142006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11315
11316 * server.c (attach_inferior): Return SIGTRAP for a successful
11317 attach.
11318
dd24457d
DJ
113192006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11320
11321 * Makefile.in (OBS): Add version.o.
11322 (STAGESTUFF): Delete.
11323 (version.o): Add dependencies.
11324 (version.c): Replace rule.
11325 (clean): Remove version.c.
11326 * server.c (gdbserver_version): New.
11327 (gdbserver_usage): Use printf.
11328 (main): Handle --version and --help.
11329 * server.h (version, host_name): Add declarations.
11330
6f0f660e
EZ
113312005-12-23 Eli Zaretskii <eliz@gnu.org>
11332
889bf7c5
PA
11333 * linux-arm-low.c:
11334 * linux-arm-low.c:
11335 * inferiors.c:
11336 * i387-fp.h:
11337 * i387-fp.c:
11338 * gdbreplay.c:
11339 * regcache.c:
11340 * proc-service.c:
11341 * mem-break.h:
11342 * mem-break.c:
11343 * linux-x86-64-low.c:
11344 * linux-sh-low.c:
11345 * linux-s390-low.c:
11346 * linux-ppc64-low.c:
11347 * linux-ppc-low.c:
11348 * linux-mips-low.c:
11349 * linux-m68k-low.c:
11350 * linux-m32r-low.c:
11351 * linux-low.h:
11352 * linux-low.c:
11353 * linux-ia64-low.c:
11354 * linux-i386-low.c:
11355 * linux-crisv32-low.c:
11356 * thread-db.c:
11357 * terminal.h:
11358 * target.h:
11359 * target.c:
11360 * server.h:
11361 * server.c:
11362 * remote-utils.c:
11363 * regcache.h:
11364 * utils.c:
11365 * Makefile.in:
11366 * configure.ac:
6f0f660e
EZ
11367 * gdbserver.1: Add (C) after Copyright. Update the FSF
11368 address.
11369
9d1fb177
DJ
113702005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11371
11372 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11373 (arm_breakpoint_at): Recognize both breakpoints.
11374 (the_low_target): Use the correct breakpoint instruction.
11375
011a70c2
DJ
113762005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11377
11378 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11379 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11380 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11381 (the_low_target): Update.
11382
7fb85e41
AS
113832005-10-25 Andreas Schwab <schwab@suse.de>
11384
11385 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11386
11387 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11388 (ia64_num_regs): Reduce to 462.
11389
3db0444b
DJ
113902005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11391
11392 * acinclude.m4: Correct quoting.
11393 * aclocal.m4: Regenerated.
11394
11395 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11396 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11397 (thread_db_init): Call thread_db_err_str.
11398 * configure.ac: Check for TD_VERSION.
11399 * config.in, configure: Regenerated.
11400
bee0189a
DJ
114012005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11402
11403 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11404
e9d25b98
DJ
114052005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11406
11407 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11408 is not available. Define HAVE_PTRACE_GETREGS if it is.
11409 * config.in, configure: Regenerated.
11410 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11411 * linux-i386-low.c, linux-m68k-low.c: Update to use
11412 HAVE_PTRACE_GETREGS.
11413 * linux-low.c (regsets_fetch_inferior_registers)
11414 (regsets_store_inferior_registers): Only return 0 if we processed
11415 GENERAL_REGS.
11416 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11417 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11418
a06660f7
DJ
114192005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11420
11421 * inferiors.c (struct thread_info): Add gdb_id.
11422 (add_thread): Add gdb_id argument.
11423 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11424 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11425 calls to add_thread.
11426 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11427 * server.c (handle_query): Use thread_to_gdb_id.
11428 (handle_v_cont, main): Use gdb_id_to_thread_id.
11429 * server.h (add_thread): Update prototype.
11430 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11431 prototypes.
11432
5a1f5858
DJ
114332005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11434
11435 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11436 left-padded registers.
11437 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11438 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11439
e122f1f5
SE
114402005-07-01 Steve Ellcey <sje@cup.hp.com>
11441
11442 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11443 * configure: Regenerate.
11444 * config.in: Regenerate.
11445 * server.h (NEED_DECLARATION_STRERROR):
11446 Replace with !HAVE_DECL_STRERROR.
11447
d592fa2f
DJ
114482005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11449
11450 * linux-low.c (linux_wait, linux_send_signal): Don't test
11451 an unsigned long variable for > 0 if it could be MAX_ULONG.
11452 * server.c (myresume): Likewise.
11453 * target.c (set_desired_inferior): Likewise.
11454
ccbd4912
MK
114552005-06-13 Mark Kettenis <kettenis@gnu.org>
11456
11457 * configure.ac: Simplify and improve check for socklen_t.
11458 * configure, config.in: Regenerate.
11459
f450004a
DJ
114602005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11461
11462 * acconfig.h: Remove.
11463 * configure.ac: Add a test for socklen_t. Use three-argument
11464 AC_DEFINE throughout.
11465 * config.in: Regenerated using autoheader 2.59.
11466 * configure: Regenerated.
11467
11468 * gdbreplay.c (socklen_t): Provide a default.
11469 (remote_open): Use socklen_t.
11470 * remote-utils.c (socklen_t): Provide a default.
11471 (remote_open): Use socklen_t.
11472 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11473 unsigned char.
11474
11475 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11476 char for buffers.
11477 * linux-low.c (linux_read_memory, linux_write_memory)
11478 (linux_read_auxv): Likewise.
11479 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11480 (check_mem_write): Likewise.
11481 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11482 Likewise.
11483 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11484 (registers_from_string, register_data): Likewise.
11485 * server.c (handle_query, main): Likewise.
11486 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11487 (decode_M_packet): Likewise.
11488 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11489 * target.h (struct target_ops): Update read_memory, write_memory,
11490 and read_auxv.
11491 (read_inferior_memory, write_inferior_memory): Update.
11492 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11493 to unsigned char *.
11494 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11495 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11496 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11497 linux-s390-low.c, linux-sh-low.c: Update for changes in
11498 read_inferior_memory and the_low_target->breakpoint.
11499
eee84df1
DJ
115002005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11501
11502 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11503 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11504 * configure.srv: Add powerpc64-*-linux*.
11505 * linux-ppc64-low.c: New file.
11506
45b134e5
OF
115072005-05-23 Orjan Friberg <orjanf@axis.com>
11508
11509 * linux-cris-low.c: New file with support for CRIS.
11510 * linux-crisv32-low.c: Ditto for CRISv32.
11511 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11512 (clean): Add reg-cris.c and reg-crisv32.c.
889bf7c5 11513 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
45b134e5
OF
11514 reg-crisv32.o, and reg-crisv32.c to make rules.
11515 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11516 recognized targets.
11517
48d93c75
UW
115182005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11519
11520 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11521 of sizeof (PTRACE_XFER_TYPE).
11522 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11523
e013ee27
OF
115242005-05-12 Orjan Friberg <orjanf@axis.com>
11525
889bf7c5 11526 * target.h (struct target_ops): Add insert_watchpoint,
e013ee27
OF
11527 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11528 pointers for hardware watchpoint support.
11529 * linux-low.h (struct linux_target_ops): Ditto.
11530 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11531 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11532 to linux_target_ops.
11533 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11534 reply packet.
11535 * server.c (main): Recognize 'Z' and 'z' packets.
11536
b0ded00b
UW
115372005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11538
11539 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11540 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11541 (the_low_target): Add new members.
11542
8643e2ad
DJ
115432005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11544
11545 * proc-service.c (ps_lgetregs): Search all_processes instead of
11546 all_threads.
11547
fc620387
DJ
115482005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11549
11550 * server.c (start_inferior): Change return type to int.
11551 (attach_inferior): Change sigptr to int *.
11552 (handle_v_cont, handle_v_requests): Change signal to int *.
11553 (main): Change signal to int.
11554
115552005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
7cfbc4a0
KI
11556
11557 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11558 * configure.srv: Add m32r*-*-linux*.
11559 * linux-m32r-low.c: New file.
11560
e0e76420
DJ
115612005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11562
11563 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11564
a1928bad
DJ
115652005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11566
11567 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11568 Take unsigned long arguments for PIDs.
11569 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11570 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11571 (wait_for_sigstop, linux_resume_one_process)
11572 (regsets_fetch_inferior_registers, linux_send_signal)
11573 (linux_read_auxv): Likewise. Update the types of variables holding
11574 PIDs. Update format string specifiers.
11575 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11576 * remote-utils.c (prepare_resume_reply): Likewise.
11577 * server.c (cont_thread, general_thread, step_thread)
11578 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11579 unsigned long.
11580 (handle_query): Update format specifiers.
11581 (handle_v_cont, main): Use strtoul for thread IDs.
11582 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11583 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11584 (general_thread, step_thread, thread_from_wait)
11585 (old_thread_from_wait): Update.
11586 * target.h (struct thread_resume): Use unsigned long for THREAD.
11587 (struct target_ops): Use unsigned long for arguments to attach and
11588 thread_alive.
11589
dcdb98d2
DJ
115902005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11591
11592 * acinclude.m4: Include bfd/bfd.m4 directly.
11593 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11594 <agriffis@toolchain.org>.
11595 * aclocal.m4, configure: Regenerated.
11596
bec39cab
AC
115972005-01-07 Andrew Cagney <cagney@gnu.org>
11598
11599 * configure.ac: Rename configure.in, require autoconf 2.59.
11600 * configure: Re-generate.
11601
434c4c77
DJ
116022004-12-08 Daniel Jacobowitz <dan@debian.org>
11603
11604 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11605 LIBS when finished.
11606 * aclocal.m4: Regenerated.
11607 * configure: Regenerated.
11608
db1d3e1b
AS
116092004-11-21 Andreas Schwab <schwab@suse.de>
11610
11611 * linux-m68k-low.c (m68k_num_gregs): Define.
11612 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11613 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11614 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11615 (m68k_breakpoint_at): New. Add to the_low_target.
11616
11617 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11618 srv_linux_thread_db to yes.
11619
43360365
JB
116202004-10-20 Joel Brobecker <brobecker@gnat.com>
11621
11622 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11623 (ARCH_SET_FS): Likewise.
11624 (ARCH_GET_FS): Likewise.
11625 (ARCH_GET_GS): Likewise.
11626
fd500816
DJ
116272004-10-16 Daniel Jacobowitz <dan@debian.org>
11628
11629 * linux-i386-low.c (ps_get_thread_area): New.
11630 * linux-x86-64-low.c (ps_get_thread_area): New.
11631 * linux-low.c: Include <sys/syscall.h>.
11632 (linux_kill_one_process): Don't kill the first thread here.
11633 (linux_kill): Kill the first thread here.
11634 (kill_lwp): New function.
11635 (send_sigstop, linux_send_signal): Use it.
11636 * proc-service.c: Clean up #ifdefs.
11637 (fpregset_info): Delete.
11638 (ps_lgetregs): Update and enable implementation.
11639 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11640 implementations.
11641 * remote-utils.c (struct sym_cache, symbol_cache): New.
11642 (input_interrupt): Print a clearer message.
11643 (async_io_enabled): New variable.
11644 (enable_async_io, disable_async_io): Use it. Update comments.
11645 (look_up_one_symbol): Use the symbol cache.
11646 * thread-db.c (thread_db_look_up_symbols): New function.
11647 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11648
f6de3c42
DJ
116492004-10-16 Daniel Jacobowitz <dan@debian.org>
11650
11651 * configure.in: Test for -rdynamic.
11652 * configure: Regenerated.
11653 * Makefile (INTERNAL_LDFLAGS): New.
11654 (gdbserver, gdbreplay): Use it.
11655
2c0fc042
AC
116562004-09-02 Andrew Cagney <cagney@gnu.org>
11657
11658 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11659
075b3282
DJ
116602004-03-23 Daniel Jacobowitz <drow@mvista.com>
11661
11662 * linux-low.c (linux_wait): Clear all_processes list also.
11663
fa6a77dc
DJ
116642004-03-12 Daniel Jacobowitz <drow@mvista.com>
11665
11666 * linux-low.c: Include <errno.h>. Remove extern declaration of
11667 errno.
11668
6d782a97
DJ
116692004-03-12 Daniel Jacobowitz <drow@mvista.com>
11670
11671 * gdbreplay.c, server.h, utils.c: Update copyright years.
11672
3a7fb99b
DJ
116732004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11674
11675 * server.c (main): Print child status or termination signal from
11676 variable 'signal', not 'sig'.
11677
c3e735a6
DJ
116782004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11679
11680 * linux-low.c (linux_read_memory): Change return type to
11681 int. Check for and return error from ptrace().
11682 * target.c (read_inferior_memory): Change return type to int. Pass
11683 back return status from the_target->read_memory().
11684 * target.h (struct target_ops): Adapt *read_memory() prototype.
11685 Update comment.
11686 (read_inferior_memory): Adapt prototype.
11687 * server.c (main): Return an error packet if
11688 read_inferior_memory() returns an error.
11689
a59d1c82
DJ
116902004-03-04 Daniel Jacobowitz <drow@mvista.com>
11691
11692 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11693 Unify with other clean targets.
11694
dc3f8883
DJ
116952004-02-29 Daniel Jacobowitz <drow@mvista.com>
11696
11697 * server.c (handle_v_cont): Call set_desired_inferior.
11698
89a208da
DJ
116992004-02-29 Daniel Jacobowitz <drow@mvista.com>
11700
11701 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11702
62ea82f5
DJ
117032004-02-29 Daniel Jacobowitz <drow@mvista.com>
11704
11705 * linux-low.c (linux_wait): Unblock async I/O.
11706 (linux_resume): Block and enable async I/O.
11707 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11708 * server.h (block_async_io, unblock_async_io): Add prototypes.
11709
6910d122
DJ
117102004-02-29 Daniel Jacobowitz <drow@mvista.com>
11711
11712 * remote-utils.c (remote_open): Print a status notice after
11713 opening a TCP port.
11714 * server.c (attach_inferior): Print a status notice after
11715 attaching.
11716
117172004-02-29 Daniel Jacobowitz <drow@mvista.com>
d677d77d
DJ
11718
11719 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11720
c89dc5d4
DJ
117212004-02-26 Daniel Jacobowitz <drow@mvista.com>
11722
11723 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11724 error packet.
11725 * server.c, target.h: Update copyright years.
11726
4b8dad4a
RM
117272004-02-25 Roland McGrath <roland@redhat.com>
11728
11729 * target.h (struct target_ops): New member `read_auxv'.
11730 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11731 * linux-low.c (linux_read_auxv): New function.
11732 (linux_target_ops): Initialize `read_auxv' member to that.
11733
d7446758
JB
117342004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11735
11736 Committed by Jim Blandy <jimb@redhat.com>.
11737
11738 * linux-s390-low.c (s390_num_regs): Update.
4b8dad4a 11739 (s390_regmap): Remove control registers. Use __s390x__ predefine
d7446758
JB
11740 instead of GPR_SIZE to distiguish s390 and s390x targets.
11741
5544ad89
DJ
117422004-01-31 Daniel Jacobowitz <drow@mvista.com>
11743
11744 * linux-low.c: Update copyright year.
11745 (check_removed_breakpoint): Clear pending_is_breakpoint.
11746 (linux_set_resume_request, linux_queue_one_thread)
11747 (resume_status_pending_p): New functions.
11748 (linux_continue_one_thread): Use process->resume.
11749 (linux_resume): Only resume threads if there are no pending events.
11750 * linux-low.h (struct process_info): Add resume request
11751 pointer.
11752
2a68b70e
DJ
117532004-01-30 Daniel Jacobowitz <drow@mvista.com>
11754
11755 * regcache.c (new_register_cache): Clear the allocated register
11756 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11757
64386c31
DJ
117582003-10-13 Daniel Jacobowitz <drow@mvista.com>
11759
11760 * linux-low.c (linux_resume): Take a struct thread_resume *
11761 argument.
11762 (linux_wait): Update call.
11763 (resume_ptr): New static variable.
11764 (linux_continue_one_thread): Renamed from
11765 linux_continue_one_process. Use resume_ptr.
11766 (linux_resume): Use linux_continue_one_thread.
11767 * server.c (handle_v_cont, handle_v_requests): New functions.
11768 (myresume): New function.
11769 (main): Handle 'v' case.
11770 * target.h (struct thread_resume): New type.
11771 (struct target_ops): Change argument of "resume" to struct
11772 thread_resume *.
11773 (myresume): Delete macro.
11774
c938e9b0
L
117752003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11776
11777 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11778 (uninstall): Support DESTDIR.
11779
7f313d07
BC
11780Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11781
11782 * configure.srv: Add xscale*linux copy of arm*linux entry.
11783
3b2fc2ea
DJ
117842003-07-24 Daniel Jacobowitz <drow@mvista.com>
11785
11786 * linux-arm-low.c (arm_reinsert_addr): New function.
11787 (the_low_target): Add arm_reinsert_addr.
11788
1c0a559e
MK
117892003-07-08 Mark Kettenis <kettenis@gnu.org>
11790
11791 * mem-break.c: Remove whitespace at end of file.
11792
43d5792c
DJ
117932003-06-28 Daniel Jacobowitz <drow@mvista.com>
11794
11795 * configure.in: Check whether we need to prototype strerror.
11796 * server.h: Optionally prototype strerror.
11797 * gdbreplay.c (perror_with_name): Use strerror.
11798 * linux-low.c (linux_attach_lwp): Use strerror.
11799 * utils.c (perror_with_name): Use strerror.
11800 * config.in, configure: Regenerated.
11801
c8a86edf
DJ
118022003-06-28 Daniel Jacobowitz <drow@mvista.com>
11803
11804 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11805 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11806
73d37363
DJ
118072003-06-20 Daniel Jacobowitz <drow@mvista.com>
11808
11809 * Makefile.in (SFILES): Update.
11810 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11811 low-sun3.c: Remove files.
11812
6ad8ae5c
DJ
118132003-06-17 Daniel Jacobowitz <drow@mvista.com>
11814
11815 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11816 (linux_detach_one_process, linux_detach): New functions.
11817 (linux_target_ops): Add linux_detach.
11818 * server.c (main): Handle 'D' packet.
11819 * target.h (struct target_ops): Add "detach" member.
11820 (detach_inferior): Define.
11821
1581182a
MK
118222003-06-13 Mark Kettenis <kettenis@gnu.org>
11823
11824 From Kelley Cook <kelleycook@wideopenwest.com>:
11825 * configure.srv: Accept i[34567]86 variants.
11826
e5379b03
DJ
118272003-06-05 Daniel Jacobowitz <drow@mvista.com>
11828
11829 * linux-low.c (linux_wait_for_event): Correct comment typos.
11830 (linux_resume_one_process): Call check_removed_breakpoint.
11831 (linux_send_signal): New function.
11832 (linux_target_ops): Add linux_send_signal.
11833 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11834 of kill.
11835 * target.h (struct target_ops): Add send_signal.
11836
2ff29de4
JB
118372003-05-29 Jim Blandy <jimb@redhat.com>
11838
11839 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11840 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11841 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11842 away part of the register's value.
11843
254787d4
DJ
118442003-03-26 Daniel Jacobowitz <drow@mvista.com>
11845
11846 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11847 (linux_wait_for_event, linux_init_signals): Likewise.
11848
94e10508
DJ
118492003-03-17 Daniel Jacobowitz <drow@mvista.com>
11850
11851 * configure.in: Check for stdlib.h.
11852 * configure: Regenerated.
11853 * config.in: Regenerated.
11854
4c0711e0
DJ
118552003-01-04 Andreas Schwab <schwab@suse.de>
11856
11857 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11858
ef66e766
AC
118592003-01-02 Andrew Cagney <ac131313@redhat.com>
11860
11861 * Makefile.in: Remove obsolete code.
11862
a1358604
DJ
118632002-11-20 Daniel Jacobowitz <drow@mvista.com>
11864
11865 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11866 defined(PT_FPR0_HI).
11867
23ce3b1c
DJ
118682002-11-17 Stuart Hughes <seh@zee2.com>
11869
11870 * linux-arm-low.c (arm_num_regs): Increase.
11871 (arm_regmap): Include status register.
11872
118732002-11-17 Daniel Jacobowitz <drow@mvista.com>
11874
11875 * linux-low.c (register_addr): Remove incorrect -1 check.
11876
a9fa9f7d
DJ
118772002-08-29 Daniel Jacobowitz <drow@mvista.com>
11878
11879 * linux-low.c (linux_create_inferior): Call setpgid. Return
11880 the new PID.
11881 (unstopped_p, linux_signal_pid): Remove.
11882 (linux_target_ops): Remove linux_signal_pid.
11883 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11884 global instead of target method.
11885 * target.h (struct target_ops): Remove signal_pid. Update comment
11886 for create_inferior.
11887 * server.c (signal_pid): New variable.
11888 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
4b8dad4a 11889 gdbserver. Set the child to be the foreground process group.
a9fa9f7d
DJ
11890 (attach_inferior): Set signal_pid.
11891
17574093
DJ
118922002-08-23 Daniel Jacobowitz <drow@mvista.com>
11893
11894 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11895
118962002-08-20 Jim Blandy <jimb@redhat.com>
11897
11898 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11899 default for this.
11900
119012002-08-01 Andrew Cagney <cagney@redhat.com>
11902
11903 * Makefile.in: Make chill references obsolete.
11904
119052002-07-24 Kevin Buettner <kevinb@redhat.com>
11906
11907 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11908 * configure: Regenerate.
11909 * config.in: Regenerate.
11910
119112002-07-09 David O'Brien <obrien@FreeBSD.org>
11912
11913 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11914 (perror_with_name, remote_close, remote_open, expect, play): Static.
11915
119162002-07-04 Michal Ludvig <mludvig@suse.cz>
11917
4b8dad4a 11918 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
17574093
DJ
11919 byte offsets instead of an array of indexes.
11920 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11921
119222002-06-13 Daniel Jacobowitz <drow@mvista.com>
11923
11924 * regcache.c: Add comment.
11925
119262002-06-11 Daniel Jacobowitz <drow@mvista.com>
11927
11928 * thread-db.c: New file.
11929 * proc-service.c: New file.
11930 * acinclude.m4: New file.
11931 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11932 proc-service.o, and thread-db.o.
11933 (linux-low.o): Add USE_THREAD_DB.
11934 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11935 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11936 * aclocal.m4: Regenerated.
11937 * config.in: Regenerated.
11938 * configure: Regenerated.
11939 * configure.in: Check for proc_service.h, sys/procfs.h,
11940 thread_db.h, and linux/elf.h headrs.
11941 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11942 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11943 Check for -lthread_db and thread support.
11944 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11945 PowerPC, and SuperH.
11946 * i387-fp.c: Constify arguments.
11947 * i387-fp.h: Likewise.
11948 * inferiors.c: (struct thread_info): Renamed from
11949 `struct inferior_info'. Remove PID member. Use generic inferior
11950 list header. All uses updated.
11951 (inferiors, signal_pid): Removed.
11952 (all_threads): New variable.
11953 (get_thread): Define.
11954 (add_inferior_to_list): New function.
11955 (for_each_inferior): New function.
11956 (change_inferior_id): New function.
11957 (add_inferior): Removed.
11958 (remove_inferior): New function.
11959 (add_thread): New function.
11960 (free_one_thread): New function.
11961 (remove_thread): New function.
11962 (clear_inferiors): Use for_each_inferior and free_one_thread.
11963 (find_inferior): New function.
11964 (find_inferior_id): New function.
11965 (inferior_target_data): Update argument type.
11966 (set_inferior_target_data): Likewise.
11967 (inferior_regcache_data): Likewise.
11968 (set_inferior_regcache_data): Likewise.
11969 * linux-low.c (linux_bp_reinsert): Remove.
11970 (all_processes, stopping_threads, using_thrads)
11971 (struct pending_signals, debug_threads, pid_of): New.
11972 (inferior_pid): Replace with macro.
11973 (struct inferior_linux_data): Remove.
11974 (get_stop_pc, add_process): New functions.
11975 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11976 Use add_process and add_thread.
11977 (linux_attach_lwp): New function, based on old linux_attach. Use
11978 add_process and add_thread. Set stop_expected for new threads.
11979 (linux_attach): New function.
11980 (linux_kill_one_process): New function.
11981 (linux_kill): Kill all LWPs.
11982 (linux_thread_alive): Use find_inferior_id.
11983 (check_removed_breakpoints, status_pending_p): New functions.
11984 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11985 Update. Use WNOHANG. Wait for cloned processes also. Update process
11986 struct for the found process.
11987 (linux_wait_for_event): New function.
11988 (linux_wait): Use it. Support LWPs.
11989 (send_sigstop, wait_for_sigstop, stop_all_processes)
11990 (linux_resume_one_process, linux_continue_one_process): New functions.
11991 (linux_resume): Support LWPs.
11992 (REGISTER_RAW_SIZE): Remove.
11993 (fetch_register): Use register_size instead. Call supply_register.
11994 (usr_store_inferior_registers): Likewise. Call collect_register.
11995 Fix recursive case.
11996 (regsets_fetch_inferior_registers): Improve error message.
11997 (regsets_store_inferior_registers): Add debugging.
11998 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11999 (unstopped_p, linux_signal_pid): New functions.
12000 (linux_target_ops): Add linux_signal_pid.
12001 (linux_init_signals): New function.
12002 (initialize_low): Call it. Initialize using_threads.
12003 * regcache.c (inferior_regcache_data): Add valid
12004 flag.
12005 (get_regcache): Fetch registers lazily. Add fetch argument
12006 and update all callers.
12007 (regcache_invalidate_one, regcache_invalidate): New
12008 functions.
12009 (new_register_cache): Renamed from create_register_cache.
12010 Return the new regcache.
12011 (free_register_cache): Change argument to a void *.
12012 (registers_to_string, registers_from_string): Call get_regcache
12013 with fetch flag set.
12014 (register_data): Make static. Pass fetch flag to get_regcache.
12015 (supply_register): Call get_regcache with fetch flag clear.
12016 (collect_register): Call get_regcache with fetch flag set.
12017 (collect_register_as_string): New function.
12018 * regcache.h: Update.
12019 * remote-utils.c (putpkt): Flush after debug output and use
12020 stderr.
12021 Handle input interrupts while waiting for an ACK.
12022 (input_interrupt): Use signal_pid method.
12023 (getpkt): Flush after debug output and use stderr.
12024 (outreg): Use collect_register_as_string.
12025 (new_thread_notify, dead_thread_notify): New functions.
12026 (prepare_resume_reply): Check using_threads. Set thread_from_wait
12027 and general_thread.
12028 (look_up_one_symbol): Flush after debug output.
12029 * server.c (step_thread, server_waiting): New variables.
12030 (start_inferior): Don't use signal_pid. Update call to mywait.
12031 (attach_inferior): Update call to mywait.
12032 (handle_query): Handle qfThreadInfo and qsThreadInfo.
12033 (main): Don't fetch/store registers explicitly. Use
12034 set_desired_inferior. Support proposed ``Hs'' packet. Update
12035 calls to mywait.
12036 * server.h: Update.
12037 (struct inferior_list, struct_inferior_list_entry): New.
12038 * target.c (set_desired_inferior): New.
12039 (write_inferior_memory): Constify.
12040 (mywait): New function.
12041 * target.h: Update.
12042 (struct target_ops): New signal_pid method.
12043 (mywait): Removed macro, added prototype.
12044
12045 * linux-low.h (regset_func): Removed.
12046 (regset_fill_func, regset_store_func): New.
12047 (enum regset_type): New.
12048 (struct regset_info): Add type field. Use new operation types.
12049 (struct linux_target_ops): stop_pc renamed to get_pc.
12050 Add decr_pc_after_break and breakpoint_at.
12051 (get_process, get_thread_proess, get_process_thread)
12052 (strut process_info, all_processes, linux_attach_lwp)
12053 (thread_db_init): New.
12054
12055 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12056 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12057 (the_low_target): Add new members.
12058 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12059 (i386_store_fpxregset): Constify.
12060 (target_regsets): Add new kind identifier.
12061 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12062 (i386_set_pc): Add debugging.
12063 (i386_breakpoint_at): New function.
12064 (the_low_target): Add new members.
12065 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12066 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12067 (mips_breakpoint_at): New.
12068 (the_low_target): Add new members.
12069 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12070 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12071 (the_low_target): Add new members.
12072 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12073 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12074 (the_low_target): Add new members.
12075 * linux-x86-64-low.c (target_regsets): Add new kind
12076 identifier.
12077
120782002-05-15 Daniel Jacobowitz <drow@mvista.com>
12079
12080 From Martin Pool <mbp@samba.org>:
12081 * server.c (gdbserver_usage): New function.
12082 (main): Call it.
12083
120842002-05-14 Daniel Jacobowitz <drow@mvista.com>
12085
12086 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12087 stop_at -> stop_pc.
12088
120892002-05-04 Andrew Cagney <ac131313@redhat.com>
12090
12091 * Makefile.in: Remove obsolete code.
12092
120932002-04-24 Michal Ludvig <mludvig@suse.cz>
12094
12095 * linux-low.c (regsets_fetch_inferior_registers),
12096 (regsets_store_inferior_registers): Removed cast to int from
12097 ptrace() calls.
12098 * regcache.h: Added declaration of struct inferior_info.
12099
121002002-04-20 Daniel Jacobowitz <drow@mvista.com>
12101
12102 * inferiors.c (struct inferior_info): Add regcache_data.
12103 (add_inferior): Call create_register_cache.
12104 (clear_inferiors): Call free_register_cache.
12105 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12106 * regcache.c (struct inferior_regcache_data): New.
12107 (registers): Remove.
12108 (get_regcache): New function.
12109 (create_register_cache, free_register_cache): New functions.
12110 (set_register_cache): Don't initialize the register cache here.
12111 (registers_to_string, registers_from_string, register_data): Call
12112 get_regcache.
12113 * regcache.h: Add prototypes.
12114 * server.h: Likewise.
12115
121162002-04-20 Daniel Jacobowitz <drow@mvista.com>
12117
12118 * mem-break.c: New file.
12119 * mem-break.h: New file.
12120 * Makefile.in: Add mem-break.o rule; update server.h
12121 dependencies.
12122 * inferiors.c (struct inferior_info): Add target_data
12123 member.
12124 (clear_inferiors): Free target_data member if set.
12125 (inferior_target_data, set_inferior_target_data): New functions.
12126 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12127 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12128 * linux-low.c (linux_bp_reinsert): New variable.
12129 (struct inferior_linux_data): New.
12130 (linux_create_inferior): Use set_inferior_target_data.
12131 (linux_attach): Likewise. Call add_inferior.
12132 (linux_wait_for_one_inferior): New function.
12133 (linux_wait): Call it.
12134 (linux_write_memory): Add const.
12135 (initialize_low): Call set_breakpoint_data.
12136 * linux-low.h (struct linux_target_ops): Add breakpoint
12137 handling members.
12138 * server.c (attach_inferior): Remove extra add_inferior
12139 call.
12140 * server.h: Include mem-break.h. Update inferior.c
12141 prototypes.
12142 * target.c (read_inferior_memory)
12143 (write_inferior_memory): New functions.
12144 * target.h (read_inferior_memory)
12145 (write_inferior_memory): Change macros to prototypes.
12146 (struct target_ops): Update comments. Add const to write_memory
12147 definition.
12148
121492002-04-11 Daniel Jacobowitz <drow@mvista.com>
12150
12151 * linux-low.c (usr_store_inferior_registers): Support
12152 registers which are allowed to fail to store.
12153 * linux-low.h (linux_target_ops): Likewise.
12154 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12155 (ppc_cannot_store_register): FPSCR may not be storable.
12156
121572002-04-09 Daniel Jacobowitz <drow@mvista.com>
12158
12159 * server.h: Include <string.h> if HAVE_STRING_H.
12160 * ChangeLog: Correct paths in last ChangeLog entry.
12161
121622002-04-09 Daniel Jacobowitz <drow@mvista.com>
12163
12164 * linux-low.h: Remove obsolete prototypes.
12165 (struct linux_target_ops): New.
12166 (extern the_low_target): New.
12167 * linux-low.c (num_regs, regmap): Remove declarations.
12168 (register_addr): Use the_low_target explicitly.
12169 (fetch_register): Likewise.
12170 (usr_fetch_inferior_registers): Likewise.
12171 (usr_store_inferior_registers): Likewise.
12172 * linux-arm-low.c (num_regs): Remove.
12173 (arm_num_regs): Define.
12174 (arm_regmap): Renamed from regmap, made static.
12175 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12176 made static.
12177 (arm_cannot_store_register): Renamed from cannot_store_register,
12178 made static.
12179 (the_low_target): New.
12180 * linux-i386-low.c (num_regs): Remove.
12181 (i386_num_regs): Define.
12182 (i386_regmap): Renamed from regmap, made static.
12183 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12184 made static.
12185 (i386_cannot_store_register): Renamed from cannot_store_register,
12186 made static.
12187 (the_low_target): New.
12188 * linux-ia64-low.c (num_regs): Remove.
12189 (ia64_num_regs): Define.
12190 (ia64_regmap): Renamed from regmap, made static.
12191 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12192 made static.
12193 (ia64_cannot_store_register): Renamed from cannot_store_register,
12194 made static.
12195 (the_low_target): New.
12196 * linux-m68k-low.c (num_regs): Remove.
12197 (m68k_num_regs): Define.
12198 (m68k_regmap): Renamed from regmap, made static.
12199 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12200 made static.
12201 (m68k_cannot_store_register): Renamed from cannot_store_register,
12202 made static.
12203 (the_low_target): New.
12204 * linux-mips-low.c (num_regs): Remove.
12205 (mips_num_regs): Define.
12206 (mips_regmap): Renamed from regmap, made static.
12207 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12208 made static.
12209 (mips_cannot_store_register): Renamed from cannot_store_register,
12210 made static.
12211 (the_low_target): New.
12212 * linux-ppc-low.c (num_regs): Remove.
12213 (ppc_num_regs): Define.
12214 (ppc_regmap): Renamed from regmap, made static.
12215 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12216 made static.
12217 (ppc_cannot_store_register): Renamed from cannot_store_register,
12218 made static.
12219 (the_low_target): New.
12220 * linux-s390-low.c (num_regs): Remove.
12221 (s390_num_regs): Define.
12222 (s390_regmap): Renamed from regmap, made static.
12223 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12224 made static.
12225 (s390_cannot_store_register): Renamed from cannot_store_register,
12226 made static.
12227 (the_low_target): New.
12228 * linux-sh-low.c (num_regs): Remove.
12229 (sh_num_regs): Define.
12230 (sh_regmap): Renamed from regmap, made static.
12231 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12232 made static.
12233 (sh_cannot_store_register): Renamed from cannot_store_register,
12234 made static.
12235 (the_low_target): New.
12236 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12237 (the_low_target): New.
12238
122392002-04-09 Daniel Jacobowitz <drow@mvista.com>
12240
12241 * Makefile.in: Add stamp-h target.
12242 * configure.in: Create stamp-h.
12243 * configure: Regenerated.
12244
122452002-04-09 Daniel Jacobowitz <drow@mvista.com>
12246
12247 * inferiors.c: New file.
12248 * target.c: New file.
12249 * target.h: New file.
12250 * Makefile.in: Add target.o and inferiors.o. Update
12251 dependencies.
12252 * linux-low.c (inferior_pid): New static variable,
12253 moved from server.c.
12254 (linux_create_inferior): Renamed from create_inferior.
12255 Call add_inferior. Return 0 on success instead of a PID.
12256 (linux_attach): Renamed from myattach.
12257 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12258 (linux_thread_alive): Renamed from mythread_alive.
12259 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12260 child dies.
12261 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12262 (regsets_store_inferior_registers): Correct error message.
12263 Add missing ``return 0''.
12264 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12265 (linux_store_registers): Renamed from store_inferior_registers.
12266 (linux_read_memory): Renamed from read_inferior_memory.
12267 (linux_write_memory): Renamed from write_inferior_memory.
12268 (linux_target_ops): New structure.
12269 (initialize_low): Call set_target_ops ().
12270 * remote-utils.c (unhexify): New function.
12271 (hexify): New function.
12272 (input_interrupt): Send signals to ``signal_pid''.
12273 * server.c (inferior_pid): Remove.
12274 (start_inferior): Update create_inferior call.
12275 (attach_inferior): Call add_inferior.
12276 (handle_query): New function.
12277 (main): Call handle_query for `q' packets.
12278 * server.h: Include "target.h". Remove obsolete prototypes.
12279 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12280
122812002-04-09 Daniel Jacobowitz <drow@mvista.com>
12282
12283 * Makefile.in: Add WARN_CFLAGS. Update configury
12284 dependencies.
12285 * configure.in: Check for <string.h>
12286 * configure: Regenerate.
12287 * config.in: Regenerate.
12288 * gdbreplay.c: Include needed system headers.
12289 (remote_open): Remove strchr prototype.
12290 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12291 * regcache.c (supply_register): Change buf argument to const void *.
12292 (supply_register_by_name): Likewise.
12293 (collect_register): Change buf argument to void *.
12294 (collect_register_by_name): Likewise.
12295 * regcache.h: Add missing prototypes.
12296 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12297 * server.c (handle_query): New function.
12298 (attached): New static variable, moved out of main.
12299 (main): Quiet longjmp clobber warnings.
12300 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12301 * utils.c (error): Remove NORETURN.
12302 (fatal): Likewise.