Implement target_emit_ops
[deliverable/binutils-gdb.git] / gdb / gdbserver / ChangeLog
1 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
2
3 * linux-aarch64-low-.c: Include ax.h and tracepoint.h.
4 (enum aarch64_opcodes) <RET>, <SUBS>, <AND>, <ORR>, <ORN>,
5 <EOR>, <LSLV>, <LSRV>, <ASRV>, <SBFM>, <UBFM>, <CSINC>, <MUL>,
6 <NOP>: New.
7 (enum aarch64_condition_codes): New enum.
8 (w0): New static global.
9 (fp): Likewise.
10 (lr): Likewise.
11 (struct aarch64_memory_operand) <type>: New
12 MEMORY_OPERAND_POSTINDEX type.
13 (postindex_memory_operand): New helper function.
14 (emit_ret): New function.
15 (emit_load_store_pair): New function, factored out of emit_stp
16 with support for MEMORY_OPERAND_POSTINDEX.
17 (emit_stp): Rewrite using emit_load_store_pair.
18 (emit_ldp): New function.
19 (emit_load_store): Likewise.
20 (emit_ldr): Mention post-index instruction in comment.
21 (emit_ldrh): New function.
22 (emit_ldrb): New function.
23 (emit_ldrsw): Mention post-index instruction in comment.
24 (emit_str): Likewise.
25 (emit_subs): New function.
26 (emit_cmp): Likewise.
27 (emit_and): Likewise.
28 (emit_orr): Likewise.
29 (emit_orn): Likewise.
30 (emit_eor): Likewise.
31 (emit_mvn): Likewise.
32 (emit_lslv): Likewise.
33 (emit_lsrv): Likewise.
34 (emit_asrv): Likewise.
35 (emit_mul): Likewise.
36 (emit_sbfm): Likewise.
37 (emit_sbfx): Likewise.
38 (emit_ubfm): Likewise.
39 (emit_ubfx): Likewise.
40 (emit_csinc): Likewise.
41 (emit_cset): Likewise.
42 (emit_nop): Likewise.
43 (emit_ops_insns): New helper function.
44 (emit_pop): Likewise.
45 (emit_push): Likewise.
46 (aarch64_emit_prologue): New function.
47 (aarch64_emit_epilogue): Likewise.
48 (aarch64_emit_add): Likewise.
49 (aarch64_emit_sub): Likewise.
50 (aarch64_emit_mul): Likewise.
51 (aarch64_emit_lsh): Likewise.
52 (aarch64_emit_rsh_signed): Likewise.
53 (aarch64_emit_rsh_unsigned): Likewise.
54 (aarch64_emit_ext): Likewise.
55 (aarch64_emit_log_not): Likewise.
56 (aarch64_emit_bit_and): Likewise.
57 (aarch64_emit_bit_or): Likewise.
58 (aarch64_emit_bit_xor): Likewise.
59 (aarch64_emit_bit_not): Likewise.
60 (aarch64_emit_equal): Likewise.
61 (aarch64_emit_less_signed): Likewise.
62 (aarch64_emit_less_unsigned): Likewise.
63 (aarch64_emit_ref): Likewise.
64 (aarch64_emit_if_goto): Likewise.
65 (aarch64_emit_goto): Likewise.
66 (aarch64_write_goto_address): Likewise.
67 (aarch64_emit_const): Likewise.
68 (aarch64_emit_call): Likewise.
69 (aarch64_emit_reg): Likewise.
70 (aarch64_emit_pop): Likewise.
71 (aarch64_emit_stack_flush): Likewise.
72 (aarch64_emit_zero_ext): Likewise.
73 (aarch64_emit_swap): Likewise.
74 (aarch64_emit_stack_adjust): Likewise.
75 (aarch64_emit_int_call_1): Likewise.
76 (aarch64_emit_void_call_2): Likewise.
77 (aarch64_emit_eq_goto): Likewise.
78 (aarch64_emit_ne_goto): Likewise.
79 (aarch64_emit_lt_goto): Likewise.
80 (aarch64_emit_le_goto): Likewise.
81 (aarch64_emit_gt_goto): Likewise.
82 (aarch64_emit_ge_got): Likewise.
83 (aarch64_emit_ops_impl): New static global variable.
84 (aarch64_emit_ops): New target function, return
85 &aarch64_emit_ops_impl.
86 (struct linux_target_ops): Install it.
87
88 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
89
90 * Makefile.in (linux-aarch64-ipa.o, aarch64-ipa.o): New rules.
91 * configure.srv (aarch64*-*-linux*): Add linux-aarch64-ipa.o and
92 aarch64-ipa.o.
93 * linux-aarch64-ipa.c: New file.
94 * linux-aarch64-low.c: Include arch/aarch64-insn.h, inttypes.h
95 and endian.h.
96 (aarch64_get_thread_area): New target method.
97 (extract_signed_bitfield): New helper function.
98 (aarch64_decode_ldr_literal): New function.
99 (enum aarch64_opcodes): New enum.
100 (struct aarch64_register): New struct.
101 (struct aarch64_operand): New struct.
102 (x0): New static global.
103 (x1): Likewise.
104 (x2): Likewise.
105 (x3): Likewise.
106 (x4): Likewise.
107 (w2): Likewise.
108 (ip0): Likewise.
109 (sp): Likewise.
110 (xzr): Likewise.
111 (aarch64_register): New helper function.
112 (register_operand): Likewise.
113 (immediate_operand): Likewise.
114 (struct aarch64_memory_operand): New struct.
115 (offset_memory_operand): New helper function.
116 (preindex_memory_operand): Likewise.
117 (enum aarch64_system_control_registers): New enum.
118 (ENCODE): New macro.
119 (emit_insn): New helper function.
120 (emit_b): New function.
121 (emit_bcond): Likewise.
122 (emit_cb): Likewise.
123 (emit_tb): Likewise.
124 (emit_blr): Likewise.
125 (emit_stp): Likewise.
126 (emit_ldp_q_offset): Likewise.
127 (emit_stp_q_offset): Likewise.
128 (emit_load_store): Likewise.
129 (emit_ldr): Likewise.
130 (emit_ldrsw): Likewise.
131 (emit_str): Likewise.
132 (emit_ldaxr): Likewise.
133 (emit_stxr): Likewise.
134 (emit_stlr): Likewise.
135 (emit_data_processing_reg): Likewise.
136 (emit_data_processing): Likewise.
137 (emit_add): Likewise.
138 (emit_sub): Likewise.
139 (emit_mov): Likewise.
140 (emit_movk): Likewise.
141 (emit_mov_addr): Likewise.
142 (emit_mrs): Likewise.
143 (emit_msr): Likewise.
144 (emit_sevl): Likewise.
145 (emit_wfe): Likewise.
146 (append_insns): Likewise.
147 (can_encode_int32_in): New helper function.
148 (aarch64_relocate_instruction): New function.
149 (aarch64_install_fast_tracepoint_jump_pad): Likewise.
150 (aarch64_get_min_fast_tracepoint_insn_len): Likewise.
151 (struct linux_target_ops): Install aarch64_get_thread_area,
152 aarch64_install_fast_tracepoint_jump_pad and
153 aarch64_get_min_fast_tracepoint_insn_len.
154
155 2015-09-21 Pierre Langlois <pierre.langlois@arm.com>
156
157 * Makefile.in (aarch64-insn.o): New rule.
158 * configure.srv (aarch64*-*-linux*): Add aarch64-insn.o.
159
160 2015-09-21 Yao Qi <yao.qi@linaro.org>
161
162 * ax.c [!IN_PROCESS_AGENT] (gdb_agent_op_sizes): Define it.
163
164 2015-09-21 Yao Qi <yao.qi@linaro.org>
165
166 * tracepoint.c (max_jump_pad_size): Remove.
167
168 2015-09-18 Yao Qi <yao.qi@linaro.org>
169
170 * linux-aarch64-low.c: Don't include sys/uio.h.
171 (ps_get_thread_area): Call aarch64_ps_get_thread_area.
172
173 2015-09-16 Wei-cheng Wang <cole945@gmail.com>
174
175 * tracepoint.c (eval_result_type): Change prototype.
176 (condition_true_at_tracepoint): Fix argument to compiled_cond.
177
178 2015-09-15 Pedro Alves <palves@redhat.com>
179
180 * remote-utils.c (prepare_resume_reply) <TARGET_WAITKIND_EXECD>:
181 Check whether to report exec events instead of checking whether
182 multiprocess is enabled.
183
184 2015-09-15 Pedro Alves <palves@redhat.com>
185
186 PR remote/18965
187 * remote-utils.c (prepare_resume_reply): Merge
188 TARGET_WAITKIND_VFORK_DONE switch case with the
189 TARGET_WAITKIND_FORKED case.
190
191 2015-09-15 Yao Qi <yao.qi@linaro.org>
192
193 * server.c (handle_query): Check string comparison using
194 "else if" instead of "if".
195
196 2015-09-15 Yao Qi <yao.qi@linaro.org>
197
198 * server.c (vCont_supported): New global variable.
199 (handle_query): Set vCont_supported to 1 if "vContSupported+"
200 matches. Append ";vContSupported+" to own_buf.
201 (handle_v_requests): Append ";s;S" to own_buf if target supports
202 hardware single step or vCont_supported is false.
203 (capture_main): Set vCont_supported to zero.
204
205 2015-09-15 Yao Qi <yao.qi@linaro.org>
206
207 * linux-low.c (linux_supports_conditional_breakpoints): Rename
208 it to ...
209 (linux_supports_hardware_single_step): ... New function.
210 (linux_target_ops): Update.
211 * lynx-low.c (lynx_target_ops): Set field
212 supports_hardware_single_step to target_can_do_hardware_single_step.
213 * nto-low.c (nto_target_ops): Likewise.
214 * spu-low.c (spu_target_ops): Likewise.
215 * win32-low.c (win32_target_ops): Likewise.
216 * target.c (target_can_do_hardware_single_step): New function.
217 * target.h (struct target_ops) <supports_conditional_breakpoints>:
218 Remove. <supports_hardware_single_step>: New field.
219 (target_supports_conditional_breakpoints): Remove.
220 (target_supports_hardware_single_step): New macro.
221 (target_can_do_hardware_single_step): Declare.
222 * server.c (handle_query): Use target_supports_hardware_single_step
223 instead of target_supports_conditional_breakpoints.
224
225 2015-09-15 Yao Qi <yao.qi@linaro.org>
226
227 * linux-aarch64-low.c (aarch64_linux_siginfo_fixup): New
228 function.
229 (struct linux_target_ops the_low_target): Install
230 aarch64_linux_siginfo_fixup.
231
232 2015-09-11 Don Breazeal <donb@codesourcery.com>
233 Luis Machado <lgustavo@codesourcery.com>
234
235 * linux-low.c (linux_mourn): Static declaration.
236 (linux_arch_setup): Move in front of
237 handle_extended_wait.
238 (linux_arch_setup_thread): New function.
239 (handle_extended_wait): Handle exec events. Call
240 linux_arch_setup_thread. Make event_lwp argument a
241 pointer-to-a-pointer.
242 (check_zombie_leaders): Do not check stopped threads.
243 (linux_low_ptrace_options): Add PTRACE_O_TRACEEXEC.
244 (linux_low_filter_event): Add lwp and thread for exec'ing
245 non-leader thread if leader thread has been deleted.
246 Refactor code into linux_arch_setup_thread and call it.
247 Pass child lwp pointer by reference to handle_extended_wait.
248 (linux_wait_for_event_filtered): Update comment.
249 (linux_wait_1): Prevent clobbering exec event status.
250 (linux_supports_exec_events): New function.
251 (linux_target_ops) <supports_exec_events>: Initialize new member.
252 * lynx-low.c (lynx_target_ops) <supports_exec_events>: Initialize
253 new member.
254 * remote-utils.c (prepare_resume_reply): New stop reason 'exec'.
255 * server.c (report_exec_events): New global variable.
256 (handle_query): Handle qSupported query for exec-events feature.
257 (captured_main): Initialize report_exec_events.
258 * server.h (report_exec_events): Declare new global variable.
259 * target.h (struct target_ops) <supports_exec_events>: New
260 member.
261 (target_supports_exec_events): New macro.
262 * win32-low.c (win32_target_ops) <supports_exec_events>:
263 Initialize new member.
264
265 2015-09-09 Markus Metzger <markus.t.metzger@intel.com>
266
267 * linux-low.c (linux_low_enable_btrace): Remove.
268 (linux_target_ops): Replace linux_low_enable_btrace with
269 linux_enable_btrace.
270
271 2015-09-03 Yao Qi <yao.qi@linaro.org>
272
273 * linux-aarch64-low.c (aarch64_insert_point): Call
274 aarch64_handle_watchpoint if aarch64_linux_region_ok_for_watchpoint
275 returns true.
276
277 2015-08-27 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
278
279 * linux-low.c (check_stopped_by_breakpoint): Use
280 GDB_ARCH_IS_TRAP_BRKPT instead of GDB_ARCH_TRAP_BRKPT.
281
282 2015-08-27 Pedro Alves <palves@redhat.com>
283
284 * proc-service.c (ps_pdwrite): Return PS_ERR/PS_OK explicily.
285
286 2015-08-26 Simon Marchi <simon.marchi@ericsson.com>
287
288 * ax.c (gdb_parse_agent_expr): Replace xmalloc-family function with
289 the XNEW-family equivalent.
290 (compile_bytecodes): Likewise.
291 * dll.c (loaded_dll): Likewise.
292 * event-loop.c (append_callback_event): Likewise.
293 (create_file_handler): Likewise.
294 (create_file_event): Likewise.
295 * hostio.c (handle_open): Likewise.
296 * inferiors.c (add_thread): Likewise.
297 (add_process): Likewise.
298 * linux-aarch64-low.c (aarch64_linux_new_process): Likewise.
299 * linux-arm-low.c (arm_new_process): Likewise.
300 (arm_new_thread): Likewise.
301 * linux-low.c (add_to_pid_list): Likewise.
302 (linux_add_process): Likewise.
303 (handle_extended_wait): Likewise.
304 (add_lwp): Likewise.
305 (enqueue_one_deferred_signal): Likewise.
306 (enqueue_pending_signal): Likewise.
307 (linux_resume_one_lwp_throw): Likewise.
308 (linux_resume_one_thread): Likewise.
309 (linux_read_memory): Likewise.
310 (linux_write_memory): Likewise.
311 * linux-mips-low.c (mips_linux_new_process): Likewise.
312 (mips_linux_new_thread): Likewise.
313 (mips_add_watchpoint): Likewise.
314 * linux-x86-low.c (initialize_low_arch): Likewise.
315 * lynx-low.c (lynx_add_process): Likewise.
316 * mem-break.c (set_raw_breakpoint_at): Likewise.
317 (set_breakpoint): Likewise.
318 (add_condition_to_breakpoint): Likewise.
319 (add_commands_to_breakpoint): Likewise.
320 (clone_agent_expr): Likewise.
321 (clone_one_breakpoint): Likewise.
322 * regcache.c (new_register_cache): Likewise.
323 * remote-utils.c (look_up_one_symbol): Likewise.
324 * server.c (queue_stop_reply): Likewise.
325 (start_inferior): Likewise.
326 (queue_stop_reply_callback): Likewise.
327 (handle_target_event): Likewise.
328 * spu-low.c (fetch_ppc_memory): Likewise.
329 (store_ppc_memory): Likewise.
330 * target.c (set_target_ops): Likewise.
331 * thread-db.c (thread_db_load_search): Likewise.
332 (try_thread_db_load_1): Likewise.
333 * tracepoint.c (add_tracepoint): Likewise.
334 (add_tracepoint_action): Likewise.
335 (create_trace_state_variable): Likewise.
336 (cmd_qtdpsrc): Likewise.
337 (cmd_qtro): Likewise.
338 (add_while_stepping_state): Likewise.
339 * win32-low.c (child_add_thread): Likewise.
340 (get_image_name): Likewise.
341
342 2015-08-25 Yao Qi <yao.qi@linaro.org>
343
344 * linux-aarch64-low.c (aarch64_linux_new_thread): Remove.
345
346 2015-08-25 Yao Qi <yao.qi@linaro.org>
347
348 * Makefile.in (aarch64-linux.o): New rule.
349 * configure.srv (aarch64*-*-linux*): Append aarch64-linux.o to
350 srv_tgtobj.
351 * linux-aarch64-low.c: Include nat/aarch64-linux.h.
352 (aarch64_init_debug_reg_state): Make it extern.
353 (aarch64_linux_prepare_to_resume): Remove.
354
355 2015-08-25 Yao Qi <yao.qi@linaro.org>
356
357 * linux-aarch64-low.c (aarch64_linux_prepare_to_resume): Use
358 lwp_arch_private_info and ptid_of_lwp.
359
360 2015-08-25 Yao Qi <yao.qi@linaro.org>
361
362 * linux-aarch64-low.c (aarch64_get_debug_reg_state): Add argument pid.
363 Find proc_info by find_process_pid. All callers updated.
364
365 2015-08-25 Yao Qi <yao.qi@linaro.org>
366
367 * linux-aarch64-low.c (struct arch64_dr_update_callback_param):
368 Remove.
369 (debug_reg_change_callback): Remove.
370 (aarch64_notify_debug_reg_change): Remove.
371
372 2015-08-25 Yao Qi <yao.qi@linaro.org>
373
374 * linux-aarch64-low.c (aarch64_notify_debug_reg_change):
375 Call current_lwp_ptid.
376
377 2015-08-25 Yao Qi <yao.qi@linaro.org>
378
379 * linux-aarch64-low.c (debug_reg_change_callback): Use
380 debug_printf.
381
382 2015-08-25 Yao Qi <yao.qi@linaro.org>
383
384 * linux-aarch64-low.c (debug_reg_change_callback): Use phex.
385
386 2015-08-25 Yao Qi <yao.qi@linaro.org>
387
388 * linux-aarch64-low.c (debug_reg_change_callback): Remove comments.
389
390 2015-08-25 Yao Qi <yao.qi@linaro.org>
391
392 * linux-aarch64-low.c (debug_reg_change_callback): Re-indent
393 the code.
394
395 2015-08-25 Yao Qi <yao.qi@linaro.org>
396
397 * linux-aarch64-low.c (aarch64_dr_update_callback_param) <pid>:
398 Remove.
399 (debug_reg_change_callback): Remove argument entry and add argument
400 lwp. Remove local variable thread. Don't print thread id in the
401 debugging output. Don't check whether pid of thread equals to pid.
402 (aarch64_notify_debug_reg_change): Don't set param.pid. Call
403 iterate_over_lwps instead find_inferior.
404
405 2015-08-24 Pedro Alves <palves@redhat.com>
406
407 * inferiors.c (get_first_process): New function.
408 * inferiors.h (get_first_process): New declaration.
409 * remote-utils.c (read_ptid): Default to the first process in the
410 list, instead of to the current thread's process.
411
412 2015-08-24 Pedro Alves <palves@redhat.com>
413
414 * debug.c: Include gdb_sys_time.h instead of sys/time.h.
415 * event-loop.c: Likewise.
416 * remote-utils.c: Likewise.
417 * tracepoint.c: Likewise.
418
419 2015-08-24 Pedro Alves <palves@redhat.com>
420
421 * spu-low.c (spu_request_interrupt): Use lwpid_of instead of
422 ptid_get_lwp.
423
424 2015-08-21 Pedro Alves <palves@redhat.com>
425
426 * ax.c (gdb_eval_agent_expr): Return expr_eval_unhandled_opcode
427 instead of literal 1.
428
429 2015-08-21 Pedro Alves <palves@redhat.com>
430
431 * tdesc.c (default_description): Explicitly zero-initialize.
432
433 2015-08-21 Pedro Alves <palves@redhat.com>
434
435 PR gdb/18749
436 * inferiors.c (remove_thread): Discard any pending stop reply for
437 this thread.
438 * server.c (remove_all_on_match_pid): Rename to ...
439 (remove_all_on_match_ptid): ... this. Work with a filter ptid
440 instead of a pid.
441 (discard_queued_stop_replies): Change parameter to a ptid. Now
442 extern.
443 (handle_v_kill, kill_inferior_callback, captured_main)
444 (process_serial_event): Adjust.
445 * server.h (discard_queued_stop_replies): Declare.
446
447 2015-08-21 Pedro Alves <palves@redhat.com>
448
449 * linux-low.c (wait_for_sigstop): Always switch to no thread
450 selected if the previously current thread dies.
451 * lynx-low.c (lynx_request_interrupt): Use the first thread's
452 process instead of the current thread's.
453 * remote-utils.c (input_interrupt): Don't check if there's no
454 current thread.
455 * server.c (gdb_read_memory, gdb_write_memory): If setting the
456 current thread to the general thread fails, error out.
457 (handle_qxfer_auxv, handle_qxfer_libraries)
458 (handle_qxfer_libraries_svr4, handle_qxfer_siginfo)
459 (handle_qxfer_spu, handle_qxfer_statictrace, handle_qxfer_fdpic)
460 (handle_query): Check if there's a thread selected instead of
461 checking whether there's any thread in the thread list.
462 (handle_qxfer_threads, handle_qxfer_btrace)
463 (handle_qxfer_btrace_conf): Don't error out early if there's no
464 thread in the thread list.
465 (handle_v_cont, myresume): Don't set the current thread to the
466 continue thread.
467 (process_serial_event) <Hg handling>: Also set thread_id if the
468 previous general thread is still alive.
469 (process_serial_event) <g/G handling>: If setting the current
470 thread to the general thread fails, error out.
471 * spu-low.c (spu_resume, spu_request_interrupt): Use the first
472 thread's lwp instead of the current thread's.
473 * target.c (set_desired_thread): If the desired thread was not
474 found, leave the current thread pointing to NULL. Return an int
475 (boolean) indicating success.
476 * target.h (set_desired_thread): Change return type to int.
477
478 2015-08-20 Max Filippov <jcmvbkbc@gmail.com>
479
480 * configure.srv (xtensa*-*-linux*): Add srv_linux_thread_db=yes.
481 * linux-xtensa-low.c (arch/xtensa.h gdb_proc_service.h): New
482 #includes.
483 (ps_get_thread_area): New function.
484
485 2015-08-19 Gary Benson <gbenson@redhat.com>
486
487 * hostio.c (handle_pread): Do not attempt to read more data
488 than hostio_reply_with_data can fit in a packet.
489
490 2015-08-18 Joel Brobecker <brobecker@adacore.com>
491
492 * linux-aarch32-low.c (NT_ARM_VFP): Define if not already defined.
493
494 2015-08-14 Matthew Fortune <matthew.fortune@imgtec.com>
495
496 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP_REL.
497
498 2015-08-06 Pedro Alves <palves@redhat.com>
499
500 * tracepoint.c (expr_eval_result): Now an int.
501
502 2015-08-06 Pedro Alves <palves@redhat.com>
503
504 * gdbthread.h (struct regcache): Forward declare.
505 (struct thread_info) <regcache_data>: Now a struct regcache
506 pointer.
507 * inferiors.c (inferior_regcache_data)
508 (set_inferior_regcache_data): Now work with struct regcache
509 pointers.
510 * inferiors.h (struct regcache): Forward declare.
511 (inferior_regcache_data, set_inferior_regcache_data): Now work
512 with struct regcache pointers.
513 * regcache.c (get_thread_regcache, regcache_invalidate_thread)
514 (free_register_cache_thread): Remove struct regcache pointer
515 casts.
516
517 2015-08-06 Pedro Alves <palves@redhat.com>
518
519 * server.c (captured_main): On error, print the exception message
520 to stderr, and if run_once is set, throw a quit.
521
522 2015-08-06 Pedro Alves <palves@redhat.com>
523
524 * linux-low.c (move_out_of_jump_pad_callback): Temporarily switch
525 the current thread.
526
527 2015-08-06 Pedro Alves <palves@redhat.com>
528
529 * linux-low.c (linux_write_memory): Rewrite debug output to avoid
530 reading beyond the passed in buffer length.
531
532 2015-08-06 Pierre Langlois <pierre.langlois@arm.com>
533
534 * tracepoint.c (symbol_list) <required>: Remove.
535
536 2015-08-06 Pedro Alves <palves@redhat.com>
537
538 * linux-low.c (handle_extended_wait): Set the fork child's suspend
539 count if stopping and suspending threads.
540 (check_stopped_by_breakpoint): If stopped by trace, set the LWP's
541 stop reason to TARGET_STOPPED_BY_SINGLE_STEP.
542 (linux_detach): Complete an ongoing step-over.
543 (lwp_suspended_inc, lwp_suspended_decr): New functions. Use
544 throughout.
545 (resume_stopped_resumed_lwps): Don't resume a suspended thread.
546 (linux_wait_1): If passing a signal to the inferior after
547 finishing a step-over, unsuspend and re-resume all lwps. If we
548 see a single-step event but the thread should be continuing, don't
549 pass the trap to gdb.
550 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback): Use
551 internal_error instead of gdb_assert.
552 (enqueue_pending_signal): New function.
553 (check_ptrace_stopped_lwp_gone): Add debug output.
554 (start_step_over): Use internal_error instead of gdb_assert.
555 (complete_ongoing_step_over): New function.
556 (linux_resume_one_thread): Don't resume a suspended thread.
557 (proceed_one_lwp): If the LWP is stepping over a breakpoint, reset
558 it stepping.
559
560 2015-08-06 Pedro Alves <palves@redhat.com>
561
562 * linux-low.c (add_lwp): Set waitstatus to TARGET_WAITKIND_IGNORE.
563 (linux_thread_alive): Use lwp_is_marked_dead.
564 (extended_event_reported): Delete.
565 (linux_wait_1): Check if waitstatus is TARGET_WAITKIND_IGNORE
566 instead of extended_event_reported.
567 (mark_lwp_dead): Don't set the 'dead' flag. Store the waitstatus
568 as well.
569 (lwp_is_marked_dead): New function.
570 (lwp_running): Use lwp_is_marked_dead.
571 * linux-low.h: Delete 'dead' field, and update 'waitstatus's
572 comment.
573
574 2015-08-06 Pedro Alves <palves@redhat.com>
575
576 * linux-low.c (linux_wait_1): Move fork event output out of the
577 !report_to_gdb check. Pass event_child->waitstatus to
578 target_waitstatus_to_string instead of ourstatus.
579
580 2015-08-04 Yao Qi <yao.qi@linaro.org>
581
582 * linux-aarch64-low.c (aarch64_supports_tracepoints): Return 0
583 if current_thread is 32 bit.
584
585 2015-08-04 Yao Qi <yao.qi@linaro.org>
586
587 * linux-aarch64-low.c (aarch64_supports_z_point_type): Return
588 0 for Z_PACKET_SW_BP if it may be used in multi-arch debugging.
589 * server.c (extended_protocol): Remove "static".
590 * server.h (extended_protocol): Declare it.
591
592 2015-08-04 Yao Qi <yao.qi@linaro.org>
593
594 * linux-aarch64-low.c (aarch64_get_pc): Get PC register on
595 both aarch64 and aarch32.
596 (aarch64_set_pc): Likewise.
597
598 2015-08-04 Yao Qi <yao.qi@linaro.org>
599
600 * configure.srv (case aarch64*-*-linux*): Append arm-with-neon.o
601 to srv_regobj and append arm-core.xml arm-vfpv3.xml and
602 arm-with-neon.xml to srv_xmlfiles.
603 * linux-aarch64-low.c: Include linux-aarch32-low.h.
604 (is_64bit_tdesc): New function.
605 (aarch64_linux_read_description): New function.
606 (aarch64_arch_setup): Call aarch64_linux_read_description.
607 (regs_info): Rename to regs_info_aarch64.
608 (aarch64_regs_info): Return right regs_info.
609 (initialize_low_arch): Call initialize_low_arch_aarch32.
610
611 2015-08-04 Yao Qi <yao.qi@linaro.org>
612
613 * configure.srv (srv_tgtobj): Add linux-aarch32-low.o.
614 * linux-aarch32-low.c: New file.
615 * linux-aarch32-low.h: New file.
616 * linux-arm-low.c (arm_fill_gregset): Move it to
617 linux-aarch32-low.c.
618 (arm_store_gregset): Likewise.
619 (arm_fill_vfpregset): Call arm_fill_vfpregset_num
620 (arm_store_vfpregset): Call arm_store_vfpregset_num.
621 (arm_arch_setup): Check if PTRACE_GETREGSET works.
622 (regs_info): Rename to regs_info_arm.
623 (arm_regs_info): Return regs_info_aarch32 if
624 have_ptrace_getregset is 1 and target description is
625 arm_with_neon or arm_with_vfpv3.
626 (initialize_low_arch): Don't call init_registers_arm_with_neon.
627 Call initialize_low_arch_aarch32 instead.
628
629 2015-08-04 Yao Qi <yao.qi@linaro.org>
630
631 * linux-x86-low.c (have_ptrace_getregset): Move it to ...
632 * linux-low.c: ... here.
633 * linux-low.h (have_ptrace_getregset): Declare it.
634
635 2015-08-04 Pedro Alves <palves@redhat.com>
636
637 * thread-db.c (struct thread_db): Use new typedefs.
638 (try_thread_db_load_1): Define local TDB_DLSYM macro and use it in
639 CHK calls.
640 (disable_thread_event_reporting): Cast result of dlsym to
641 destination function pointer type.
642 (thread_db_mourn): Use td_ta_delete_ftype.
643
644 2015-08-03 Sandra Loosemore <sandra@codesourcery.com>
645
646 * linux-nios2-low.c (NIOS2_BREAKPOINT): Conditionalize for
647 arch variant.
648 (CDX_BREAKPOINT): Define for R2.
649 (nios2_breakpoint_at): Check for CDX_BREAKPOINT when R2.
650 (the_low_target): Add comments.
651
652 2015-07-30 Yao Qi <yao.qi@linaro.org>
653
654 * linux-arm-low.c (arm_hwcap): Remove it.
655 (arm_read_description): New local variable arm_hwcap. Don't
656 set arm_hwcap to zero.
657
658 2015-07-30 Yao Qi <yao.qi@linaro.org>
659
660 * linux-arm-low.c (arm_fill_wmmxregset): Don't use arm_hwcap.
661 Use regcache->tdesc instead.
662 (arm_store_wmmxregset): Likewise.
663 (arm_fill_vfpregset): Likewise.
664 (arm_store_vfpregset): Likewise.
665
666 2015-07-30 Yao Qi <yao.qi@linaro.org>
667
668 * linux-arm-low.c: Include arch/arm.h.
669 (arm_fill_gregset): Don't use arm_num_regs and arm_regmap.
670 (arm_store_gregset): Likewise.
671
672 2015-07-29 Simon Marchi <simon.marchi@ericsson.com>
673
674 * linux-mips-low.c (mips_linux_prepare_to_resume): Add NULL as
675 ptrace's 4th parameter.
676
677 2015-07-27 Yao Qi <yao.qi@linaro.org>
678
679 * configure.srv (case aarch64*-*-linux*): Don't set
680 srv_linux_usrregs.
681
682 2015-07-24 Pedro Alves <palves@redhat.c: Likewise.om>
683
684 * linux-aarch64-low.c: Include nat/gdb_ptrace.h instead of
685 sys/ptrace.h.
686 * linux-arm-low.c: Likewise.
687 * linux-cris-low.c: Likewise.
688 * linux-crisv32-low.c: Likewise.
689 * linux-low.c: Likewise.
690 * linux-m68k-low.c: Likewise.
691 * linux-mips-low.c: Likewise.
692 * linux-nios2-low.c: Likewise.
693 * linux-s390-low.c: Likewise.
694 * linux-sparc-low.c: Likewise.
695 * linux-tic6x-low.c: Likewise.
696 * linux-tile-low.c: Likewise.
697 * linux-x86-low.c: Likewise.
698
699 2015-07-24 Pedro Alves <palves@redhat.com>
700
701 * config.in: Regenerate.
702 * configure: Regenerate.
703
704 2015-07-24 Pedro Alves <palves@redhat.com>
705
706 * acinclude.m4: Include ../ptrace.m4.
707 * configure.ac: Call GDB_AC_PTRACE.
708 * config.in, configure: Regenerate.
709
710 2015-07-24 Yao Qi <yao.qi@linaro.org>
711
712 * linux-low.c (linux_create_inferior): Remove setting to
713 proc->priv->new_inferior.
714 (linux_attach): Likewise.
715 (linux_low_filter_event): Likewise.
716 * linux-low.h (struct process_info_private) <new_inferior>: Remove.
717
718 2015-07-24 Yao Qi <yao.qi@linaro.org>
719
720 * linux-low.c (linux_arch_setup): New function.
721 (linux_low_filter_event): If proc->tdesc is NULL and
722 proc->attached is true, call the_low_target.arch_setup.
723 Otherwise, keep status pending, and return.
724 (linux_resume_one_lwp_throw): Don't call get_pc if
725 thread->while_stepping isn't NULL. Don't call
726 get_thread_regcache if proc->tdesc is NULL.
727 (need_step_over_p): Return 0 if proc->tdesc is NULL.
728 (linux_target_ops): Install arch_setup.
729 * server.c (start_inferior): Call the_target->arch_setup.
730 * target.h (struct target_ops) <arch_setup>: New field.
731 (target_arch_setup): New marco.
732 * lynx-low.c (lynx_target_ops): Update.
733 * nto-low.c (nto_target_ops): Update.
734 * spu-low.c (spu_target_ops): Update.
735 * win32-low.c (win32_target_ops): Update.
736
737 2015-07-24 Yao Qi <yao.qi@linaro.org>
738
739 * linux-low.c (linux_add_process): Don't set
740 proc->priv->new_inferior.
741 (linux_create_inferior): Set proc->priv->new_inferior to 1.
742 (linux_attach): Likewise.
743
744 2015-07-24 Yao Qi <yao.qi@linaro.org>
745
746 * server.c (start_inferior): Code refactor.
747
748 2015-07-24 Yao Qi <yao.qi@linaro.org>
749
750 * server.c (process_serial_event): Set general_thread.
751
752 2015-07-21 Yao Qi <yao.qi@linaro.org>
753
754 * linux-aarch64-low.c (aarch64_arch_setup): Remove code and call
755 aarch64_linux_get_debug_reg_capacity.
756
757 2015-07-17 Yao Qi <yao.qi@linaro.org>
758
759 * Makefile.in (aarch64-linux-hw-point.o): New rule.
760 * configure.srv (srv_tgtobj): Append aarch64-linux-hw-point.o.
761 * linux-aarch64-low.c: Include nat/aarch64-linux-hw-point.h.
762 (AARCH64_HBP_MAX_NUM): Move to nat/aarch64-linux-hw-point.h.
763 (AARCH64_HWP_MAX_NUM, AARCH64_HBP_ALIGNMENT): Likewise.
764 (AARCH64_HWP_ALIGNMENT): Likewise.
765 (AARCH64_HWP_MAX_LEN_PER_REG): Likewise.
766 (AARCH64_DEBUG_NUM_SLOTS, AARCH64_DEBUG_ARCH): Likewise.
767 (aarch64_num_bp_regs, aarch64_num_wp_regs): Likewise.
768 (AARCH64_DEBUG_ARCH_V8, DR_MARK_ALL_CHANGED): Likewise.
769 (DR_MARK_N_CHANGED, DR_CLEAR_CHANGED): Likewise.
770 (DR_HAS_CHANGED, DR_N_HAS_CHANGE): Likewise.
771 (struct aarch64_debug_reg_state): Likewise.
772 (struct arch_lwp_info): Likewise.
773 (aarch64_align_watchpoint): Likewise.
774 (DR_CONTROL_ENABLED, DR_CONTROL_LENGTH): Likewise.
775 (aarch64_watchpoint_length): Likewise.
776 (aarch64_point_encode_ctrl_reg): Likewise
777 (aarch64_point_is_aligned): Likewise.
778 (aarch64_align_watchpoint): Likewise.
779 (aarch64_linux_set_debug_regs):
780 (aarch64_dr_state_insert_one_point): Likewise.
781 (aarch64_dr_state_remove_one_point): Likewise.
782 (aarch64_handle_breakpoint): Likewise.
783 (aarch64_handle_aligned_watchpoint): Likewise.
784 (aarch64_handle_unaligned_watchpoint): Likewise.
785 (aarch64_handle_watchpoint): Likewise.
786
787 2015-07-17 Yao Qi <yao.qi@linaro.org>
788
789 * linux-aarch64-low.c (aarch64_handle_breakpoint): Add argument state
790 and don't aarch64_get_debug_reg_state. All callers update.
791 (aarch64_handle_aligned_watchpoint): Likewise.
792 (aarch64_handle_unaligned_watchpoint): Likewise.
793 (aarch64_handle_watchpoint): Likewise.
794 (aarch64_insert_point): Call aarch64_get_debug_reg_state earlier.
795 (aarch64_remove_point): Likewise.
796
797 2015-07-17 Yao Qi <yao.qi@linaro.org>
798
799 * linux-aarch64-low.c (aarch64_show_debug_reg_state): Use
800 debug_printf.
801 (aarch64_handle_unaligned_watchpoint): Likewise.
802
803 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
804
805 Revert the previous 3 commits:
806 Move gdb_regex* to common/
807 Move linux_find_memory_regions_full & co.
808 gdbserver build-id attribute generator
809
810 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
811 Jan Kratochvil <jan.kratochvil@redhat.com>
812
813 gdbserver build-id attribute generator.
814 * linux-low.c (nat/linux-maps.h, search.h, rsp-low.h): Include.
815 (ElfXX_Ehdr, ElfXX_Phdr, ElfXX_Nhdr): New.
816 (ELFXX_FLD, ELFXX_SIZEOF, ELFXX_ROUNDUP, BUILD_ID_INVALID): New.
817 (find_phdr): New.
818 (get_dynamic): Use find_pdhr to traverse program headers.
819 (struct mapping_entry, mapping_entry_s, free_mapping_entry_vec)
820 (compare_mapping_entry_range, struct find_memory_region_callback_data)
821 (read_build_id, find_memory_region_callback, lrfind_mapping_entry)
822 (get_hex_build_id): New.
823 (linux_qxfer_libraries_svr4): Add optional build-id attribute
824 to reply XML document.
825
826 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
827 Jan Kratochvil <jan.kratochvil@redhat.com>
828
829 * target.c: Include target/target-utils.h and fcntl.h.
830 (target_fileio_read_stralloc_1_pread, target_fileio_read_stralloc_1)
831 (target_fileio_read_stralloc): New functions.
832
833 2015-07-15 Jan Kratochvil <jan.kratochvil@redhat.com>
834
835 * Makefile.in (OBS): Add gdb_regex.o.
836 (gdb_regex.o): New.
837 * config.in: Rebuilt.
838 * configure: Rebuilt.
839
840 2015-07-15 Aleksandar Ristovski <aristovski@qnx.com
841 Jan Kratochvil <jan.kratochvil@redhat.com>
842
843 Create empty nat/linux-maps.[ch] and common/target-utils.[ch].
844 * Makefile.in (OBS): Add target-utils.o.
845 (linux-maps.o, target-utils.o): New.
846 * configure.srv (srv_linux_obj): Add linux-maps.o.
847
848 2015-07-15 Pierre Langlois <pierre.langlois@arm.com>
849
850 * linux-aarch64-low.c (aarch64_supports_range_stepping): New
851 function, return 1.
852 (the_low_target): Install it.
853
854 2015-07-14 Pedro Alves <palves@redhat.com>
855
856 * linux-low.c (kill_wait_lwp): Don't assert if waitpid fails.
857 Instead, ignore ECHILD, and throw an error for other errnos.
858
859 2015-07-10 Pedro Alves <palves@redhat.com>
860
861 * event-loop.c (struct callback_event) <data>: Change type to
862 gdb_client_data instance instead of gdb_client_data pointer.
863 (append_callback_event): Adjust.
864
865 2015-07-10 Pierre Langlois <pierre.langlois@arm.com>
866
867 * linux-aarch64-low.c: Add comments for each linux_target_ops
868 method. Remove comments already covered in target_ops and
869 linux_target_ops definitions.
870 (the_low_target): Add comments for each unimplemented method.
871
872 2015-07-09 Yao Qi <yao.qi@linaro.org>
873
874 * linux-aarch64-low.c (aarch64_regmap): Remove.
875 (aarch64_usrregs_info): Remove.
876 (regs_info): Set field usrregs to NULL.
877
878 2015-07-02 Markus Metzger <markus.t.metzger@intel.com>
879
880 * linux-low.c: Include "rsp-low.h"
881 (linux_low_encode_pt_config, linux_low_encode_raw): New.
882 (linux_low_read_btrace): Support BTRACE_FORMAT_PT.
883 (linux_low_btrace_conf): Support BTRACE_FORMAT_PT.
884 (handle_btrace_enable_pt): New.
885 (handle_btrace_general_set): Support "pt".
886 (handle_btrace_conf_general_set): Support "pt:size".
887
888 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
889
890 * linux-aarch64-low.c (aarch64_supports_z_point_type): Enable for
891 Z_PACKET_SW_BP.
892
893 2015-06-29 Pierre Langlois <pierre.langlois@arm.com>
894
895 * linux-aarch64-low.c: Remove comment about endianness.
896 (aarch64_breakpoint): Change type to gdb_byte[]. Set to "brk #0".
897 (aarch64_breakpoint_at): Change type of insn to gdb_byte[]. Use
898 memcmp.
899
900 2015-06-24 Gary Benson <gbenson@redhat.com>
901
902 * linux-i386-ipa.c (stdint.h): Do not include.
903 * lynx-i386-low.c (stdint.h): Likewise.
904 * lynx-ppc-low.c (stdint.h): Likewise.
905 * mem-break.c (stdint.h): Likewise.
906 * thread-db.c (stdint.h): Likewise.
907 * tracepoint.c (stdint.h): Likewise.
908 * win32-low.c (stdint.h): Likewise.
909
910 2015-06-18 Simon Marchi <simon.marchi@ericsson.com>
911
912 * server.c (write_qxfer_response): Update call to
913 remote_escape_output.
914
915 2015-06-15 Aleksandar Ristovski <aristovski@qnx.com
916 Jan Kratochvil <jan.kratochvil@redhat.com>
917
918 Merge multiple hex conversions.
919 * gdbreplay.c (tohex): Rename to 'fromhex'.
920 (logchar): Use fromhex.
921
922 2015-06-10 Jan Kratochvil <jan.kratochvil@redhat.com>
923
924 * server.c (handle_qxfer_libraries): Set `version' attribute for
925 <library-list>.
926
927 2015-06-10 Gary Benson <gbenson@redhat.com>
928
929 * target.h (struct target_ops) <multifs_open>: New field.
930 <multifs_unlink>: Likewise.
931 <multifs_readlink>: Likewise.
932 * linux-low.c (nat/linux-namespaces.h): New include.
933 (linux_target_ops): Initialize the_target->multifs_open,
934 the_target->multifs_unlink and the_target->multifs_readlink.
935 * hostio.h (hostio_handle_new_gdb_connection): New declaration.
936 * hostio.c (hostio_fs_pid): New static variable.
937 (hostio_handle_new_gdb_connection): New function.
938 (handle_setfs): Likewise.
939 (handle_open): Use the_target->multifs_open as appropriate.
940 (handle_unlink): Use the_target->multifs_unlink as appropriate.
941 (handle_readlink): Use the_target->multifs_readlink as
942 appropriate.
943 (handle_vFile): Handle vFile:setfs packets.
944 * server.c (handle_query): Call hostio_handle_new_gdb_connection
945 after target_handle_new_gdb_connection.
946
947 2015-06-10 Gary Benson <gbenson@redhat.com>
948
949 * configure.ac (AC_CHECK_FUNCS): Add setns.
950 * config.in: Regenerate.
951 * configure: Likewise.
952 * Makefile.in (SFILES): Add nat/linux-namespaces.c.
953 (linux-namespaces.o): New rule.
954 * configure.srv (srv_linux_obj): Add linux-namespaces.o.
955
956 2015-06-09 Gary Benson <gbenson@redhat.com>
957
958 * hostio.c (handle_open): Process mode argument with
959 fileio_to_host_mode.
960
961 2015-06-01 Yao Qi <yao.qi@linaro.org>
962
963 * linux-s390-low.c (PTRACE_GETREGSET, PTRACE_SETREGSET): Remove.
964 * linux-x86-low.c: Likewise.
965
966 2015-05-28 Don Breazeal <donb@codesourcery.com>
967
968 * linux-low.c (handle_extended_wait): Initialize
969 thread_info.last_resume_kind for new fork children.
970
971 2015-05-15 Pedro Alves <palves@redhat.com>
972
973 * target.h (target_handle_new_gdb_connection): Rewrite using if
974 wrapped in do/while.
975
976 2015-05-14 Joel Brobecker <brobecker@adacore.com>
977
978 * configure.ac: Add prfpregset_t BFD_HAVE_SYS_PROCFS_TYPE check.
979 * configure, config.in: Regenerate.
980 * gdb_proc_service.h [HAVE_PRFPREGSET_T] (prfpregset_t):
981 Declare typedef.
982
983 2015-05-12 Don Breazeal <donb@codesourcery.com>
984
985 * linux-low.c (handle_extended_wait): Handle PTRACE_EVENT_FORK and
986 PTRACE_EVENT_VFORK_DONE.
987 (linux_low_ptrace_options, extended_event_reported): Add vfork
988 events.
989 * remote-utils.c (prepare_resume_reply): New stop reasons "vfork"
990 and "vforkdone" for RSP 'T' Stop Reply Packet.
991 * server.h (report_vfork_events): Declare
992 global variable.
993
994 2015-05-12 Don Breazeal <donb@codesourcery.com>
995
996 * linux-aarch64-low.c (aarch64_linux_new_fork): New function.
997 (the_low_target) <new_fork>: Initialize new member.
998 * linux-arm-low.c (arm_new_fork): New function.
999 (the_low_target) <new_fork>: Initialize new member.
1000 * linux-low.c (handle_extended_wait): Call new target function
1001 new_fork.
1002 * linux-low.h (struct linux_target_ops) <new_fork>: New member.
1003 * linux-mips-low.c (mips_add_watchpoint): New function
1004 extracted from mips_insert_point.
1005 (the_low_target) <new_fork>: Initialize new member.
1006 (mips_linux_new_fork): New function.
1007 (mips_insert_point): Call mips_add_watchpoint.
1008 * linux-x86-low.c (x86_linux_new_fork): New function.
1009 (the_low_target) <new_fork>: Initialize new member.
1010
1011 2015-05-12 Don Breazeal <donb@codesourcery.com>
1012
1013 * linux-low.c (handle_extended_wait): Implement return value,
1014 rename argument 'event_child' to 'event_lwp', handle
1015 PTRACE_EVENT_FORK, call internal_error for unrecognized event.
1016 (linux_low_ptrace_options): New function.
1017 (linux_low_filter_event): Call linux_low_ptrace_options,
1018 use different argument fo linux_enable_event_reporting,
1019 use return value from handle_extended_wait.
1020 (extended_event_reported): New function.
1021 (linux_wait_1): Call extended_event_reported and set
1022 status to report fork events.
1023 (linux_write_memory): Add pid to debug message.
1024 (reset_lwp_ptrace_options_callback): New function.
1025 (linux_handle_new_gdb_connection): New function.
1026 (linux_target_ops): Initialize new structure member.
1027 * linux-low.h (struct lwp_info) <waitstatus>: New member.
1028 * lynx-low.c: Initialize new structure member.
1029 * remote-utils.c (prepare_resume_reply): Implement stop reason
1030 "fork" for "T" stop message.
1031 * server.c (handle_query): Call handle_new_gdb_connection.
1032 * server.h (report_fork_events): Declare global flag.
1033 * target.h (struct target_ops) <handle_new_gdb_connection>:
1034 New member.
1035 (target_handle_new_gdb_connection): New macro.
1036 * win32-low.c: Initialize new structure member.
1037
1038 2015-05-12 Don Breazeal <donb@codesourcery.com>
1039
1040 * mem-break.c (APPEND_TO_LIST): Define macro.
1041 (clone_agent_expr): New function.
1042 (clone_one_breakpoint): New function.
1043 (clone_all_breakpoints): New function.
1044 * mem-break.h: Declare new functions.
1045
1046 2015-05-12 Don Breazeal <donb@codesourcery.com>
1047
1048 * linux-low.c (linux_supports_fork_events): New function.
1049 (linux_supports_vfork_events): New function.
1050 (linux_target_ops): Initialize new structure members.
1051 (initialize_low): Call linux_check_ptrace_features.
1052 * lynx-low.c (lynx_target_ops): Initialize new structure
1053 members.
1054 * server.c (report_fork_events, report_vfork_events):
1055 New global flags.
1056 (handle_query): Add new features to qSupported packet and
1057 response.
1058 (captured_main): Initialize new global variables.
1059 * target.h (struct target_ops) <supports_fork_events>:
1060 New member.
1061 <supports_vfork_events>: New member.
1062 (target_supports_fork_events): New macro.
1063 (target_supports_vfork_events): New macro.
1064 * win32-low.c (win32_target_ops): Initialize new structure
1065 members.
1066
1067 2015-05-12 Gary Benson <gbenson@redhat.com>
1068
1069 * server.c (handle_qxfer_exec_file): Use current process
1070 if annex is empty.
1071
1072 2015-05-08 Sandra Loosemore <sandra@codesourcery.com>
1073
1074 * linux-nios2-low.c: Include elf/common.h. Adjust comments.
1075 Remove HAVE_PTRACE_GETREGS conditionals.
1076 (nios2_regsets): Use PTRACE_GETREGSET and PTRACE_SETREGSET
1077 instead of PTRACE_GETREGS and PTRACE_SETREGS.
1078
1079 2015-05-08 Yao Qi <yao.qi@linaro.org>
1080
1081 * linux-low.c (linux_supports_conditional_breakpoints): New
1082 function.
1083 (linux_target_ops): Install new target method.
1084 * lynx-low.c (lynx_target_ops): Install NULL hook for
1085 supports_conditional_breakpoints.
1086 * nto-low.c (nto_target_ops): Likewise.
1087 * spu-low.c (spu_target_ops): Likewise.
1088 * win32-low.c (win32_target_ops): Likewise.
1089 * server.c (handle_query): Check
1090 target_supports_conditional_breakpoints.
1091 * target.h (struct target_ops) <supports_conditional_breakpoints>:
1092 New field.
1093 (target_supports_conditional_breakpoints): New macro.
1094
1095 2015-05-06 Pedro Alves <palves@redhat.com>
1096
1097 PR server/18081
1098 * server.c (start_inferior): If the process exits, mourn it.
1099
1100 2015-04-21 Gary Benson <gbenson@redhat.com>
1101
1102 * hostio.c (fileio_open_flags_to_host): Factored out to
1103 fileio_to_host_openflags in common/fileio.c. Single use
1104 updated.
1105
1106 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1107
1108 * linux-xtensa-low.c (xtensa_fill_gregset)
1109 (xtensa_store_gregset): Check XCHAL_HAVE_LOOPS instead of
1110 XCHAL_HAVE_LOOP.
1111
1112 2015-04-17 Max Filippov <jcmvbkbc@gmail.com>
1113
1114 * linux-xtensa-low.c (xtensa_usrregs_info): Remove.
1115 (regs_info): Replace usrregs pointer with NULL.
1116
1117 2015-04-17 Gary Benson <gbenson@redhat.com>
1118
1119 * target.h (struct target_ops) <pid_to_exec_file>: New field.
1120 * linux-low.c (linux_target_ops): Initialize pid_to_exec_file.
1121 * server.c (handle_qxfer_exec_file): New function.
1122 (qxfer_packets): Add exec-file entry.
1123 (handle_query): Report qXfer:exec-file:read as supported packet.
1124
1125 2015-04-14 Romain Naour <romain.naour@openwide.fr> (tiny change)
1126
1127 * linux-low.c (linux_read_offsets): Remove get_thread_lwp.
1128
1129 2015-04-09 Gary Benson <gbenson@redhat.com>
1130
1131 * hostio-errno.c (errno_to_fileio_error): Remove function.
1132 Update caller to use remote_fileio_to_fio_error.
1133
1134 2015-04-09 Yao Qi <yao.qi@linaro.org>
1135
1136 * linux-low.c (linux_insert_point): Call
1137 insert_memory_breakpoint if TYPE is raw_bkpt_type_sw.
1138 (linux_remove_point): Call remove_memory_breakpoint if type is
1139 raw_bkpt_type_sw.
1140 * linux-x86-low.c (x86_insert_point): Don't call
1141 insert_memory_breakpoint.
1142 (x86_remove_point): Don't call remove_memory_breakpoint.
1143
1144 2015-04-01 Pedro Alves <palves@redhat.com>
1145 Cleber Rosa <crosa@redhat.com>
1146
1147 * server.c (gdbserver_usage): Reorganize and extend the usage
1148 message.
1149
1150 2015-03-24 Pedro Alves <palves@redhat.com>
1151
1152 * linux-low.c (check_stopped_by_breakpoint): Tweak debug log
1153 output. Also dump TRAP_TRACE.
1154 (linux_low_filter_event): In debug output, distinguish a
1155 resume_stop SIGSTOP from a delayed SIGSTOP.
1156
1157 2015-03-24 Gary Benson <gbenson@redhat.com>
1158
1159 * linux-x86-low.c (x86_linux_new_thread): Moved to
1160 nat/x86-linux.c.
1161 (x86_linux_prepare_to_resume): Likewise.
1162
1163 2015-03-24 Gary Benson <gbenson@redhat.com>
1164
1165 * Makefile.in (x86-linux-dregs.o): New rule.
1166 * configure.srv: Add x86-linux-dregs.o to relevant targets.
1167 * linux-x86-low.c: Include nat/x86-linux-dregs.h.
1168 (u_debugreg_offset): Moved to nat/x86-linux-dregs.c.
1169 (x86_linux_dr_get): Likewise.
1170 (x86_linux_dr_set): Likewise.
1171 (update_debug_registers_callback): Likewise.
1172 (x86_linux_dr_set_addr): Likewise.
1173 (x86_linux_dr_get_addr): Likewise.
1174 (x86_linux_dr_set_control): Likewise.
1175 (x86_linux_dr_get_control): Likewise.
1176 (x86_linux_dr_get_status): Likewise.
1177 (x86_linux_update_debug_registers): Likewise.
1178
1179 2015-03-24 Gary Benson <gbenson@redhat.com>
1180
1181 * linux-x86-low.c (x86_linux_update_debug_registers):
1182 New function, factored out from...
1183 (x86_linux_prepare_to_resume): ...this.
1184
1185 2015-03-24 Gary Benson <gbenson@redhat.com>
1186
1187 * linux-x86-low.c (x86_linux_dr_get): Update comments.
1188 (x86_linux_dr_set): Likewise.
1189 (update_debug_registers_callback): Likewise.
1190 (x86_linux_dr_set_addr): Likewise.
1191 (x86_linux_dr_get_addr): Likewise.
1192 (x86_linux_dr_set_control): Likewise.
1193 (x86_linux_dr_get_control): Likewise.
1194 (x86_linux_dr_get_status): Likewise.
1195 (x86_linux_prepare_to_resume): Likewise.
1196
1197 2015-03-24 Gary Benson <gbenson@redhat.com>
1198
1199 * linux-x86-low.c (x86_linux_dr_get): Add assertion.
1200 Use perror_with_name. Pass string through gettext.
1201 (x86_linux_dr_set): Likewise.
1202
1203 2015-03-24 Gary Benson <gbenson@redhat.com>
1204
1205 * linux-x86-low.c (x86_dr_low_set_addr): Rename to...
1206 (x86_linux_dr_set_addr): ...this.
1207 (x86_dr_low_get_addr): Rename to...
1208 (x86_linux_dr_get_addr): ...this.
1209 (x86_dr_low_set_control): Rename to...
1210 (x86_linux_dr_set_control): ...this.
1211 (x86_dr_low_get_control): Rename to...
1212 (x86_linux_dr_get_control): ...this.
1213 (x86_dr_low_get_status): Rename to...
1214 (x86_linux_dr_get_status): ...this.
1215 (x86_dr_low): Update with new function names.
1216
1217 2015-03-24 Gary Benson <gbenson@redhat.com>
1218
1219 * Makefile.in (x86-linux.o): New rule.
1220 * configure.srv: Add x86-linux.o to relevant targets.
1221 * linux-low.c (lwp_set_arch_private_info): New function.
1222 (lwp_arch_private_info): Likewise.
1223 * linux-x86-low.c: Include nat/x86-linux.h.
1224 (arch_lwp_info): Removed structure.
1225 (update_debug_registers_callback):
1226 Use lwp_set_debug_registers_changed.
1227 (x86_linux_prepare_to_resume): Use lwp_debug_registers_changed
1228 and lwp_set_debug_registers_changed.
1229 (x86_linux_new_thread): Use lwp_set_debug_registers_changed.
1230
1231 2015-03-24 Gary Benson <gbenson@redhat.com>
1232
1233 * linux-low.h (linux_target_ops) <new_thread>: Changed signature.
1234 * linux-arm-low.c (arm_new_thread): Likewise.
1235 * linux-aarch64-low.c (aarch64_linux_new_thread): Likewise.
1236 * linux-mips-low.c (mips_linux_new_thread): Likewise.
1237 * linux-x86-low.c (x86_linux_new_thread): Likewise.
1238 * linux-low.c (add_lwp): Update the_low_target.new_thread call.
1239
1240 2015-03-24 Gary Benson <gbenson@redhat.com>
1241
1242 * linux-low.c (ptid_of_lwp): New function.
1243 (lwp_is_stopped): Likewise.
1244 (lwp_stop_reason): Likewise.
1245 * linux-x86-low.c (update_debug_registers_callback):
1246 Use lwp_is_stopped.
1247 (x86_linux_prepare_to_resume): Use ptid_of_lwp and
1248 lwp_stop_reason.
1249
1250 2015-03-24 Gary Benson <gbenson@redhat.com>
1251
1252 * linux-low.h (linux_stop_lwp): Remove declaration.
1253
1254 2015-03-24 Gary Benson <gbenson@redhat.com>
1255
1256 * linux-low.h: Include nat/linux-nat.h.
1257 * linux-low.c (iterate_over_lwps_args): New structure.
1258 (iterate_over_lwps_filter): New function.
1259 (iterate_over_lwps): Likewise.
1260 * linux-x86-low.c (update_debug_registers_callback):
1261 Update signature to what iterate_over_lwps expects.
1262 Remove PID check that iterate_over_lwps now performs.
1263 (x86_dr_low_set_addr): Use iterate_over_lwps.
1264 (x86_dr_low_set_control): Likewise.
1265
1266 2015-03-24 Gary Benson <gbenson@redhat.com>
1267
1268 * linux-x86-low.c (x86_debug_reg_state): New function.
1269 (x86_linux_prepare_to_resume): Use the above.
1270
1271 2015-03-24 Gary Benson <gbenson@redhat.com>
1272
1273 * linux-low.c (current_lwp_ptid): New function.
1274 * linux-x86-low.c: Include nat/linux-nat.h.
1275 (x86_dr_low_get_addr): Use current_lwp_ptid.
1276 (x86_dr_low_get_control): Likewise.
1277 (x86_dr_low_get_status): Likewise.
1278
1279 2015-03-20 Pedro Alves <palves@redhat.com>
1280
1281 * tracepoint.c (cmd_qtstatus): Make "str" const.
1282
1283 2015-03-20 Pedro Alves <palves@redhat.com>
1284
1285 * server.c (handle_general_set): Make "req_str" const.
1286
1287 2015-03-19 Pedro Alves <palves@redhat.com>
1288
1289 * linux-low.c (linux_resume_one_lwp): Rename to ...
1290 (linux_resume_one_lwp_throw): ... this. Don't handle ESRCH here,
1291 instead call perror_with_name.
1292 (check_ptrace_stopped_lwp_gone): New function.
1293 (linux_resume_one_lwp): Reimplement as wrapper around
1294 linux_resume_one_lwp_throw that swallows errors if the LWP is
1295 gone.
1296
1297 2015-03-19 Pedro Alves <palves@redhat.com>
1298
1299 * linux-low.c (count_events_callback, select_event_lwp_callback):
1300 No longer check whether the thread has resume_stop as last resume
1301 kind.
1302
1303 2015-03-19 Pedro Alves <palves@redhat.com>
1304
1305 * linux-low.c (count_events_callback, select_event_lwp_callback):
1306 Use the lwp's status_pending_p field, not the thread's.
1307
1308 2015-03-19 Pedro Alves <palves@redhat.com>
1309
1310 * linux-low.c (select_event_lwp_callback): Update comments to
1311 no longer mention SIGTRAP.
1312
1313 2015-03-18 Gary Benson <gbenson@redhat.com>
1314
1315 * server.c (handle_query): Do not report vFile:fstat as supported.
1316
1317 2015-03-11 Gary Benson <gbenson@redhat.com>
1318
1319 * hostio.c (sys/types.h): New include.
1320 (sys/stat.h): Likewise.
1321 (common-remote-fileio.h): Likewise.
1322 (handle_fstat): New function.
1323 (handle_vFile): Handle vFile:fstat packets.
1324
1325 2015-03-11 Gary Benson <gbenson@redhat.com>
1326
1327 * configure.ac (AC_CHECK_MEMBERS): Add checks for
1328 struct stat.st_blocks and struct stat.st_blksize.
1329 * configure: Regenerate.
1330 * config.in: Likewise.
1331 * Makefile.in (SFILES): Add common/common-remote-fileio.c.
1332 (OBS): Add common-remote-fileio.o.
1333 (common-remote-fileio.o): New rule.
1334
1335 2015-03-09 Pedro Alves <palves@redhat.com>
1336
1337 * tracepoint.c (gdb_agent_helper_thread): Cast '&sockaddr' to
1338 'struct sockaddr' pointer in 'accept' call.
1339
1340 2015-03-09 Pedro Alves <palves@redhat.com>
1341
1342 Revert:
1343 2015-03-07 Pedro Alves <palves@redhat.com>
1344 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1345 or <winsock2.h> here. Instead include "gdb_socket.h".
1346 (remote_open): Use union gdb_sockaddr_u.
1347 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1348 or <winsock2.h> here. Instead include "gdb_socket.h".
1349 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1350 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1351 or <sys/un.h>.
1352 (init_named_socket, gdb_agent_helper_thread): Use union
1353 gdb_sockaddr_u.
1354
1355 2015-03-07 Pedro Alves <palves@redhat.com>
1356
1357 * configure.ac (build_warnings): Move
1358 -Wdeclaration-after-statement to the C-specific set.
1359 * configure: Regenerate.
1360
1361 2015-03-07 Pedro Alves <palves@redhat.com>
1362
1363 * gdbreplay.c: No longer include <netinet/in.h>, <sys/socket.h>,
1364 or <winsock2.h> here. Instead include "gdb_socket.h".
1365 (remote_open): Use union gdb_sockaddr_u.
1366 * remote-utils.c: No longer include <netinet/in.h>, <sys/socket.h>
1367 or <winsock2.h> here. Instead include "gdb_socket.h".
1368 (handle_accept_event, remote_prepare): Use union gdb_sockaddr_u.
1369 * tracepoint.c: Include "gdb_socket.h" instead of <sys/socket.h>
1370 or <sys/un.h>.
1371 (init_named_socket, gdb_agent_helper_thread): Use union
1372 gdb_sockaddr_u.
1373
1374 2015-03-07 Pedro Alves <palves@redhat.com>
1375
1376 Adjust all callers of TRY_CATCH to use TRY/CATCH/END_CATCH
1377 instead.
1378
1379 2015-03-06 Yao Qi <yao.qi@linaro.org>
1380
1381 * linux-aarch64-low.c (aarch64_insert_point): Use
1382 show_debug_regs as a boolean.
1383 (aarch64_remove_point): Likewise.
1384
1385 2015-03-05 Pedro Alves <palves@redhat.com>
1386
1387 * lynx-low.c (lynx_target_ops): Install NULL hooks for
1388 stopped_by_sw_breakpoint, supports_stopped_by_sw_breakpoint,
1389 stopped_by_hw_breakpoint, supports_stopped_by_hw_breakpoint.
1390 * nto-low.c (nto_target_ops): Likewise.
1391 * spu-low.c (spu_target_ops): Likewise.
1392 * win32-low.c (win32_target_ops): Likewise.
1393
1394 2015-03-04 Pedro Alves <palves@redhat.com>
1395
1396 * linux-low.c (check_stopped_by_breakpoint) [USE_SIGTRAP_SIGINFO]:
1397 Decide whether a breakpoint triggered based on the SIGTRAP's
1398 siginfo.si_code.
1399 (thread_still_has_status_pending_p) [USE_SIGTRAP_SIGINFO]: Don't check whether a
1400 breakpoint is inserted if relying on SIGTRAP's siginfo.si_code.
1401 (linux_low_filter_event): Check for breakpoints before checking
1402 watchpoints.
1403 (linux_wait_1): Don't re-increment the PC if relying on SIGTRAP's
1404 siginfo.si_code.
1405 (linux_stopped_by_sw_breakpoint)
1406 (linux_supports_stopped_by_sw_breakpoint)
1407 (linux_stopped_by_hw_breakpoint)
1408 (linux_supports_stopped_by_hw_breakpoint): New functions.
1409 (linux_target_ops): Install new target methods.
1410
1411 2015-03-04 Pedro Alves <palves@redhat.com>
1412
1413 * remote-utils.c (prepare_resume_reply): Report swbreak/hbreak.
1414 * server.c (swbreak_feature, hwbreak_feature): New globals.
1415 (handle_query) <qSupported>: Handle "swbreak+" and "hwbreak+".
1416 (captured_main): Clear swbreak_feature and hwbreak_feature.
1417 * server.h (swbreak_feature, hwbreak_feature): Declare.
1418 * target.h (struct target_ops) <stopped_by_sw_breakpoint,
1419 supports_stopped_by_sw_breakpoint, stopped_by_hw_breakpoint,
1420 supports_stopped_by_hw_breakpoint>: New fields.
1421 (target_supports_stopped_by_sw_breakpoint)
1422 (target_stopped_by_sw_breakpoint)
1423 (target_supports_stopped_by_hw_breakpoint)
1424 (target_stopped_by_hw_breakpoint): Declare.
1425
1426 2015-03-04 Pedro Alves <palves@redhat.com>
1427
1428 enum lwp_stop_reason -> enum target_stop_reason
1429 * linux-low.c (check_stopped_by_breakpoint): Adjust.
1430 (thread_still_has_status_pending_p, check_stopped_by_watchpoint)
1431 (linux_wait_1, stuck_in_jump_pad_callback)
1432 (move_out_of_jump_pad_callback, linux_resume_one_lwp)
1433 (linux_stopped_by_watchpoint):
1434 * linux-low.h (enum lwp_stop_reason): Delete.
1435 (struct lwp_info) <stop_reason>: Now an enum target_stop_reason.
1436 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1437
1438 2015-03-04 Yao Qi <yao.qi@linaro.org>
1439
1440 * Makefile.in (SFILES): Add linux-aarch64-low.c.
1441
1442 2015-03-03 Gary Benson <gbenson@redhat.com>
1443
1444 * hostio.c (handle_vFile): Fix prefix lengths.
1445
1446 2015-03-03 Markus Metzger <markus.t.metzger@intel.com>
1447
1448 * linux-low.c (linux_low_enable_btrace): Do not overwrite non-zero
1449 ptr_bits.
1450
1451 2015-03-02 Andreas Arnez <arnez@linux.vnet.ibm.com>
1452
1453 * Makefile.in (s390-vx-linux64.c, s390-tevx-linux64.c)
1454 (s390x-vx-linux64.c, s390x-tevx-linux64.c): New rules.
1455 (clean): Add "rm -f" for above C files.
1456 * configure.srv (srv_regobj): Add s390-vx-linux64.o,
1457 s390-tevx-linux64.o, s390x-vx-linux64.o, and s390x-tevx-linux64.o.
1458 (srv_xmlfiles): Add s390-vx-linux64.xml, s390-tevx-linux64.xml,
1459 s390x-vx-linux64.xml, s390x-tevx-linux64.xml, and s390-vx.xml.
1460 * linux-s390-low.c (HWCAP_S390_VX): New macro.
1461 (init_registers_s390_vx_linux64, init_registers_s390_tevx_linux64)
1462 (init_registers_s390x_vx_linux64)
1463 (init_registers_s390x_tevx_linux64)
1464 (tdesc_s390_vx_linux64, tdesc_s390_tevx_linux64)
1465 (tdesc_s390x_vx_linux64, tdesc_s390x_tevx_linux64): New extern
1466 declarations.
1467 (s390_fill_vxrs_low, s390_store_vxrs_low, s390_fill_vxrs_high)
1468 (s390_store_vxrs_high): New functions.
1469 (s390_regsets): Add entries for NT_S390_VXRS_LOW and
1470 NT_S390_VXRS_HIGH.
1471 (s390_arch_setup): Add logic for selecting one of the new target
1472 descriptions. Activate the new vector regsets if applicable.
1473 (initialize_low_arch): Also invoke init_registers_s390_vx_linux64,
1474 init_registers_s390_tevx_linux64, init_registers_s390x_vx_linux64,
1475 and init_registers_s390x_tevx_linux64.
1476
1477 2015-03-01 Pedro Alves <palves@redhat.com>
1478
1479 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Constify 'raw_regs'
1480 parameter.
1481
1482 2015-02-27 Pedro Alves <palves@redhat.com>
1483
1484 * linux-x86-low.c (u_debugreg_offset): New function.
1485 (x86_linux_dr_get, x86_linux_dr_set): Use it.
1486
1487 2015-02-27 Pedro Alves <palves@redhat.com>
1488
1489 * gdb_proc_service.h: Wrap with EXTERN_C_PUSH/EXTERN_C_POP.
1490 [!HAVE_PROC_SERVICE_H] (struct ps_prochandle): Forward declare.
1491 [!HAVE_PROC_SERVICE_H] (ps_pdread, ps_pdwrite, ps_ptread)
1492 ps_ptwrite, ps_lgetregs, ps_lsetregs, ps_lgetfpregs)
1493 (ps_lsetfpregs, ps_getpid)
1494 (ps_get_thread_area, ps_pglobal_lookup, ps_pstop, ps_pcontinue)
1495 (ps_lstop, ps_lcontinue, ps_lgetxregsize, ps_lgetxregs)
1496 (ps_lsetxregs, ps_plog): Declare.
1497
1498 2015-02-27 Pedro Alves <palves@redhat.com>
1499
1500 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Use
1501 IP_AGENT_EXPORT_FUNC.
1502 * linux-i386-ipa.c (gdb_agent_get_raw_reg): Use
1503 IP_AGENT_EXPORT_FUNC.
1504 * tracepoint.c (ATTR_USED, ATTR_NOINLINE, ATTR_CONSTRUCTOR)
1505 (IP_AGENT_EXPORT): Delete.
1506 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1507 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1508 (gdb_trampoline_buffer_error, collecting, gdb_collect)
1509 (stop_tracing, flush_trace_buffer, about_to_request_buffer_space)
1510 (trace_buffer_is_full, stopping_tracepoint, expr_eval_result)
1511 (error_tracepoint, tracepoints, tracing, trace_buffer_ctrl)
1512 (trace_buffer_ctrl_curr, trace_buffer_lo, trace_buffer_hi)
1513 (traceframe_read_count, traceframe_write_count)
1514 (traceframes_created, trace_state_variables, get_raw_reg)
1515 (get_trace_state_variable_value, set_trace_state_variable_value)
1516 (ust_loaded, helper_thread_id, cmd_buf): Use
1517 IPA_SYM_EXPORTED_NAME.
1518 (stop_tracing, flush_trace_buffer): Use IP_AGENT_EXPORT_FUNC.
1519 (tracepoints) Use IP_AGENT_EXPORT_VAR.
1520 (stopping_tracepoint, trace_buffer_is_full, expr_eval_result): Use
1521 IP_AGENT_EXPORT_VAR and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1522 (last_tracepoint): Move into !IN_PROCESS_AGENT block.
1523 (error_tracepoint): Use IP_AGENT_EXPORT_VAR and wrap in
1524 EXTERN_C_PUSH/EXTERN_C_POP.
1525 (trace_state_variables): Use IP_AGENT_EXPORT_VAR.
1526 (trace_buffer_lo, trace_buffer_hi): Use IP_AGENT_EXPORT_VAR and
1527 wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1528 (trace_buffer_ctrl, trace_buffer_ctrl_curr)
1529 (traceframe_write_count, traceframe_read_count)
1530 (traceframes_created, tracing): Use IP_AGENT_EXPORT_VAR.
1531 (about_to_request_buffer_space, get_trace_state_variable_value)
1532 (set_trace_state_variable_value): Use IP_AGENT_EXPORT_FUNC.
1533 (collecting): Use IP_AGENT_EXPORT_VAR and wrap in
1534 EXTERN_C_PUSH/EXTERN_C_POP.
1535 (gdb_collect): Use IP_AGENT_EXPORT_FUNC.
1536 (ust_loaded, cmd_buf): Use IP_AGENT_EXPORT_VAR.
1537 (helper_thread_id, gdb_agent_capability): Use IP_AGENT_EXPORT_VAR
1538 and wrap in EXTERN_C_PUSH/EXTERN_C_POP.
1539 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
1540 (gdb_trampoline_buffer, gdb_trampoline_buffer_end)
1541 (gdb_trampoline_buffer_error): Use IP_AGENT_EXPORT_VAR.
1542 * tracepoint.h (ATTR_USED, ATTR_NOINLINE, EXPORTED_SYMBOL):
1543 Define.
1544 (IP_AGENT_EXPORT_FUNC, IP_AGENT_EXPORT_VAR)
1545 (IP_AGENT_EXPORT_VAR_DECL): Define.
1546 (tracing): Declare.
1547 (gdb_agent_get_raw_reg): Declare.
1548
1549 2015-02-27 Tom Tromey <tromey@redhat.com>
1550 Pedro Alves <palves@redhat.com>
1551
1552 Rename symbols whose names are reserved C++ keywords throughout.
1553
1554 2015-02-27 Pedro Alves <palves@redhat.com>
1555
1556 * Makefile.in (COMPILER): New, get it from autoconf.
1557 (CXX): Get from autoconf instead.
1558 (COMPILE.pre): Use COMPILER.
1559 (CC-LD): Rename to ...
1560 (CC_LD): ... this. Use COMPILER.
1561 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT), $(IPA_LIB)): Adjust.
1562 (CXX_FOR_TARGET): Default to g++ instead of gcc.
1563 * acinclude.m4: Include build-with-cxx.m4.
1564 * configure.ac: Call AC_PROG_CXX and GDB_AC_BUILD_WITH_CXX.
1565 Disable -Werror by default if building in C++ mode.
1566 (build_warnings): Add -Wno-sign-compare, -Wno-write-strings and
1567 -Wno-narrowing in C++ mode. Run supported-warning-flags tests with
1568 the C++ compiler. Save/restore CXXFLAGS too.
1569 * configure: Regenerate.
1570
1571 2015-02-27 Pedro Alves <palves@redhat.com>
1572
1573 * acinclude.m4: Include libiberty.m4.
1574 * configure.ac: Call libiberty_INIT.
1575 * config.in, configure: Regenerate.
1576
1577 2015-02-26 Pedro Alves <palves@redhat.com>
1578
1579 * linux-low.c (linux_wait_1): When incrementing the PC past a
1580 program breakpoint always use the_low_target.breakpoint_len as
1581 increment, rather than the maximum between that and
1582 the_low_target.decr_pc_after_break.
1583
1584 2015-02-23 Pedro Alves <palves@redhat.com>
1585
1586 * linux-low.c (check_stopped_by_breakpoint): Don't check if the
1587 thread was doing a step-over; always adjust the PC if
1588 we stepped over a permanent breakpoint.
1589 (linux_wait_1): If we stepped over breakpoint that was on top of a
1590 permanent breakpoint, manually advance the PC past it.
1591
1592 2015-02-23 Pedro Alves <palves@redhat.com>
1593
1594 * linux-x86-low.c (REGSIZE): Define in both 32-bit and 64-bit
1595 modes.
1596 (x86_fill_gregset, x86_store_gregset): Use it when handling
1597 $orig_eax.
1598
1599 2015-02-20 Pedro Alves <palves@redhat.com>
1600
1601 * thread-db.c: Include "nat/linux-procfs.h".
1602 (thread_db_init): Skip listing new threads if the kernel supports
1603 PTRACE_EVENT_CLONE and /proc/PID/task/ is accessible.
1604
1605 2015-02-20 Pedro Alves <palves@redhat.com>
1606
1607 * linux-low.c (status_pending_p_callback): Use ptid_match.
1608
1609 2015-02-19 Antoine Tremblay <antoine.tremblay@ericsson.com>
1610
1611 PR breakpoints/16812
1612 * linux-low.c (wstatus_maybe_breakpoint): Remove.
1613 (linux_low_filter_event): Update wstatus_maybe_breakpoint name.
1614 (linux_wait_1): Report SIGTRAP,SIGILL,SIGSEGV.
1615
1616 2015-02-10 Antoine Tremblay <antoine.tremblay@ericsson.com>
1617
1618 PR breakpoints/15956
1619 * tracepoint.c (cmd_qtinit): Add check for current_thread.
1620
1621 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1622
1623 * linux-low.c (linux_low_btrace_conf): Print size.
1624 * server.c (handle_btrace_conf_general_set): New.
1625 (hanle_general_set): Call handle_btrace_conf_general_set.
1626 (handle_query): Report Qbtrace-conf:bts:size as supported.
1627
1628 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1629
1630 * linux-low.c (linux_low_enable_btrace): Update parameters.
1631 (linux_low_btrace_conf): New.
1632 (linux_target_ops)<to_btrace_conf>: Initialize.
1633 * server.c (current_btrace_conf): New.
1634 (handle_btrace_enable): Rename to ...
1635 (handle_btrace_enable_bts): ... this. Pass &current_btrace_conf
1636 to target_enable_btrace. Update comment. Update users.
1637 (handle_qxfer_btrace_conf): New.
1638 (qxfer_packets): Add btrace-conf entry.
1639 (handle_query): Report qXfer:btrace-conf:read as supported packet.
1640 * target.h (target_ops)<enable_btrace>: Update parameters and comment.
1641 (target_ops)<read_btrace_conf>: New.
1642 (target_enable_btrace): Update parameters.
1643 (target_read_btrace_conf): New.
1644
1645 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1646
1647 * server.c (handle_btrace_general_set): Remove call to
1648 target_supports_btrace.
1649 (supported_btrace_packets): New.
1650 (handle_query): Call supported_btrace_packets.
1651 * target.h: include btrace-common.h.
1652 (btrace_target_info): Removed.
1653 (supports_btrace, target_supports_btrace): Update parameters.
1654
1655 2015-02-09 Markus Metzger <markus.t.metzger@intel.com>
1656
1657 * Makefile.in (SFILES): Add common/btrace-common.c.
1658 (OBS): Add common/btrace-common.o.
1659 (btrace-common.o): Add build rules.
1660 * linux-low: Include btrace-common.h.
1661 (linux_low_read_btrace): Use struct btrace_data. Call
1662 btrace_data_init and btrace_data_fini.
1663
1664 2015-02-06 Pedro Alves <palves@redhat.com>
1665
1666 * thread-db.c (find_new_threads_callback): Add debug output.
1667
1668 2015-02-04 Pedro Alves <palves@redhat.com>
1669
1670 * linux-low.c (handle_extended_wait): Don't resume LWPs here.
1671 (resume_stopped_resumed_lwps): New function.
1672 (linux_wait_for_event_filtered): Use it.
1673
1674 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1675
1676 * Makefile.in (SFILES): Add linux-personality.c.
1677 (linux-personality.o): New rule.
1678 * configure.srv (srv_linux_obj): Add linux-personality.o to the
1679 list of objects to be built.
1680 * linux-low.c: Include nat/linux-personality.h.
1681 (linux_create_inferior): Remove code to disable address space
1682 randomization (moved to ../nat/linux-personality.c). Create
1683 cleanup to disable address space randomization.
1684
1685 2015-01-15 Sergio Durigan Junior <sergiodj@redhat.com>
1686
1687 * Makefile.in (posix-strerror.o): New rule.
1688 (mingw-strerror.o): Likewise.
1689 * configure: Regenerated.
1690 * configure.ac: Source file ../common/common.host. Initialize new
1691 variable srv_host_obs. Add srv_host_obs to GDBSERVER_DEPFILES.
1692
1693 2015-01-14 Yao Qi <yao@codesourcery.com>
1694
1695 * Makefile.in (SFILES): Add nat/ppc-linux.c.
1696 (ppc-linux.o): New rule.
1697 * configure.srv (powerpc*-*-linux*): Add ppc-linux.o.
1698 * configure.ac: AC_CHECK_FUNCS(getauxval).
1699 * config.in: Re-generated.
1700 * configure: Re-generated.
1701 * linux-ppc-low.c (ppc_arch_setup) [__powerpc64__]: Call
1702 ppc64_64bit_inferior_p
1703
1704 2015-01-14 Yao Qi <yao@codesourcery.com>
1705
1706 * linux-ppc-low.c: Include "nat/ppc-linux.h".
1707 (PPC_FEATURE_HAS_VSX): Move to nat/ppc-linux.h.
1708 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Likewise.
1709 (PT_ORIG_R3, PT_TRAP): Likewise.
1710 (PTRACE_GETVSXREGS, PTRACE_SETVSXREGS): Likewise.
1711 (PTRACE_GETVRREGS, PTRACE_SETVRREGS): Likewise.
1712 (PTRACE_GETEVRREGS, PTRACE_SETEVRREGS): Likewise.
1713
1714 2015-01-10 Joel Brobecker <brobecker@adacore.com>
1715
1716 * i387-fp.c (i387_cache_to_xsave): In look over
1717 num_avx512_zmmh_high_registers, replace use of struct i387_xsave
1718 zmmh_low_space field by use of zmmh_high_space.
1719
1720 2015-01-09 Pedro Alves <palves@redhat.com>
1721
1722 * linux-low.c (step_over_bkpt): Move higher up in the file.
1723 (handle_extended_wait): Don't store the stop_pc here.
1724 (get_stop_pc): Adjust comments and rename to ...
1725 (check_stopped_by_breakpoint): ... this. Record whether the LWP
1726 stopped for a software breakpoint or hardware breakpoint.
1727 (thread_still_has_status_pending_p): New function.
1728 (status_pending_p_callback): Use
1729 thread_still_has_status_pending_p. If the event is no longer
1730 interesting, resume the LWP.
1731 (handle_tracepoints): Add assert.
1732 (maybe_move_out_of_jump_pad): Remove cancel_breakpoints call.
1733 (wstatus_maybe_breakpoint): New function.
1734 (cancel_breakpoint): Delete function.
1735 (check_stopped_by_watchpoint): New function, factored out from
1736 linux_low_filter_event.
1737 (lp_status_maybe_breakpoint): Delete function.
1738 (linux_low_filter_event): Remove filter_ptid argument.
1739 Leave thread group exits pending here. Store the LWP's stop PC.
1740 Always leave events pending.
1741 (linux_wait_for_event_filtered): Pull all events out of the
1742 kernel, and leave them all pending.
1743 (count_events_callback, select_event_lwp_callback): Consider all
1744 events.
1745 (cancel_breakpoints_callback, linux_cancel_breakpoints): Delete.
1746 (select_event_lwp): Only give preference to the stepping LWP in
1747 all-stop mode. Adjust comments.
1748 (ignore_event): New function.
1749 (linux_wait_1): Delete 'retry' label. Use ignore_event. Remove
1750 references to cancel_breakpoints. Adjust to renames. Also give
1751 equal priority to all LWPs that have had events in non-stop mode.
1752 If reporting a software breakpoint event, unadjust the LWP's PC.
1753 (linux_wait): If linux_wait_1 returned an ignored event, retry.
1754 (stuck_in_jump_pad_callback, move_out_of_jump_pad_callback):
1755 Adjust.
1756 (linux_resume_one_lwp): Store the LWP's PC. Adjust.
1757 (resume_status_pending_p): Use thread_still_has_status_pending_p.
1758 (linux_stopped_by_watchpoint): Adjust.
1759 (linux_target_ops): Remove reference to linux_cancel_breakpoints.
1760 * linux-low.h (enum lwp_stop_reason): New.
1761 (struct lwp_info) <stop_pc>: Adjust comment.
1762 <stopped_by_watchpoint>: Delete field.
1763 <stop_reason>: New field.
1764 * linux-x86-low.c (x86_linux_prepare_to_resume): Adjust.
1765 * mem-break.c (software_breakpoint_inserted_here)
1766 (hardware_breakpoint_inserted_here): New function.
1767 * mem-break.h (software_breakpoint_inserted_here)
1768 (hardware_breakpoint_inserted_here): Declare.
1769 * target.h (struct target_ops) <cancel_breakpoints>: Remove field.
1770 (cancel_breakpoints): Delete.
1771 * tracepoint.c (clear_installed_tracepoints, stop_tracing)
1772 (upload_fast_traceframes): Remove references to
1773 cancel_breakpoints.
1774
1775 2015-01-09 Pedro Alves <palves@redhat.com>
1776
1777 * thread-db.c (find_new_threads_callback): Ignore thread if the
1778 kernel thread ID is -1.
1779
1780 2015-01-09 Pedro Alves <palves@redhat.com>
1781
1782 * linux-low.c (linux_attach_fail_reason_string): Move to
1783 nat/linux-ptrace.c, and rename.
1784 (linux_attach_lwp): Update comment.
1785 (attach_proc_task_lwp_callback): New function.
1786 (linux_attach): Adjust to rename and use
1787 linux_proc_attach_tgid_threads.
1788 (linux_attach_fail_reason_string): Delete declaration.
1789
1790 2015-01-01 Joel Brobecker <brobecker@adacore.com>
1791
1792 * gdbreplay.c (gdbreplay_version): Update copyright year to 2015.
1793 * server.c (gdbserver_version): Likewise.
1794
1795 2014-12-29 Sergio Durigan Junior <sergiodj@redhat.com>
1796
1797 * remote-utils.c: Include ctype.h.
1798 (input_interrupt): Explicitly handle the case when the char
1799 received is the NUL byte. Improve the printing of non-ASCII
1800 characters.
1801
1802 2014-12-16 Joel Brobecker <brobecker@adacore.com>
1803
1804 * linux-low.c (linux_low_filter_event): Update call to
1805 linux_enable_event_reporting following the addition of
1806 a new parameter to that function.
1807
1808 2014-12-16 Catalin Udma <catalin.udma@freescale.com>
1809
1810 PR server/17457
1811 * linux-aarch64-low.c (AARCH64_FPSR_REGNO): New define.
1812 (AARCH64_FPCR_REGNO): Likewise.
1813 (AARCH64_NUM_REGS): Update to include fpsr/fpcr registers.
1814 (aarch64_fill_fpregset): Add missing fpsr/fpcr registers.
1815 (aarch64_store_fpregset): Likewise.
1816
1817 2014-12-15 Joel Brobecker <brobecker@adacore.com>
1818
1819 * lynx-low.c (lynx_resume): Use PTRACE_SINGLESTEP_ONE if N == 1.
1820 Remove FIXME comment about assumption about N.
1821
1822 2014-12-13 Joel Brobecker <brobecker@adacore.com>
1823
1824 * configure.ac: If large-file support is disabled in GDBserver,
1825 pass --disable-largefile to ACX_CONFIGURE_DIR call for "gnulib".
1826 * configure: Regenerate.
1827
1828 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1829
1830 * linux-low.c (regsets_fetch_inferior_registers): Suppress the
1831 warning upon ENODATA from ptrace.
1832 * linux-s390-low.c (s390_store_tdb): New.
1833 (s390_regsets): Add regset for NT_S390_TDB.
1834
1835 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1836
1837 * linux-low.c (regsets_store_inferior_registers): Skip regsets
1838 without a fill_function.
1839 * linux-s390-low.c (s390_fill_last_break): Remove.
1840 (s390_regsets): Set fill_function to NULL for NT_S390_LAST_BREAK.
1841 (s390_arch_setup): Use regset's size instead of fill_function for
1842 loop end condition.
1843
1844 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1845
1846 * linux-low.c (regsets_fetch_inferior_registers): Do not invoke
1847 the regset's store function when ptrace returned an error.
1848 * regcache.c (get_thread_regcache): Invalidate register cache
1849 before fetching inferior's registers.
1850
1851 2014-12-12 Andreas Arnez <arnez@linux.vnet.ibm.com>
1852
1853 * linux-low.c (regsets_fetch_inferior_registers): Rephrase
1854 while-loop as for-loop.
1855 (regsets_store_inferior_registers): Likewise.
1856
1857 2014-11-28 Yao Qi <yao@codesourcery.com>
1858
1859 * configure.ac(AC_CHECK_FUNCS): Remove readlink.
1860 * config.in, configure: Re-generate.
1861 * hostio.c (handle_unlink): Remove code checking HAVE_READLINK
1862 is defined.
1863
1864 2014-11-21 Yao Qi <yao@codesourcery.com>
1865
1866 * configure.ac: Don't invoke AC_FUNC_ALLOCA.
1867 (AC_CHECK_HEADERS): Remove malloc.h.
1868 * configure: Re-generated.
1869 * config.in: Re-generated.
1870 * server.h: Don't include alloca.h and malloc.h.
1871 * gdbreplay.c: Don't check HAVE_ALLOCA_H is defined.
1872 Don't include malloc.h.
1873
1874 2014-11-17 Joel Brobecker <brobecker@adacore.com>
1875
1876 * lynx-low.c (lynx_write_memory): Put lynx_read_memory and
1877 corresponding ERRNO check in same block.
1878
1879 2014-11-12 Pedro Alves <palves@redhat.com>
1880
1881 * server.c (cont_thread): Update comment.
1882 (start_inferior, attach_inferior): No longer clear cont_thread.
1883 (handle_v_cont): No longer set cont_thread.
1884 (captured_main): Clear cont_thread each time a GDB connects.
1885
1886 2014-11-12 Pedro Alves <palves@redhat.com>
1887
1888 * linux-low.c (linux_wait_1): Don't force a wait for the Hc
1889 thread, and don't resume all threads if the Hc thread has exited.
1890
1891 2014-11-12 Pedro Alves <palves@redhat.com>
1892
1893 * linux-low.c (linux_request_interrupt): Always send a SIGINT to
1894 the process group instead of to a specific LWP.
1895
1896 2014-10-15 Pedro Alves <palves@redhat.com>
1897
1898 PR server/17487
1899 * win32-arm-low.c (arm_set_thread_context): Remove current_event
1900 parameter.
1901 (arm_set_thread_context): Delete.
1902 (the_low_target): Adjust.
1903 * win32-i386-low.c (debug_registers_changed)
1904 (debug_registers_used): Delete.
1905 (update_debug_registers_callback): New function.
1906 (x86_dr_low_set_addr, x86_dr_low_set_control): Mark all threads as
1907 needing to update their debug registers.
1908 (win32_get_current_dr): New function.
1909 (x86_dr_low_get_addr, x86_dr_low_get_control)
1910 (x86_dr_low_get_status): Fetch the debug register from the thread
1911 record's context.
1912 (i386_initial_stuff): Adjust.
1913 (i386_get_thread_context): Remove current_event parameter. Don't
1914 clear debug_registers_changed nor copy DR values to
1915 debug_reg_state.
1916 (i386_set_thread_context): Delete.
1917 (i386_prepare_to_resume): New function.
1918 (i386_thread_added): Mark the thread as needing to update irs
1919 debug registers.
1920 (the_low_target): Remove i386_set_thread_context and install
1921 i386_prepare_to_resume.
1922 * win32-low.c (win32_get_thread_context): Adjust.
1923 (win32_set_thread_context): Use SetThreadContext
1924 directly.
1925 (win32_prepare_to_resume): New function.
1926 (win32_require_context): New function, factored out from ...
1927 (thread_rec): ... this.
1928 (continue_one_thread): Call win32_prepare_to_resume on each thread
1929 we're about to continue.
1930 (win32_resume): Call win32_prepare_to_resume on the event thread.
1931 * win32-low.h (struct win32_thread_info)
1932 <debug_registers_changed>: New field.
1933 (struct win32_target_ops): Change prototype of set_thread_context,
1934 delete set_thread_context and add prepare_to_resume.
1935 (win32_require_context): New declaration.
1936
1937 2014-10-08 Gary Benson <gbenson@redhat.com>
1938
1939 * server.h: Do not include common-exceptions.h.
1940
1941 2014-10-08 Gary Benson <gbenson@redhat.com>
1942
1943 * server.h: Do not include cleanups.h.
1944
1945 2014-09-30 James Hogan <james.hogan@imgtec.com>
1946
1947 * Makefile.in (clean): Add rm -f commands for mips-dsp-linux.c and
1948 mips64-dsp-linux.c.
1949
1950 2014-09-23 Yao Qi <yao@codesourcery.com>
1951
1952 * linux-low.c (lp_status_maybe_breakpoint): New function.
1953 (linux_low_filter_event): Call lp_status_maybe_breakpoint.
1954 (count_events_callback): Likewise.
1955 (select_event_lwp_callback): Likewise.
1956 (cancel_breakpoints_callback): Likewise.
1957
1958 2014-09-19 Don Breazeal <donb@codesourcery.com>
1959
1960 * linux-low.c (handle_extended_wait): Call
1961 linux_ptrace_get_extended_event.
1962 (get_stop_pc, get_detach_signal, linux_low_filter_event): Call
1963 linux_is_extended_waitstatus.
1964
1965 2014-09-16 Joel Brobecker <brobecker@adacore.com>
1966
1967 * Makefile.in (CPPFLAGS): Define.
1968 (INTERNAL_CFLAGS_BASE): Add ${CPPFLAGS}.
1969 (IPAGENT_CFLAGS): Remove ${CPPFLAGS}.
1970
1971 2014-09-16 Gary Benson <gbenson@redhat.com>
1972
1973 * inferiors.h (current_inferior): Renamed as...
1974 (current_thread): New variable. All uses updated.
1975 * linux-low.c (get_pc): Renamed saved_inferior as saved_thread.
1976 (maybe_move_out_of_jump_pad): Likewise.
1977 (cancel_breakpoint): Likewise.
1978 (linux_low_filter_event): Likewise.
1979 (wait_for_sigstop): Likewise.
1980 (linux_resume_one_lwp): Likewise.
1981 (need_step_over_p): Likewise.
1982 (start_step_over): Likewise.
1983 (linux_stabilize_threads): Renamed save_inferior as saved_thread.
1984 * linux-x86-low.c (x86_linux_update_xmltarget): Likewise.
1985 * proc-service.c (ps_lgetregs): Renamed reg_inferior as reg_thread
1986 and save_inferior as saved_thread.
1987 * regcache.c (get_thread_regcache): Renamed saved_inferior as
1988 saved_thread.
1989 (regcache_invalidate_thread): Likewise.
1990 * remote-utils.c (prepare_resume_reply): Likewise.
1991 * thread-db.c (thread_db_get_tls_address): Likewise.
1992 (disable_thread_event_reporting): Likewise.
1993 (remove_thread_event_breakpoints): Likewise.
1994 * tracepoint.c (gdb_agent_about_to_close): Renamed save_inferior
1995 as saved_thread.
1996 * target.h (set_desired_inferior): Renamed as...
1997 (set_desired_thread): New declaration. All uses updated.
1998 * server.c (myresume): Updated comment to reference thread instead
1999 of inferior.
2000 (handle_serial_event): Likewise.
2001 (handle_target_event): Likewise.
2002
2003 2014-09-12 Tom Tromey <tromey@redhat.com>
2004 Gary Benson <gbenson@redhat.com>
2005
2006 * regcache.h: Include common-regcache.h.
2007 (regcache_read_pc): Don't declare.
2008 * regcache.c (get_thread_regcache_for_ptid): New function.
2009
2010 2014-09-11 Tom Tromey <tromey@redhat.com>
2011 Gary Benson <gbenson@redhat.com>
2012
2013 * symbol.c: New file.
2014 * Makefile.in (SFILES): Add symbol.c.
2015 (OBS): Add symbol.o.
2016
2017 2014-09-11 Gary Benson <gbenson@redhat.com>
2018
2019 * target.c (target_stop_ptid, target_continue_ptid): New
2020 functions.
2021
2022 2014-09-11 Tom Tromey <tromey@redhat.com>
2023 Gary Benson <gbenson@redhat.com>
2024
2025 * target.h: Include target/target.h.
2026 * target.c (target_read_memory, target_read_uint32)
2027 (target_write_memory): New functions.
2028
2029 2014-09-11 Gary Benson <gbenson@redhat.com>
2030
2031 * server.h (debug_hw_points): Don't declare.
2032 * server.c (debug_hw_points): Don't define. Replace all uses
2033 with show_debug_regs.
2034 * linux-aarch64-low.c (debug_hw_points): Don't define. Replace
2035 all uses with show_debug_regs.
2036
2037 2014-09-08 Edjunior Barbosa Machado <emachado@linux.vnet.ibm.com>
2038
2039 * linux-ppc-low.c (ppc_collect_ptrace_register): Adjust routine to take
2040 endianness into account.
2041 (ppc_supply_ptrace_register): Likewise.
2042
2043 2014-09-03 James Hogan <james.hogan@imgtec.com>
2044
2045 * linux-mips-low.c (mips_read_description): Reset errno to 0 prior
2046 to reading DSP_CONTROL with PTRACE_PEEKUSER ptrace call.
2047
2048 2014-09-03 Gary Benson <gbenson@redhat.com>
2049
2050 * linux-x86-low.c (x86_linux_prepare_to_resume): Use
2051 ALL_DEBUG_ADDRESS_REGISTERS.
2052
2053 2014-09-02 Gary Benson <gbenson@redhat.com>
2054
2055 * i386-low.h: Renamed as...
2056 * x86-low.h: New file. All type, function and variable name
2057 prefixes changed from "i386_" to "x86_". All references updated.
2058 * i386-low.c: Renamed as...
2059 * x86-low.c: New file. All type, function and variable name
2060 prefixes changed from "i386_" to "x86_". All references updated.
2061
2062 2014-09-02 Gary Benson <gbenson@redhat.com>
2063
2064 * linux-x86-low.c (x86_linux_new_process): Use XCNEW.
2065 (x86_linux_new_thread): Likewise.
2066
2067 2014-08-29 Gary Benson <gbenson@redhat.com>
2068
2069 * server.h (setjmp.h): Do not include.
2070 (toplevel): Do not declare.
2071 (common-exceptions.h): Include.
2072 (cleanups.h): Likewise.
2073 * server.c (toplevel): Do not define.
2074 (exit_code): New static global.
2075 (detach_or_kill_for_exit_cleanup): New function.
2076 (main): New function. Original main renamed to...
2077 (captured_main): New function.
2078 * utils.c (verror) [!IN_PROCESS_AGENT]: Use throw_verror.
2079
2080 2014-08-29 Gary Benson <gbenson@redhat.com>
2081
2082 * Makefile.in (SFILES): Add common/common-exceptions.c.
2083 (OBS): Add common-exceptions.o.
2084 (common-exceptions.o): New rule.
2085 * utils.c (prepare_to_throw_exception): New function.
2086
2087 2014-08-29 Gary Benson <gbenson@redhat.com>
2088
2089 * config.in: Regenerate.
2090 * configure: Likewise.
2091
2092 2014-08-29 Gary Benson <gbenson@redhat.com>
2093
2094 * Makefile.in (SFILES): Add common/cleanups.c.
2095 (OBS): cleanups.o.
2096 (cleanups.o): New rule.
2097
2098 2014-08-29 Gary Benson <gbenson@redhat.com>
2099
2100 * utils.c (internal_vwarning): New function.
2101
2102 2014-08-28 Gary Benson <gbenson@redhat.com>
2103
2104 * utils.h (fatal): Remove declaration.
2105 * utils.c (fatal): Remove function.
2106
2107 2014-08-28 Gary Benson <gbenson@redhat.com>
2108
2109 * tracepoint.c (gdb_agent_init): Replace fatal with
2110 perror_with_name.
2111 (initialize_tracepoint): Likewise.
2112
2113 2014-08-28 Gary Benson <gbenson@redhat.com>
2114
2115 * remote-utils.c (remote_prepare): Replace fatal with error.
2116
2117 2014-08-28 Gary Benson <gbenson@redhat.com>
2118
2119 * linux-low.c (linux_async): Replace fatal with warning.
2120 Tidy up and return.
2121 (linux_start_non_stop): Return -1 if linux_async failed.
2122
2123 2014-08-28 Gary Benson <gbenson@redhat.com>
2124
2125 * linux-x86-low.c (i386_dr_low_set_addr): Replace check with
2126 gdb_assert.
2127 (i386_dr_low_get_addr): Remove vague comment.
2128 * win32-i386-low.c (i386_dr_low_set_addr): Replace check with
2129 gdb_assert.
2130
2131 2014-08-28 Gary Benson <gbenson@redhat.com>
2132
2133 * inferiors.c (get_thread_process): Replace check with gdb_assert.
2134 * linux-low.c (linux_wait_for_event_filtered): Replace fatal with
2135 internal_error.
2136 (linux_resume_one_lwp): Likewise.
2137 * linux-x86-low.c (x86_siginfo_fixup): Replace checks with
2138 gdb_assert.
2139 * mem-break.c (raw_bkpt_type_to_target_hw_bp_type): Replace fatal
2140 with internal_error.
2141 * regcache.c (get_thread_regcache): Replace check with gdb_assert.
2142 (init_register_cache): Replace fatal with gdb_assert_not_reached.
2143 (find_register_by_name): Replace fatal with internal_error.
2144 (find_regno): Likewise.
2145 * tdesc.c (init_target_desc): Replace check with gdb_assert.
2146 * thread-db.c (thread_db_create_event): Likewise.
2147 (thread_db_load_search): Likewise.
2148 (try_thread_db_load_1): Likewise.
2149 * tracepoint.c (get_jump_space_head): Replace fatal with
2150 internal_error.
2151 (claim_trampoline_space): Likewise.
2152 (have_fast_tracepoint_trampoline_buffer): Likewise.
2153 (cmd_qtstart): Likewise.
2154 (stop_tracing): Likewise.
2155 (fast_tracepoint_collecting): Likewise.
2156 (target_malloc): Likewise.
2157 (download_tracepoint): Likewise.
2158 (download_trace_state_variables): Replace check with gdb_assert.
2159 (upload_fast_traceframes): Replace fatal with internal_error.
2160
2161 2014-08-19 Tom Tromey <tromey@redhat.com>
2162 Gary Benson <gbenson@redhat.com>
2163
2164 * Makefile.in (SFILES): Add common/common-debug.c.
2165 (OBS): Add common-debug.o.
2166 (common-debug.o): New rule.
2167 * debug.h (debug_printf): Don't declare.
2168 * debug.c (debug_printf): Renamed and rewritten as...
2169 (debug_vprintf): New function.
2170
2171 2014-08-19 Gary Benson <gbenson@redhat.com>
2172
2173 * utils.h: Do not include print-utils.h.
2174
2175 2014-08-19 Tom Tromey <tromey@redhat.com>
2176 Gary Benson <gbenson@redhat.com>
2177
2178 * server.h: Add static assertion.
2179 (gdb_byte, CORE_ADDR, LONGEST, ULONGEST): Remove.
2180
2181 2014-08-19 Tom Tromey <tromey@redhat.com>
2182 Gary Benson <gbenson@redhat.com>
2183
2184 * Makefile.in (SFILES): Add common/errors.c.
2185 (OBS): Add errors.o.
2186 (IPA_OBS): Add errors-ipa.o.
2187 (errors.o): New rule.
2188 (errors-ipa.o): Likewise.
2189 * utils.h (perror_with_name, error, warning): Don't declare.
2190 * utils.c (warning): Renamed and rewritten as...
2191 (vwarning): New function.
2192 (error): Renamed and rewritten as...
2193 (verror): New function.
2194 (internal_error): Renamed and rewritten as...
2195 (internal_verror): New function.
2196
2197 2014-08-07 Gary Benson <gbenson@redhat.com>
2198
2199 * configure.ac (AC_CHECK_HEADERS): Remove errno.h.
2200 * configure: Regenerate.
2201 * config.in: Likewise.
2202 * server.h: Do not include errno.h.
2203 * event-loop.c: Likewise.
2204 * hostio-errno.c: Likewise.
2205 * linux-low.c: Likewise.
2206 * remote-utils.c: Likewise.
2207 * spu-low.c: Likewise.
2208 * utils.c: Likewise.
2209 * gdbreplay.c: Unconditionally include errno.h.
2210
2211 2014-08-07 Gary Benson <gbenson@redhat.com>
2212
2213 * server.h: Do not include string.h.
2214 * event-loop.c: Likewise.
2215 * linux-low.c: Likewise.
2216 * regcache.c: Likewise.
2217 * remote-utils.c: Likewise.
2218 * spu-low.c: Likewise.
2219 * utils.c: Likewise.
2220
2221 2014-08-07 Gary Benson <gbenson@redhat.com>
2222
2223 * server.h: Do not include gdb_assert.h.
2224
2225 2014-08-07 Gary Benson <gbenson@redhat.com>
2226
2227 * server.h: Do not include common-utils.h.
2228
2229 2014-08-07 Gary Benson <gbenson@redhat.com>
2230
2231 * server.h: Do not include ptid.h.
2232 * notif.h: Likewise.
2233
2234 2014-08-07 Gary Benson <gbenson@redhat.com>
2235
2236 * server.h: Do not include gdb_locale.h.
2237
2238 2014-08-07 Gary Benson <gbenson@redhat.com>
2239
2240 * server.h: Do not include gdb/signals.h.
2241 * win32-low.c: Likewise.
2242
2243 2014-08-07 Gary Benson <gbenson@redhat.com>
2244
2245 * server.h: Do not include pathmax.h.
2246
2247 2014-08-07 Gary Benson <gbenson@redhat.com>
2248
2249 * server.h: Do not include libiberty.h.
2250 * linux-bfin-low.c: Likewise.
2251
2252 2014-08-07 Gary Benson <gbenson@redhat.com>
2253
2254 * server.h: Do not include ansidecl.h.
2255
2256 2014-08-07 Gary Benson <gbenson@redhat.com>
2257
2258 * linux-x86-low.c: Do not include stddef.h.
2259 * lynx-ppc-low.c: Likewise.
2260 * tracepoint.c: Likewise.
2261
2262 2014-08-07 Gary Benson <gbenson@redhat.com>
2263
2264 * server.h: Do not include stdarg.h.
2265 * nto-low.c: Likewise.
2266
2267 2014-08-07 Gary Benson <gbenson@redhat.com>
2268
2269 * server.h: Do not include stdlib.h.
2270 * inferiors.c: Likewise.
2271 * linux-low.c: Likewise.
2272 * regcache.c: Likewise.
2273 * spu-low.c: Likewise.
2274 * tracepoint.c: Likewise.
2275 * utils.c: Likewise.
2276
2277 2014-08-07 Gary Benson <gbenson@redhat.com>
2278
2279 * server.h: Do not include stdio.h.
2280 * linux-low.c: Likewise.
2281 * remote-utils.c: Likewise.
2282 * spu-low.c: Likewise.
2283 * utils.c: Likewise.
2284 * wincecompat.c: Likewise.
2285
2286 2014-08-06 Gary Benson <gbenson@redhat.com>
2287
2288 * regcache.c (init_register_cache): Move conditionals inside if.
2289
2290 2014-08-06 Gary Benson <gbenson@redhat.com>
2291
2292 * linux-low.c (linux_supports_non_stop): Use target_is_async_p.
2293
2294 2014-07-31 Gary Benson <gbenson@redhat.com>
2295
2296 * ax.h: Do not include server.h.
2297 * gdbthread.h: Likewise.
2298 * lynx-low.h: Likewise.
2299 * notif.h: Likewise.
2300
2301 2014-07-30 Gary Benson <gbenson@redhat.com>
2302
2303 * server.h: Include common-defs.h.
2304 Do not include config.h or build-gnulib-gdbserver/config.h.
2305
2306 2014-07-30 Gary Benson <gbenson@redhat.com>
2307
2308 * hostio-errno.c: Move server.h to top of includes list.
2309 * inferiors.c: Likewise.
2310 * linux-x86-low.c: Likewise.
2311 * notif.c: Include server.h.
2312
2313 2014-07-24 Tom Tromey <tromey@redhat.com>
2314 Gary Benson <gbenson@redhat.com>
2315
2316 * server.h (CORE_ADDR): Now unsigned.
2317
2318 2014-07-16 Pedro Alves <palves@redhat.com>
2319
2320 * linux-low.c (linux_kill_one_lwp): Use kill_lwp, not kill.
2321
2322 2014-07-15 Pedro Alves <palves@redhat.com>
2323
2324 * linux-low.c (linux_kill_one_lwp): Save errno and work with saved
2325 copy.
2326
2327 2014-07-11 Pedro Alves <palves@redhat.com>
2328
2329 * linux-low.c (kill_wait_lwp): New function, based on
2330 kill_one_lwp_callback, but use my_waitpid directly.
2331 (kill_one_lwp_callback, linux_kill): Use it.
2332
2333 2014-06-23 Pedro Alves <palves@redhat.com>
2334
2335 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR_CONTROL
2336 before setting DR0..DR3.
2337
2338 2014-06-20 Gary Benson <gbenson@redhat.com>
2339
2340 * configure.ac (AC_REPLACE_FUNCS) <vasprintf, vsnprintf>: Removed.
2341 * configure: Regenerated.
2342 * config.in: Likewise.
2343
2344 2014-06-20 Gary Benson <gbenson@redhat.com>
2345
2346 * Makefile.in (SFILES): Update locations for files moved
2347 from common to nat.
2348 (object file files): Reordered.
2349
2350 2014-06-20 Gary Benson <gbenson@redhat.com>
2351
2352 * i386-low.h (i386_dr_low_can_set_addr): Removed.
2353 (i386_dr_low_set_addr): Likewise.
2354 (i386_dr_low_get_addr): Likewise.
2355 (i386_dr_low_can_set_control): Likewise.
2356 (i386_dr_low_set_control): Likewise.
2357 (i386_dr_low_get_control): Likewise.
2358 (i386_dr_low_get_status): Likewise.
2359 (i386_get_debug_register_length): Likewise.
2360 * linux-x86-low.c (i386_dr_low_set_addr):
2361 Changed signature. Made static.
2362 (i386_dr_low_get_addr): Likewise.
2363 (i386_dr_low_set_control): Likewise.
2364 (i386_dr_low_get_control): Likewise.
2365 (i386_dr_low_get_status): Likewise.
2366 (i386_dr_low): New global variable.
2367 * win32-i386-low.c (i386_dr_low_set_addr):
2368 Changed signature. Made static.
2369 (i386_dr_low_get_addr): Likewise.
2370 (i386_dr_low_set_control): Likewise.
2371 (i386_dr_low_get_control): Likewise.
2372 (i386_dr_low_get_status): Likewise.
2373 (i386_dr_low): New global variable.
2374
2375 2014-06-20 Marcus Shawcroft <marcus.shawcroft@arm.com>
2376
2377 * configure.ac: Invoke. AC_CHECK_TOOL(AR, ar).
2378 * Makefile.in (AR, AR_FLAGS): Define.
2379 * configure: Regenerate.
2380
2381 2014-06-19 Gary Benson <gbenson@redhat.com>
2382
2383 * Makefile.in (i386-dregs.o): New rule.
2384 * configure.srv: Add i386-dregs.o to all targets using i386-low.o.
2385 * i386-low.c (target.h): Remove include.
2386 (TARGET_HAS_DR_LEN_8): Now in i386-dregs.c.
2387 (DR_CONTROL_SHIFT): Likewise.
2388 (DR_CONTROL_SIZE): Likewise.
2389 (DR_RW_EXECUTE): Likewise.
2390 (DR_RW_WRITE): Likewise.
2391 (DR_RW_READ): Likewise.
2392 (DR_RW_IORW): Likewise.
2393 (DR_LEN_1): Likewise.
2394 (DR_LEN_2): Likewise.
2395 (DR_LEN_4): Likewise.
2396 (DR_LEN_8): Likewise.
2397 (DR_LOCAL_ENABLE_SHIFT): Likewise.
2398 (DR_GLOBAL_ENABLE_SHIFT): Likewise.
2399 (DR_ENABLE_SIZE): Likewise.
2400 (DR_LOCAL_SLOWDOWN): Likewise.
2401 (DR_GLOBAL_SLOWDOWN): Likewise.
2402 (DR_CONTROL_RESERVED): Likewise.
2403 (I386_DR_CONTROL_MASK): Likewise.
2404 (I386_DR_VACANT): Likewise.
2405 (I386_DR_LOCAL_ENABLE): Likewise.
2406 (I386_DR_GLOBAL_ENABLE): Likewise.
2407 (I386_DR_DISABLE): Likewise.
2408 (I386_DR_SET_RW_LEN): Likewise.
2409 (I386_DR_GET_RW_LEN): Likewise.
2410 (I386_DR_WATCH_HIT): Likewise.
2411 (i386_wp_op_t): Likewise.
2412 (i386_show_dr): Likewise.
2413 (i386_length_and_rw_bits): Likewise.
2414 (i386_insert_aligned_watchpoint): Likewise.
2415 (i386_remove_aligned_watchpoint): Likewise.
2416 (i386_handle_nonaligned_watchpoint): Likewise.
2417 i386_update_inferior_debug_regs(): Likewise.
2418 (i386_dr_insert_watchpoint): Likewise.
2419 (i386_dr_remove_watchpoint): Likewise.
2420 (i386_dr_region_ok_for_watchpoint): Likewise.
2421 (i386_dr_stopped_data_address): Likewise.
2422 (i386_dr_stopped_by_watchpoint): Likewise.
2423
2424 2014-06-19 Gary Benson <gbenson@redhat.com>
2425
2426 * i386-low.c (i386_dr_show): Renamed to
2427 i386_show_dr and made static. All uses updated.
2428 (i386_dr_length_and_rw_bits): Renamed to
2429 i386_length_and_rw_bits and made static.
2430 All uses updated.
2431 (i386_dr_insert_aligned_watchpoint): Renamed to
2432 i386_insert_aligned_watchpoint and made static.
2433 All uses updated.
2434 (i386_dr_remove_aligned_watchpoint): Renamed to
2435 i386_remove_aligned_watchpoint and made static.
2436 All uses updated.
2437 (i386_dr_update_inferior_debug_regs): Renamed to
2438 i386_update_inferior_debug_regs and made static.
2439 All uses updated.
2440
2441 2014-06-18 Gary Benson <gbenson@redhat.com>
2442
2443 * i386-low.h (i386_dr_low_can_set_addr): New macro.
2444 (i386_dr_low_can_set_control): Likewise.
2445 (i386_get_debug_register_length): Likewise.
2446 * i386-low.c (i386_dr_low_can_set_addr): Now in i386-low.h.
2447 (i386_dr_low_can_set_control): Likewise.
2448 (i386_get_debug_register_length): Likewise.
2449
2450 2014-06-17 Gary Benson <gbenson@redhat.com>
2451
2452 * i386-low.h (i386-dregs.h): New include.
2453 (DR_FIRSTADDR): Now in i386-dregs.h.
2454 (DR_LASTADDR): Likewise.
2455 (DR_NADDR): Likewise.
2456 (DR_STATUS): Likewise.
2457 (DR_CONTROL): Likewise.
2458 (i386_debug_reg_state): Likewise.
2459 (i386_dr_insert_watchpoint): Likewise.
2460 (i386_dr_remove_watchpoint): Likewise.
2461 (i386_dr_region_ok_for_watchpoint): Likewise.
2462 (i386_dr_stopped_data_address): Likewise.
2463 (i386_dr_stopped_by_watchpoint): Likewise.
2464 * i386-low.c (ALL_DEBUG_REGISTERS): Likewise.
2465
2466 2014-06-18 Gary Benson <gbenson@redhat.com>
2467
2468 * i386-low.h (i386_low_insert_watchpoint): Renamed to
2469 i386_dr_insert_watchpoint.
2470 (i386_low_remove_watchpoint): Renamed to
2471 i386_dr_remove_watchpoint.
2472 (i386_low_region_ok_for_watchpoint): Renamed to
2473 i386_dr_region_ok_for_watchpoint.
2474 (i386_low_stopped_data_address): Renamed to
2475 i386_dr_stopped_data_address.
2476 (i386_low_stopped_by_watchpoint): Renamed to
2477 i386_dr_stopped_by_watchpoint.
2478 * i386-low.c (i386_show_dr): Renamed to
2479 i386_dr_show and made nonstatic. All uses updated.
2480 (i386_length_and_rw_bits): Renamed to
2481 i386_dr_length_and_rw_bits and made nonstatic.
2482 All uses updated.
2483 (i386_insert_aligned_watchpoint): Renamed to
2484 i386_dr_insert_aligned_watchpoint and made nonstatic.
2485 All uses updated.
2486 (i386_remove_aligned_watchpoint): Renamed to
2487 i386_dr_remove_aligned_watchpoint and made nonstatic.
2488 All uses updated.
2489 (i386_update_inferior_debug_regs): Renamed to
2490 i386_dr_update_inferior_debug_regs and made nonstatic.
2491 All uses updated.
2492 (i386_low_insert_watchpoint): Renamed to
2493 i386_dr_insert_watchpoint. All uses updated.
2494 (i386_low_remove_watchpoint): Renamed to
2495 i386_dr_remove_watchpoint. All uses updated.
2496 (i386_low_region_ok_for_watchpoint): Renamed to
2497 i386_dr_region_ok_for_watchpoint. All uses updated.
2498 (i386_low_stopped_data_address): Renamed to
2499 i386_dr_stopped_data_address. All uses updated.
2500 (i386_low_stopped_by_watchpoint): Renamed to
2501 i386_dr_stopped_by_watchpoint. All uses updated.
2502
2503 2014-06-18 Gary Benson <gbenson@redhat.com>
2504
2505 * i386-low.c (i386_dr_low_can_set_addr): New macro.
2506 (i386_dr_low_can_set_control): Likewise.
2507 (i386_insert_aligned_watchpoint): New check.
2508
2509 2014-06-18 Gary Benson <gbenson@redhat.com>
2510
2511 * i386-low.c (i386_update_inferior_debug_regs) <inf_state>:
2512 Renamed to state.
2513
2514 2014-06-18 Gary Benson <gbenson@redhat.com>
2515
2516 * i386-low.c (i386_length_and_rw_bits): Use internal_error
2517 instead of fatal and error.
2518 (i386_handle_nonaligned_watchpoint): Likewise.
2519
2520 2014-06-18 Gary Benson <gbenson@redhat.com>
2521
2522 * i386-low.c (i386_get_debug_register_length): New macro.
2523 (TARGET_HAS_DR_LEN_8): Remove conditional. Use above macro.
2524 (i386_show_dr): Use debug_printf instead of fprintf. Use
2525 phex to format values.
2526
2527 2014-06-18 Gary Benson <gbenson@redhat.com>
2528
2529 * i386-low.h: Comment changes.
2530 * i386-low.c: Likewise.
2531
2532 2014-06-18 Gary Benson <gbenson@redhat.com>
2533
2534 * i386-low.c: Whitespace changes.
2535
2536 2014-06-12 Tom Tromey <tromey@redhat.com>
2537
2538 * utils.c (freeargv): Remove.
2539
2540 2014-06-12 Tom Tromey <tromey@redhat.com>
2541
2542 * debug.c (debug_printf): Remove HAVE_GETTIMEOFDAY checks.
2543 * server.c (monitor_show_help): Remove HAVE_GETTIMEOFDAY check.
2544 (parse_debug_format_options): Likewise.
2545 (gdbserver_usage): Likewise.
2546 * Makefile.in (LIBIBERTY_BUILDDIR, LIBIBERTY): New variables.
2547 (SUBDIRS, REQUIRED_SUBDIRS): Add libiberty.
2548 (gdbserver$(EXEEXT), gdbreplay$(EXEEXT)): Depend on and link
2549 against libiberty.
2550 ($(LIBGNU)): Depend on libiberty.
2551 (all-lib): Recurse into all subdirs.
2552 (install-only): Invoke "install" target in subdirs.
2553 (vasprintf.o, vsnprintf.o, safe-ctype.o, lbasename.o): Remove
2554 targets.
2555 * configure: Rebuild.
2556 * configure.ac: Add ACX_CONFIGURE_DIR for libiberty. Don't check
2557 for vasprintf, vsnprintf, or gettimeofday.
2558 * configure.srv: Don't add safe-ctype.o or lbasename.o to
2559 srv_tgtobj.
2560
2561 2014-06-05 Joel Brobecker <brobecker@adacore.com>
2562
2563 * development.sh: Delete.
2564 * Makefile.in (config.status): Adjust dependency on development.sh.
2565 * configure.ac: Adjust development.sh source call.
2566 * configure: Regenerate.
2567
2568 2014-06-02 Pedro Alves <palves@redhat.com>
2569
2570 * ax.c (gdb_free_agent_expr): New function.
2571 * ax.h (gdb_free_agent_expr): New declaration.
2572 * mem-break.c (delete_gdb_breakpoint_1): Also clear the commands
2573 list.
2574 (clear_breakpoint_conditions, clear_breakpoint_commands): Make
2575 static.
2576 (clear_breakpoint_conditions_and_commands): New function.
2577 * mem-break.h (clear_breakpoint_conditions): Delete declaration.
2578 (clear_breakpoint_conditions_and_commands): New declaration.
2579
2580 2014-05-23 Ramana Radhakrishnan <ramana.radhakrishnan@arm.com>
2581
2582 * linux-aarch64-low.c (asm/ptrace.h): Include.
2583
2584 2014-05-21 Jan Kratochvil <jan.kratochvil@redhat.com>
2585
2586 Fix TLS access for -static -pthread.
2587 * gdbserver/thread-db.c (struct thread_db): Add td_thr_tlsbase_p.
2588 (thread_db_get_tls_address): Call it if LOAD_MODULE is zero.
2589 (thread_db_load_search, try_thread_db_load_1): Initialize it.
2590
2591 2014-05-20 Pedro Alves <palves@redhat.com>
2592
2593 * linux-aarch64-low.c (aarch64_insert_point)
2594 (aarch64_remove_point): No longer check whether the type is
2595 supported here. Adjust to new interface.
2596 (the_low_target): Install aarch64_supports_z_point_type as
2597 supports_z_point_type method.
2598 * linux-arm-low.c (raw_bkpt_type_to_arm_hwbp_type): New function.
2599 (arm_linux_hw_point_initialize): Take an enum raw_bkpt_type
2600 instead of a Z packet char. Adjust.
2601 (arm_supports_z_point_type): New function.
2602 (arm_insert_point, arm_remove_point): Adjust to new interface.
2603 (the_low_target): Install arm_supports_z_point_type.
2604 * linux-crisv32-low.c (cris_supports_z_point_type): New function.
2605 (cris_insert_point, cris_remove_point): Adjust to new interface.
2606 Don't check whether the type is supported here.
2607 (the_low_target): Install cris_supports_z_point_type.
2608 * linux-low.c (linux_supports_z_point_type): New function.
2609 (linux_insert_point, linux_remove_point): Adjust to new interface.
2610 * linux-low.h (struct linux_target_ops) <insert_point,
2611 remove_point>: Take an enum raw_bkpt_type instead of a char. Add
2612 raw_breakpoint pointer parameter.
2613 <supports_z_point_type>: New method.
2614 * linux-mips-low.c (mips_supports_z_point_type): New function.
2615 (mips_insert_point, mips_remove_point): Adjust to new interface.
2616 Use mips_supports_z_point_type.
2617 (the_low_target): Install mips_supports_z_point_type.
2618 * linux-ppc-low.c (the_low_target): Install NULL as
2619 supports_z_point_type method.
2620 * linux-s390-low.c (the_low_target): Install NULL as
2621 supports_z_point_type method.
2622 * linux-sparc-low.c (the_low_target): Install NULL as
2623 supports_z_point_type method.
2624 * linux-x86-low.c (x86_supports_z_point_type): New function.
2625 (x86_insert_point): Adjust to new insert_point interface. Use
2626 insert_memory_breakpoint. Adjust to new
2627 i386_low_insert_watchpoint interface.
2628 (x86_remove_point): Adjust to remove_point interface. Use
2629 remove_memory_breakpoint. Adjust to new
2630 i386_low_remove_watchpoint interface.
2631 (the_low_target): Install x86_supports_z_point_type.
2632 * lynx-low.c (lynx_target_ops): Install NULL as
2633 supports_z_point_type callback.
2634 * nto-low.c (nto_supports_z_point_type): New.
2635 (nto_insert_point, nto_remove_point): Adjust to new interface.
2636 (nto_target_ops): Install nto_supports_z_point_type.
2637 * mem-break.c: Adjust intro comment.
2638 (struct raw_breakpoint) <raw_type, size>: New fields.
2639 <inserted>: Update comment.
2640 <shlib_disabled>: Delete field.
2641 (enum bkpt_type) <gdb_breakpoint>: Delete value.
2642 <gdb_breakpoint_Z0, gdb_breakpoint_Z1, gdb_breakpoint_Z2,
2643 gdb_breakpoint_Z3, gdb_breakpoint_Z4>: New values.
2644 (raw_bkpt_type_to_target_hw_bp_type): New function.
2645 (find_enabled_raw_code_breakpoint_at): New function.
2646 (find_raw_breakpoint_at): New type and size parameters. Use them.
2647 (insert_memory_breakpoint): New function, based off
2648 set_raw_breakpoint_at.
2649 (remove_memory_breakpoint): New function.
2650 (set_raw_breakpoint_at): Reimplement.
2651 (set_breakpoint): New, based on set_breakpoint_at.
2652 (set_breakpoint_at): Reimplement.
2653 (delete_raw_breakpoint): Go through the_target->remove_point
2654 instead of assuming memory breakpoints.
2655 (find_gdb_breakpoint_at): Delete.
2656 (Z_packet_to_bkpt_type, Z_packet_to_raw_bkpt_type): New functions.
2657 (find_gdb_breakpoint): New function.
2658 (set_gdb_breakpoint_at): Delete.
2659 (z_type_supported): New function.
2660 (set_gdb_breakpoint_1): New function, loosely based off
2661 set_gdb_breakpoint_at.
2662 (check_gdb_bp_preconditions, set_gdb_breakpoint): New functions.
2663 (delete_gdb_breakpoint_at): Delete.
2664 (delete_gdb_breakpoint_1): New function, loosely based off
2665 delete_gdb_breakpoint_at.
2666 (delete_gdb_breakpoint): New function.
2667 (clear_gdb_breakpoint_conditions): Rename to ...
2668 (clear_breakpoint_conditions): ... this. Don't handle a NULL
2669 breakpoint.
2670 (add_condition_to_breakpoint): Make static.
2671 (add_breakpoint_condition): Take a struct breakpoint pointer
2672 instead of an address. Adjust.
2673 (gdb_condition_true_at_breakpoint): Rename to ...
2674 (gdb_condition_true_at_breakpoint_z_type): ... this, and add
2675 z_type parameter.
2676 (gdb_condition_true_at_breakpoint): Reimplement.
2677 (add_breakpoint_commands): Take a struct breakpoint pointer
2678 instead of an address. Adjust.
2679 (gdb_no_commands_at_breakpoint): Rename to ...
2680 (gdb_no_commands_at_breakpoint_z_type): ... this. Add z_type
2681 parameter. Return true if no breakpoint was found. Change debug
2682 output.
2683 (gdb_no_commands_at_breakpoint): Reimplement.
2684 (run_breakpoint_commands): Rename to ...
2685 (run_breakpoint_commands_z_type): ... this. Add z_type parameter,
2686 and change return type to boolean.
2687 (run_breakpoint_commands): New function.
2688 (gdb_breakpoint_here): Also check for Z1 breakpoints.
2689 (uninsert_raw_breakpoint): Don't try to reinsert a disabled
2690 breakpoint. Go through the_target->remove_point instead of
2691 assuming memory breakpoint.
2692 (uninsert_breakpoints_at, uninsert_all_breakpoints): Uninsert
2693 software and hardware breakpoints.
2694 (reinsert_raw_breakpoint): Go through the_target->insert_point
2695 instead of assuming memory breakpoint.
2696 (reinsert_breakpoints_at, reinsert_all_breakpoints): Reinsert
2697 software and hardware breakpoints.
2698 (check_breakpoints, breakpoint_here, breakpoint_inserted_here):
2699 Check both software and hardware breakpoints.
2700 (validate_inserted_breakpoint): Assert the breakpoint is a
2701 software breakpoint. Set the inserted flag to -1 instead of
2702 setting shlib_disabled.
2703 (delete_disabled_breakpoints): Adjust.
2704 (validate_breakpoints): Only validate software breakpoints.
2705 Adjust to inserted flag change.
2706 (check_mem_read, check_mem_write): Skip breakpoint types other
2707 than software breakpoints. Adjust to inserted flag change.
2708 * mem-break.h (enum raw_bkpt_type): New enum.
2709 (raw_breakpoint, struct process_info): Forward declare.
2710 (Z_packet_to_target_hw_bp_type): Delete declaration.
2711 (raw_bkpt_type_to_target_hw_bp_type, Z_packet_to_raw_bkpt_type)
2712 (set_gdb_breakpoint, delete_gdb_breakpoint)
2713 (clear_breakpoint_conditions): New declarations.
2714 (set_gdb_breakpoint_at, clear_gdb_breakpoint_conditions): Delete.
2715 (breakpoint_inserted_here): Update comment.
2716 (add_breakpoint_condition, add_breakpoint_commands): Replace
2717 address parameter with a breakpoint pointer parameter.
2718 (gdb_breakpoint_here): Update comment.
2719 (delete_gdb_breakpoint_at): Delete.
2720 (insert_memory_breakpoint, remove_memory_breakpoint): Declare.
2721 * server.c (process_point_options): Take a struct breakpoint
2722 pointer instead of an address. Adjust.
2723 (process_serial_event) <Z/z packets>: Use set_gdb_breakpoint and
2724 delete_gdb_breakpoint.
2725 * spu-low.c (spu_target_ops): Install NULL as
2726 supports_z_point_type method.
2727 * target.h: Include mem-break.h.
2728 (struct target_ops) <prepare_to_access_memory>: Update comment.
2729 <supports_z_point_type>: New field.
2730 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2731 instead of a char. Also take a raw breakpoint pointer.
2732 * win32-arm-low.c (the_low_target): Install NULL as
2733 supports_z_point_type.
2734 * win32-i386-low.c (i386_supports_z_point_type): New function.
2735 (i386_insert_point, i386_remove_point): Adjust to new interface.
2736 (the_low_target): Install i386_supports_z_point_type.
2737 * win32-low.c (win32_supports_z_point_type): New function.
2738 (win32_insert_point, win32_remove_point): Adjust to new interface.
2739 (win32_target_ops): Install win32_supports_z_point_type.
2740 * win32-low.h (struct win32_target_ops):
2741 <supports_z_point_type>: New method.
2742 <insert_point, remove_point>: Take an enum raw_bkpt_type argument
2743 instead of a char. Also take a raw breakpoint pointer.
2744
2745 2014-05-20 Pedro Alves <palves@redhat.com>
2746
2747 * mem-break.h: Include break-common.h.
2748 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2749 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): New defines.
2750 (Z_packet_to_target_hw_bp_type): New declaration.
2751 * mem-break.c (Z_packet_to_target_hw_bp_type): New function.
2752 * i386-low.c (Z_PACKET_HW_BP, Z_PACKET_WRITE_WP, Z_PACKET_READ_WP)
2753 (Z_PACKET_ACCESS_WP): Delete macros.
2754 (Z_packet_to_hw_type): Delete function.
2755 * i386-low.h: Don't include break-common.h here.
2756 (Z_packet_to_hw_type): Delete declaration.
2757 * linux-x86-low.c (x86_insert_point, x86_insert_point): Call
2758 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2759 * win32-i386-low.c (i386_insert_point, i386_remove_point): Call
2760 Z_packet_to_target_hw_bp_type instead of Z_packet_to_hw_type.
2761 * linux-aarch64-low.c: Don't include break-common.h here.
2762 (Z_PACKET_SW_BP, Z_PACKET_HW_BP, Z_PACKET_WRITE_WP)
2763 (Z_PACKET_READ_WP, Z_PACKET_ACCESS_WP): Delete macros.
2764 (Z_packet_to_target_hw_bp_type): Delete function.
2765 * linux-mips-low.c (rsp_bp_type_to_target_hw_bp_type): Delete
2766 function.
2767 (mips_insert_point, mips_remove_point): Use
2768 Z_packet_to_target_hw_bp_type.
2769
2770 2014-05-20 Pedro Alves <palves@redhat.com>
2771
2772 * linux-aarch64-low.c: Include break-common.h.
2773 (enum target_point_type): Delete.
2774 (Z_packet_to_point_type): Rename to ...
2775 (Z_packet_to_target_hw_bp_type): ... this, and return a
2776 target_hw_bp_type instead.
2777 (aarch64_show_debug_reg_state): Take an enum target_hw_bp_type
2778 instead of an enum target_point_type.
2779 (aarch64_point_encode_ctrl_reg): Likewise. Compute type mask from
2780 breakpoint type.
2781 (aarch64_dr_state_insert_one_point)
2782 (aarch64_dr_state_remove_one_point, aarch64_handle_breakpoint)
2783 (aarch64_handle_aligned_watchpoint)
2784 (aarch64_handle_unaligned_watchpoint, aarch64_handle_watchpoint):
2785 Take an enum target_hw_bp_type instead of an enum
2786 target_point_type.
2787 (aarch64_supports_z_point_type): New function.
2788 (aarch64_insert_point, aarch64_remove_point): Use it. Adjust to
2789 use Z_packet_to_target_hw_bp_type.
2790
2791 2014-05-20 Joel Brobecker <brobecker@adacore.com>
2792
2793 * configure.ac: Only use -Werror by default when DEVELOPMENT
2794 is true.
2795 * configure: Regenerate.
2796
2797 2014-05-19 Jan Kratochvil <jan.kratochvil@redhat.com>
2798
2799 Fix gdbserver qGetTLSAddr for x86_64 -m32.
2800 * linux-x86-low.c (X86_64_USER_REGS): New.
2801 (x86_fill_gregset): Call memset for BUF first in x86_64 -m32 case.
2802
2803 2014-04-28 Yao Qi <yao@codesourcery.com>
2804
2805 * Makefile.in (i386-avx512.c): Fix the typo of generated file
2806 name.
2807
2808 2014-04-25 Pedro Alves <palves@redhat.com>
2809
2810 PR server/16255
2811 * linux-low.c (linux_attach_fail_reason_string): New function.
2812 (linux_attach_lwp): Delete.
2813 (linux_attach_lwp_1): Rename to ...
2814 (linux_attach_lwp): ... this. Take a ptid instead of a pid as
2815 argument. Remove "initial" parameter. Return int instead of
2816 void. Don't error or warn here.
2817 (linux_attach): Adjust to call linux_attach_lwp. Call error on
2818 failure to attach to the tgid. Call warning when failing to
2819 attach to an lwp.
2820 * linux-low.h (linux_attach_lwp): Take a ptid instead of a pid as
2821 argument. Remove "initial" parameter. Return int instead of
2822 void. Don't error or warn here.
2823 (linux_attach_fail_reason_string): New declaration.
2824 * thread-db.c (attach_thread): Adjust to linux_attach_lwp's
2825 interface change. Use linux_attach_fail_reason_string.
2826
2827 2014-04-24 Michael Sturm <michael.sturm@mintel.com>
2828 Walfred Tedeschi <walfred.tedeschi@intel.com>
2829
2830 * Makefile.in: Added rules to handle new files
2831 i386-avx512.c i386-avx512-linux.c amd64-avx512.c
2832 amd64-avx512-linux.c x32-avx512.c x32-avx512-linux.c.
2833 * configure.srv (srv_i386_regobj): Add i386-avx512.o.
2834 (srv_i386_linux_regobj): Add i386-avx512-linux.o.
2835 (srv_amd64_regobj): Add amd64-avx512.o and x32-avx512.o.
2836 (srv_amd64_linux_regobj): Add amd64-avx512-linux.o and
2837 x32-avx512-linux.o.
2838 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx512.xml.
2839 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx512.xml.
2840 (srv_amd64_xmlfiles): Add i386/amd64-avx512.xml and
2841 i386/x32-avx512.xml.
2842 (srv_i386_linux_xmlfiles): Add i386/i386-avx512-linux.xml.
2843 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx512-linux.xml and
2844 i386/x32-avx512-linux.xml.
2845 * i387-fp.c (num_avx512_k_registers): New constant for number
2846 of K registers.
2847 (num_avx512_zmmh_low_registers): New constant for number of
2848 lower ZMM registers (0-15).
2849 (num_avx512_zmmh_high_registers): New constant for number of
2850 higher ZMM registers (16-31).
2851 (num_avx512_ymmh_registers): New contant for number of higher
2852 YMM registers (ymm16-31 added by avx521 on x86_64).
2853 (num_avx512_xmm_registers): New constant for number of higher
2854 XMM registers (xmm16-31 added by AVX512 on x86_64).
2855 (struct i387_xsave): Add space for AVX512 registers.
2856 (i387_cache_to_xsave): Change raw buffer size to 64 characters.
2857 Add code to handle AVX512 registers.
2858 (i387_xsave_to_cache): Add code to handle AVX512 registers.
2859 * linux-x86-low.c (init_registers_amd64_avx512_linux): New
2860 prototypei from generated file.
2861 (tdesc_amd64_avx512_linux): Likewise.
2862 (init_registers_x32_avx512_linux): Likewise.
2863 (tdesc_x32_avx512_linux): Likewise.
2864 (init_registers_i386_avx512_linux): Likewise.
2865 (tdesc_i386_avx512_linux): Likewise.
2866 (x86_64_regmap): Add AVX512 registers.
2867 (x86_linux_read_description): Add code to handle AVX512 XSTATE
2868 mask.
2869 (initialize_low_arch): Add code to initialize AVX512 registers.
2870
2871 2014-04-23 Pedro Alves <palves@redhat.com>
2872
2873 * mem-break.c (find_gdb_breakpoint_at): Make static.
2874 * mem-break.h (find_gdb_breakpoint_at): Delete declaration.
2875
2876 2014-04-23 Pedro Alves <palves@redhat.com>
2877
2878 * i386-low.c: Don't include break-common.h here.
2879 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2880 prototype to take target_hw_bp_type as argument instead of a Z
2881 packet char.
2882 * i386-low.h: Include break-common.h here.
2883 (Z_packet_to_hw_type): Declare.
2884 (i386_low_insert_watchpoint, i386_low_remove_watchpoint): Change
2885 prototypes.
2886 * linux-x86-low.c (x86_insert_point): Convert the packet number to
2887 a target_hw_bp_type before calling i386_low_insert_watchpoint.
2888 (x86_remove_point): Convert the packet number to a
2889 target_hw_bp_type before calling i386_low_remove_watchpoint.
2890 * win32-i386-low.c (i386_insert_point): Convert the packet number
2891 to a target_hw_bp_type before calling i386_low_insert_watchpoint.
2892 (i386_remove_point): Convert the packet number to a
2893 target_hw_bp_type before calling i386_low_remove_watchpoint.
2894
2895 2014-04-23 Pedro Alves <palves@redhat.com>
2896
2897 * utils.h (perror_with_name): Add ATTRIBUTE_NORETURN.
2898
2899 2014-04-10 Pedro Alves <palves@redhat.com>
2900
2901 * mem-break.c (add_breakpoint_condition, add_breakpoint_commands):
2902 Check if the condition or command is NULL before checking if the
2903 breakpoint is known. On success, return true.
2904 * mem-break.h (add_breakpoint_condition): Document return.
2905 (add_breakpoint_commands): Add describing comment.
2906 * server.c (skip_to_semicolon): New function.
2907 (process_point_options): Use it.
2908
2909 2014-04-09 Pedro Alves <palves@redhat.com>
2910
2911 * linux-low.c (linux_read_loadmap): Pass current_inferior directly
2912 to lwpid_of.
2913
2914 2014-02-27 Pedro Alves <palves@redhat.com>
2915
2916 PR 12702
2917 * inferiors.h (A_I_NEXT, ALL_INFERIORS_TYPE, ALL_PROCESSES): New
2918 macros.
2919 * linux-low.c (delete_lwp, handle_extended_wait): Add debug
2920 output.
2921 (last_thread_of_process_p): Take a PID argument instead of a
2922 thread pointer.
2923 (linux_wait_for_lwp): Delete.
2924 (num_lwps, check_zombie_leaders, not_stopped_callback): New
2925 functions.
2926 (linux_low_filter_event): New function, party factored out from
2927 linux_wait_for_event.
2928 (linux_wait_for_event): Rename to ...
2929 (linux_wait_for_event_filtered): ... this. Add new filter ptid
2930 argument. Partly rewrite. Always use waitpid(-1, WNOHANG) and
2931 sigsuspend. Check for zombie leaders.
2932 (linux_wait_for_event): Reimplement as wrapper around
2933 linux_wait_for_event_filtered.
2934 (linux_wait_1): Handle TARGET_WAITKIND_NO_RESUMED. Assume that if
2935 a normal or signal exit is seen, it's the whole process exiting.
2936 (wait_for_sigstop): No longer a for_each_inferior callback.
2937 Rewrite on top of linux_wait_for_event_filtered.
2938 (stop_all_lwps): Call wait_for_sigstop directly.
2939 * server.c (resume, handle_target_event): Handle
2940 TARGET_WAITKIND_NO_RESUMED.
2941
2942 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2943
2944 * win32-low.c (psapi_get_dll_name,
2945 * win32_CreateToolhelp32Snapshot): Delete.
2946 (win32_CreateToolhelp32Snapshot, win32_Module32First)
2947 (win32_Module32Next, load_toolhelp, toolhelp_get_dll_name):
2948 Delete.
2949 (handle_load_dll): Add function description.
2950 Remove code using psapi_get_dll_name and toolhelp_get_dll_name.
2951
2952 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2953
2954 * win32-low.c (win32_add_one_solib): Add 0x1000 to load_addr.
2955 Add comment.
2956 (win32_add_all_dlls): Remove 0x1000 offset applied to DLL
2957 base address when calling win32_add_one_solib.
2958 (handle_load_dll): Delete local variable load_addr.
2959 Remove 0x1000 offset applied to DLL base address when calling
2960 win32_add_one_solib.
2961 (handle_unload_dll): Add comment.
2962
2963 2014-02-26 Joel Brobecker <brobecker@adacore.com>
2964
2965 * win32-low.c (win32_add_all_dlls): Renames
2966 win32_ensure_ntdll_loaded. Rewrite function documentation.
2967 Adjust implementation to always load all DLLs.
2968 Add 0x1000 offset to DLL base address when calling
2969 win32_add_one_solib.
2970 (child_initialization_done): New static global.
2971 (do_initial_child_stuff): Set child_initialization_done to
2972 zero during child initialization, and 1 after. Replace call
2973 to win32_ensure_ntdll_loaded by call to win32_add_all_dlls.
2974 Add comment.
2975 (match_dll_by_basename, dll_is_loaded_by_basename): Delete.
2976 (handle_unload_dll): Add function documentation.
2977 (get_child_debug_event): Ignore load and unload DLL events
2978 during child initialization.
2979
2980 2014-02-20 Doug Evans <dje@google.com>
2981
2982 Remove global all_lwps.
2983 * inferiors.h (ptid_of): Move here from linux-low.h.
2984 (pid_of, lwpid_of): Ditto.
2985 * linux-aarch64-low.c (debug_reg_change_callback): Update, "entry"
2986 parameter is a struct thread_info * now.
2987 (aarch64_notify_debug_reg_change): Fetch pid from current_inferior
2988 directly. Pass &all_threads to find_inferior instead of &all_lwps.
2989 (aarch64_stopped_data_address): Fetch lwpid from current_inferior
2990 directly.
2991 (aarch64_linux_prepare_to_resume): Fetch ptid from thread.
2992 (aarch64_arch_setup): Fetch lwpid from current_inferior directly.
2993 * linux-arm-low.c (update_registers_callback): Update, "entry"
2994 parameter is a struct thread_info * now.
2995 Fetch lwpid from current_inferior directly.
2996 (arm_insert_point): Pass &all_threads to find_inferior instead of
2997 &all_lwps.
2998 (arm_remove_point): Ditto.
2999 (arm_stopped_by_watchpoint): Fetch lwp from current_inferior.
3000 (arm_prepare_to_resume): Fetch pid from thread.
3001 (arm_read_description): Fetch lwpid from current_inferior directly.
3002 * linux-low.c (all_lwps): Delete.
3003 (delete_lwp): Delete call to remove_inferior.
3004 (handle_extended_wait): Fetch lwpid from thread.
3005 (add_lwp): Don't set lwp->entry.id. Remove call to
3006 add_inferior_to_list.
3007 (linux_attach_lwp_1): Fetch pid from current_inferior directly.
3008 (linux_kill_one_lwp): Fetch ptid,lwpid from thread.
3009 (kill_one_lwp_callback): Ditto.
3010 (linux_kill): Don't dereference NULL pointer.
3011 Fetch ptid,lwpid from thread.
3012 (get_detach_signal): Fetch ptid from thread.
3013 (linux_detach_one_lwp): Fetch ptid,lwpid from thread.
3014 Simplify call to regcache_invalidate_thread.
3015 (delete_lwp_callback): Update, "entry" parameter is a
3016 struct thread_info * now. Fetch pid from thread.
3017 (linux_mourn): Pass &all_threads to find_inferior instead of &all_lwps.
3018 (status_pending_p_callback): Update, "entry" parameter is a
3019 struct thread_info * now. Fetch ptid from thread.
3020 (find_lwp_pid): Update, "entry" parameter is a
3021 struct thread_info * now.
3022 (linux_wait_for_lwp): Fetch pid from thread.
3023 (linux_fast_tracepoint_collecting): Fetch lwpid from thread.
3024 (maybe_move_out_of_jump_pad): Fetch lwpid from current_inferior.
3025 (enqueue_one_deferred_signal): Fetch lwpid from thread.
3026 (dequeue_one_deferred_signal): Ditto.
3027 (cancel_breakpoint): Fetch ptid from current_inferior.
3028 (linux_wait_for_event): Pass &all_threads to find_inferior,
3029 not &all_lwps. Fetch ptid, lwpid from thread.
3030 (count_events_callback): Update, "entry" parameter is a
3031 struct thread_info * now.
3032 (select_singlestep_lwp_callback): Ditto.
3033 (select_event_lwp_callback): Ditto.
3034 (cancel_breakpoints_callback): Ditto.
3035 (linux_cancel_breakpoints): Pass &all_threads to find_inferior,
3036 not &all_lwps.
3037 (select_event_lwp): Ditto. Fetch ptid from event_thread.
3038 (unsuspend_one_lwp): Update, "entry" parameter is a
3039 struct thread_info * now.
3040 (unsuspend_all_lwps): Pass &all_threads to find_inferior,
3041 not &all_lwps.
3042 (linux_stabilize_threads): Ditto. And for for_each_inferior.
3043 Fetch lwpid from thread, not lwp.
3044 (linux_wait_1): Fetch ptid, lwpid from current_inferior.
3045 Pass &all_threads to find_inferior, not &all_lwps.
3046 (send_sigstop): Fetch lwpid from thread, not lwp.
3047 (send_sigstop_callback): Update, "entry" parameter is a
3048 struct thread_info * now.
3049 (suspend_and_send_sigstop_callback): Ditto.
3050 (wait_for_sigstop): Ditto. Fetch ptid, lwpid from thread, lwp.
3051 (stuck_in_jump_pad_callback): Update, "entry" parameter is a
3052 struct thread_info * now.
3053 (move_out_of_jump_pad_callback): Ditto. Fetch ptid, lwpid
3054 from thread, lwp.
3055 (lwp_running): Update, "entry" parameter is a
3056 struct thread_info * now.
3057 (stop_all_lwps): Fetch ptid from thread.
3058 Pass &all_threads to find_inferior, for_each_inferior, not &all_lwps.
3059 (linux_resume_one_lwp): Fetch lwpid from thread.
3060 (linux_set_resume_request): Update, "entry" parameter is a
3061 struct thread_info * now. Fetch pid, lwpid from thread.
3062 (resume_status_pending_p): Update, "entry" parameter is a
3063 struct thread_info * now.
3064 (need_step_over_p): Ditto. Fetch lwpid from thread.
3065 (start_step_over): Fetch lwpid from thread.
3066 (linux_resume_one_thread): Update, "entry" parameter is a
3067 struct thread_info * now. Fetch lwpid from thread.
3068 (linux_resume): Pass &all_threads to find_inferior, not &all_lwps.
3069 (proceed_one_lwp): Update, "entry" parameter is a
3070 struct thread_info * now. Fetch lwpid from thread.
3071 (unsuspend_and_proceed_one_lwp): Update, "entry" parameter is a
3072 struct thread_info * now.
3073 (proceed_all_lwps): Pass &all_threads to find_inferior, not &all_lwps.
3074 (unstop_all_lwps): Ditto. Fetch lwpid from thread.
3075 (regsets_fetch_inferior_registers): Fetch lwpid from current_inferior
3076 directly.
3077 (regsets_store_inferior_registers): Ditto.
3078 (fetch_register, store_register): Ditto.
3079 (linux_read_memory, linux_write_memory): Ditto.
3080 (linux_request_interrupt): Ditto.
3081 (linux_read_auxv): Ditto.
3082 (linux_xfer_siginfo): Ditto.
3083 (linux_qxfer_spu): Ditto.
3084 (linux_qxfer_libraries_svr4): Ditto.
3085 * linux-low.h (ptid_of, pid_of, lwpid_of): Delete,
3086 moved to inferiors.h.
3087 (get_lwp): Delete.
3088 (get_thread_lwp): Update.
3089 (struct lwp_info): Delete member "entry". Simplify comment for
3090 member "thread".
3091 (all_lwps): Delete.
3092 * linux-mips-low.c (mips_read_description): Fetch lwpid from
3093 current_inferior directly.
3094 (update_watch_registers_callback): Update, "entry" parameter is a
3095 struct thread_info * now. Fetch pid from thread.
3096 (mips_linux_prepare_to_resume): Fetch ptid from thread.
3097 (mips_insert_point): Fetch lwpid from current_inferior.
3098 Pass &all_threads to find_inferior, not &all_lwps.
3099 (mips_remove_point): Pass &all_threads to find_inferior, not &all_lwps.
3100 (mips_stopped_by_watchpoint): Fetch lwpid from current_inferior
3101 directly.
3102 (mips_stopped_data_address): Ditto.
3103 * linux-s390-low.c (s390_arch_setup): Fetch pid from current_inferior
3104 directly.
3105 * linux-tile-low.c (tile_arch_setup): Ditto.
3106 * linux-x86-low.c (x86_get_thread_area): Fetch lwpid from thread.
3107 (update_debug_registers_callback): Update, "entry" parameter is a
3108 struct thread_info * now. Fetch pid from thread.
3109 (i386_dr_low_set_addr): Fetch pid from current_inferior directly.
3110 Pass &all_threads to find_inferior, not &all_lwps.
3111 (i386_dr_low_get_addr): Fetch ptid from current_inferior directly.
3112 (i386_dr_low_set_control): Fetch pid from current_inferior directly.
3113 Pass &all_threads to find_inferior, not &all_lwps.
3114 (i386_dr_low_get_control): Fetch ptid from current_inferior directly.
3115 (i386_dr_low_get_status): Ditto.
3116 (x86_linux_prepare_to_resume): Fetch ptid from thread.
3117 (x86_siginfo_fixup): Fetch lwpid from current_inferior directly.
3118 (x86_linux_read_description): Ditto.
3119 * proc-service.c (ps_getpid): Fetch pid from current_inferior directly.
3120
3121 2014-02-20 Doug Evans <dje@google.com>
3122
3123 * inferiors.c (get_first_inferior): Fix buglet.
3124
3125 2014-02-19 Doug Evans <dje@google.com>
3126
3127 * gdbthread.h (add_thread): Change result type to struct thread_info *.
3128 * inferiors.c (add_thread): Change result type to struct thread_info *.
3129 All callers updated.
3130 (add_lwp): Call add_thread here instead of in callers.
3131 All callers updated.
3132 * linux-low.h (get_lwp_thread): Rewrite.
3133 (struct lwp_info): New member "thread".
3134
3135 2014-02-19 Doug Evans <dje@google.com>
3136
3137 * linux-low.c (add_lwp): Change result to struct lwp_info *.
3138 All callers updated.
3139
3140 2014-02-19 Doug Evans <dje@google.com>
3141
3142 * inferiors.c (add_thread): Fix whitespace.
3143
3144 2014-02-19 Doug Evans <dje@google.com>
3145
3146 * dll.c (clear_dlls): Replace accessing list implemention details
3147 with API function.
3148 * gdbthread.h (get_first_thread): Declare.
3149 * inferiors.c (for_each_inferior_with_data): New function.
3150 (get_first_thread): New function.
3151 (find_thread_ptid): Simplify.
3152 (get_first_inferior): New function.
3153 (clear_list): Delete.
3154 (one_inferior_p): New function.
3155 (clear_inferior_list): New function.
3156 (clear_inferiors): Update.
3157 * inferiors.h (for_each_inferior_with_data): Declare.
3158 (clear_inferior_list): Declare.
3159 (one_inferior_p): Declare.
3160 (get_first_inferior): Declare.
3161 * linux-low.c (linux_wait_for_event): Replace accessing list
3162 implemention details with API function.
3163 * server.c (target_running): Ditto.
3164 (accumulate_file_name_length): New function.
3165 (emit_dll_description): New function.
3166 (handle_qxfer_libraries): Replace accessing list implemention
3167 details with API function.
3168 (handle_qxfer_threads_worker): New function.
3169 (handle_qxfer_threads_proper): Replace accessing list implemention
3170 details with API function.
3171 (handle_query): Ditto.
3172 (visit_actioned_threads_callback_ftype): New typedef.
3173 (visit_actioned_threads_data): New struct.
3174 (visit_actioned_threads): Rewrite to be find_inferior callback.
3175 (resume): Call find_inferior.
3176 (handle_status): Replace accessing list implemention
3177 details with API function.
3178 (process_serial_event): Replace accessing list implemention details
3179 with API function.
3180 * target.c (set_desired_inferior): Replace accessing list implemention
3181 details with API function.
3182 * tracepoint.c (same_process_p): New function.
3183 (gdb_agent_about_to_close): Replace accessing list implemention
3184 details with API function.
3185 * win32-low.c (child_delete_thread): Replace accessing list
3186 implemention details with API function.
3187 (match_dll_by_basename): New function.
3188 (dll_is_loaded_by_basename): New function.
3189 (win32_ensure_ntdll_loaded): Replace accessing list implemention
3190 details call to dll_is_loaded_by_basename.
3191
3192 2014-02-19 Doug Evans <dje@google.com>
3193
3194 * dll.h (struct dll_info): Add comment.
3195 * gdbthread.h (struct thread_info): Add comment.
3196 (current_ptid): Simplify.
3197 * inferiors.c (add_process): Update.
3198 (remove_process): Update.
3199 * inferiors.h (struct process_info): Rename member "head" to "entry".
3200 * linux-low.c (delete_lwp): Update.
3201 (add_lwp): Update.
3202 (last_thread_of_process_p): Update.
3203 (kill_one_lwp_callback, linux_kill): Update.
3204 (status_pending_p_callback): Update.
3205 (wait_for_sigstop): Update. Simplify read of ptid.
3206 (start_step_over): Update.
3207 * linux-low.h (ptid_of, pid_of, lwpid_of): Update.
3208 (get_lwp_thread): Update.
3209 (struct lwp_info): Rename member "head" to "entry".
3210 * regcache.h (inferior_list_entry): Delete.
3211 * server.c (kill_inferior_callback): Update.
3212 (detach_or_kill_inferior_callback): Update.
3213 (print_started_pid): Update.
3214 (print_attached_pid): Update.
3215 (process_serial_event): Simplify read of ptid.
3216 * thread-db.c (thread_db_create_event): Update.
3217 (thread_db_get_tls_address): Update.
3218 * win32-low.c (current_inferior_ptid): Simplify.
3219
3220 2014-02-19 Tom Tromey <tromey@redhat.com>
3221
3222 * target.h (struct target_ops) <supports_btrace>: Add target_ops
3223 argument.
3224 (target_supports_btrace): Update.
3225
3226 2014-02-14 Yao Qi <yao@codesourcery.com>
3227
3228 * Makefile.in (IPA_OBJS): Append rsp-low-ipa.o.
3229 (rsp-low-ipa.o): New target.
3230
3231 2014-02-12 Tom Tromey <tromey@redhat.com>
3232
3233 * ax.c (gdb_parse_agent_expr): Use hex2bin, not
3234 convert_ascii_to_int.
3235 * regcache.c (registers_to_string): Likewise.
3236 * remote-utils.c (decode_M_packet): Likewise.
3237 * server.c (process_serial_event): Likewise.
3238
3239 2014-02-12 Tom Tromey <tromey@redhat.com>
3240
3241 * server.c (handle_query, handle_v_run): Use hex2bin, not
3242 unhexify.
3243 * tracepoint.c (cmd_qtdpsrc, cmd_qtdv, cmd_qtnotes): Likewise.
3244
3245 2014-02-12 Tom Tromey <tromey@redhat.com>
3246
3247 * ax.c (gdb_unparse_agent_expr): Use bin2hex, not
3248 convert_int_to_ascii.
3249 * regcache.c (registers_to_string, collect_register_as_string):
3250 Likewise.
3251 * remote-utils.c (look_up_one_symbol, relocate_instruction):
3252 Likewise.
3253 * server.c (process_serial_event): Likewise.
3254 * tracepoint.c (cmd_qtstatus, response_source, response_tsv)
3255 (cmd_qtbuffer, cstr_to_hexstr): Likewise.
3256
3257 2014-02-12 Tom Tromey <tromey@redhat.com>
3258
3259 * remote-utils.c (look_up_one_symbol, monitor_output): Use
3260 bin2hex, not hexify.
3261 * tracepoint.c (cmd_qtstatus): Likewise.
3262
3263 2014-02-12 Tom Tromey <tromey@redhat.com>
3264
3265 * remote-utils.c (monitor_output): Pass explicit length to
3266 hexify.
3267
3268 2014-02-12 Tom Tromey <tromey@redhat.com>
3269
3270 * tracepoint.c: Include rsp-low.h.
3271 * server.c: Include rsp-low.h.
3272 * remote-utils.h (convert_ascii_to_int, convert_int_to_ascii)
3273 (unhexify, hexify, remote_escape_output, unpack_varlen_hex): Don't
3274 declare.
3275 * remote-utils.c: Include rsp-low.h.
3276 (fromhex, hexchars, ishex, unhexify, tohex, hexify)
3277 (remote_escape_output, remote_unescape_input, unpack_varlen_hex)
3278 (convert_int_to_ascii, convert_ascii_to_int): Move to
3279 common/rsp-low.c.
3280 * regcache.c: Include rsp-low.h.
3281 * ax.c: Include rsp-low.h.
3282 * Makefile.in (SFILES): Add common/rsp-low.c.
3283 (OBS): Add rsp-low.o.
3284 (rsp-low.o): New target.
3285
3286 2014-02-12 Tom Tromey <tromey@redhat.com>
3287
3288 * utils.h (pulongest, plongest, phex_nz): Don't declare.
3289 Include print-utils.h.
3290 * utils.c (NUMCELLS, CELLSIZE, get_cell, decimal2str, pulongest)
3291 (plongest, thirty_two, phex_nz): Remove.
3292 * Makefile.in (SFILES): Add common/print-utils.c.
3293 (OBS): Add print-utils.o.
3294 (print-utils-ipa.o): New target.
3295 (print-utils.o): New target.
3296 (IPA_OBJS): Add print-utils-ipa.o.
3297
3298 2014-02-06 Tom Tromey <tromey@redhat.com>
3299
3300 * Makefile.in (SFILES): Fix indentation.
3301
3302 2014-02-05 Doug Evans <dje@google.com>
3303
3304 * linux-low.c (linux_wait_for_event): Improve comment.
3305 (linux_wait_1): Keep current_inferior in sync with event_child.
3306
3307 2014-01-22 Doug Evans <dje@google.com>
3308
3309 * gdbthread.h (gdb_id_to_thread): Delete, unused.
3310
3311 2014-01-22 Doug Evans <dje@google.com>
3312
3313 * configure.ac (AC_CHECK_FUNCS): Add test for gettimeofday.
3314 * configure: Regenerate.
3315 * config.in: Regenerate.
3316 * Makefile.in (SFILES): Add debug.c.
3317 (OBS): Add debug.o.
3318 * debug.c: New file.
3319 * debug.h: New file.
3320 * linux-aarch64-low.c (*): Update all debugging printfs to use
3321 debug_printf instead of fprintf.
3322 * linux-arm-low.c (*): Ditto.
3323 * linux-cris-low.c (*): Ditto.
3324 * linux-crisv32-low.c (*): Ditto.
3325 * linux-m32r-low.c (*): Ditto.
3326 * linux-sparc-low.c (*): Ditto.
3327 * linux-x86.c (*): Ditto.
3328 * linux-low.c (*): Ditto.
3329 (linux_wait_1): Add calls to debug_enter, debug_exit.
3330 (linux_wait): Remove redundant debugging printf.
3331 (stop_all_lwps): Add calls to debug_enter, debug_exit.
3332 (linux_resume, unstop_all_lwps): Ditto.
3333 * mem-break.c (*): Update all debugging printfs to use
3334 debug_printf instead of fprintf.
3335 * remote-utils.c (*): Ditto.
3336 * thread-db.c (*): Ditto.
3337 * server.c #include <ctype.h>, "gdb_vecs.h".
3338 (debug_threads): Moved to debug.c.
3339 (*): Update all debugging printfs to use debug_printf instead of
3340 fprintf.
3341 (start_inferior): Replace call to fflush with call to debug_flush.
3342 (monitor_show_help): Mention set debug-format.
3343 (parse_debug_format_options): New function.
3344 (handle_monitor_command): Handle "monitor set debug-format".
3345 (gdbserver_usage): Mention --debug-format.
3346 (main): Parse --debug-format.
3347 * server.h (debug_threads): Declaration moved to debug.h.
3348 #include "debug.h".
3349 * tracepoint.c (trace_debug_1) [!IN_PROCESS_AGENT]: Add version of
3350 trace_debug_1 that uses debug_printf.
3351 (tracepoint_look_up_symbols): Update all debugging printfs to use
3352 debug_printf instead of fprintf.
3353
3354 2014-01-20 Baruch Siach <baruch@tkos.co.il>
3355
3356 * linux-xtensa-low.c: Include asm/ptrace.h instead of
3357 sys/ptrace.h.
3358
3359 2014-01-17 Pedro Alves <palves@redhat.com>
3360
3361 PR build/16445
3362 * linux-x86-low.c: Don't include elf/common.h if ELFMAG0 is
3363 defined after including gdb_proc_service.h.
3364
3365 2014-01-16 Doug Evans <dje@google.com>
3366
3367 * dll.c (UNSPECIFIED_CORE_ADDR): New macro.
3368 (match_dll): Use it.
3369
3370 2014-01-16 Markus Metzger <markus.t.metzger@intel.com>
3371
3372 * target.h (target_ops) <read_btrace>: Change parameters and
3373 return type to allow error reporting.
3374 * server.c (handle_qxfer_btrace): Support delta reads. Pass
3375 trace reading errors on.
3376 * linux-low.c (linux_low_read_btrace): Pass trace reading
3377 errors on.
3378 (linux_low_disable_btrace): New.
3379
3380 2014-01-15 Doug Evans <dje@google.com>
3381
3382 * inferiors.c (thread_id_to_gdb_id): Delete.
3383 * inferiors.h (thread_id_to_gdb_id): Delete.
3384
3385 2014-01-13 Eli Zaretskii <eliz@gnu.org>
3386
3387 * Makefile.in (INCLUDE_CFLAGS): Remove trailing slash from
3388 "-I$(srcdir)/../". Fixes MinGW compilation errors with old GCC
3389 versions.
3390
3391 2014-01-08 Pedro Alves <palves@redhat.com>
3392
3393 * server.c (handle_status): Don't discard previous queued stop
3394 replies or thread's pending status here.
3395 (main) <disconnection>: Do it here instead.
3396
3397 2014-01-08 Pedro Alves <palves@redhat.com>
3398
3399 * gdbthread.h (struct thread_info) <status_pending_p>: New field.
3400 * server.c (visit_actioned_threads, handle_pending_status): New
3401 function.
3402 (handle_v_cont): Factor out parts to ...
3403 (resume): ... this new function. If in all-stop, and a thread
3404 being resumed has a pending status, report it without actually
3405 resuming.
3406 (myresume): Adjust to use the new 'resume' function.
3407 (clear_pending_status_callback, set_pending_status_callback)
3408 (find_status_pending_thread_callback): New functions.
3409 (handle_status): Handle the case of multiple threads having
3410 interesting statuses to report. Report threads' real last signal
3411 instead of always reporting GDB_SIGNAL_TRAP. Look for a thread
3412 with an interesting thread to report the status for, instead of
3413 always reporting the status of the first thread.
3414
3415 2014-01-01 Joel Brobecker <brobecker@adacore.com>
3416
3417 * gdbserver.c (gdbserver_version): Set copyright year to 2014.
3418 * gdbreplay.c (gdbreplay_version): Likewise.
3419
3420 2013-12-18 Yufeng Zhang <yufeng.zhang@arm.com>
3421
3422 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Set
3423 iov.iov_len with the real length in use.
3424
3425 2013-12-13 Joel Brobecker <brobecker@adacore.com>
3426
3427 * Makefile.in (safe-ctype.o, lbasename.o): New rules.
3428 * configure.srv: Add safe-ctype.o and lbasename.o to srv_tgtobj
3429 for all targets that use win32-low.c.
3430 * win32-low.c (win32_ensure_ntdll_loaded): New function.
3431 (do_initial_child_stuff): Add call to win32_ensure_ntdll_loaded.
3432
3433 2013-12-13 Pedro Alves <palves@redhat.com>
3434
3435 * target.c (mywait): Set OURSTATUS->KIND to TARGET_WAITKIND_STOPPED
3436 if equal to TARGET_WAITKIND_LOADED.
3437 * win32-low.c (cached_status): New static global.
3438 (win32_wait): Add declaration.
3439 (do_initial_child_stuff): Flush all initial pending debug events
3440 up to the initial breakpoint.
3441 (win32_wait): If CACHED_STATUS was set, return that instead
3442 of doing a real wait. Remove the code resuming the execution
3443 of the inferior after receiving a TARGET_WAITKIND_LOADED event
3444 during the initial phase. Also remove the code changing
3445 OURSTATUS->KIND from TARGET_WAITKIND_LOADED to
3446 TARGET_WAITKIND_STOPPED.
3447
3448 2013-12-11 Yao Qi <yao@codesourcery.com>
3449
3450 * notif.c (handle_notif_ack): Return 0 if no notification
3451 matches.
3452
3453 2013-11-20 Doug Evans <dje@google.com>
3454
3455 * linux-low.c (linux_set_resume_request): Fix comment.
3456
3457 2013-11-20 Doug Evans <dje@google.com>
3458
3459 * linux-low.c (resume_status_pending_p): Tweak comment.
3460
3461 2013-11-20 Walfred Tedeschi <walfred.tedeschi@intel.com>
3462
3463 * Makefile.in: Add i386-mpx.c, i386-mpx-linux.c, amd64-mpx.c,
3464 amd64-mpx-linux.c, x32-mpx.c and x32-mpx-linux.c generation.
3465 * configure.srv (srv_i386_regobj): Add i386-mpx.o.
3466 (srv_i386_linux_regobj): Add i386-mpx-linux.o.
3467 (srv_amd64_regobj): Add amd64-mpx.o.
3468 (srv_amd64_linux_regobj): Add amd64-mpx-linux.o.
3469 (srv_i386_32bit_xmlfiles): Add i386/32bit-mpx.xml.
3470 (srv_i386_64bit_xmlfiles): Add i386/64bit-mpx.xml.
3471 * i387-fp.c (num_pl_bnd_register) Added constant.
3472 (num_pl_bnd_cfg_registers) Added constant.
3473 (struct i387_xsave) Added reserved area and MPX fields.
3474 (i387_cache_to_xsave, i387_xsave_to_cache) Add MPX.
3475 * linux-x86-low.c (init_registers_i386_mpx_linux): Declare new
3476 function.
3477 (tdesc_i386_mpx_linux): Add MPX amd64 target.
3478 (init_registers_amd64_mpx_linux): Declare new function.
3479 (tdesc_amd64_mpx_linux): Add MPX amd64 target.
3480 (x86_64_regmap): Add MPX registers.
3481 (x86_linux_read_description): Add MPX case.
3482 (initialize_low_arch): Initialize MPX targets.
3483
3484 2013-11-18 Tom Tromey <tromey@redhat.com>
3485
3486 * configure: Rebuild.
3487 * configure.ac: Don't check for stdlib.h.
3488 * gdbreplay.c: Unconditionally include stdlib.h.
3489
3490 2013-11-18 Tom Tromey <tromey@redhat.com>
3491
3492 * config.in: Rebuild.
3493 * configure: Rebuild.
3494 * configure.ac: Don't use AC_HEADER_DIRENT.
3495
3496 2013-11-18 Tom Tromey <tromey@redhat.com>
3497
3498 * server.h: Don't check HAVE_STRING_H.
3499 * gdbreplay.c: Don't check HAVE_STRING_H.
3500 * configure: Rebuild.
3501
3502 2013-11-18 Tom Tromey <tromey@redhat.com>
3503
3504 * Makefile.in (gdbreplay$(EXEEXT)): Depend on and link against
3505 LIBGNU.
3506
3507 2013-11-08 Tom Tromey <tromey@redhat.com>
3508
3509 * configure, config.in: Rebuild.
3510 * configure.ac: Remove unused configury.
3511
3512 2013-11-08 Tom Tromey <tromey@redhat.com>
3513
3514 * acinclude.m4: Include common.m4, codeset.m4.
3515 * configure, config.in: Rebuild.
3516 * configure.ac: Use GDB_AC_COMMON.
3517
3518 2013-11-06 Andreas Arnez <arnez@linux.vnet.ibm.com>
3519
3520 * linux-s390-low.c (HWCAP_S390_TE): New define.
3521 (s390_arch_setup): Consider the TE field in the HWCAP for
3522 determining 'have_regset_tdb'.
3523
3524 2013-10-16 Sergio Durigan Junior <sergiodj@redhat.com>
3525
3526 PR gdb/16014
3527 * tracepoint.c (download_tracepoint_1): Remove unnecessary double
3528 call to sizeof.
3529
3530 2013-10-02 Pedro Alves <palves@redhat.com>
3531
3532 * server.c (process_serial_event): Don't output "GDBserver
3533 exiting" if GDB is connected through stdio.
3534 * target.c (mywait): Likewise, be silent if GDB is connected
3535 through stdio.
3536
3537 2013-10-01 Joel Brobecker <brobecker@adacore.com>
3538
3539 * lynx-low.c (lynx_add_threads_after_attach): New function.
3540 (lynx_attach): Remove call to add_thread. Add call to
3541 lynx_add_threads_after_attach instead.
3542
3543 2013-09-28 Mike Frysinger <vapier@gentoo.org>
3544
3545 * configure.ac (AC_CHECK_HEADERS): Add sys/syscall.h
3546 * config.in, configure: Regenerated.
3547
3548 2013-09-18 Yao Qi <yao@codesourcery.com>
3549
3550 PR server/15959
3551 * server.c (start_inferior): Clear 'resume_info'.
3552
3553 2013-09-16 Jiong Wang <jiwang@tilera.com>
3554
3555 * linux-tile-low.c (tile_regsets): Modify the size field to 64-bit
3556 for each register.
3557
3558 2013-09-16 Jiong Wang <jiwang@tilera.com>
3559
3560 * configure.srv <tilegx*-*-linux*>: Remove linux-osdata.o from and add
3561 linux-tile-low.o to srv_tgtobj.
3562
3563 2013-09-16 Will Newton <will.newton@linaro.org>
3564
3565 * linux-aarch64-low.c (aarch64_linux_set_debug_regs): Zero
3566 out regs.
3567
3568 2013-09-06 Pedro Alves <palves@redhat.com>
3569
3570 * Makefile.in (gdb_proc_service_h, regdef_h, regcache_h)
3571 (signals_def, signals_h, ptid_h, ax_h, agent_h, linux_btrace_h)
3572 (linux_osdata_h, vec_h, gdb_vecs_h, host_defs_h, libiberty_h)
3573 (server_h, gdbthread_h, linux_low_h, linux_ptrace_h)
3574 (gdb_thread_db_h, linux_procfs_h, lynx_low_h, nto_low_h)
3575 (mips_linux_watch_h, i386_low_h, win32_low_h): Delete.
3576
3577 2013-09-06 Pedro Alves <palves@redhat.com>
3578
3579 * Makefile.in (linux-btrace.o, mips-linux-watch.o): Remove
3580 explicit header dependencies and use $COMPILE/$POSTCOMPILE.
3581
3582 2013-09-06 Pedro Alves <palves@redhat.com>
3583
3584 * linux-amd64-ipa.c: Include tracepoint.h.
3585 * linux-i386-ipa.c: Include tracepoint.h.
3586
3587 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3588
3589 * linux-crisv32-low.c (PTRACE_GET_THREAD_AREA): New macro.
3590 (ps_get_thread_area): New function.
3591
3592 2013-09-06 Ricard Wanderlof <ricardw@axis.com>
3593
3594 * linux-crisv32-low.c (elf_gregset_t): Delete typedef.
3595 (initialize_low_arch): Call init_registers_crisv32 rather than
3596 init_register_crisv32.
3597
3598 2013-09-05 Pedro Alves <palves@redhat.com>
3599
3600 * server.h (handle_vFile, hostio_last_error_from_errno): Move
3601 to ...
3602 * hostio.h: ... this new file.
3603 * hostio.c, server.c, linux-low.c, nto-low.c, spu-low,
3604 win32-low.c: Include hostio.h.
3605
3606 2013-09-05 Pedro Alves <palves@redhat.com>
3607
3608 * server.h (gdb_client_data, handler_func, callback_handler_func)
3609 (delete_file_handler, add_file_handler, append_callback_event)
3610 (delete_callback_event, start_event_loop, initialize_event_loop):
3611 Move to event-loop.h and include it.
3612 * event-loop.h: New file.
3613
3614 2013-09-05 Pedro Alves <palves@redhat.com>
3615
3616 * dll.c, inferiors.c, remote-utils.c, server.c: Include "dll.h".
3617 * server.h (struct dll_info, all_dlls, dlls_changed, clear_dlls)
3618 (loaded_dll, unloaded_dll): Move to ...
3619 * dll.h: ... this new file.
3620 * inferiors.c, remote-utils.c, win32-low.c: Include "dll.h".
3621
3622 2013-09-05 Pedro Alves <palves@redhat.com>
3623
3624 * server.h (current_process, get_thread_process, all_processes)
3625 (add_inferior_to_list, for_each_inferior, current_inferior)
3626 (remove_inferior, add_process, remove_process, find_process_pid)
3627 (have_started_inferiors_p, have_attached_inferiors_p)
3628 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id)
3629 (clear_inferiors, find_inferior, find_inferior_id)
3630 (inferior_target_data, set_inferior_target_data)
3631 (inferior_regcache_data, set_inferior_regcache_data): Move to
3632 inferiors.h, and include it.
3633 * inferiors.h: New file.
3634
3635 2013-09-05 Pedro Alves <palves@redhat.com>
3636
3637 * server.h (struct emit_ops, current_insn_ptr, emit_error):
3638 Move ...
3639 * ax.h: ... here.
3640
3641 2013-09-05 Pedro Alves <palves@redhat.com>
3642
3643 * ax.c, linux-low.c, linux-x86-low.c, server.c: Include
3644 tracepoint.h.
3645 * server.h (IPA_BUFSIZ, initialize_tracepoint, tracing)
3646 (disconnected_tracing, tracepoint_look_up_symbols, stop_tracing
3647 (handle_tracepoint_general_set, handle_tracepoint_query)
3648 (tracepoint_finished_step, tracepoint_was_hit)
3649 (release_while_stepping_state_list, current_traceframe)
3650 (in_readonly_region, traceframe_read_mem)
3651 (fetch_traceframe_registers, traceframe_read_sdata)
3652 (traceframe_read_info, struct fast_tpoint_collect_status)
3653 (fast_tracepoint_collecting, force_unlock_trace_buffer)
3654 (handle_tracepoit_bkpts, initialize_low_tracepoint)
3655 (supply_fast_tracepoint_registers)
3656 (supply_static_tracepoint_registers, set_trampoline_buffer_space)
3657 (ipa_tdesc, claim_trampoline_space)
3658 (have_fast_tracepoint_trampoline_buffer, gdb_agent_about_to_close)
3659 (agent_mem_read, agent_get_trace_state_variable_value)
3660 (agent_set_trace_state_variable_value, agent_tsv_read)
3661 (agent_mem_read_string, get_raw_reg_func_addr)
3662 (get_get_tsv_func_addr, get_set_tsv_func_addr): Move to ...
3663 * tracepoint.h: ... this new file.
3664
3665 2013-09-05 Pedro Alves <palves@redhat.com>
3666
3667 * server.h (perror_with_name, error, fatal, warning, paddress)
3668 (pulongest, plongest, phex_nz, pfildes): Move to utils.h, and
3669 include it.
3670 * utils.h: New file.
3671
3672 2013-09-05 Pedro Alves <palves@redhat.com>
3673
3674 * server.h (remote_debug, noack_mode, transport_is_reliable)
3675 (gdb_connected, STDIO_CONNECTION_NAME, remote_connection_is_stdio)
3676 (read_ptid, write_ptid, putpkt, putpkt_binary, putpkt_notif)
3677 (getpkt, remote_prepare, remote_open, remote_close, write_ok)
3678 (write_enn, initialize_async_io, enable_async_io)
3679 (disable_async_io, check_remote_input_interrupt_request)
3680 (convert_ascii_to_int, convert_int_to_ascii, new_thread_notify)
3681 (dead_thread_notify, prepare_resume_reply)
3682 (decode_address_to_semicolon, decode_address, decode_m_packet)
3683 (decode_M_packet, decode_X_packet, decode_xfer_write)
3684 (decode_search_memory_packet, unhexify, hexify)
3685 (remote_escape_output, unpack_varlen_hex, clear_symbol_cache)
3686 (look_up_one_symbol, relocate_instruction)
3687 (monitor_output): Move to remote-utils.h, and include it.
3688 * remote-utils.h: New file.
3689
3690 2013-09-05 Pedro Alves <palves@redhat.com>
3691
3692 * server.h (_): Delete.
3693
3694 2013-09-02 Pedro Alves <palves@redhat.com>
3695
3696 * tracepoint.c (TRACEFRAME_EOB_MARKER_SIZE): New macro.
3697 (init_trace_buffer): Ensure at least TRACEFRAME_EOB_MARKER_SIZE is
3698 allocated.
3699 (trace_buffer_alloc): Use TRACEFRAME_EOB_MARKER_SIZE.
3700
3701 2013-09-02 Pierre Muller <muller@sourceware.org>
3702
3703 * win32-low.c (child_xfer_memory): Check if ReadProcessMemory
3704 or WriteProcessMemory complete successfully and handle
3705 ERROR_PARTIAL_COPY error.
3706
3707 2013-09-02 Pedro Alves <palves@redhat.com>
3708
3709 * server.c (gdb_read_memory): Return -1 on traceframe memory read
3710 error instead of EIO.
3711
3712 2013-08-28 Jan Kratochvil <jan.kratochvil@redhat.com>
3713
3714 PR server/15604
3715 * linux-low.c: Include filestuff.h.
3716 (linux_create_inferior) <pid == 0>: Call close_most_fds.
3717 * lynx-low.c: Include filestuff.h.
3718 (lynx_create_inferior) <pid == 0>: Call close_most_fds.
3719 * server.c: Include filestuff.h.
3720 (main): Call notice_open_fds.
3721 * spu-low.c: Include filestuff.h.
3722 (spu_create_inferior) <pid == 0>: Call close_most_fds.
3723
3724 2013-08-22 Luis Machado <lgustavo@codesourcery.com>
3725
3726 * Makefile.in: Explain why ../target and ../nat are not
3727 listed as include file search paths.
3728 (linux-waitpid.o): New object file rule.
3729 * configure.srv (srv_native_linux_obj): New variable.
3730 Replace all occurrences of linux native object files with
3731 $srv_native_linux_obj.
3732 * linux-low.c: Include nat/linux-nat.h and nat/linux-waitpid.h.
3733 (HAS_NOMMU): Move defining logic to common/linux-ptrace.c.
3734 (linux_enable_event_reporting): Remove declaration.
3735 (my_waitpid): Moved to common/linux-waitpid.c.
3736 (linux_wait_for_event): Pass ptid when calling
3737 linux_enable_event_reporting.
3738 (linux_supports_tracefork_flag): Remove.
3739 (linux_enable_event_reporting): Likewise.
3740 (linux_tracefork_grandchild): Remove.
3741 (STACK_SIZE): Moved to common/linux-ptrace.c.
3742 (linux_tracefork_child): Remove.
3743 (linux_test_for_tracefork): Remove.
3744 (linux_look_up_symbols): Call linux_supports_traceclone.
3745 (initialize_low): Remove call to linux_test_for_tracefork.
3746 * linux-low.h (PTRACE_TYPE_ARG3): Move to
3747 common/linux-ptrace.h.
3748 (PTRACE_TYPE_ARG4): Likewise.
3749 Include linux-ptrace.h.
3750
3751 2013-08-21 Pedro Alves <palves@redhat.com>
3752
3753 * config.in: Renegerate.
3754
3755 2013-08-19 Luis Machado <lgustavo@codesourcery.com>
3756
3757 * Makefile.in (INCLUDE_CFLAGS): Include -I$(srcdir)/../.
3758 (SFILES): Remove $(srcdir)/common/target-common.c and
3759 add $(srcdir)/target/waitstatus.c.
3760 (OBS): Remove target-common.o and add waitstatus.o.
3761 (server_h): Remove $(srcdir)/../common/target-common.h and
3762 add $(srcdir)/../target/resume.h, $(srcdir)/../target/wait.h
3763 and $(srcdir)/../target/waitstatus.h.
3764 (target-common.o): Remove.
3765 (waitstatus.o): New target object file.
3766 * target.h: Do not include target-common.h and
3767 include target/resume.h, target/wait.h and
3768 target/waitstatus.h.
3769
3770 2013-08-13 Luis Machado <lgustavo@codesourcery.com>
3771
3772 * linux-arm-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3773 to PTRACE_TYPE_ARG3.
3774 * linux-low.c: Rename all occurrences of PTRACE_ARG3_TYPE
3775 to PTRACE_TYPE_ARG3 and PTRACE_ARG4_TYPE to
3776 PTRACE_TYPE_ARG4.
3777 * linux-low.h (PTRACE_ARG3_TYPE): Rename to PTRACE_TYPE_ARG3.
3778 (PTRACE_ARG4_TYPE): Rename to PTRACE_TYPE_ARG4.
3779
3780 2013-07-27 Jie Zhang <jie@codesourcery.com>
3781 Daniel Jacobowitz <dan@codesourcery.com>
3782 Yao Qi <yao@codesourcery.com>
3783
3784 * Makefile.in (SFILES): Add common/mips-linux-watch.c.
3785 (mips-linux-watch.o): New rule.
3786 (mips_linux_watch_h): New variable.
3787 * configure.srv <mips*-*-linux*>: Add mips-linux-watch.o to
3788 srv_tgtobj.
3789 * linux-mips-low.c: Include mips-linux-watch.h.
3790 (struct arch_process_info, struct arch_lwp_info): New.
3791 (update_watch_registers_callback): New function.
3792 (mips_linux_new_process, mips_linux_new_thread) New functions.
3793 (mips_linux_prepare_to_resume, mips_insert_point): New
3794 functions.
3795 (mips_remove_point, mips_stopped_by_watchpoint): New
3796 functions.
3797 (rsp_bp_type_to_target_hw_bp_type): New function.
3798 (mips_stopped_data_address): New function.
3799 (the_low_target): Add watchpoint support functions.
3800
3801 2013-07-27 Yao Qi <yao@codesourcery.com>
3802
3803 * i386-low.c: Include break-common.h.
3804 (enum target_hw_bp_type): Remove.
3805
3806 2013-07-24 Luis Machado <lgustavo@codesourcery.com>
3807
3808 * Makefile.in (SFILES): /common/target-common.c.
3809 (OBS): Add target-common.o.
3810 (server_h): Add $(srcdir)/../common/target-common.h.
3811 (target-common.o): New target.
3812 * server.c (queue_stop_reply_callback): Free
3813 status string after use.
3814 * target.c (target_waitstatus_to_string): Remove.
3815 * target.h: Include target-common.h.
3816 (resume_kind): Likewise.
3817 (target_waitkind): Likewise.
3818 (target_waitstatus): Likewise.
3819 (TARGET_WNOHANG): Likewise.
3820
3821 2013-07-04 Yao Qi <yao@codesourcery.com>
3822
3823 * Makefile.in (host_alias): Use @host_noncanonical@.
3824 (target_alias): Use @target_noncanonical@.
3825 * configure.ac: Use ACX_NONCANONICAL_TARGET and
3826 ACX_NONCANONICAL_HOST.
3827 * configure: Regenerated.
3828
3829 Revert:
3830 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3831
3832 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3833 * configure: Rebuild.
3834 * Makefile.in (version_host, version_target): Get from configure.
3835 (version.c): Use $(version_host) and $(version_target).
3836
3837 2013-07-03 Pedro Alves <palves@redhat.com>
3838
3839 * Makefile.in (config.status): Depend on development.sh.
3840 * acinclude.m4: Include libmcheck.m4.
3841 * configure: Regenerate.
3842
3843 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3844
3845 * win32-low.c (winapi_DebugActiveProcessStop): Move the WINAPI
3846 attribute inside the parentheses.
3847 (winapi_DebugSetProcessKillOnExit): Ditto.
3848 (winapi_DebugBreakProcess): Ditto.
3849 (winapi_GenerateConsoleCtrlEvent): Ditto.
3850
3851 2013-07-02 Mircea Gherzan <mircea.gherzan@intel.com>
3852
3853 * notif.h (notif_event): Add a dummy member to avoid compiler
3854 errors.
3855
3856 2013-07-01 Pedro Alves <palves@redhat.com>
3857
3858 * hostio.c (HOSTIO_PATH_MAX): Define.
3859 (require_filename, handle_open, handle_unlink, handle_readlink):
3860 Use it.
3861
3862 2013-07-01 Pedro Alves <palves@redhat.com>
3863
3864 * server.h: Include "pathmax.h".
3865 * linux-low.c: Don't include sys/param.h.
3866 (linux_pid_exe_is_elf_64_file): Use PATH_MAX instead of
3867 MAXPATHLEN.
3868 * win32-low.c: Don't include sys/param.h.
3869 (win32_create_inferior): Use PATH_MAX instead of MAXPATHLEN.
3870
3871 2013-07-01 Pedro Alves <palves@redhat.com>
3872
3873 * event-loop.c: Don't check HAVE_UNISTD_H before including
3874 <unistd.h>.
3875 * gdbreplay.c: Likewise.
3876 * remote-utils.c: Likewise.
3877 * server.c: Likewise.
3878 * configure.ac: Don't check for unistd.h.
3879 * configure: Regenerate.
3880
3881 2013-06-28 Tom Tromey <tromey@redhat.com>
3882
3883 * Makefile.in (version.c): Use version.in, not
3884 common/version.in.
3885
3886 2013-06-28 Mircea Gherzan <mircea.gherzan@intel.com>
3887
3888 * configure.ac (version_host, version_target): Set and AC_SUBST them.
3889 * configure: Rebuild.
3890 * Makefile.in (version_host, version_target): Get from configure.
3891 (version.c): Use $(version_host) and $(version_target).
3892
3893 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3894
3895 Fix trace-status to output user name without trailing colon.
3896 * tracepoint.c (cmd_qtstatus): Remove unnecessary colon from user name.
3897
3898 2013-06-10 Dmitry Kozlov <ddk@codesourcery.com>
3899
3900 Fix trace-status to output proper start-time and stop-time.
3901 * tracepoint.c (cmd_qtstatus): Modify trace-status output to
3902 output start time and stop time in hex as gdb expects.
3903
3904 2013-06-26 Pedro Alves <pedro@codesourcery.com>
3905
3906 * tracepoint.c (build_traceframe_info_xml): Output trace state
3907 variables present in the trace buffer.
3908
3909 2013-06-24 Tom Tromey <tromey@redhat.com>
3910
3911 * Makefile.in (version.c): Use bfd/version.h, common/version.in,
3912 create-version.sh.
3913 (version.o): Remove.
3914 * gdbreplay.c: Include version.h.
3915 (version, host_name): Don't declare.
3916 * server.h: Include version.h.
3917 (version, host_name): Don't declare.
3918
3919 2013-06-12 Pedro Alves <palves@redhat.com>
3920
3921 * linux-x86-low.c (linux_is_elf64): Delete global.
3922 (x86_siginfo_fixup): Replace reference to `linux_is_elf64' global
3923 with local linux_pid_exe_is_elf_64_file use.
3924
3925 2013-06-11 Pedro Alves <palves@redhat.com>
3926
3927 * linux-low.c (regset_disabled, disable_regset): New functions.
3928 (regsets_fetch_inferior_registers)
3929 (regsets_store_inferior_registers): Use them.
3930 (initialize_regsets_info); Don't allocate the disabled_regsets
3931 array here.
3932 * linux-low.h (struct regsets_info) <disabled_regsets>: Extend
3933 comment.
3934
3935 2013-06-11 Pedro Alves <palves@redhat.com>
3936
3937 * linux-low.c (initialize_regsets_info): Use xcalloc instead of
3938 xmalloc.
3939
3940 2013-06-11 Pedro Alves <palves@redhat.com>
3941
3942 * linux-x86-low.c (initialize_low_arch): Call
3943 init_registers_x32_avx_linux.
3944
3945 2013-06-09 Jan Kratochvil <jan.kratochvil@redhat.com>
3946
3947 Fix compatibility with Android Bionic.
3948 * linux-low.c (linux_qxfer_libraries_svr4): Ignore first entry even if
3949 it is not empty.
3950
3951 2013-06-07 Pedro Alves <palves@redhat.com>
3952
3953 PR server/14823
3954 * Makefile.in (OBS): Add tdesc.o.
3955 (IPA_OBJS): Add tdesc-ipa.o.
3956 (tdesc-ipa.o): New rule.
3957 * ax.c (gdb_eval_agent_expr): Adjust register_size call to new
3958 interface.
3959 * linux-low.c (new_inferior): Delete.
3960 (disabled_regsets, num_regsets): Delete.
3961 (linux_add_process): Adjust to set the new per-process
3962 new_inferior flag.
3963 (linux_detach_one_lwp): Adjust to call regcache_invalidate_thread.
3964 (linux_wait_for_lwp): Adjust. Only call arch_setup if the event
3965 was a stop. When calling arch_setup, switch the current inferior
3966 to the thread that got an event.
3967 (linux_resume_one_lwp): Adjust to call regcache_invalidate_thread.
3968 (regsets_fetch_inferior_registers)
3969 (regsets_store_inferior_registers): New regsets_info parameter.
3970 Adjust to use it.
3971 (linux_register_in_regsets): New regs_info parameter. Adjust to
3972 use it.
3973 (register_addr, fetch_register, store_register): New usrregs_info
3974 parameter. Adjust to use it.
3975 (usr_fetch_inferior_registers, usr_store_inferior_registers): New
3976 parameter regs_info. Adjust to use it.
3977 (linux_fetch_registers): Get the current inferior's regs_info, and
3978 adjust to use it.
3979 (linux_store_registers): Ditto.
3980 [HAVE_LINUX_REGSETS] (initialize_regsets_info): New.
3981 (initialize_low): Don't initialize the target_regsets here. Call
3982 initialize_low_arch.
3983 * linux-low.h (target_regsets): Delete declaration.
3984 (struct regsets_info): New.
3985 (struct usrregs_info): New.
3986 (struct regs_info): New.
3987 (struct process_info_private) <new_inferior>: New field.
3988 (struct linux_target_ops): Delete the num_regs, regmap, and
3989 regset_bitmap fields. New field regs_info.
3990 [HAVE_LINUX_REGSETS] (initialize_regsets_info): Declare.
3991 * i387-fp.c (num_xmm_registers): Delete.
3992 (i387_cache_to_fsave, i387_fsave_to_cache): Adjust find_regno
3993 calls to new interface.
3994 (i387_cache_to_fxsave, i387_cache_to_xsave, i387_fxsave_to_cache)
3995 (i387_xsave_to_cache): Adjust find_regno calls to new interface.
3996 Infer the number of xmm registers from the regcache's target
3997 description.
3998 * i387-fp.h (num_xmm_registers): Delete.
3999 * inferiors.c (add_thread): Don't install the thread's regcache
4000 here.
4001 * proc-service.c (gregset_info): Fetch the current inferior's
4002 regs_info. Adjust to use it.
4003 * regcache.c: Include tdesc.h.
4004 (register_bytes, reg_defs, num_registers)
4005 (gdbserver_expedite_regs): Delete.
4006 (get_thread_regcache): If the thread doesn't have a regcache yet,
4007 create one, instead of aborting gdbserver.
4008 (regcache_invalidate_one): Rename to ...
4009 (regcache_invalidate_thread): ... this.
4010 (regcache_invalidate_one): New.
4011 (regcache_invalidate): Only invalidate registers of the current
4012 process.
4013 (init_register_cache): Add target_desc parameter, and use it.
4014 (new_register_cache): Ditto. Assert the target description has a
4015 non zero registers_size.
4016 (regcache_cpy): Add assertions. Adjust.
4017 (realloc_register_cache, set_register_cache): Delete.
4018 (registers_to_string, registers_from_string): Adjust.
4019 (find_register_by_name, find_regno, find_register_by_number)
4020 (register_cache_size): Add target_desc parameter, and use it.
4021 (free_register_cache_thread, free_register_cache_thread_one)
4022 (regcache_release, register_cache_size): New.
4023 (register_size): Add target_desc parameter, and use it.
4024 (register_data, supply_register, supply_register_zeroed)
4025 (supply_regblock, supply_register_by_name, collect_register)
4026 (collect_register_as_string, collect_register_by_name): Adjust.
4027 * regcache.h (struct target_desc): Forward declare.
4028 (struct regcache) <tdesc>: New field.
4029 (init_register_cache, new_register_cache): Add target_desc
4030 parameter.
4031 (regcache_invalidate_thread): Declare.
4032 (regcache_invalidate_one): Delete declaration.
4033 (regcache_release): Declare.
4034 (find_register_by_number, register_cache_size, register_size)
4035 (find_regno): Add target_desc parameter.
4036 (gdbserver_expedite_regs, gdbserver_xmltarget): Delete
4037 declarations.
4038 * remote-utils.c: Include tdesc.h.
4039 (outreg, prepare_resume_reply): Adjust.
4040 * server.c: Include tdesc.h.
4041 (gdbserver_xmltarget): Delete declaration.
4042 (get_features_xml, process_serial_event): Adjust.
4043 * server.h [IN_PROCESS_AGENT] (struct target_desc): Forward
4044 declare.
4045 (struct process_info) <tdesc>: New field.
4046 (ipa_tdesc): Declare.
4047 * tdesc.c: New file.
4048 * tdesc.h: New file.
4049 * tracepoint.c: Include tdesc.h.
4050 [IN_PROCESS_AGENT] (ipa_tdesc): Define.
4051 (get_context_regcache): Adjust to pass ipa_tdesc down.
4052 (do_action_at_tracepoint): Adjust to get the register cache size
4053 from the context regcache's description.
4054 (traceframe_walk_blocks): Adjust to get the register cache size
4055 from the current trace frame's description.
4056 (traceframe_get_pc): Adjust to get current trace frame's
4057 description and pass it down.
4058 (gdb_collect): Adjust to get the register cache size from the
4059 IPA's description.
4060 * linux-amd64-ipa.c (tdesc_amd64_linux): Declare.
4061 (gdbserver_xmltarget): Delete.
4062 (initialize_low_tracepoint): Set the ipa's target description.
4063 * linux-i386-ipa.c (tdesc_i386_linux): Declare.
4064 (initialize_low_tracepoint): Set the ipa's target description.
4065 * linux-x86-low.c: Include tdesc.h.
4066 [__x86_64__] (is_64bit_tdesc): New.
4067 (ps_get_thread_area, x86_get_thread_area): Use it.
4068 (i386_cannot_store_register): Rename to ...
4069 (x86_cannot_store_register): ... this. Use is_64bit_tdesc.
4070 (i386_cannot_fetch_register): Rename to ...
4071 (x86_cannot_fetch_register): ... this. Use is_64bit_tdesc.
4072 (x86_fill_gregset, x86_store_gregset): Adjust register_size calls
4073 to new interface.
4074 (target_regsets): Rename to ...
4075 (x86_regsets): ... this.
4076 (x86_get_pc, x86_set_pc): Adjust register_size calls to new
4077 interface.
4078 (x86_siginfo_fixup): Use is_64bit_tdesc.
4079 [__x86_64__] (tdesc_amd64_linux, tdesc_amd64_avx_linux)
4080 (tdesc_x32_avx_linux, tdesc_x32_linux)
4081 (tdesc_i386_linux, tdesc_i386_mmx_linux, tdesc_i386_avx_linux):
4082 Declare.
4083 (x86_linux_update_xmltarget): Delete.
4084 (I386_LINUX_XSAVE_XCR0_OFFSET): Define.
4085 (have_ptrace_getfpxregs, have_ptrace_getregset): New.
4086 (AMD64_LINUX_USER64_CS): New.
4087 (x86_linux_read_description): New, based on
4088 x86_linux_update_xmltarget.
4089 (same_process_callback): New.
4090 (x86_arch_setup_process_callback): New.
4091 (x86_linux_update_xmltarget): New.
4092 (x86_regsets_info): New.
4093 (amd64_linux_regs_info): New.
4094 (i386_linux_usrregs_info): New.
4095 (i386_linux_regs_info): New.
4096 (x86_linux_regs_info): New.
4097 (x86_arch_setup): Reimplement.
4098 (x86_install_fast_tracepoint_jump_pad): Use is_64bit_tdesc.
4099 (x86_emit_ops): Ditto.
4100 (the_low_target): Adjust. Install x86_linux_regs_info,
4101 x86_cannot_fetch_register, and x86_cannot_store_register.
4102 (initialize_low_arch): New.
4103 * linux-ia64-low.c (tdesc_ia64): Declare.
4104 (ia64_fetch_register): Adjust.
4105 (ia64_usrregs_info, regs_info): New globals.
4106 (ia64_regs_info): New function.
4107 (the_low_target): Adjust.
4108 (initialize_low_arch): New function.
4109 * linux-sparc-low.c (tdesc_sparc64): Declare.
4110 (sparc_fill_gregset_to_stack, sparc_store_gregset_from_stack):
4111 Adjust.
4112 (sparc_arch_setup): New function.
4113 (sparc_regsets_info, sparc_usrregs_info, regs_info): New globals.
4114 (the_low_target): Adjust.
4115 (initialize_low_arch): New function.
4116 * linux-ppc-low.c (tdesc_powerpc_32l, tdesc_powerpc_altivec32l)
4117 (tdesc_powerpc_cell32l, tdesc_powerpc_vsx32l)
4118 (tdesc_powerpc_isa205_32l, tdesc_powerpc_isa205_altivec32l)
4119 (tdesc_powerpc_isa205_vsx32l, tdesc_powerpc_e500l)
4120 (tdesc_powerpc_64l, tdesc_powerpc_altivec64l)
4121 (tdesc_powerpc_cell64l, tdesc_powerpc_vsx64l)
4122 (tdesc_powerpc_isa205_64l, tdesc_powerpc_isa205_altivec64l)
4123 (tdesc_powerpc_isa205_vsx64l): Declare.
4124 (ppc_cannot_store_register, ppc_collect_ptrace_register)
4125 (ppc_supply_ptrace_register, parse_spufs_run, ppc_get_pc)
4126 (ppc_set_pc, ppc_get_hwcap): Adjust.
4127 (ppc_usrregs_info): Forward declare.
4128 (!__powerpc64__) ppc_regmap_adjusted: New global.
4129 (ppc_arch_setup): Adjust to the current process'es target
4130 description.
4131 (ppc_fill_vsxregset, ppc_store_vsxregset, ppc_fill_vrregset)
4132 (ppc_store_vrregset, ppc_fill_evrregset, ppc_store_evrregse)
4133 (ppc_store_evrregset): Adjust.
4134 (target_regsets): Rename to ...
4135 (ppc_regsets): ... this, and make static.
4136 (ppc_usrregs_info, ppc_regsets_info, regs_info): New globals.
4137 (ppc_regs_info): New function.
4138 (the_low_target): Adjust.
4139 (initialize_low_arch): New function.
4140 * linux-s390-low.c (tdesc_s390_linux32, tdesc_s390_linux32v1)
4141 (tdesc_s390_linux32v2, tdesc_s390_linux64, tdesc_s390_linux64v1)
4142 (tdesc_s390_linux64v2, tdesc_s390x_linux64, tdesc_s390x_linux64v1)
4143 (tdesc_s390x_linux64v2): Declare.
4144 (s390_collect_ptrace_register, s390_supply_ptrace_register)
4145 (s390_fill_gregset, s390_store_last_break): Adjust.
4146 (target_regsets): Rename to ...
4147 (s390_regsets): ... this, and make static.
4148 (s390_get_pc, s390_set_pc): Adjust.
4149 (s390_get_hwcap): New target_desc parameter, and use it.
4150 [__s390x__] (have_hwcap_s390_high_gprs): New global.
4151 (s390_arch_setup): Adjust to set the current process'es target
4152 description. Don't adjust the regmap.
4153 (s390_usrregs_info, s390_regsets_info, regs_info): New globals.
4154 [__s390x__] (s390_usrregs_info_3264, s390_regsets_info_3264)
4155 (regs_info_3264): New globals.
4156 (s390_regs_info): New function.
4157 (the_low_target): Adjust.
4158 (initialize_low_arch): New function.
4159 * linux-mips-low.c (tdesc_mips_linux, tdesc_mips_dsp_linux)
4160 (tdesc_mips64_linux, tdesc_mips64_dsp_linux): Declare.
4161 [__mips64] (init_registers_mips_linux)
4162 (init_registers_mips_dsp_linux): Delete defines.
4163 [__mips64] (tdesc_mips_linux, tdesc_mips_dsp_linux): New defines.
4164 (have_dsp): New global.
4165 (mips_read_description): New, based on mips_arch_setup.
4166 (mips_arch_setup): Reimplement.
4167 (get_usrregs_info): New function.
4168 (mips_cannot_fetch_register, mips_cannot_store_register)
4169 (mips_get_pc, mips_set_pc, mips_fill_gregset, mips_store_gregset)
4170 (mips_fill_fpregset, mips_store_fpregset): Adjust.
4171 (target_regsets): Rename to ...
4172 (mips_regsets): ... this, and make static.
4173 (mips_regsets_info, mips_dsp_usrregs_info, mips_usrregs_info)
4174 (dsp_regs_info, regs_info): New globals.
4175 (mips_regs_info): New function.
4176 (the_low_target): Adjust.
4177 (initialize_low_arch): New function.
4178 * linux-arm-low.c (tdesc_arm, tdesc_arm_with_iwmmxt)
4179 (tdesc_arm_with_vfpv2, tdesc_arm_with_vfpv3, tdesc_arm_with_neon):
4180 Declare.
4181 (arm_fill_vfpregset, arm_store_vfpregset): Adjust.
4182 (arm_read_description): New, with bits factored from
4183 arm_arch_setup.
4184 (arm_arch_setup): Reimplement.
4185 (target_regsets): Rename to ...
4186 (arm_regsets): ... this, and make static.
4187 (arm_regsets_info, arm_usrregs_info, regs_info): New globals.
4188 (arm_regs_info): New function.
4189 (the_low_target): Adjust.
4190 (initialize_low_arch): New function.
4191 * linux-m68k-low.c (tdesc_m68k): Declare.
4192 (target_regsets): Rename to ...
4193 (m68k_regsets): ... this, and make static.
4194 (m68k_regsets_info, m68k_usrregs_info, regs_info): New globals.
4195 (m68k_regs_info): New function.
4196 (m68k_arch_setup): New function.
4197 (the_low_target): Adjust.
4198 (initialize_low_arch): New function.
4199 * linux-sh-low.c (tdesc_sharch): Declare.
4200 (target_regsets): Rename to ...
4201 (sh_regsets): ... this, and make static.
4202 (sh_regsets_info, sh_usrregs_info, regs_info): New globals.
4203 (sh_regs_info, sh_arch_setup): New functions.
4204 (the_low_target): Adjust.
4205 (initialize_low_arch): New function.
4206 * linux-bfin-low.c (tdesc_bfin): Declare.
4207 (bfin_arch_setup): New function.
4208 (bfin_usrregs_info, regs_info): New globals.
4209 (bfin_regs_info): New function.
4210 (the_low_target): Adjust.
4211 (initialize_low_arch): New function.
4212 * linux-cris-low.c (tdesc_cris): Declare.
4213 (cris_arch_setup): New function.
4214 (cris_usrregs_info, regs_info): New globals.
4215 (cris_regs_info): New function.
4216 (the_low_target): Adjust.
4217 (initialize_low_arch): New function.
4218 * linux-cris-low.c (tdesc_crisv32): Declare.
4219 (cris_arch_setup): New function.
4220 (cris_regsets_info, cris_usrregs_info, regs_info): New globals.
4221 (cris_regs_info): New function.
4222 (the_low_target): Adjust.
4223 (initialize_low_arch): New function.
4224 * linux-m32r-low.c (tdesc_m32r): Declare.
4225 (m32r_arch_setup): New function.
4226 (m32r_usrregs_info, regs_info): New globals.
4227 (m32r_regs_info): Adjust.
4228 (initialize_low_arch): New function.
4229 * linux-tic6x-low.c (tdesc_tic6x_c64xp_linux)
4230 (tdesc_tic6x_c64x_linux, tdesc_tic6x_c62x_linux): Declare.
4231 (tic6x_usrregs_info): Forward declare.
4232 (tic6x_read_description): New function, based on ...
4233 (tic6x_arch_setup): ... this. Reimplement.
4234 (target_regsets): Rename to ...
4235 (tic6x_regsets): ... this, and make static.
4236 (tic6x_regsets_info, tic6x_usrregs_info, regs_info): New globals.
4237 (tic6x_regs_info): New function.
4238 (the_low_target): Adjust.
4239 (initialize_low_arch): New function.
4240 * linux-xtensa-low.c (tdesc_xtensa): Declare.
4241 (xtensa_fill_gregset, xtensa_store_gregset): Adjust.
4242 (target_regsets): Rename to ...
4243 (xtensa_regsets): ... this, and make static.
4244 (xtensa_regsets_info, xtensa_usrregs_info, regs_info): New
4245 globals.
4246 (xtensa_arch_setup, xtensa_regs_info): New functions.
4247 (the_low_target): Adjust.
4248 (initialize_low_arch): New function.
4249 * linux-nios2-low.c (tdesc_nios2_linux): Declare.
4250 (nios2_arch_setup): Set the current process'es tdesc.
4251 (target_regsets): Rename to ...
4252 (nios2_regsets): ... this.
4253 (nios2_regsets_info, nios2_usrregs_info, regs_info): New globals.
4254 (nios2_regs_info): New function.
4255 (the_low_target): Adjust.
4256 (initialize_low_arch): New function.
4257 * linux-aarch64-low.c (tdesc_aarch64): Declare.
4258 (aarch64_arch_setup): Set the current process'es tdesc.
4259 (target_regsets): Rename to ...
4260 (aarch64_regsets): ... this.
4261 (aarch64_regsets_info, aarch64_usrregs_info, regs_info): New globals.
4262 (aarch64_regs_info): New function.
4263 (the_low_target): Adjust.
4264 (initialize_low_arch): New function.
4265 * linux-tile-low.c (tdesc_tilegx, tdesc_tilegx32): Declare
4266 globals.
4267 (target_regsets): Rename to ...
4268 (tile_regsets): ... this.
4269 (tile_regsets_info, tile_usrregs_info, regs_info): New globals.
4270 (tile_regs_info): New function.
4271 (tile_arch_setup): Set the current process'es tdesc.
4272 (the_low_target): Adjust.
4273 (initialize_low_arch): New function.
4274 * spu-low.c (tdesc_spu): Declare.
4275 (spu_create_inferior, spu_attach): Set the new process'es tdesc.
4276 * win32-arm-low.c (tdesc_arm): Declare.
4277 (arm_arch_setup): New function.
4278 (the_low_target): Install arm_arch_setup instead of
4279 init_registers_arm.
4280 * win32-i386-low.c (tdesc_i386, tdesc_amd64): Declare.
4281 (init_windows_x86): Rename to ...
4282 (i386_arch_setup): ... this. Set `win32_tdesc'.
4283 (the_low_target): Adjust.
4284 * win32-low.c (win32_tdesc): New global.
4285 (child_add_thread): Don't create the thread cache here.
4286 (do_initial_child_stuff): Set the new process'es tdesc.
4287 * win32-low.h (struct target_desc): Forward declare.
4288 (win32_tdesc): Declare.
4289 * lynx-i386-low.c (tdesc_i386): Declare global.
4290 (lynx_i386_arch_setup): Set `lynx_tdesc'.
4291 * lynx-low.c (lynx_tdesc): New global.
4292 (lynx_add_process): Set the new process'es tdesc.
4293 * lynx-low.h (struct target_desc): Forward declare.
4294 (lynx_tdesc): Declare global.
4295 * lynx-ppc-low.c (tdesc_powerpc_32): Declare global.
4296 (lynx_ppc_arch_setup): Set `lynx_tdesc'.
4297 * nto-low.c (nto_tdesc): New global.
4298 (do_attach): Set the new process'es tdesc.
4299 * nto-low.h (struct target_desc): Forward declare.
4300 (nto_tdesc): Declare.
4301 * nto-x86-low.c (tdesc_i386): Declare.
4302 (nto_x86_arch_setup): Set `nto_tdesc'.
4303
4304 2013-06-04 Gary Benson <gbenson@redhat.com>
4305
4306 * server.c (handle_query): Add "augmented-libraries-svr4-read+"
4307 to qSupported response when appropriate.
4308 (handle_qxfer_libraries_svr4): Allow qXfer:libraries-svr4:read
4309 with nonzero-length annex.
4310 * linux-low.c (linux_qxfer_libraries_svr4): Parse and handle
4311 arguments supplied in annex.
4312
4313 2013-05-31 Doug Evans <dje@google.com>
4314
4315 PR server/15594
4316 * linux-x86-low.c (ps_get_thread_area): Properly extend address to
4317 64 bits in 64-cross-32 environment.
4318
4319 2013-05-28 Pedro Alves <palves@redhat.com>
4320
4321 * Makefile.in (clean): Remove reference to aarch64-without-fpu.c.
4322 (aarch64-without-fpu.c): Delete rule.
4323 * configure.srv (aarch64*-*-linux*): Remove references to
4324 aarch64-without-fpu.o and aarch64-without-fpu.xml.
4325 * linux-aarch64-low.c (init_registers_aarch64_without_fpu): Remove
4326 declaration.
4327
4328 2013-05-24 Pedro Alves <palves@redhat.com>
4329
4330 * server.c (handle_v_cont) <vCont;r>: Use unpack_varlen_hex
4331 instead of strchr/decode_address. Error if the range isn't split
4332 with a ','. Don't assume there's be a ':' in the action.
4333
4334 2013-05-23 Yao Qi <yao@codesourcery.com>
4335 Pedro Alves <palves@redhat.com>
4336
4337 * linux-low.c (lwp_in_step_range): New function.
4338 (linux_wait_1): If the thread was range stepping and stopped
4339 outside the stepping range, report the stop to GDB. Otherwise,
4340 continue stepping. Add range stepping debug output.
4341 (linux_set_resume_request): Copy the step range from the resume
4342 request to the lwp.
4343 (linux_supports_range_stepping): New.
4344 (linux_target_ops) <supports_range_stepping>: Set to
4345 linux_supports_range_stepping.
4346 * linux-low.h (struct linux_target_ops)
4347 <supports_range_stepping>: New field.
4348 (struct lwp_info) <step_range_start, step_range_end>: New fields.
4349 * linux-x86-low.c (x86_supports_range_stepping): New.
4350 (the_low_target) <supports_range_stepping>: Set to
4351 x86_supports_range_stepping.
4352 * server.c (handle_v_cont): Handle 'r' action.
4353 (handle_v_requests): Append ";r" if the target supports range
4354 stepping.
4355 * target.h (struct thread_resume) <step_range_start,
4356 step_range_end>: New fields.
4357 (struct target_ops) <supports_range_stepping>:
4358 New field.
4359 (target_supports_range_stepping): New macro.
4360
4361 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4362
4363 * lynx-low.c (lynx_resume): Fix null_ptid/minus_one_ptid
4364 confusion in comment.
4365
4366 2013-05-17 Joel Brobecker <brobecker@adacore.com>
4367
4368 * lynx-low.c (struct process_info_private): New type.
4369 (lynx_add_process): New function.
4370 (lynx_create_inferior, lynx_attach): Replace calls to
4371 add_process by calls to lynx_add_process.
4372 (lynx_resume): If PTID is null, then try using
4373 current_process()->private->last_wait_event_ptid.
4374 Add comments.
4375 (lynx_clear_inferiors): Delete. The contents of that function
4376 has been inlined in lynx_mourn;
4377 (lynx_wait_1): Save the ptid in the process's private data.
4378 (lynx_mourn): Free the process' private data. Replace call
4379 to lynx_clear_inferiors by call to clear_inferiors.
4380
4381 2013-05-17 Yao Qi <yao@codesourcery.com>
4382
4383 * i386-low.c (i386_length_and_rw_bits): Move the comment to
4384 the right place.
4385
4386 2013-05-16 Luis Machado <lgustavo@codesourcery.com>
4387
4388 * linux-low.c: Move definition checks upwards for PT_TEXT_ADDR,
4389 PT_DATA_ADDR and PT_TEXT_END_ADDR. Update comments.
4390 (linux_read_offsets): Remove PT_TEXT_ADDR, PT_DATA_ADDR and
4391 PT_TEXT_END_ADDR guards. Update comments.
4392 (linux_target_op) <read_offsets>: Conditionally define to
4393 linux_read_offsets if the target is UCLIBC and if it defines
4394 PT_TEXT_ADDR, PT_DATA_ADDR and PT_TEXT_END_ADDR.
4395
4396 2013-05-06 Sandra Loosemore <sandra@codesourcery.com>
4397 Andrew Jenner <andrew@codesourcery.com>
4398
4399 * Makefile.in (SFILES): Add linux-nios2-low.c.
4400 (clean): Add action to delete nios2-linux.c.
4401 (nios2-linux.c): New rule.
4402 * configure.srv: Add nios2*-*-linux*.
4403 * linux-nios2-low.c: New.
4404
4405 2013-05-03 Hafiz Abid Qadeer <abidh@codesourcery.com>
4406
4407 * tracepoint.c (cmd_qtinit): Call 'stop_tracing'.
4408
4409 2013-04-25 Hui Zhu <hui@codesourcery.com>
4410
4411 PR gdb/15186
4412 * ax.c (ax_printf): Add fflush.
4413
4414 2013-04-22 Tom Tromey <tromey@redhat.com>
4415
4416 * Makefile.in (SFILES): Add filestuff.c.
4417 (OBS): Add filestuff.o.
4418 (filestuff.o): New target.
4419 * config.in, configure: Rebuild.
4420 * configure.ac: Check for fdwalk, pipe2.
4421
4422 2013-04-17 Pedro Alves <palves@redhat.com>
4423
4424 * configure.ac (USE_THREAD_DB): Delete variable.
4425 (if test "$srv_linux_thread_db" = "yes"): AC_DEFINE USE_THREAD_DB.
4426 Don't AC_SUBST USE_THREAD_DB.
4427 * Makefile.in (INTERNAL_CFLAGS): Remove @USE_THREAD_DB@.
4428 * config.in, configure: Regenerate.
4429
4430 2013-04-16 Pedro Alves <palves@redhat.com>
4431
4432 * linux-low.h (struct lwp_info) <thread_known>: Move under
4433 the USE_THREAD_DB #ifdef.
4434
4435 2013-04-16 Pedro Alves <palves@redhat.com>
4436
4437 * Makefile.in (INTERNAL_CFLAGS): Add @USE_THREAD_DB@.
4438 (linux-low.o): Delete rule.
4439 * linux-low.h: Always include "gdb_thread_db.h" instead of
4440 conditionally including thread_db.h.
4441 (struct lwp_info) <th>: Guard with #ifdef USE_THREAD_DB instead of
4442 HAVE_THREAD_DB_H.
4443
4444 2013-04-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4445
4446 * Makefile.in (install-only): Fix make install regression.
4447
4448 2013-04-05 Jan Kratochvil <jan.kratochvil@redhat.com>
4449
4450 Convert man pages to texinfo, new gdbinit.5 texinfo page.
4451 * Makefile.in (install-only): Remove $(man1dir) and gdbserver.1
4452 installation.
4453 * gdbserver.1: Remove.
4454
4455 2013-03-22 Pedro Alves <palves@redhat.com>
4456
4457 * linux-low.c (handle_extended_wait): Don't call
4458 linux_enable_event_reporting.
4459
4460 2013-03-15 Tony Theodore <tonyt@logyst.com>
4461
4462 PR build/9098:
4463 * Makefile.in (SHELL): Use @SHELL@.
4464
4465 2013-03-14 Sergio Durigan Junior <sergiodj@redhat.com>
4466
4467 * tracepoint.c (cmd_qtv): Initialize `val' with zero, silencing
4468 compiler warning.
4469
4470 2013-03-13 Joel Brobecker <brobecker@adacore.com>
4471
4472 * linux-low.c (linux_target_ops) [!HAVE_LINUX_BTRACE]:
4473 Remove extraneous NULL element.
4474
4475 2013-03-13 Yao Qi <yao@codesourcery.com>
4476
4477 * tracepoint.c (traceframe_read_tsv): Look for the last matched
4478 'V' block in trace frame.
4479
4480 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4481
4482 * target.h (struct target_ops): Add btrace ops.
4483 (target_supports_btrace): New macro.
4484 (target_enable_btrace): New macro.
4485 (target_disable_btrace): New macro.
4486 (target_read_btrace): New macro.
4487 * gdbthread.h (struct thread_info): Add btrace field.
4488 * server.c: Include btrace-common.h.
4489 (handle_btrace_general_set): New function.
4490 (handle_btrace_enable): New function.
4491 (handle_btrace_disable): New function.
4492 (handle_general_set): Call handle_btrace_general_set.
4493 (handle_qxfer_btrace): New function.
4494 (struct qxfer qxfer_packets[]): Add btrace entry.
4495 * inferiors.c (remove_thread): Disable btrace.
4496 * linux-low: Include linux-btrace.h.
4497 (linux_low_enable_btrace): New function.
4498 (linux_low_read_btrace): New function.
4499 (linux_target_ops): Add btrace ops.
4500 * configure.srv (i[34567]86-*-linux*): Add linux-btrace.o.
4501 Add srv_linux_btrace=yes.
4502 (x86_64-*-linux*): Add linux-btrace.o.
4503 Add srv_linux_btrace=yes.
4504 * configure.ac: Define HAVE_LINUX_BTRACE.
4505 * config.in: Regenerated.
4506 * configure: Regenerated.
4507
4508 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4509
4510 * server.c (handle_qxfer): Preserve error message if -3 is
4511 returned.
4512 (qxfer): Document the -3 return value.
4513
4514 2013-03-11 Markus Metzger <markus.t.metzger@intel.com>
4515
4516 * Makefile.in (SFILES): Add $(srcdir)/common/linux-btrace.c.
4517 (linux_btrace_h): New variable.
4518 (linux-btrace.o): New rule.
4519
4520 2013-03-08 Stan Shebs <stan@codesourcery.com>
4521 Hafiz Abid Qadeer <abidh@codesourcery.com>
4522
4523 * tracepoint.c (trace_buffer_size): New global.
4524 (DEFAULT_TRACE_BUFFER_SIZE): New define.
4525 (init_trace_buffer): Change to one-argument function. Allocate
4526 trace buffer memory.
4527 (handle_tracepoint_general_set): Call cmd_bigqtbuffer_size to
4528 handle QTBuffer:size packet.
4529 (cmd_bigqtbuffer_size): New function.
4530 (initialize_tracepoint): Call init_trace_buffer with
4531 DEFAULT_TRACE_BUFFER_SIZE.
4532 * server.c (handle_query): Add QTBuffer:size in the
4533 supported packets.
4534
4535 2013-03-07 Yao Qi <yao@codesourcery.com>
4536
4537 * tracepoint.c (cur_action, cur_step_action): Make them unsigned.
4538 (cmd_qtfp): Initialize cur_action and cur_step_action 0 instead
4539 of -1.
4540 (cmd_qtsp): Adjust condition. Do post increment.
4541 Set cur_action and cur_step_action back to 0.
4542
4543 2013-03-07 Jeremy Bennett <jeremy.bennett@embecosm.com>
4544
4545 PR server/15236
4546 * linux-low.c (linux_write_memory): Return early success if LEN is
4547 zero.
4548
4549 2013-03-05 Corinna Vinschen <vinschen@redhat.de>
4550
4551 * configure.srv: Add x86_64-*-cygwin* as target.
4552
4553 2013-02-28 Tom Tromey <tromey@redhat.com>
4554
4555 * configure.ac: Invoke AC_SYS_LARGEFILE.
4556 * configure, config.in: Rebuild.
4557
4558 2013-02-28 Corinna Vinschen <vinschen@redhat.com>
4559
4560 * win32-low.c: Throughout, fix format strings and casts of
4561 printf-like functions to avoid type related warnings on all
4562 platforms.
4563 (get_child_debug_event): Print dwDebugEventCode as hex since
4564 that's how it's usually documented.
4565
4566 2013-02-28 Yao Qi <yao@codesourcery.com>
4567
4568 * tracepoint.c (cmd_qtbuffer): Call phex_nz instead of
4569 pulongest.
4570
4571 2013-02-27 Jiong Wang <jiwang@tilera.com>
4572
4573 * Makefile.in (clean): Remove reg-tilegx.c, reg-tilegx32.c.
4574 (reg-tilegx32.c): New rule.
4575 * configure.srv (tilegx-*-linux*): Add reg-tilegx32.o to srv_regobj.
4576 * linux-tile-low.c (tile_arch_setup): New function. Invoke
4577 different register info initializer according to elf class.
4578 (init_registers_tilgx32): New function. The tilegx32 register info
4579 initializer.
4580 (tile_fill_gregset): Use "uint_reg_t" to represent register size.
4581 (tile_store_gregset): Likewise.
4582
4583 2013-02-27 Yao Qi <yao@codesourcery.com>
4584
4585 * server.c (process_point_options): Print debug message when
4586 debug_threads is true.
4587
4588 2013-02-26 Yao Qi <yao@codesourcery.com>
4589
4590 * tracepoint.c (cmd_qtbuffer): Don't set '\0' in OWN_BUF.
4591
4592 2013-02-19 Pedro Alves <palves@redhat.com>
4593 Kai Tietz <ktietz@redhat.com>
4594
4595 PR gdb/15161
4596
4597 * server.c (handle_query) <CRC check>: Use unpack_varlen_hex
4598 instead of strtoul to extract address from packet.
4599 (process_serial_event) <'z'>: Likewise.
4600
4601 2013-02-18 Yao Qi <yao@codesourcery.com>
4602
4603 * linux-bfin-low.c (the_low_target): Use NULL instead of 0.
4604
4605 2013-02-14 Pedro Alves <palves@redhat.com>
4606
4607 Plug memory leak.
4608
4609 * tracepoint.c (cmd_qtnotes): Free TRACING_USER_NAME,
4610 TRACING_NOTES and TRACING_STOP_NOTE before clobbering.
4611
4612 2013-02-14 Pedro Alves <palves@redhat.com>
4613
4614 * tracepoint.c (cmd_qtdpsrc): Use savestring.
4615
4616 2013-02-14 Pedro Alves <palves@redhat.com>
4617
4618 * tracepoint.c (save_string): Delete.
4619 (add_tracepoint_action): Use savestring instead of save_string.
4620
4621 2013-02-12 Pedro Alves <palves@redhat.com>
4622
4623 * linux-xtensa-low.c: Ditto.
4624 * xtensa-xtregs.c: Ditto.
4625
4626 2013-02-12 Sanimir Agovic <sanimir.agovic@intel.com>
4627
4628 * thread-db.c (thread_db_get_tls_address): NULL pointer check
4629 thread_db.
4630
4631 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4632
4633 * linux-aarch64-low.c (aarch64_arch_setup): Clamp
4634 aarch64_num_wp_regs and aarch64_num_bp_regs to
4635 AARCH64_HWP_MAX_NUM and AARCH64_HBP_MAX_NUM respectively.
4636
4637 2013-02-07 Marcus Shawcroft <marcus.shawcroft@arm.com>
4638
4639 * linux-aarch64-low.c (ps_get_thread_area): Replace
4640 PTRACE_GET_THREAD_AREA with PTRACE_GETREGSET.
4641
4642 2013-02-04 Jim MacArthur <jim.macarthur@arm.com>
4643 Marcus Shawcroft <marcus.shawcroft@arm.com>
4644 Nigel Stephens <nigel.stephens@arm.com>
4645 Yufeng Zhang <yufeng.zhang@arm.com>
4646
4647 * Makefile.in (clean): Remove aarch64.c and aarch64-without-fpu.c.
4648 (aarch64.c, aarch64-without-fpu.c): New targets.
4649 * configure.srv (aarch64*-*-linux*): New.
4650 * linux-aarch64-low.c: New file.
4651
4652 2013-02-04 Marcus Shawcroft <marcus.shawcroft@arm.com>
4653
4654 * linux-low.c (handle_extended_wait, linux_create_inferior)
4655 (linux_attach_lwp_1, linux_kill_one_lwp, linux_attach_one_lwp)
4656 (dequeue_one_deferred_signal, linux_resume_one_thread)
4657 (fetch_register, linux_write_memory, linux_enable_event_reporting)
4658 (linux_tracefork_grandchild, linux_test_for_tracefork)
4659 (linux_read_offsets, linux_xfer_siginfo, linux_xfer_siginfo): Add
4660 PTRACE_ARG3_TYPE and PTRACE_ARG4_TYPE cast to ptrace arguments
4661 where the argument is 0.
4662
4663 2013-01-25 Yao Qi <yao@codesourcery.com>
4664
4665 * event-loop.c: Include "queue.h".
4666 (gdb_event_p): New typedef.
4667 (struct gdb_event) <next_event>: Remove.
4668 (event_queue): Change to QUEUE(gdb_event_p).
4669 (async_queue_event): Remove.
4670 (gdb_event_xfree): New.
4671 (initialize_event_loop): New.
4672 (process_event): Use API from QUEUE.
4673 (wait_for_event): Likewise.
4674 * server.c (main): Call initialize_event_loop.
4675 * server.h (initialize_event_loop): Declare.
4676
4677 2013-01-18 Yao Qi <yao@codesourcery.com>
4678
4679 * ax.h (struct eval_agent_expr_context): New.
4680 (gdb_eval_agent_expr): Update declaration.
4681 * ax.c (gdb_eval_agent_expr): Remove argument REGCACHE and
4682 TFRAME. Add new argument CTX.
4683 * server.h (struct eval_agent_expr_context): Declare.
4684 (agent_mem_read, agent_tsv_read): Update declaration.
4685 (agent_mem_read_string): Likewise.
4686 * tracepoint.c (eval_tracepoint_agent_expr): Remove.
4687 (add_traceframe_block): Add new argument TPOINT.
4688 Increase TPOINT->traceframe_usage.
4689 (do_action_at_tracepoint): Call gdb_eval_agent_expr instead of
4690 eval_tracepoint_agent_expr.
4691 (condition_true_at_tracepoint): Likewise.
4692 (agent_mem_read): Remove argument TFRAME. Add argument CTX.
4693 (agent_mem_read_string, agent_tsv_read): Likewise.
4694
4695 2013-01-16 Yao Qi <yao@codesourcery.com>
4696
4697 * linux-low.c (linux_resume_one_lwp): Don't check
4698 'lwp->bp_reinsert != 0'.
4699
4700 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4701 Pedro Alves <palves@redhat.com>
4702
4703 * lynx-low.c (ptrace_request_to_str): Define a temporary
4704 macro and use it to simplify this function's implementation.
4705
4706 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4707
4708 * lynx-low.c (lynx_resume): Call perror_with_name if lynx_ptrace
4709 sets errno.
4710
4711 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4712
4713 * configure.srv (i[34567]86-*-lynxos*): Set srv_xmlfiles.
4714
4715 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4716
4717 * configure.srv (powerpc-*-lynxos*): Set srv_xmlfiles.
4718
4719 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4720
4721 * lynx-low.c (lynx_resume): Use the resume_info parameter
4722 to determine the ptid for the lynx_ptrace call, unless
4723 it is equal to minus_one_ptid, in which case we use the
4724 ptid of the current_inferior.
4725 (lynx_wait_1): After having received a thread create/exit
4726 event, resume the inferior's execution using the signaling
4727 thread's ptid, rather than the old ptid.
4728
4729 2013-01-07 Joel Brobecker <brobecker@adacore.com>
4730
4731 * lynx-low.c (lynx_resume): Delete variable ret.
4732
4733 2013-01-01 Joel Brobecker <brobecker@adacore.com>
4734
4735 * gdbreplay.c (gdbreplay_version): Update copyright year.
4736 * server.c (gdbserver_version): Likewise.
4737
4738 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4739
4740 * lynx-low.c (lynx_wait_1): Add debug trace before adding
4741 new thread.
4742
4743 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4744
4745 * lynx-low.c (ptrace_request_to_str): Add handling for
4746 PTRACE_GETTRACESIG.
4747
4748 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4749
4750 * lynx-low.c (lynx_attach): Delete variable new_process.
4751
4752 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4753
4754 * lynx-low.c (lynx_create_inferior): Delete variable
4755 new_process.
4756
4757 2012-12-17 Joel Brobecker <brobecker@adacore.com>
4758
4759 * lynx-low.c (ptrace_request_to_str): Do not handle
4760 PTRACE_GETTHREADLIST if this macro does not exist.
4761
4762 2012-12-15 Yao Qi <yao@codesourcery.com>
4763
4764 * Makefile.in (OBS): Add notif.o.
4765 * notif.c, notif.h: New.
4766 * server.c: Include "notif.h".
4767 (struct vstop_notif) <next>: Remove.
4768 <base>: New field.
4769 (queue_stop_reply): Update.
4770 (push_event, send_next_stop_reply): Remove.
4771 (discard_queued_stop_replies): Update.
4772 (notif_stop): New variable.
4773 (handle_v_stopped): Remove.
4774 (handle_v_requests): Don't call handle_v_stopped. Call
4775 handle_ack_notif instead.
4776 (queue_stop_reply_callback): Call notif_event_enque instead
4777 of queue_stop_reply.
4778 (handle_status): Don't call send_next_stop_reply, call
4779 notif_write_event instead.
4780 (kill_inferior_callback): Likewise.
4781 (detach_or_kill_inferior_callback): Likewise.
4782 (main): Call initialize_notif.
4783 (process_serial_event): Call QUEUE_is_empty.
4784 (handle_target_event): Call notif_push instead of push event.
4785 * server.h (push_event): Remove declaration.
4786
4787 2012-12-10 Tom Tromey <tromey@redhat.com>
4788
4789 * Makefile.in (DEPMODE, DEPDIR, depcomp, COMPILE.pre)
4790 (COMPILE.post, COMPILE, POSTCOMPILE, IPAGENT_COMPILE): New
4791 macros.
4792 (.c.o): Rewrite.
4793 (ax-ipa.o, tracepoint-ipa.o, utils-ipa.o, format-ipa.o)
4794 (common-utils-ipa.o, remote-utils-ipa.o, regcache-ipa.o)
4795 (i386-linux-ipa.o, linux-i386-ipa.o, linux-amd64-ipa.o)
4796 (amd64-linux-ipa.o, ax.o): Rewrite.
4797 (event-loop.o, hostio.o, hostio-errno.o, inferiors.o, mem-break.o)
4798 (proc-service.o, regcache.o, remote-utils.o, server.o, target.o)
4799 (thread-db.o, tracepoint.o, utils.o, gdbreplay.o, dll.o): Remove.
4800 (signals.o, linux-procfs.o, linux-ptrace.o, common-utils.o, vec.o)
4801 (gdb_vecs.o, xml-utils.o, linux-osdata.o, ptid.o, buffer.o)
4802 (format.o, agent.o, vasprintf.o, vsnprintf.o): Rewrite.
4803 (i386-low.o, i387-fp.o, linux-low.o, linux-arm-low.o)
4804 (linux-bfin-low.o, linux-cris-low.o, linux-crisv32-low.o)
4805 (linux-ia64-low.o, linux-m32r-low.o, linux-mips-low.o)
4806 (linux-ppc-low.o, linux-s390-low.o, linux-sh-low.o)
4807 (linux-tic6x-low.o, linux-x86-low.o, linux-xtensa-low.o)
4808 (linux-tile-low.o, lynx-low.o, lynx-ppc-low.o, nto-low.o)
4809 (nto-x86-low.o, linux-low.o, win32-low.o, win32-arm-low.o)
4810 (win32-i386-low.o, spu-low.o, reg-arm.o, arm-with-iwmmxt.o)
4811 (arm-with-vfpv2.o, arm-with-vfpv3.o, arm-with-neon.o, reg-bfin.o)
4812 (reg-cris.o, reg-crisv32.o, i386.o, i386-linux.o, i386-avx.o)
4813 (i386-avx-linux.o, i386-mmx.o, i386-mmx-linux.o, reg-ia64.o)
4814 (reg-m32r.o, reg-m68k.o, reg-cf.o, mips-linux.o, mips-dsp-linux.o)
4815 (mips64-linux.o, mips64-dsp-linux.o, powerpc-32.o, powerpc-32l.o)
4816 (powerpc-altivec32l.o, powerpc-cell32l.o, powerpc-vsx32l.o)
4817 (powerpc-isa205-32l.o, powerpc-isa205-altivec32l.o)
4818 (powerpc-isa205-vsx32l.o, powerpc-e500l.o, powerpc-64l.o)
4819 (powerpc-altivec64l.o, powerpc-cell64l.o, powerpc-vsx64l.o)
4820 (powerpc-isa205-64l.o, powerpc-isa205-altivec64l.o)
4821 (powerpc-isa205-vsx64l.o, s390-linux32.o, s390-linux32v1.o)
4822 (s390-linux32v2.o, s390-linux64.o, s390-linux64v1.o)
4823 (s390-linux64v2.o, s390x-linux64.o, s390x-linux64v1.o)
4824 (s390x-linux64v2.o, tic6x-c64xp-linux.o, tic6x-c64x-linux.o)
4825 (tic6x-c62x-linux.o, reg-sh.o, reg-sparc64.o, reg-spu.o, amd64.o)
4826 (amd64-linux.o, amd64-avx.o, amd64-avx-linux.o, x32.o)
4827 (x32-linux.o, x32-avx.o, x32-avx-linux.o, reg-xtensa.o)
4828 (reg-tilegx.o): Remove.
4829 (all_object_files): New macro.
4830 Include .deps files.
4831 * aclocal.m4, configure: Rebuild.
4832 * acinclude.m4: Include depstand.m4, lead-dot.m4.
4833 * configure.ac: Invoke ZW_CREATE_DEPDIR,
4834 ZW_PROG_COMPILER_DEPENDENCIES. Compute GMAKE condition.
4835
4836 2012-12-05 Tom Tromey <tromey@redhat.com>
4837
4838 PR gdb/14917:
4839 * server.h (current_insn_ptr, emit_error): Declare 'extern'.
4840
4841 2012-11-28 Markus Metzger <markus.t.metzger@intel.com>
4842
4843 * configure.ac: Check for linux/perf_event.h.
4844 * config.in: Regenerated.
4845 * configure: Regenerated.
4846
4847 2012-11-26 Maxime Villard <rustyBSD@gmx.fr>
4848
4849 * hostio.c (handle_readlink): Decrease buffer size
4850 parameter passed to readlink by one byte.
4851
4852 2012-11-26 Yao Qi <yao@codesourcery.com>
4853
4854 * configure.ac (build_warnings): Append '-Wempty-body'.
4855 * configure: Regenerated.
4856 * linux-low.c (linux_create_inferior): Use braces for empty 'if'
4857 body.
4858
4859 2012-11-15 Pierre Muller <muller@sourceware.org>
4860
4861 * configure.ac (AC_CHECK_HEADERS): Add wait.h header.
4862 * config.in: Regenerate.
4863 * configure: Regenerate.
4864 * linux-low.c: Use "gdb_stat.h" header instead of <sys/stat.h> header.
4865 Use "gdb_wait.h" header instead of <sys/wait.h> header.
4866 * lynx-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4867 * remote-utils.c: Use "gdb_stat.h" header instead of <sys/stat.h>
4868 header.
4869 * server.c: Remove HAVE_WAIT_H conditional. Use "gdb_wait.h" header
4870 instead of <sys/wait.h> header.
4871 * spu-low.c: Use "gdb_wait.h" header instead of <sys/wait.h> header.
4872
4873 2012-11-13 Markus Metzger <markus.t.metzger@intel.com>
4874
4875 * Makefile.in: (INTERNAL_CFLAGS): Add -DGDBSERVER
4876 (various make rules): Remove -DGDBSERVER
4877
4878 2012-11-09 Yao Qi <yao@codesourcery.com>
4879
4880 * spu-low.c (current_ptid): Move it to ..
4881 * gdbthread.h: ... here. New.
4882 * remote-utils.c (read_ptid): Use macro 'current_ptid'.
4883 * server.c (myresume, process_serial_event): Likewise.
4884 * thread-db.c (thread_db_find_new_threads): Likewise.
4885 * tracepoint.c (run_inferior_command): Likewise.
4886
4887 2012-10-01 Andrew Burgess <aburgess@broadcom.com>
4888
4889 * server.c (handle_search_memory_1): Include access length in
4890 warning message.
4891
4892 2012-09-05 Michael Brandt <michael.brandt@axis.com>
4893
4894 * linux-crisv32-low.c: Fix compile errors.
4895
4896 2012-09-04 Yao Qi <yao@codesourcery.com>
4897
4898 * tracepoint.c (cmd_qtsv): Adjust debug message.
4899 Don't check CUR_TPOINT.
4900
4901 2012-08-28 Yao Qi <yao@codesourcery.com>
4902
4903 * ax.c, tracepoint.c: Replace ATTR_FORMAT with ATTRIBUTE_PRINTF.
4904 * server.h: Include 'libiberty.h' and 'ansidecl.h'.
4905 (ATTR_NORETURN, ATTR_FORMAT, ATTR_MALLOC): Remove.
4906 Remove declarations of xmalloc, xreallloc, xstrdup and
4907 freeargv.
4908 * Makefile.in (libiberty_h): New.
4909 (server_h): Append dependencies 'libiberty.h' and 'ansidecl.h'.
4910 (linux-bfin-low.o): Append dependency 'libiberty.h'.
4911
4912 2012-08-23 Yao Qi <yao@codesourcery.com>
4913
4914 * server.h: Remove declaration of 'xsnprintf'.
4915
4916 2012-08-22 Keith Seitz <keiths@redhat.com>
4917
4918 * server.h: Include build-gnulib-gbserver/config.h.
4919 * gdbreplay.c: Likewise.
4920
4921 2012-08-08 Doug Evans <dje@google.com>
4922
4923 * Makefile.in (SFILES): Add gdb_vecs.c.
4924 (OBS): Add gdb_vecs.o.
4925 (gdb_vecs_h, host_defs_h): New variables.
4926 (thread-db.o): Add $(gdb_vecs_h) dependency.
4927 (gdb_vecs.o): New rule.
4928 * thread-db.c: #include "gdb_vecs.h".
4929 (thread_db_load_search): Use a vector to iterate over path elements.
4930 Handle text appearing after "$pdir".
4931
4932 * configure.ac: Add check for strstr.
4933 * config.in: Regenerate.
4934 * configure: Regenerate.
4935
4936 2012-08-02 Ulrich Weigand <ulrich.weigand@linaro.org>
4937
4938 * hostio.c (handle_pread): If pread fails, fall back to attempting
4939 lseek/read.
4940 (handle_pwrite): Likewise for pwrite.
4941
4942 2012-08-01 Ulrich Weigand <ulrich.weigand@linaro.org>
4943
4944 * linux-arm-low.c (arm_linux_hw_point_initialize): Distinguish
4945 between unsupported TYPE and unimplementable ADDR/LEN combination.
4946 (arm_insert_point): Act on new return value.
4947
4948 2012-07-31 Pedro Alves <palves@redhat.com>
4949
4950 * server.c (process_point_options): Only skip tokens if we find
4951 one that is unrecognized. Don't treat 'X' specially while
4952 skipping unrecognized tokens.
4953
4954 2012-07-30 Ulrich Weigand <ulrich.weigand@linaro.org>
4955
4956 * linux-arm-low.c (arm_linux_hw_point_initialize): Do not attempt
4957 to 4-byte-align HW breakpoint addresses for Thumb.
4958
4959 2012-07-27 Yao Qi <yao@codesourcery.com>
4960
4961 PR remote/14161.
4962
4963 * server.h: Declare gdb_agent_about_to_close.
4964 * target.c (kill_inferior): Include "agent.h".
4965 New. Send command 'kill'.
4966 * target.h (kill_inferior): Removed macro.
4967 * tracepoint.c (gdb_agent_about_to_close): New.
4968 (gdb_agent_helper_thread): Handle command 'close'.
4969 Wait endlessly until the inferior stops.
4970 Install gdb_agent_remove_socket to atexit hook.
4971 (agent_socket_name): New static variable.
4972 (gdb_agent_socket_init): Replace local variable 'name' with
4973 'agent_socket_name'.
4974 (gdb_agent_remove_socket): New.
4975
4976 2012-07-27 Yao Qi <yao@codesourcery.com>
4977
4978 * server.c (process_point_options): Stop at 'X' when parsing.
4979
4980 2012-07-19 Michael Eager <eager@eagercon.com>
4981
4982 * i386-low.c (Z_packet_to_hw_type): Add Z_PACKET_HW_BP, translate
4983 to hw_execute.
4984 * linux-x86-low.c (x86_insert_point, x86_remove_point):
4985 Call i386_low_insert_watchpoint, i386_low_remove_watchpoint to add/del
4986 hardware breakpoint.
4987
4988 2012-07-07 Jan Kratochvil <jan.kratochvil@redhat.com>
4989
4990 * gdbserver/linux-low.c (initialize_low): Call
4991 linux_ptrace_init_warnings.
4992
4993 2012-07-02 Doug Evans <dje@google.com>
4994
4995 * mem-break.c (gdb_no_commands_at_breakpoint): Fix cast from
4996 pointer to int.
4997
4998 2012-07-02 Stan Shebs <stan@codesourcery.com>
4999
5000 * Makefile.in (WARN_CFLAGS_NO_FORMAT): Define.
5001 (ax.o): Add it to build rule.
5002 (ax-ipa.o): Ditto.
5003 (OBS): Add format.o.
5004 (IPA_OBS): Add format.o.
5005 * server.c (handle_query): Claim support for breakpoint commands.
5006 (process_point_options): Add command case.
5007 (process_serial_event): Leave running if there are printfs in
5008 effect.
5009 * mem-break.h (any_persistent_commands): Declare.
5010 (add_breakpoint_commands): Declare.
5011 (gdb_no_commands_at_breakpoint): Declare.
5012 (run_breakpoint_commands): Declare.
5013 * mem-break.c (struct point_command_list): New struct.
5014 (struct breakpoint): New field command_list.
5015 (any_persistent_commands): New function.
5016 (add_commands_to_breakpoint): New function.
5017 (add_breakpoint_commands): New function.
5018 (gdb_no_commands_at_breakpoint): New function.
5019 (run_breakpoint_commands): New function.
5020 * linux-low.c (linux_wait_1): Test for and run breakpoint commands
5021 locally.
5022 * ax.c: Include format.h.
5023 (ax_printf): New function.
5024 (gdb_eval_agent_expr): Add printf opcode.
5025
5026 2012-06-13 Yao Qi <yao@codesourcery.com>
5027
5028 * server.c (start_inferior): Remove duplicated writes to fields
5029 'last_resume_kind' and 'last_status' of 'current_inferior'.
5030
5031 2012-06-12 Yao Qi <yao@codesourcery.com>
5032 Pedro Alves <palves@redhat.com>
5033
5034 * linux-low.c (linux_set_resume_request): Simplify predicate. Add
5035 comment.
5036 * server.c (handle_v_cont): Extend comment.
5037
5038 2012-06-11 Yao Qi <yao@codesourcery.com>
5039
5040 * linux-low.c (linux_attach): Add 'static'.
5041
5042 2012-06-06 Yao Qi <yao@codesourcery.com>
5043
5044 * ax.c (gdb_eval_agent_expr): Print `top' in hex.
5045
5046 2012-06-01 Jan Kratochvil <jan.kratochvil@redhat.com>
5047
5048 Fix gcc -flto compilation warning.
5049 * server.c (main): Make variable multi_mode and attach volatile.
5050
5051 2012-05-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5052
5053 * linux-low.c (get_r_debug): Disable code using DT_MIPS_RLD_MAP
5054 if the platform doesn't know about it.
5055
5056 2012-05-30 Jeff Kenton <jkenton@tilera.com>
5057
5058 * Makefile.in (SFILES): Add linux-tile-low.c.
5059 (linux-tile-low.o, reg-tilegx.o, reg-tilegx.c): New rules.
5060 * configure.srv: Handle tilegx-*-linux*.
5061 * linux-tile-low.c: New file.
5062
5063 2012-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
5064
5065 * linux-low.c (linux_qxfer_libraries_svr4): Return -1 if R_DEBUG is -1.
5066
5067 2012-05-24 Pedro Alves <palves@redhat.com>
5068
5069 PR gdb/7205
5070
5071 Replace TARGET_SIGNAL_ with GDB_SIGNAL_ throughout.
5072
5073 2012-05-24 Pedro Alves <palves@redhat.com>
5074
5075 PR gdb/7205
5076
5077 Replace target_signal with gdb_signal throughout.
5078
5079 2012-05-22 Maciej W. Rozycki <macro@codesourcery.com>
5080
5081 * linux-low.c (linux_store_registers): Avoid the copying sequence
5082 when no data has been retrieved by ptrace.
5083
5084 2012-05-22 Will Deacon <will.deacon@arm.com>
5085
5086 * linux-low (__UCLIBC__ && !(__UCLIBC_HAS_MMU__ || __ARCH_HAS_MMU__)):
5087 Include asm/ptrace.h.
5088 (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define only if not
5089 already defined.
5090
5091 2012-05-21 Maciej W. Rozycki <macro@codesourcery.com>
5092
5093 * linux-low.c (linux_store_registers): Don't re-retrieve data
5094 with ptrace that has already been obtained from /proc. Always
5095 copy any data retrieved with ptrace to the buffer supplied.
5096
5097 2012-05-11 Yao Qi <yao@codesourcery.com>
5098 Pedro Alves <palves@redhat.com>
5099
5100 * linux-low.c (enum stopping_threads_kind): New.
5101 (stopping_threads): Change type to `enum stopping_threads_kind'.
5102 (handle_extended_wait): If stopping and suspending threads, leave
5103 the new_lwp suspended too.
5104 (linux_wait_for_event): Adjust.
5105 (stop_all_lwps): Set `stopping_threads' to
5106 STOPPING_AND_SUSPENDING_THREADS or STOPPING_THREADS depending on
5107 whether we're suspending threads or just stopping them. Assert no
5108 recursion happens.
5109
5110 2012-04-29 Yao Qi <yao@codesourcery.com>
5111
5112 * server.h: Move some code to ...
5113 * gdbthread.h: ... here. New.
5114 * Makefile.in (inferiors.o, regcache.o): Depends on gdbthread.h
5115 (remote-utils.o, server.o, target.o tracepoint.o): Likewise.
5116 (nto-low.o, win32-low.o): Likewise.
5117 * inferiors.c, linux-low.h, nto-low.c: Include gdbthread.h.
5118 * regcache.c, remote-utils.c, server.c: Likewise.
5119 * target.c, tracepoint.c, win32-low.c: Likewise.
5120
5121 2012-04-24 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5122
5123 * linux-low.h (PTRACE_ARG3_TYPE): Move macro from linux-low.c.
5124 (PTRACE_ARG4_TYPE): Likewise.
5125 (PTRACE_XFER_TYPE): Likewise.
5126 * linux-arm-low.c (arm_prepare_to_resume): Cast third argument of
5127 ptrace to PTRACE_ARG3_TYPE.
5128 * linux-low.c (PTRACE_ARG3_TYPE): Move macro to linux-low.h.
5129 (PTRACE_ARG4_TYPE): Likewise.
5130 (PTRACE_XFER_TYPE): Likewise.
5131 (linux_detach_one_lwp): Cast fourth argument of
5132 ptrace to long then PTRACE_ARG4_TYPE.
5133 (regsets_fetch_inferior_registers): Cast third argument of
5134 ptrace to long then PTRACE_ARG3_TYPE.
5135 (regsets_store_inferior_registers): Likewise.
5136
5137 2012-04-20 Pedro Alves <palves@redhat.com>
5138
5139 * configure: Regenerate.
5140
5141 2012-04-19 Pedro Alves <palves@redhat.com>
5142
5143 * Makefile.in (GNULIB_BUILDDIR): New.
5144 (LIBGNU, INCGNU, GNULIB_H): Adjust.
5145 (SUBDIRS, CLEANDIRS, REQUIRED_SUBDIRS): New.
5146 (all, install-only, uninstall, clean-info, all-lib, clean): No
5147 longer pass GNULIB_FLAGS_TO_PASS. Use subdir_do.
5148 (maintainer-clean realclean distclean): Use subdir_do.
5149 (subdir_do): New.
5150 (gnulib/import/Makefile): Adjust. Replace gnulib/import with
5151 $(GNULIB_BUILDDIR). Don't pass argument to config.status.
5152 * acinclude.m4: Include acx_configure_dir.m4.
5153 * configure.ac: Remove gl_EARLY, gl_INIT, and AM_INIT_AUTOMAKE
5154 calls. Call AC_PROG_RANLIB. Configure gnulib using
5155 ACX_CONFIGURE_DIR.
5156 (GNULIB): New.
5157 (GNULIB_STDINT_H): Adjust.
5158 (AC_OUTPUT): Don't output gnulib/Makefile anymore.
5159 * gdbreplay.c: Include build-gnulib/config.h.
5160 * server.h: Likewise.
5161 * aclocal.m4: Regenerate.
5162 * config.in: Regenerate.
5163 * configure: Regenerate.
5164
5165 2012-04-19 Pedro Alves <palves@redhat.com>
5166
5167 * Makefile.in (LIBGNU, INCGNU): Adjust.
5168 (GNULIB_FLAGS_TO_PASS, GNULIB_H): Adjust.
5169 (all, install-only, uninstall, clean-info, all-lib, clean)
5170 (maintainer-clean, Makefile, gnulib/Makefile): Adjust.
5171 * configure.ac: Adjust AC_OUTPUT output.
5172 * aclocal.m4: Regenerate.
5173 * configure: Regenerate.
5174
5175 2012-04-19 Pedro Alves <palves@redhat.com>
5176
5177 * Makefile.in (generated_files): New.
5178 (server_h): Remove the explicit dependency on config.h, and depend
5179 on $generated_files.
5180
5181 2012-04-19 Pedro Alves <palves@redhat.com>
5182
5183 * Makefile.in (INCGNU): Add -Ignulib.
5184
5185 2012-04-19 Pedro Alves <palves@redhat.com>
5186
5187 * Makefile.in (GNULIB_INCLUDE_DIR): Rename to ...
5188 (INCGNU): ... this, and spell out -I here.
5189 (GNULIB_LIB): Rename to ...
5190 (LIBGNU): ... this.
5191 (INCLUDE_CFLAGS, gdbserver$(EXEEXT), $(GNULIB_LIB) rule): Adjust.
5192
5193 2012-04-19 Pedro Alves <palves@redhat.com>
5194
5195 * config.in: Regenerate.
5196
5197 2012-04-19 Pedro Alves <palves@redhat.com>
5198
5199 * configure.ac: Remove AC_CHECK_DECLS check for memmem.
5200 * server.h (memmem): Remove declaration.
5201 * config.in: Regenerate.
5202 * configure: Regenerate.
5203
5204 2012-04-19 Yao Qi <yao@codesourcery.com>
5205
5206 * Makefile.in (SFILES): Add common/vec.c.
5207 (OBS): Add vec.o.
5208 (vec.o): New rule.
5209
5210 2012-04-19 Yao Qi <yao@codesourcery.com>
5211
5212 * remote-utils.c (prepare_resume_reply): Replace with macro
5213 target_core_of_thread.
5214 * server.c (handle_qxfer_threads_proper): Likewise.
5215 * target.h (traget_core_of_thread): New macro.
5216
5217 2012-04-18 Pedro Alves <palves@redhat.com>
5218
5219 * aclocal.m4: Regenerate.
5220 * configure: Regenerate.
5221
5222 2012-04-16 Yao Qi <yao@codesourcery.com>
5223
5224 * tracepoint.c (cmd_qtstart): Download tracepoints even when they are
5225 duplicated on address.
5226
5227 2012-04-16 Yao Qi <yao@codesourcery.com>
5228
5229 * tracepoint.c (COPY_FIELD_TO_BUF): New macro.
5230 (struct tracepoint_action_ops) <send>: New field.
5231 (m_tracepoint_action_send, r_tracepoint_action_send): New.
5232 (agent_expr_send, x_tracepoint_action_send): New.
5233 (l_tracepoint_action_send): New.
5234 (cmd_qtdp): Download and install tracepoint
5235 according to `use_agent'.
5236 (run_inferior_command): Add one more parameter `len'.
5237 Update callers.
5238 (tracepoint_send_agent): New.
5239 (cmd_qtdp, cmd_qtstart): Call tracepoint_send_agent.
5240
5241 2012-04-16 Yao Qi <yao@codesourcery.com>
5242
5243 * tracepoint.c (download_tracepoints): Moved to ...
5244 (cmd_qtstart): ... here.
5245
5246 2012-04-14 Yao Qi <yao@codesourcery.com>
5247
5248 * tracepoint.c: Include inttypes.h.
5249 (struct collect_memory_action): Use sized types.
5250 (struct tracepoint): Likewise.
5251 (cmd_qtdp, stop_tracing): Update print specifiers.
5252 (cmd_qtp, response_tracepoint): Likewise.
5253 (collect_data_at_tracepoint): Likewise.
5254 (collect_data_at_step): Likewise.
5255
5256 2012-04-14 Yao Qi <yao@codesourcery.com>
5257
5258 Import gnulib module inttypes.
5259 * aclocal.m4, config.in, configure: Regenerated.
5260
5261 2012-04-14 Yao Qi <yao@codesourcery.com>
5262
5263 * Makefile.in (maintainer-clean, realclean, distclean): Remove
5264 Makefile and config.status at last.
5265
5266 2012-04-13 Yao Qi <yao@codesourcery.com>
5267
5268 * tracepoint.c: Include stdint.h unconditionally.
5269
5270 2012-04-13 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5271
5272 * acinclude.m4 (GDBSERVER_HAVE_THREAD_DB_TYPE): New macro based
5273 on BFD_HAVE_SYS_PROCFS_TYPE.
5274 * configure.ac: Look for lwpid_t and psaddr_t in libthread_db.h.
5275 * configure: Regenerate.
5276 * config.in: Likewise.
5277
5278 2012-04-13 H.J. Lu <hongjiu.lu@intel.com>
5279
5280 * Makefile.in (clean): Also remove x32.c x32-linux.c
5281 x32-avx.c x32-avx-linux.c.
5282 (x32.o): New target.
5283 (x32.c): Likewise.
5284 (x32-linux.o): Likewise.
5285 (x32-linux.c): Likewise.
5286 (x32-avx.o): Likewise.
5287 (x32-avx.c): Likewise.
5288 (x32-avx-linux.o): Likewise.
5289 (x32-avx-linux.c): Likewise.
5290
5291 * configure.srv (srv_amd64_regobj): Add x32.o x32-avx.o.
5292 (srv_amd64_linux_regobj): Add x32-linux.o x32-avx-linux.o.
5293 (srv_i386_64bit_xmlfiles): Add i386/x32-core.xml.
5294 (srv_amd64_xmlfiles): Add i386/x32.xml i386/x32-avx.xml.
5295 (srv_amd64_linux_xmlfiles): Add i386/x32-linux.xml
5296 i386/x32-avx-linux.xml.
5297
5298 * linux-x86-low.c (init_registers_x32_linux): New prototype.
5299 (init_registers_x32_avx_linux): Likwise.
5300 (x86_linux_update_xmltarget): Call init_registers_x32_linux
5301 or init_registers_x32_avx_linux if linux_is_elf64 is false.
5302
5303 2012-04-13 Pedro Alves <palves@redhat.com>
5304
5305 * Makefile.in (GNULIB_FLAGS_TO_PASS): New.
5306 (FLAGS_TO_PASS): Don't change or set $top_srcdir, $srcdir and VPATH.
5307 (all, uninstall, clean-info, all-lib, clean, maintainer-clean)
5308 (realclean, distclean): Explicitly pass $GNULIB_FLAGS_TO_PASS to
5309 the sub-make.
5310
5311 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5312
5313 * linux-x86-low.c (compat_x32_clock_t): New.
5314 (compat_x32_siginfo_t): Likewise.
5315 (compat_x32_siginfo_from_siginfo): Likewise.
5316 (siginfo_from_compat_x32_siginfo): Likewise.
5317 (linux_is_elf64): Likewise.
5318 (x86_siginfo_fixup): Call compat_x32_siginfo_from_siginfo
5319 and siginfo_from_compat_x32_siginfo for x32.
5320 (x86_arch_setup): Set linux_is_elf64.
5321
5322 2012-04-12 H.J. Lu <hongjiu.lu@intel.com>
5323
5324 PR gdb/13969
5325 * linux-low.c (linux_pid_exe_is_elf_64_file): Also return the
5326 e_machine field.
5327 (linux_qxfer_libraries_svr4): Update call to elf_64_file_p.
5328 * linux-low.h (linux_pid_exe_is_elf_64_file): Updated.
5329 * linux-x86-low.c (x86_arch_setup): Check if GDBserver is
5330 compatible with process.
5331
5332 2012-04-12 Yao Qi <yao@codesourcery.com>
5333
5334 * Makefile.in: Define abs_top_srcdir and abs_srcdir.
5335 (INCLUDE_CFLAGS): Append GNULIB_INCLUDE_DIR.
5336 (install-only, install-info, clean): Handle sub dir gnulib.
5337 (all-lib, am--refresh): New targets.
5338 (memmem.o): Remove target.
5339 * configure.ac: Remove AC_CONFIG_LIBOBJ_DIR.
5340 Invoke gl_EARLY. Invoke AC_CHECK_PROGS for make.
5341 (AC_REPLACE_FUNCS): Remove memmem.
5342 Invoke gl_INIT and AM_INIT_AUTOMAKE.
5343 (AC_OUTPUT): Generate Makefile in gnulib/.
5344 * aclocal.m4, config.in, configure: Regenerated.
5345
5346 2012-04-10 Maciej W. Rozycki <macro@codesourcery.com>
5347
5348 * linux-low.c (get_r_debug): Handle DT_MIPS_RLD_MAP.
5349
5350 2012-04-05 Pedro Alves <palves@redhat.com>
5351
5352 -Werror=strict-aliasing
5353
5354 * spu-low.c (parse_spufs_run): Avoid dereferencing type-punned
5355 pointer.
5356
5357 2012-04-04 Pedro Alves <palves@redhat.com>
5358
5359 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
5360 (sparc_store_gregset_from_stack, sparc_store_gregset)
5361 (sparc_breakpoint_at): Fix formatting.
5362
5363 2012-03-30 Thiago Jung Bauermann <thiago.bauermann@linaro.org>
5364
5365 * configure.ac: Check whether Elf32_auxv_t and Elf64_auxv_t
5366 are available.
5367 * linux-low.c [HAVE_ELF32_AUXV_T] (Elf32_auxv_t): Add typedef.
5368 [HAVE_ELF64_AUXV_T] (Elf64_auxv_t): Likewise.
5369 * config.in: Regenerate.
5370 * configure: Likewise.
5371
5372 2012-03-29 Pedro Alves <palves@redhat.com>
5373
5374 * linux-low.c (regsets_store_inferior_registers) [__sparc__]:
5375 Correct ptrace arguments.
5376
5377 2012-03-28 Pedro Alves <palves@redhat.com>
5378
5379 * linux-ia64-low.c (ia64_regmap): Map IA64_EC_REGNUM to PT_AR_EC.
5380 (IA64_GR0_REGNUM, IA64_FR0_REGNUM)
5381 (IA64_FR1_REGNUM): New defines.
5382 (ia64_fetch_register): New.
5383 (the_low_target): Install it.
5384 * linux-low.h (struct linux_target_ops) <fetch_register>: New
5385 field.
5386 * linux-low.c (linux_fetch_registers): Try the
5387 the_low_target.fetch_register hook first.
5388
5389 * linux-arm-low.c (the_low_target): Adjust.
5390 * linux-bfin-low.c (the_low_target): Adjust.
5391 * linux-cris-low.c (the_low_target): Adjust.
5392 * linux-crisv32-low.c (the_low_target): Adjust.
5393 * linux-m32r-low.c (the_low_target): Adjust.
5394 * linux-m68k-low.c (the_low_target): Adjust.
5395 * linux-mips-low.c (the_low_target): Adjust.
5396 * linux-ppc-low.c (the_low_target): Adjust.
5397 * linux-s390-low.c (the_low_target): Adjust.
5398 * linux-sh-low.c (the_low_target): Adjust.
5399 * linux-sparc-low.c (the_low_target): Adjust.
5400 * linux-tic6x-low.c (the_low_target): Adjust.
5401 * linux-x86-low.c (the_low_target): Adjust.
5402 * linux-xtensa-low.c (the_low_target): Adjust.
5403
5404 2012-03-26 Pedro Alves <palves@redhat.com>
5405
5406 * server.c (handle_qxfer_libraries): Don't bail early if
5407 the_target->qxfer_libraries_svr4 is not NULL.
5408
5409 2012-03-26 Pedro Alves <palves@redhat.com>
5410
5411 * linux-low.c (linux_qxfer_libraries_svr4): Fix pasto in comment.
5412
5413 2012-03-23 Pedro Alves <palves@redhat.com>
5414
5415 * linux-low.c (linux_qxfer_libraries_svr4): Terminate the
5416 "library-list-svr4" element's start tag when the the DSO list is
5417 empty.
5418
5419 2012-03-23 Pedro Alves <palves@redhat.com>
5420
5421 * linux-low.c (read_one_ptr): Read the inferior's pointer through
5422 a variable whose type size is the same as the inferior's pointer
5423 size.
5424
5425 2012-03-21 Thomas Schwinge <thomas@codesourcery.com>
5426
5427 * linux-arm-low.c (arm_stopped_by_watchpoint): Use siginfo_t instead of
5428 struct siginfo.
5429 * linux-low.c (siginfo_fixup, linux_xfer_siginfo): Likewise.
5430 * linux-x86-low.c (x86_siginfo_fixup): Likewise.
5431 * linux-low.h: Include <signal.h>.
5432 (struct siginfo): Remove forward declaration.
5433 (struct linux_target_ops) <siginfo_fixup>: Use siginfo_t instead of
5434 struct siginfo.
5435
5436 2012-03-21 Mike Frysinger <vapier@gentoo.org>
5437
5438 * .gitignore: Ignore more files.
5439
5440 2012-03-19 Pedro Alves <palves@redhat.com>
5441 Jan Kratochvil <jan.kratochvil@redhat.com>
5442
5443 * server.c (cont_thread, general_thread): Add describing comments.
5444 (start_inferior): Clear `cont_thread'.
5445 (handle_v_cont): Don't set `cont_thread' if resuming all threads
5446 of a process.
5447
5448 2012-03-15 Yao Qi <yao@codesourcery.com>
5449
5450 * tracepoint.c (install_tracepoint): Move duplicated tracepoint
5451 handling to ...
5452 (cmd_qtdp): ... here.
5453
5454 2012-03-15 Yao Qi <yao@codesourcery.com>
5455
5456 * tracepoint.c (struct tracepoint_action_ops): New.
5457 (struct tracepoint_action) [!IN_PROCESS_AGENT] <ops>: New field.
5458 (m_tracepoint_action_download): New.
5459 (r_tracepoint_action_download): New.
5460 (x_tracepoint_action_download): New.
5461 (l_tracepoint_action_download): New.
5462 (add_tracepoint_action): Install `action->ops' according type.
5463 (download_tracepoint_1): Move code `download' function pointer
5464 of various tracepoint_action_ops.
5465
5466 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5467
5468 * linux-low.c (linux_attach_lwp_1): New variable buffer. Call
5469 linux_ptrace_attach_warnings.
5470
5471 2012-03-13 Jan Kratochvil <jan.kratochvil@redhat.com>
5472
5473 * Makefile.in (linux-ptrace.o): New.
5474 * configure.srv (arm*-*-linux*, bfin-*-*linux*, crisv32-*-linux*)
5475 (cris-*-linux*, i[34567]86-*-linux*, ia64-*-linux*, m32r*-*-linux*)
5476 (m68*-*-linux*, m68*-*-uclinux*, mips*-*-linux*, powerpc*-*-linux*)
5477 (s390*-*-linux*, sh*-*-linux*, sparc*-*-linux*, tic6x-*-uclinux)
5478 (x86_64-*-linux*, xtensa*-*-linux*): Add linux-ptrace.o to SRV_TGTOBJ
5479 of these targets.
5480 * linux-low.c (linux_attach_lwp_1): Remove redundent else clause.
5481
5482 2012-03-08 Yao Qi <yao@codesourcery.com>
5483 Pedro Alves <palves@redhat.com>
5484
5485 Fix PR server/13392.
5486 * linux-x86-low.c (amd64_install_fast_tracepoint_jump_pad): Check
5487 offset of JMP insn.
5488 * tracepoint.c (remove_tracepoint): New.
5489 (cmd_qtdp): Call remove_tracepoint when failed to install.
5490
5491 2012-03-07 Pedro Alves <palves@redhat.com>
5492
5493 * linux-low.c (get_detach_signal): New.
5494 (linux_detach_one_lwp): Get rid of a pending SIGSTOP with SIGCONT.
5495 Pass on pending signals to PTRACE_DETACH. Check the result of the
5496 ptrace call.
5497 * server.c (program_signals, program_signals_p): New.
5498 (handle_general_set): Handle QProgramSignals.
5499 * server.h (program_signals, program_signals_p): Declare.
5500
5501 2012-03-05 Pedro Alves <palves@redhat.com>
5502 Jan Kratochvil <jan.kratochvil@redhat.com>
5503
5504 * linux-low.c (get_dynamic): Don't warn when PT_PHDR isn't found.
5505 New comment why.
5506
5507 2012-03-03 Yao Qi <yao@codesourcery.com>
5508
5509 * tracepoint.c (tracepoint_look_up_symbols): Update call to
5510 agent_look_up_symbols.
5511
5512 2012-03-03 Yao Qi <yao@codesourcery.com>
5513
5514 * Makefile.in (linux-low.o): Keep dependence on agent.h.
5515 (linux-x86-low.o): Likewise.
5516 * server.h: Remove in_process_agent_loaded.
5517 * tracepoint.c (in_process_agent_loaded): Removed. Moved it
5518 common/agent.c.
5519 Update callers.
5520
5521 2012-03-03 Yao Qi <yao@codesourcery.com>
5522
5523 * tracepoint.c (gdb_agent_capability): New global.
5524 (in_process_agent_loaded_ust): Renamed to
5525 `in_process_agent_supports_ust'.
5526 Update callers.
5527 (in_process_agent_supports_ust): Call agent_capability_check.
5528 (clear_installed_tracepoints): Assert that agent supports
5529 agent.
5530
5531 2012-03-03 Yao Qi <yao@codesourcery.com>
5532
5533 * linux-low.c (linux_supports_agent): New.
5534 (linux_target_ops): Initialize field `supports_agent' with
5535 linux_supports_agent.
5536 * target.h (struct target_ops) <supports_agent>: New.
5537 (target_supports_agent): New macro.
5538 * server.c (handle_general_set): Handle packet 'QAgent'.
5539 (handle_query): Send `QAgent+'.
5540 * Makefile.in (server.o): Depends on agent.h.
5541
5542 2012-03-03 Yao Qi <yao@codesourcery.com>
5543
5544 * Makefile.in (OBS): Add agent.o.
5545 Add new rule for agent.o.
5546 Track dependence of tracepoint.c on agent.h.
5547 * tracepoint.c (run_inferior_command_1):
5548 (run_inferior_command): Call agent_run_command.
5549 (gdb_ust_connect_sync_socket): Deleted. Move it to
5550 common/agent.c.
5551 (resume_thread, stop_thread): Likewise.
5552 (gdb_ust_socket_init): Renamed to ...
5553 (gdb_agent_socket_init): ... New.
5554 (gdb_ust_thread): Renamed to ...
5555 (gdb_agent_helper_thread): ... New.
5556 (gdb_ust_init): Move some code to ...
5557 (gdb_agent_init): ... here. New.
5558 [HAVE_UST]: Call gdb_ust_init.
5559 (initialize_tracepoint_ftlib): Call gdb_agent_init.
5560 * configure.ac: Add `sys/un.h' to AC_CHECK_HEADERS.
5561 * config.in, configure: Regenerated.
5562
5563 2012-03-02 Pedro Alves <palves@redhat.com>
5564
5565 * inferiors.c (add_pid_to_list, pull_pid_from_list): Delete.
5566 * linux-low.c (struct simple_pid_list): New.
5567 (stopped_pids): New a struct simple_pid_list pointer.
5568 (add_to_pid_list, pull_pid_from_list): New.
5569 (handle_extended_wait): Don't assume the first signal new children
5570 report is SIGSTOP. Adjust call to pull_pid_from_list.
5571 (linux_wait_for_lwp): Adjust.
5572
5573 2012-03-02 Yao Qi <yao@codesourcery.com>
5574
5575 * tracepoint.c (do_action_at_tracepoint): Write `stop_pc' in
5576 debug log.
5577
5578 2012-03-02 Yao Qi <yao@codesourcery.com>
5579
5580 * tracepoint.c (collect_ust_data_at_tracepoint): Remove parameters
5581 `stop_pc' and `tpoint'. Update caller.
5582
5583 2012-03-01 Maciej W. Rozycki <macro@codesourcery.com>
5584
5585 * linux-low.h (linux_target_ops): Add regset_bitmap member.
5586 * linux-low.c (use_linux_regsets): New macro.
5587 [!HAVE_LINUX_REGSETS] (regsets_fetch_inferior_registers): Likewise.
5588 [!HAVE_LINUX_REGSETS] (regsets_store_inferior_registers): Likewise.
5589 (linux_register_in_regsets): New function.
5590 (usr_fetch_inferior_registers): Skip registers covered by
5591 regsets.
5592 (usr_store_inferior_registers): Likewise.
5593 (usr_fetch_inferior_registers): New macro.
5594 (usr_store_inferior_registers): Likewise.
5595 (linux_fetch_registers): Handle mixed regset/non-regset targets.
5596 (linux_store_registers): Likewise.
5597 * linux-mips-low.c (init_registers_mips_dsp_linux): New
5598 prototype.
5599 (init_registers_mips64_dsp_linux): Likewise.
5600 (init_registers_mips_linux): New macro.
5601 (init_registers_mips_dsp_linux): Likewise.
5602 (mips_dsp_num_regs): Likewise.
5603 (DSP_BASE, DSP_CONTROL): New fallback macros.
5604 (mips_base_regs): New macro.
5605 (mips_regmap): Use it. Fix the size.
5606 (mips_dsp_regmap): New variable.
5607 (mips_dsp_regset_bitmap): Likewise.
5608 (mips_arch_setup): New function.
5609 (mips_cannot_fetch_register): Use the_low_target.regmap rather
5610 than mips_regmap.
5611 (mips_cannot_store_register): Likewise.
5612 (the_low_target): Update .arch_setup, .num_regs and .regmap
5613 initializers. Add .regset_bitmap initializer.
5614 * linux-arm-low.c (the_low_target): Add .regset_bitmap
5615 initializer.
5616 * linux-bfin-low.c (the_low_target): Likewise.
5617 * linux-cris-low.c (the_low_target): Likewise.
5618 * linux-crisv32-low.c (the_low_target): Likewise.
5619 * linux-ia64-low.c (the_low_target): Likewise.
5620 * linux-m32r-low.c (the_low_target): Likewise.
5621 * linux-m68k-low.c (the_low_target): Likewise.
5622 * linux-ppc-low.c (the_low_target): Likewise.
5623 * linux-s390-low.c (the_low_target): Likewise.
5624 * linux-sh-low.c (the_low_target): Likewise.
5625 * linux-sparc-low.c (the_low_target): Likewise.
5626 * linux-tic6x-low.c (the_low_target): Likewise.
5627 * linux-x86-low.c (the_low_target): Likewise.
5628 * linux-xtensa-low.c (the_low_target): Likewise.
5629 * configure.srv <mips*-*-linux*>: Add mips-dsp-linux.o and
5630 mips64-dsp-linux.o to srv_regobj. Add mips-dsp-linux.xml,
5631 mips64-dsp-linux.xml, mips-dsp.xml and mips64-dsp.xml to
5632 srv_xmlfiles.
5633 * Makefile.in (mips-dsp-linux.o, mips-dsp-linux.c): New targets.
5634 (mips64-dsp-linux.o, mips64-dsp-linux.c): Likewise.
5635
5636 2012-02-29 Yao Qi <yao@codesourcery.com>
5637 Pedro Alves <palves@redhat.com>
5638
5639 * linux-low.c: (linux_wait_1): Call unsuspend_all_lwps when
5640 `step_over_finished' is true.
5641
5642 2012-02-27 Pedro Alves <palves@redhat.com>
5643
5644 * linux-low.c (pid_is_stopped): Delete, moved to common/.
5645 (linux_attach_lwp_1): Adjust to use linux_proc_pid_is_stopped.
5646
5647 2012-02-27 Pedro Alves <palves@redhat.com>
5648
5649 PR server/9684
5650 * linux-low.c (pid_is_stopped): New.
5651 (linux_attach_lwp_1): Handle attaching to 'T (stopped)' processes.
5652
5653 2012-02-25 Luis Machado <lgustavo@codesourcery.com>
5654
5655 * mem-break.c (clear_gdb_breakpoint_conditions): Fix de-allocation
5656 of conditions.
5657
5658 2012-02-24 Maciej W. Rozycki <macro@codesourcery.com>
5659
5660 * linux-mips-low.c (mips_regmap): Correct the index of $f9.
5661
5662 2012-02-24 Luis Machado <lgustavo@codesourcery>
5663
5664 * server.c (handle_query): Advertise support for target-side
5665 breakpoint condition evaluation.
5666 (process_point_options): New function.
5667 (process_serial_event): When inserting a breakpoint, check for
5668 a target-side condition that should be evaluated.
5669
5670 * mem-break.c: Include regcache.h and ax.h.
5671 (point_cond_list_t): New data structure.
5672 (breakpoint) <cond_list>: New field.
5673 (find_gdb_breakpoint_at): Make non-static.
5674 (delete_gdb_breakpoint_at): Clear any target-side
5675 conditions.
5676 (clear_gdb_breakpoint_conditions): New function.
5677 (add_condition_to_breakpoint): Likewise.
5678 (add_breakpoint_condition): Likewise.
5679 (gdb_condition_true_at_breakpoint): Likewise.
5680 (gdb_breakpoint_here): Return result directly instead
5681 of going through a local variable.
5682
5683 * mem-break.h (find_gdb_breakpoint_at): New prototype.
5684 (clear_gdb_breakpoint_conditions): Likewise.
5685 (add_breakpoint_condition): Likewise.
5686 (gdb_condition_true_at_breakpoint): Likewise.
5687
5688 * linux-low.c (linux_wait_1): Evaluate target-side breakpoint condition.
5689 (need_step_over_p): Take target-side breakpoint condition into
5690 consideration.
5691
5692 2012-02-24 Luis Machado <lgustavo@codesourcery>
5693
5694 * server.h: Include tracepoint.h.
5695 (agent_mem_read, agent_get_trace_state_variable_value,
5696 agent_set_trace_state_variable_value,
5697 agent_tsv_read, agent_mem_read_string, get_get_tsv_func_addr,
5698 get_set_tsv_func_addr): New prototypes.
5699
5700 * ax.h: New include file.
5701 * ax.c: New source file.
5702
5703 * tracepoint.c: Include ax.h.
5704 (gdb_agent_op, gdb_agent_op_names, gdb_agent_op_sizes,
5705 agent_expr, eval_result_type): Move to ax.h.
5706 (parse_agent_expr): Rename to ...
5707 (gdb_parse_agent_expr): ... this, make it non-static and move
5708 to ax.h.
5709 (unparse_agent_expr) Rename to ...
5710 (gdb_unparse_agent_expr): ... this, make it non-static and move
5711 to ax.h.
5712 (eval_agent_expr): Rename to ...
5713 (eval_tracepoint_agent_expr): ... this.
5714 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Remove
5715 forward declarations.
5716 (add_tracepoint_action): Call gdb_parse_agent_expr (...).
5717 (agent_get_trace_state_variable_value): New function.
5718 (agent_set_trace_state_variable_value): New function.
5719 (cmd_qtdp): Call gdb_parse_agent_expr (...).
5720 (response_tracepoint): Call gdb_unparse_agent_expr (...).
5721 (do_action_at_tracepoint): Call eval_tracepoint_agent_expr (...).
5722 (condition_true_at_tracepoint): Likewise.
5723 (parse_agent_expr): Rename to ...
5724 (gdb_parse_agent_expr): ... this and move to ax.c.
5725 (unparse_agent_expr): Rename to ...
5726 (gdb_unparse_agent_expr): ... this and move to ax.c.
5727 (gdb_agent_op_name): Move to ax.c.
5728 (eval_agent_expr): Rename to ...
5729 (gdb_eval_agent_expr): ... this, use regcache passed as parameter
5730 and move to ax.c.
5731 (eval_tracepoint_agent_expr): New function.
5732 (agent_mem_read, agent_mem_read_string, agent_tsv_read): Make
5733 non-static.
5734 (current_insn_ptr, emit_error, struct bytecode_address): Move to
5735 ax.c.
5736 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul, emit_lsh,
5737 emit_rsh_signed, emit_rsh_unsigned, emit_ext, emit_log_not,
5738 emit_bit_and, emit_bit_or, emit_bit_xor, emit_bit_not, emit_equal,
5739 emit_less_signed, emit_less_unsigned, emit_ref, emit_if_goto,
5740 emit_goto, write_goto_address, emit_const, emit_reg, emit_pop,
5741 emit_stack, emit_zero_ext, emit_swap, emit_stack_adjust,
5742 emit_int_call_1, emit_void_call_2, emit_eq_goto, emit_ne_goto,
5743 emit_lt_goto, emit_ge_goto, emit_gt_goto, emit_le_goto): Move to ax.c.
5744 (get_get_tsv_func_addr, get_set_tsv_func_addr): New functions.
5745 (compile_bytecodes): Remove forward declaration.
5746 (is_goto_target): Move to ax.c.
5747 (compile_bytecodes): Move to ax.c and call
5748 agent_get_trace_state_variable_value (...) and
5749 agent_set_trace_state_variable_value (...).
5750
5751 * Makefile.in: Update ax.c and IPA dependencies.
5752
5753 2012-02-24 Pedro Alves <palves@redhat.com>
5754
5755 * tracepoint.c (cmd_bigqtbuffer): Rename as ...
5756 (cmd_bigqtbuffer_circular): ... this. Only handle
5757 'QTBuffer:circular:'.
5758 (handle_tracepoint_general_set): Adjust.
5759
5760 2012-02-16 Yao Qi <yao@codesourcery.com>
5761
5762 * inferiors.c: Move code to ...
5763 * dll.c: .... here. New.
5764 * server.h: Declare clear_dlls.
5765 * Makefile.in (SFILES): Add dll.c.
5766 (OBS): Add dll.o
5767 (dll.o): New rule.
5768
5769 2012-02-11 Yao Qi <yao@codesourcery.com>
5770
5771 * server.c: (handle_monitor_command): Add a new parameter
5772 `own_buf'.
5773 (handle_query): Update caller.
5774
5775 2012-02-09 Joel Brobecker <brobecker@adacore.com>
5776
5777 * configure.ac: Add readlink to AC_CHECK_FUNCS list.
5778 * configure, config.in: Regenerate.
5779 * hostio.c: Provide an alternate implementation if HAVE_READLINK
5780 is not defined.
5781
5782 2012-02-02 Pedro Alves <palves@redhat.com>
5783
5784 Try SIGKILL first, then PTRACE_KILL.
5785 * linux-low.c (linux_kill_one_lwp): New.
5786 (linux_kill_one_lwp): Rename to ...
5787 (kill_one_lwp_callback): ... this. Use the new
5788 linux_kill_one_lwp.
5789
5790 2012-02-02 Pedro Alves <palves@redhat.com>
5791
5792 * tracepoint.c (cmd_qtminftpilen): Return 0 if there's no current
5793 inferior.
5794
5795 2012-01-27 Pedro Alves <palves@redhat.com>
5796
5797 * linux-low.c (linux_child_pid_to_exec_file): Delete.
5798 (elf_64_file_p): Make static.
5799 (linux_pid_exe_is_elf_64_file): New.
5800 * linux-low.h (linux_child_pid_to_exec_file, elf_64_file_p):
5801 Delete declarations.
5802 (linux_pid_exe_is_elf_64_file): Declare.
5803 * linux-x86-low.c (x86_arch_setup): Use
5804 linux_pid_exe_is_elf_64_file.
5805
5806 2012-01-25 Jan Kratochvil <jan.kratochvil@redhat.com>
5807
5808 * linux-low.c (linux_wait_for_event_1): Rename to ...
5809 (linux_wait_for_event): ... here and merge it with former
5810 linux_wait_for_event - new variable wait_ptid, use it.
5811 (linux_wait_for_event): Remove - merge it to linux_wait_for_event_1.
5812
5813 2012-01-23 Pedro Alves <palves@redhat.com>
5814
5815 * server.c (main): Avoid yet another case of infinite loop while
5816 detaching/killing after a longjmp.
5817
5818 2012-01-20 Jan Kratochvil <jan.kratochvil@redhat.com>
5819
5820 Code cleanup.
5821 * linux-low.c (linux_wait_for_event_1): Use ptid_is_pid.
5822
5823 2012-01-20 Ulrich Weigand <ulrich.weigand@linaro.org>
5824
5825 * hostio.c (handle_readlink): New function.
5826 (handle_vFile): Call it to handle "vFile:readlink" packets.
5827
5828 2012-01-20 Pedro Alves <palves@redhat.com>
5829 Ulrich Weigand <ulrich.weigand@linaro.org>
5830
5831 * server.c (handle_v_requests): Only support vAttach and vRun to
5832 start multiple processes when in extended protocol mode.
5833
5834 2012-01-17 Pedro Alves <palves@redhat.com>
5835
5836 * tracepoint.c (initialize_tracepoint): Use mmap instead of
5837 memalign plus mprotect to allocate the scratch buffer.
5838
5839 2012-01-13 Pedro Alves <palves@redhat.com>
5840
5841 * server.c (attach_inferior): Clear `cont_thread'.
5842
5843 2012-01-13 Pedro Alves <palves@redhat.com>
5844
5845 * server.c (main): Avoid infinite loop while detaching/killing
5846 after a longjmp.
5847
5848 2012-01-09 Doug Evans <dje@google.com>
5849
5850 * server.c (start_inferior): Set last_ptid in --wrapper case.
5851
5852 2012-01-06 Yao Qi <yao@codesourcery.com>
5853
5854 * tracepoint.c [IN_PROCESS_AGENT] (debug_threads): Macro
5855 defined.
5856 [IN_PROCESS_AGENT] (debug_agent): New global variable.
5857
5858 2012-01-04 Yao Qi <yao@codesourcery.com>
5859
5860 * tracepoint.c (cmd_qtdp): Print debug message
5861 for static tracepoint.
5862
5863 2012-01-04 Yao Qi <yao@codesourcery.com>
5864
5865 * tracepoint.c (trace_vdebug): Differentiate debug message
5866 between gdbserver and IPA.
5867
5868 2012-01-03 Yao Qi <yao@codesourcery.com>
5869
5870 * tracepoint.c (tracepoint_was_hit): Don't collect for
5871 static tracepoint.
5872
5873 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5874
5875 * terminal.h: Reformat copyright header.
5876
5877 2012-01-02 Joel Brobecker <brobecker@adacore.com>
5878
5879 * server.c (gdbserver_version): Update copyright year.
5880 * gdbreplay.c (gdbreplay_version): Likewise.
5881
5882 2011-12-18 Jan Kratochvil <jan.kratochvil@redhat.com>
5883
5884 * linux-low.c (linux_create_inferior): Put empty if clause for write.
5885
5886 Revert:
5887 2011-12-18 Hui Zhu <teawater@gmail.com>
5888 * linux-low.c (linux_create_inferior): Save return value to ret.
5889
5890 2011-12-18 Hui Zhu <teawater@gmail.com>
5891
5892 * linux-low.c (linux_create_inferior): Save return value to ret.
5893
5894 2011-12-16 Doug Evans <dje@google.com>
5895
5896 * linux-low.c (linux_create_inferior): If stdio connection,
5897 redirect stdin from /dev/null, stdout to stderr.
5898 * remote-utils.c (remote_is_stdio): New static global.
5899 (remote_connection_is_stdio): New function.
5900 (remote_prepare): Handle stdio connection.
5901 (remote_open): Ditto.
5902 (remote_close): Don't close stdin for stdio connections.
5903 (read_prim,write_prim): New functions. Replace all calls to
5904 read/write to these.
5905 * server.c (main): Watch for "-" argument. Move call to
5906 remote_prepare before start_inferior.
5907 * server.h (STDIO_CONNECTION_NAME): New macro.
5908 (remote_connection_is_stdio): Declare.
5909
5910 * remote-utils.c (prepare_resume_reply): Remove extraneous \n
5911 in debugging output.
5912
5913 2011-12-15 Yao Qi <yao@codesourcery.com>
5914
5915 * tracepoint.c: Include sys/syscall.h.
5916 (gdb_ust_thread): Remove preprocessor conditional.
5917
5918 2011-12-14 Pedro Alves <pedro@codesourcery.com>
5919
5920 * linux-low.c (linux_detach_one_lwp): Call
5921 the_low_target.prepare_to_resume before detaching.
5922
5923 2011-12-14 Yao Qi <yao@codesourcery.com>
5924
5925 * tracepoint.c (gdb_ust_thread): Don't ignore return value
5926 of write.
5927
5928 2011-12-14 Yao Qi <yao@codesourcery.com>
5929
5930 * i386-low.c (i386_low_stopped_data_address): Initialize local
5931 variable `control'.
5932
5933 2011-12-13 Pedro Alves <pedro@codesourcery.com>
5934
5935 PR remote/13492
5936
5937 * i386-low.c (i386_low_stopped_data_address): Avoid fetching
5938 DR_CONTROL unless necessary. Extend comments.
5939 * linux-x86-low.c (x86_linux_prepare_to_resume): Don't write to
5940 DR0-3 if not used. If any watchpoint was set, clear DR_STATUS.
5941
5942 2011-12-13 Yao Qi <yao@codesourcery.com>
5943
5944 * tracepoint.c (trace_buffer_alloc): Replace magic numbers with
5945 macros.
5946 (upload_fast_traceframes, upload_fast_traceframes): Likewise.
5947
5948 2011-12-08 Jan Kratochvil <jan.kratochvil@redhat.com>
5949
5950 * linux-low.c (linux_kill): Skip PTRACE_KILL if LWP does not exist.
5951 Print new debug message for such case.
5952
5953 2011-12-06 Jan Kratochvil <jan.kratochvil@redhat.com>
5954
5955 Fix overlapping memcpy.
5956 * mem-break.c (set_raw_breakpoint_at): New variable buf. Use it for
5957 the read_inferior_memory transfer.
5958 (delete_fast_tracepoint_jump): New variable buf. Use it for the
5959 write_inferior_memory transfer.
5960 (set_fast_tracepoint_jump): New variable buf. Use it for the
5961 read_inferior_memory and write_inferior_memory transfers.
5962 (uninsert_fast_tracepoint_jumps_at, reinsert_fast_tracepoint_jumps_at)
5963 (delete_raw_breakpoint, uninsert_raw_breakpoint): New variable buf.
5964 Use it for the write_inferior_memory transfer.
5965 (check_mem_read, check_mem_write): New gdb_asserts for overlapping
5966 buffers.
5967
5968 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5969
5970 * linux-low.c (fetch_register, store_register): Make code
5971 consistent, fix formatting.
5972
5973 2011-12-06 Maciej W. Rozycki <macro@codesourcery.com>
5974
5975 * linux-low.c (usr_store_inferior_registers): Factor out code
5976 to handle individual registers into...
5977 (store_register): ... this new function.
5978
5979 2011-12-06 Ulrich Weigand <uweigand@de.ibm.com>
5980
5981 * Makefile.in (s390-linux32v1.o, s390-linux32v1.c): New rules.
5982 (s390-linux32v2.o, s390-linux32v2.c): Likewise.
5983 (s390-linux64v1.o, s390-linux64v1.c): Likewise.
5984 (s390-linux64v2.o, s390-linux64v2.c): Likewise.
5985 (s390x-linux64v1.o, s390x-linux64v1.c): Likewise.
5986 (s390x-linux64v2.o, s390x-linux64v2.c): Likewise.
5987 * configure.srv [s390*-*-linux*] (srv_regobj): Add new objects.
5988 (srv_xmlfiles): Add new XML files.
5989
5990 * linux-s390-low.c: Include "elf/common.h", <sys/ptrace.h>,
5991 and <sys/uio.h>.
5992 (PTRACE_GETREGSET, PTRACE_SETREGSET): Define if undefined.
5993 (init_registers_s390_linux32v1): Add prototype.
5994 (init_registers_s390_linux32v2): Likewise.
5995 (init_registers_s390_linux64v1): Likewise.
5996 (init_registers_s390_linux64v2): Likewise.
5997 (init_registers_s390x_linux64v1): Likewise.
5998 (init_registers_s390x_linux64v2): Likewise.
5999 (s390_num_regs): Increment to 52.
6000 (s390_regmap): Add orig_r2 register.
6001 (s390_num_regs_3264): Increment to 68.
6002 (s390_regmap_3264): Add orig_r2 register.
6003 (s390_collect_ptrace_register): Handle orig_r2 register.
6004 (s390_supply_ptrace_register): Likewise.
6005 (s390_fill_last_break): New function.
6006 (s390_store_last_break): Likewise.
6007 (s390_fill_system_call): New function.
6008 (s390_store_system_call): Likewise.
6009 (target_regsets): Handle NT_S390_LAST_BREAK and NT_S390_SYSTEM_CALL
6010 register sets.
6011 (s390_check_regset): New function.
6012 (s390_arch_setup): Check for presence of NT_S390_LAST_BREAK and
6013 NT_S390_SYSTEM_CALL regsets and use appropriate description.
6014 Update target_regsets for available register sets.
6015
6016 2011-12-02 Paul Pluzhnikov <ppluzhnikov@google.com>
6017 Jan Kratochvil <jan.kratochvil@redhat.com>
6018
6019 * linux-low.c (get_phdr_phnum_from_proc_auxv, get_dynamic, get_r_debug)
6020 (read_one_ptr, struct link_map_offsets, linux_qxfer_libraries_svr4):
6021 New.
6022 (struct linux_target_ops): Install linux_qxfer_libraries_svr4.
6023 * linux-low.h (struct process_info_private): New member r_debug.
6024 * server.c (handle_qxfer_libraries): Call
6025 the_target->qxfer_libraries_svr4.
6026 (handle_qxfer_libraries_svr4): New function.
6027 (qxfer_packets): New entry "libraries-svr4".
6028 (handle_query): Check QXFER_LIBRARIES_SVR4 and report libraries-svr4.
6029 * target.h (struct target_ops): New member qxfer_libraries_svr4.
6030 * remote.c (remote_xfer_partial): Call add_packet_config_cmd for
6031 PACKET_qXfer_libraries_svr4.
6032
6033 2011-11-30 Ulrich Weigand <uweigand@de.ibm.com>
6034
6035 * linux-s390-low.c (s390_collect_ptrace_register): Fully convert
6036 PSW address/mask between 8-byte and 16-byte formats.
6037 (s390_supply_ptrace_register): Likewise.
6038 (s390_get_pc, s390_set_pc): 4-byte PSW address always includes
6039 basic addressing mode bit.
6040
6041 2011-11-24 Stan Shebs <stan@codesourcery.com>
6042
6043 * tracepoint.c (cmd_qtstatus): Use plongest instead of %llx.
6044
6045 2011-11-17 Stan Shebs <stan@codesourcery.com>
6046
6047 * tracepoint.c (struct tracepoint): New field traceframe_usage.
6048 (tracing_start_time): New global.
6049 (tracing_stop_time): New global.
6050 (tracing_user_name): New global.
6051 (tracing_notes): New global.
6052 (tracing_stop_note): New global.
6053 (cmd_qtstart): Set traceframe_usage, start_time.
6054 (stop_tracing): Set stop_time.
6055 (cmd_qtstatus): Report additional status.
6056 (cmd_qtp): New function.
6057 (handle_tracepoint_query): Call it.
6058 (cmd_qtnotes): New function.
6059 (handle_tracepoint_general_set): Call it.
6060 (get_timestamp): Rename from tsv_get_timestamp.
6061
6062 2011-11-14 Stan Shebs <stan@codesourcery.com>
6063 Kwok Cheung Yeung <kcy@codesourcery.com>
6064
6065 * linux-x86-low.c (small_jump_insn): New.
6066 (i386_install_fast_tracepoint_jump_pad): Add arguments for
6067 trampoline and error message, build a trampoline and issue a small
6068 jump instruction to it.
6069 (x86_install_fast_tracepoint_jump_pad): Add arguments for
6070 trampoline and error message.
6071 (x86_get_min_fast_tracepoint_insn_len): New.
6072 (the_low_target): Add call to x86_get_min_fast_tracepoint_insn_len.
6073 * linux-low.h (struct linux_target_ops): Add arguments to
6074 install_fast_tracepoint_jump_pad operation, add new operation.
6075 * linux-low.c (linux_install_fast_tracepoint_jump_pad): Add
6076 arguments.
6077 (linux_get_min_fast_tracepoint_insn_len): New function.
6078 (linux_target_op): Add new operation.
6079 * tracepoint.c (gdb_trampoline_buffer): New IPA variable.
6080 (gdb_trampoline_buffer_end): Ditto.
6081 (gdb_trampoline_buffer_error): Ditto.
6082 (struct ipa_sym_addresses): Add fields for new IPA variables.
6083 (symbol_list): Add entries for new IPA variables.
6084 (struct tracepoint): Add fields to hold the address range of the
6085 trampoline used by the tracepoint.
6086 (trampoline_buffer_head): New static variable.
6087 (trampoline_buffer_tail): Ditto.
6088 (claim_trampoline_space): New function.
6089 (have_fast_tracepoint_trampoline_buffer): New function.
6090 (clone_fast_tracepoint): Fill in trampoline fields of tracepoint
6091 structure.
6092 (install_fast_tracepoint): Ditto, also add error buffer argument.
6093 (cmd_qtminftpilen): New function.
6094 (handle_tracepoint_query): Add response to qTMinFTPILen packet.
6095 (fast_tracepoint_from_trampoline_address): New function.
6096 (fast_tracepoint_collecting): Handle trampoline as part of jump
6097 pad space.
6098 (set_trampoline_buffer_space): New function.
6099 (initialize_tracepoint): Initialize new IPA variables.
6100 * target.h (struct target_ops): Add arguments to
6101 install_fast_tracepoint_jump_pad operation, add new
6102 get_min_fast_tracepoint_insn_len operation.
6103 (target_get_min_fast_tracepoint_insn_len): New.
6104 (install_fast_tracepoint_jump_pad): Add arguments.
6105 * server.h (IPA_BUFSIZ): Define.
6106 * linux-i386-ipa.c: Include extra header files.
6107 (initialize_fast_tracepoint_trampoline_buffer): New function.
6108 (initialize_low_tracepoint): Call it.
6109 * server.h (set_trampoline_buffer_space): Declare.
6110 (claim_trampoline_space): Ditto.
6111 (have_fast_tracepoint_trampoline_buffer): Ditto.
6112
6113 2011-11-14 Yao Qi <yao@codesourcery.com>
6114
6115 * server.c (handle_query): Handle InstallInTrace for qSupported.
6116 * tracepoint.c (add_tracepoint): Sort list.
6117 (install_tracepoint, download_tracepoint): New.
6118 (cmd_qtdp): Call them to install and download tracepoints.
6119 (sort_tracepoints): Removed.
6120 (cmd_qtstart): Update.
6121
6122 2011-11-14 Yao Qi <yao@codesourcery.com>
6123
6124 * mem-break.c (inc_ref_fast_tracepoint_jump): New.
6125 * mem-break.h: Declare.
6126 * tracepoint.c (cmd_qtstart): Move some code to ...
6127 (clone_fast_tracepoint, install_fast_tracepoint): ... here.
6128 New.
6129 (download_tracepoints): Move some code to ...
6130 (download_tracepoint_1): ... here. New.
6131
6132 2011-11-08 Yao Qi <yao@codesourcery.com>
6133
6134 * remote-utils.c (relocate_instruction): A comment fix.
6135
6136 2011-11-07 Joel Brobecker <brobecker@adacore.com>
6137
6138 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): Delete.
6139 (i386_dr_low_get_control, i386_dr_low_get_status): Use
6140 dr_status_mirror and dr_control_mirror from debug_reg_state.
6141 (i386_dr_low_get_status): Use debug_reg_state.dr_status_mirror
6142 (i386_initial_stuff): Remove use of deleted globals.
6143 (i386_get_thread_context, i386_set_thread_context,
6144 i386_thread_added): Use dr_status_mirror and dr_control_mirror
6145 from debug_reg_state.
6146
6147 2011-11-05 Yao Qi <yao@codesourcery.com>
6148
6149 * tracepoint.c (gdb_collect): Loop over tracepoints of same
6150 address as TPOINT's.
6151
6152 2011-11-02 Stan Shebs <stan@codesourcery.com>
6153
6154 * tracepoint.c (agent_mem_read_string): New function.
6155 (eval_agent_expr): Call it for tracenz.
6156 * server.c (handle_query): Report support for tracenz.
6157
6158 2011-11-02 Yao Qi <yao@codesourcery.com>
6159
6160 * tracepoint.c (cmd_qtstart): Remove unused local variables.
6161
6162 2011-11-02 Yao Qi <yao@codesourcery.com>
6163
6164 * target.h: Fix a typo in comment.
6165
6166 2011-10-31 Pedro Alves <pedro@codesourcery.com>
6167
6168 * mem-break.c (check_mem_write): Add `myaddr' parameter. Don't
6169 clobber the breakpoints' shadows with fast tracepoint jumps.
6170 * mem-break.h (check_mem_write): Add `myaddr' parameter.
6171 * target.c (write_inferior_memory): Also pass MYADDR down to
6172 check_mem_write.
6173
6174 2011-10-07 Ulrich Weigand <ulrich.weigand@linaro.org>
6175
6176 * configure.ac: Check support for personality routine.
6177 * configure: Regenerate.
6178 * config.in: Likewise.
6179 * linux-low.c: Include <sys/personality.h>.
6180 Define ADDR_NO_RANDOMIZE if necessary.
6181 (linux_create_inferior): Disable address space randomization when
6182 forking inferior, if requested.
6183 (linux_supports_disable_randomization): New function.
6184 (linux_target_ops): Install it.
6185 * server.h (disable_randomization): Declare.
6186 * server.c (disable_randomization): New global variable.
6187 (handle_general_set): Handle QDisableRandomization.
6188 (handle_query): Likewise for qSupported.
6189 (main): Support --disable-randomization and --no-disable-randomization
6190 command line arguments.
6191 * target.h (struct target_ops): Add supports_disable_randomization.
6192 (target_supports_disable_randomization): New macro.
6193
6194 2011-09-29 Mike Frysinger <vapier@gentoo.org>
6195
6196 * linux-low.c (target_loadseg): Add defined PTRACE_GETFDPIC to the
6197 ifdef check.
6198 [PT_GETDSBT] (target_loadmap): Wrap in a defined PT_GETDSBT check.
6199 [!PT_GETDSBT] (target_loadmap): New definition.
6200 (LINUX_LOADMAP, LINUX_LOADMAP_EXEC, LINUX_LOADMAP_INTERP): Define.
6201 (linux_read_loadmap): Change PTRACE_GETDSBT_EXEC to
6202 LINUX_LOADMAP_EXEC, PTRACE_GETDSBT_INTERP to LINUX_LOADMAP_INTERP,
6203 and PT_GETDSBT to LINUX_LOADMAP.
6204 [!PT_GETDSBT] (linux_read_loadmap): Define to NULL.
6205 (linux_target_ops): Delete unnecessary ifdef PT_GETDSBT check.
6206
6207 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6208
6209 * linux-arm-low.c (struct arm_linux_hwbp_cap): Remove.
6210 (arm_linux_hwbp_cap): New static variable.
6211 (arm_linux_get_hwbp_cap): Replace by ...
6212 (arm_linux_init_hwbp_cap): ... this new function.
6213 (arm_linux_get_hw_breakpoint_count): Use arm_linux_hwbp_cap.
6214 (arm_linux_get_hw_watchpoint_count): Likewise.
6215 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6216 (arm_arch_setup): Call arm_linux_init_hwbp_cap.
6217 (arm_prepare_to_resume): Use perror_with_name instead of error.
6218
6219 2011-09-21 Ulrich Weigand <ulrich.weigand@linaro.org>
6220
6221 * linux-arm-low.c: Include <signal.h>.
6222 (PTRACE_GETHBPREGS, PTRACE_SETHBPREGS): Define if necessary.
6223 (struct arm_linux_hwbp_cap): New data type.
6224 (arm_hwbp_type, arm_hwbp_control_t): New typedefs.
6225 (struct arm_linux_hw_breakpoint): New data type.
6226 (MAX_BPTS, MAX_WPTS): Define.
6227 (struct arch_process_info, struct arch_lwp_info): New data types.
6228 (arm_linux_get_hwbp_cap): New function.
6229 (arm_linux_get_hw_breakpoint_count): Likewise.
6230 (arm_linux_get_hw_watchpoint_count): Likewise.
6231 (arm_linux_get_hw_watchpoint_max_length): Likewise.
6232 (arm_hwbp_control_initialize): Likewise.
6233 (arm_hwbp_control_is_enabled): Likewise.
6234 (arm_hwbp_control_is_initialized): Likewise.
6235 (arm_hwbp_control_disable): Likewise.
6236 (arm_linux_hw_breakpoint_equal): Likewise.
6237 (arm_linux_hw_point_initialize): Likewise.
6238 (struct update_registers_data): New data structure.
6239 (update_registers_callback: New function.
6240 (arm_insert_point): Likewise.
6241 (arm_remove_point): Likewise.
6242 (arm_stopped_by_watchpoint): Likewise.
6243 (arm_stopped_data_address): Likewise.
6244 (arm_new_process): Likewise.
6245 (arm_new_thread): Likewise.
6246 (arm_prepare_to_resume): Likewise.
6247 (the_low_target): Register arm_insert_point, arm_remove_point,
6248 arm_stopped_by_watchpoint, arm_stopped_data_address, arm_new_process,
6249 arm_new_thread, and arm_prepare_to_resume.
6250
6251 2011-09-15 Stan Shebs <stan@codesourcery.com>
6252
6253 * server.h (struct emit_ops): Add compare-goto fields.
6254 * tracepoint.c (gdb_agent_op_sizes): New table.
6255 (emit_eq_goto): New function.
6256 (emit_ne_goto): New function.
6257 (emit_lt_goto): New function.
6258 (emit_le_goto): New function.
6259 (emit_gt_goto): New function.
6260 (emit_ge_goto): New function.
6261 (is_goto_target): New function.
6262 (compile_bytecodes): Recognize special cases of compare-goto
6263 combinations and call specialized emitters for them.
6264 * linux-x86-low.c (amd64_emit_eq_goto): New function.
6265 (amd64_emit_ne_goto): New function.
6266 (amd64_emit_lt_goto): New function.
6267 (amd64_emit_le_goto): New function.
6268 (amd64_emit_gt_goto): New function.
6269 (amd64_emit_ge_goto): New function.
6270 (amd64_emit_ops): Add the new functions.
6271 (i386_emit_eq_goto): New function.
6272 (i386_emit_ne_goto): New function.
6273 (i386_emit_lt_goto): New function.
6274 (i386_emit_le_goto): New function.
6275 (i386_emit_gt_goto): New function.
6276 (i386_emit_ge_goto): New function.
6277 (i386_emit_ops): Add the new functions.
6278
6279 2011-09-08 Stan Shebs <stan@codesourcery.com>
6280
6281 * linux-x86-low.c (i386_emit_prologue): Save %ebx.
6282 (i386_emit_epilogue): Restore %ebx.
6283
6284 2011-08-31 Jie Zhang <jzhang918@gmail.com>
6285
6286 * server.c (step_thread): Remove definition.
6287 (process_serial_event): Don't handle Hs.
6288 * server.h (step_thread): Remove declaration.
6289 * target.c (set_desired_inferior): Remove use of step_thread.
6290
6291 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6292
6293 * linux-low.c: Include linux-procfs.h.
6294 (linux_attach_lwp_1): Update comments.
6295 (linux_attach): Scan for existing threads when attaching to a
6296 process that is the tgid.
6297 * Makefile.in: Update dependencies.
6298
6299 2011-08-24 Luis Machado <lgustavo@codesourcery.com>
6300
6301 * configure.srv: Add linux-procfs.o dependencies.
6302
6303 2011-08-14 Yao Qi <yao@codesourcery.com>
6304
6305 * target.h (struct target_ops): Fix indent.
6306 * win32-low.c (win32_target_ops): Fix comment.
6307
6308 2011-08-14 Andrew Jenner <andrew@codesourcery.com>
6309 Yao Qi <yao@codesourcery.com>
6310
6311 * Makefile.in (clean): Remove tic6x-*.c files.
6312 (linux-tic6x-low.o, tic6x-c62x-linux.o, tic6x-c64x-linux.o): New rules.
6313 (tic6x-c64xp-linux.o, tic6x-c62x-linux.c, tic6x-c64x-linux.c): Likewise.
6314 (tic6x-c64xp-linux.c): Likewise.
6315 * configure.srv: Add support for tic6x-*-uclinux.
6316 * linux-tic6x-low.c: New.
6317 * linux-low.c (PT_TEXT_ADDR, PT_DATA_ADDR, PT_TEXT_END_ADDR): Define.
6318
6319 2011-08-14 Andrew Stubbs <ams@codesourcery.com>
6320 Yao Qi <yao@codesourcery.com>
6321
6322 * target.h (struct target_ops): Add read_loadmap.
6323 * linux-low.c (struct target_loadseg): New type.
6324 (struct target_loadmap): New type.
6325 (linux_read_loadmap): New function.
6326 (linux_target_ops): Add linux_read_loadmap.
6327 * server.c (handle_query): Support qXfer:fdpic:read packet.
6328 * win32-low.c (win32_target_ops): Initialize field `read_loadmap'
6329 to NULL.
6330
6331 2011-08-05 Eli Zaretskii <eliz@gnu.org>
6332
6333 * win32-low.c: Include <stdint.h>.
6334
6335 2011-07-22 Pedro Alves <pedro@codesourcery.com>
6336
6337 * i386-low.c (i386_insert_aligned_watchpoint): Don't pass the info
6338 to the inferior here.
6339 (i386_remove_aligned_watchpoint): Ditto.
6340 (i386_handle_nonaligned_watchpoint): Return immediate on fail to
6341 fit part of the watchpoint in the debug registers.
6342 (i386_update_inferior_debug_regs): New.
6343 (i386_low_insert_watchpoint): Work on a local mirror of the debug
6344 registers, and only update the inferior on success.
6345 (i386_low_remove_watchpoint): Ditto.
6346
6347 2011-07-22 Kwok Cheung Yeung <kcy@codesourcery.com>
6348
6349 * linux-low.c (compare_ints, unique, list_threads, show_process,
6350 linux_core_of_thread): Delete.
6351 (linux_target_ops): Change linux_core_of_thread to
6352 linux_common_core_of_thread.
6353 (linux_qxfer_osdata): Defer to linux_common_xfer_osdata.
6354 * utils.c (malloc_failure): Change type of argument.
6355 (xmalloc, xrealloc, xcalloc, xsnprintf): Delete.
6356 * Makefile.in (SFILES): Add common/common-utils.c, common/xml-utils.c,
6357 common/linux-osdata.c, common/ptid.c and common/buffer.c.
6358 (OBS): Add xml-utils.o, common-utils.o, ptid.o and buffer.o.
6359 (IPA_OBJS): Add common-utils-ipa.o.
6360 (ptid_h, linux_osdata_h): New macros.
6361 (server_h): Add common/common-utils.h, common/xml-utils.h,
6362 common/buffer.h, common/gdb_assert.h, common/gdb_locale.h and
6363 common/ptid.h.
6364 (common-utils-ipa.o, common-utils.o, xml-utils.o, linux-osdata.o,
6365 ptid.o, buffer.o): New rules.
6366 (linux-low.o): Add common/linux-osdata.h as a dependency.
6367 * configure.srv (srv_tgtobj): Add linux-osdata.o to Linux targets.
6368 * configure.ac: Add AC_HEADER_DIRENT check.
6369 * config.in: Regenerate.
6370 * configure: Regenerate.
6371 * remote-utils.c (xml_escape_text): Delete.
6372 (buffer_grow, buffer_free, buffer_init, buffer_finish,
6373 buffer_xml_printf): Move to common/buffer.c.
6374 * server.c (main): Remove call to initialize_inferiors.
6375 * server.h (struct ptid, ptid_t, minus_one_ptid, null_ptid,
6376 ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp, ptid_get_tid,
6377 ptid_equal, ptid_is_pid, initialize_inferiors, xml_escape_text,
6378 internal_error, gdb_assert, gdb_assert_fail): Delete.
6379 (struct buffer, buffer_grow, buffer_free, buffer_init, buffer_finish,
6380 buffer_xml_printf, buffer_grow_str, buffer_grow_str0): Move to
6381 common/buffer.h.
6382 * inferiors.c (null_ptid, minus_one_ptid, ptid_build, pid_to_ptid,
6383 ptid_get_pid, ptid_get_lwp, ptid_get_tid, ptid_equal, ptid_is_pid,
6384 initialize_inferiors): Delete.
6385
6386 2011-07-20 Pedro Alves <pedro@codesourcery.com>
6387
6388 * tracepoint.c (tracepoint_look_up_symbols): Return upon the first
6389 symbol error.
6390
6391 2011-05-31 Pedro Alves <pedro@codesourcery.com>
6392
6393 * linux-x86-low.c (i386_dr_low_get_addr): Fix off by one in
6394 assertion.
6395 * win32-i386-low.c (i386_dr_low_get_addr): Ditto.
6396
6397 2011-05-26 Yao Qi <yao@codesourcery.com>
6398
6399 * Makefile.in (thread-db.o): Track dependence to
6400 common/gdb_thread_db.h.
6401 * thread-db.c: include gdb_thread_db.h from right place.
6402
6403 2011-05-16 Adrian Cornish <gnu@bluedreamer.com>
6404
6405 * linux-i386-ipa.c (supply_static_tracepoint_registers): Pass
6406 __FILE__ and __LINE__ to internal_error.
6407
6408 2011-05-13 Doug Evans <dje@google.com>
6409
6410 * thread-db.c (try_thread_db_load_from_sdir): New function.
6411 (try_thread_db_load_from_dir): New function.
6412 (thread_db_load_search): Handle $sdir, ignore $pdir.
6413 Remove trying of system directories if search of
6414 libthread-db-search-path fails, that is now done via $sdir.
6415
6416 2011-05-12 Kwok Cheung Yeung <kcy@codesourcery.com>
6417
6418 * server.c (handle_query): Add EnableDisableTracepoints to the list
6419 of supported features.
6420 * tracepoint.c (clear_installed_tracepoints): Uninstall disabled
6421 tracepoints.
6422 (cmd_qtenable_disable): New.
6423 (cmd_qtstart): Install tracepoints even if disabled.
6424 (handle_tracepoint_general_set): Add call to cmd_qtenable_disable on
6425 receiving a QTEnable or QTDisable packet.
6426 (gdb_collect): Skip data collection if fast tracepoint is disabled.
6427 (ust_marker_to_static_tracepoint): Do not ignore disabled static
6428 tracepoints.
6429 (gdb_probe): Skip data collection if static tracepoint is disabled.
6430
6431 2011-05-10 Doug Evans <dje@google.com>
6432
6433 * thread-db.c (thread_db_handle_monitor_command): Handle elided path.
6434
6435 2011-05-04 Doug Evans <dje@google.com>
6436
6437 * linux-low.c (linux_join): Skip process lookup.
6438 * spu-low.c (spu_join): Ditto.
6439 * server.c (join_inferiors_callback): Delete.
6440 (process_serial_event): For 'D' packet (detach) call join_inferior
6441 directly.
6442
6443 2011-05-04 Joseph Myers <joseph@codesourcery.com>
6444
6445 * README: Don't mention xscale*-*-linux*.
6446 * configure.srv (xscale*-*-linux*): Don't handle target.
6447
6448 2011-04-27 Nathan Froyd <froydnj@codesourcery.com>
6449
6450 * linux-x86-low.c (amd64_emit_const): Call memcpy instead of
6451 casting pointers.
6452 (amd64_emit_reg, amd64_emit_int_call_1, amd64_emit_void_call_2):
6453 (i386_emit_const, i386_emit_reg, i386_emit_int_call_1):
6454 (i386_emit_void_call_2): Likewise.
6455
6456 2011-04-26 Yao Qi <yao@codesourcery.com>
6457
6458 * linux-low.c: Move common macros to linux-ptrace.h.
6459 Include linux-ptrace.h.
6460 * Makefile.in (linux_ptrace_h): New.
6461 (linux-low.o): Depends on linux-ptrace.h.
6462
6463 2011-04-24 Jan Kratochvil <jan.kratochvil@redhat.com>
6464
6465 * remote-utils.c (handle_accept_event): Close LISTEN_DESC only if
6466 RUN_ONCE. Comment for the LISTEN_DESC delete_file_handler call.
6467 (remote_prepare): New function with most of the TCP code from ...
6468 (remote_open): ... here. Detect PORT here unconditionally. Move also
6469 setting transport_is_reliable.
6470 * server.c (run_once): New variable.
6471 (gdbserver_usage): Document it.
6472 (main): Set run_once for `--once'. Call remote_prepare. Exit after
6473 the first run if RUN_ONCE.
6474 * server.h (run_once, remote_prepare): New declarations.
6475
6476 2011-04-19 Tom Tromey <tromey@redhat.com>
6477
6478 * win32-low.c (handle_load_dll): Remove duplicate "the".
6479
6480 2011-04-07 Pierre Muller <muller@ics.u-strasbg.fr>
6481
6482 Remove support for old Cygwin 1.5 versions.
6483 * win32-low.c (win32_create_inferior): Use new cygwin_path_list
6484 function to avoid warning.
6485 (win32_add_one_solib): Use cygwin_conv_path function to avoid
6486 warning.
6487
6488 2011-03-18 Pierre Muller <muller@ics.u-strasbg.fr>
6489
6490 * gdbserver/server.h (Macro _): Define it if not available.
6491
6492 2011-03-14 Michael Snyder <msnyder@vmware.com>
6493
6494 * hostio.c (handle_close): Remove unnecessary null test.
6495
6496 2011-03-10 Joel Brobecker <brobecker@adacore.com>
6497
6498 * Makefile.in (maintainer-clean realclean distclean): Remove
6499 "make ... subdir_do" command.
6500
6501 2011-03-10 Michael Snyder <msnyder@vmware.com>
6502
6503 * tracepoint.c (tracepoint_finish_step): Fix loop variable.
6504
6505 * server.c (handle_v_run): Free alloced buffer on early return.
6506
6507 2011-03-09 Yao Qi <yao@codesourcery.com>
6508
6509 Revert:
6510 2011-03-04 Yao Qi <yao@codesourcery.com>
6511
6512 * Makefile.in: Remove GNU make feature --directory.
6513
6514 2011-03-05 Yao Qi <yao@codesourcery.com>
6515
6516 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6517 (subdir_do): New make target. Copied from gdb/Makefile.
6518 (maintainer-clean, realclean, distclean, clean): Call corresponding
6519 make targets in common/Makefile.
6520
6521 2011-02-11 Yao Qi <yao@codesourcery.com>
6522
6523 * configure.ac: Call AC_PROG_RANLIB.
6524 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6525 * configure: Regenerate.
6526
6527 2011-03-07 Jan Kratochvil <jan.kratochvil@redhat.com>
6528
6529 * remote-utils.c (putpkt_binary_1): Calculate BUF2 size dynamically.
6530
6531 2011-03-06 Yao Qi <yao@codesourcery.com>
6532
6533 * Makefile.in (REQUIRED_SUBDIRS): Remove $(LIBCOMMON_DIR).
6534
6535 2011-03-05 Yao Qi <yao@codesourcery.com>
6536
6537 * Makefile.in (CLEANDIRS, REQUIRED_SUBDIRS): New variable.
6538 (subdir_do): New make target. Copied from gdb/Makefile.
6539 (maintainer-clean, realclean, distclean, clean): Call corresponding
6540 make targets in common/Makefile.
6541
6542 2011-03-04 Yao Qi <yao@codesourcery.com>
6543
6544 * Makefile.in: Remove GNU make feature --directory.
6545
6546 2011-03-04 Michael Snyder <msnyder@vmware.com>
6547
6548 * server.c (queue_stop_reply): Call xmalloc not malloc.
6549
6550 2011-03-02 Michael Snyder <msnyder@vmware.com>
6551
6552 * linux-arm-low.c (arm_arch_setup): Replace malloc with xmalloc.
6553
6554 2011-02-28 Michael Snyder <msnyder@vmware.com>
6555
6556 * tracepoint.c (cmd_qtv): Discard unused value 'packet'.
6557 (cmd_qtframe): Ditto.
6558 (cmd_qtbuffer): Ditto.
6559 (cmd_bigqtbuffer): Ditto.
6560
6561 * utils.c (decimal2str): Initialize 'width' to nine, then
6562 don't mess with it.
6563
6564 2011-02-28 Ulrich Weigand <uweigand@de.ibm.com>
6565
6566 * hostio.c (require_data): Free *data, not data.
6567
6568 2011-02-28 Jan Kratochvil <jan.kratochvil@redhat.com>
6569
6570 * hostio.c (require_data): Use free, not xfree.
6571
6572 2011-02-27 Michael Snyder <msnyder@vmware.com>
6573
6574 * server.c (handle_query): Discard unused value.
6575
6576 * hostio.c (require_data): Free malloc memory before returning
6577 error.
6578
6579 2011-02-26 Michael Snyder <msnyder@vmware.com>
6580
6581 * linux-low.c (list_threads): Call closedir for dirent.
6582
6583 2011-02-27 Michael Snyder <msnyder@vmware.com>
6584
6585 * i386-low.c (i386-length_and_rw_bits): Comment the fact that
6586 a case statement falls through.
6587
6588 * linux-low.c (linux_xfer_siginfo): Fix fencepost error.
6589
6590 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): Fix fencepost error
6591 in comparison.
6592
6593 2011-02-26 Michael Snyder <msnyder@vmware.com>
6594
6595 * utils.c (decimal2str): Eliminate dead code and dead param.
6596 (pulongest): Drop dead param from call to decimal2str.
6597 (plongest): Ditto.
6598
6599 2011-02-24 Joel Brobecker <brobecker@adacore.com>
6600
6601 Revert the following patch (not approved yet):
6602 2011-02-21 Hui Zhu <teawater@gmail.com>
6603 * tracepoint.c (tp_printf): New function.
6604 (eval_agent_expr): Handle gdb_agent_op_printf.
6605
6606 2011-02-21 Hui Zhu <teawater@gmail.com>
6607
6608 * tracepoint.c (tp_printf): New function.
6609 (eval_agent_expr): Handle gdb_agent_op_printf.
6610
6611 2011-02-18 Tom Tromey <tromey@redhat.com>
6612
6613 * Makefile.in (tracepoint-ipa.o): Depend on ax.def.
6614 (tracepoint.o): Likewise.
6615 * tracepoint.c (enum gdb_agent_op): Use ax.def.
6616 (gdb_agent_op_names): Likewise.
6617
6618 2011-02-18 Tom Tromey <tromey@redhat.com>
6619
6620 * tracepoint.c (enum gdb_agent_op) <gdb_agent_op_pick,
6621 gdb_agent_op_rot>: New constants.
6622 (gdb_agent_op_names): Add pick and roll.
6623 (eval_agent_expr) <gdb_agent_op_pick, gdb_agent_op_rot>: New
6624 cases.
6625
6626 2011-02-15 Jan Kratochvil <jan.kratochvil@redhat.com>
6627
6628 * aclocal.m4: Regenerated with aclocal-1.11.1.
6629
6630 2011-02-14 Pedro Alves <pedro@codesourcery.com>
6631
6632 * server.c (handle_qxfer_traceframe_info): New.
6633 (qxfer_packets): Register "traceframe-info".
6634 (handle_query): Report support for qXfer:traceframe-info:read+.
6635 * tracepoint.c (match_blocktype): New.
6636 (traceframe_find_block_type): Rename to ...
6637 (traceframe_walk_blocks): ... this. Add callback filter argument,
6638 and use it.
6639 (traceframe_find_block_type): New, reimplemented on top of
6640 traceframe_walk_blocks.
6641 (build_traceframe_info_xml): New.
6642 (traceframe_read_info): New.
6643 * server.h (traceframe_read_info): Declare.
6644
6645 2011-02-11 Yao Qi <yao@codesourcery.com>
6646
6647 * configure.ac: Call AC_PROG_RANLIB.
6648 * Makefile.in: Remove signals.o from OBS. Link libcommon.a.
6649 * configure: Regenerate.
6650
6651 2011-02-07 Pedro Alves <pedro@codesourcery.com>
6652
6653 * server.c (gdb_read_memory): Change return semantics to allow
6654 partial transfers.
6655 (handle_search_memory_1): Adjust.
6656 (process_serial_event) <'m' packet>: Handle partial transfers.
6657 * tracepoint.c (traceframe_read_mem): Handle partial transfers.
6658
6659 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6660
6661 * regcache.c (init_register_cache): Initialize
6662 regcache->register_status.
6663 (free_register_cache): Release regcache->register_status.
6664 (regcache_cpy): Copy register_status.
6665 (registers_to_string): Print 'x's for unavailable registers.
6666 (supply_register): Mark the register's status valid or
6667 unavailable, depending on whether a buffer was passed in or not.
6668 (supply_register_zeroed): New.
6669 (supply_regblock): Mark the registers' status valid or
6670 unavailable, depending on whether a buffer was passed in or not.
6671 * regcache.h (REG_UNAVAILABLE, REG_VALID): New defines.
6672 (struct regcache): New `register_status' field.
6673 (supply_register_zeroed): Declare.
6674 * i387-fp.c (i387_xsave_to_cache): Zero out registers using
6675 supply_register_zeroed, rather than passing a NULL buffer to
6676 supply_register.
6677 * tracepoint.c (fetch_traceframe_registers): Update comment.
6678
6679 2011-01-28 Pedro Alves <pedro@codesourcery.com>
6680
6681 * i387-fp.c (i387_xsave_to_cache): Make passing NULL as register
6682 buffer explicit.
6683
6684 2011-01-25 Pedro Alves <pedro@codesourcery.com>
6685
6686 * server.h (decode_xfer_write): Change prototype.
6687 * remote-utils.c (decode_xfer_write): Remove `annex' parameter,
6688 and don't extract the annex here.
6689 * server.c (decode_xfer_read): Remove `annex' parameter,
6690 and don't extract the annex here.
6691 (decode_xfer): New.
6692 (struct qxfer): New.
6693 (handle_qxfer_auxv, handle_qxfer_features, handle_qxfer_libraries)
6694 (handle_qxfer_osdata, handle_qxfer_siginfo, handle_qxfer_spu)
6695 (handle_qxfer_statictrace): New functions, abstracted out from
6696 handle_query, and made to use the struct qxfer interface.
6697 (handle_threads_qxfer_proper): Rename to ...
6698 (handle_qxfer_threads_proper): ... this.
6699 (handle_threads_qxfer): Rename to ...
6700 (handle_qxfer_threads): ... this. Adjust.
6701 (qxfer_packets): New array.
6702 (handle_qxfer): New function.
6703 (handle_query): Use handle_qxfer.
6704
6705 2011-01-05 Michael Snyder <msnyder@msnyder-server.eng.vmware.com>
6706
6707 * gdbreplay.c: Shorten lines of >= 80 columns.
6708 * linux-low.c: Ditto.
6709 * linux-ppc-low.c: Ditto.
6710 * linux-s390-low.c: Ditto.
6711 * linux-sparc-low.c: Ditto.
6712 * linux-x86-low.c: Ditto.
6713 * linux-xtensa-low.c: Ditto.
6714 * mem-break.c: Ditto.
6715 * nto-low.c: Ditto.
6716 * regcache.h: Ditto.
6717 * remote-utils.c: Ditto.
6718 * server.c: Ditto.
6719 * server.h: Ditto.
6720 * thread-db.c: Ditto.
6721 * tracepoint.c: Ditto.
6722 * utils.c: Ditto.
6723 * win32-low.h: Ditto.
6724
6725 2011-01-05 Joel Brobecker <brobecker@adacore.com>
6726
6727 * gdbserver/configure.ac, gdbserver/gdbserver.1: Copyright year
6728 update.
6729
6730 2011-01-01 Joel Brobecker <brobecker@adacore.com>
6731
6732 * server.c (gdbserver_version): Update copyright year in version
6733 output.
6734 * gdbreplay.c (gdbreplay_version): Ditto.
6735
6736 2010-12-29 Jie Zhang <jie.zhang@analog.com>
6737
6738 * configure.srv (bfin-*-*linux*): Handle Blackfin/Linux targets.
6739 * linux-bfin-low.c: New file.
6740 * linux-low.c: Define PT_TEXT_ADDR, PT_TEXT_END_ADDR, and
6741 PT_DATA_ADDR for BFIN targets.
6742 * Makefile.in (SFILES): Add linux-bfin-low.c.
6743 (clean): Remove reg-bfin.c.
6744 (linux-bfin-low.o, reg-bfin.o, reg-bfin.c): New targets.
6745 * README: Mention supported Blackfin targets.
6746
6747 2010-12-23 Mike Frysinger <vapier@gentoo.org>
6748
6749 * .gitignore: New file.
6750
6751 2010-11-16 Mike Frysinger <vapier@gentoo.org>
6752
6753 * linux-low.c (linux_tracefork_child): Add char* cast to arg.
6754
6755 2010-10-22 Jie Zhang <jie@codesourcery.com>
6756
6757 * Makefile.in: Add FLAGS_TO_PASS variable.
6758 (install): Remove dependency of install-only and recursively
6759 invoke make for install-only.
6760
6761 2010-10-04 Doug Evans <dje@google.com>
6762
6763 * Makefile.in (uninstall): Use $(DESTDIR).
6764
6765 2010-09-24 Pedro Alves <pedro@codesourcery.com>
6766
6767 PR gdb/11842
6768
6769 * linux-x86-low.c (compat_siginfo_from_siginfo)
6770 (siginfo_from_compat_siginfo): Also copy si_pid and si_uid when
6771 si_code is < 0. Check for si_code == SI_TIMER before checking for
6772 si_code < 0.
6773
6774 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6775
6776 * lynx-i386-low.c: New file.
6777 * configure.srv: Add handling of i[34567]86-*-lynxos* targets.
6778
6779 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6780
6781 * lynx-low.c (ptrace_request_to_str): Remove handling for
6782 request values that have been removed in LynxOS 5.x.
6783
6784 2010-09-13 Joel Brobecker <brobecker@adacore.com>
6785
6786 * lynx-low.c, lynx-ppc-loc.c: Include <sys/ptrace.h> instead of
6787 <ptrace.h>
6788
6789 2010-09-09 Nathan Sidwell <nathan@codesourcery.com>
6790
6791 * configure.ac: Add --enable-inprocess-agent option.
6792 * configure: Rebuilt.
6793
6794 2010-09-06 Yao Qi <yao@codesourcery.com>
6795
6796 * linux-low.c (linux_kill): Remove unused variable.
6797 (linux_stabilize_threads): Likewise.
6798 * server.c (start_inferior): Likewise.
6799 (queue_stop_reply_callback): Likewise.
6800 * tracepoint.c (do_action_at_tracepoint): Likewise.
6801
6802 2010-09-06 Yao Qi <yao@codesourcery.com>
6803
6804 * linux-low.c (maybe_move_out_of_jump_pad): Restore current_inferior
6805 on return.
6806
6807 2010-09-06 Jan Kratochvil <jan.kratochvil@redhat.com>
6808
6809 * target.c (mywait) <TARGET_WAITKIND_EXITED>: Fix to use INTEGER.
6810
6811 2010-09-06 Pedro Alves <pedro@codesourcery.com>
6812
6813 * Makefile.in (install-only): Replace $IPA_DEPFILES with
6814 "$(IPA_DEPFILES)".
6815
6816 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6817
6818 * gdbserver/lynx-low.c, gdbserver/lynx-low.h,
6819 gdbserver/lynx-ppc-low.c: New files.
6820 * Makefile.in (lynx_low_h): New variable.
6821 (lynx-low.o, lynx-ppc-low.o): New rules.
6822 * configure.ac: On LynxOS, link with -lnetinet.
6823 * configure.srv: Add handling of powerpc-*-lynxos* targets.
6824 * configure: regenerate.
6825
6826 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6827
6828 * Makefile.in (vasprintf.o, vsnprintf.o): New rules.
6829 * configure.ac: Add check for vasprintf and vsnprintf.
6830 * configure, config.in: Regenerate.
6831 * server.h (vasprintf, vsnprintf): Add conditional declarations.
6832
6833 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6834
6835 * gdbreplay.c: Move include of alloca.h up, next to include of
6836 malloc.h.
6837 * server.h: Add include of malloc.h.
6838 * mem-break.c: Remove include of malloc.h.
6839 * server.c, tracepoint.c, utils.c, win32-low.c: Likewise.
6840
6841 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6842
6843 * Makefile.in (memmem.o): Build with -Wno-error.
6844
6845 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6846
6847 * utils.c (xsnprintf): Make non-static.
6848 * server.h: Add xsnprintf declaration.
6849 * linux-low.c, nto-low.c, target.c, thread-db.c, tracepoint.c:
6850 replace calls to snprintf by calls to xsnprintf throughout.
6851
6852 2010-09-01 Joel Brobecker <brobecker@adacore.com>
6853
6854 * configure.ac: Add configure check for alloca.
6855 * configure, config.in: Regenerate.
6856 * server.h: Include alloca.h if it exists.
6857 * gdbreplay.c: Include alloca.h if it exists.
6858
6859 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6860
6861 * linux-low.c (__SIGRTMIN): Define if not already defined.
6862 (linux_create_inferior): Check for __ANDROID__ rather than
6863 __SIGRTMIN.
6864 (enqueue_one_deferred_signal): Don't requeue non-RT signals that
6865 are already deferred.
6866 (linux_wait_1): Check for __ANDROID__ rather than __SIGRTMIN.
6867 (linux_resume_one_thread): Don't queue a SIGSTOP if the lwp is
6868 stopped and already has a pending signal to report.
6869 (proceed_one_lwp): : Don't queue a SIGSTOP if the lwp already has
6870 a pending signal to report or is moving out of a jump pad.
6871 (linux_init_signals): Check for __ANDROID__ rather than
6872 __SIGRTMIN.
6873
6874 2010-08-28 Pedro Alves <pedro@codesourcery.com>
6875
6876 * linux-low.c (linux_stabilize_threads): Wrap debug output in a
6877 debug_threads check. Avoid a linear search when not doing debug
6878 output.
6879
6880 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6881
6882 * event-loop.c (event_handle_func): Adjust to use gdb_fildes_t.
6883 (struct gdb_event) <fd>: Change type to gdb_fildes_t.
6884 (struct file_handler) <fd>: Change type to gdb_fildes_t.
6885 (process_event): Change local fd's type to gdb_fildes_t.
6886 (create_file_handler): Adjust prototype.
6887 (delete_file_handler): Adjust prototype.
6888 (handle_file_event): Adjust prototype. Use pfildes.
6889 (create_file_event): Adjsut prototype.
6890 * remote-utils.c (remote_desc, listen_desc): Change type to
6891 gdb_fildes_t.
6892 * server.h: New gdb_fildes_t typedef.
6893 [USE_WIN32API]: Include winsock2.h.
6894 (delete_file_handler, add_file_handler): Adjust prototypes.
6895 (pfildes): Declare.
6896 * utils.c (pfildes): New.
6897
6898 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6899
6900 * configure.ac (build_warnings): Add -Wno-char-subscripts.
6901 * configure: Regenerate.
6902
6903 2010-08-27 Pedro Alves <pedro@codesourcery.com>
6904
6905 * linux-low.c (linux_unprepare_to_access_memory): Rename to ...
6906 (linux_done_accessing_memory): ... this.
6907 (linux_target_ops): Adjust.
6908 * linux-x86-low.c (x86_insert_point, x86_remove_point): Adjust.
6909 * nto-low.c (nto_target_ops): Adjust comment.
6910 * server.c (gdb_read_memory, gdb_write_memory): Adjust.
6911 * spu-low.c (spu_target_ops): Adjust comment.
6912 * target.h (target_ops): Rename unprepare_to_access_memory field
6913 to done_accessing_memory.
6914 (unprepare_to_access_memory): Rename to ...
6915 (done_accessing_memory): ... this.
6916
6917 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6918
6919 * linux-low.c (linux_prepare_to_access_memory): New.
6920 (linux_unprepare_to_access_memory): New.
6921 (linux_target_ops): Install them.
6922 * server.c (read_memory): Rename to ...
6923 (gdb_read_memory): ... this. Use
6924 prepare_to_access_memory/prepare_to_access_memory.
6925 (write_memory): Rename to ...
6926 (gdb_write_memory): ... this. Use
6927 prepare_to_access_memory/prepare_to_access_memory.
6928 (handle_search_memory_1): Adjust.
6929 (process_serial_event): Adjust.
6930 * target.h (struct target_ops): New fields
6931 prepare_to_access_memory and unprepare_to_access_memory.
6932 (prepare_to_access_memory, unprepare_to_access_memory): New.
6933 * linux-x86-low.c (x86_insert_point, x86_remove_point): Use
6934 prepare_to_access_memory/prepare_to_access_memory.
6935 * nto-low.c (nto_target_ops): Adjust.
6936 * spu-low.c (spu_target_ops): Adjust.
6937 * win32-low.c (win32_target_ops): Adjust.
6938
6939 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6940
6941 * Makefile.in (WARN_CFLAGS): Get it from configure.
6942 (WERROR_CFLAGS): New.
6943 (INTERNAL_CFLAGS): Add WERROR_CFLAGS.
6944 * configure.ac: Introduce --enable-werror, which adds -Werror to
6945 the compiler command line. Enabled by default. Disable with
6946 --disable-werror. Add -Wdeclaration-after-statement
6947 Wpointer-arith and -Wformat-nonliteral to warning flags.
6948 * configure: Regenerate.
6949
6950 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6951
6952 * mem-break.c [HAVE_MALLOC_H]: Include malloc.h.
6953
6954 2010-08-26 Pedro Alves <pedro@codesourcery.com>
6955
6956 * gdbreplay.c (remote_error): New.
6957 (gdbchar): New.
6958 (expect): Use gdbchar. Check for error reading from GDB.
6959 Clarify sync error output.
6960 (play): Check for errors writing to GDB.
6961 * linux-low.c (sigchld_handler): Really ignore `write' errors.
6962 * remote-utils.c (getpkt): Check for errors writing to the remote
6963 descriptor.
6964
6965 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6966
6967 * linux-low.c (linux_wait_1): Move non-debugging code out of
6968 `debug_threads' control.
6969
6970 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6971
6972 * linux-low.c (linux_wait_1): Don't set last_status here.
6973 * server.c (push_event, queue_stop_reply_callback): Assert we're
6974 not pushing a TARGET_WAITKIND_IGNORE event.
6975 (start_inferior, start_inferior, attach_inferior, handle_v_cont)
6976 (myresume, handle_target_event): Set the thread's last_resume_kind
6977 and last_status from the target returned status.
6978
6979 2010-08-25 Pedro Alves <pedro@codesourcery.com>
6980
6981 PR threads/10729
6982
6983 * linux-x86-low.c (update_debug_registers_callback): New.
6984 (i386_dr_low_set_addr): Use it.
6985 (i386_dr_low_get_addr): New.
6986 (i386_dr_low_set_control): Use update_debug_registers_callback.
6987 (i386_dr_low_get_control): New.
6988 (i386_dr_low_get_status): Adjust.
6989 * linux-low.c (linux_stop_lwp): New.
6990 * linux-low.h (linux_stop_lwp): Declare.
6991
6992 * i386-low.c (I386_DR_GET_RW_LEN): Take the dr7 contents as
6993 argument instead of a i386_debug_reg_state.
6994 (I386_DR_WATCH_HIT): Take the dr6 contents as argument instead of
6995 a i386_debug_reg_state.
6996 (i386_insert_aligned_watchpoint): Adjust.
6997 (i386_remove_aligned_watchpoint): Adjust.
6998 (i386_low_stopped_data_address): Read the debug registers from the
6999 inferior instead of from the mirrors.
7000 * i386-low.h (struct i386_debug_reg_state): Extend comment.
7001 (i386_dr_low_get_addr): Declare.
7002 (i386_dr_low_get_control): Declare.
7003 (i386_dr_low_get_status): Change prototype.
7004
7005 * win32-i386-low.c (dr_status_mirror, dr_control_mirror): New globals.
7006 (i386_dr_low_get_addr): New.
7007 (i386_dr_low_get_control): New.
7008 (i386_dr_low_get_status): Adjust prototype. Return
7009 dr_status_mirror.
7010 (i386_initial_stuff): Clear dr_status_mirror and
7011 dr_control_mirror.
7012 (i386_get_thread_context): Adjust.
7013 (i386_set_thread_context): Adjust.
7014 (i386_thread_added): Adjust.
7015
7016 2010-08-24 Pedro Alves <pedro@codesourcery.com>
7017
7018 * linux-low.h (linux_thread_area): Delete declaration.
7019
7020 2010-08-11 Thomas Schwinge <thomas@codesourcery.com>
7021
7022 * linux-low.c (linux_wait_1): Correctly return the ptid of the child
7023 after its termination.
7024
7025 2010-08-09 Pedro Alves <pedro@codesourcery.com>
7026
7027 * linux-low.c (gdb_wants_lwp_stopped): Delete.
7028 (gdb_wants_all_stopped): Delete.
7029 (linux_wait_1): Don't call them.
7030 * server.c (handle_v_cont): Tag all threads as want-stopped.
7031 (gdb_wants_thread_stopped): Fix comments. Tag the thread that
7032 stopped as "client-wants-stopped".
7033
7034 2010-07-31 Pedro Alves <pedro@codesourcery.com>
7035
7036 * Makefile.in (signals_h): New.
7037 (server_h): Depend on it.
7038 (server.o): Don't depend on $(signals_def).
7039 (signals.o): Depend on $(signals_def).
7040
7041 2010-07-31 Jan Kratochvil <jan.kratochvil@redhat.com>
7042
7043 * Makefile.in (signals_def): New.
7044 (server_h): Append include/gdb/signals.h and signals_def.
7045 (server.o): Append signals_def.
7046
7047 2010-07-25 Jan Kratochvil <jan.kratochvil@redhat.com>
7048
7049 * server.c (handle_target_event): Use target_signal_to_host for
7050 resume_info.sig initialization.
7051 * target.h (struct thread_resume) <sig>: New comment.
7052
7053 2010-07-20 Ozkan Sezer <sezeroz@gmail.com>
7054
7055 * server.c (handle_query): strcpy() the returned string from paddress()
7056 instead of sprintf().
7057 * utils.c (paddress): Return phex_nz().
7058
7059 2010-07-07 Joel Brobecker <brobecker@adacore.com>
7060
7061 * server.c (handle_v_cont): Call mourn_inferior if process
7062 just exited.
7063 (myresume): Likewise.
7064
7065 2010-07-01 Pedro Alves <pedro@codesourcery.com>
7066
7067 Static tracepoints, and integration with UST.
7068
7069 * configure.ac: Handle --with-ust. substitute ustlibs and ustinc.
7070 * mem-break.c (uninsert_all_breakpoints)
7071 (reinsert_all_breakpoints): New.
7072 * mem-break.h (reinsert_all_breakpoints, uninsert_all_breakpoints):
7073 * tracepoint.c (ust_loaded, helper_thread_id, cmd_buf): New.
7074 (gdb_agent_ust_loaded, helper_thread_id)
7075 (gdb_agent_helper_thread_id): New macros.
7076 (struct ipa_sym_addresses): Add addr_ust_loaded,
7077 addr_helper_thread_id, addr_cmd_buf.
7078 (symbol_list): Add ust_loaded, helper_thread_id, cmd_buf.
7079 (in_process_agent_loaded_ust): New.
7080 (write_e_ust_not_loaded): New.
7081 (maybe_write_ipa_ust_not_loaded): New.
7082 (struct collect_static_trace_data_action): New.
7083 (enum tracepoint_type) <static_tracepoint>: New.
7084 (struct tracepoint) <handle>: Mention static tracepoints.
7085 (struct static_tracepoint_ctx): New.
7086 (CMD_BUF_SIZE): New.
7087 (add_tracepoint_action): Handle static tracepoint actions.
7088 (unprobe_marker_at): New.
7089 (clear_installed_tracepoints): Handle static tracepoints.
7090 (cmd_qtdp): Handle static tracepoints.
7091 (probe_marker_at): New.
7092 (cmd_qtstart): Handle static tracepoints.
7093 (response_tracepoint): Handle static tracepoints.
7094 (cmd_qtfstm, cmd_qtsstm, cmd_qtstmat): New.
7095 (handle_tracepoint_query): Handle qTfSTM, qTsSTM and qTSTMat.
7096 (get_context_regcache): Handle static tracepoints.
7097 (do_action_at_tracepoint): Handle static tracepoint actions.
7098 (traceframe_find_block_type): Handle static trace data blocks.
7099 (traceframe_read_sdata): New.
7100 (download_tracepoints): Download static tracepoint actions.
7101 [HAVE_UST] Include ust/ust.h, dlfcn.h, sys/socket.h, and sys/un.h.
7102 (GDB_PROBE_NAME): New.
7103 (ust_ops): New.
7104 (GET_UST_SYM): New.
7105 (USTF): New.
7106 (dlsym_ust): New.
7107 (ust_marker_to_static_tracepoint): New.
7108 (gdb_probe): New.
7109 (collect_ust_data_at_tracepoint): New.
7110 (gdb_ust_probe): New.
7111 (UNIX_PATH_MAX, SOCK_DIR): New.
7112 (gdb_ust_connect_sync_socket): New.
7113 (resume_thread, stop_thread): New.
7114 (run_inferior_command): New.
7115 (init_named_socket): New.
7116 (gdb_ust_socket_init): New.
7117 (cstr_to_hexstr): New.
7118 (next_st): New.
7119 (first_marker, next_marker): New.
7120 (response_ust_marker): New.
7121 (cmd_qtfstm, cmd_qtsstm): New.
7122 (unprobe_marker_at, probe_marker_at): New.
7123 (cmd_qtstmat, gdb_ust_thread): New.
7124 (gdb_ust_init): New.
7125 (initialize_tracepoint_ftlib): Call gdb_ust_init.
7126 * linux-amd64-ipa.c [HAVE_UST]: Include ust/processor.h
7127 (ST_REGENTRY): New.
7128 (x86_64_st_collect_regmap): New.
7129 (X86_64_NUM_ST_COLLECT_GREGS): New.
7130 (AMD64_RIP_REGNUM): New.
7131 (supply_static_tracepoint_registers): New.
7132 * linux-i386-ipa.c [HAVE_UST]: Include ust/processor.h
7133 (ST_REGENTRY): New.
7134 (i386_st_collect_regmap): New.
7135 (i386_NUM_ST_COLLECT_GREGS): New.
7136 (supply_static_tracepoint_registers): New.
7137 * server.c (handle_query): Handle qXfer:statictrace:read.
7138 <qSupported>: Report support for StaticTracepoints, and
7139 qXfer:statictrace:read features.
7140 * server.h (traceframe_read_sdata)
7141 (supply_static_tracepoint_registers): Declare.
7142 * remote-utils.c (convert_int_to_ascii, hexchars, ishex, tohex)
7143 (unpack_varlen_hex): Include in IPA build.
7144 * Makefile.in (ustlibs, ustinc): New.
7145 (IPA_OBJS): Add remote-utils-ipa.o.
7146 ($(IPA_LIB)): Link -ldl and -lpthread.
7147 (UST_CFLAGS): New.
7148 (IPAGENT_CFLAGS): Add UST_CFLAGS.
7149 * config.in, configure: Regenerate.
7150
7151 2010-06-20 Ian Lance Taylor <iant@google.com>
7152 Pedro Alves <pedro@codesourcery.com>
7153
7154 * linux-x86-low.c (always_true): Delete.
7155 (EMIT_ASM, EMIT_ASM32): Use an uncondition asm jmp instead of
7156 trying to fool the compiler with always_true.
7157
7158 2010-06-20 Pedro Alves <pedro@codesourcery.com>
7159
7160 * tracepoint.c (condition_true_at_tracepoint): Don't run compiled
7161 conditions in gdbserver.
7162
7163 2010-06-19 Ulrich Weigand <uweigand@de.ibm.com>
7164
7165 * spu-low.c (spu_read_memory): Wrap around local store limit.
7166 (spu_write_memory): Likewise.
7167
7168 2010-06-15 Pedro Alves <pedro@codesourcery.com>
7169
7170 * linux-x86-low.c (amd64_emit_const, amd64_emit_void_call_2)
7171 (i386_emit_const, i386_emit_void_call_2): Replace int64_t uses with
7172 LONGEST uses.
7173 * server.h (struct emit_ops): Replace int64_t uses with LONGEST
7174 uses.
7175 * tracepoint.c (emit_const, emit_void_call_2): Replace int64_t
7176 uses with LONGEST uses.
7177
7178 2010-06-14 Stan Shebs <stan@codesourcery.com>
7179 Pedro Alves <pedro@codesourcery.com>
7180
7181 Bytecode compiler.
7182
7183 * linux-x86-low.c: Include limits.h.
7184 (add_insns): New.
7185 (always_true): New.
7186 (EMIT_ASM): New.
7187 (EMIT_ASM32): New.
7188 (amd64_emit_prologue, amd64_emit_epilogue, amd64_emit_add)
7189 (amd64_emit_sub, amd64_emit_mul, amd64_emit_lsh)
7190 (amd64_emit_rsh_signed, amd64_emit_rsh_unsigned, amd64_emit_ext,
7191 (amd64_emit_log_not, amd64_emit_bit_and, amd64_emit_bit_or)
7192 (amd64_emit_bit_xor, amd64_emit_bit_not, amd64_emit_equal,
7193 (amd64_emit_less_signed, amd64_emit_less_unsigned, amd64_emit_ref,
7194 (amd64_emit_if_goto, amd64_emit_goto, amd64_write_goto_address)
7195 (amd64_emit_const, amd64_emit_call, amd64_emit_reg)
7196 (amd64_emit_pop, amd64_emit_stack_flush, amd64_emit_zero_ext)
7197 (amd64_emit_swap, amd64_emit_stack_adjust, amd64_emit_int_call_1)
7198 (amd64_emit_void_call_2): New.
7199 (amd64_emit_ops): New.
7200 (i386_emit_prologue, i386_emit_epilogue, i386_emit_add)
7201 (i386_emit_sub,i386_emit_mul, i386_emit_lsh, i386_emit_rsh_signed)
7202 (i386_emit_rsh_unsigned, i386_emit_ext, i386_emit_log_not)
7203 (i386_emit_bit_and, i386_emit_bit_or, i386_emit_bit_xor)
7204 (i386_emit_bit_not, i386_emit_equal, i386_emit_less_signed)
7205 (i386_emit_less_unsigned, i386_emit_ref, i386_emit_if_goto)
7206 (i386_emit_goto, i386_write_goto_address, i386_emit_const)
7207 (i386_emit_call, i386_emit_reg, i386_emit_pop)
7208 (i386_emit_stack_flush, i386_emit_zero_ext, i386_emit_swap)
7209 (i386_emit_stack_adjust, i386_emit_int_call_1)
7210 (i386_emit_void_call_2): New.
7211 (i386_emit_ops): New.
7212 (x86_emit_ops): New.
7213 (the_low_target): Install x86_emit_ops.
7214 * server.h (struct emit_ops): New.
7215 (get_raw_reg_func_addr): Declare.
7216 (current_insn_ptr, emit_error): Declare.
7217 * tracepoint.c (get_raw_reg, get_trace_state_variable_value)
7218 (set_trace_state_variable_value): New defines.
7219 (struct ipa_sym_addresses): New fields addr_get_raw_reg,
7220 addr_get_trace_state_variable_value and
7221 addr_set_trace_state_variable_value.
7222 (symbol_list): New fields for get_raw_reg,
7223 get_trace_state_variable_value and set_trace_state_variable_value.
7224 (condfn): New typedef.
7225 (struct tracepoint): New field `compiled_cond'.
7226 (do_action_at_tracepoint): Clear compiled_cond.
7227 (get_trace_state_variable_value, set_trace_state_variable_value):
7228 Export in the IPA.
7229 (condition_true_at_tracepoint): If there's a compiled condition,
7230 run that.
7231 (current_insn_ptr, emit_error): New globals.
7232 (struct bytecode_address): New.
7233 (get_raw_reg_func_addr): New.
7234 (emit_prologue, emit_epilogue, emit_add, emit_sub, emit_mul)
7235 (emit_lsh, emit_rsh_signed, emit_rsh_unsigned, emit_ext)
7236 (emit_log_not, emit_bit_and, emit_bit_or, emit_bit_xor)
7237 (emit_bit_not, emit_equal, emit_less_signed, emit_less_unsigned)
7238 (emit_ref, emit_if_goto, emit_goto, write_goto_address, emit_const)
7239 (emit_reg, emit_pop, emit_stack_flush, emit_zero_ext, emit_swap)
7240 (emit_stack_adjust, emit_int_call_1, emit_void_call_2): New.
7241 (compile_tracepoint_condition, compile_bytecodes): New.
7242 * target.h (emit_ops): Forward declare.
7243 (struct target_ops): New field emit_ops.
7244 (target_emit_ops): New.
7245 * linux-amd64-ipa.c (gdb_agent_get_raw_reg): New.
7246 * linux-i386-ipa.c (gdb_agent_get_raw_reg): New.
7247 * linux-low.c (linux_emit_ops): New.
7248 (linux_target_ops): Install it.
7249 * linux-low.h (struct linux_target_ops): New field emit_ops.
7250
7251 2010-06-14 Ulrich Weigand <uweigand@de.ibm.com>
7252
7253 * linux-ppc-low.c (ppc_arch_setup): Use private regcache to test MSR.
7254 * linux-s390-low.c (ppc_arch_setup): Use private regcache to test PSW.
7255
7256 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7257 Stan Shebs <stan@codesourcery.com>
7258
7259 * Makefile.in (IPA_DEPFILES, extra_libraries): New.
7260 (all): Depend on $(extra_libraries).
7261 (install-only): Install the IPA.
7262 (IPA_OBJS, IPA_LIB): New.
7263 (clean): Remove the IPA lib.
7264 (IPAGENT_CFLAGS): New.
7265 (tracepoint-ipa.o, utils-ipa.o, remote-utils-ipa.o)
7266 (regcache-ipa.o, i386-linux-ipa.o, linux-i386-ipa.o)
7267 (linux-amd64-ipa.o, amd64-linux-ipa.o): New rules.
7268 * linux-amd64-ipa.c, linux-i386-ipa.c: New files.
7269 * configure.ac: Check for atomic builtins support in the compiler.
7270 (IPA_DEPFILES, extra_libraries): Define.
7271 * configure.srv (ipa_obj): Add description.
7272 (ipa_i386_linux_regobj, ipa_amd64_linux_regobj): Define.
7273 (i[34567]86-*-linux*): Set ipa_obj.
7274 (x86_64-*-linux*): Set ipa_obj.
7275 * linux-low.c (stabilizing_threads): New.
7276 (supports_fast_tracepoints): New.
7277 (linux_detach): Stabilize threads before detaching.
7278 (handle_tracepoints): Handle internal tracing breakpoints. Assert
7279 the lwp is either not stabilizing, or is moving out of a jump pad.
7280 (linux_fast_tracepoint_collecting): New.
7281 (maybe_move_out_of_jump_pad): New.
7282 (enqueue_one_deferred_signal): New.
7283 (dequeue_one_deferred_signal): New.
7284 (linux_wait_for_event_1): If moving out of a jump pad, defer
7285 pending signals to later.
7286 (linux_stabilize_threads): New.
7287 (linux_wait_1): Check if threads need moving out of jump pads, and
7288 do it if so.
7289 (stuck_in_jump_pad_callback): New.
7290 (move_out_of_jump_pad_callback): New.
7291 (lwp_running): New.
7292 (linux_resume_one_lwp): Handle moving out of jump pads.
7293 (linux_set_resume_request): Dequeue deferred signals.
7294 (need_step_over_p): Also step over fast tracepoint jumps.
7295 (start_step_over): Also uninsert fast tracepoint jumps.
7296 (finish_step_over): Also reinsert fast tracepoint jumps.
7297 (linux_install_fast_tracepoint_jump): New.
7298 (linux_target_ops): Install linux_stabilize_threads and
7299 linux_install_fast_tracepoint_jump_pad.
7300 * linux-low.h (linux_target_ops) <get_thread_area,
7301 install_fast_tracepoint_jump_pad>: New fields.
7302 (struct lwp_info) <collecting_fast_tracepoint,
7303 pending_signals_to_report, exit_jump_pad_bkpt>: New fields.
7304 (linux_get_thread_area): Declare.
7305 * linux-x86-low.c (jump_insn): New.
7306 (x86_get_thread_area): New.
7307 (append_insns): New.
7308 (push_opcode): New.
7309 (amd64_install_fast_tracepoint_jump_pad): New.
7310 (i386_install_fast_tracepoint_jump_pad): New.
7311 (x86_install_fast_tracepoint_jump_pad): New.
7312 (the_low_target): Install x86_get_thread_area and
7313 x86_install_fast_tracepoint_jump_pad.
7314 * mem-break.c (set_raw_breakpoint_at): Use read_inferior_memory.
7315 (struct fast_tracepoint_jump): New.
7316 (fast_tracepoint_jump_insn): New.
7317 (fast_tracepoint_jump_shadow): New.
7318 (find_fast_tracepoint_jump_at): New.
7319 (fast_tracepoint_jump_here): New.
7320 (delete_fast_tracepoint_jump): New.
7321 (set_fast_tracepoint_jump): New.
7322 (uninsert_fast_tracepoint_jumps_at): New.
7323 (reinsert_fast_tracepoint_jumps_at): New.
7324 (set_breakpoint_at): Use write_inferior_memory.
7325 (uninsert_raw_breakpoint): Use write_inferior_memory.
7326 (check_mem_read): Mask out fast tracepoint jumps.
7327 (check_mem_write): Mask out fast tracepoint jumps.
7328 * mem-break.h (struct fast_tracepoint_jump): Forward declare.
7329 (set_fast_tracepoint_jump): Declare.
7330 (delete_fast_tracepoint_jump)
7331 (fast_tracepoint_jump_here, uninsert_fast_tracepoint_jumps_at)
7332 (reinsert_fast_tracepoint_jumps_at): Declare.
7333 * regcache.c: Don't compile many functions when building the
7334 in-process agent library.
7335 (init_register_cache) [IN_PROCESS_AGENT]: Don't allow allocating
7336 the register buffer in the heap.
7337 (free_register_cache): If the register buffer isn't owned by the
7338 regcache, don't free it.
7339 (set_register_cache) [IN_PROCESS_AGENT]: Don't re-alocate
7340 pre-existing register caches.
7341 * remote-utils.c (convert_int_to_ascii): Constify `from' parameter
7342 type.
7343 (convert_ascii_to_int): : Constify `from' parameter type.
7344 (decode_M_packet, decode_X_packet): Replace the `to' parameter by
7345 a `to_p' pointer to pointer parameter. If TO_P is NULL, malloc
7346 the needed buffer in-place.
7347 (relocate_instruction): New.
7348 * server.c (handle_query) <qSymbols>: If the target supports
7349 tracepoints, give it a chance of looking up symbols. Report
7350 support for fast tracepoints.
7351 (handle_status): Stabilize threads.
7352 (process_serial_event): Adjust.
7353 * server.h (struct fast_tracepoint_jump): Forward declare.
7354 (struct process_info) <fast_tracepoint_jumps>: New field.
7355 (convert_ascii_to_int, convert_int_to_ascii): Adjust.
7356 (decode_X_packet, decode_M_packet): Adjust.
7357 (relocate_instruction): Declare.
7358 (in_process_agent_loaded): Declare.
7359 (tracepoint_look_up_symbols): Declare.
7360 (struct fast_tpoint_collect_status): Declare.
7361 (fast_tracepoint_collecting): Declare.
7362 (force_unlock_trace_buffer): Declare.
7363 (handle_tracepoint_bkpts): Declare.
7364 (initialize_low_tracepoint)
7365 (supply_fast_tracepoint_registers) [IN_PROCESS_AGENT]: Declare.
7366 * target.h (struct target_ops) <stabilize_threads,
7367 install_fast_tracepoint_jump_pad>: New fields.
7368 (stabilize_threads, install_fast_tracepoint_jump_pad): New.
7369 * tracepoint.c [HAVE_MALLOC_H]: Include malloc.h.
7370 [HAVE_STDINT_H]: Include stdint.h.
7371 (trace_debug_1): Rename to ...
7372 (trace_vdebug): ... this.
7373 (trace_debug): Rename to ...
7374 (trace_debug_1): ... this. Add `level' parameter.
7375 (trace_debug): New.
7376 (ATTR_USED, ATTR_NOINLINE): New.
7377 (IP_AGENT_EXPORT): New.
7378 (gdb_tp_heap_buffer, gdb_jump_pad_buffer, gdb_jump_pad_buffer_end)
7379 (collecting, gdb_collect, stop_tracing, flush_trace_buffer)
7380 (about_to_request_buffer_space, trace_buffer_is_full)
7381 (stopping_tracepoint, expr_eval_result, error_tracepoint)
7382 (tracepoints, tracing, trace_buffer_ctrl, trace_buffer_ctrl_curr)
7383 (trace_buffer_lo, trace_buffer_hi, traceframe_read_count)
7384 (traceframe_write_count, traceframes_created)
7385 (trace_state_variables)
7386 New renaming defines.
7387 (struct ipa_sym_addresses): New.
7388 (STRINGIZE_1, STRINGIZE, IPA_SYM): New.
7389 (symbol_list): New.
7390 (ipa_sym_addrs): New.
7391 (all_tracepoint_symbols_looked_up): New.
7392 (in_process_agent_loaded): New.
7393 (write_e_ipa_not_loaded): New.
7394 (maybe_write_ipa_not_loaded): New.
7395 (tracepoint_look_up_symbols): New.
7396 (debug_threads) [IN_PROCESS_AGENT]: New.
7397 (read_inferior_memory) [IN_PROCESS_AGENT]: New.
7398 (UNKNOWN_SIDE_EFFECTS): New.
7399 (stop_tracing): New.
7400 (flush_trace_buffer): New.
7401 (stop_tracing_bkpt): New.
7402 (flush_trace_buffer_bkpt): New.
7403 (read_inferior_integer): New.
7404 (read_inferior_uinteger): New.
7405 (read_inferior_data_pointer): New.
7406 (write_inferior_data_pointer): New.
7407 (write_inferior_integer): New.
7408 (write_inferior_uinteger): New.
7409 (struct collect_static_trace_data_action): Delete.
7410 (enum tracepoint_type): New.
7411 (struct tracepoint) <type>: New field `type'.
7412 <actions_str, step_actions, step_actions_str>: Only include in
7413 GDBserver.
7414 <orig_size, obj_addr_on_target, adjusted_insn_addr>
7415 <adjusted_insn_addr_end, jump_pad, jump_pad_end>: New fields.
7416 (tracepoints): Use IP_AGENT_EXPORT.
7417 (last_tracepoint): Don't include in the IPA.
7418 (stopping_tracepoint): Use IP_AGENT_EXPORT.
7419 (trace_buffer_is_full): Use IP_AGENT_EXPORT.
7420 (alloced_trace_state_variables): New.
7421 (trace_state_variables): Use IP_AGENT_EXPORT.
7422 (traceframe_t): Delete unused variable.
7423 (circular_trace_buffer): Don't include in the IPA.
7424 (trace_buffer_start): Delete.
7425 (struct trace_buffer_control): New.
7426 (trace_buffer_free): Delete.
7427 (struct ipa_trace_buffer_control): New.
7428 (GDBSERVER_FLUSH_COUNT_MASK, GDBSERVER_FLUSH_COUNT_MASK_PREV)
7429 (GDBSERVER_FLUSH_COUNT_MASK_CURR, GDBSERVER_UPDATED_FLUSH_COUNT_BIT):
7430 New.
7431 (trace_buffer_ctrl): New.
7432 (TRACE_BUFFER_CTRL_CURR): New.
7433 (trace_buffer_start, trace_buffer_free, trace_buffer_end_free):
7434 Reimplement as macros.
7435 (trace_buffer_wrap): Delete.
7436 (traceframe_write_count, traceframe_read_count)
7437 (traceframes_created, tracing): Use IP_AGENT_EXPORT.
7438 (struct tracepoint_hit_ctx) <type>: New field.
7439 (struct fast_tracepoint_ctx): New.
7440 (memory_barrier): New.
7441 (cmpxchg): New.
7442 (record_tracepoint_error): Update atomically in the IPA.
7443 (clear_inferior_trace_buffer): New.
7444 (about_to_request_buffer_space): New.
7445 (trace_buffer_alloc): Handle GDBserver and inferior simulatenous
7446 updating the same buffer.
7447 (add_tracepoint): Default the tracepoint's type to trap
7448 tracepoint, and orig_size to -1.
7449 (get_trace_state_variable) [IN_PROCESS_AGENT]: Handle allocated
7450 internal variables.
7451 (create_trace_state_variable): New parameter `gdb'. Handle it.
7452 (clear_installed_tracepoints): Clear fast tracepoint jumps.
7453 (cmd_qtdp): Handle fast tracepoints.
7454 (cmd_qtdv): Adjust.
7455 (max_jump_pad_size): New.
7456 (gdb_jump_pad_head): New.
7457 (get_jump_space_head): New.
7458 (claim_jump_space): New.
7459 (sort_tracepoints): New.
7460 (MAX_JUMP_SIZE): New.
7461 (cmd_qtstart): Handle fast tracepoints. Sync tracepoints with the
7462 IPA.
7463 (stop_tracing) [IN_PROCESS_AGENT]: Don't include the tdisconnected
7464 support. Upload fast traceframes, and delete internal IPA
7465 breakpoints.
7466 (stop_tracing_handler): New.
7467 (flush_trace_buffer_handler): New.
7468 (cmd_qtstop): Upload fast tracepoints.
7469 (response_tracepoint): Handle fast tracepoints.
7470 (tracepoint_finished_step): Upload fast traceframes. Set the
7471 tracepoint hit context's tracepoint type.
7472 (handle_tracepoint_bkpts): New.
7473 (tracepoint_was_hit): Set the tracepoint hit context's tracepoint
7474 type. Add comment about fast tracepoints.
7475 (collect_data_at_tracepoint) [IN_PROCESS_AGENT]: Don't access the
7476 non-existing action_str field.
7477 (get_context_regcache): Handle fast tracepoints.
7478 (do_action_at_tracepoint) [!IN_PROCESS_AGENT]: Don't write the PC
7479 to the regcache.
7480 (fast_tracepoint_from_jump_pad_address): New.
7481 (fast_tracepoint_from_ipa_tpoint_address): New.
7482 (collecting_t): New.
7483 (force_unlock_trace_buffer): New.
7484 (fast_tracepoint_collecting): New.
7485 (collecting): New.
7486 (gdb_collect): New.
7487 (write_inferior_data_ptr): New.
7488 (target_tp_heap): New.
7489 (target_malloc): New.
7490 (download_agent_expr): New.
7491 (UALIGN): New.
7492 (download_tracepoints): New.
7493 (download_trace_state_variables): New.
7494 (upload_fast_traceframes): New.
7495 (IPA_FIRST_TRACEFRAME): New.
7496 (IPA_NEXT_TRACEFRAME_1): New.
7497 (IPA_NEXT_TRACEFRAME): New.
7498 [IN_PROCESS_AGENT]: Include sys/mman.h and fcntl.h.
7499 [IN_PROCESS_AGENT] (gdb_tp_heap_buffer, gdb_jump_pad_buffer)
7500 (gdb_jump_pad_buffer_end): New.
7501 [IN_PROCESS_AGENT] (initialize_tracepoint_ftlib): New.
7502 (initialize_tracepoint): Adjust.
7503 [IN_PROCESS_AGENT]: Allocate the IPA heap, and jump pad scratch
7504 buffer. Initialize the low module.
7505 * utils.c (PREFIX, TOOLNAME): New.
7506 (malloc_failure): Use PREFIX.
7507 (error): In the IPA, an error causes an exit.
7508 (fatal, warning): Use PREFIX.
7509 (internal_error): Use TOOLNAME.
7510 (NUMCELLS): Increase to 10.
7511 * configure, config.in: Regenerate.
7512
7513 2010-06-01 Pedro Alves <pedro@codesourcery.com>
7514
7515 * server.c (handle_query) <qSupported>: Do two passes over the
7516 qSupported string to avoid nesting strtok.
7517
7518 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7519
7520 * Makefile.in (SFILES): Add $(srcdir)/proc-service.list.
7521 (CDEPS): New.
7522 * configure.ac (RDYNAMIC): New AC_MSG_CHECKING wrapping. Test also
7523 -Wl,--dynamic-list.
7524 * configure: Regenerate.
7525 * proc-service.list: New.
7526
7527 2010-05-28 Jan Kratochvil <jan.kratochvil@redhat.com>
7528
7529 * linux-low.c (linux_core_of_thread): Fix crash on invalid CONTENT.
7530 New comment.
7531
7532 2010-05-26 Ozkan Sezer <sezeroz@gmail.com>
7533
7534 * gdbreplay.c (remote_open): Check error return from socket() call by
7535 its equality to -1 not by it being negative.
7536 * remote-utils.c (remote_open): Likewise.
7537
7538 2010-05-23 Pedro Alves <pedro@codesourcery.com>
7539
7540 * config.h: Regenerate.
7541
7542 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7543
7544 * linux-m68k-low.c (ps_get_thread_area): Don't define if kernel
7545 doesn't provide PTRACE_GET_THREAD_AREA.
7546
7547 2010-05-19 Maxim Kuvyrkov <maxim@codesourcery.com>
7548
7549 * linux-m68k-low.c: Include <asm/ptrace.h>
7550 (ps_get_thread_area): Implement.
7551
7552 2010-05-03 Doug Evans <dje@google.com>
7553
7554 * event-loop.c (struct callback_event): New struct.
7555 (callback_list): New global.
7556 (append_callback_event, delete_callback_event): New functions.
7557 (process_callback): New function.
7558 (start_event_loop): Call it.
7559 * remote-utils.c (NOT_SCHEDULED): Define.
7560 (readchar_buf, readchar_bufcnt, readchar_bufp): New static globals,
7561 moved out of readchar.
7562 (readchar): Rewrite. Call reschedule before returning.
7563 (reset_readchar): New function.
7564 (remote_close): Call it.
7565 (process_remaining, reschedule): New functions.
7566 * server.h (callback_handler_func): New typedef.
7567 (append_callback_event, delete_callback_event): Declare.
7568
7569 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7570
7571 * proc-service.c (ps_pglobal_lookup): Use
7572 thread_db_look_up_one_symbol.
7573 * remote-utils.c (look_up_one_symbol): Add new `may_ask_gdb'
7574 parameter. Use it instead of all_symbols_looked_up.
7575 * server.h (struct process_info) <all_symbols_looked_up>: Delete
7576 field.
7577 (all_symbols_looked_up): Don't declare.
7578 (look_up_one_symbol): Add new `may_ask_gdb' parameter.
7579 * thread-db.c (struct thread_db) <all_symbols_looked_up>: New
7580 field.
7581 (thread_db_look_up_symbols): Adjust call to look_up_one_symbol.
7582 Set all_symbols_looked_up here.
7583 (thread_db_look_up_one_symbol): New.
7584 (thread_db_get_tls_address): Adjust.
7585 (thread_db_load_search, try_thread_db_load_1): Always allocate the
7586 thread_db object on the heap, and tentatively set it in the
7587 process structure.
7588 (thread_db_init): Don't set all_symbols_looked_up here.
7589 * linux-low.h (thread_db_look_up_one_symbol): Declare.
7590
7591 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7592
7593 * linux-low.c (linux_kill, linux_detach): Adjust.
7594 (status_pending_p_callback): Remove redundant statement. Check
7595 for !TARGET_WAITIKIND_IGNORE, instead of
7596 TARGET_WAITKIND_STOPPED.
7597 (handle_tracepoints): Make sure LWP is locked. Adjust.
7598 (linux_wait_for_event_1): Adjust.
7599 (linux_cancel_breakpoints): New.
7600 (unsuspend_one_lwp): New.
7601 (unsuspend_all_lwps): New.
7602 (linux_wait_1): If finishing a step-over, unsuspend all lwps.
7603 (send_sigstop_callback): Change return type to int, add new
7604 `except' parameter and handle it.
7605 (suspend_and_send_sigstop_callback): New.
7606 (stop_all_lwps): Add new `suspend' and `expect' parameters, and
7607 pass them down. If SUSPEND, also increment the lwp's suspend
7608 count.
7609 (linux_resume_one_lwp): Add notice about resuming a suspended LWP.
7610 (need_step_over_p): Don't consider suspended LWPs.
7611 (start_step_over): Adjust.
7612 (proceed_one_lwp): Change return type to int, add new `except'
7613 parameter and handle it.
7614 (unsuspend_and_proceed_one_lwp): New.
7615 (proceed_all_lwps): Use find_inferior instead of
7616 for_each_inferior.
7617 (unstop_all_lwps): Add `unsuspend' parameter. If UNSUSPEND, them
7618 also decrement the suspend count of LWPs. Pass `except' down,
7619 instead of hacking its suspend count.
7620 (linux_pause_all): Add `freeze' parameter. Adjust.
7621 (linux_unpause_all): New.
7622 (linux_target_ops): Install linux_unpause_all.
7623 * server.c (handle_status): Adjust.
7624 * target.h (struct target_ops): New fields `unpause_all' and
7625 `cancel_breakpoints'. Add new parameter to `pause_all'.
7626 (pause_all): Add new `freeze' parameter.
7627 (unpause_all): New.
7628 (cancel_breakpoints): New.
7629 * tracepoint.c (clear_installed_tracepoints): Pause threads, and
7630 cancel breakpoints.
7631 (cmd_qtstart): Pause threads.
7632 (stop_tracing): Pause threads, and cancel breakpoints.
7633 * win32-low.c (win32_target_ops): Adjust.
7634
7635 2010-05-03 Pedro Alves <pedro@codesourcery.com>
7636
7637 * linux-low.c (linux_wait_for_event_1): Move passing the signal to
7638 the inferior right away from here...
7639 (linux_wait_1): ... to here, and adjust to check the thread's
7640 last_resume_kind instead of the lwp's step or stop_expected flags.
7641
7642 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7643
7644 * README: Use consistent `GDB' and `GDBserver' spellings.
7645
7646 2010-05-02 Pedro Alves <pedro@codesourcery.com>
7647
7648 * linux-low.c (linux_kill_one_lwp): Assume the lwp is stopped.
7649 (linux_kill): Stop all lwps here. Don't delete the main lwp here.
7650 (linux_detach_one_lwp): Assume the lwp is stopped.
7651 (any_thread_of): Delete.
7652 (linux_detach): Stop all lwps here. Don't blindly delete all
7653 breakpoints.
7654 (delete_lwp_callback): New.
7655 (linux_mourn): Delete all lwps of the process that is gone.
7656 (linux_wait_1): Don't delete the last lwp of the process here.
7657 * mem-break.h (mark_breakpoints_out): Declare.
7658 * mem-break.c (mark_breakpoints_out): New.
7659 (free_all_breakpoints): Use it.
7660 * server.c (handle_target_event): If the process is gone, mark
7661 breakpoints out.
7662 * thread-db.c (struct thread_db) <create_bp>: New field.
7663 (thread_db_enable_reporting): Fix prototype. Store a thread event
7664 breakpoint reference in the thread_db struct.
7665 (thread_db_load_search): Clear the thread_db object.
7666 (try_thread_db_load_1): Ditto.
7667 (switch_to_process): New.
7668 (disable_thread_event_reporting): Use it.
7669 (remove_thread_event_breakpoints): New.
7670 (thread_db_detach, thread_db_mourn): Use it.
7671
7672 2010-05-01 Pedro Alves <pedro@codesourcery.com>
7673
7674 * linux-low.c (linux_enable_event_reporting): New.
7675 (linux_wait_for_event_1, handle_extended_wait): Use it.
7676
7677 2010-04-30 Pedro Alves <pedro@codesourcery.com>
7678
7679 * linux-low.c (linux_kill_one_lwp, linux_kill)
7680 (linux_detach_one_lwp): Adjust to send_sigstop interface change.
7681 (send_sigstop): Take an lwp_info as parameter instead. Queue a
7682 SIGSTOP even if the LWP is stopped.
7683 (send_sigstop_callback): New.
7684 (stop_all_lwps): Use send_sigstop_callback instead.
7685 (linux_resume_one_thread): Adjust.
7686 (proceed_one_lwp): Still proceed an LWP that the client has
7687 requested to stop, if we haven't reported it as stopped yet. Make
7688 sure that LWPs the client want stopped, have a pending SIGSTOP.
7689
7690 2010-04-26 Doug Evans <dje@google.com>
7691
7692 * server.c (handle_general_set): Make static.
7693
7694 * remote-utils.c (putpkt_binary_1): Call readchar instead of read.
7695 Print received char after testing for error/eof instead of before.
7696 (input_interrupt): Tweak comment.
7697
7698 2010-04-23 Doug Evans <dje@google.com>
7699
7700 * server.c (start_inferior): Print inferior argv if --debug.
7701
7702 2010-04-21 Aleksandar Ristovski <aristovski@qnx.com>
7703
7704 * Makefile.in (nto_low_h nto-low.o nto-x86-low.o): New dependency lists.
7705 * nto-x86-low.c: Include server.h
7706
7707 2010-04-20 Pierre Muller <muller@ics.u-strasbg.fr>
7708
7709 * win32-i386-low.c: Use __x86_64__ macro instead of __x86_64 to
7710 be consistent with other sources of this directory.
7711 (init_registers_amd64): Correct name of source file of this function
7712 in the comment.
7713
7714 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7715
7716 * configure.srv (x86_64-*-mingw*): New configuration for Windows
7717 64-bit executables.
7718
7719 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7720
7721 * win32-i386-low.c: Add 64-bit support.
7722 (CONTEXT_EXTENDED_REGISTERS): Set macro to zero if not exisiting.
7723 (init_registers_amd64): Declare.
7724 (mappings): Add 64-bit version of array.
7725 (init_windows_x86): New function.
7726 (the_low_target): Change init_arch field to init_windows_x86.
7727
7728 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7729
7730 * win32-low.c: Adapt to support also 64-bit architecture.
7731 (child_xfer_memory): Use uintptr_t type for local variable `addr'.
7732 (get_image_name): Use SIZE_T type for local variable `done'.
7733 (psapi_get_dll_name): Use LPVOID type for parameter `BaseAddress'.
7734 (toolhelp_get_dll_name): Idem.
7735 (handle_load_dll): Use CORE_ADDR type for local variable `load_addr'.
7736 Use uintptr_t typecast to avoid warning.
7737 (handle_unload_dll): Use uintptr_t typecast to avoid warning.
7738 (handle_exception): Use phex_nz to avoid warning.
7739 (win32_wait): Remove unused local variable `process'.
7740
7741 2010-04-19 Pierre Muller <muller@ics.u-strasbg.fr>
7742
7743 * configure.srv (srv_amd64_regobj): Replace `x86-64-avx.o' by
7744 `amd64-avx.o'.
7745
7746 2010-04-17 Pierre Muller <muller@ics.u-strasbg.fr>
7747
7748 * configure.ac: Use `ws2_32' library for srv_mingw.
7749 * configure: Regenerate.
7750 * gdbreplay.c: Include winsock2.h instead of winsock.h.
7751 * remote-utils.c: Likewise.
7752
7753 2010-04-17 H.J. Lu <hongjiu.lu@intel.com>
7754
7755 * linux-x86-low.c (xmltarget_amd64_linux_no_xml): Define only
7756 if __x86_64__ is defined.
7757
7758 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7759
7760 * configure: Regenerate.
7761
7762 2010-04-16 Pierre Muller <muller@ics.u-strasbg.fr>
7763
7764 * server.c (handle_query): Handle 'qGetTIBAddr' query.
7765 * target.h (target_ops): New get_tib_address field.
7766 * win32-low.h (win32_thread_info): Add thread_local_base field.
7767 * win32-low.c (child_add_thread): Add tlb argument.
7768 Set thread_local_base field to TLB.
7769 (get_child_debug_event): Adapt to child_add_thread change.
7770 (win32_get_tib_address): New function.
7771 (win32_target_ops): Set get_tib_address field to
7772 win32_get_tib_address.
7773 * linux-low.c (linux_target_ops): Set get_tib_address field to NULL.
7774
7775 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7776
7777 * linux-low.c (linux_mourn): Also remove the process.
7778 * server.c (handle_target_event): Don't remove the process here.
7779 * nto-low.c (nto_mourn): New.
7780 (nto_target_ops): Install it.
7781 * spu-low.c (spu_mourn): New.
7782 (spu_target_ops): Install it.
7783 * win32-low.c (win32_mourn): New.
7784 (win32_target_ops): Install it.
7785
7786 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7787
7788 * server.h (buffer_xml_printf): Remove redundant `;'.
7789
7790 2010-04-12 Pedro Alves <pedro@codesourcery.com>
7791
7792 * regcache.c (set_register_cache): Invalidate regcaches before
7793 changing the register cache layout.
7794 (regcache_invalidate_one): Allow a NULL regcache.
7795 * linux-x86-low.c (x86_linux_update_xmltarget): Invalidate
7796 regcaches before changing the register cache layout or the target
7797 regsets.
7798
7799 2010-04-12 H.J. Lu <hongjiu.lu@intel.com>
7800
7801 * linux-x86-low.c (x86_linux_update_xmltarget): Avoid unused
7802 variable warning on Linux/x86-64.
7803
7804 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7805
7806 GDBserver disconnected tracing support.
7807
7808 * linux-low.c (linux_remove_process): Delete.
7809 (add_lwp): Don't set last_resume_kind here.
7810 (linux_kill): Use `mourn'.
7811 (linux_detach): Use `thread_db_detach', and `mourn'.
7812 (linux_mourn): New.
7813 (linux_attach_lwp_1): Adjust comment.
7814 (linux_attach): last_resume_kind moved the thread_info; adjust.
7815 (status_pending_p_callback): Adjust.
7816 (linux_wait_for_event_1): Adjust.
7817 (count_events_callback, select_singlestep_lwp_callback)
7818 (select_event_lwp_callback, cancel_breakpoints_callback)
7819 (db_wants_lwp_stopped, linux_wait_1, need_step_over_p)
7820 (proceed_one_lwp): Adjust.
7821 (linux_async): Add debug output.
7822 (linux_thread_stopped): New.
7823 (linux_pause_all): New.
7824 (linux_target_ops): Install linux_mourn, linux_thread_stopped and
7825 linux_pause_all.
7826 * linux-low.h (struct lwp_info): Delete last_resume_kind field.
7827 (thread_db_free): Delete declaration.
7828 (thread_db_detach, thread_db_mourn): Declare.
7829 * thread-db.c (thread_db_init): Use thread_db_mourn.
7830 (thread_db_free): Delete, split in two.
7831 (disable_thread_event_reporting): New.
7832 (thread_db_detach): New.
7833 (thread_db_mourn): New.
7834
7835 * server.h (struct thread_info) <last_resume_kind>: New field.
7836 <attached>: Add comment.
7837 <gdb_detached>: New field.
7838 (handler_func): Change return type to int.
7839 (handle_serial_event, handle_target_event): Ditto.
7840 (gdb_connected): Declare.
7841 (tracing): Delete.
7842 (disconnected_tracing): Declare.
7843 (stop_tracing): Declare.
7844
7845 * server.c (handle_query) <qSupported>: Report support for
7846 disconnected tracing.
7847 (queue_stop_reply_callback): Account for running threads.
7848 (gdb_wants_thread_stopped): New.
7849 (gdb_wants_all_threads_stopped): New.
7850 (gdb_reattached_process): New.
7851 (handle_status): Clear the `gdb_detached' flag of all processes.
7852 In all-stop, stop all threads.
7853 (main): Be sure to leave tfind mode. Handle disconnected tracing.
7854 (process_serial_event): If the remote connection breaks, or if an
7855 exit was forced with "monitor exit", force an event loop exit.
7856 Handle disconnected tracing on detach.
7857 (handle_serial_event): Adjust.
7858 (handle_target_event): If GDB isn't connected, forward events back
7859 to the inferior, unless the last process exited, in which case,
7860 exit gdbserver. Adjust interface.
7861
7862 * remote-utils.c (remote_open): Don't block in accept. Instead
7863 register an event loop source on the listen socket file
7864 descriptor. Refactor bits into ...
7865 (listen_desc): ... this new global.
7866 (gdb_connected): ... this new function.
7867 (enable_async_notification): ... this new function.
7868 (handle_accept_event): ... this new function.
7869 (remote_close): Clear remote_desc.
7870
7871 * inferiors.c (add_thread): Set the new thread's last_resume_kind.
7872
7873 * target.h (struct target_ops) <mourn, thread_stopped, pause_all>:
7874 New fields.
7875 (mourn_inferior): Define.
7876 (target_process_qsupported): Avoid the dangling else problem.
7877 (thread_stopped): Define.
7878 (pause_all): Define.
7879 (target_waitstatus_to_string): Declare.
7880 * target.c (target_waitstatus_to_string): New.
7881
7882 * tracepoint.c (tracing): Make extern.
7883 (disconnected_tracing): New.
7884 (stop_tracing): Make extern. Handle tracing stops due to GDB
7885 disconnecting.
7886 (cmd_qtdisconnected): New.
7887 (cmd_qtstatus): Report disconnected tracing status in trace reply.
7888 (handle_tracepoint_general_set): Handle QTDisconnected.
7889
7890 * event-loop.c (event_handler_func): Change return type to int.
7891 (process_event): Bail out if the event handler wants the event
7892 loop to stop.
7893 (handle_file_event): Ditto.
7894 (start_event_loop): Bail out if the event handler wants the event
7895 loop to stop.
7896
7897 * nto-low.c (nto_target_ops): Adjust.
7898 * spu-low.c (spu_wait): Don't remove the process here.
7899 (spu_target_ops): Adjust.
7900 * win32-low.c (win32_wait): Don't remove the process here.
7901 (win32_target_ops): Adjust.
7902
7903 2010-04-11 Pedro Alves <pedro@codesourcery.com>
7904
7905 * regcache.c (realloc_register_cache): Invalidate inferior's
7906 regcache before recreating it.
7907
7908 2010-04-09 Pedro Alves <pedro@codesourcery.com>
7909
7910 * tracepoint.c (cmd_qtstatus): Report trace buffer circularity.
7911
7912 2010-04-09 Stan Shebs <stan@codesourcery.com>
7913 Pedro Alves <pedro@codesourcery.com>
7914
7915 * server.h (LONGEST): New.
7916 (struct thread_info) <while_stepping>: New field.
7917 (unpack_varlen_hex, xrealloc, pulongest, plongest, phex_nz):
7918 Declare.
7919 (initialize_tracepoint, handle_tracepoint_general_set)
7920 (handle_tracepoint_query, tracepoint_finished_step)
7921 (tracepoint_was_hit, release_while_stepping_state_list):
7922 (current_traceframe): Declare.
7923 * server.c (handle_general_set): Handle tracepoint packets.
7924 (read_memory): New.
7925 (write_memory): New.
7926 (handle_search_memory_1): Use read_memory.
7927 (handle_query): Report support for conditional tracepoints, trace
7928 state variables, and tracepoint sources. Handle tracepoint
7929 queries.
7930 (main): Initialize the tracepoints module.
7931 (process_serial_event): Handle traceframe reads/writes.
7932
7933 * linux-low.c (handle_tracepoints): New.
7934 (linux_wait_1): Call it.
7935 (linux_resume_one_lwp): Handle while-stepping.
7936 (linux_supports_tracepoints, linux_read_pc, linux_write_pc): New.
7937 (linux_target_ops): Install them.
7938 * linux-low.h (struct linux_target_ops) <supports_tracepoints>:
7939 New field.
7940 * linux-x86-low.c (x86_supports_tracepoints): New.
7941 (the_low_target). Install it.
7942
7943 * mem-break.h (delete_breakpoint): Declare.
7944 * mem-break.c (delete_breakpoint): Make external.
7945
7946 * target.h (struct target_ops): Add `supports_tracepoints',
7947 `read_pc', and `write_pc' fields.
7948 (target_supports_tracepoints): Define.
7949 * utils.c (xrealloc, decimal2str, pulongest, plongest, thirty_two)
7950 (phex_nz): New.
7951
7952 * regcache.h (struct regcache) <registers_owned>: New field.
7953 (init_register_cache, regcache_cpy): Declare.
7954 (regcache_read_pc, regcache_write_pc): Declare.
7955 (register_cache_size): Declare.
7956 (supply_regblock): Declare.
7957 * regcache.c (init_register_cache): New.
7958 (new_register_cache): Use it.
7959 (regcache_cpy): New.
7960 (register_cache_size): New.
7961 (supply_regblock): New.
7962 (regcache_read_pc, regcache_write_pc): New.
7963
7964 * tracepoint.c: New.
7965
7966 * Makefile.in (OBS): Add tracepoint.o.
7967 (tracepoint.o): New rule.
7968
7969 2010-04-08 H.J. Lu <hongjiu.lu@intel.com>
7970
7971 * Makefile.in (clean): Also remove i386-mmx.c i386-mmx-linux.c.
7972 (i386-mmx.o): New.
7973 (i386-mmx.c): Likewise.
7974 (i386-mmx-linux.o): Likewise.
7975 (i386-mmx-linux.c): Likewise.
7976
7977 * configure.srv (srv_i386_regobj): Add i386-mmx.o.
7978 (srv_i386_linux_regobj): Add i386-mmx-linux.o.
7979 (srv_i386_xmlfiles): Add i386/i386-mmx.xml.
7980 (srv_i386_linux_xmlfiles): Add i386/i386-mmx-linux.xml.
7981
7982 * linux-x86-low.c (init_registers_i386_mmx_linux): New.
7983 (x86_linux_update_xmltarget): Call init_registers_i386_mmx_linux
7984 and return if ptrace PTRACE_GETFPXREGS failed in 32bit.
7985
7986 2010-04-07 H.J. Lu <hongjiu.lu@intel.com>
7987
7988 * Makefile.in (clean): Updated.
7989 (i386-avx.o): New.
7990 (i386-avx.c): Likewise.
7991 (i386-avx-linux.o): Likewise.
7992 (i386-avx-linux.c): Likewise.
7993 (amd64-avx.o): Likewise.
7994 (amd64-avx.c): Likewise.
7995 (amd64-avx-linux.o): Likewise.
7996 (amd64-avx-linux.c): Likewise.
7997
7998 * configure.srv (srv_i386_regobj): Add i386-avx.o.
7999 (srv_i386_linux_regobj): Add i386-avx-linux.o.
8000 (srv_amd64_regobj): Add amd64-avx.o.
8001 (srv_amd64_linux_regobj): Add amd64-avx-linux.o.
8002 (srv_i386_32bit_xmlfiles): Add i386/32bit-avx.xml.
8003 (srv_i386_64bit_xmlfiles): Add i386/64bit-avx.xml.
8004 (srv_i386_xmlfiles): Add i386/i386-avx.xml.
8005 (srv_amd64_xmlfiles): Add i386/amd64-avx.xml.
8006 (srv_i386_linux_xmlfiles): Add i386/i386-avx-linux.xml.
8007 (srv_amd64_linux_xmlfiles): Add i386/amd64-avx-linux.xml.
8008
8009 * i387-fp.c: Include "i386-xstate.h".
8010 (i387_xsave): New.
8011 (i387_cache_to_xsave): Likewise.
8012 (i387_xsave_to_cache): Likewise.
8013 (x86_xcr0): Likewise.
8014
8015 * i387-fp.h (i387_cache_to_xsave): Likewise.
8016 (i387_xsave_to_cache): Likewise.
8017 (x86_xcr0): Likewise.
8018
8019 * linux-arm-low.c (target_regsets): Initialize nt_type to 0.
8020 * linux-crisv32-low.c (target_regsets): Likewise.
8021 * linux-m68k-low.c (target_regsets): Likewise.
8022 * linux-mips-low.c (target_regsets): Likewise.
8023 * linux-ppc-low.c (target_regsets): Likewise.
8024 * linux-s390-low.c (target_regsets): Likewise.
8025 * linux-sh-low.c (target_regsets): Likewise.
8026 * linux-sparc-low.c (target_regsets): Likewise.
8027 * linux-xtensa-low.c (target_regsets): Likewise.
8028
8029 * linux-low.c: Include <sys/uio.h>.
8030 (regsets_fetch_inferior_registers): Support nt_type.
8031 (regsets_store_inferior_registers): Likewise.
8032 (linux_process_qsupported): New.
8033 (linux_target_ops): Add linux_process_qsupported.
8034
8035 * linux-low.h (regset_info): Add nt_type.
8036 (linux_target_ops): Add process_qsupported.
8037
8038 * linux-x86-low.c: Include "i386-xstate.h", "elf/common.h"
8039 and <sys/uio.h>.
8040 (init_registers_i386_avx_linux): New.
8041 (init_registers_amd64_avx_linux): Likewise.
8042 (xmltarget_i386_linux_no_xml): Likewise.
8043 (xmltarget_amd64_linux_no_xml): Likewise.
8044 (PTRACE_GETREGSET): Likewise.
8045 (PTRACE_SETREGSET): Likewise.
8046 (x86_fill_xstateregset): Likewise.
8047 (x86_store_xstateregset): Likewise.
8048 (use_xml): Likewise.
8049 (x86_linux_update_xmltarget): Likewise.
8050 (x86_linux_process_qsupported): Likewise.
8051 (target_regsets): Add NT_X86_XSTATE entry and Initialize nt_type.
8052 (x86_arch_setup): Don't call init_registers_amd64_linux nor
8053 init_registers_i386_linux here. Call
8054 x86_linux_update_xmltarget.
8055 (the_low_target): Add x86_linux_process_qsupported.
8056
8057 * server.c (handle_query): Call target_process_qsupported.
8058
8059 * target.h (target_ops): Add process_qsupported.
8060 (target_process_qsupported): New.
8061
8062 2010-04-03 Pedro Alves <pedro@codesourcery.com>
8063
8064 * inferiors.c (add_thread): Set last_status kind to
8065 TARGET_WAITKIND_IGNORE.
8066 * linux-low.c (cancel_breakpoint): Remove unnecessary regcache
8067 fetch. Use ptid_of. Avoid unnecessary get_lwp_thread calls.
8068 (linux_wait_1): Move `thread' local definition to block that uses
8069 it. Don't NULL initialize `event_child'.
8070 (linux_resume_one_thread): Avoid unnecessary get_lwp_thread calls.
8071 Alway set the thread's last_status to TARGET_WAITKIND_IGNORE.
8072 * linux-x86-low.c (x86_breakpoint_at): Read raw memory.
8073
8074 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8075
8076 * linux-low.c (get_stop_pc): Don't adjust the PC if stopped with
8077 an extended waitstatus, or by a watchpoint.
8078 (cancel_breakpoints_callback): Don't cancel a breakpoint if the
8079 thread was stepping or has been stopped by a watchpoint.
8080
8081 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8082
8083 * mem-break.c (struct raw_breakpoint): New field shlib_disabled.
8084 (set_gdb_breakpoint_at): If GDB is inserting a breakpoint on top
8085 of another, then delete the previous, and validate all
8086 breakpoints.
8087 (validate_inserted_breakpoint): New.
8088 (delete_disabled_breakpoints): New.
8089 (validate_breakpoints): New.
8090 (check_mem_read): Validate breakpoints before trusting their
8091 shadow. Delete disabled breakpoints.
8092 (check_mem_write): Validate breakpoints before trusting they
8093 should be inserted. Delete disabled breakpoints.
8094 * mem-break.h (validate_breakpoints):
8095 * server.c (handle_query): Validate breakpoints when we see a
8096 qSymbol query.
8097
8098 2010-04-01 Pedro Alves <pedro@codesourcery.com>
8099
8100 * linux-low.c (linux_wait_1): Avoid setting need_step_over is
8101 there's a GDB breakpoint at stop_pc. Always report a trap to GDB
8102 if we could tell there's a GDB breakpoint at stop_pc.
8103 (need_step_over_p): Don't do a step over if we find a GDB
8104 breakpoint at the resume PC.
8105
8106 * mem-break.c (struct raw_breakpoint): New.
8107 (enum bkpt_type): New type `gdb_breakpoint'.
8108 (struct breakpoint): Delete the `PC', `old_data' and `inserted'
8109 fields. New field `raw'.
8110 (find_raw_breakpoint_at): New.
8111 (set_raw_breakpoint_at): Handle refcounting. Create a raw
8112 breakpoint instead.
8113 (set_breakpoint_at): Adjust.
8114 (delete_raw_breakpoint): New.
8115 (release_breakpoint): New.
8116 (delete_breakpoint): Rename to...
8117 (delete_breakpoint_1): ... this. Add proc parameter. Use
8118 release_breakpoint. Return ENOENT.
8119 (delete_breakpoint): Reimplement.
8120 (find_breakpoint_at): Delete.
8121 (find_gdb_breakpoint_at): New.
8122 (delete_breakpoint_at): Delete.
8123 (set_gdb_breakpoint_at): New.
8124 (delete_gdb_breakpoint_at): New.
8125 (gdb_breakpoint_here): New.
8126 (set_reinsert_breakpoint): Use release_breakpoint.
8127 (uninsert_breakpoint): Rename to ...
8128 (uninsert_raw_breakpoint): ... this.
8129 (uninsert_breakpoints_at): Adjust to handle raw breakpoints.
8130 (reinsert_raw_breakpoint): Change parameter type to
8131 raw_breakpoint.
8132 (reinsert_breakpoints_at): Adjust to handle raw breakpoints
8133 instead.
8134 (check_breakpoints): Adjust. Use release_breakpoint.
8135 (breakpoint_here): Rewrite using find_raw_breakpoint_at.
8136 (breakpoint_inserted_here): Ditto.
8137 (check_mem_read): Adjust to iterate over raw breakpoints instead.
8138 Don't trust the breakpoint's shadow if it is not inserted.
8139 (check_mem_write): Adjust to iterate over raw breakpoints instead.
8140 (delete_all_breakpoints): Adjust.
8141 (free_all_breakpoints): Mark all breakpoints as uninserted, and
8142 use delete_breakpoint_1.
8143
8144 * mem-break.h (breakpoints_supported): Delete declaration.
8145 (set_gdb_breakpoint_at): Declare.
8146 (gdb_breakpoint_here): Declare.
8147 (delete_breakpoint_at): Delete.
8148 (delete_gdb_breakpoint_at): Declare.
8149
8150 * server.h (struct raw_breakpoint): Forward declare.
8151 (struct process_info): New field `raw_breakpoints'.
8152
8153 * linux-x86-low.c (x86_insert_point, x86_remote_point): Handle Z0
8154 breakpoints.
8155
8156 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8157
8158 * linux-low.c (status_pending_p_callback): Fix comment.
8159 (linux_wait_for_event_1): Move most of the internal breakpoint
8160 handling from here...
8161 (linux_wait_1): ... to here.
8162 (count_events_callback): New.
8163 (select_singlestep_lwp_callback): New.
8164 (select_event_lwp_callback): New.
8165 (cancel_breakpoints_callback): New.
8166 (select_event_lwp): New.
8167 (linux_wait_1): Simplify internal breakpoint handling. Give equal
8168 priority to all LWPs that have had events that should be reported
8169 to the client. Cancel breakpoints when about to reporting the
8170 event to the client, not while stopping lwps. No longer cancel
8171 finished single-steps here.
8172 (cancel_finished_single_step): Delete.
8173 (cancel_finished_single_steps): Delete.
8174
8175 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8176
8177 * mem-break.c (enum bkpt_type): New.
8178 (struct breakpoint): New field `type'.
8179 (set_breakpoint_at): Change return type to struct breakpoint
8180 pointer. Set type to `other_breakpoint' by default.
8181 (delete_breakpoint): Rewrite, supporting more than one breakpoint
8182 in the breakpoint list.
8183 (delete_reinsert_breakpoints): Only delete reinsert breakpoints.
8184 (reinsert_breakpoint): Rename to ...
8185 (reinsert_raw_breakpoint): ... this.
8186 (reinsert_breakpoints_at): Adjust.
8187 * mem-break.h (struct breakpoint): Declare.
8188 (set_breakpoint_at): Change return type to struct breakpoint
8189 pointer.
8190
8191 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8192
8193 * server.c (handle_query): Assign, not compare.
8194
8195 2010-03-24 Pedro Alves <pedro@codesourcery.com>
8196
8197 Teach linux gdbserver to step-over-breakpoints.
8198
8199 * linux-low.c (can_hardware_single_step): New.
8200 (supports_breakpoints): New.
8201 (handle_extended_wait): If stopping threads, read the stop pc of
8202 the new cloned LWP.
8203 (get_pc): New.
8204 (get_stop_pc): Add `lwp' parameter. Handle it. Bail out if the
8205 low target doesn't support retrieving the PC.
8206 (add_lwp): Set last_resume_kind to resume_continue.
8207 (linux_attach_lwp_1): Adjust comments. Always set stop_expected.
8208 (linux_attach): Don't clear stop_expected. Set the lwp's
8209 last_resume_kind to resume_stop.
8210 (linux_detach_one_lwp): Don't check for removed breakpoints.
8211 (check_removed_breakpoint): Delete.
8212 (status_pending_p): Rename to ...
8213 (status_pending_p_callback): ... this. Don't check for removed
8214 breakpoints. Don't consider threads that are stopped from GDB's
8215 perspective.
8216 (linux_wait_for_lwp): Always read the stop_pc here.
8217 (cancel_breakpoint): New.
8218 (step_over_bkpt): New global.
8219 (linux_wait_for_event_1): Implement stepping over breakpoints.
8220 (gdb_wants_lwp_stopped): New.
8221 (gdb_wants_all_stopped): New.
8222 (linux_wait_1): Tag threads as gdb-wants-stopped. Cancel finished
8223 single-step traps here. Store the thread's last reported target
8224 wait status.
8225 (send_sigstop): Don't clear stop_expected. Always set it,
8226 instead.
8227 (mark_lwp_dead): Remove reference to pending_is_breakpoint.
8228 (cancel_finished_single_step): New.
8229 (cancel_finished_single_steps): New.
8230 (wait_for_sigstop): Don't cancel finished single-step traps here.
8231 (linux_resume_one_lwp): Don't check for removed breakpoints.
8232 Don't set `step' on non-hardware step archs.
8233 (linux_set_resume_request): Ignore resume_stop requests if already
8234 stopping or stopped. Set the lwp's last_resume_kind.
8235 (resume_status_pending_p): Don't check for removed breakpoints.
8236 (need_step_over_p): New.
8237 (start_step_over): New.
8238 (finish_step_over): New.
8239 (linux_resume_one_thread): Always queue a sigstop for resume_stop
8240 requests. Clear the thread's last reported target waitstatus.
8241 Don't use the `suspended' flag. Don't consider pending breakpoints.
8242 (linux_resume): Start a step-over if necessary.
8243 (proceed_one_lwp): New.
8244 (proceed_all_lwps): New.
8245 (unstop_all_lwps): New.
8246 * linux-low.h (struct lwp_info): Rewrite comment for the
8247 `suspended' flag. Add the `stop_pc' field. Delete the
8248 `pending_stop_pc' field. Tweak the `stepping' flag's comment.
8249 Add `'last_resume_kind' and `need_step_over' fields.
8250 * inferiors.c (struct thread_info): Delete, moved elsewhere.
8251 * mem-break.c (struct breakpoint): Delete `reinserting' flag.
8252 Delete `breakpoint_to_reinsert' field. New flag `inserted'.
8253 (set_raw_breakpoint_at): New.
8254 (set_breakpoint_at): Rewrite to use it.
8255 (reinsert_breakpoint_handler): Delete.
8256 (set_reinsert_breakpoint): New.
8257 (reinsert_breakpoint_by_bp): Delete.
8258 (delete_reinsert_breakpoints): New.
8259 (uninsert_breakpoint): Rewrite.
8260 (uninsert_breakpoints_at): New.
8261 (reinsert_breakpoint): Rewrite.
8262 (reinsert_breakpoints_at): New.
8263 (check_breakpoints): Rewrite.
8264 (breakpoint_here): New.
8265 (breakpoint_inserted_here): New.
8266 (check_mem_read): Adjust.
8267 * mem-break.h (breakpoints_supported, breakpoint_here)
8268 (breakpoint_inserted_here, set_reinsert_breakpoint): Declare.
8269 (reinsert_breakpoint_by_bp): Delete declaration.
8270 (delete_reinsert_breakpoints): Declare.
8271 (reinsert_breakpoint): Delete declaration.
8272 (reinsert_breakpoints_at): Declare.
8273 (uninsert_breakpoint): Delete declaration.
8274 (uninsert_breakpoints_at): Declare.
8275 (check_breakpoints): Adjust prototype.
8276 * server.h: Adjust include order.
8277 (struct thread_info): Declare here. Add a `last_status' field.
8278
8279 2010-03-23 Michael Snyder <msnyder@vmware.com>
8280
8281 * server.c (crc32): New function.
8282 (handle_query): Add handling for 'qCRC:' request.
8283
8284 2010-03-23 Pedro Alves <pedro@codesourcery.com>
8285
8286 * linux-x86-low.c (x86_linux_prepare_to_resume): Clear DR6 if the
8287 lwp had been stopped by a watchpoint.
8288
8289 2010-03-16 Pedro Alves <pedro@codesourcery.com>
8290
8291 * server.h (internal_error): Declare.
8292 (gdb_assert, ASSERT_FUNCTION, gdb_assert_fail): Define.
8293 * utils.c (internal_error): New function.
8294
8295 2010-03-15 Andreas Schwab <schwab@redhat.com>
8296
8297 * configure.srv: Fix typo setting srv_regobj.
8298
8299 2010-03-15 Pedro Alves <pedro@codesourcery.com>
8300
8301 * linux-low.c (fetch_register): Avoid passing a non string literal
8302 format to `error'.
8303 (usr_store_inferior_registers): Ditto.
8304
8305 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8306
8307 * linux-low.c (linux_write_memory): Bail out early if peeking
8308 memory failed.
8309
8310 2010-03-14 Pedro Alves <pedro@codesourcery.com>
8311
8312 * linux-low.h (struct lwp_info): New fields
8313 `stopped_by_watchpoint' and `stopped_data_address'.
8314 * linux-low.c (linux_wait_for_lwp): Check for watchpoint triggers
8315 here, and cache them in the lwp object.
8316 (wait_for_sigstop): Check stopped_by_watchpoint lwp field
8317 directly.
8318 (linux_resume_one_lwp): Clear the lwp's stopped_by_watchpoint
8319 field.
8320 (linux_stopped_by_watchpoint): Rewrite.
8321 (linux_stopped_data_address): Rewrite.
8322
8323 2010-03-06 Simo Melenius <simo.melenius@iki.fi>
8324
8325 * linux-low.c (linux_wait_for_lwp): Fetch the regcache after
8326 switching the current inferior, not before.
8327
8328 2010-03-01 H.J. Lu <hongjiu.lu@intel.com>
8329
8330 * Makefile.in (clean): Replace reg-i386.c, reg-x86-64.c,
8331 reg-i386-linux.c and reg-x86-64-linux.c with i386.c, amd64.c,
8332 i386-linux.c and amd64-linux.c.
8333 (reg-i386.o): Removed.
8334 (reg-i386.c): Likewise.
8335 (reg-i386-linux.o): Likewise.
8336 (reg-i386-linux.c): Likewise.
8337 (reg-x86-64.o): Likewise.
8338 (reg-x86-64.c): Likewise.
8339 (reg-x86-64-linux.o): Likewise.
8340 (reg-x86-64-linux.c): Likewise.
8341 (i386.o): New.
8342 (i386.c): Likewise.
8343 (i386-linux.o): Likewise.
8344 (i386-linux.c): Likewise.
8345 (amd64.o): Likewise.
8346 (amd64.c): Likewise.
8347 (amd64-linux.o): Likewise.
8348 (amd64-linux.c): Likewise.
8349
8350 * configure.srv (srv_i386_regobj): New.
8351 (srv_i386_linux_regobj): Likewise.
8352 (srv_amd64_regobj): Likewise.
8353 (srv_amd64_linux_regobj): Likewise.
8354 (srv_i386_32bit_xmlfiles): Likewise.
8355 (srv_i386_64bit_xmlfiles): Likewise.
8356 (srv_i386_xmlfiles): Likewise.
8357 (srv_amd64_xmlfiles): Likewise.
8358 (srv_i386_linux_xmlfiles): Likewise.
8359 (srv_amd64_linux_xmlfiles): Likewise.
8360 (i[34567]86-*-cygwin*): Set srv_regobj to $srv_i386_regobj. Set
8361 srv_xmlfiles to $srv_i386_xmlfiles.
8362 (i[34567]86-*-mingw32ce*): Likewise.
8363 (i[34567]86-*-mingw*): Likewise.
8364 (i[34567]86-*-nto*): Likewise.
8365 (i[34567]86-*-linux*): Set srv_regobj to $srv_i386_linux_regobj
8366 and $srv_amd64_linux_regobj. Set srv_xmlfiles to
8367 $srv_i386_linux_xmlfiles and $srv_amd64_linux_xmlfiles.
8368 (x86_64-*-linux*): Likewise.
8369
8370 * linux-x86-low.c (init_registers_x86_64_linux): Removed.
8371 (init_registers_amd64_linux): New.
8372 (x86_arch_setup): Replace init_registers_x86_64_linux with
8373 init_registers_amd64_linux.
8374
8375 2010-02-23 Maxim Kuvyrkov <maxim@codesourcery.com>
8376
8377 * configure.ac: Check for libdl. If it is not available link against
8378 static libthread_db.
8379 * configure: Regenerate.
8380
8381 2010-02-22 Pedro Alves <pedro@codesourcery.com>
8382
8383 PR9605
8384
8385 * i386-low.c (i386_length_and_rw_bits): Throw a fatal error if
8386 handing a read watchpoint.
8387 (i386_low_insert_watchpoint): Read watchpoints aren't supported.
8388
8389 2010-02-12 Doug Evans <dje@google.com>
8390
8391 * linux-low.c (linux_supports_tracefork_flag): Document.
8392 (linux_look_up_symbols): Add comment.
8393
8394 2010-02-03 H.J. Lu <hongjiu.lu@intel.com>
8395
8396 * regcache.c (supply_register): Clear regcache if buf is NULL.
8397
8398 2010-02-02 Nicolas Roche <roche@sourceware.org>
8399 Joel Brobecker <brobecker@adacore.com>
8400
8401 * inferiors.c (find_inferior): Add function documentation.
8402 (unloaded_dll): Handle the case where the unloaded dll has not
8403 been previously registered in the dll list.
8404
8405 2010-02-01 Daniel Jacobowitz <dan@codesourcery.com>
8406
8407 * linux-arm-low.c (thumb_breakpoint_len): Delete.
8408 (thumb2_breakpoint): New.
8409 (arm_breakpoint_at): Check for Thumb-2 breakpoints.
8410
8411 2010-01-29 Daniel Jacobowitz <dan@codesourcery.com>
8412
8413 * linux-low.c (get_stop_pc): Check for SIGTRAP.
8414 (linux_wait_for_event_1): Handle SIGILL and SIGSEGV as possible
8415 breakpoints.
8416
8417 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8418
8419 * linux-ppc-low.c (ppc_arch_setup): Adjust to regcache changes.
8420
8421 2010-01-21 Jan Kratochvil <jan.kratochvil@redhat.com>
8422
8423 * linux-s390-low.c (s390_collect_ptrace_register)
8424 (s390_supply_ptrace_register): Adjust it for the new regcache parameter.
8425
8426 2010-01-21 Doug Evans <dje@google.com>
8427
8428 * linux-low.c (PTRACE_ARG3_TYPE): Change from long to void*.
8429 (PTRACE_ARG4_TYPE): New macro.
8430 (handle_extended_wait): Cast ptrace arg4 to PTRACE_ARG4_TYPE.
8431 (linux_wait_for_event_1, linux_resume_one_lwp): Ditto.
8432 (fetch_register): Cast to uintptr_t before casting to PTRACE_ARG3_TYPE.
8433 (usr_store_inferior_registers): Ditto.
8434 (linux_read_memory, linux_write_memory): Ditto.
8435 (linux_test_for_tracefork): Ditto.
8436
8437 * linux-arm-low.c: Remove redundant include of gdb_proc_service.h.
8438 Only include elf.h if gdb_proc_service.h didn't include linux/elf.h.
8439
8440 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8441
8442 * proc-service.c (ps_lgetregs): Don't refetch registers from the
8443 target.
8444
8445 2010-01-21 Pedro Alves <pedro@codesourcery.com>
8446
8447 * spu-low.c (spu_fetch_registers, spu_store_registers): Change
8448 prototype to take a regcache. Adjust.
8449
8450 2010-01-20 Pedro Alves <pedro@codesourcery.com>
8451
8452 * regcache.h (struct thread_info): Forward declare.
8453 (struct regcache): New.
8454 (new_register_cache): Adjust prototype.
8455 (get_thread_regcache): Declare.
8456 (free_register_cache): Adjust prototype.
8457 (registers_to_string, registers_from_string): Ditto.
8458 (supply_register, supply_register_by_name, collect_register)
8459 (collect_register_as_string, collect_register_by_name): Ditto.
8460 * regcache.c (struct inferior_regcache_data): Delete.
8461 (get_regcache): Rename to ...
8462 (get_thread_regcache): ... this. Adjust. Switch inferior before
8463 fetching registers.
8464 (regcache_invalidate_one): Adjust.
8465 (regcache_invalidate): Fix prototype.
8466 (new_register_cache): Return the new register cache.
8467 (free_register_cache): Change prototype.
8468 (realloc_register_cache): Adjust.
8469 (registers_to_string): Change prototype to take a regcache. Adjust.
8470 (registers_from_string): Ditto.
8471 (register_data): Ditto.
8472 (supply_register): Ditto.
8473 (supply_register_by_name): Ditto.
8474 (collect_register): Ditto.
8475 (collect_register_as_string): Ditto.
8476 (collect_register_by_name): Ditto.
8477 * server.c (process_serial_event): Adjust.
8478 * linux-low.h (regset_fill_func, regset_store_func): Change
8479 prototype.
8480 (get_pc, set_pc, collect_ptrace_register, supply_ptrace_register):
8481 Change prototype.
8482 * linux-low.c (get_stop_pc): Adjust.
8483 (check_removed_breakpoint): Adjust.
8484 (linux_wait_for_event): Adjust.
8485 (linux_resume_one_lwp): Adjust.
8486 (fetch_register): Add regcache parameter. Adjust.
8487 (usr_store_inferior_registers): Ditto.
8488 (regsets_fetch_inferior_registers): Ditto.
8489 (regsets_store_inferior_registers): Ditto.
8490 (linux_fetch_registers, linux_store_registers): Ditto.
8491 * i387-fp.c (i387_cache_to_fsave): Change prototype to take a
8492 regcache. Adjust.
8493 (i387_fsave_to_cache, i387_cache_to_fxsave, i387_fxsave_to_cache):
8494 Ditto.
8495 * i387-fp.h (i387_cache_to_fsave, i387_fsave_to_cache): Change
8496 prototype to take a regcache.
8497 (i387_cache_to_fxsave, i387_fxsave_to_cache): Ditto.
8498 * remote-utils.c (convert_ascii_to_int, outreg)
8499 (prepare_resume_reply): Change prototype to take a regcache.
8500 Adjust.
8501 * target.h (struct target_ops) <fetch_registers, store_registers>:
8502 Change prototype to take a regcache.
8503 (fetch_inferior_registers, store_inferior_registers): Change
8504 prototype to take a regcache. Adjust.
8505 * proc-service.c (ps_lgetregs): Adjust.
8506 * linux-x86-low.c (x86_fill_gregset, x86_store_gregset)
8507 (x86_fill_fpregset, x86_store_fpregset, x86_fill_fpxregset)
8508 (x86_store_fpxregset, x86_get_pc, x86_set_pc): Change prototype to
8509 take a regcache. Adjust.
8510 * linux-arm-low.c (arm_fill_gregset, arm_store_gregset)
8511 (arm_fill_wmmxregset, arm_store_wmmxregset, arm_fill_vfpregset)
8512 (arm_store_vfpregset, arm_get_pc, arm_set_pc):
8513 (arm_breakpoint_at): Change prototype to take a regcache. Adjust.
8514 * linux-cris-low.c (cris_get_pc, cris_set_pc)
8515 (cris_cannot_fetch_register):
8516 (cris_breakpoint_at): Change prototype to take a regcache.
8517 Adjust.
8518 * linux-crisv32-low.c (cris_get_pc, cris_set_pc,
8519 cris_reinsert_addr, cris_write_data_breakpoint): Change prototype
8520 to take a regcache. Adjust.
8521 (cris_breakpoint_at, cris_insert_point, cris_remove_point):
8522 Adjust.
8523 * linux-m32r-low.c (m32r_get_pc, m32r_set_pc): Change prototype to
8524 take a regcache. Adjust.
8525 * linux-m68k-low.c (m68k_fill_gregset, m68k_store_gregset)
8526 (m68k_fill_fpregset, m68k_store_fpregset, m68k_get_pc,
8527 (m68k_set_pc): Change prototype to take a regcache. Adjust.
8528 * linux-mips-low.c (mips_get_pc):
8529 (mips_set_pc): Change prototype to take a regcache. Adjust.
8530 (mips_reinsert_addr): Adjust.
8531 (mips_collect_register): Change prototype to take a regcache.
8532 Adjust.
8533 (mips_supply_register):
8534 (mips_collect_register_32bit, mips_supply_register_32bit)
8535 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
8536 (mips_store_fpregset): Ditto.
8537 * linux-ppc-low.c (ppc_supply_ptrace_register)
8538 (ppc_supply_ptrace_register): Ditto.
8539 (parse_spufs_run): Adjust.
8540 (ppc_get_pc, ppc_set_pc, ppc_fill_gregset, ppc_fill_vsxregset)
8541 (ppc_store_vsxregset, ppc_fill_vrregset, ppc_store_vrregset)
8542 (ppc_fill_evrregset, ppc_store_evrregset): Change prototype to
8543 take a regcache. Adjust.
8544 * linux-s390-low.c (s390_collect_ptrace_register)
8545 (s390_supply_ptrace_register, s390_fill_gregset, s390_get_pc)
8546 (s390_set_pc): Change prototype to take a regcache. Adjust.
8547 (s390_arch_setup): Adjust.
8548 * linux-sh-low.c (sh_get_pc, sh_breakpoint_at)
8549 (sh_fill_gregset): Change prototype to take a regcache. Adjust.
8550 * linux-sparc-low.c (sparc_fill_gregset_to_stack)
8551 (sparc_fill_gregset, sparc_store_gregset_from_stack)
8552 (sparc_store_gregset, sparc_get_pc): Change prototype to take a
8553 regcache. Adjust.
8554 (sparc_breakpoint_at): Adjust.
8555 * linux-xtensa-low.c (xtensa_fill_gregset):
8556 (xtensa_store_gregset):
8557 (xtensa_fill_xtregset, xtensa_store_xtregset, xtensa_get_pc)
8558 (xtensa_set_pc): Change prototype to take a regcache. Adjust.
8559 * nto-low.c (nto_fetch_registers, nto_store_registers): Change
8560 prototype to take a regcache. Adjust.
8561 * win32-arm-low.c (arm_fetch_inferior_register)
8562 (arm_store_inferior_register): Change prototype to take a
8563 regcache. Adjust.
8564 * win32-i386-low.c (i386_fetch_inferior_register)
8565 (i386_store_inferior_register): Change prototype to take a
8566 regcache. Adjust.
8567 * win32-low.c (child_fetch_inferior_registers)
8568 (child_store_inferior_registers): Change prototype to take a
8569 regcache. Adjust.
8570 (win32_wait): Adjust.
8571 (win32_fetch_inferior_registers): Change prototype to take a
8572 regcache. Adjust.
8573 (win32_store_inferior_registers): Adjust.
8574 * win32-low.h (struct win32_target_ops) <fetch_inferior_register,
8575 store_inferior_register>: Change prototype to take a regcache.
8576
8577 2010-01-20 Doug Evans <dje@google.com>
8578
8579 * linux-low.c (linux_create_inferior): Wrap use of __SIGRTMIN in
8580 #ifdef.
8581 (linux_wait_for_event1, linux_init_signals): Ditto.
8582 (W_STOPCODE): Provide definition if missing.
8583
8584 2010-01-13 Vladimir Prus <vladimir@codesourcery.com>
8585
8586 * linux-low.c (linux_core_of_thread): New.
8587 (compare_ints, show_process, list_threads): New.
8588 (linux_qxfer_osdata): Report threads and cores.
8589 (linux_target_op): Register linux_core_of_thread.
8590 * remote-utils.c (prepare_resume_reply): Report the core.
8591 (buffer_xml_printf): Support %d specifier.
8592 * server.c (handle_threads_qxfer_proper, handle_threads_qxfer):
8593 New.
8594 (handle_query): Handle qXfer:threads. Announce availability
8595 thereof.
8596 * target.h (struct target_ops): New field core_of_thread.
8597
8598 2010-01-04 Ulrich Weigand <uweigand@de.ibm.com>
8599
8600 * Makefile.in (clean): Remove new generated files.
8601 (reg-s390.o, reg-s390.c): Remove rules.
8602 (reg-s390x.o, reg-s390x.c): Likewise.
8603 (s390-linux32.o, s390-linux32.c): Add rules.
8604 (s390-linux64.o, s390-linux64.c): Likewise.
8605 (s390x-linux64.o, s390x-linux64.c): Likewise.
8606 * configure.srv (s390*-*-linux*): Update srv_regobj and srv_xmlfiles.
8607 * linux-s390-low.c: Include <elf.h>.
8608 (HWCAP_S390_HIGH_GPRS): Define if undefined.
8609 (init_registers_s390): Remove prototype.
8610 (init_registers_s390x): Likewise.
8611 (init_registers_s390_linux32): Add prototype.
8612 (init_registers_s390_linux64): Likewise.
8613 (init_registers_s390x_linux64): Likewise.
8614 (s390_num_regs_3264): New define.
8615 (s390_regmap_3264): New global variable.
8616 (s390_cannot_fetch_register): Remove obsolete check.
8617 (s390_cannot_store_register): Likewise.
8618 (s390_collect_ptrace_register): Handle upper/lower register halves.
8619 (s390_supply_ptrace_register): Likewise.
8620 (s390_fill_gregset): Update to register number changes.
8621 (s390_get_hwcap): New routine.
8622 (s390_arch_setup): Detect 32-bit process running on 64-bit system.
8623 Install appropriate regmap and register set.
8624
8625 2010-01-01 Joel Brobecker <brobecker@adacore.com>
8626
8627 * server.c (gdbserver_version): Update copyright year to 2010.
8628 * gdbreplay.c (gdbreplay_version): Likewise.
8629
8630 2009-12-28 Doug Evans <dje@google.com>
8631
8632 * linux-low.c: Delete inclusion of ansidecl.h, elf/common.h,
8633 elf/external.h. Include <elf.h> instead but only if necessary.
8634
8635 2009-12-28 Pedro Alves <pedro@codesourcery.com>
8636
8637 * linux-low.c (linux_remove_process): Remove `detaching'
8638 parameter. Don't release/detach from thread_db here.
8639 (linux_kill): Release/detach from thread_db here, ...
8640 (linux_detach): ... and here, before actually detaching.
8641 (linux_wait_1): ... and here, when a process exits.
8642 * thread-db.c (any_thread_of): New.
8643 (thread_db_free): Switch the current inferior to a thread of the
8644 passed in process.
8645
8646 2009-12-21 Doug Evans <dje@google.com>
8647
8648 * linux-x86-low.c: Delete outdated comment about Elf32_Phdr.
8649
8650 * linux-low.c (kill_lwp): Use __NR_tkill instead of SYS_tkill.
8651 Move definition of tkill_failed to ifdef __NR_tkill to avoid gcc
8652 warning ifndef __NR_tkill. Move setting of errno there too.
8653 Delete unnecessary resetting of errno after syscall.
8654 Minor comment changes to match gdb/linux-nat.c:kill_lwp.
8655
8656 * configure.ac: Check for dladdr.
8657 * config.in: Regenerate.
8658 * configure: Regenerate.
8659 * thread-db.c (dladdr_to_soname): Only define ifdef HAVE_DLADDR.
8660 (try_thread_db_load): Update.
8661
8662 * linux-low.c (my_waitpid): Delete unnecessary prototype.
8663
8664 2009-12-18 Doug Evans <dje@google.com>
8665
8666 * event-loop.c: Include unistd.h if it exists.
8667
8668 * linux-low.c (my_waitpid): Move definition away from being in
8669 between linux_tracefork_child/linux_test_for_tracefork.
8670
8671 * gdb_proc_service.h (psaddr_t): Fix type.
8672 * thread-db.c (thread_db_info.td_thr_tls_get_addr_p): Fix
8673 signature to match glibc.
8674
8675 2009-12-16 Doug Evans <dje@google.com>
8676
8677 * linux-low.c (linux_read_memory): Fix argument to read.
8678
8679 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8680
8681 * win32-low.c (get_child_debug_event): On EXIT_THREAD_DEBUG_EVENT
8682 events, don't leave current_inferior pointing at null.
8683
8684 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8685
8686 * win32-low.c (LOG): Delete.
8687 (OUTMSG): Output to stderr.
8688 (OUTMSG2): Conditionalize on `debug_threads' variable, instead of
8689 on compile time LOG macro.
8690 (win32_wait): Fix debug output.
8691
8692 2009-11-26 Pedro Alves <pedro@codesourcery.com>
8693
8694 * win32-low.c (win32_add_one_solib): If the dll name is
8695 "ntdll.dll", prepend the system directory to the dll path.
8696
8697 2009-11-17 Daniel Jacobowitz <dan@codesourcery.com>
8698
8699 * m68k-tdep.c (m68k_gdbarch_init): Reuse previous initialization.
8700
8701 2009-11-17 Nathan Sidwell <nathan@codesourcery.com>
8702 Vladimir Prus <vladimir@codesourcery.com>
8703
8704 * Makefile.in (reg-cf.o, reg-cf.c): New targets.
8705 * configure.ac: Check for __mcoldfire__ and set
8706 gdb_cv_m68k_is_coldfire.
8707 * configure.srv: Use gdb_cv_m68k_is_coldfire to select between
8708 reg-cf.o and reg-m68k.o.
8709 * configure: Regenerated.
8710
8711 2009-11-16 Pedro Alves <pedro@codesourcery.com>
8712
8713 * linux-low.c (linux_remove_process): Add `detaching' parameter.
8714 Pass it to thread_db_free.
8715 (linux_kill, linux_detach, linux_wait_1): Adjust to pass the
8716 proper `detaching' argument to linux_remove_process.
8717 * linux-low.h (thread_db_free): Add `detaching' parameter.
8718 * thread-db.c (thread_db_init): Pass false as `detaching' argument
8719 to thread_db_free.
8720 (thread_db_free): Add `detaching' parameter. Only
8721 call td_ta_clear_event if detaching from process.
8722
8723 2009-11-12 Maxim Kuvyrkov <maxim@codesourcery.com>
8724
8725 * thread-db.c (thread_db_free): Fix typo.
8726
8727 2009-11-11 Paul Pluzhnikov <ppluzhnikov@google.com>
8728
8729 PR gdb/10838
8730 * thread-db.c (thread_db_free): Call td_ta_clear_event.
8731
8732 2009-11-03 Nathan Sidwell <nathan@codesourcery.com>
8733
8734 * configure.ac (i[34567]86-*): Check if we're targetting x86-64
8735 with an i686 compiler.
8736 * configure.srv (i[34567]86-*-linux*): Pull in x86-64 handling if
8737 needed.
8738 * configure: Rebuilt.
8739
8740 2009-10-29 Sandra Loosemore <sandra@codesourcery.com>
8741
8742 PR gdb/10783
8743
8744 * server.c (handle_search_memory_1): Correct read_addr initialization
8745 in loop for searching subsequent chunks.
8746
8747 2009-10-29 Paul Pluzhnikov <ppluzhnikov@google.com>
8748
8749 * configure.ac: New --with-libthread-db option.
8750 * thread-db.c: Allow direct dependence on libthread_db.
8751 (thread_db_free): Adjust.
8752 * config.in: Regenerate.
8753 * configure: Likewise.
8754
8755 2009-10-28 Paul Pluzhnikov <ppluzhnikov@google.com>
8756
8757 PR gdb/10757
8758 * thread-db.c (attach_thread): New function.
8759 (maybe_attach_thread): Return success/failure.
8760 (find_new_threads_callback): Adjust.
8761 (thread_db_find_new_threads): Loop until no new threads.
8762
8763 2009-10-13 Pedro Alves <pedro@codesourcery.com>
8764
8765 * proc-service.c (ps_lgetregs): Formatting.
8766
8767 2009-10-08 Paul Pluzhnikov <ppluzhnikov@google.com>
8768
8769 * acinclude.m4: (SRV_CHECK_THREAD_DB, SRV_CHECK_TLS_GET_ADDR): Remove.
8770 * configure.ac: Adjust.
8771 * linux-low.h (struct process_info_private): Move members to struct
8772 thread_db.
8773 (thread_db_free, thread_db_handle_monitor_command): New prototype.
8774 * linux-low.c (linux_remove_process): Adjust.
8775 (linux_wait_for_event_1, linux_look_up_symbols): Likewise.
8776 * server.c (handle_query): Move code ...
8777 (handle_monitor_command): ... here. New function.
8778 * target.h (struct target_ops): New member.
8779 * thread-db.c (struct thread_db): New.
8780 (libthread_db_search_path): New variable.
8781 (thread_db_create_event, thread_db_enable_reporting)
8782 (find_one_thread, maybe_attach_thread, find_new_threads_callback)
8783 (thread_db_find_new_threads, (thread_db_get_tls_address): Adjust.
8784 (try_thread_db_load_1, dladdr_to_soname): New functions.
8785 (try_thread_db_load, thread_db_load_search): New functions.
8786 (thread_db_init): Search for libthread_db.
8787 (thread_db_free): New function.
8788 (thread_db_handle_monitor_command): Likewise.
8789 * config.in: Regenerate.
8790 * configure: Regenerate.
8791
8792 2009-09-27 Ulrich Weigand <uweigand@de.ibm.com>
8793
8794 * spu-low.c (spu_kill): Wait for inferior to terminate.
8795 Call clear_inferiors.
8796 (spu_detach): Call clear_inferiors.
8797
8798 2009-08-22 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8799
8800 * aclocal.m4: Regenerate.
8801 * config.in: Likewise.
8802 * configure: Likewise.
8803
8804 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8805
8806 * linux-ppc-low.c (INSTR_SC, NR_spu_run): Define.
8807 (parse_spufs_run): New function.
8808 (ppc_get_pc, ppc_set_pc): Detect and handle SPU PC.
8809 (ppc_breakpoint_at): Handle SPU breakpoints.
8810
8811 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8812
8813 * linux-low.c: Include <sys/stat.h> and <sys/vfs.h>.
8814 (SPUFS_MAGIC): Define.
8815 (spu_enumerate_spu_ids): New function.
8816 (linux_qxfer_spu): New function.
8817 (linux_target_ops): Install linux_qxfer_spu.
8818
8819 2009-07-31 Ulrich Weigand <uweigand@de.ibm.com>
8820
8821 * configure.srv (powerpc*-*-linux*): Add powerpc-cell32l.o
8822 and powerpc-cell64l.o to srv_regobj. Add rs6000/powerpc-cell32l.xml
8823 and rs6000/powerpc-cell64l.xml to srv_xmlfiles.
8824 * Makefile.in (powerpc-cell32l.o, powerpc-cell32l.c): New rules.
8825 (powerpc-cell64l.o, powerpc-cell64l.c): Likewise.
8826 (clean): Handle powerpc-cell32l.c and powerpc-cell64l.c.
8827 * linux-ppc-low.c (PPC_FEATURE_CELL): Define.
8828 (init_registers_powerpc_cell32l): Add prototype.
8829 (init_registers_powerpc_cell64l): Likewise.
8830 (ppc_arch_setup): Detect Cell/B.E. architecture.
8831
8832 2009-07-30 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
8833
8834 * Makefile.in (datarootdir): New variable.
8835
8836 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8837
8838 * linux-low.c (linux_write_memory): Update debugging output.
8839 * Makefile.in (clean): Add new descriptions.
8840 (arm-with-vfpv2.o, arm-with-vfpv2.c, arm-with-vfpv3.o)
8841 (arm-with-vfpv3.c, arm-with-neon.o, arm-with-neon.c): New rules.
8842 * configure.srv: Add new files for arm*-*-linux*.
8843 * linux-arm-low.c: Add new declarations.
8844 (PTRACE_GETVFPREGS, PTRACE_SETVFPREGS): Define if undefined.
8845 (arm_hwcap, HWCAP_VFP, HWCAP_IWMMXT, HWCAP_NEON, HWCAP_VFPv3)
8846 (HWCAP_VFPv3D16): New.
8847 (arm_fill_wmmxregset, arm_store_wmmxregset): Check HWCAP_IWMMXT
8848 instead of __IWMMXT__.
8849 (arm_fill_vfpregset, arm_store_vfpregset, arm_get_hwcap)
8850 (arm_arch_setup): New.
8851 (target_regsets): Remove #ifdef. Add VFP regset.
8852 (the_low_target): Use arm_arch_setup.
8853
8854 2009-07-28 Daniel Jacobowitz <dan@codesourcery.com>
8855
8856 * linux-low.c (linux_kill_one_lwp): Adjust kernel workaround to skip
8857 the main thread again.
8858
8859 2009-07-06 Aleksandar Ristovski <aristovski@qnx.com>
8860
8861 Adding Neutrino gdbserver.
8862 * configure: Regenerated.
8863 * configure.ac: Add case for srv_qnx and set LIBS accordingly.
8864 * configure.srv (i[34567]86-*-nto*): New target.
8865 * nto-low.c, nto-low.h, nto-x86-low.c: New files.
8866 * remote-utils.c [__QNX__]: Include sys/iomgr.h
8867 (nto_comctrl) [__QNX__]: New function.
8868 (enable_async_io, disable_async_io) [__QNX__]: Call nto_comctrl.
8869
8870 2009-07-05 Danny Backx <dannybackx@users.sourceforge.net>
8871
8872 * configure.srv (i[34567]86-*-mingw32ce*): Add i386-low.o to
8873 srv_tgtobj.
8874
8875 2009-07-04 Danny Backx <dannybackx@users.sourceforge.net>
8876 Pedro Alves <pedro@codesourcery.com>
8877
8878 * win32-i386-low.c (i386_get_thread_context): Handle systems that
8879 don't support CONTEXT_EXTENDED_REGISTERS.
8880 (i386_win32_breakpoint, i386_win32_breakpoint_len): New.
8881 (the_low_target): Install them.
8882 * win32-low.c (get_child_debug_event): Handle WaitForDebugEvent
8883 failing with ERROR_PIPE_NOT_CONNECTED.
8884
8885 2009-06-30 Doug Evans <dje@google.com>
8886 Pierre Muller <muller@ics.u-strasbg.fr>
8887
8888 Add h/w watchpoint support to x86-linux, win32-i386.
8889 * Makefile.in (SFILES): Add i386-low.c
8890 (i386_low_h): Define.
8891 (i386-low.o): Add dependencies.
8892 (linux-x86-low.o): Add i386-low.h dependency.
8893 (win32-i386-low.o): Ditto.
8894 * i386-low.c: New file.
8895 * i386-low.h: New file.
8896 * configure.srv (i[34567]86-*-cygwin*): Add i386-low.o to srv_tgtobj.
8897 (i[34567]86-*-linux*, i[34567]86-*-mingw*, x86_64-*-linux*): Ditto.
8898 * linux-low.c (linux_add_process): Initialize arch_private.
8899 (linux_remove_process): Free arch_private.
8900 (add_lwp): Initialize arch_private.
8901 (delete_lwp): Free arch_private.
8902 (linux_resume_one_lwp): Call the_low_target.prepare_to_resume if
8903 provided.
8904 * linux-low.h (process_info_private): New member arch_private.
8905 (lwp_info): New member arch_private.
8906 (linux_target_ops): New members new_process, new_thread,
8907 prepare_to_resume.
8908 (ptid_of): New macro.
8909 * linux-x86-low.c: Include stddef.h, i386-low.h.
8910 (arch_process_info): New struct.
8911 (arch_lwp_info): New struct.
8912 (x86_linux_dr_get, x86_linux_dr_set): New functions.
8913 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8914 (i386_dr_low_get_status): New function.
8915 (x86_insert_point, x86_remove_point): New functions.
8916 (x86_stopped_by_watchpoint): New function.
8917 (x86_stopped_data_address): New function.
8918 (x86_linux_new_process, x86_linux_new_thread): New functions.
8919 (x86_linux_prepare_to_resume): New function.
8920 (the_low_target): Add entries for insert_point, remove_point,
8921 stopped_by_watchpoint, stopped_data_address, new_process, new_thread,
8922 prepare_to_resume.
8923 * server.c (debug_hw_points): New global.
8924 (monitor_show_help): Document set debug-hw-points.
8925 (handle_query): Process "set debug-hw-points".
8926 * server.h (debug_hw_points): Declare.
8927 (paddress): Declare.
8928 * utils.c (NUMCELLS, CELLSIZE): New macros.
8929 (get_sell, xsnprintf, paddress): New functions.
8930 * win32-arm-low.c (the_low_target): Add entries for insert_point,
8931 remove_point, stopped_by_watchpoint, stopped_data_address.
8932 * win32-i386-low.c: Include i386-low.h.
8933 (debug_reg_state): Replaces dr.
8934 (i386_dr_low_set_addr, i386_dr_low_set_control): New functions.
8935 (i386_dr_low_get_status): New function.
8936 (i386_insert_point, i386_remove_point): New functions.
8937 (i386_stopped_by_watchpoint): New function.
8938 (i386_stopped_data_address): New function.
8939 (i386_initial_stuff): Update.
8940 (get_thread_context,set_thread_context,i386_thread_added): Update.
8941 (the_low_target): Add entries for insert_point,
8942 remove_point, stopped_by_watchpoint, stopped_data_address.
8943 * win32-low.c (win32_insert_watchpoint): New function.
8944 (win32_remove_watchpoint): New function.
8945 (win32_stopped_by_watchpoint): New function.
8946 (win32_stopped_data_address): New function.
8947 (win32_target_ops): Add entries for insert_watchpoint,
8948 remove_watchpoint, stopped_by_watchpoint, stopped_data_address.
8949 * win32-low.h (win32_target_ops): New members insert_point,
8950 remove_point, stopped_by_watchpoint, stopped_data_address.
8951
8952 2009-06-25 Pedro Alves <pedro@codesourcery.com>
8953
8954 * server.c (process_serial_event): Re-return unsupported, not
8955 error, if the type isn't recognized. Re-allow supporting only
8956 insert or remove packets. Also call require_running for
8957 breakpoints. Add missing break statement to default case. Tidy.
8958 * target.h (struct target_ops): Rename insert_watchpoint to
8959 insert_point, and remove_watchpoint to remove_point.
8960
8961 * linux-low.h (struct linux_target_ops): Likewise.
8962 * linux-low.c (linux_insert_watchpoint): Rename to ...
8963 (linux_insert_point): ... this. Adjust.
8964 (linux_remove_watchpoint): Rename to ...
8965 (linux_remove_point): ... this. Adjust.
8966 (linux_target_ops): Adjust.
8967 * linux-crisv32-low.c (cris_insert_watchpoint): Rename to ...
8968 (cris_insert_point): ... this.
8969 (cris_remove_watchpoint): Rename to ...
8970 (cris_remove_point): ... this.
8971 (the_low_target): Adjust.
8972
8973 2009-06-24 Pierre Muller <muller@ics.u-strasbg.fr>
8974
8975 * server.c (handle_v_kill): Pass signal_pid to
8976 kill_inferior if multi_process is zero.
8977
8978 2009-06-23 Aleksandar Ristovski <aristovski@qnx.com>
8979
8980 * server.c (process_serial_event): Add support for Z0 and Z1 packet.
8981 * target.h (target_ops): Comment for *_watchpoint to make it clear
8982 the functions can get types '0' and '1'.
8983
8984 2009-06-22 Aleksandar Ristovski <aristovski@qnx.com>
8985
8986 * linux-low.c (usr_fetch_inferior_registers): Remove check for regno 0.
8987 * proc-service.c (ps_lgetregs): Pass -1 to fetch all registers.
8988 * regcache.c (get_regcache): Likewise.
8989 * spu-low.c (spu_fetch_registers): Remove 0 to -1 conversion.
8990 * win32-low.c (child_fetch_inferior_registers): Remove check for
8991 regno 0.
8992
8993 2009-06-19 Aleksandar Ristovski <aristovski@qnx.com>
8994 Pedro Alves <pedro@codesourcery.com>
8995
8996 * target.h (struct target_ops) <supports_multi_process>: New
8997 callback.
8998 (target_supports_multi_process): New.
8999 * server.c (handle_query): Even if GDB reports support, only
9000 enable multi-process if the target also supports it. Report
9001 multi-process support only if the target backend supports it.
9002 * linux-low.c (linux_supports_multi_process): New function.
9003 (linux_target_ops): Install it as target_supports_multi_process
9004 callback.
9005
9006 2009-05-24 Doug Evans <dje@google.com>
9007
9008 Global renaming of find_thread_pid to find_thread_ptid.
9009 * server.h (find_thread_ptid): Renamed from find_thread_pid.
9010 * inferiors.c (find_thread_ptid): Renamed from find_thread_pid.
9011 All callers updated.
9012
9013 * linux-low.c (handle_extended_wait): Use linux_resume_one_lwp
9014 to resume the newly created thread, don't call ptrace (PTRACE_CONT)
9015 directly.
9016
9017 * linux-low.c (get_stop_pc): Print pc if debug_threads.
9018 (check_removed_breakpoint, linux_wait_for_lwp): Ditto.
9019 (linux_resume_one_lwp): Ditto.
9020
9021 2009-05-23 Doug Evans <dje@google.com>
9022
9023 * linux-low.c (linux_resume_one_lwp): Change type of first arg
9024 from struct inferior_list_entry * to struct lwp_info *.
9025 All callers updated.
9026
9027 2009-05-13 Doug Evans <dje@google.com>
9028
9029 * linux-x86-low.c: Don't include assert.h.
9030 (x86_siginfo_fixup): Use fatal, not assert.
9031 (x86_arch_setup): Fix comment.
9032
9033 2009-05-12 Doug Evans <dje@google.com>
9034
9035 Biarch support for i386/amd64 gdbserver.
9036 * Makefile.in (SFILES): Remove linux-i386-low.c, linux-x86-64-low.c.
9037 Add linux-x86-low.c.
9038 (linux-i386-low.o, linux-x86-64-low.o): Delete.
9039 (linux-x86-low.o): Add.
9040 * linux-x86-64-low.c: Delete.
9041 * linux-i386-low.c: Delete.
9042 * linux-x86-low.c: New file.
9043 * configure.srv (i?86-linux srv_tgtobj): Replace linux-i386-low.o with
9044 linux-x86-low.o.
9045 (x86_64-linux srv_tgtobj): Replace linux-x86-64-low.o with
9046 linux-x86-low.o.
9047 (x86_64-linux srv_regobj): Add reg-i386-linux.o.
9048 * linux-low.c: Include ansidecl.h, elf/common.h, elf/external.h.
9049 (linux_child_pid_to_exec_file): New function.
9050 (elf_64_header_p, elf_64_file_p): New functions.
9051 (siginfo_fixup): New function.
9052 (linux_xfer_siginfo): New local inf_siginfo. Call siginfo_fixup to
9053 give target a chance to convert layout.
9054 * linux-low.h (linux_target_ops): New member siginfo_fixup.
9055 (linux_child_pid_to_exec_file, elf_64_file_p): Declare.
9056
9057 2009-05-07 Doug Evans <dje@google.com>
9058
9059 * linux-low.c (regsets_fetch_inferior_registers): Fix memory leak.
9060 (regsets_store_inferior_registers): Ditto.
9061
9062 2009-05-06 Pedro Alves <pedro@codesourcery.com>
9063
9064 PR server/10048
9065
9066 * linux-low.c (must_set_ptrace_flags): Delete.
9067 (linux_create_inferior): Set `lwp->must_set_ptrace_flags' instead
9068 of the global.
9069 (linux_attach_lwp_1): Don't set PTRACE_SETOPTIONS here. Set
9070 `lwp->must_set_ptrace_flags' instead.
9071 (linux_wait_for_event_1): Set ptrace options here.
9072 (linux_wait_1): ... not here.
9073
9074 2009-04-30 Doug Evans <dje@google.com>
9075
9076 * inferiors.c (started_inferior_callback): New function.
9077 (attached_inferior_callback): New function.
9078 (have_started_inferiors_p, have_attached_inferiors_p): New functions.
9079 * server.c (print_started_pid, print_attached_pid): New functions.
9080 (detach_or_kill_for_exit): New function.
9081 (main): Call it instead of for_each_inferior (kill_inferior_callback).
9082 * server.h (have_started_inferiors_p): Declare.
9083 (have_attached_inferiors_p): Declare.
9084
9085 * inferiors.c (remove_process): Fix memory leak, free process.
9086 * linux-low.c (linux_remove_process): New function.
9087 (linux_kill): Call it instead of remove_process.
9088 (linux_detach, linux_wait_1): Ditto.
9089
9090 2009-04-19 Danny Backx <dannybackx@users.sourceforge.net>
9091
9092 * configure.srv: Add x86 Windows CE target.
9093
9094 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9095
9096 * inferiors.c (get_thread_process): Make global.
9097 * server.h (get_thread_process): Add prototype.
9098 * thread-db.c (find_one_thread): Use get_thread_process
9099 instead of current_process.
9100 (thread_db_get_tls_address): Do not crash if called when
9101 thread layer is not yet initialized.
9102
9103 2009-04-03 Ulrich Weigand <uweigand@de.ibm.com>
9104
9105 * remote-utils.c (prepare_resume_reply): Null-terminate packet.
9106 * spu-low.c (current_tid): Rename to ...
9107 (current_ptid): ... this.
9108 (fetch_ppc_register, fetch_ppc_memory, store_ppc_memory,
9109 spu_proc_xfer_spu, spu_resume, spu_request_interrupt): Use
9110 ptid_get_lwp (current_ptid) instead of current_tid.
9111 (spu_kill, spu_detach, spu_join, spu_wait): Use pid argument
9112 instead of current_tid. Use find_process_pid to verify pid
9113 argument is valid. Pass proper argument to remove_process.
9114 (spu_thread_alive): Compare current_ptid instead of current_tid.
9115 (spu_resume): Likewise.
9116
9117 2009-04-02 Pedro Alves <pedro@codesourcery.com>
9118
9119 * linux-low.c (usr_store_inferior_registers): Declare local `pid'
9120 variable.
9121
9122 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9123
9124 Implement the multiprocess extensions, and add linux multiprocess
9125 support.
9126
9127 * server.h (ULONGEST): Declare.
9128 (struct ptid, ptid_t): New.
9129 (minus_one_ptid, null_ptid): Declare.
9130 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9131 (ptid_get_tid, ptid_equal, ptid_is_pid): Declare.
9132 (struct inferior_list_entry): Change `id' type from unsigned from
9133 to ptid_t.
9134 (struct sym_cache, struct breakpoint, struct
9135 process_info_private): Forward declare.
9136 (struct process_info): Declare.
9137 (current_process): Declare.
9138 (all_processes): Declare.
9139 (initialize_inferiors): Declare.
9140 (add_thread): Adjust to use ptid_t.
9141 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): Ditto.
9142 (add_process, remove_process, find_thread_pid): Declare.
9143 (find_inferior_id): Adjust to use ptid_t.
9144 (cont_thread, general_thread, step_thread): Change type to ptid_t.
9145 (multi_process): Declare.
9146 (push_event): Adjust to use ptid_t.
9147 (read_ptid, write_ptid): Declare.
9148 (prepare_resume_reply): Adjust to use ptid_t.
9149 (clear_symbol_cache): Declare.
9150 * inferiors.c (all_processes): New.
9151 (null_ptid, minus_one_ptid): New.
9152 (ptid_build, pid_to_ptid, ptid_get_pid, ptid_get_lwp)
9153 (ptid_get_tid, ptid_equal, ptid_is_pid): New.
9154 (add_thread): Change unsigned long to ptid. Remove gdb_id
9155 parameter. Adjust.
9156 (thread_id_to_gdb_id, thread_to_gdb_id): Change unsigned long to ptid.
9157 (gdb_id_to_thread): Rename to ...
9158 (find_thread_pid): ... this. Change unsigned long to ptid.
9159 (gdb_id_to_thread_id, find_inferior_id): Change unsigned long to ptid.
9160 (loaded_dll, pull_pid_from_list): Adjust.
9161 (add_process, remove_process, find_process_pid)
9162 (get_thread_process, current_process, initialize_inferiors): New.
9163 * target.h (struct thread_resume) <thread>: Change type to ptid_t.
9164 (struct target_waitstatus) <related_pid>: Ditto.
9165 (struct target_ops) <kill, detach>: Add `pid' argument. Change
9166 return type to int.
9167 (struct target_ops) <join>: Add `pid' argument.
9168 (struct target_ops) <thread_alive>: Change pid's type to ptid_t.
9169 (struct target_ops) <wait>: Add `ptid' field. Change return type
9170 to ptid.
9171 (kill_inferior, detach_inferior, join_inferior): Add `pid' argument.
9172 (mywait): Add `ptid' argument. Change return type to ptid_t.
9173 (target_pid_to_str): Declare.
9174 * target.c (set_desired_inferior): Adjust to use ptids.
9175 (mywait): Add new `ptid' argument. Adjust.
9176 (target_pid_to_str): New.
9177 * mem-break.h (free_all_breakpoints): Declare.
9178 * mem-break.c (breakpoints): Delelete.
9179 (set_breakpoint_at, delete_breakpoint, find_breakpoint_at)
9180 (check_mem_read, check_mem_write, delete_all_breakpoints): Adjust
9181 to use per-process breakpoint list.
9182 (free_all_breakpoints): New.
9183 * remote-utils.c (struct sym_cache) <name>: Drop `const'.
9184 (symbol_cache, all_symbols_looked_up): Delete.
9185 (hexchars): New.
9186 (ishex, unpack_varlen_hex, write_ptid, hex_or_minus_one,
9187 read_ptid): New.
9188 (prepare_resume_reply): Change ptid argument's type from unsigned
9189 long to ptid_t. Adjust. Implement W;process and X;process.
9190 (free_sym_cache, clear_symbol_cache): New.
9191 (look_up_one_symbol): Adjust to per-process symbol cache. *
9192 * server.c (cont_thread, general_thread, step_thread): Change type
9193 to ptid_t.
9194 (attached): Delete.
9195 (multi_process): New.
9196 (last_ptid): Change type to ptid_t.
9197 (struct vstop_notif) <ptid>: Change type to ptid_t.
9198 (queue_stop_reply, push_event): Change `ptid' argument's type to
9199 ptid_t.
9200 (discard_queued_stop_replies): Add `pid' argument.
9201 (start_inferior): Adjust to use ptids. Adjust to mywait interface
9202 changes. Don't reference the `attached' global.
9203 (attach_inferior): Adjust to mywait interface changes.
9204 (handle_query): Adjust to use ptids. Parse GDB's qSupported
9205 features. Handle and report "multiprocess+". Handle
9206 "qAttached:PID".
9207 (handle_v_cont): Adjust to use ptids. Adjust to mywait interface
9208 changes.
9209 (handle_v_kill): New.
9210 (handle_v_stopped): Adjust to use target_pid_to_str.
9211 (handle_v_requests): Allow multiple attaches and runs when
9212 multiprocess extensions are in effect. Handle "vKill".
9213 (myresume): Adjust to use ptids.
9214 (queue_stop_reply_callback): Add `arg' parameter. Handle it.
9215 (handle_status): Adjust to discard_queued_stop_replies interface
9216 change.
9217 (first_thread_of, kill_inferior_callback)
9218 (detach_or_kill_inferior_callback, join_inferiors_callback): New.
9219 (main): Call initialize_inferiors. Adjust to use ptids, killing
9220 and detaching from all inferiors. Handle multiprocess packet
9221 variants.
9222 * linux-low.h: Include gdb_proc_service.h.
9223 (struct process_info_private): New.
9224 (struct linux_target_ops) <pid_of>: Use ptid_get_pid.
9225 <lwpid_of>: Use ptid_get_lwp.
9226 (get_lwp_thread): Adjust.
9227 (struct lwp_info): Add `dead' member.
9228 (find_lwp_pid): Declare.
9229 * linux-low.c (thread_db_active): Delete.
9230 (new_inferior): Adjust comment.
9231 (inferior_pid): Delete.
9232 (linux_add_process): New.
9233 (handle_extended_wait): Adjust.
9234 (add_lwp): Change unsigned long to ptid.
9235 (linux_create_inferior): Add process to processes table. Adjust
9236 to use ptids. Don't set new_inferior here.
9237 (linux_attach_lwp): Rename to ...
9238 (linux_attach_lwp_1): ... this. Add `initial' argument. Handle
9239 it. Adjust to use ptids.
9240 (linux_attach_lwp): New.
9241 (linux_attach): Add process to processes table. Don't set
9242 new_inferior here.
9243 (struct counter): New.
9244 (second_thread_of_pid_p, last_thread_of_process_p): New.
9245 (linux_kill_one_lwp): Add `args' parameter. Handle it. Adjust to
9246 multiple processes.
9247 (linux_kill): Add `pid' argument. Handle it. Adjust to multiple
9248 processes. Remove process from process table.
9249 (linux_detach_one_lwp): Add `args' parameter. Handle it. Adjust
9250 to multiple processes.
9251 (any_thread_of): New.
9252 (linux_detach): Add `pid' argument, and handle it. Remove process
9253 from processes table.
9254 (linux_join): Add `pid' argument. Handle it.
9255 (linux_thread_alive): Change unsighed long argument to ptid_t.
9256 Consider dead lwps as not being alive.
9257 (status_pending_p): Rename `dummy' argument to `arg'. Filter out
9258 threads we're not interested in.
9259 (same_lwp, find_lwp_pid): New.
9260 (linux_wait_for_lwp): Change `pid' argument's type from int to
9261 ptid_t. Adjust.
9262 (linux_wait_for_event): Rename to ...
9263 (linux_wait_for_event_1): ... this. Change `pid' argument's type
9264 from int to ptid_t. Adjust.
9265 (linux_wait_for_event): New.
9266 (linux_wait_1): Add `ptid' argument. Change return type to
9267 ptid_t. Adjust. Use last_thread_of_process_p. Remove processes
9268 that exit from the process table.
9269 (linux_wait): Add `ptid' argument. Change return type to ptid_t.
9270 Adjust.
9271 (mark_lwp_dead): New.
9272 (wait_for_sigstop): Adjust to use ptids. If a process exits while
9273 stopping all threads, mark its main lwp as dead.
9274 (linux_set_resume_request, linux_resume_one_thread): Adjust to use
9275 ptids.
9276 (fetch_register, usr_store_inferior_registers)
9277 (regsets_fetch_inferior_registers)
9278 (regsets_store_inferior_registers, linux_read_memory)
9279 (linux_write_memory): Inline `inferior_pid'.
9280 (linux_look_up_symbols): Adjust to use per-process
9281 `thread_db_active'.
9282 (linux_request_interrupt): Adjust to use ptids.
9283 (linux_read_auxv): Inline `inferior_pid'.
9284 (initialize_low): Don't reference thread_db_active.
9285 * gdb_proc_service.h (struct ps_prochandle) <pid>: Remove.
9286 * proc-service.c (ps_lgetregs): Use find_lwp_pid.
9287 (ps_getpid): Return the pid of the current inferior.
9288 * thread-db.c (proc_handle, thread_agent): Delete.
9289 (thread_db_create_event, thread_db_enable_reporting): Adjust to
9290 per-process data.
9291 (find_one_thread): Change argument type to ptid_t. Adjust to
9292 per-process data.
9293 (maybe_attach_thread): Adjust to per-process data and ptids.
9294 (thread_db_find_new_threads): Ditto.
9295 (thread_db_init): Ditto.
9296 * spu-low.c (spu_create_inferior, spu_attach): Add process to
9297 processes table. Adjust to use ptids.
9298 (spu_kill, spu_detach): Adjust interface. Remove process from
9299 processes table.
9300 (spu_join, spu_thread_alive): Adjust interface.
9301 (spu_wait): Adjust interface. Remove process from processes
9302 table. Adjust to use ptids.
9303 * win32-low.c (current_inferior_tid): Delete.
9304 (current_inferior_ptid): New.
9305 (debug_event_ptid): New.
9306 (thread_rec): Take a ptid. Adjust.
9307 (child_add_thread): Add `pid' argument. Adjust to use ptids.
9308 (child_delete_thread): Ditto.
9309 (do_initial_child_stuff): Add `attached' argument. Add process to
9310 processes table.
9311 (child_fetch_inferior_registers, child_store_inferior_registers):
9312 Adjust.
9313 (win32_create_inferior): Pass 0 to do_initial_child_stuff.
9314 (win32_attach): Pass 1 to do_initial_child_stuff.
9315 (win32_kill): Adjust interface. Remove process from processes
9316 table.
9317 (win32_detach): Ditto.
9318 (win32_join): Adjust interface.
9319 (win32_thread_alive): Take a ptid.
9320 (win32_resume): Adjust to use ptids.
9321 (get_child_debug_event): Ditto.
9322 (win32_wait): Adjust interface. Remove exiting process from
9323 processes table.
9324
9325 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9326
9327 Non-stop mode support.
9328
9329 * server.h (non_stop): Declare.
9330 (gdb_client_data, handler_func): Declare.
9331 (delete_file_handler, add_file_handler, start_event_loop):
9332 Declare.
9333 (handle_serial_event, handle_target_event, push_event)
9334 (putpkt_notif): Declare.
9335 * target.h (enum resume_kind): New.
9336 (struct thread_resume): Replace `step' field by `kind' field.
9337 (TARGET_WNOHANG): Define.
9338 (struct target_ops) <wait>: Add `options' argument.
9339 <supports_non_stop, async, start_non_stop>: New fields.
9340 (target_supports_non_stop, target_async): New.
9341 (start_non_stop): Declare.
9342 (mywait): Add `options' argument.
9343 * target.c (mywait): Add `options' argument. Print child exit
9344 notifications here.
9345 (start_non_stop): New.
9346 * server.c (non_stop, own_buf, mem_buf): New globals.
9347 (struct vstop_notif): New.
9348 (notif_queue): New global.
9349 (queue_stop_reply, push_event, discard_queued_stop_replies)
9350 (send_next_stop_reply): New.
9351 (start_inferior): Adjust to use resume_kind. Adjust to mywait
9352 interface changes.
9353 (attach_inferior): In non-stop mode, don't wait for the target
9354 here.
9355 (handle_general_set): Handle QNonStop.
9356 (handle_query): When handling qC, return the current general
9357 thread, instead of the first thread of the list.
9358 (handle_query): If the backend supports non-stop mode, include
9359 QNonStop+ in the qSupported query response.
9360 (handle_v_cont): Adjust to use resume_kind. Handle resume_stop
9361 and non-stop mode.
9362 (handle_v_attach, handle_v_run): Handle non-stop mode.
9363 (handle_v_stopped): New.
9364 (handle_v_requests): Report support for vCont;t. Handle vStopped.
9365 (myresume): Adjust to use resume_kind. Handle non-stop.
9366 (queue_stop_reply_callback): New.
9367 (handle_status): Handle non-stop mode.
9368 (main): Clear non_stop flag on reconnection. Use the event-loop.
9369 Refactor serial protocol handling from here ...
9370 (process_serial_event): ... to this new function. When GDB
9371 selects any thread, select one here. In non-stop mode, wait until
9372 GDB acks all pending events before exiting.
9373 (handle_serial_event, handle_target_event): New.
9374 * remote-utils.c (remote_open): Install remote_desc in the event
9375 loop.
9376 (remote_close): Remove remote_desc from the event loop.
9377 (putpkt_binary): Rename to...
9378 (putpkt_binary_1): ... this. Add `is_notic' argument. Handle it.
9379 (putpkt_binary): New as wrapper around putpkt_binary_1.
9380 (putpkt_notif): New.
9381 (prepare_resume_reply): In non-stop mode, don't change the
9382 general_thread.
9383 * event-loop.c: New.
9384 * Makefile.in (OBJ): Add event-loop.o.
9385 (event-loop.o): New rule.
9386
9387 * linux-low.h (pid_of): Moved here.
9388 (lwpid_of): New.
9389 (get_lwp_thread): Use lwpid_of.
9390 (struct lwp_info): Delete `lwpid' field. Add `suspended' field.
9391 * linux-low.c (pid_of): Delete.
9392 (inferior_pid): Use lwpid_of.
9393 (linux_event_pipe): New.
9394 (target_is_async_p): New.
9395 (delete_lwp): New.
9396 (handle_extended_wait): Use lwpid_of.
9397 (add_lwp): Don't set lwpid field.
9398 (linux_attach_lwp): Adjust debug output. Use lwpid_of.
9399 (linux_kill_one_lwp): If killing a running lwp, stop it first.
9400 Use lwpid_of. Adjust to linux_wait_for_event interface changes.
9401 (linux_detach_one_lwp): If detaching from a running lwp, stop it
9402 first. Adjust to linux_wait_for_event interface changes. Use
9403 lwpid_of.
9404 (linux_detach): Don't delete the main lwp here.
9405 (linux_join): Use my_waitpid. Avoid signal_pid. Use lwpid_of.
9406 (status_pending_p): Don't consider explicitly suspended lwps.
9407 (linux_wait_for_lwp): Take an integer pid instead of a lwp_info
9408 pointer. Add OPTIONS argument. Change return type to int. Use
9409 my_waitpid instead of sleeping. Handle WNOHANG. Use lwpid_of.
9410 (linux_wait_for_event): Take an integer pid instead of a lwp_info
9411 pointer. Add status pointer argument. Return a pid instead of a
9412 status. Use lwpid_of. Adjust to linux_wait_for_lwp interface
9413 changes. In non-stop mode, don't switch to a random thread.
9414 (linux_wait): Rename to...
9415 (linux_wait_1): ... this. Add target_options argument, and handle
9416 it. Adjust to use resume_kind. Use lwpid_of. In non-stop mode,
9417 don't handle the continue thread. Handle TARGET_WNOHANG. Merge
9418 clean exit and signal exit code. Don't stop all threads in
9419 non-stop mode. In all-stop mode, only stop all threads when
9420 reporting a stop to GDB. Handle explicit thread stop requests.
9421 (async_file_flush, async_file_mark): New.
9422 (linux_wait): New.
9423 (send_sigstop): Use lwpid_of.
9424 (wait_for_sigstop): Use lwpid_of. Adjust to linux_wait_for_event
9425 interface changes. In non-stop mode, don't switch to a random
9426 thread.
9427 (linux_resume_one_lwp): Use lwpid_of.
9428 (linux_continue_one_thread, linux_queue_one_thread): Merge into ...
9429 (linux_resume_one_thread): ... this. Handle resume_stop. In
9430 non-stop mode, don't look for pending flag in all threads.
9431 (resume_status_pending_p): Don't consider explicitly suspended
9432 threads.
9433 (my_waitpid): Reimplement. Emulate __WALL.
9434 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9435 Use lwpid_of.
9436 (sigchld_handler, linux_supports_non_stop, linux_async)
9437 (linux_start_non_stop): New.
9438 (linux_target_ops): Register linux_supports_non_stop, linux_async
9439 and linux_start_non_stop.
9440 (initialize_low): Install SIGCHLD handler.
9441 * thread-db.c (thread_db_create_event, find_one_thread)
9442 (thread_db_get_tls_address): Use lwpid_of.
9443 * win32-low.c (win32_detach): Adjust to use resume_kind.
9444 (win32_wait): Add `options' argument.
9445 * spu-low.c (spu_resume): Adjust to use resume_kind.
9446 (spu_wait): Add `options' argument.
9447
9448 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9449
9450 Decouple target code from remote protocol.
9451
9452 * target.h (enum target_waitkind): New.
9453 (struct target_waitstatus): New.
9454 (struct target_ops) <wait>: Return an unsigned long. Take a
9455 target_waitstatus pointer instead of a char pointer.
9456 (mywait): Likewise.
9457 * target.c (mywait): Change prototype to return an unsigned long.
9458 Take a target_waitstatus pointer instead of a char pointer. Adjust.
9459 * server.h (thread_from_wait, old_thread_from_wait): Delete
9460 declarations.
9461 (prepare_resume_reply): Change prototype to take a
9462 target_waitstatus.
9463 * server.c (thread_from_wait, old_thread_from_wait): Delete.
9464 (last_status, last_ptid): New.
9465 (start_inferior): Remove "statusptr" argument. Adjust. Return a
9466 pid instead of a signal.
9467 (attach_inferior): Remove "status" and "signal" parameters.
9468 Adjust.
9469 (handle_query): For qGetTLSAddr, parse the thread id with strtol,
9470 not as an address.
9471 (handle_v_cont, handle_v_attach, handle_v_run, handle_v_kill)
9472 (handle_v_requests, myresume): Remove "status" and "signal"
9473 parameters. Adjust.
9474 (handle_status): New.
9475 (main): Delete local `status'. Adjust.
9476 * remote-utils.c: Include target.h.
9477 (prepare_resume_reply): Change prototype to take a
9478 target_waitstatus. Adjust.
9479
9480 * linux-low.c (linux_wait): Adjust to new target_ops->wait
9481 interface.
9482 * spu-low.c (spu_wait): Adjust.
9483 * win32-low.c (enum target_waitkind, struct target_waitstatus):
9484 Delete.
9485 (win32_wait): Adjust.
9486
9487 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9488
9489 * target.h (struct thread_resume): Delete leave_stopped member.
9490 (struct target_ops): Add a `n' argument to the `resume' callback.
9491 * server.c (start_inferior): Adjust.
9492 (handle_v_cont, myresume): Adjust.
9493 * linux-low.c (check_removed_breakpoint): Adjust to resume
9494 interface change, and to removed leave_stopped field.
9495 (resume_ptr): Delete.
9496 (struct thread_resume_array): New.
9497 (linux_set_resume_request): Add new `arg' parameter. Adjust to
9498 resume interface change.
9499 (linux_continue_one_thread, linux_queue_one_thread)
9500 (resume_status_pending_p): Check if the resume field is NULL
9501 instead of checking the leave_stopped member.
9502 (linux_resume): Adjust to the target resume interface change.
9503 * spu-low.c (spu_resume): Adjust to the target resume interface
9504 change.
9505 * win32-low.c (win32_detach, win32_resume): Ditto.
9506
9507 2009-04-01 Pedro Alves <pedro@codesourcery.com>
9508
9509 * linux-low.c (linux_wait_for_event): Don't clear the `stepping'
9510 flag.
9511 (wait_for_sigstop): Don't leave a finished single-step SIGTRAP
9512 pending.
9513 (linux_continue_one_thread): Only preserve the stepping flag if
9514 there's a pending breakpoint.
9515
9516 2009-03-31 Pedro Alves <pedro@codesourcery.com>
9517
9518 * server.c (main): After the inferior having exited, call
9519 remote_close before exiting gdbserver.
9520
9521 2009-03-25 Thiago Jung Bauermann <bauerman@br.ibm.com>
9522
9523 Fix size of FPSCR in Power 7 processors.
9524 * linux-ppc-low.c (PPC_FEATURE_ARCH_2_05): Remove #define.
9525 (PPC_FEATURE_HAS_DFP): New #define.
9526 (ppc_arch_setup): Check for DFP feature instead of ISA 2.05 to decide on
9527 size of the FPSCR.
9528
9529 2009-03-23 Pedro Alves <pedro@codesourcery.com>
9530
9531 * server.c (handle_query) Whitespace and formatting.
9532
9533 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9534
9535 * i387-fp.c, linux-arm-low.c, linux-cris-low.c,
9536 linux-crisv32-low.c, linux-i386-low.c, linux-low.c,
9537 linux-mips-low.c, linux-s390-low.c, linux-sparc-low.c,
9538 linux-x86-64-low.c, linux-xtensa-low.c, proc-service.c,
9539 regcache.c, remote-utils.c, server.c, spu-low.c, target.h,
9540 thread-db.c, win32-low.c, xtensa-xtregs.c, gdbreplay.c,
9541 Makefile.in, configure.ac: Fix whitespace throughout.
9542 * configure: Regenerate.
9543
9544 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9545
9546 * inferiors.c (find_inferior): Make it safe for the callback
9547 function to delete the currently iterated inferior.
9548
9549 2009-03-22 Pedro Alves <pedro@codesourcery.com>
9550
9551 * Makefile.in (linuw_low_h): Move higher.
9552 (thread-db.o): Depend on $(linux_low_h).
9553
9554 2009-03-17 Pedro Alves <pedro@codesourcery.com>
9555
9556 Rename "process" to "lwp" throughout.
9557
9558 * linux-low.c (all_processes): Rename to...
9559 (all_lwps): ... this.
9560 (inferior_pid, handle_extended_wait, get_stop_pc): Adjust.
9561 (add_process): Rename to ...
9562 (add_lwp): ... this. Adjust.
9563 (linux_create_inferior): Adjust.
9564 (linux_attach_lwp): Adjust.
9565 (linux_attach): Adjust.
9566 (linux_kill_one_process): Rename to ...
9567 (linux_kill_one_lwp): ... this. Adjust.
9568 (linux_kill): Adjust.
9569 (linux_detach_one_process): Rename to ...
9570 (linux_detach_one_lwp): ... this. Adjust.
9571 (linux_detach): Adjust.
9572 (check_removed_breakpoint): Adjust.
9573 (status_pending_p): Adjust.
9574 (linux_wait_for_process): Rename to ...
9575 (linux_wait_for_lwp): ... this. Adjust.
9576 (linux_wait_for_event): Adjust.
9577 (send_sigstop): Adjust.
9578 (wait_for_sigstop): Adjust.
9579 (stop_all_processes): Rename to ...
9580 (stop_all_lwps): ... this.
9581 (linux_resume_one_process): Rename to ...
9582 (linux_resume_one_lwp): ... this. Adjust.
9583 (linux_set_resume_request, linux_continue_one_thread)
9584 (linux_queue_one_thread, resume_status_pending_p)
9585 (usr_store_inferior_registers, regsets_store_inferior_registers)
9586 (linux_request_interrupt, linux_read_offsets, linux_xfer_siginfo):
9587 Adjust.
9588 * linux-low.h (get_process): Rename to ...
9589 (get_lwp): ... this. Adjust.
9590 (get_thread_process): Rename to ...
9591 (get_thread_lwp): ... this. Adjust.
9592 (get_process_thread): Rename to ...
9593 (get_lwp_thread): ... this. Adjust.
9594 (struct process_info): Rename to ...
9595 (struct lwp_info): ... this.
9596 (all_processes): Rename to ...
9597 (all_lwps): ... this.
9598 * proc-service.c (ps_lgetregs): Adjust.
9599 * thread-db.c (thread_db_create_event, find_one_thread)
9600 (maybe_attach_thread, thread_db_get_tls_address): Adjust.
9601
9602 2009-03-14 Pedro Alves <pedro@codesourcery.com>
9603
9604 * server.c (handle_query): Handle "qAttached".
9605
9606 2009-03-13 Nathan Sidwell <nathan@codesourcery.com>
9607
9608 * Makefile.in, hostio-errno.c, errno.c, xtensa-xtregs.c: Change to
9609 GPLv3, update license URL.
9610
9611 2009-03-01 Doug Evans <dje@google.com>
9612
9613 * Makefile.in (INCLUDE_CFLAGS): Add -I$(srcdir)/../common.
9614 (server_h): Add gdb_signals.h.
9615 (signals.o): Update.
9616 * server.h (target_signal_from_host,target_signal_to_host_p)
9617 (target_signal_to_host,target_signal_to_name): Moved to gdb_signals.h.
9618
9619 2009-02-14 Pierre Muller <muller@ics.u-strasbg.fr>
9620
9621 * remote-utils.c (getpkt): Also generate remote-debug
9622 information if noack_mode is set.
9623
9624 2009-02-06 Pedro Alves <pedro@codesourcery.com>
9625
9626 * server.c (handle_query): Report qXfer:siginfo:read and
9627 qXfer:siginfo:write as supported and handle them.
9628 * target.h (struct target_ops) <qxfer_siginfo>: New field.
9629 * linux-low.c (linux_xfer_siginfo): New.
9630 (linux_target_ops): Set it.
9631
9632 2009-01-26 Pedro Alves <pedro@codesourcery.com>
9633
9634 * server.c (gdbserver_usage): Mention --remote-debug.
9635 (main): Accept '--remote-debug' switch.
9636
9637 2009-01-18 Doug Evans <dje@google.com>
9638
9639 * regcache.c (new_register_cache): No need to check result of xcalloc.
9640 * server.c (handle_search_memory): Back out calls to xmalloc,
9641 result is checked and error is returned to user upon failure.
9642 (handle_query): Ditto. Add more checks for result of malloc.
9643 (handle_v_cont): Check result of malloc, report error back to
9644 user upon failure.
9645 (handle_v_run): Ditto. Call freeargv.
9646 * server.h (freeargv): Declare.
9647 * utils.c (freeargv): New fn.
9648
9649 2009-01-15 Doug Evans <dje@google.com>
9650
9651 * gdbreplay.c (perror_with_name): Make arg const char *.
9652 * server.h (target_signal_to_name): Make return type const char *.
9653 * thread-db.c (thread_db_err_str): Make return type const char *.
9654 * utils.c (perror_with_name): Make arg const char *.
9655
9656 2009-01-14 Pedro Alves <pedro@codesourcery.com>
9657
9658 * win32-low.c (get_child_debug_event): Issue a final DBG_CONTINUE
9659 when handling a EXIT_PROCESS_DEBUG_EVENT.
9660
9661 2009-01-06 Joel Brobecker <brobecker@adacore.com>
9662
9663 * gdbreplay.c (gdbreplay_version): Update copyright year.
9664 * server.c (gdbserver_version): Likewise.
9665
9666 2009-01-05 Doug Evans <dje@google.com>
9667
9668 * linux-low.c (linux_attach_lwp): Add some comments/fixmes.
9669 (handle_extended_wait): Improve comment.
9670
9671 2008-12-13 Doug Evans <dje@google.com>
9672
9673 * utils.c (xmalloc,xcalloc,xstrdup): New fns.
9674 * server.h (ATTR_MALLOC): New macro.
9675 (xmalloc,xcalloc,xstrdup): Declare.
9676 * hostio.c: Replace malloc,calloc,strdup with xmalloc,xcalloc,xstrdup.
9677 * inferiors.c: Ditto.
9678 * linux-low.c: Ditto.
9679 * mem-break.c: Ditto.
9680 * regcache.c: Ditto.
9681 * remote-utils.c: Ditto.
9682 * server.c: Ditto.
9683 * target.c: Ditto.
9684 * win32-low.c: Ditto.
9685
9686 2008-12-12 Doug Evans <dje@google.com>
9687
9688 * linux-low.c (linux_wait_for_process): Don't clobber current_inferior
9689 in debugging printf.
9690
9691 * linux-low.c (handle_extended_wait): Simplify, use my_waitpid.
9692
9693 2008-12-09 Doug Evans <dje@google.com>
9694
9695 * linux-low.h (struct process_info): Delete member tid, unused.
9696 * thread-db.c (find_one_thread): Update.
9697 (maybe_attach_thread): Update.
9698
9699 2008-12-02 Pedro Alves <pedro@codesourcery.com>
9700
9701 * target.h (struct target_ops): Add qxfer_osdata member.
9702 * linux-low.c: Include ctype.h and pwd.h and sys/types.h
9703 and dirent.h.
9704 (linux_qxfer_osdata): New functions.
9705 (linux_target_ops): Register linux_qxfer_osdata as qxfer_osdata
9706 callback.
9707 * server.c (handle_query): Handle "qXfer:osdata:read:".
9708 * remote-utils.c (buffer_grow, buffer_free, buffer_init, buffer_finish)
9709 (buffer_xml_printf): New functions.
9710 * server.h (struct buffer): New.
9711 (buffer_grow_str, buffer_grow_str0): New macros.
9712 (buffer_grow, buffer_free, buffer_init, buffer_finish)
9713 (buffer_xml_printf): Declare.
9714
9715 2008-11-24 Doug Evans <dje@google.com>
9716
9717 * Makefile.in (VERSION,DIST,LINT,LINTFLAGS): Delete, unused.
9718
9719 2008-11-24 Daniel Jacobowitz <dan@codesourcery.com>
9720
9721 * server.c (handle_v_run): Always use the supplied argument list.
9722
9723 2008-11-19 Bob Wilson <bob.wilson@acm.org>
9724
9725 * xtensa-xtregs.c (XTENSA_ELF_XTREG_SIZE): Change to 4.
9726 (xtensa_regmap_table): Add entry for scompare1.
9727
9728 2008-11-18 Thiago Jung Bauermann <bauerman@br.ibm.com>
9729
9730 * Makefile.in (powerpc-isa205-32l.o, powerpc-isa205-32l.c,
9731 powerpc-isa205-altivec32l.o, powerpc-isa205-altivec32l.c,
9732 powerpc-isa205-vsx32l.o, powerpc-isa205-vsx32l.c,
9733 powerpc-isa205-64l.o, powerpc-isa205-64l.c,
9734 powerpc-isa205-altivec64l.o, powerpc-isa205-altivec64l.c,
9735 powerpc-isa205-vsx64l.o, powerpc-isa205-vsx64l.c): New targets.
9736 * configure.srv (powerpc*-*-linux*): Add ISA 2.05 object files and
9737 XML target descriptions.
9738 * linux-ppc-low.c (ppc_arch_setup): Init registers with 64-bit FPSCR
9739 when inferior is running on an ISA 2.05 or later processor. Add
9740 special case to return offset for full 64-bit slot of FPSCR when
9741 in 32-bits.
9742
9743 2008-11-14 Daniel Gutson <dgutson@codesourcery.com>
9744
9745 * Makefile.in (SFILES, clean): Added sparc64 files.
9746 (reg-sparc64.o, reg-sparc64.c): New.
9747 * configure.srv (sparc*-*-linux*): New configuration.
9748 * linux-low.c (regsets_fetch_inferior_registers): Swap ptrace
9749 syscall arguments for SPARC.
9750 (regsets_store_inferior_registers): Likewise.
9751 * linux-sparc-low.c: New file.
9752
9753 2008-10-21 Doug Evans <dje@google.com>
9754
9755 * Makefile.in (BFD_DIR,BFD,BFD_SRC,BFD_CFLAGS): Delete.
9756 (READLINE_DIR,READLINE_DEP): Delete.
9757 (INTERNAL_CFLAGS): Update.
9758 (LINTFLAGS): Update.
9759
9760 2008-10-10 Pedro Alves <pedro@codesourcery.com>
9761
9762 * server.c (handle_v_run): If GDB didn't specify an argv, use the
9763 whole argv from the last run, not just argv[0].
9764
9765 2008-09-08 Pedro Alves <pedro@codesourcery.com>
9766
9767 * regcache.c (new_register_cache): Return NULL if the register
9768 cache size isn't known yet.
9769 (free_register_cache): Avoid dereferencing a NULL regcache.
9770
9771 2008-09-04 Daniel Jacobowitz <dan@codesourcery.com>
9772
9773 * configure.srv: Merge MIPS and MIPS64.
9774
9775 2008-08-24 Maciej W. Rozycki <macro@linux-mips.org>
9776
9777 * Makefile.in (uninstall): Apply $(EXEEXT) too.
9778
9779 2008-08-18 Luis Machado <luisgpm@br.ibm.com>
9780
9781 * Makefile.in: Add required vsx dependencies.
9782
9783 * linux-ppc-low: Define PPC_FEATURE_HAS_VSX.
9784 Declare init_registers_powerpc_vsx32l.
9785 Declare init_registers_powerpc_vsx64l.
9786 Define PTRACE_GETVSXREGS and PTRACE_SETVSXREGS.
9787 (ppc_arch_setup): Check for VSX in hwcap.
9788 (ppc_fill_vsxregset): New function.
9789 (ppc_store_vsxregset): New function.
9790 Add new VSX entry in regset_info target_regsets.
9791
9792 * configure.srv: Add new VSX dependencies.
9793
9794 2008-08-12 Pedro Alves <pedro@codesourcery.com>
9795
9796 * remote-utils.c (noack_mode, transport_is_reliable): New globals.
9797 (remote_open): Set or clear transport_is_reliable.
9798 (putpkt_binary): Don't expect acks in noack mode.
9799 (getpkt): Don't send ack/nac in noack mode.
9800 * server.c (handle_general_set): Handle QStartNoAckMode.
9801 (handle_query): If connected by tcp pass QStartNoAckMode+ in
9802 qSupported.
9803 (main): Reset noack_mode on every connection.
9804 * server.h (noack_mode): Declare.
9805
9806 2008-08-07 Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
9807
9808 * Makefile.in (GDBREPLAY_OBS): New variable.
9809 (gdbreplay$(EXEEXT)): Use it to avoid unportable $^.
9810
9811 2008-08-05 Ulrich Weigand <uweigand@de.ibm.com>
9812 Daniel Jacobowitz <dan@codesourcery.com>
9813
9814 * linux-low.c (linux_resume_one_process): Ignore ESRCH.
9815 (usr_store_inferior_registers): Likewise.
9816 (regsets_store_inferior_registers): Likewise.
9817
9818 2008-07-31 Rolf Jansen <rj@surtec.com>
9819 Pedro Alves <pedro@codesourcery.com>
9820
9821 * configure.ac: Check for memmem declaration.
9822 * server.c [HAVE_MALLOC_H]: Include malloc.h.
9823 (disable_packet_vCont, disable_packet_Tthread, disable_packet_qC)
9824 (disable_packet_qfThreadInfo): Unconditionally compile.
9825 * server.h [!HAVE_DECL_MEMMEM]: Declare memmem.
9826 * configure, config.in: Regenerate.
9827
9828 2008-07-28 Doug Kwan <dougkwan@google.com>
9829
9830 * linux-low.c (sys/dir.h, sys/user.h): Remove includes.
9831 (linux_write_memory): Remove declaration of errno.
9832
9833 2008-07-12 Ulrich Weigand <uweigand@de.ibm.com>
9834
9835 * linux-low.c (handle_extended_wait): Do not use "status"
9836 variable uninitialized.
9837
9838 2008-07-07 Pedro Alves <pedro@codesourcery.com>
9839
9840 * server.c (handle_v_attach): Inhibit reporting dll changes.
9841
9842 2008-06-27 Pedro Alves <pedro@codesourcery.com>
9843
9844 * remote-utils.c (prepare_resume_reply): If requested, don't
9845 output "thread:TID" in the T stop reply.
9846
9847 * server.c (disable_packet_vCont, disable_packet_Tthread)
9848 (disable_packet_qC, disable_packet_qfThreadInfo): New globals.
9849 (handle_query): If requested, disable support for qC, qfThreadInfo
9850 and qsThreadInfo.
9851 (handle_v_requests): If requested, disable support for vCont.
9852 (gdbserver_show_disableable): New.
9853 (main): Handle --disable-packet and --disable-packet=LIST.
9854
9855 * server.h (disable_packet_vCont, disable_packet_Tthread)
9856 (disable_packet_qC, disable_packet_qfThreadInfo): Declare.
9857
9858 2008-06-20 Carlos O'Donell <carlos@codesourcery.com>
9859
9860 * server.c (gdbserver_usage): Mention --version.
9861
9862 2008-06-06 Daniel Jacobowitz <dan@codesourcery.com>
9863
9864 * Makefile.in (gdbreplay.o): New rule.
9865
9866 2008-06-06 Joseph Myers <joseph@codesourcery.com>
9867
9868 * gdbreplay.c (gdbreplay_version): Say gdbreplay in version
9869 message, not gdbserver.
9870
9871 2008-06-05 Vladimir Prus <vladimir@codesourcery.com>
9872 Nathan Sidwell <nathan@codesourcery.com>
9873 Joseph Myers <joseph@codesourcery.com>
9874
9875 * acinclude.m4: Include ../../config/acx.m4.
9876 * configure.ac: Use ACX_PKGVERSION and ACX_BUGURL.
9877 * configure, config.in: Regenerate.
9878 * Makefile.in (gdbreplay$(EXEEXT)): Add version.o.
9879 * server.c (gdbserver_version): Print PKGVERSION.
9880 (gdbsrever_usage): Add stream parameter. Print REPORT_BUGS_TO.
9881 (main): Adjust gdbserver_usage calls.
9882 * gdbreplay.c (version, host_name): Add declarations.
9883 (gdbreplay_version, gdbreplay_usage): New.
9884 (main): Accept --version and --help options.
9885
9886 2008-06-04 Daniel Jacobowitz <dan@codesourcery.com>
9887
9888 * linux-arm-low.c (thumb_breakpoint, thumb_breakpoint_len): New.
9889 (arm_breakpoint_at): Handle Thumb.
9890 (the_low_target): Add comment.
9891
9892 2008-05-29 Ulrich Weigand <uweigand@de.ibm.com>
9893
9894 * linux-ppc-low.c (ppc_collect_ptrace_register): Clear buffer.
9895
9896 2008-05-09 Doug Evans <dje@google.com>
9897
9898 * server.h (decode_search_memory_packet): Declare.
9899 * remote-utils.c (decode_search_memory_packet): New fn.
9900 * server.c (handle_search_memory_1): New fn.
9901 (handle_search_memory): New fn.
9902 (handle_query): Process qSearch:memory packets.
9903
9904 2008-05-08 Ulrich Weigand <uweigand@de.ibm.com>
9905
9906 * regcache.c (registers_length): Remove.
9907 (set_register_cache): Verify that PBUFSIZ is large enough to hold a
9908 full register packet.
9909 * regcache.h (registers_length): Remove prototype.
9910 * server.h (PBUFSIZ): Define to 16384.
9911
9912 2008-05-03 Ulrich Weigand <uweigand@de.ibm.com>
9913
9914 * configure.srv (powerpc*-*-linux*): Set srv_regobj to
9915 powerpc-32l.o, powerpc-altivec32l.o, powerpc-e500l.o,
9916 powerpc-64l.o, and powerpc-altivec64l.o.
9917 Remove rs6000/powerpc-32.xml, rs6000/powerpc-64.xml, and
9918 rs6000/powerpc-e500.xml; add rs6000/powerpc-32l.xml,
9919 rs6000/powerpc-altivec32l.xml, rs6000/powerpc-e500l.xml,
9920 rs6000/powerpc-64l.xml, rs6000/powerpc-altivec64l.xml,
9921 rs6000/power-linux.xml, and rs6000/power64-linux.xml
9922 to srv_xmlfiles.
9923
9924 * Makefile.in (reg-ppc.o, reg-ppc.c): Remove, replace by ...
9925 (powerpc-32l.o, powerpc-32l.c): ... these new rules.
9926 (powerpc-32.o, powerpc-32.c): Remove, replace by ...
9927 (powerpc-altivec32l.o, powerpc-altivec32l.c): ... these new rules.
9928 (powerpc-e500.o, powerpc-e500.c): Remove, replace by ...
9929 (powerpc-e500l.o, powerpc-e500l.c): ... these new rules.
9930 (reg-ppc64.o, reg-ppc64.c): Remove, replace by ...
9931 (powerpc-64l.o, powerpc-64l.c): ... these new rules.
9932 (powerpc-64.o, powerpc-64.c): Remove, replace by ...
9933 (powerpc-altivec64l.o, powerpc-altivec64l.c): ... these new rules.
9934 (clean): Update.
9935
9936 * linux-ppc-low.c (init_registers_ppc): Remove, replace by ...
9937 (init_registers_powerpc_32l): ... this new prototype.
9938 (init_registers_powerpc_32): Remove, replace by ...
9939 (init_registers_powerpc_altivec32l): ... this new prototype.
9940 (init_registers_powerpc_e500): Remove, replace by ...
9941 (init_registers_powerpc_e500l): ... this new prototype.
9942 (init_registers_ppc64): Remove, replace by ...
9943 (init_registers_powerpc_64l): ... this new prototype.
9944 (init_registers_powerpc_64): Remove, replace by ...
9945 (init_registers_powerpc_altivec64l): ... this new prototype.
9946 (ppc_num_regs): Set to 73.
9947 (PT_ORIG_R3, PT_TRAP): Define if necessary.
9948 (ppc_regmap, ppc_regmap_e500): Add values for orig_r3 and trap.
9949 (ppc_cannot_store_register): Handle orig_r3 and trap.
9950 (ppc_arch_setup): Update init_registers_... calls.
9951 (ppc_fill_gregset): Handle orig_r3 and trap.
9952
9953 * inferiors.c (clear_inferiors): Reset current_inferior.
9954
9955 2008-04-23 Paolo Bonzini <bonzini@gnu.org>
9956
9957 * acinclude.m4: Add override.m4.
9958 * configure: Regenerate.
9959
9960 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9961
9962 * linux-ppc-low.c (ppc_arch_setup): Reset ppc_hwcap after the
9963 initial call to init_register_ppc64.
9964
9965 2008-04-21 Ulrich Weigand <uweigand@de.ibm.com>
9966
9967 * configure.srv (powerpc64-*-linux*, powerpc-*-linux*): Merge into
9968 single powerpc*-*-linux* case.
9969 (s390-*-linux*, s390x-*-linux*): Merge into single s390*-*-linux* case.
9970
9971 2008-04-17 Ulrich Weigand <uweigand@de.ibm.com>
9972
9973 * configure.srv [powerpc64-*-linux*]: Remove powerpc-e500.o from
9974 srv_regobj. Remove rs6000/powerpc-e500.xml and rs6000/power-spe.xml
9975 from reg_xmlfiles.
9976 * linux-ppc-low.c: Include <elf.h>.
9977 (PPC_FEATURE_HAS_ALTIVEC, PPC_FEATURE_HAS_SPE): Define.
9978 (ppc_hwcap): New global variable.
9979 (ppc_regmap): Remove __SPE__ #ifdef sections.
9980 (ppc_regmap_e500): New global variable.
9981 (ppc_cannot_store_register): Update __SPE__ special case.
9982 (ppc_get_hwcap): New function.
9983 (ppc_arch_setup): Use it to determine whether inferior supports
9984 AltiVec or SPE registers. Set the_low_target.regmap if appropriate.
9985 (ppc_fill_vrregset, ppc_store_vrregset): Define unconditionally.
9986 Do not access registers if target does not support AltiVec.
9987 (ppc_fill_evrregset, ppc_store_evrregset): Define unconditionally.
9988 Do not access registers if target does not support SPE.
9989 (target_regsets): Unconditionally include AltiVec and SPE regsets.
9990
9991 2008-04-17 Daniel Jacobowitz <dan@codesourcery.com>
9992
9993 * linux-low.c (disabled_regsets, num_regsets): New.
9994 (use_regsets_p): Delete.
9995 (linux_wait_for_process): Clear disabled_regsets.
9996 (regsets_fetch_inferior_registers): Check and set it.
9997 (regsets_store_inferior_registers): Likewise.
9998 (linux_fetch_registers, linux_store_registers): Do not use
9999 use_regsets_p.
10000 (initialize_low): Allocate disabled_regsets.
10001
10002 2008-04-14 Daniel Jacobowitz <dan@codesourcery.com>
10003
10004 * Makefile.in (LIBOBJS): New.
10005 (OBS): Use LIBOBJS.
10006 (memmem.o): New rule.
10007 * configure.ac: Use AC_CONFIG_LIBOBJ_DIR and check for memmem.
10008 * configure: Regenerated.
10009
10010 2008-04-04 Ulrich Weigand <uweigand@de.ibm.com>
10011
10012 * server.c (handle_query): Never return "unsupported" for
10013 qXfer:features:read queries.
10014
10015 2008-03-27 Ulrich Weigand <uweigand@de.ibm.com>
10016
10017 * server.c (get_features_xml): Fix inverted condition.
10018 (handle_query): Always support qXfer:feature:read.
10019
10020 2008-03-10 Daniel Jacobowitz <dan@codesourcery.com>
10021
10022 * server.c (wrapper_argv): New.
10023 (start_inferior): Handle wrapper_argv. If set, expect an extra
10024 trap.
10025 (gdbserver_usage): Document --wrapper.
10026 (main): Parse --wrapper.
10027
10028 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10029
10030 * configure.srv [powerpc64-*-linux*]: Add all files mentioned for
10031 powerpc-*-linux* to srv_regobj and reg_xmlfiles.
10032 * linux-ppc-low.c (ppc_get_pc): Support bi-arch operation.
10033 (ppc_set_pc): Likewise.
10034 (ppc_arch_setup): New function.
10035 (ppc_fill_gregset): Call ppc_collect_ptrace_register instead
10036 of collect_register.
10037 (the_low_target): Use ppc_arch_setup as arch_setup initializer.
10038
10039 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10040
10041 * configure.srv [powerpc64-*-linux*]: Use linux-ppc-low.o
10042 instead of linux-ppc64-low.o.
10043 * linux-ppc64-low.c: Remove file.
10044 * Makefile.in (SFILES): Remove linux-ppc64-low.c.
10045 (linux-ppc64-low.o): Remove rule.
10046
10047 * linux-ppc-low.c (init_registers_ppc64): Add prototype.
10048 (init_registers_powerpc_64): Likewise.
10049 (ppc_regmap): Conditionally define depending on __powerpc64__.
10050 (ppc_cannot_store_register): Do not special-case "fpscr" when
10051 compiled on __powerpc64__.
10052 (ppc_collect_ptrace_register): New function.
10053 (ppc_supply_ptrace_register): New function.
10054 (ppc_breakpoint): Change type to "unsigned int".
10055 (ppc_breakpoint_at): Change type of "insn" to "unsigned int".
10056 (the_low_target): Conditionally provide initializers for the
10057 arch_setup member depending on __powerpc64__. Install
10058 collect_ptrace_register and supply_ptrace_register members.
10059
10060 2008-02-28 Ulrich Weigand <uweigand@de.ibm.com>
10061
10062 * regcache.h (gdbserver_xmltarget): Add extern declaration.
10063 * server.c (gdbserver_xmltarget): Define.
10064 (get_features_xml): Use it to replace "target.xml" and arch_string.
10065
10066 * configure.srv: Remove srv_xmltarget. Add XML files that were
10067 mentioned there to srv_xmlfiles instead. Remove conditional tests
10068 on gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe; set
10069 srv_xmlfiles and srv_regobj to include all possible choices.
10070 * configure.ac (srv_xmltarget): Remove.
10071 (srv_xmlfiles): Do not add "target.xml".
10072 (gdb_cv_arm_iwmmxt, gdb_cv_ppc_altivec, gdb_cv_ppc_spe): Remove
10073 checks for supplementary target information.
10074 * configure: Regenerate.
10075 * Makefile.in (XML_TARGET): Remove.
10076 (target.xml): Remove rule.
10077 (clean): Do not clean up target.xml.
10078 (.PRECIOUS): Do not mention target.xml.
10079
10080 * target.h (struct target_ops): Remove arch_string member.
10081 * linux-low.c (linux_arch_string): Remove.
10082 (linux_target_ops): Remove arch_string initializer.
10083 * linux-low.h (struct linux_target_ops): Remove arch_string member.
10084 * linux-i386-low.c (the_low_target): Remove arch_string initializer.
10085 * linux-x86-64-low.c (the_low_target): Remove arch_string initializer.
10086 * spu-low.c (spu_arch_string): Remove.
10087 (spu_target_ops): Remove arch_string initializer.
10088 * win32-low.c (win32_arch_string): Remove.
10089 (win32_target_ops): Remove arch_string initializer.
10090 * win32-low.h (struct win32_target_ops): Remove arch_string member.
10091 * win32-arm-low.c (the_low_target): Remove arch_string initializer.
10092 * win32-i368-low.c (the_low_target): Remove arch_string initializer.
10093
10094 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10095
10096 * linux-low.h (struct linux_target_ops): Replace left_pad_xfer field
10097 by collect_ptrace_register and supply_ptrace_register hooks.
10098 * linux-low.c (fetch_register): Use supply_ptrace_register callback
10099 instead of checking for the_low_target.left_pad_xfer.
10100 (usr_store_inferior_registers): Use collect_ptrace_register callback
10101 instead of checking for the_low_target.left_pad_xfer.
10102
10103 * linux-s390-low.c (s390_collect_ptrace_register): New function.
10104 (s390_supply_ptrace_register): Likewise.
10105 (s390_fill_gregset): Call s390_collect_ptrace_register.
10106 (the_low_target): Update.
10107
10108 * linux-ppc64-low.c (ppc_collect_ptrace_register): New function.
10109 (ppc_supply_ptrace_register): Likewise.
10110 (the_low_target): Update.
10111
10112 * linux-i386-low.c (the_low_target): Update.
10113 * linux-x86-64-low.c (the_low_target): Update.
10114
10115 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10116
10117 * configure.srv [s390x-*-linux*]: Set srv_regobj to include both
10118 reg-s390.o and reg-s390x.o.
10119
10120 * linux-low.c (new_inferior): New global variable.
10121 (linux_create_inferior, linux_attach): Set it.
10122 (linux_wait_for_process): Call the_low_target.arch_setup after the
10123 target has stopped for the first time.
10124 (initialize_low): Do not call the_low_target.arch_setup.
10125
10126 * linux-s390-low.c (s390_get_pc): Support bi-arch operation.
10127 (s390_set_pc): Likewise.
10128 (s390_arch_setup): New function.
10129 (the_low_target): Use s390_arch_setup as arch_setup routine.
10130
10131 * regcache.c (realloc_register_cache): New function.
10132 (set_register_cache): Call it for each existing regcache.
10133
10134 2008-02-27 Ulrich Weigand <uweigand@de.ibm.com>
10135
10136 * server.h (init_registers): Remove prototype.
10137
10138 * linux-low.h (struct linux_target_ops): Add arch_setup field.
10139 * linux-low.c (initialize_low): Call the_low_target.arch_setup ()
10140 instead of init_registers ().
10141 * linux-arm-low.c (init_registers_arm): Add prototype.
10142 (init_registers_arm_with_iwmmxt): Likewise.
10143 (the_low_target): Add initializer for arch_setup field.
10144 * linux-cris-low.c (init_registers_cris): Add prototype.
10145 (the_low_target): Add initializer for arch_setup field.
10146 * linux-crisv32-low.c (init_registers_crisv32): Add prototype.
10147 (the_low_target): Add initializer for arch_setup field.
10148 * linux-i386-low.c (init_registers_i386_linux): Add prototype.
10149 (the_low_target): Add initializer for arch_setup field.
10150 * linux-ia64-low.c (init_registers_ia64): Add prototype.
10151 (the_low_target): Add initializer for arch_setup field.
10152 * linux-m32r-low.c (init_registers_m32r): Add prototype.
10153 (the_low_target): Add initializer for arch_setup field.
10154 * linux-m68k-low.c (init_registers_m68k): Add prototype.
10155 (the_low_target): Add initializer for arch_setup field.
10156 * linux-mips-low.c (init_registers_mips_linux): Add prototype.
10157 (init_registers_mips64_linux): Likewise.
10158 (the_low_target): Add initializer for arch_setup field.
10159 * linux-ppc-low.c (init_registers_ppc): Add prototype.
10160 (init_registers_powerpc_32, init_registers_powerpc_e500): Likewise.
10161 (the_low_target): Add initializer for arch_setup field.
10162 * linux-ppc64-low.c (init_registers_ppc64): Add prototype.
10163 (init_registers_powerpc_64): Likewise.
10164 (the_low_target): Add initializer for arch_setup field.
10165 * linux-s390-low.c (init_registers_s390): Add prototype.
10166 (init_registers_s390x): Likewise.
10167 (the_low_target): Add initializer for arch_setup field.
10168 * linux-sh-low.c (init_registers_sh): Add prototype.
10169 (the_low_target): Add initializer for arch_setup field.
10170 * linux-x86-64-low.c (init_registers_x86_64_linux): Add prototype.
10171 (the_low_target): Add initializer for arch_setup field.
10172 * linux-xtensa-low.c (init_registers_xtensa): Add prototype.
10173 (the_low_target): Add initializer for arch_setup field.
10174
10175 * win32-low.h (struct win32_target_ops): Add arch_setup field.
10176 * win32-low.c (initialize_low): Call the_low_target.arch_setup ()
10177 instead of init_registers ().
10178 * win32-arm-low.c (init_registers_arm): Add prototype.
10179 (the_low_target): Add initializer for arch_setup field.
10180 * win32-i386-low.c (init_registers_i386): Add prototype.
10181 (the_low_target): Add initializer for arch_setup field.
10182
10183 * spu-low.c (init_registers_spu): Add prototype.
10184 (initialize_low): Call initialie_registers_spu () instead of
10185 initialize_registers ().
10186
10187 2008-02-19 Pedro Alves <pedro@codesourcery.com>
10188
10189 * server.c (handle_v_requests): When handling the vRun and vAttach
10190 packets, if already debugging a process, don't kill it. Return an
10191 error instead.
10192
10193 2008-02-17 Daniel Jacobowitz <dan@codesourcery.com>
10194
10195 * server.c (handle_query): Correct length check.
10196
10197 2008-02-14 Pedro Alves <pedro_alves@portugalmail.pt>
10198
10199 * win32-low.c (do_initial_child_stuff): Add process handle
10200 parameter. Set current_process_handle and current_process_id from the
10201 parameters. Clear globals.
10202 (win32_create_inferior): Don't set current_process_handle and
10203 current_process_id here. Instead pass them on the call to
10204 do_initial_child_stuff.
10205 (win32_attach): Likewise.
10206 (win32_clear_inferiors): New.
10207 (win32_kill): Don't close the current process handle or the
10208 current thread handle here. Instead call win32_clear_inferiors.
10209 (win32_detach): Don't open a new handle to the process. Call
10210 win32_clear_inferiors.
10211 (win32_join): Don't rely on current_process_handle; open a new
10212 handle using the process id.
10213 (win32_wait): Call win32_clear_inferiors when the inferior process
10214 has exited.
10215
10216 2008-02-14 Daniel Jacobowitz <dan@codesourcery.com>
10217
10218 * server.c (monitor_show_help): Add "exit".
10219
10220 2008-02-11 Maxim Grigoriev <maxim2405@gmail.com>
10221
10222 * Makefile.in (SFILES): Add linux-xtensa-low.c.
10223 (clean): Add reg-xtensa.c.
10224 (linux-xtensa-low.o, reg-xtensa.o, reg-xtensa.c): New dependencies.
10225 * configure.srv (xtensa*-*-linux*) New target.
10226 * linux-xtensa-low.c: New.
10227 * xtensa-xtregs.c: New.
10228
10229 2008-02-01 Pedro Alves <pedro_alves@portugalmail.pt>
10230
10231 * hostio.c: Don't include errno.h.
10232 (errno_to_fileio_errno): Move to hostio-errno.
10233 * hostio.c: (hostio_error): Remove the error parameter. Defer the
10234 error number outputting to the target->hostio_last_error callback.
10235 (hostio_packet_error): Use FILEIO_EINVAL directly.
10236 (handle_open, handle_pread, hostio_error, handle_unlink): Update
10237 calls to hostio_error.
10238 * hostio-errno.c: New.
10239 * server.h (hostio_last_error_from_errno): Declare.
10240 * target.h (target_ops): Add hostio_last_error member.
10241 * linux-low.c (linux_target_op): Register hostio_last_error_from_errno
10242 as hostio_last_error handler.
10243 * spu-low.c (spu_target_ops): Likewise.
10244 * win32-low.c [_WIN32_WCE] (win32_error_to_fileio_error)
10245 (wince_hostio_last_error): New functions.
10246 (win32_target_ops) [_WIN32_WCE]: Register wince_hostio_last_error
10247 as hostio_last_error handler.
10248 (win32_target_ops) [!_WIN32_WCE]: Register
10249 hostio_last_error_from_errno as hostio_last_error handler.
10250 * Makefile.in (SFILES): Add hostio.c and hostio-errno.c.
10251 (hostio-errno.o): New rule.
10252 * configure.ac (GDBSERVER_DEPFILES): Add $srv_hostio_err_objs.
10253 * configure.srv (srv_hostio_err_objs): New variable. Default to
10254 hostio-errno.o.
10255 (arm*-*-mingw32ce*): Set srv_hostio_err_objs to "".
10256 * configure: Regenerate.
10257
10258 2008-01-29 Daniel Jacobowitz <dan@codesourcery.com>
10259
10260 * linux-low.c (linux_attach_lwp): Do not _exit after errors.
10261 (linux_kill, linux_detach): Clean up the process list.
10262 * remote-utils.c (remote_open): Improve port number parsing.
10263 (putpkt_binary, input_interrupt): Only send interrupts if the target
10264 is running.
10265 * server.c (extended_protocol): Make static.
10266 (attached): Define earlier.
10267 (exit_requested, response_needed, program_argv): New variables.
10268 (target_running): New.
10269 (start_inferior): Clear attached here.
10270 (attach_inferior): Set attached here.
10271 (require_running): Define.
10272 (handle_query): Use require_running and target_running. Implement
10273 "monitor exit".
10274 (handle_v_attach, handle_v_run): New.
10275 (handle_v_requests): Use require_running. Handle vAttach and vRun.
10276 (gdbserver_usage): Update.
10277 (main): Redo argument parsing. Handle --debug and --multi. Handle
10278 --attach along with other options or after the port. Save
10279 program_argv. Support no initial program. Resynchronize
10280 communication with GDB after an error. Handle "monitor exit".
10281 Use require_running and target_running. Always allow the extended
10282 protocol. Do not error out for Hc0 or Hc-1. Do not automatically
10283 restart in extended mode.
10284 * README: Refer to the GDB manual. Update --attach usage.
10285
10286 2007-12-20 Andreas Schwab <schwab@suse.de>
10287
10288 * linux-low.c (STACK_SIZE): Define.
10289 (linux_tracefork_child): Use it. Use __clone2 on ia64.
10290 (linux_test_for_tracefork): Likewise.
10291
10292 2007-12-18 Daniel Jacobowitz <dan@codesourcery.com>
10293
10294 * linux-low.c (linux_wait_for_event): Update messages. Do not
10295 reinsert auto-delete breakpoints.
10296 * mem-break.c (struct breakpoint): Change return type of handler to
10297 int.
10298 (set_breakpoint_at): Update handler type.
10299 (reinsert_breakpoint_handler): Return 1 instead of calling
10300 delete_breakpoint.
10301 (reinsert_breakpoint_by_bp): Check for the original breakpoint before
10302 setting a new one.
10303 (check_breakpoints): Delete auto-delete breakpoints and return 2.
10304 * mem-break.h (set_breakpoint_at): Update handler type.
10305 * thread-db.c (thread_db_create_event, thread_db_create_event): Update.
10306 * win32-low.c (auto_delete_breakpoint): New.
10307 (get_child_debug_event): Use it.
10308
10309 2007-12-16 Daniel Jacobowitz <dan@codesourcery.com>
10310
10311 * configure.ac: Check for pread and pwrite.
10312 * hostio.c (handle_pread): Fall back to lseek and read.
10313 (handle_pwrite): Fall back to lseek and write.
10314 * config.in, configure: Regenerated.
10315
10316 2007-12-07 Daniel Jacobowitz <dan@codesourcery.com>
10317
10318 * server.c (myresume): Add own_buf argument.
10319 (main): Update calls.
10320
10321 2007-12-06 Daniel Jacobowitz <dan@codesourcery.com>
10322
10323 * linux-low.c (linux_wait, linux_resume): Do not handle async I/O.
10324 * remote-utils.c (remote_open): Do not call disable_async_io.
10325 (block_async_io): Delete.
10326 (unblock_async_io): Make static.
10327 (initialize_async_io): New.
10328 * server.c (handle_v_cont): Handle async I/O here.
10329 (myresume): Likewise. Move other common resume tasks here...
10330 (main): ... from here. Call initialize_async_io. Disable async
10331 I/O before the main loop.
10332 * server.h (initialize_async_io): Declare.
10333 (block_async_io, unblock_async_io): Delete prototypes.
10334 * spu-low.c (spu_resume, spu_wait): Do not handle async I/O here.
10335
10336 2007-12-06 Mick Davis <mickd@goanna.iinet.net.au>
10337
10338 * remote-utils.c (readchar): Allow binary data in received messages.
10339
10340 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10341
10342 * win32-low.c (attaching): New global.
10343 (win32_create_inferior): Clear the `attaching' global.
10344 (win32_attach): Set the `attaching' global.
10345 (get_child_debug_event) [_WIN32_WCE]: Stop the inferior when
10346 attaching. Only set a breakpoint at the entry point if not
10347 attaching.
10348
10349 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10350
10351 * server.c (main): Don't report dll events on the initial
10352 connection on attaches.
10353
10354 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10355
10356 * server.c (main): Relax numerical bases supported for the pid of
10357 the --attach command line argument.
10358
10359 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10360
10361 * win32-low.c (win32_attach): Call OpenProcess before
10362 DebugActiveProcess, not after. Add last error output to error
10363 call.
10364
10365 2007-12-03 Pedro Alves <pedro_alves@portugalmail.pt>
10366
10367 * win32-low.c (win32_get_thread_context)
10368 (win32_set_thread_context): New functions.
10369 (thread_rec): Use win32_get_thread_context.
10370 (continue_one_thread, win32_resume): Use win32_set_thread_context.
10371 * win32-low.h (win32_thread_info) [_WIN32_WCE]: Add `base_context'
10372 field.
10373
10374 2007-12-03 Leo Zayas
10375 Pedro Alves <pedro_alves@portugalmail.pt>
10376
10377 * win32-low.c (soft_interrupt_requested, faked_breakpoint): New
10378 global variables.
10379 (child_add_thread): Minor cleanup.
10380 (child_continue): Resume artificially suspended threads before
10381 calling ContinueDebugEvent.
10382 (suspend_one_thread): New.
10383 (fake_breakpoint_event): New.
10384 (get_child_debug_event): Change return type to int. Check here if
10385 gdb sent an interrupt request. If a soft interrupt was requested,
10386 fake a breakpoint event. Return 0 if there is no event to handle,
10387 and 1 otherwise.
10388 (win32_wait): Don't check here if gdb sent an interrupt request.
10389 Ensure there is a valid event to handle.
10390 (win32_request_interrupt): Add soft interruption method as last
10391 resort.
10392
10393 2007-12-03 Leo Zayas
10394 Pedro Alves <pedro_alves@portugalmail.pt>
10395
10396 * win32-low.h (win32_thread_info): Add descriptions to the
10397 structure members. Replace `suspend_count' counter by a
10398 `suspended' flag.
10399 * win32-low.c (thread_rec): Update condition of when to get the
10400 context from the inferior. Rely on ContextFlags being set if it
10401 has already been retrieved. Only suspend the inferior thread if
10402 we haven't already. Warn if that fails.
10403 (continue_one_thread): s/suspend_count/suspended/. Only call
10404 ResumeThread once. Warn if that fails.
10405
10406 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10407
10408 * win32-low.c (win32_wait): Don't read from the inferior when it
10409 has already exited.
10410
10411 2007-12-02 Pedro Alves <pedro_alves@portugalmail.pt>
10412
10413 * Makefile.in (win32_low_h): New variable.
10414 (win32-low.o): Add dependency on $(win32_low_h).
10415 (win32-arm-low.o, win32-i386-low.o): New rules.
10416
10417 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10418
10419 * hostio.c: Correct copyright year.
10420
10421 2007-11-30 Daniel Jacobowitz <dan@codesourcery.com>
10422
10423 * Makefile.in (OBS): Add hostio.o.
10424 (hostio.o): New rule.
10425 * server.h (handle_vFile): Declare.
10426 * hostio.c: New file.
10427 * server.c (handle_v_requests): Take packet_len and new_packet_len
10428 for binary packets. Call handle_vFile.
10429 (main): Update call to handle_v_requests.
10430
10431 2007-11-05 Daniel Jacobowitz <dan@codesourcery.com>
10432
10433 * linux-low.c: Include <sched.h>.
10434
10435 2007-11-01 Daniel Jacobowitz <dan@codesourcery.com>
10436
10437 * linux-low.c (linux_tracefork_grandchild): New.
10438 (linux_tracefork_child): Use clone.
10439 (linux_test_for_tracefork): Use clone; allocate and free a stack.
10440
10441 2007-10-31 Joel Brobecker <brobecker@adacore.com>
10442
10443 * Makefile.in: Use $(SHELL) instead of "sh" to call regdat.sh.
10444
10445 2007-10-24 Daniel Jacobowitz <dan@codesourcery.com>
10446
10447 * linux-low.c (handle_extended_wait): Handle unexpected signals.
10448
10449 2007-10-23 Daniel Jacobowitz <dan@codesourcery.com>
10450
10451 * inferiors.c (change_inferior_id): Delete.
10452 (add_pid_to_list, pull_pid_from_list): New.
10453 * linux-low.c (PTRACE_SETOPTIONS, PTRACE_GETEVENTMSG)
10454 (PTRACE_O_TRACESYSGOOD, PTRACE_O_TRACEFORK, PTRACE_O_TRACEVFORK)
10455 (PTRACE_O_TRACECLONE, PTRACE_O_TRACEEXEC, PTRACE_O_TRACEVFORKDONE)
10456 (PTRACE_O_TRACEEXIT, PTRACE_EVENT_FORK, PTRACE_EVENT_VFORK)
10457 (PTRACE_EVENT_CLONE, PTRACE_EVENT_EXEC, PTRACE_EVENT_VFORK_DONE)
10458 (PTRACE_EVENT_EXIT, __WALL): Provide default definitions.
10459 (stopped_pids, thread_db_active, must_set_ptrace_flags): New variables.
10460 (using_threads): Always set to 1.
10461 (handle_extended_wait): New.
10462 (add_process): Do not set TID.
10463 (linux_create_inferior): Set must_set_ptrace_flags.
10464 (linux_attach_lwp): Remove TID argument. Do not check using_threads.
10465 Use PTRACE_SETOPTIONS. Call new_thread_notify. Update all callers.
10466 (linux_thread_alive): Rename TID argument to LWPID.
10467 (linux_wait_for_process): Handle unknown processes. Do not use TID.
10468 (linux_wait_for_event): Do not use TID or check using_threads. Update
10469 call to dead_thread_notify. Call handle_extended_wait.
10470 (linux_create_inferior): Use PTRACE_SETOPTIONS.
10471 (send_sigstop): Delete sigstop_sent.
10472 (wait_for_sigstop): Avoid TID.
10473 (linux_supports_tracefork_flag, linux_tracefork_child, my_waitpid)
10474 (linux_test_for_tracefork): New.
10475 (linux_lookup_signals): Use thread_db_active and
10476 linux_supports_tracefork_flag.
10477 (initialize_low): Use thread_db_active and linux_test_for_tracefork.
10478 * linux-low.h (get_process_thread): Avoid TID.
10479 (struct process_ifo): Move thread_known and tid to the end. Remove
10480 sigstop_sent.
10481 (linux_attach_lwp, thread_db_init): Update prototypes.
10482 * server.h (change_inferior_id): Delete prototype.
10483 (add_pid_to_list, pull_pid_from_list): New prototypes.
10484 * thread-db.c (thread_db_use_events): New.
10485 (find_first_thread): Rename to...
10486 (find_one_thread): ...this. Update callers and messages. Do not
10487 call fatal. Check thread_db_use_events. Do not call
10488 change_inferior_id or new_thread_notify.
10489 (maybe_attach_thread): Update. Do not call new_thread_notify.
10490 (thread_db_init): Set thread_db_use_events. Check use_events.
10491 * utils.c (fatal, warning): Correct message prefix.
10492
10493 2007-10-15 Daniel Jacobowitz <dan@codesourcery.com>
10494
10495 * Makefile.in (clean): Remove new files.
10496 (powerpc-32.o, powerpc-32.c, powerpc-e500.o, powerpc-e500.c)
10497 (powerpc-64.o, powerpc-64.c): New rules.
10498 * configure.srv: Use alternate register sets for powerpc64-*-linux*
10499 with AltiVec, powerpc-*-linux* with AltiVec, and powerpc-*-linux*
10500 with SPE.
10501 * linux-ppc-low.c (ppc_regmap): Do not fetch the FP registers for
10502 SPE targets.
10503 (ppc_cannot_store_register): Do not check for FPSCR for SPE targets.
10504 (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS, ppc_fill_vrregset)
10505 (ppc_store_vrregset, PTRACE_GETEVRREGS, PTRACE_SETEVRREGS)
10506 (struct gdb_evrregset_t, ppc_fill_evrregset, ppc_store_evrregset): New.
10507 (target_regsets): Add AltiVec and SPE register sets.
10508 * configure.ac: Check for AltiVec and SPE.
10509 * linux-ppc64-low.c (PTRACE_GETVRREGS, PTRACE_SETVRREGS, SIZEOF_VRREGS)
10510 (ppc_fill_vrregset, ppc_store_vrregset): New.
10511 (target_regsets): Add AltiVec register set.
10512 * configure: Regenerated.
10513
10514 2007-09-19 Daniel Jacobowitz <dan@codesourcery.com>
10515
10516 * linux-low.c (O_LARGEFILE): Define.
10517 (linux_read_memory): Use /proc/PID/mem.
10518 * configure.ac: Use AC_GNU_SOURCE. Check for pread64.
10519 * configure, config.in: Regenerated.
10520
10521 2007-09-04 Daniel Jacobowitz <dan@codesourcery.com>
10522
10523 * linux-low.c (linux_wait_for_event): Do not pass signals while
10524 single-stepping.
10525
10526 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10527
10528 * win32-low.c (create_process): New.
10529 (win32_create_inferior): Use create_process instead of
10530 CreateProcess. If create_process failed retry appending an ".exe"
10531 suffix. Store the GetLastError result immediatelly after
10532 create_process calls and use it on the call to error.
10533
10534 2007-09-03 Pedro Alves <pedro_alves@portugalmail.pt>
10535
10536 * win32-low.c (handle_load_dll): Don't use toolhelp when waiting.
10537
10538 2007-08-23 Joel Brobecker <brobecker@adacore.com>
10539
10540 * configure.ac: Switch license to GPLv3.
10541
10542 2007-08-01 Michael Snyder <msnyder@access-company.com>
10543
10544 * remote-utils.c (putpkt_binary): Memory leak, free buf2.
10545
10546 2007-07-31 Pedro Alves <pedro_alves@portugalmail.pt>
10547
10548 * win32-low.c (winapi_CloseToolhelp32Snapshot) [_WIN32_WCE]: New
10549 typedef.
10550 (win32_CloseToolhelp32Snapshot) [_WIN32_WCE]: New global var.
10551 (load_toolhelp) [_WIN32_WCE]: Load TOOLHELP.DLL. Get
10552 CloseToolhelp32Snapshot.
10553 (toolhelp_get_dll_name) [_WIN32_WCE]: Close the snapshot with
10554 CloseToolhelp32Snapshot.
10555
10556 2007-07-27 Michael Snyder <michael.snyder@access-company.com>
10557
10558 * server.c (main): Check for inferior exit before main loop.
10559
10560 2007-07-18 Pedro Alves <pedro_alves@portugalmail.pt>
10561
10562 * remote-utils.c (remote_open): Set SO_KEEPALIVE on remote_desc
10563 instead of on tmp_desc.
10564
10565 2007-07-17 Pedro Alves <pedro_alves@portugalmail.pt>
10566 Daniel Jacobowitz <dan@codesourcery.com>
10567
10568 * inferiors.c (all_dlls, dlls_changed, get_dll): New.
10569 (add_thread): Minor cleanups.
10570 (clear_inferiors): Move lower in the file. Clear the DLL
10571 list.
10572 (free_one_dll, match_dll, loaded_dll, unloaded_dll, clear_list): New.
10573 * remote-utils.c (prepare_resume_reply): Check dlls_changed.
10574 (xml_escape_text): New.
10575 * server.c (handle_query): Handle qXfer:libraries:read. Report it
10576 for qSupported.
10577 (handle_v_cont): Report errors.
10578 (gdbserver_version): Update.
10579 (main): Correct size of own_buf. Do not report initial DLL events.
10580 * server.h (struct dll_info, all_dlls, dlls_changed, loaded_dll)
10581 (unloaded_dll, xml_escape_text): New.
10582 * win32-low.c (enum target_waitkind): Update comments.
10583 (win32_add_one_solib, get_image_name, winapi_EnumProcessModules)
10584 (winapi_GetModuleInformation, winapi_GetModuleFileNameExA)
10585 (win32_EnumProcessModules, win32_GetModuleInformation)
10586 (win32_GetModuleFileNameExA, load_psapi, psapi_get_dll_name)
10587 (winapi_CreateToolhelp32Snapshot, winapi_Module32First)
10588 (winapi_Module32Next, win32_CreateToolhelp32Snapshot)
10589 (win32_Module32First, win32_Module32Next, load_toolhelp)
10590 (toolhelp_get_dll_name, handle_load_dll, handle_unload_dll): New.
10591 (get_child_debug_event): Handle DLL events.
10592 (win32_wait): Likewise.
10593
10594 2007-07-12 Daniel Jacobowitz <dan@codesourcery.com>
10595
10596 * configure.srv: Set srv_linux_regsets for sh*-*-linux*.
10597 * linux-sh-low.c (sh_fill_gregset, target_regsets): New.
10598
10599 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10600
10601 * win32-low.c (handle_output_debug_string): Ignore event if not
10602 waiting.
10603
10604 2007-07-08 Pedro Alves <pedro_alves@portugalmail.pt>
10605
10606 * win32-arm-low.c (arm_wince_breakpoint): Fix typo.
10607
10608 2007-07-03 Daniel Jacobowitz <dan@codesourcery.com>
10609
10610 * remote-utils.c (look_up_one_symbol): Handle 'm' packets.
10611
10612 2007-07-02 Daniel Jacobowitz <dan@codesourcery.com>
10613
10614 * inferiors.c (change_inferior_id): Add comment.
10615 * linux-low.c (check_removed_breakpoint): Add an early
10616 prototype. Improve debug output.
10617 (linux_attach): Doc update.
10618 (linux_detach_one_process, linux_detach): Clean up before releasing
10619 each process.
10620 (send_sigstop, wait_for_sigstop): Improve comments and debug output.
10621 * linux-low.h (struct process_info): Doc improvement.
10622 * mem-break.c (delete_all_breakpoints): New.
10623 * mem-break.h (delete_all_breakpoints): New prototype.
10624 * thread-db.c (find_first_thread): New.
10625 (thread_db_create_event): Call it instead of
10626 thread_db_find_new_threads. Clean up unused variables.
10627 (maybe_attach_thread): Remove first thread handling.
10628 (thread_db_find_new_threads): Use find_first_thread.
10629 (thread_db_get_tls_address): Likewise.
10630
10631 2007-06-27 Daniel Jacobowitz <dan@codesourcery.com>
10632
10633 * thread-db.c (thread_db_find_new_threads): Add prototype.
10634 (thread_db_create_event): Check for the main thread before adding
10635 a new thread.
10636 (maybe_attach_thread): Only enable event reporting if TID == 0.
10637 (thread_db_get_tls_address): Check for new threads.
10638
10639 2007-06-20 Daniel Jacobowitz <dan@codesourcery.com>
10640
10641 * linux-low.c (linux_create_inferior): Try execv before execvp.
10642 * spu-low.c (spu_create_inferior): Likewise.
10643
10644 2007-06-13 Mike Frysinger <vapier@gentoo.org>
10645
10646 * linux-low.c (linux_create_inferior): Change execv to execvp.
10647 * spu-low.c (spu_create_inferior): Likewies.
10648
10649 2007-06-13 Daniel Jacobowitz <dan@codesourcery.com>
10650
10651 * Makefile.in (clean): Clean new files instead of deleted ones.
10652 (reg-mips.o, reg-mips.c, reg-mips64.o, reg-mips64.c): Delete.
10653 (mips-linux.o, mips-linux.c, mips64-linux.o, mips64-linux.c): New
10654 rules.
10655 * configure.srv: Specify XML files and new regformats for MIPS and
10656 MIPS64 GNU/Linux.
10657 * linux-mips-low.c (mips_num_regs): Set to only used registers.
10658 (mips_regmap): Do not fetch $0. Remove unused registers. Add
10659 an entry for the restart register.
10660 (mips_cannot_fetch_register, mips_cannot_store_register)
10661 (mips_reinsert_addr, mips_fill_fpregset, mips_store_fpregset): Update
10662 register names to match the XML descriptions.
10663 (mips_fill_gregset, mips_store_gregset): Likewise. Handle the
10664 restart register instead of $0.
10665
10666 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10667 Markus Deuling <deuling@de.ibm.com>
10668
10669 * remote-utils.c (decode_xfer_write): New function.
10670 * server.h (decode_xfer_write): Add prototype.
10671 * server.c (handle_query): Add PACKET_LEN argument. Support
10672 qXfer:spu:read and qXfer:spu:write packets.
10673 (main): Pass packet_len to handle_query.
10674 * spu-low.c (spu_target_ops): Add spu_proc_xfer_spu.
10675 * target.h (target_ops): Add qxfer_spu.
10676
10677 2007-06-12 Ulrich Weigand <uweigand@de.ibm.com>
10678
10679 * spu-low.c (spu_proc_xfer_spu): Do not return failure when
10680 accessing non-seekable spufs files.
10681
10682 2007-05-16 Markus Deuling <deuling@de.ibm.com>
10683
10684 * server.c (handle_query): Add reply for qC packet.
10685
10686 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10687 Leo Zayas <lerele@champenstudios@com>
10688
10689 * server.h (check_remote_input_interrupt_request): New function.
10690 * remote_utils.c (INVALID_DESCRIPTOR): New define.
10691 (remote_desc): Initialize with INVALID_DESCRIPTOR.
10692 (input_interrupt): Expose on USE_WIN32API too. Fix whitespace.
10693 (check_remote_input_interrupt_request): New function.
10694 * server.h (check_remote_input_interrupt_request): Declare.
10695 * win32-low.c (winapi_DebugBreakProcess,
10696 winapi_GenerateConsoleCtrlEvent): New typedefs.
10697 (get_child_debug_event): Lower Win32 debug event polling from 1 sec
10698 to 250 ms.
10699 (win32_wait): Check for remote interrupt request
10700 with check_remote_input_interrupt_request.
10701 (win32_request_interrupt): New function.
10702 (win32_target_op): Set request_interrupt to win32_request_interrupt.
10703
10704 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10705
10706 * win32-low.c (debug_registers_changed,
10707 debug_registers_used, CONTEXT_EXTENDED_REGISTERS,
10708 CONTEXT_FLOATING_POINT, CONTEXT_DEBUG_REGISTERS,
10709 CONTEXT_DEBUGGER, CONTEXT_DEBUGGER_DR): Delete.
10710 (thread_rec): Get context using the low target.
10711 (child_add_thread): Call thread_added on the low target,
10712 which does the same thing.
10713 (regptr): Delete.
10714 (do_initial_child_stuff): Remove debug registers references.
10715 Set context using the low target. Resume threads after
10716 setting the contexts.
10717 (child_continue): Remove dead variable. Remove debug
10718 registers references.
10719 (child_fetch_inferior_registers): Go through the low target.
10720 (do_child_store_inferior_registers): Remove.
10721 (child_store_inferior_registers): Go through the low target.
10722 (win32_resume): Remove debug registers references.
10723 Set context using the low target.
10724 (handle_exception): Change return type to void. Don't record
10725 context here. Set status to TARGET_WAITKIND_SPURIOUS on a
10726 first chance exception.
10727 (get_child_debug_event): Change return type to void. Remove
10728 goto loop. Always return after waiting for debug event.
10729 (win32_wait): Convert to switch statement. Handle spurious
10730 events.
10731
10732 * win32-i386-low.c (debug_registers_changed,
10733 debug_registers_used): New.
10734 (initial_stuff): Rename to ...
10735 (i386_initial_stuff): ... this. Clear debug registers
10736 state variables.
10737 (store_debug_registers): Delete.
10738 (i386_get_thread_context): New.
10739 (load_debug_registers): Delete.
10740 (i386_set_thread_context): New.
10741 (i386_thread_added): New.
10742 (single_step): Rename to ...
10743 (i386_single_step): ... this.
10744 (do_fetch_inferior_registers): Rename to ...
10745 (i386_fetch_inferior_register): ... this.
10746 (i386_store_inferior_register): New.
10747 (the_low_target): Adapt to new interface.
10748
10749 * win32-arm-low.c (CONTEXT_FLOATING_POINT): Define.
10750 (arm_get_thread_context): New.
10751 (arm_set_thread_context): New.
10752 (regptr): New.
10753 (do_fetch_inferior_registers): Rename to ...
10754 (arm_fetch_inferior_register): ... this.
10755 (arm_store_inferior_register): New.
10756 (arm_wince_breakpoint): Reimplement as unsigned long.
10757 (arm_wince_breakpoint_len): Define.
10758 (the_low_target): Adapt to new interface.
10759
10760 * win32-low.h (target_ops): Remove regmap, store_debug_registers and
10761 load_debug_registers. Add get_thread_context, set_thread_context,
10762 thread_added and store_inferior_register. Rename
10763 fetch_inferior_registers to fetch_inferior_register.
10764 (regptr): Remove declaration.
10765
10766 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10767
10768 * linux-low.c (linux_detach): Change return type to int. Return 0.
10769 * spu-low.c (spu_detach): Likewise.
10770
10771 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10772
10773 * target.h (target_ops): Change return type of detach to int.
10774 Add join.
10775 (join_inferior): New.
10776 * server.c (main): Don't skip detach support on mingw32.
10777 If the inferior doesn't support detaching return error.
10778 Call join_inferior instead of using waitpid.
10779 * linux-low.c (linux_join): New.
10780 (linux_target_op): Add linux_join.
10781 * spu-low.c (spu_join): New.
10782 (spu_target_ops): Add spu_join.
10783 * win32-low.c (win32_detach): Adapt to new interface.
10784 Reopen current_process_handle before detaching. Issue a child
10785 resume before detaching.
10786 (win32_join): New.
10787 (win32_target_op): Add win32_join.
10788
10789 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10790
10791 * win32-low.c (win32-attach): Fix return value.
10792 * target.h (target_ops): Describe ATTACH return values.
10793
10794 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10795
10796 * win32-low.c (GETPROCADDRESS): Define.
10797 (winapi_DebugActiveProcessStop): Add WINAPI. typedef as pointer.
10798 (winapi_DebugSetProcessKillOnExit): Likewise.
10799 (win32_create_inferior): Force usage of ansi CreateProcessA.
10800 (win32_attach): Use GETPROCADDRESS.
10801 (win32_detach): Likewise.
10802
10803 2007-05-10 Pedro Alves <pedro_alves@portugalmail.pt>
10804
10805 * win32-low.c (win32_wait): Don't use WSTOPSIG.
10806
10807 2007-03-30 Pedro Alves <pedro_alves@portugalmail.pt>
10808
10809 * win32-low.c: Commit leftover changes from 2007-03-29.
10810
10811 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10812
10813 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Make 16-bit
10814 fields short instead of int. Add explicit padding.
10815 (i387_cache_to_fsave): Remove unnecessary casts.
10816 (i387_fsave_to_cache): Doc fix.
10817 (i387_cache_to_fxsave): Remove unnecessary casts and masking.
10818
10819 2007-03-30 Daniel Jacobowitz <dan@codesourcery.com>
10820
10821 * i387-fp.c (i387_cache_to_fxsave): Reinitialize val2 before use.
10822 (i387_fxsave_to_cache): Check fp->ftag while building ftag value.
10823
10824 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10825
10826 * configure.srv (arm*-*-mingw32ce*): Move near the other
10827 arm targets.
10828
10829 2007-03-29 Pedro Alves <pedro_alves@portugalmail.pt>
10830
10831 * configure.ac: Add errno checking.
10832 (AC_CHECK_HEADERS): Add errno.h, fcntl.h, signal.h,
10833 sys/file.h and malloc.h.
10834 (AC_CHECK_DECLS): Add perror.
10835 (srv_mingwce): Handle.
10836 * configure.srv (i[34567]86-*-cygwin*): Add
10837 win32-i386-low.o to srv_tgtobj.
10838 (i[34567]86-*-mingw*): Likewise.
10839 (arm*-*-mingw32ce*): Add case.
10840 * gdbreplay.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10841 HAVE_FCNTL_H, HAVE_ERRNO_H, HAVE_MALLOC_H]: Check.
10842 [__MINGW32CE__] (strerror): New function.
10843 [__MINGW32CE__] (errno): Define to GetLastError.
10844 [__MINGW32CE__] (COUNTOF): New macro.
10845 (remote_open): Remove extra close call.
10846 * mem-break.c (delete_breakpoint_at): New function.
10847 * mem-break.h (delete_breakpoint_at): Declare.
10848 * remote-utils.c [HAVE_SYS_FILE_H, HAVE_SIGNAL_H,
10849 HAVE_FCNTL_H, HAVE_UNISTD_H, HAVE_ERRNO_H]: Check.
10850 [USE_WIN32API] (read, write): Add char* casts.
10851 * server.c [HAVE_UNISTD_H, HAVE_SIGNAL_H]: Check.
10852 * server.h: Include wincecompat.h on Windows CE.
10853 [HAVE_ERRNO_H]: Check.
10854 (perror): Declare if not declared.
10855 * utils.c: Add stdlib.h, errno.h and malloc.h includes.
10856 (perror_with_name): Remove errno declaration.
10857 * wincecompat.h: New.
10858 * wincecompat.c: New.
10859 * win32-low.h: New.
10860 * win32-arm-low.c: New.
10861 * win32-i386-low.c: New.
10862 (win32-low.c): Include mem-break.h and win32-low.h, and winnt.h.
10863 (OUTMSG2): Make it safe.
10864 (_T): New macro.
10865 (COUNTOF): New macro.
10866 (NUM_REGS): Get it from the low target.
10867 (CONTEXT_EXTENDED_REGISTERS, CONTEXT_FLOATING_POINT,
10868 CONTEXT_DEBUG_REGISTERS): Add fallbacks to 0.
10869 (thread_rec): Let low target handle debug registers.
10870 (child_add_thread): Likewise.
10871 (child_init_thread_list): Likewise.
10872 (continue_one_thread): Likewise.
10873 (regptr): New.
10874 (do_child_fetch_inferior_registers): Move to ...
10875 * win32-i386-low.c: ... here, and rename to ...
10876 (do_fetch_inferior_registers): ... this.
10877 * win32-low.c (child_fetch_inferior_registers):
10878 Go through the low target.
10879 (do_child_store_inferior_registers): Use regptr.
10880 (strwinerror): New function.
10881 (win32_create_inferior): Handle Windows CE.
10882 Use strwinerror instead of strerror on Windows error
10883 codes. Add program to the error output.
10884 Don't close the main thread handle on Windows CE.
10885 (win32_attach): Use coredll.dll on Windows CE.
10886 (win32_kill): Close current process and current
10887 thread handles.
10888 (win32_detach): Use coredll.dll on Windows CE.
10889 (win32_resume): Let low target handle debug registers, and
10890 step request.
10891 (handle_exception): Add/Remove initial breakpoint. Avoid
10892 non-existant WSTOPSIG on Windows CE.
10893 (win32_read_inferior_memory): Cast to remove warning.
10894 (win32_arch_string): Go through the low target.
10895 (initialize_low): Call set_breakpoint_data with the low
10896 target's breakpoint.
10897 * win32-low.c (dr, FLAG_TRACE_BIT, FCS_REGNUM,
10898 FOP_REGNUM, mappings): Move to ...
10899 * win32-i386-low.c: ... here.
10900 * win32-low.c (win32_thread_info): Move to ...
10901 * win32-low.h: ... here.
10902 * Makefile.in (SFILES): Add win32-low.c, win32-i386-low.c,
10903 win32-arm-low.c and wincecompat.c.
10904 (all:): Add $EXEEXT.
10905 (install-only:): Likewise.
10906 (gdbserver:): Likewise.
10907 (gdbreplay:): Likewise.
10908 * config.in: Regenerate.
10909 * configure: Regenerate.
10910
10911 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10912
10913 * win32-low.c: Rename typedef thread_info to
10914 win32_thread_info throughout.
10915
10916 2007-03-28 Pedro Alves <pedro_alves@portugalmail.pt>
10917
10918 * win32-i386-low.c: Rename to ...
10919 * win32-low.c: ... this.
10920 * configure.srv: Replace win32-i386-low.o with win32-low.o.
10921 * Makefile.in: Likewise.
10922
10923 2007-03-27 Pedro Alves <pedro_alves@portugalmail.pt>
10924
10925 * remote-utils.c (monitor_output): Constify msg parameter.
10926 * server.h (monitor_output): Likewise.
10927 * win32-i386-low.c (handle_output_debug_string): New.
10928 (win32_kill): Handle OUTPUT_DEBUG_STRING_EVENT events using
10929 handle_output_debug_string.
10930 (get_child_debug_event): Likewise.
10931
10932 2007-03-27 Mat Hostetter <mat@lcs.mit.edu>
10933
10934 * server.c (main): Correct strtoul check.
10935
10936 2007-03-27 Jon Ringle <jon@ringle.org>
10937
10938 * linux-low.c: Check __ARCH_HAS_MMU__ also.
10939
10940 2007-03-27 Brooks Moses <brooks.moses@codesourcery.com>
10941
10942 * Makefile.in: Add dummy "pdf" and "install-pdf" targets.
10943
10944 2007-02-27 Daniel Jacobowitz <dan@codesourcery.com>
10945
10946 * terminal.h: Check HAVE_SGTTY_H.
10947
10948 2007-02-27 Mat Hostetter <mat@lcs.mit.edu>
10949
10950 * remote-utils.c (remote_open): Print out the assigned port number.
10951
10952 2007-02-26 Daniel Jacobowitz <dan@codesourcery.com>
10953
10954 * remote-utils.c (monitor_output): New function.
10955 * server.c (debug_threads): Define here.
10956 (monitor_show_help): New function.
10957 (handle_query): Handle qRcmd.
10958 (main): Do not handle 'd' packet.
10959 * server.h (debug_threads, remote_debug, monitor_output): Declare.
10960 * linux-low.c, spu-low.c, win32-i386-low.c: Remove definitions
10961 of debug_threads.
10962
10963 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10964
10965 * Makefile.in (EXEEXT): New.
10966 (clean): Use $(EXEEXT).
10967
10968 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10969
10970 * target.h (target_ops): Rename send_signal to request_interrupt,
10971 and remove enum target_signal parameter.
10972 * linux-low.c (linux_request_interrupt): Rename from
10973 linux_send_signal, and always send SIGINT.
10974 * spu-low.c (spu_request_interrupt): Rename from spu_send_signal,
10975 and always send SIGINT.
10976 * remote-utils.c (putpkt_binary): Call request_interrupt, instead
10977 of send_signal.
10978 (input_interrupt): Likewise.
10979
10980 2007-02-25 Pedro Alves <pedro_alves@portugalmail.pt>
10981
10982 * server.c (get_features_xml): Check if target implemented
10983 arch_string.
10984 * win32-i386-low.c (win32_arch_string): New.
10985 (win32_target_ops): Add win32_arch_string as arch_string member.
10986
10987 2007-02-22 Markus Deuling <deuling@de.ibm.com>
10988
10989 * spu-low.c (spu_arch_string): New.
10990 (spu_target_ops): Add spu_arch_string.
10991
10992 2007-02-16 Daniel Jacobowitz <dan@codesourcery.com>
10993
10994 * remote-utils.c: Remove HAVE_TERMINAL_H check.
10995 * configure.ac: Do not check for terminal.h.
10996 * configure, config.in: Regenerated.
10997
10998 2007-02-08 Daniel Jacobowitz <dan@codesourcery.com>
10999
11000 * Makefile.in (OBS): Add $(XML_BUILTIN).
11001 (XML_DIR, XML_TARGET, XML_FILES, XML_BUILTIN): New.
11002 (clean): Update.
11003 (target.xml, xml-builtin.c, stamp-xml, arm-with-iwmmxt.o)
11004 (arm-with-iwmmxt.c): New.
11005 * config.in, configure: Regenerate.
11006 * configure.ac: Check for iWMMXt. Handle srv_xmltarget,
11007 srv_xmlbuiltin, and srv_xmlfiles. Define USE_XML.
11008 * configure.srv: Mention srv_xmltarget and srv_xmlfiles.
11009 (arm*-*-linux*): Add iWMMXt and regset support.
11010 * linux-arm-low.c (PTRACE_GETWMMXREGS, PTRACE_SETWMMXREGS): Define.
11011 (arm_fill_gregset, arm_store_gregset, arm_fill_wmmxregset)
11012 (arm_store_wmmxregset, target_regsets): New.
11013 * server.c (get_features_xml): Take annex argument. Check builtin
11014 XML documents.
11015 (handle_query): Handle multiple annexes.
11016
11017 2007-01-29 Daniel Jacobowitz <dan@codesourcery.com>
11018
11019 * remote-utils.c [USE_WIN32API] (read, write): Define.
11020 (putpkt_binary, input_interrupt, readchar, getpkt): Use read and
11021 write.
11022
11023 2007-01-09 Daniel Jacobowitz <dan@codesourcery.com>
11024
11025 * linux-i386-low.c (the_low_target): Set arch_string.
11026 * linux-x86-64-low.c (the_low_target): Likewise.
11027 * linux-low.c (linux_arch_string): New.
11028 (linux_target_ops): Add it.
11029 * linux-low.h (struct linux_target_ops): Add arch_string.
11030 * server.c (write_qxfer_response): Use const void * for DATA.
11031 (get_features_xml): New.
11032 (handle_query): Handle qXfer:features:read. Report it for qSupported.
11033 * target.h (struct target_ops): Add arch_string method.
11034
11035 2007-01-03 Denis Pilat <denis.pilat@st.com>
11036 Daniel Jacobowitz <dan@codesourcery.com>
11037
11038 * linux-low.c (linux_kill): Handle being called with no threads.
11039 * win32-i386-low.c (win32_kill): Likewise.
11040 (get_child_debug_event): Clear current_process_handle.
11041
11042 2006-12-30 Denis PILAT <denis.pilat@st.com>
11043 Daniel Jacobowitz <dan@codesourcery.com>
11044
11045 * remote-utils.c (remote_open): Check the type of specified
11046 serial port devices before opening them.
11047 * server.c (main): Kill the inferior if an error occurs during
11048 the first remote_open.
11049
11050 2006-12-05 Markus Deuling <deuling@de.ibm.com>
11051
11052 * README: Update supported targets.
11053
11054 2006-11-28 Daniel Jacobowitz <dan@codesourcery.com>
11055
11056 * Makefile.in (clean): Remove reg-mips64.c.
11057 (reg-mips64.c, reg-mips64.o): New rules.
11058 * configure.srv: Handle mips64. Include regset support for mips.
11059 * linux-mips-low.c (union mips_register): New.
11060 (mips_get_pc, mips_set_pc, mips_reinsert_addr): Use it.
11061 (mips_breakpoint, mips_breakpoint_at): Use int.
11062 (mips_collect_register, mips_supply_register)
11063 (mips_collect_register_32bit, mips_supply_register_32bit)
11064 (mips_fill_gregset, mips_store_gregset, mips_fill_fpregset)
11065 (mips_store_fpregset, target_regsets): New.
11066 * thread-db.c (thread_db_get_tls_address): Use uintptr_t.
11067
11068 2006-11-22 Ulrich Weigand <uweigand@de.ibm.com>
11069
11070 * configure.srv: Add target "spu*-*-*".
11071 * Makefile.in (clean): Remove reg-spu.c.
11072 (reg-spu.c, reg-spu.o, spu-low.o): Add dependencies.
11073 * spu-low.c: New file.
11074
11075 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11076
11077 * configure.ac: Correct td_thr_tls_get_addr test.
11078 * configure: Regenerated.
11079
11080 2006-11-16 Daniel Jacobowitz <dan@codesourcery.com>
11081
11082 * linux-low.c (linux_wait_for_event): Reformat. Use the
11083 pass_signals array.
11084 * remote-utils.c (decode_address_to_semicolon): New.
11085 * server.c (pass_signals, handle_general_set): New.
11086 (handle_query): Mention QPassSignals for qSupported.
11087 (main): Call handle_general_set.
11088 * server.h (pass_signals, decode_address_to_semicolon): New.
11089
11090 2006-11-06 Daniel Jacobowitz <dan@codesourcery.com>
11091
11092 * server.c (handle_query): Correct error handling for read_auxv.
11093
11094 2005-10-19 Ulrich Weigand <uweigand@de.ibm.com>
11095
11096 * configure.srv [s390-*-linux*, s390x-*-linux*]: Set srv_linux_regsets
11097 and srv_linux_thread_db to yes.
11098 * linux-s390-low.c (s390_fill_gregset): New function.
11099 (target_regsets): Define data structure.
11100
11101 2006-10-17 Daniel Jacobowitz <dan@codesourcery.com>
11102
11103 * acinclude.m4 (SRV_CHECK_TLS_GET_ADDR): New.
11104 * configure.ac: Use it. Define HAVE_TD_THR_TLS_GET_ADDR.
11105 * config.in, configure: Regenerated.
11106 * inferiors.c (gdb_id_to_thread): New function.
11107 (gdb_id_to_thread_id): Use it.
11108 * linux-low.c (linux_target_ops): Use thread_db_get_tls_address.
11109 * linux-low.h (struct process_info): Add th member.
11110 (thread_db_get_tls_address): New prototype.
11111 * remote-utils.c (decode_address): Make non-static.
11112 * server.c (handle_query): Handle qGetTLSAddr.
11113 * server.h (gdb_id_to_thread, decode_address): New prototypes.
11114 * target.h (struct target_ops): Add get_tls_address.
11115 * thread-db.c (maybe_attach_thread): Save the thread handle.
11116 (thread_db_get_tls_address): New.
11117
11118 2006-09-28 Daniel Jacobowitz <dan@codesourcery.com>
11119
11120 * linux-low.c (PTRACE_GETSIGINFO, PTRACE_SETSIGINFO): Define.
11121 (linux_resume_one_process): Take a siginfo_t *. Update all
11122 callers. Queue it if necessary. Use PTRACE_SETSIGINFO.
11123 (struct pending_signals): Add a siginfo_t.
11124 (linux_wait_for_process): Always set last_status.
11125 (linux_wait_for_event): Use PTRACE_GETSIGINFO.
11126 (linux_queue_one_thread): Use PTRACE_GETSIGINFO.
11127 * linux-low.h (struct process_info): Add last_status.
11128
11129 2006-09-21 Daniel Jacobowitz <dan@codesourcery.com>
11130
11131 * remote-utils.c (try_rle): New function.
11132 (putpkt_binary): Use it.
11133
11134 2006-08-19 Daniel Jacobowitz <dan@codesourcery.com>
11135
11136 * Makefile.in (clean): Clean reg-x86-64-linux.c.
11137 (reg-x86-64-linux.o, reg-x86-64-linux.c): New.
11138 * configure.srv (x86_64-*-linux*): Use reg-x86-64-linux.o.
11139 * linux-x86-64-low.c (x86_64_regmap): Include ORIG_RAX.
11140 (x86_64_fill_gregset, x86_64_store_gregset): Skip floating
11141 point registers.
11142
11143 2006-08-08 Richard Sandiford <richard@codesourcery.com>
11144
11145 * server.c (terminal_fd): New variable.
11146 (old_foreground_pgrp): Likewise.
11147 (restore_old_foreground_pgrp): New function.
11148 (start_inferior): Record the terminal file descriptor in terminal_fd
11149 and its original foreground group in old_foreground_pgrp. Register
11150 restore_old_foreground_pgrp with atexit().
11151
11152 2006-07-26 Daniel Jacobowitz <dan@codesourcery.com>
11153
11154 * server.c (handle_query): Correct qPart to qXfer.
11155
11156 2006-07-22 Daniel Jacobowitz <dan@codesourcery.com>
11157
11158 * configure.ac: Check for more headers which are missing on
11159 Windows. Automatically supply -lwsock32 and USE_WIN32API.
11160 * configure.srv: Add Cygwin and mingw32.
11161 * remote-utils.c: Don't include headers unconditionally which
11162 are missing on mingw32. Include <winsock.h> for mingw32.
11163 (remote_open): Adjust for mingw32 support. Flush
11164 standard error after writing to it.
11165 (remote_close, putpkt_binary, input_interrupt, block_async_io)
11166 (unblock_async_io, enable_async_io, disable_async_io)
11167 (readchar, getpkt): Update for Winsock support.
11168 (prepare_resume_reply): Expect a protocol signal number.
11169 * server.c: Disable <sys/wait.h> on mingw32.
11170 (start_inferior): Adjust for mingw32 support. Flush
11171 standard error after writing to it.
11172 (attach_inferior): Likewise. Use protocol signal
11173 numbers.
11174 (main): Skip 'D' packet on mingw32. Use protocol signal numbers
11175 and names.
11176 * win32-i386-low.c: New file.
11177 * Makefile.in (XM_CLIBS): Set.
11178 (gdbserver, gdbreplay): Use $(INTERNAL_CFLAGS).
11179 (win32-i386-low.o): New dependency rule.
11180 * linux-low.c (linux_wait): Use target signal numbers.
11181 * target.h (struct target_ops): Doc fix.
11182 * server.h (target_signal_to_name): New prototype.
11183 * gdbreplay.c: Don't include headers unconditionally which
11184 are missing on mingw32. Include <winsock.h> for mingw32.
11185 (remote_close, remote_open): Adjust for Winsock support.
11186 * configure, config.in: Regenerated.
11187
11188 2006-07-12 Daniel Jacobowitz <dan@codesourcery.com>
11189
11190 * server.c (decode_xfer_read, write_qxfer_response): New.
11191 (handle_query): Take a packet length argument. Handle
11192 qXfer:auxv:read instead of qPart:auxv:read. Mention it in
11193 the qSupported response.
11194 (main): Update call to handle_query.
11195
11196 2006-06-22 Daniel Jacobowitz <dan@codesourcery.com>
11197
11198 * remote-utils.c (remote_escape_output, remote_unescape_input): New.
11199 (putpkt_binary): Renamed from putpkt and adjusted for binary
11200 data.
11201 (putpkt): New wrapper for putpkt_binary.
11202 (readchar): Don't mask off the high bit.
11203 (decode_X_packet): New function.
11204 * server.c (main): Call putpkt_binary if a handler sets the packet
11205 length. Save the length of the incoming packet. Handle 'X'.
11206 * server.h (gdb_byte, remote_escape_output, decode_X_packet): New.
11207
11208 2006-06-21 Daniel Jacobowitz <dan@codesourcery.com>
11209
11210 * server.c (handle_query): Handle qSupported.
11211
11212 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11213
11214 * remote-utils.c (all_symbols_looked_up): New variable.
11215 (look_up_one_symbol): Check it.
11216 * server.h (look_up_one_symbol): New declaration.
11217 * thread-db.c (thread_db_init): Set all_symbols_looked_up.
11218
11219 2006-05-30 Daniel Jacobowitz <dan@codesourcery.com>
11220
11221 * Makefile.in (linux-arm-low.o): Update dependencies.
11222 * linux-arm-low.c: Include "gdb_proc_service.h".
11223 (PTRACE_GET_THREAD_AREA): Define.
11224 (ps_get_thread_area): New function.
11225
11226 2006-05-09 Nathan Sidwell <nathan@codesourcery.com>
11227
11228 * configure.srv (m68k*-*-uclinux*): New target.
11229 * linux-low.c (linux_create_inferior): Use vfork on mmuless systems.
11230 (linux_resume_one_process): Remove extraneous cast.
11231 (linux_read_offsets): New.
11232 (linux_target_op): Add linux_read_offsets on mmuless systems.
11233 * server.c (handle_query): Add qOffsets logic.
11234 * target.h (struct target_ops): Add read_offsets.
11235
11236 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11237
11238 * linux-mips-low.c: Include <sys/ptrace.h> and "gdb_proc_service.h".
11239 (PTRACE_GET_THREAD_AREA): Define.
11240 (ps_get_thread_area): New function.
11241 * Makefile.in (linux-i386-low.o, linux-mips-low.o)
11242 (linux-x86-64-low.o): Update.
11243
11244 2006-03-15 Daniel Jacobowitz <dan@codesourcery.com>
11245
11246 * configure.ac: Remove checks for prfpregset_t.
11247 * gdb_proc_service.h: New file.
11248 * linux-i386-low.c, linux-x86-64-low.c, thread-db.c: Use the
11249 new "gdb_proc_service.h".
11250 * proc-service.c: Likewise.
11251 (ps_pglobal_lookup, ps_pdread, ps_pdwrite): Use psaddr_t.
11252 (ps_lgetfpregs, ps_lsetfpregs): Use a void* argument.
11253 * Makefile.in (gdb_proc_service_h): Updated.
11254 * configure, config.in: Regenerated.
11255
11256 2006-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11257
11258 * remote-utils.c (prepare_resume_reply): Move declaration
11259 of gdb_id_from_wait to the top of the block.
11260
11261 2006-02-15 Daniel Jacobowitz <dan@codesourcery.com>
11262
11263 * linux-low.c (regsets_store_inferior_registers): Read the regset
11264 from the target before filling it.
11265
11266 2006-02-08 Daniel Jacobowitz <dan@codesourcery.com>
11267
11268 * server.c (attach_inferior): Return SIGTRAP for a successful
11269 attach.
11270
11271 2006-02-01 Daniel Jacobowitz <dan@codesourcery.com>
11272
11273 * Makefile.in (OBS): Add version.o.
11274 (STAGESTUFF): Delete.
11275 (version.o): Add dependencies.
11276 (version.c): Replace rule.
11277 (clean): Remove version.c.
11278 * server.c (gdbserver_version): New.
11279 (gdbserver_usage): Use printf.
11280 (main): Handle --version and --help.
11281 * server.h (version, host_name): Add declarations.
11282
11283 2005-12-23 Eli Zaretskii <eliz@gnu.org>
11284
11285 * linux-arm-low.c:
11286 * linux-arm-low.c:
11287 * inferiors.c:
11288 * i387-fp.h:
11289 * i387-fp.c:
11290 * gdbreplay.c:
11291 * regcache.c:
11292 * proc-service.c:
11293 * mem-break.h:
11294 * mem-break.c:
11295 * linux-x86-64-low.c:
11296 * linux-sh-low.c:
11297 * linux-s390-low.c:
11298 * linux-ppc64-low.c:
11299 * linux-ppc-low.c:
11300 * linux-mips-low.c:
11301 * linux-m68k-low.c:
11302 * linux-m32r-low.c:
11303 * linux-low.h:
11304 * linux-low.c:
11305 * linux-ia64-low.c:
11306 * linux-i386-low.c:
11307 * linux-crisv32-low.c:
11308 * thread-db.c:
11309 * terminal.h:
11310 * target.h:
11311 * target.c:
11312 * server.h:
11313 * server.c:
11314 * remote-utils.c:
11315 * regcache.h:
11316 * utils.c:
11317 * Makefile.in:
11318 * configure.ac:
11319 * gdbserver.1: Add (C) after Copyright. Update the FSF
11320 address.
11321
11322 2005-11-13 Daniel Jacobowitz <dan@codesourcery.com>
11323
11324 * linux-arm-low.c (arm_eabi_breakpoint): New variable.
11325 (arm_breakpoint_at): Recognize both breakpoints.
11326 (the_low_target): Use the correct breakpoint instruction.
11327
11328 2005-11-02 Daniel Jacobowitz <dan@codesourcery.com>
11329
11330 * configure.srv (x86_64-*-linux*): Turn on thread_db support.
11331 * linux-x86-64-low.c (x86_64_breakpoint, x86_64_breakpoint_len)
11332 (x86_64_get_pc, x86_64_set_pc, x86_64_breakpoint_at): New.
11333 (the_low_target): Update.
11334
11335 2005-10-25 Andreas Schwab <schwab@suse.de>
11336
11337 * server.c (main): Allocate mem_buf with PBUFSIZ bytes.
11338
11339 * linux-ia64-low.c (ia64_regmap): Remove NAT registers.
11340 (ia64_num_regs): Reduce to 462.
11341
11342 2005-09-17 Daniel Jacobowitz <dan@codesourcery.com>
11343
11344 * acinclude.m4: Correct quoting.
11345 * aclocal.m4: Regenerated.
11346
11347 Suggested by SZOKOVACS Robert <szo@ies.hu>:
11348 * thread-db.c (thread_db_err_str): Handle TD_VERSION.
11349 (thread_db_init): Call thread_db_err_str.
11350 * configure.ac: Check for TD_VERSION.
11351 * config.in, configure: Regenerated.
11352
11353 2005-07-31 Kaveh R. Ghazi <ghazi@caip.rutgers.edu>
11354
11355 * server.h (error, fatal, warning): Add ATTR_FORMAT.
11356
11357 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11358
11359 * configure.ac: Define HAVE_LINUX_REGSETS even if PTRACE_GETREGS
11360 is not available. Define HAVE_PTRACE_GETREGS if it is.
11361 * config.in, configure: Regenerated.
11362 * configure.srv: Set srv_linux_regsets for PowerPC and PowerPC64.
11363 * linux-i386-low.c, linux-m68k-low.c: Update to use
11364 HAVE_PTRACE_GETREGS.
11365 * linux-low.c (regsets_fetch_inferior_registers)
11366 (regsets_store_inferior_registers): Only return 0 if we processed
11367 GENERAL_REGS.
11368 * linux-ppc-low.c (ppc_fill_gregset, target_regsets): New.
11369 * linux-ppc64-low.c (ppc_fill_gregset, target_regsets): New.
11370
11371 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11372
11373 * inferiors.c (struct thread_info): Add gdb_id.
11374 (add_thread): Add gdb_id argument.
11375 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New.
11376 * linux-low.c (linux_create_inferior, linux_attach_lwp): Update
11377 calls to add_thread.
11378 * remote-utils.c (prepare_resume_reply: Use thread_to_gdb_id.
11379 * server.c (handle_query): Use thread_to_gdb_id.
11380 (handle_v_cont, main): Use gdb_id_to_thread_id.
11381 * server.h (add_thread): Update prototype.
11382 (thread_id_to_gdb_id, thread_to_gdb_id, gdb_id_to_thread_id): New
11383 prototypes.
11384
11385 2005-07-13 Daniel Jacobowitz <dan@codesourcery.com>
11386
11387 * linux-low.c (fetch_register, usr_store_inferior_registers): Handle
11388 left-padded registers.
11389 * linux-low.h (struct linux_target_ops): Add left_pad_xfer.
11390 * linux-ppc64-low.c (the_low_target): Set left_pad_xfer.
11391
11392 2005-07-01 Steve Ellcey <sje@cup.hp.com>
11393
11394 * configure.ac (BFD_NEED_DECLARATION): Replace with AC_CHECK_DECLS.
11395 * configure: Regenerate.
11396 * config.in: Regenerate.
11397 * server.h (NEED_DECLARATION_STRERROR):
11398 Replace with !HAVE_DECL_STRERROR.
11399
11400 2005-06-16 Daniel Jacobowitz <dan@codesourcery.com>
11401
11402 * linux-low.c (linux_wait, linux_send_signal): Don't test
11403 an unsigned long variable for > 0 if it could be MAX_ULONG.
11404 * server.c (myresume): Likewise.
11405 * target.c (set_desired_inferior): Likewise.
11406
11407 2005-06-13 Mark Kettenis <kettenis@gnu.org>
11408
11409 * configure.ac: Simplify and improve check for socklen_t.
11410 * configure, config.in: Regenerate.
11411
11412 2005-06-12 Daniel Jacobowitz <dan@codesourcery.com>
11413
11414 * acconfig.h: Remove.
11415 * configure.ac: Add a test for socklen_t. Use three-argument
11416 AC_DEFINE throughout.
11417 * config.in: Regenerated using autoheader 2.59.
11418 * configure: Regenerated.
11419
11420 * gdbreplay.c (socklen_t): Provide a default.
11421 (remote_open): Use socklen_t.
11422 * remote-utils.c (socklen_t): Provide a default.
11423 (remote_open): Use socklen_t.
11424 (convert_int_to_ascii, convert_ascii_to_int, decode_M_packet): Use
11425 unsigned char.
11426
11427 * i387-fp.c (struct i387_fsave, struct i387_fxsave): Use unsigned
11428 char for buffers.
11429 * linux-low.c (linux_read_memory, linux_write_memory)
11430 (linux_read_auxv): Likewise.
11431 * mem-break.c (breakpoint_data, set_breakpoint_data, check_mem_read)
11432 (check_mem_write): Likewise.
11433 * mem-break.h (set_breakpoint_data, check_mem_read, check_mem_write):
11434 Likewise.
11435 * regcache.c (struct inferior_rgcache_data, registers_to_string)
11436 (registers_from_string, register_data): Likewise.
11437 * server.c (handle_query, main): Likewise.
11438 * server.h (convert_ascii_to_int, convert_int_to_ascii)
11439 (decode_M_packet): Likewise.
11440 * target.c (read_inferior_memory, write_inferior_memory): Likewise.
11441 * target.h (struct target_ops): Update read_memory, write_memory,
11442 and read_auxv.
11443 (read_inferior_memory, write_inferior_memory): Update.
11444 * linux-low.h (struct linux_target_ops): Change type of breakpoint
11445 to unsigned char *.
11446 * linux-arm-low.c, linux-cris-low.c, linux-crisv32-low.c,
11447 linux-i386-low.c, linux-m32r-low.c, linux-m68k-low.c,
11448 linux-mips-low.c, linux-ppc-low.c, linux-ppc64-low.c,
11449 linux-s390-low.c, linux-sh-low.c: Update for changes in
11450 read_inferior_memory and the_low_target->breakpoint.
11451
11452 2005-05-28 Daniel Jacobowitz <dan@codesourcery.com>
11453
11454 * Makefile.in (SFILES): Add linux-ppc64-low.c.
11455 (linux-ppc64-low.o, reg-ppc64.c, reg-ppc64.o): New targets.
11456 * configure.srv: Add powerpc64-*-linux*.
11457 * linux-ppc64-low.c: New file.
11458
11459 2005-05-23 Orjan Friberg <orjanf@axis.com>
11460
11461 * linux-cris-low.c: New file with support for CRIS.
11462 * linux-crisv32-low.c: Ditto for CRISv32.
11463 * Makefile.in (SFILES): Add linux-cris-low.c, linux-crisv32-low.c.
11464 (clean): Add reg-cris.c and reg-crisv32.c.
11465 Add linux-cris-low.o, linux-crisv32-low.o, reg-cris.o, reg-cris.c,
11466 reg-crisv32.o, and reg-crisv32.c to make rules.
11467 * configure.srv: Add cris-*-linux* and crisv32-*-linux* to list of
11468 recognized targets.
11469
11470 2005-05-16 Ulrich Weigand <uweigand@de.ibm.com>
11471
11472 * linux-low.c (fetch_register): Ensure buffer size is a multiple
11473 of sizeof (PTRACE_XFER_TYPE).
11474 (usr_store_inferior_registers): Likewise. Zero out excess bytes.
11475
11476 2005-05-12 Orjan Friberg <orjanf@axis.com>
11477
11478 * target.h (struct target_ops): Add insert_watchpoint,
11479 remove_watchpoint, stopped_by_watchpoint, stopped_data_address function
11480 pointers for hardware watchpoint support.
11481 * linux-low.h (struct linux_target_ops): Ditto.
11482 * linux-low.c (linux_insert_watchpoint, linux_remove_watchpoint)
11483 (linux_stopped_by_watchpoint, linux_stopped_data_address): New. Add
11484 to linux_target_ops.
11485 * remote-utils.c (prepare_resume_reply): Add watchpoint information to
11486 reply packet.
11487 * server.c (main): Recognize 'Z' and 'z' packets.
11488
11489 2005-05-10 Ulrich Weigand <uweigand@de.ibm.com>
11490
11491 * linux-s390-low.c (s390_breakpoint, s390_breakpoint_len): Define.
11492 (s390_get_pc, s390_set_pc, s390_breakpoint_at): New functions.
11493 (the_low_target): Add new members.
11494
11495 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11496
11497 * proc-service.c (ps_lgetregs): Search all_processes instead of
11498 all_threads.
11499
11500 2005-05-04 Daniel Jacobowitz <dan@codesourcery.com>
11501
11502 * server.c (start_inferior): Change return type to int.
11503 (attach_inferior): Change sigptr to int *.
11504 (handle_v_cont, handle_v_requests): Change signal to int *.
11505 (main): Change signal to int.
11506
11507 2005-04-15 Kei Sakamoto <sakamoto.kei@renesas.com>
11508
11509 * Makefile.in: Add linux-m32r-low.o, reg-m32r.c and reg-m32r.o.
11510 * configure.srv: Add m32r*-*-linux*.
11511 * linux-m32r-low.c: New file.
11512
11513 2005-03-04 Daniel Jacobowitz <dan@codesourcery.com>
11514
11515 * Makefile.in (stamp-h): Set CONFIG_HEADERS explicitly.
11516
11517 2005-03-03 Daniel Jacobowitz <dan@codesourcery.com>
11518
11519 * inferiors.c (change_inferior_id, add_thread, find_inferior_id):
11520 Take unsigned long arguments for PIDs.
11521 * linux-low.c (add_process, linux_attach_lwp, linux_attach)
11522 (linux_thread_alive, linux_wait_for_event, kill_lwp, send_sigstop)
11523 (wait_for_sigstop, linux_resume_one_process)
11524 (regsets_fetch_inferior_registers, linux_send_signal)
11525 (linux_read_auxv): Likewise. Update the types of variables holding
11526 PIDs. Update format string specifiers.
11527 * linux-low.h (struct process_info, linux_attach_lwp): Likewise.
11528 * remote-utils.c (prepare_resume_reply): Likewise.
11529 * server.c (cont_thread, general_thread, step_thread)
11530 (thread_from_wait, old_thread_from_wait, signal_pid): Change type to
11531 unsigned long.
11532 (handle_query): Update format specifiers.
11533 (handle_v_cont, main): Use strtoul for thread IDs.
11534 * server.h (struct inferior_list_entry): Use unsigned long for ID.
11535 (add_thread, find_inferior_id, change_inferior_id, cont_thread)
11536 (general_thread, step_thread, thread_from_wait)
11537 (old_thread_from_wait): Update.
11538 * target.h (struct thread_resume): Use unsigned long for THREAD.
11539 (struct target_ops): Use unsigned long for arguments to attach and
11540 thread_alive.
11541
11542 2005-02-24 Daniel Jacobowitz <dan@codesourcery.com>
11543
11544 * acinclude.m4: Include bfd/bfd.m4 directly.
11545 * configure.ac: Use AC_ARG_PROGRAM. Suggested by Aron Griffis
11546 <agriffis@toolchain.org>.
11547 * aclocal.m4, configure: Regenerated.
11548
11549 2005-01-07 Andrew Cagney <cagney@gnu.org>
11550
11551 * configure.ac: Rename configure.in, require autoconf 2.59.
11552 * configure: Re-generate.
11553
11554 2004-12-08 Daniel Jacobowitz <dan@debian.org>
11555
11556 * acinclude.m4 (SRV_CHECK_THREAD_DB): Add ps_get_thread_area. Reset
11557 LIBS when finished.
11558 * aclocal.m4: Regenerated.
11559 * configure: Regenerated.
11560
11561 2004-11-21 Andreas Schwab <schwab@suse.de>
11562
11563 * linux-m68k-low.c (m68k_num_gregs): Define.
11564 (m68k_fill_gregset, m68k_store_gregset, m68k_fill_fpregset)
11565 (m68k_store_fpregset, target_regsets) [HAVE_LINUX_REGSETS]: New.
11566 (m68k_breakpoint, m68k_breakpoint_len, m68k_get_pc, m68k_set_pc)
11567 (m68k_breakpoint_at): New. Add to the_low_target.
11568
11569 * configure.srv (m68*-*-linux*): Set srv_linux_regsets and
11570 srv_linux_thread_db to yes.
11571
11572 2004-10-20 Joel Brobecker <brobecker@gnat.com>
11573
11574 * linux-x86-64-low.c (ARCH_SET_GS): Add definition if missing.
11575 (ARCH_SET_FS): Likewise.
11576 (ARCH_GET_FS): Likewise.
11577 (ARCH_GET_GS): Likewise.
11578
11579 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11580
11581 * linux-i386-low.c (ps_get_thread_area): New.
11582 * linux-x86-64-low.c (ps_get_thread_area): New.
11583 * linux-low.c: Include <sys/syscall.h>.
11584 (linux_kill_one_process): Don't kill the first thread here.
11585 (linux_kill): Kill the first thread here.
11586 (kill_lwp): New function.
11587 (send_sigstop, linux_send_signal): Use it.
11588 * proc-service.c: Clean up #ifdefs.
11589 (fpregset_info): Delete.
11590 (ps_lgetregs): Update and enable implementation.
11591 (ps_lsetregs, ps_lgetfpregs, ps_lsetfpregs): Remove disabled
11592 implementations.
11593 * remote-utils.c (struct sym_cache, symbol_cache): New.
11594 (input_interrupt): Print a clearer message.
11595 (async_io_enabled): New variable.
11596 (enable_async_io, disable_async_io): Use it. Update comments.
11597 (look_up_one_symbol): Use the symbol cache.
11598 * thread-db.c (thread_db_look_up_symbols): New function.
11599 (thread_db_init): Update comments. Call thread_db_look_up_symbols.
11600
11601 2004-10-16 Daniel Jacobowitz <dan@debian.org>
11602
11603 * configure.in: Test for -rdynamic.
11604 * configure: Regenerated.
11605 * Makefile (INTERNAL_LDFLAGS): New.
11606 (gdbserver, gdbreplay): Use it.
11607
11608 2004-09-02 Andrew Cagney <cagney@gnu.org>
11609
11610 * Makefile.in (TAGS): Replace TM_FILE with DEPRECATED_TM_FILE.
11611
11612 2004-03-23 Daniel Jacobowitz <drow@mvista.com>
11613
11614 * linux-low.c (linux_wait): Clear all_processes list also.
11615
11616 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11617
11618 * linux-low.c: Include <errno.h>. Remove extern declaration of
11619 errno.
11620
11621 2004-03-12 Daniel Jacobowitz <drow@mvista.com>
11622
11623 * gdbreplay.c, server.h, utils.c: Update copyright years.
11624
11625 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11626
11627 * server.c (main): Print child status or termination signal from
11628 variable 'signal', not 'sig'.
11629
11630 2004-03-04 Nathan J. Williams <nathanw@wasabisystems.com>
11631
11632 * linux-low.c (linux_read_memory): Change return type to
11633 int. Check for and return error from ptrace().
11634 * target.c (read_inferior_memory): Change return type to int. Pass
11635 back return status from the_target->read_memory().
11636 * target.h (struct target_ops): Adapt *read_memory() prototype.
11637 Update comment.
11638 (read_inferior_memory): Adapt prototype.
11639 * server.c (main): Return an error packet if
11640 read_inferior_memory() returns an error.
11641
11642 2004-03-04 Daniel Jacobowitz <drow@mvista.com>
11643
11644 * Makefile.in (distclean): Remove config.h, stamp-h, and config.log.
11645 Unify with other clean targets.
11646
11647 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11648
11649 * server.c (handle_v_cont): Call set_desired_inferior.
11650
11651 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11652
11653 * remote-utils.c (prepare_resume_reply): Always supply "thread:".
11654
11655 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11656
11657 * linux-low.c (linux_wait): Unblock async I/O.
11658 (linux_resume): Block and enable async I/O.
11659 * remote-utils.c (block_async_io, unblock_async_io): New functions.
11660 * server.h (block_async_io, unblock_async_io): Add prototypes.
11661
11662 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11663
11664 * remote-utils.c (remote_open): Print a status notice after
11665 opening a TCP port.
11666 * server.c (attach_inferior): Print a status notice after
11667 attaching.
11668
11669 2004-02-29 Daniel Jacobowitz <drow@mvista.com>
11670
11671 * linux-arm-low.c (arm_get_pc): Print out stop PC in debug mode.
11672
11673 2004-02-26 Daniel Jacobowitz <drow@mvista.com>
11674
11675 * remote-utils.c (write_enn): Use "E01" instead of "ENN" for the
11676 error packet.
11677 * server.c, target.h: Update copyright years.
11678
11679 2004-02-25 Roland McGrath <roland@redhat.com>
11680
11681 * target.h (struct target_ops): New member `read_auxv'.
11682 * server.c (handle_query): Handle qPart:auxv:read: query using that.
11683 * linux-low.c (linux_read_auxv): New function.
11684 (linux_target_ops): Initialize `read_auxv' member to that.
11685
11686 2004-02-17 Ulrich Weigand <Ulrich.Weigand@de.ibm.com>
11687
11688 Committed by Jim Blandy <jimb@redhat.com>.
11689
11690 * linux-s390-low.c (s390_num_regs): Update.
11691 (s390_regmap): Remove control registers. Use __s390x__ predefine
11692 instead of GPR_SIZE to distiguish s390 and s390x targets.
11693
11694 2004-01-31 Daniel Jacobowitz <drow@mvista.com>
11695
11696 * linux-low.c: Update copyright year.
11697 (check_removed_breakpoint): Clear pending_is_breakpoint.
11698 (linux_set_resume_request, linux_queue_one_thread)
11699 (resume_status_pending_p): New functions.
11700 (linux_continue_one_thread): Use process->resume.
11701 (linux_resume): Only resume threads if there are no pending events.
11702 * linux-low.h (struct process_info): Add resume request
11703 pointer.
11704
11705 2004-01-30 Daniel Jacobowitz <drow@mvista.com>
11706
11707 * regcache.c (new_register_cache): Clear the allocated register
11708 buffer. Suggested by Atsushi Nemoto <anemo@mba.ocn.ne.jp>.
11709
11710 2003-10-13 Daniel Jacobowitz <drow@mvista.com>
11711
11712 * linux-low.c (linux_resume): Take a struct thread_resume *
11713 argument.
11714 (linux_wait): Update call.
11715 (resume_ptr): New static variable.
11716 (linux_continue_one_thread): Renamed from
11717 linux_continue_one_process. Use resume_ptr.
11718 (linux_resume): Use linux_continue_one_thread.
11719 * server.c (handle_v_cont, handle_v_requests): New functions.
11720 (myresume): New function.
11721 (main): Handle 'v' case.
11722 * target.h (struct thread_resume): New type.
11723 (struct target_ops): Change argument of "resume" to struct
11724 thread_resume *.
11725 (myresume): Delete macro.
11726
11727 2003-08-08 H.J. Lu <hongjiu.lu@intel.com>
11728
11729 * Makefile.in (install-only): Create dest dir. Support DESTDIR.
11730 (uninstall): Support DESTDIR.
11731
11732 Mon Jul 21 20:09:34 UTC 2003 Brendan Conoboy <blc@redhat.com>
11733
11734 * configure.srv: Add xscale*linux copy of arm*linux entry.
11735
11736 2003-07-24 Daniel Jacobowitz <drow@mvista.com>
11737
11738 * linux-arm-low.c (arm_reinsert_addr): New function.
11739 (the_low_target): Add arm_reinsert_addr.
11740
11741 2003-07-08 Mark Kettenis <kettenis@gnu.org>
11742
11743 * mem-break.c: Remove whitespace at end of file.
11744
11745 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11746
11747 * configure.in: Check whether we need to prototype strerror.
11748 * server.h: Optionally prototype strerror.
11749 * gdbreplay.c (perror_with_name): Use strerror.
11750 * linux-low.c (linux_attach_lwp): Use strerror.
11751 * utils.c (perror_with_name): Use strerror.
11752 * config.in, configure: Regenerated.
11753
11754 2003-06-28 Daniel Jacobowitz <drow@mvista.com>
11755
11756 * linux-sh-low.c (sh_regmap): Fix FP register offsets, reported by
11757 SUGIOKA Toshinobu <sugioka@itonet.co.jp>.
11758
11759 2003-06-20 Daniel Jacobowitz <drow@mvista.com>
11760
11761 * Makefile.in (SFILES): Update.
11762 * low-hppabsd.c, low-lynx.c, low-nbsd.c, low-sim.c, low-sparc.c,
11763 low-sun3.c: Remove files.
11764
11765 2003-06-17 Daniel Jacobowitz <drow@mvista.com>
11766
11767 * linux-low.c: Move comment to linux_thread_alive where it belonged.
11768 (linux_detach_one_process, linux_detach): New functions.
11769 (linux_target_ops): Add linux_detach.
11770 * server.c (main): Handle 'D' packet.
11771 * target.h (struct target_ops): Add "detach" member.
11772 (detach_inferior): Define.
11773
11774 2003-06-13 Mark Kettenis <kettenis@gnu.org>
11775
11776 From Kelley Cook <kelleycook@wideopenwest.com>:
11777 * configure.srv: Accept i[34567]86 variants.
11778
11779 2003-06-05 Daniel Jacobowitz <drow@mvista.com>
11780
11781 * linux-low.c (linux_wait_for_event): Correct comment typos.
11782 (linux_resume_one_process): Call check_removed_breakpoint.
11783 (linux_send_signal): New function.
11784 (linux_target_ops): Add linux_send_signal.
11785 * remote-utils.c (putpkt, input_interrupt): Use send_signal instead
11786 of kill.
11787 * target.h (struct target_ops): Add send_signal.
11788
11789 2003-05-29 Jim Blandy <jimb@redhat.com>
11790
11791 * linux-low.c (usr_store_inferior_registers): Transfer buf in
11792 PTRACE_XFER_TYPE-sized chunks, not int-sized chunks. Otherwise,
11793 if 'int' is smaller than PTRACE_XFER_TYPE, you end up throwing
11794 away part of the register's value.
11795
11796 2003-03-26 Daniel Jacobowitz <drow@mvista.com>
11797
11798 * linux-low.c (linux_create_inferior): Use __SIGRTMIN.
11799 (linux_wait_for_event, linux_init_signals): Likewise.
11800
11801 2003-03-17 Daniel Jacobowitz <drow@mvista.com>
11802
11803 * configure.in: Check for stdlib.h.
11804 * configure: Regenerated.
11805 * config.in: Regenerated.
11806
11807 2003-01-04 Andreas Schwab <schwab@suse.de>
11808
11809 * linux-m68k-low.c (m68k_num_regs): Define to 29 instead of 31.
11810
11811 2003-01-02 Andrew Cagney <ac131313@redhat.com>
11812
11813 * Makefile.in: Remove obsolete code.
11814
11815 2002-11-20 Daniel Jacobowitz <drow@mvista.com>
11816
11817 * linux-s390-low.c (s390_regmap): Check GPR_SIZE instead of
11818 defined(PT_FPR0_HI).
11819
11820 2002-11-17 Stuart Hughes <seh@zee2.com>
11821
11822 * linux-arm-low.c (arm_num_regs): Increase.
11823 (arm_regmap): Include status register.
11824
11825 2002-11-17 Daniel Jacobowitz <drow@mvista.com>
11826
11827 * linux-low.c (register_addr): Remove incorrect -1 check.
11828
11829 2002-08-29 Daniel Jacobowitz <drow@mvista.com>
11830
11831 * linux-low.c (linux_create_inferior): Call setpgid. Return
11832 the new PID.
11833 (unstopped_p, linux_signal_pid): Remove.
11834 (linux_target_ops): Remove linux_signal_pid.
11835 * remote-utils.c (putpkt, input_interrupt): Use signal_pid
11836 global instead of target method.
11837 * target.h (struct target_ops): Remove signal_pid. Update comment
11838 for create_inferior.
11839 * server.c (signal_pid): New variable.
11840 (create_inferior): Set signal_pid. Block SIGTTOU and SIGTTIN in
11841 gdbserver. Set the child to be the foreground process group.
11842 (attach_inferior): Set signal_pid.
11843
11844 2002-08-23 Daniel Jacobowitz <drow@mvista.com>
11845
11846 * ChangeLog: New file, with entries from gdb/ChangeLog after GDB 5.2.
11847
11848 2002-08-20 Jim Blandy <jimb@redhat.com>
11849
11850 * Makefile.in (LDFLAGS): Allow the configure script to establish a
11851 default for this.
11852
11853 2002-08-01 Andrew Cagney <cagney@redhat.com>
11854
11855 * Makefile.in: Make chill references obsolete.
11856
11857 2002-07-24 Kevin Buettner <kevinb@redhat.com>
11858
11859 * configure.in (unistd.h): Add to AC_CHECK_HEADERS list.
11860 * configure: Regenerate.
11861 * config.in: Regenerate.
11862
11863 2002-07-09 David O'Brien <obrien@FreeBSD.org>
11864
11865 * gdbreplay.c (stdlib.h, unistd.h): Conditionaly include.
11866 (perror_with_name, remote_close, remote_open, expect, play): Static.
11867
11868 2002-07-04 Michal Ludvig <mludvig@suse.cz>
11869
11870 * linux-x86-64-low.c (x86_64_regmap): Make it an array of
11871 byte offsets instead of an array of indexes.
11872 (x86_64_store_gregset, x86_64_store_fpregset): Parameter made const.
11873
11874 2002-06-13 Daniel Jacobowitz <drow@mvista.com>
11875
11876 * regcache.c: Add comment.
11877
11878 2002-06-11 Daniel Jacobowitz <drow@mvista.com>
11879
11880 * thread-db.c: New file.
11881 * proc-service.c: New file.
11882 * acinclude.m4: New file.
11883 * Makefile.in: Add GDBSERVER_LIBS, gdb_proc_service_h,
11884 proc-service.o, and thread-db.o.
11885 (linux-low.o): Add USE_THREAD_DB.
11886 * acconfig.h: Add HAVE_PRGREGSET_T, HAVE_PRFPREGSET_T,
11887 HAVE_LWPID_T, HAVE_PSADDR_T, and PRFPREGSET_T_BROKEN.
11888 * aclocal.m4: Regenerated.
11889 * config.in: Regenerated.
11890 * configure: Regenerated.
11891 * configure.in: Check for proc_service.h, sys/procfs.h,
11892 thread_db.h, and linux/elf.h headrs.
11893 Check for lwpid_t, psaddr_t, prgregset_t, prfpregset_t, and
11894 PRFPREGSET_T_BROKEN. Introduce srv_thread_depfiles and USE_THREAD_DB.
11895 Check for -lthread_db and thread support.
11896 * configure.srv: Enable thread_db support for ARM, i386, MIPS,
11897 PowerPC, and SuperH.
11898 * i387-fp.c: Constify arguments.
11899 * i387-fp.h: Likewise.
11900 * inferiors.c: (struct thread_info): Renamed from
11901 `struct inferior_info'. Remove PID member. Use generic inferior
11902 list header. All uses updated.
11903 (inferiors, signal_pid): Removed.
11904 (all_threads): New variable.
11905 (get_thread): Define.
11906 (add_inferior_to_list): New function.
11907 (for_each_inferior): New function.
11908 (change_inferior_id): New function.
11909 (add_inferior): Removed.
11910 (remove_inferior): New function.
11911 (add_thread): New function.
11912 (free_one_thread): New function.
11913 (remove_thread): New function.
11914 (clear_inferiors): Use for_each_inferior and free_one_thread.
11915 (find_inferior): New function.
11916 (find_inferior_id): New function.
11917 (inferior_target_data): Update argument type.
11918 (set_inferior_target_data): Likewise.
11919 (inferior_regcache_data): Likewise.
11920 (set_inferior_regcache_data): Likewise.
11921 * linux-low.c (linux_bp_reinsert): Remove.
11922 (all_processes, stopping_threads, using_thrads)
11923 (struct pending_signals, debug_threads, pid_of): New.
11924 (inferior_pid): Replace with macro.
11925 (struct inferior_linux_data): Remove.
11926 (get_stop_pc, add_process): New functions.
11927 (linux_create_inferior): Restore SIGRTMIN+1 before calling exec.
11928 Use add_process and add_thread.
11929 (linux_attach_lwp): New function, based on old linux_attach. Use
11930 add_process and add_thread. Set stop_expected for new threads.
11931 (linux_attach): New function.
11932 (linux_kill_one_process): New function.
11933 (linux_kill): Kill all LWPs.
11934 (linux_thread_alive): Use find_inferior_id.
11935 (check_removed_breakpoints, status_pending_p): New functions.
11936 (linux_wait_for_process): Renamed from linux_wait_for_one_inferior.
11937 Update. Use WNOHANG. Wait for cloned processes also. Update process
11938 struct for the found process.
11939 (linux_wait_for_event): New function.
11940 (linux_wait): Use it. Support LWPs.
11941 (send_sigstop, wait_for_sigstop, stop_all_processes)
11942 (linux_resume_one_process, linux_continue_one_process): New functions.
11943 (linux_resume): Support LWPs.
11944 (REGISTER_RAW_SIZE): Remove.
11945 (fetch_register): Use register_size instead. Call supply_register.
11946 (usr_store_inferior_registers): Likewise. Call collect_register.
11947 Fix recursive case.
11948 (regsets_fetch_inferior_registers): Improve error message.
11949 (regsets_store_inferior_registers): Add debugging.
11950 (linux_look_up_symbols): Call thread_db_init if USE_THREAD_DB.
11951 (unstopped_p, linux_signal_pid): New functions.
11952 (linux_target_ops): Add linux_signal_pid.
11953 (linux_init_signals): New function.
11954 (initialize_low): Call it. Initialize using_threads.
11955 * regcache.c (inferior_regcache_data): Add valid
11956 flag.
11957 (get_regcache): Fetch registers lazily. Add fetch argument
11958 and update all callers.
11959 (regcache_invalidate_one, regcache_invalidate): New
11960 functions.
11961 (new_register_cache): Renamed from create_register_cache.
11962 Return the new regcache.
11963 (free_register_cache): Change argument to a void *.
11964 (registers_to_string, registers_from_string): Call get_regcache
11965 with fetch flag set.
11966 (register_data): Make static. Pass fetch flag to get_regcache.
11967 (supply_register): Call get_regcache with fetch flag clear.
11968 (collect_register): Call get_regcache with fetch flag set.
11969 (collect_register_as_string): New function.
11970 * regcache.h: Update.
11971 * remote-utils.c (putpkt): Flush after debug output and use
11972 stderr.
11973 Handle input interrupts while waiting for an ACK.
11974 (input_interrupt): Use signal_pid method.
11975 (getpkt): Flush after debug output and use stderr.
11976 (outreg): Use collect_register_as_string.
11977 (new_thread_notify, dead_thread_notify): New functions.
11978 (prepare_resume_reply): Check using_threads. Set thread_from_wait
11979 and general_thread.
11980 (look_up_one_symbol): Flush after debug output.
11981 * server.c (step_thread, server_waiting): New variables.
11982 (start_inferior): Don't use signal_pid. Update call to mywait.
11983 (attach_inferior): Update call to mywait.
11984 (handle_query): Handle qfThreadInfo and qsThreadInfo.
11985 (main): Don't fetch/store registers explicitly. Use
11986 set_desired_inferior. Support proposed ``Hs'' packet. Update
11987 calls to mywait.
11988 * server.h: Update.
11989 (struct inferior_list, struct_inferior_list_entry): New.
11990 * target.c (set_desired_inferior): New.
11991 (write_inferior_memory): Constify.
11992 (mywait): New function.
11993 * target.h: Update.
11994 (struct target_ops): New signal_pid method.
11995 (mywait): Removed macro, added prototype.
11996
11997 * linux-low.h (regset_func): Removed.
11998 (regset_fill_func, regset_store_func): New.
11999 (enum regset_type): New.
12000 (struct regset_info): Add type field. Use new operation types.
12001 (struct linux_target_ops): stop_pc renamed to get_pc.
12002 Add decr_pc_after_break and breakpoint_at.
12003 (get_process, get_thread_proess, get_process_thread)
12004 (strut process_info, all_processes, linux_attach_lwp)
12005 (thread_db_init): New.
12006
12007 * linux-arm-low.c (arm_get_pc, arm_set_pc,
12008 arm_breakpoint, arm_breakpoint_len, arm_breakpoint_at): New.
12009 (the_low_target): Add new members.
12010 * linux-i386-low.c (i386_store_gregset, i386_store_fpregset)
12011 (i386_store_fpxregset): Constify.
12012 (target_regsets): Add new kind identifier.
12013 (i386_get_pc): Renamed from i386_stop_pc. Simplify.
12014 (i386_set_pc): Add debugging.
12015 (i386_breakpoint_at): New function.
12016 (the_low_target): Add new members.
12017 * linux-mips-low.c (mips_get_pc, mips_set_pc)
12018 (mips_breakpoint, mips_breakpoint_len, mips_reinsert_addr)
12019 (mips_breakpoint_at): New.
12020 (the_low_target): Add new members.
12021 * linux-ppc-low.c (ppc_get_pc, ppc_set_pc)
12022 (ppc_breakpoint, ppc_breakpoint_len, ppc_breakpoint_at): New.
12023 (the_low_target): Add new members.
12024 * linux-sh-low.c (sh_get_pc, sh_set_pc)
12025 (sh_breakpoint, sh_breakpoint_len, sh_breakpoint_at): New.
12026 (the_low_target): Add new members.
12027 * linux-x86-64-low.c (target_regsets): Add new kind
12028 identifier.
12029
12030 2002-05-15 Daniel Jacobowitz <drow@mvista.com>
12031
12032 From Martin Pool <mbp@samba.org>:
12033 * server.c (gdbserver_usage): New function.
12034 (main): Call it.
12035
12036 2002-05-14 Daniel Jacobowitz <drow@mvista.com>
12037
12038 * mem-break.c (reinsert_breakpoint_by_bp): Correct typo
12039 stop_at -> stop_pc.
12040
12041 2002-05-04 Andrew Cagney <ac131313@redhat.com>
12042
12043 * Makefile.in: Remove obsolete code.
12044
12045 2002-04-24 Michal Ludvig <mludvig@suse.cz>
12046
12047 * linux-low.c (regsets_fetch_inferior_registers),
12048 (regsets_store_inferior_registers): Removed cast to int from
12049 ptrace() calls.
12050 * regcache.h: Added declaration of struct inferior_info.
12051
12052 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12053
12054 * inferiors.c (struct inferior_info): Add regcache_data.
12055 (add_inferior): Call create_register_cache.
12056 (clear_inferiors): Call free_register_cache.
12057 (inferior_regcache_data, set_inferior_regcache_data): New functions.
12058 * regcache.c (struct inferior_regcache_data): New.
12059 (registers): Remove.
12060 (get_regcache): New function.
12061 (create_register_cache, free_register_cache): New functions.
12062 (set_register_cache): Don't initialize the register cache here.
12063 (registers_to_string, registers_from_string, register_data): Call
12064 get_regcache.
12065 * regcache.h: Add prototypes.
12066 * server.h: Likewise.
12067
12068 2002-04-20 Daniel Jacobowitz <drow@mvista.com>
12069
12070 * mem-break.c: New file.
12071 * mem-break.h: New file.
12072 * Makefile.in: Add mem-break.o rule; update server.h
12073 dependencies.
12074 * inferiors.c (struct inferior_info): Add target_data
12075 member.
12076 (clear_inferiors): Free target_data member if set.
12077 (inferior_target_data, set_inferior_target_data): New functions.
12078 * linux-i386-low.c (i386_breakpoint, i386_breakpoint_len)
12079 (i386_stop_pc, i386_set_pc): New. Add to the_low_target.
12080 * linux-low.c (linux_bp_reinsert): New variable.
12081 (struct inferior_linux_data): New.
12082 (linux_create_inferior): Use set_inferior_target_data.
12083 (linux_attach): Likewise. Call add_inferior.
12084 (linux_wait_for_one_inferior): New function.
12085 (linux_wait): Call it.
12086 (linux_write_memory): Add const.
12087 (initialize_low): Call set_breakpoint_data.
12088 * linux-low.h (struct linux_target_ops): Add breakpoint
12089 handling members.
12090 * server.c (attach_inferior): Remove extra add_inferior
12091 call.
12092 * server.h: Include mem-break.h. Update inferior.c
12093 prototypes.
12094 * target.c (read_inferior_memory)
12095 (write_inferior_memory): New functions.
12096 * target.h (read_inferior_memory)
12097 (write_inferior_memory): Change macros to prototypes.
12098 (struct target_ops): Update comments. Add const to write_memory
12099 definition.
12100
12101 2002-04-11 Daniel Jacobowitz <drow@mvista.com>
12102
12103 * linux-low.c (usr_store_inferior_registers): Support
12104 registers which are allowed to fail to store.
12105 * linux-low.h (linux_target_ops): Likewise.
12106 * linux-ppc-low.c (ppc_regmap): Support FPSCR.
12107 (ppc_cannot_store_register): FPSCR may not be storable.
12108
12109 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12110
12111 * server.h: Include <string.h> if HAVE_STRING_H.
12112 * ChangeLog: Correct paths in last ChangeLog entry.
12113
12114 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12115
12116 * linux-low.h: Remove obsolete prototypes.
12117 (struct linux_target_ops): New.
12118 (extern the_low_target): New.
12119 * linux-low.c (num_regs, regmap): Remove declarations.
12120 (register_addr): Use the_low_target explicitly.
12121 (fetch_register): Likewise.
12122 (usr_fetch_inferior_registers): Likewise.
12123 (usr_store_inferior_registers): Likewise.
12124 * linux-arm-low.c (num_regs): Remove.
12125 (arm_num_regs): Define.
12126 (arm_regmap): Renamed from regmap, made static.
12127 (arm_cannot_fetch_register): Renamed from cannot_fetch_register,
12128 made static.
12129 (arm_cannot_store_register): Renamed from cannot_store_register,
12130 made static.
12131 (the_low_target): New.
12132 * linux-i386-low.c (num_regs): Remove.
12133 (i386_num_regs): Define.
12134 (i386_regmap): Renamed from regmap, made static.
12135 (i386_cannot_fetch_register): Renamed from cannot_fetch_register,
12136 made static.
12137 (i386_cannot_store_register): Renamed from cannot_store_register,
12138 made static.
12139 (the_low_target): New.
12140 * linux-ia64-low.c (num_regs): Remove.
12141 (ia64_num_regs): Define.
12142 (ia64_regmap): Renamed from regmap, made static.
12143 (ia64_cannot_fetch_register): Renamed from cannot_fetch_register,
12144 made static.
12145 (ia64_cannot_store_register): Renamed from cannot_store_register,
12146 made static.
12147 (the_low_target): New.
12148 * linux-m68k-low.c (num_regs): Remove.
12149 (m68k_num_regs): Define.
12150 (m68k_regmap): Renamed from regmap, made static.
12151 (m68k_cannot_fetch_register): Renamed from cannot_fetch_register,
12152 made static.
12153 (m68k_cannot_store_register): Renamed from cannot_store_register,
12154 made static.
12155 (the_low_target): New.
12156 * linux-mips-low.c (num_regs): Remove.
12157 (mips_num_regs): Define.
12158 (mips_regmap): Renamed from regmap, made static.
12159 (mips_cannot_fetch_register): Renamed from cannot_fetch_register,
12160 made static.
12161 (mips_cannot_store_register): Renamed from cannot_store_register,
12162 made static.
12163 (the_low_target): New.
12164 * linux-ppc-low.c (num_regs): Remove.
12165 (ppc_num_regs): Define.
12166 (ppc_regmap): Renamed from regmap, made static.
12167 (ppc_cannot_fetch_register): Renamed from cannot_fetch_register,
12168 made static.
12169 (ppc_cannot_store_register): Renamed from cannot_store_register,
12170 made static.
12171 (the_low_target): New.
12172 * linux-s390-low.c (num_regs): Remove.
12173 (s390_num_regs): Define.
12174 (s390_regmap): Renamed from regmap, made static.
12175 (s390_cannot_fetch_register): Renamed from cannot_fetch_register,
12176 made static.
12177 (s390_cannot_store_register): Renamed from cannot_store_register,
12178 made static.
12179 (the_low_target): New.
12180 * linux-sh-low.c (num_regs): Remove.
12181 (sh_num_regs): Define.
12182 (sh_regmap): Renamed from regmap, made static.
12183 (sh_cannot_fetch_register): Renamed from cannot_fetch_register,
12184 made static.
12185 (sh_cannot_store_register): Renamed from cannot_store_register,
12186 made static.
12187 (the_low_target): New.
12188 * linux-x86-64-low.c (x86_64_regmap): Renamed from regmap.
12189 (the_low_target): New.
12190
12191 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12192
12193 * Makefile.in: Add stamp-h target.
12194 * configure.in: Create stamp-h.
12195 * configure: Regenerated.
12196
12197 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12198
12199 * inferiors.c: New file.
12200 * target.c: New file.
12201 * target.h: New file.
12202 * Makefile.in: Add target.o and inferiors.o. Update
12203 dependencies.
12204 * linux-low.c (inferior_pid): New static variable,
12205 moved from server.c.
12206 (linux_create_inferior): Renamed from create_inferior.
12207 Call add_inferior. Return 0 on success instead of a PID.
12208 (linux_attach): Renamed from myattach.
12209 (linux_kill): Renamed from kill_inferior. Call clear_inferiors ().
12210 (linux_thread_alive): Renamed from mythread_alive.
12211 (linux_wait): Renamed from mywait. Call clear_inferiors () if the
12212 child dies.
12213 (linux_resume): Renamed from myresume. Add missing ``return 0''.
12214 (regsets_store_inferior_registers): Correct error message.
12215 Add missing ``return 0''.
12216 (linux_fetch_registers): Renamed from fetch_inferior_registers.
12217 (linux_store_registers): Renamed from store_inferior_registers.
12218 (linux_read_memory): Renamed from read_inferior_memory.
12219 (linux_write_memory): Renamed from write_inferior_memory.
12220 (linux_target_ops): New structure.
12221 (initialize_low): Call set_target_ops ().
12222 * remote-utils.c (unhexify): New function.
12223 (hexify): New function.
12224 (input_interrupt): Send signals to ``signal_pid''.
12225 * server.c (inferior_pid): Remove.
12226 (start_inferior): Update create_inferior call.
12227 (attach_inferior): Call add_inferior.
12228 (handle_query): New function.
12229 (main): Call handle_query for `q' packets.
12230 * server.h: Include "target.h". Remove obsolete prototypes.
12231 Add prototypes for "inferiors.c", "target.c", hexify, and unhexify.
12232
12233 2002-04-09 Daniel Jacobowitz <drow@mvista.com>
12234
12235 * Makefile.in: Add WARN_CFLAGS. Update configury
12236 dependencies.
12237 * configure.in: Check for <string.h>
12238 * configure: Regenerate.
12239 * config.in: Regenerate.
12240 * gdbreplay.c: Include needed system headers.
12241 (remote_open): Remove strchr prototype.
12242 * linux-low.h: Correct #ifdef to HAVE_LINUX_USRREGS.
12243 * regcache.c (supply_register): Change buf argument to const void *.
12244 (supply_register_by_name): Likewise.
12245 (collect_register): Change buf argument to void *.
12246 (collect_register_by_name): Likewise.
12247 * regcache.h: Add missing prototypes.
12248 * remote-utils.c: Include <arpa/inet.h> for inet_ntoa.
12249 * server.c (handle_query): New function.
12250 (attached): New static variable, moved out of main.
12251 (main): Quiet longjmp clobber warnings.
12252 * server.h: Add ATTR_NORETURN and ATTR_FORMAT. Update prototypes.
12253 * utils.c (error): Remove NORETURN.
12254 (fatal): Likewise.
This page took 0.294874 seconds and 4 git commands to generate.